InPanel 1.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. inpanel/__init__.py +29 -0
  2. inpanel/acme.py +289 -0
  3. inpanel/aliyuncs.py +269 -0
  4. inpanel/app.py +514 -0
  5. inpanel/apt.py +223 -0
  6. inpanel/base.py +200 -0
  7. inpanel/config.py +139 -0
  8. inpanel/data/config.ini +29 -0
  9. inpanel/data/history +5 -0
  10. inpanel/data/runlogs.ini +12 -0
  11. inpanel/data/update_info.ini +4 -0
  12. inpanel/dnf.py +225 -0
  13. inpanel/lib/__init__.py +9 -0
  14. inpanel/lib/async_process.py +98 -0
  15. inpanel/lib/filelock.py +82 -0
  16. inpanel/lib/magic.py +233 -0
  17. inpanel/lib/pxssh.py +310 -0
  18. inpanel/lib/pyDes.py +867 -0
  19. inpanel/mod/__init__.py +0 -0
  20. inpanel/mod/apt.py +316 -0
  21. inpanel/mod/certificate.py +268 -0
  22. inpanel/mod/config.py +372 -0
  23. inpanel/mod/cron.py +315 -0
  24. inpanel/mod/disk.py +322 -0
  25. inpanel/mod/dnf.py +239 -0
  26. inpanel/mod/file.py +722 -0
  27. inpanel/mod/firewall.py +199 -0
  28. inpanel/mod/firewall_base.py +137 -0
  29. inpanel/mod/firewall_firewalld.py +170 -0
  30. inpanel/mod/firewall_iptables.py +176 -0
  31. inpanel/mod/firewall_macos.py +213 -0
  32. inpanel/mod/firewall_ufw.py +128 -0
  33. inpanel/mod/ftp.py +231 -0
  34. inpanel/mod/httpd.py +1205 -0
  35. inpanel/mod/lighttpd.py +26 -0
  36. inpanel/mod/login.py +98 -0
  37. inpanel/mod/mysql.py +577 -0
  38. inpanel/mod/named.py +26 -0
  39. inpanel/mod/nginx.py +2327 -0
  40. inpanel/mod/package.py +33 -0
  41. inpanel/mod/package_apt.py +62 -0
  42. inpanel/mod/package_base.py +77 -0
  43. inpanel/mod/package_dnf.py +62 -0
  44. inpanel/mod/package_map.py +366 -0
  45. inpanel/mod/package_yum.py +64 -0
  46. inpanel/mod/php.py +289 -0
  47. inpanel/mod/process.py +291 -0
  48. inpanel/mod/proftpd.py +26 -0
  49. inpanel/mod/pureftpd.py +26 -0
  50. inpanel/mod/query.py +108 -0
  51. inpanel/mod/server.py +1319 -0
  52. inpanel/mod/service.py +262 -0
  53. inpanel/mod/setting.py +228 -0
  54. inpanel/mod/shell.py +78 -0
  55. inpanel/mod/ssh.py +280 -0
  56. inpanel/mod/system.py +220 -0
  57. inpanel/mod/task.py +1337 -0
  58. inpanel/mod/ufw.py +14 -0
  59. inpanel/mod/user.py +306 -0
  60. inpanel/mod/vsftpd.py +67 -0
  61. inpanel/mod/yum.py +243 -0
  62. inpanel/plugins/__init__.py +10 -0
  63. inpanel/plugins/__pycache__/__init__.cpython-313.pyc +0 -0
  64. inpanel/plugins/acme/static/index.html +10 -0
  65. inpanel/plugins/acme/static/index.js +13 -0
  66. inpanel/plugins/shadowsocks-libev/__pycache__/info.cpython-313.pyc +0 -0
  67. inpanel/plugins/shadowsocks-libev/info.py +73 -0
  68. inpanel/plugins/shadowsocks-libev/static/index.html +70 -0
  69. inpanel/plugins/shadowsocks-libev/static/index.js +18 -0
  70. inpanel/public/css/global.css +138 -0
  71. inpanel/public/favicon.ico +0 -0
  72. inpanel/public/images/alipay.jpg +0 -0
  73. inpanel/public/images/loading.gif +0 -0
  74. inpanel/public/images/weixin.jpg +0 -0
  75. inpanel/public/index.html +94 -0
  76. inpanel/public/js/controllers/controllers.js +566 -0
  77. inpanel/public/js/controllers/database.js +590 -0
  78. inpanel/public/js/controllers/ecs.js +624 -0
  79. inpanel/public/js/controllers/file.js +940 -0
  80. inpanel/public/js/controllers/plugins.js +105 -0
  81. inpanel/public/js/controllers/service.js +1460 -0
  82. inpanel/public/js/controllers/site.js +1241 -0
  83. inpanel/public/js/controllers/utils.js +2319 -0
  84. inpanel/public/js/core.js +221 -0
  85. inpanel/public/js/directives.js +784 -0
  86. inpanel/public/js/filters.js +395 -0
  87. inpanel/public/js/services.js +257 -0
  88. inpanel/public/lib/angular/1.0.2/angular-resource.min.js +10 -0
  89. inpanel/public/lib/angular/1.0.2/angular.min.js +158 -0
  90. inpanel/public/lib/bootstrap/css/bootstrap-theme.css +587 -0
  91. inpanel/public/lib/bootstrap/css/bootstrap-theme.css.map +1 -0
  92. inpanel/public/lib/bootstrap/css/bootstrap-theme.min.css +6 -0
  93. inpanel/public/lib/bootstrap/css/bootstrap-theme.min.css.map +1 -0
  94. inpanel/public/lib/bootstrap/css/bootstrap.css +6757 -0
  95. inpanel/public/lib/bootstrap/css/bootstrap.css.map +1 -0
  96. inpanel/public/lib/bootstrap/css/bootstrap.min.css +6 -0
  97. inpanel/public/lib/bootstrap/css/bootstrap.min.css.map +1 -0
  98. inpanel/public/lib/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
  99. inpanel/public/lib/bootstrap/fonts/glyphicons-halflings-regular.svg +288 -0
  100. inpanel/public/lib/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
  101. inpanel/public/lib/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
  102. inpanel/public/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
  103. inpanel/public/lib/bootstrap/img/glyphicons-halflings-white.png +0 -0
  104. inpanel/public/lib/bootstrap/img/glyphicons-halflings.png +0 -0
  105. inpanel/public/lib/bootstrap/js/bootstrap.js +2377 -0
  106. inpanel/public/lib/bootstrap/js/bootstrap.min.js +7 -0
  107. inpanel/public/lib/bootstrap/js/npm.js +13 -0
  108. inpanel/public/lib/codemirror/codemirror-compressed.js +1 -0
  109. inpanel/public/lib/codemirror/codemirror.css +173 -0
  110. inpanel/public/lib/jquery/jquery-1.12.4.min.js +5 -0
  111. inpanel/public/lib/md5/md5.js +379 -0
  112. inpanel/public/lib/md5/md5.min.js +1 -0
  113. inpanel/public/partials/database/index.html +172 -0
  114. inpanel/public/partials/database/mysql/dbedit.html +462 -0
  115. inpanel/public/partials/database/mysql/dbnew.html +348 -0
  116. inpanel/public/partials/database/mysql/useredit.html +310 -0
  117. inpanel/public/partials/database/mysql/usernew.html +97 -0
  118. inpanel/public/partials/directives/message.html +20 -0
  119. inpanel/public/partials/directives/navbar.html +25 -0
  120. inpanel/public/partials/directives/selector.html +57 -0
  121. inpanel/public/partials/directives/srvbase.html +72 -0
  122. inpanel/public/partials/directives/srvext.html +34 -0
  123. inpanel/public/partials/directives/srvfile.html +23 -0
  124. inpanel/public/partials/directives/srvinstall.html +34 -0
  125. inpanel/public/partials/directives/srvlog.html +23 -0
  126. inpanel/public/partials/directives/srvminiop.html +28 -0
  127. inpanel/public/partials/directives/srvuninstall.html +38 -0
  128. inpanel/public/partials/directives/srvupdate.html +30 -0
  129. inpanel/public/partials/ecs/account.html +156 -0
  130. inpanel/public/partials/ecs/ecs.html +198 -0
  131. inpanel/public/partials/ecs/index.html +40 -0
  132. inpanel/public/partials/ecs/setings.html +459 -0
  133. inpanel/public/partials/file/file.html +501 -0
  134. inpanel/public/partials/file/trash.html +95 -0
  135. inpanel/public/partials/ftp.html +36 -0
  136. inpanel/public/partials/log.html +83 -0
  137. inpanel/public/partials/login.html +79 -0
  138. inpanel/public/partials/logout.html +22 -0
  139. inpanel/public/partials/main.html +534 -0
  140. inpanel/public/partials/plugins/index.html +55 -0
  141. inpanel/public/partials/plugins/plugins.html +13 -0
  142. inpanel/public/partials/secure.html +13 -0
  143. inpanel/public/partials/service/apache.html +147 -0
  144. inpanel/public/partials/service/cron.html +71 -0
  145. inpanel/public/partials/service/index.html +293 -0
  146. inpanel/public/partials/service/iptables.html +40 -0
  147. inpanel/public/partials/service/lighttpd.html +63 -0
  148. inpanel/public/partials/service/mariadb.html +113 -0
  149. inpanel/public/partials/service/memcache.html +36 -0
  150. inpanel/public/partials/service/minio.html +44 -0
  151. inpanel/public/partials/service/mongodb.html +44 -0
  152. inpanel/public/partials/service/mysql.html +113 -0
  153. inpanel/public/partials/service/named.html +61 -0
  154. inpanel/public/partials/service/nginx.html +296 -0
  155. inpanel/public/partials/service/ntp.html +40 -0
  156. inpanel/public/partials/service/php.html +250 -0
  157. inpanel/public/partials/service/proftpd.html +59 -0
  158. inpanel/public/partials/service/pureftpd.html +59 -0
  159. inpanel/public/partials/service/redis.html +40 -0
  160. inpanel/public/partials/service/samba.html +58 -0
  161. inpanel/public/partials/service/sendmail.html +40 -0
  162. inpanel/public/partials/service/ssh.html +186 -0
  163. inpanel/public/partials/service/tomcat.html +65 -0
  164. inpanel/public/partials/service/vsftpd.html +195 -0
  165. inpanel/public/partials/setting.html +299 -0
  166. inpanel/public/partials/site/apache/site.html +277 -0
  167. inpanel/public/partials/site/index.html +344 -0
  168. inpanel/public/partials/site/nginx/site.html +558 -0
  169. inpanel/public/partials/sorry.html +19 -0
  170. inpanel/public/partials/storage/autofm.html +103 -0
  171. inpanel/public/partials/storage/backup.html +42 -0
  172. inpanel/public/partials/storage/index.html +360 -0
  173. inpanel/public/partials/storage/migrate.html +93 -0
  174. inpanel/public/partials/storage/movedata.html +98 -0
  175. inpanel/public/partials/storage/remote.html +77 -0
  176. inpanel/public/partials/utils/cron.html +486 -0
  177. inpanel/public/partials/utils/firewall.html +266 -0
  178. inpanel/public/partials/utils/index.html +193 -0
  179. inpanel/public/partials/utils/network.html +118 -0
  180. inpanel/public/partials/utils/process.html +239 -0
  181. inpanel/public/partials/utils/repository.html +373 -0
  182. inpanel/public/partials/utils/shell.html +28 -0
  183. inpanel/public/partials/utils/ssl.html +319 -0
  184. inpanel/public/partials/utils/time.html +109 -0
  185. inpanel/public/partials/utils/user.html +359 -0
  186. inpanel/public/robots.txt +2 -0
  187. inpanel/remote.py +109 -0
  188. inpanel/templates/file/preview.html +34 -0
  189. inpanel/templates/index.html +93 -0
  190. inpanel/utils.py +282 -0
  191. inpanel/web.py +1811 -0
  192. inpanel/yum.py +756 -0
  193. inpanel-1.2.1.dist-info/METADATA +399 -0
  194. inpanel-1.2.1.dist-info/RECORD +198 -0
  195. inpanel-1.2.1.dist-info/WHEEL +5 -0
  196. inpanel-1.2.1.dist-info/entry_points.txt +2 -0
  197. inpanel-1.2.1.dist-info/licenses/LICENSE +30 -0
  198. inpanel-1.2.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,534 @@
1
+ <div navbar ng-init="currentItem='main'"></div>
2
+ <div ng-show="!loaded">
3
+ <div loading></div>
4
+ </div>
5
+
6
+ <div id="main" ng-show="loaded" style="display:none">
7
+ <div class="module-header">
8
+ <h3>欢迎使用 InPanel 控制面板</h3>
9
+ <p>
10
+ 当前版本:v{{version.version}}&nbsp;&nbsp;
11
+ <button class="btn btn-default btn-xs" ng-click="checkUpdate()" style="display:none" ng-show="!detectVer">
12
+ {{ '有新的可用版本,点此更新' | iftrue:hasNewver }}
13
+ {{ '检测新版本' | iftrue:!hasNewver }}
14
+ </button>
15
+ </p>
16
+ </div>
17
+
18
+ <div class="tabbable" ng-init="load()">
19
+ <ul class="nav nav-tabs">
20
+ <li ng-class="'active' | iftrue:activeTabName=='server'"><a href="#server" ng-click="sec('server')" data-toggle="tab">状态概览</a></li>
21
+ <li ng-class="'active' | iftrue:activeTabName=='network'"><a href="#network" ng-click="sec('network')" data-toggle="tab">网络信息</a></li>
22
+ <li ng-class="'active' | iftrue:activeTabName=='service'"><a href="#service" ng-click="sec('service')" data-toggle="tab">服务状态</a></li>
23
+ <li ng-class="'active' | iftrue:activeTabName=='system'"><a href="#system" ng-click="sec('system')" data-toggle="tab">系统信息</a></li>
24
+ <li ng-class="'active' | iftrue:activeTabName=='hardware'"><a href="#hardware" ng-click="sec('hardware')" data-toggle="tab">硬件信息</a></li>
25
+ <li ng-class="'active' | iftrue:activeTabName=='panel'"><a href="#panel" ng-click="sec('panel')" data-toggle="tab">面板信息</a></li>
26
+ <li class="pull-right">
27
+ <div class="btn-group btn-group-sm">
28
+ <button class="btn btn-default" title="刷新数据" ng-click="refresh()" ng-disabled="auto_refresh"><i class="glyphicon glyphicon-refresh"></i></button>
29
+ <button class="btn btn-default" title="开启自动刷新" ng-click="auto_refresh_open()" ng-disabled="auto_refresh"><i class="glyphicon glyphicon-play"></i></button>
30
+ <button class="btn btn-default" title="关闭自动刷新" ng-click="auto_refresh_close()" ng-disabled="!auto_refresh"><i class="glyphicon glyphicon-stop"></i></button>
31
+ </div>
32
+ </li>
33
+ </ul>
34
+ <div class="tab-content">
35
+ <div class="tab-pane table-responsive" ng-class="'active' | iftrue:activeTabName=='server'" id="server">
36
+ <table class="table">
37
+ <thead>
38
+ <tr>
39
+ <th colspan="2">状态概览</th>
40
+ </tr>
41
+ </thead>
42
+ <tbody>
43
+ <tr>
44
+ <td style="width:130px">服务器时间:</td>
45
+ <td>{{ info['server.datetime'] }}</td>
46
+ </tr>
47
+ <tr>
48
+ <td>启动时间:</td>
49
+ <td>{{ info['server.cpustat']['btime'] }}</td>
50
+ </tr>
51
+ <tr>
52
+ <td>运行时间:</td>
53
+ <td>{{ info['server.uptime']['up'] }}</td>
54
+ </tr>
55
+ <tr>
56
+ <td>空闲时间:</td>
57
+ <td>
58
+ <table class="table table-condensed table-borderless table-layout" style="width:300px">
59
+ <tr>
60
+ <td style="width:180px">
61
+ {{ info['server.uptime']['idle'] }}
62
+ </td>
63
+ <td style="width:80px">
64
+ <span ng-bind-html-unsafe="info['server.uptime']['idle_rate'] | uptime.idlerate"></span>
65
+ </td>
66
+ </tr>
67
+ </table>
68
+ </td>
69
+ </tr>
70
+ <tr>
71
+ <td>CPU使用率:</td>
72
+ <td>{{ info['server.cpustat']['total']['used_rate'] }}</td>
73
+ </tr>
74
+ <tr>
75
+ <td>当前负载:<br></td>
76
+ <td>
77
+ <table class="table table-condensed table-borderless table-layout" style="width:300px">
78
+ <tr>
79
+ <td style="width:130px">1 分钟进程数:</td>
80
+ <td style="width:30px" class="text-right">{{ info['server.loadavg']['1min'] }}</td>
81
+ <td style="width:20px"></td>
82
+ <td style="width:80px" ng-bind-html-unsafe="info['server.loadavg']['1min'] | loadavg.overload:info['server.cpuinfo']['cpu_count']"></td>
83
+ </tr>
84
+ <tr>
85
+ <td>5 分钟进程数:</td>
86
+ <td class="text-right">{{ info['server.loadavg']['5min'] }}</td>
87
+ <td></td>
88
+ <td ng-bind-html-unsafe="info['server.loadavg']['5min'] | loadavg.overload:info['server.cpuinfo']['cpu_count']">
89
+ </tr>
90
+ <tr>
91
+ <td>15 分钟进程数:</td>
92
+ <td class="text-right">{{ info['server.loadavg']['15min'] }}</td>
93
+ <td></td>
94
+ <td ng-bind-html-unsafe="info['server.loadavg']['15min'] | loadavg.overload:info['server.cpuinfo']['cpu_count']">
95
+ </tr>
96
+ </table>
97
+ </td>
98
+ </tr>
99
+ <tr>
100
+ <td>内存概览:</td>
101
+ <td>
102
+ <table class="table table-condensed table-borderless table-layout" style="width:300px">
103
+ <tr>
104
+ <td style="width:100px">总大小:</td>
105
+ <td class="text-right" style="width:80px">{{ info['server.meminfo']['mem_total'] }}</td>
106
+ <td style="width:20px"></td>
107
+ <td style="width:80px"></td>
108
+ </tr>
109
+ <tr>
110
+ <td>已用大小:</td>
111
+ <td class="text-right">{{ info['server.meminfo']['mem_used'] }}</td>
112
+ <td></td>
113
+ <td ng-bind-html-unsafe="info['server.meminfo']['mem_used_rate'] | space.used"></td>
114
+ </tr>
115
+ <tr>
116
+ <td>空闲内存:</td>
117
+ <td class="text-right">{{ info['server.meminfo']['mem_free'] }}</td>
118
+ <td></td>
119
+ <td ng-bind-html-unsafe="info['server.meminfo']['mem_free_rate'] | space.free"></td>
120
+ </tr>
121
+ <tr>
122
+ <td>缓冲区大小:</td>
123
+ <td class="text-right">{{ info['server.meminfo']['mem_buffers'] }}</td>
124
+ <td></td>
125
+ <td></td>
126
+ </tr>
127
+ <tr>
128
+ <td>缓存大小:</td>
129
+ <td class="text-right">{{ info['server.meminfo']['mem_cached'] }}</td>
130
+ <td></td>
131
+ <td></td>
132
+ </tr>
133
+ <tr>
134
+ <td>可用内存:</td>
135
+ <td class="text-right">{{ info['server.meminfo']['mem_available'] }}</td>
136
+ <td></td>
137
+ <td ng-bind-html-unsafe="info['server.meminfo']['mem_available_rate'] | space.available"></td>
138
+ </tr>
139
+ <tr ng-show="info['server.meminfo']['mem_available'] == '0B'">
140
+ <td>可用内存(计算):</td>
141
+ <td class="text-right">{{ info['server.meminfo']['mem_available_computed'] }}</td>
142
+ <td></td>
143
+ <td ng-bind-html-unsafe="info['server.meminfo']['mem_available_computed_rate'] | space.available"></td>
144
+ </tr>
145
+ </table>
146
+ </td>
147
+ </tr>
148
+ <tr ng-show="info['server.meminfo']['swap_total'] != '0B'">
149
+ <td>交换空间 :</td>
150
+ <td>
151
+ <table class="table table-condensed table-borderless table-layout" style="width:300px">
152
+ <tr>
153
+ <td style="width:80px">总大小:</td>
154
+ <td class="text-right" style="width:80px">{{ info['server.meminfo']['swap_total'] }}</td>
155
+ <td style="width:20px"></td>
156
+ <td style="width:80px"></td>
157
+ </tr>
158
+ <tr>
159
+ <td>已用大小:</td>
160
+ <td class="text-right">{{ info['server.meminfo']['swap_used'] }}</td>
161
+ <td></td>
162
+ <td ng-bind-html-unsafe="info['server.meminfo']['swap_used_rate'] | space.used"></td>
163
+ </tr>
164
+ <tr>
165
+ <td>空闲空间:</td>
166
+ <td class="text-right">{{ info['server.meminfo']['swap_free'] }}</td>
167
+ <td></td>
168
+ <td ng-bind-html-unsafe="info['server.meminfo']['swap_free_rate'] | space.free"></td>
169
+ </tr>
170
+ <tr>
171
+ <td>Swappiness:</td>
172
+ <td class="text-right">{{ info['server.meminfo']['swap_swappiness'] }}</td>
173
+ <td></td>
174
+ <td></td>
175
+ </tr>
176
+ </table>
177
+ </td>
178
+ </tr>
179
+ <tr ng-show="info['server.mounts']">
180
+ <td>存储空间:</td>
181
+ <td>
182
+ <table class="table table-condensed table-borderless table-layout" style="width:350px">
183
+ <tr>
184
+ <th>挂载点</th>
185
+ <th class="text-right">总大小</th>
186
+ <th class="text-right">已使用</th>
187
+ <th class="text-right">剩余可用</th>
188
+ <th class="text-right">使用率</th>
189
+ </tr>
190
+ <tr ng-repeat="mount in info['server.mounts']">
191
+ <td>{{ mount['path'] }}</td>
192
+ <td class="text-right">{{ mount['total'] }}</td>
193
+ <td class="text-right">{{ mount['used'] }}</td>
194
+ <td class="text-right">{{ mount['free'] }}</td>
195
+ <td class="text-right" ng-bind-html-unsafe="mount['used_rate'] | space.used"></td>
196
+ </tr>
197
+ </table>
198
+ </td>
199
+ </tr>
200
+ </tbody>
201
+ </table>
202
+ </div>
203
+ <div class="tab-pane table-responsive" ng-class="'active' | iftrue:activeTabName=='network'" id="network">
204
+ <table class="table">
205
+ <thead>
206
+ <tr>
207
+ <th colspan="2">网络信息</th>
208
+ </tr>
209
+ </thead>
210
+ <tbody>
211
+ <tr>
212
+ <td>DNS服务器:</td>
213
+ <td>
214
+ <table class="table table-condensed table-borderless table-layout">
215
+ <tr ng-repeat="nameserver in info['server.nameservers']">
216
+ <td>{{ nameserver }}</td>
217
+ </tr>
218
+ </table>
219
+ </td>
220
+ </tr>
221
+ <tr ng-repeat="netiface in info['server.netifaces']">
222
+ <td>网络接口{{ $index+1 }}:</td>
223
+ <td>
224
+ <table class="table table-condensed table-borderless table-layout" style="width:400px">
225
+ <tr>
226
+ <td>状态:</td>
227
+ <td ng-bind-html-unsafe="netiface['status'] | netiface.updown"></td>
228
+ </tr>
229
+ <tr>
230
+ <td>名称:</td>
231
+ <td>{{ netiface['name'] }} ({{ netiface['encap'] | netiface.encap }})</td>
232
+ </tr>
233
+ <tr>
234
+ <td>IPv4地址:</td>
235
+ <td>{{ netiface['ip'] }}</td>
236
+ </tr>
237
+ <tr ng-show="netiface['encap'] != 'Loopback'">
238
+ <td>子网掩码:</td>
239
+ <td>{{ netiface['mask'] }}</td>
240
+ </tr>
241
+ <tr ng-show="netiface['gw']">
242
+ <td>默认网关:</td>
243
+ <td>{{ netiface['gw'] }}</td>
244
+ </tr>
245
+ <tr ng-show="netiface['encap'] != 'Loopback'">
246
+ <td>物理地址:</td>
247
+ <td>{{ netiface['mac'] }}</td>
248
+ </tr>
249
+ <tr>
250
+ <td>流量信息:</td>
251
+ <td>
252
+ <div style="width:260px;padding:3px 10px;margin-top:3px;">
253
+ <table class="table table-condensed table-bordered table-layout" style="width:240px;">
254
+ <tr>
255
+ <th style="width:80px"></th>
256
+ <th style="width:80px" class="text-right">累计流量</th>
257
+ <th style="width:80px" class="text-right">实时速率</th>
258
+ </tr>
259
+ <tr>
260
+ <td>发送:</td>
261
+ <td class="text-right">{{ netiface['tx'] }}</td>
262
+ <td class="text-right">{{ netiface['tx_speed'] | bytes2human }}/s</td>
263
+ </tr>
264
+ <tr>
265
+ <td>接收:</td>
266
+ <td class="text-right">{{ netiface['rx'] }}</td>
267
+ <td class="text-right">{{ netiface['rx_speed'] | bytes2human }}/s</td>
268
+ </tr>
269
+ </table>
270
+ </div>
271
+ </td>
272
+ </tr>
273
+ </table>
274
+ </td>
275
+ </tr>
276
+ </tbody>
277
+ </table>
278
+ </div>
279
+ <div class="tab-pane table-responsive" ng-class="'active' | iftrue:activeTabName=='service'" id="service">
280
+ <table class="table">
281
+ <thead>
282
+ <tr>
283
+ <th colspan="3">服务状态</th>
284
+ </tr>
285
+ </thead>
286
+ <tbody>
287
+ <tr>
288
+ <td>InPanel</td>
289
+ <td ng-bind-html-unsafe="info['service.inpanel']['status'] | service.status"></td>
290
+ <td class="muted">服务器控制面板 InPanel</td>
291
+ </tr>
292
+ <tr ng-show="info['service.nginx'] != null">
293
+ <td>Nginx</td>
294
+ <td ng-bind-html-unsafe="info['service.nginx']['status'] | service.status"></td>
295
+ <td class="muted">高性能的 HTTP 服务器</td>
296
+ </tr>
297
+ <tr ng-show="info['service.httpd'] != null">
298
+ <td>Apache</td>
299
+ <td ng-bind-html-unsafe="info['service.httpd']['status'] | service.status"></td>
300
+ <td class="muted">老牌 HTTP 服务器</td>
301
+ </tr>
302
+ <tr ng-show="info['service.vsftpd'] != null">
303
+ <td>vsftpd</td>
304
+ <td ng-bind-html-unsafe="info['service.vsftpd']['status'] | service.status"></td>
305
+ <td class="muted">安全快速的FTP服务器</td>
306
+ </tr>
307
+ <tr ng-show="info['service.mysqld'] != null">
308
+ <td>MySQL</td>
309
+ <td ng-bind-html-unsafe="info['service.mysqld']['status'] | service.status"></td>
310
+ <td class="muted">最流行的开源关系型数据库服务器</td>
311
+ </tr>
312
+ <tr ng-show="info['service.redis'] != null">
313
+ <td>Redis</td>
314
+ <td ng-bind-html-unsafe="info['service.redis']['status'] | service.status"></td>
315
+ <td class="muted">高性能内存数据库</td>
316
+ </tr>
317
+ <tr ng-show="info['service.memcached'] != null">
318
+ <td>Memcache</td>
319
+ <td ng-bind-html-unsafe="info['service.memcached']['status'] | service.status"></td>
320
+ <td class="muted">内存数据库</td>
321
+ </tr>
322
+ <tr ng-show="info['service.mongod'] != null">
323
+ <td>MongoDB</td>
324
+ <td ng-bind-html-unsafe="info['service.mongod']['status'] | service.status"></td>
325
+ <td class="muted">分布式高性能的数据库服务器</td>
326
+ </tr>
327
+ <tr ng-show="info['service.php-fpm'] != null">
328
+ <td>PHP</td>
329
+ <td ng-bind-html-unsafe="info['service.php-fpm']['status'] | service.status"></td>
330
+ <td class="muted">PHP 脚本解析器</td>
331
+ </tr>
332
+ <tr ng-show="info['service.sendmail'] != null">
333
+ <td style="width:120px">Sendmail</td>
334
+ <td ng-bind-html-unsafe="info['service.sendmail']['status'] | service.status"></td>
335
+ <td class="muted">邮件传输服务</td>
336
+ </tr>
337
+ <tr ng-show="info['service.sshd'] != null">
338
+ <td>SSH</td>
339
+ <td ng-bind-html-unsafe="info['service.sshd']['status'] | service.status"></td>
340
+ <td class="muted">远程连接服务器</td>
341
+ </tr>
342
+ <tr ng-show="info['service.iptables'] != null">
343
+ <td>iptables</td>
344
+ <td ng-bind-html-unsafe="info['service.iptables']['status'] | service.status"></td>
345
+ <td class="muted">Linux 防火墙</td>
346
+ </tr>
347
+ <tr ng-show="info['service.crond'] != null">
348
+ <td>Cron</td>
349
+ <td ng-bind-html-unsafe="info['service.crond']['status'] | service.status"></td>
350
+ <td class="muted">定时任务管理服务器</td>
351
+ </tr>
352
+ <tr ng-show="info['service.crond'] != null && info['server.virt'] != 'Virtuozzo/OpenVZ'" style="display:none">
353
+ <td>NTP</td>
354
+ <td ng-bind-html-unsafe="info['service.ntpd']['status'] | service.status"></td>
355
+ <td class="muted">时间同步服务</td>
356
+ </tr>
357
+ </tbody>
358
+ </table>
359
+ </div>
360
+ <div class="tab-pane table-responsive" ng-class="'active' | iftrue:activeTabName=='system'" id="system">
361
+ <table class="table">
362
+ <thead>
363
+ <tr>
364
+ <th colspan="2">系统信息</th>
365
+ </tr>
366
+ </thead>
367
+ <tbody>
368
+ <tr ng-show="info['server.virt']">
369
+ <td style="width:100px">系统平台:</td>
370
+ <td>{{ info['server.virt'] }}</td>
371
+ </tr>
372
+ <tr>
373
+ <td>主机名称:</td>
374
+ <td>{{ info['server.hostname'] }}</td>
375
+ </tr>
376
+ <tr>
377
+ <td>发行版本:</td>
378
+ <td>{{ info['server.distribution'] }}</td>
379
+ </tr>
380
+ <tr>
381
+ <td>内核版本:</td>
382
+ <td>{{ info['server.uname']['kernel_name'] }} {{ info['server.uname']['kernel_release'] }} {{ info['server.uname']['kernel_version'] }}</td>
383
+ </tr>
384
+ <tr>
385
+ <td>系统类型:</td>
386
+ <td>硬件:{{ info['server.uname']['machine'] }}<br>CPU:{{ info['server.uname']['processor'] }}<br>实现:{{ info['server.uname']['platform'] }}</td>
387
+ </tr>
388
+ </tbody>
389
+ </table>
390
+
391
+ </div>
392
+ <div class="tab-pane table-responsive" ng-class="'active' | iftrue:activeTabName=='hardware'" id="hardware">
393
+ <table class="table">
394
+ <thead>
395
+ <tr>
396
+ <th colspan="2">硬件信息</th>
397
+ </tr>
398
+ </thead>
399
+ <tbody>
400
+ <tr>
401
+ <td style="width:100px">CPU个数:</td>
402
+ <td>{{ info['server.cpuinfo']['cpu_count'] }} 个</td>
403
+ </tr>
404
+ <tr>
405
+ <td>CPU核心:</td>
406
+ <td>
407
+ <table class="table table-condensed table-borderless table-layout" ng-class="'table-nopadding' | iftrue:info['server.cpuinfo']['core_count']==1">
408
+ <tr ng-show="info['server.cpuinfo']['core_count'] > 0">
409
+ <td colspan="2">共有 {{ info['server.cpuinfo']['core_count'] }} 个核心,型号如下:</td>
410
+ </tr>
411
+ <tr ng-repeat="core in info['server.cpuinfo']['cores']">
412
+ <td>{{ core['model'] }} ({{ core['bits'] }})</td>
413
+ </tr>
414
+ </table>
415
+ </td>
416
+ </tr>
417
+ <tr>
418
+ <td>内存大小:</td>
419
+ <td>{{ info['server.meminfo']['mem_total'] }}</td>
420
+ </tr>
421
+ <tr ng-show="info['server.diskinfo']['count']>0">
422
+ <td>存储设备:</td>
423
+ <td>
424
+ <table class="table table-condensed table-borderless table-layout" style="width:300px">
425
+ <tr>
426
+ <td colspan="2">共有 {{ info['server.diskinfo']['count'] }} 个存储设备,共 {{ info['server.diskinfo']['totalsize'] }}</td>
427
+ </tr>
428
+ <tr ng-repeat="partition in info['server.diskinfo']['partitions'] | filter:{'is_hw': true}">
429
+ <td>{{ partition['name'] }}</td>
430
+ <td>{{ partition['size'] }}</td>
431
+ </tr>
432
+ </table>
433
+ </td>
434
+ </tr>
435
+ </tbody>
436
+ </table>
437
+ </div>
438
+ <div class="tab-pane table-responsive" ng-class="'active' | iftrue:activeTabName=='panel'" id="panel">
439
+ <table class="table">
440
+ <thead>
441
+ <tr>
442
+ <th colspan="2">面板信息</th>
443
+ </tr>
444
+ </thead>
445
+ <tbody>
446
+ <tr>
447
+ <td style="width:130px">面板版本:</td>
448
+ <td>{{ info['server.panelinfo']['version'] }}</td>
449
+ </tr>
450
+ <tr>
451
+ <td>发布时间:</td>
452
+ <td>{{ info['server.panelinfo']['releasetime'] }}</td>
453
+ </tr>
454
+ <tr>
455
+ <td>启动时间:</td>
456
+ <td>{{ info['server.panelinfo']['start_time'] }}</td>
457
+ </tr>
458
+ <tr>
459
+ <td>运行时长:</td>
460
+ <td>{{ info['server.panelinfo']['uptime'] }}</td>
461
+ </tr>
462
+ <tr>
463
+ <td>运行用户:</td>
464
+ <td>{{ info['server.panelinfo']['run_user'] }}</td>
465
+ </tr>
466
+ <tr>
467
+ <td>运行方式:</td>
468
+ <td>{{ info['server.panelinfo']['run_mode'] }}</td>
469
+ </tr>
470
+ <tr>
471
+ <td>进程ID:</td>
472
+ <td>{{ info['server.panelinfo']['pid'] }}</td>
473
+ </tr>
474
+ <tr>
475
+ <td>运行命令:</td>
476
+ <td><code style="word-break: break-all;">{{ info['server.panelinfo']['run_command'] }}</code></td>
477
+ </tr>
478
+ <tr>
479
+ <td>绑定地址:</td>
480
+ <td>{{ info['server.panelinfo']['bind_addr'] }}</td>
481
+ </tr>
482
+ <tr>
483
+ <td>访问地址:</td>
484
+ <td><a href="{{ info['server.panelinfo']['access_url'] }}" target="_blank">{{ info['server.panelinfo']['access_url'] }}</a></td>
485
+ </tr>
486
+ <tr>
487
+ <td>内存占用:</td>
488
+ <td>
489
+ <table class="table table-condensed table-borderless table-layout" style="width:300px">
490
+ <tr>
491
+ <td style="width:100px">物理内存:</td>
492
+ <td>{{ info['server.panelinfo']['mem_rss'] }}</td>
493
+ </tr>
494
+ <tr>
495
+ <td>虚拟内存:</td>
496
+ <td>{{ info['server.panelinfo']['mem_vms'] }}</td>
497
+ </tr>
498
+ </table>
499
+ </td>
500
+ </tr>
501
+ <tr>
502
+ <td>CPU占用率:</td>
503
+ <td>{{ info['server.panelinfo']['cpu_percent'] }}</td>
504
+ </tr>
505
+ <tr>
506
+ <td>根目录:</td>
507
+ <td>{{ info['server.panelinfo']['root_path'] }}</td>
508
+ </tr>
509
+ <tr>
510
+ <td>配置文件:</td>
511
+ <td>{{ info['server.panelinfo']['config_file'] }}</td>
512
+ </tr>
513
+ <tr>
514
+ <td>执行文件:</td>
515
+ <td>{{ info['server.panelinfo']['exec_file'] }}</td>
516
+ </tr>
517
+ <tr>
518
+ <td>PID文件:</td>
519
+ <td>{{ info['server.panelinfo']['pid_file'] }}</td>
520
+ </tr>
521
+ <tr>
522
+ <td>日志文件:</td>
523
+ <td>{{ info['server.panelinfo']['log_file'] }}</td>
524
+ </tr>
525
+ <tr>
526
+ <td>错误日志:</td>
527
+ <td>{{ info['server.panelinfo']['error_log_file'] }}</td>
528
+ </tr>
529
+ </tbody>
530
+ </table>
531
+ </div>
532
+ </div>
533
+ </div>
534
+ </div>
@@ -0,0 +1,55 @@
1
+ <div navbar ng-init="currentItem='plugins'"></div>
2
+ <div ng-show="!loaded"><div loading></div></div>
3
+
4
+ <div id="main" ng-show="loaded" style="display:none">
5
+ <div class="module-header">
6
+ <h3>应用管理</h3>
7
+ </div>
8
+
9
+ <div ng-init="load()">
10
+ <table class="table table-hover table-condensed">
11
+ <thead>
12
+ <tr>
13
+ <th colspan="4">应用程序</th>
14
+ </tr>
15
+ </thead>
16
+ <tbody>
17
+ <tr>
18
+ <td style="width:120px;">ACME</td>
19
+ <td style="width:60px;"><span class="label label-success">已安装</span></td>
20
+ <td style="width:380px;" class="muted">使用 ACME 协议 申请和管理 Let’s Encrypt 证书</td>
21
+ <td style="width:100px;">
22
+ <a class="btn btn-default btn-sm" href="#/plugins/acme" disabled>正在开发</a>
23
+ </td>
24
+ </tr>
25
+ <tr>
26
+ <td>Shadowsocks</td>
27
+ <td><span class="label label-default">已停止</span></td>
28
+ <td class="muted">libev 版 - 内存占用小(600k左右),低 CPU 消耗</td>
29
+ <td>
30
+ <a class="btn btn-default btn-sm" role="button" href="#/plugins/shadowsocks" disabled>正在开发</a>
31
+ <!-- <div srvminiop ng-init="name='Shadowsocks-libev';service='shadowsocks-libev';urlname='shadowsocks-libev'"></div> -->
32
+ </td>
33
+ </tr>
34
+ <tr>
35
+ <td>Shadowsocks</td>
36
+ <td><span class="label label-default">已停止</span></td>
37
+ <td class="muted">Shadowsocks Python 版</td>
38
+ <td>
39
+ <a class="btn btn-default btn-sm" role="button" href="#/plugins/shadowsocks" disabled>正在开发</a>
40
+ <!-- <div srvminiop ng-init="name='Shadowsocks';service='shadowsocks';urlname='shadowsocks'"></div> -->
41
+ </td>
42
+ </tr>
43
+ <tr>
44
+ <td>ShadowsocksR</td>
45
+ <td><span class="label label-info">未安装</span></td>
46
+ <td class="muted">ShadowsocksR</td>
47
+ <td>
48
+ <a class="btn btn-default btn-sm" role="button" href="#/plugins/shadowsocks" disabled>正在开发</a>
49
+ <!-- <div srvminiop ng-init="name='ShadowsocksR';service='shadowsocks';urlname='shadowsocks'"></div> -->
50
+ </td>
51
+ </tr>
52
+ </tbody>
53
+ </table>
54
+ </div>
55
+ </div>
@@ -0,0 +1,13 @@
1
+ <div navbar ng-init="currentItem='plugins'"></div>
2
+ <div ng-show="!loaded"><div loading></div></div>
3
+
4
+ <div id="main" ng-show="loaded" style="display:none">
5
+ <div class="module-header">
6
+ <h3>插件主界面</h3>
7
+ </div>
8
+
9
+ <div ng-init="load()">
10
+ <div plugins ng-init="pluginsName='acme'"></div>
11
+ <div plugins pluginsName="acme"></div>
12
+ </div>
13
+ </div>
@@ -0,0 +1,13 @@
1
+ <div navbar ng-init="currentItem='utils.secure'"></div>
2
+ <div ng-show="!loaded">
3
+ <div loading></div>
4
+ </div>
5
+
6
+ <div id="main" ng-show="loaded" style="display:none">
7
+ <div class="module-header">
8
+ <h3>安全管理</h3>
9
+ </div>
10
+
11
+ <p>安全管理功能即将推出,敬请留意 InPanel 的版本更新。<a href="#/setting?s=upversion">检测新版本</a></p>
12
+ <p>使用备份管理,可以提高整个服务器的安全性,确保数据安全。</p>
13
+ </div>