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.
- inpanel/__init__.py +29 -0
- inpanel/acme.py +289 -0
- inpanel/aliyuncs.py +269 -0
- inpanel/app.py +514 -0
- inpanel/apt.py +223 -0
- inpanel/base.py +200 -0
- inpanel/config.py +139 -0
- inpanel/data/config.ini +29 -0
- inpanel/data/history +5 -0
- inpanel/data/runlogs.ini +12 -0
- inpanel/data/update_info.ini +4 -0
- inpanel/dnf.py +225 -0
- inpanel/lib/__init__.py +9 -0
- inpanel/lib/async_process.py +98 -0
- inpanel/lib/filelock.py +82 -0
- inpanel/lib/magic.py +233 -0
- inpanel/lib/pxssh.py +310 -0
- inpanel/lib/pyDes.py +867 -0
- inpanel/mod/__init__.py +0 -0
- inpanel/mod/apt.py +316 -0
- inpanel/mod/certificate.py +268 -0
- inpanel/mod/config.py +372 -0
- inpanel/mod/cron.py +315 -0
- inpanel/mod/disk.py +322 -0
- inpanel/mod/dnf.py +239 -0
- inpanel/mod/file.py +722 -0
- inpanel/mod/firewall.py +199 -0
- inpanel/mod/firewall_base.py +137 -0
- inpanel/mod/firewall_firewalld.py +170 -0
- inpanel/mod/firewall_iptables.py +176 -0
- inpanel/mod/firewall_macos.py +213 -0
- inpanel/mod/firewall_ufw.py +128 -0
- inpanel/mod/ftp.py +231 -0
- inpanel/mod/httpd.py +1205 -0
- inpanel/mod/lighttpd.py +26 -0
- inpanel/mod/login.py +98 -0
- inpanel/mod/mysql.py +577 -0
- inpanel/mod/named.py +26 -0
- inpanel/mod/nginx.py +2327 -0
- inpanel/mod/package.py +33 -0
- inpanel/mod/package_apt.py +62 -0
- inpanel/mod/package_base.py +77 -0
- inpanel/mod/package_dnf.py +62 -0
- inpanel/mod/package_map.py +366 -0
- inpanel/mod/package_yum.py +64 -0
- inpanel/mod/php.py +289 -0
- inpanel/mod/process.py +291 -0
- inpanel/mod/proftpd.py +26 -0
- inpanel/mod/pureftpd.py +26 -0
- inpanel/mod/query.py +108 -0
- inpanel/mod/server.py +1319 -0
- inpanel/mod/service.py +262 -0
- inpanel/mod/setting.py +228 -0
- inpanel/mod/shell.py +78 -0
- inpanel/mod/ssh.py +280 -0
- inpanel/mod/system.py +220 -0
- inpanel/mod/task.py +1337 -0
- inpanel/mod/ufw.py +14 -0
- inpanel/mod/user.py +306 -0
- inpanel/mod/vsftpd.py +67 -0
- inpanel/mod/yum.py +243 -0
- inpanel/plugins/__init__.py +10 -0
- inpanel/plugins/__pycache__/__init__.cpython-313.pyc +0 -0
- inpanel/plugins/acme/static/index.html +10 -0
- inpanel/plugins/acme/static/index.js +13 -0
- inpanel/plugins/shadowsocks-libev/__pycache__/info.cpython-313.pyc +0 -0
- inpanel/plugins/shadowsocks-libev/info.py +73 -0
- inpanel/plugins/shadowsocks-libev/static/index.html +70 -0
- inpanel/plugins/shadowsocks-libev/static/index.js +18 -0
- inpanel/public/css/global.css +138 -0
- inpanel/public/favicon.ico +0 -0
- inpanel/public/images/alipay.jpg +0 -0
- inpanel/public/images/loading.gif +0 -0
- inpanel/public/images/weixin.jpg +0 -0
- inpanel/public/index.html +94 -0
- inpanel/public/js/controllers/controllers.js +566 -0
- inpanel/public/js/controllers/database.js +590 -0
- inpanel/public/js/controllers/ecs.js +624 -0
- inpanel/public/js/controllers/file.js +940 -0
- inpanel/public/js/controllers/plugins.js +105 -0
- inpanel/public/js/controllers/service.js +1460 -0
- inpanel/public/js/controllers/site.js +1241 -0
- inpanel/public/js/controllers/utils.js +2319 -0
- inpanel/public/js/core.js +221 -0
- inpanel/public/js/directives.js +784 -0
- inpanel/public/js/filters.js +395 -0
- inpanel/public/js/services.js +257 -0
- inpanel/public/lib/angular/1.0.2/angular-resource.min.js +10 -0
- inpanel/public/lib/angular/1.0.2/angular.min.js +158 -0
- inpanel/public/lib/bootstrap/css/bootstrap-theme.css +587 -0
- inpanel/public/lib/bootstrap/css/bootstrap-theme.css.map +1 -0
- inpanel/public/lib/bootstrap/css/bootstrap-theme.min.css +6 -0
- inpanel/public/lib/bootstrap/css/bootstrap-theme.min.css.map +1 -0
- inpanel/public/lib/bootstrap/css/bootstrap.css +6757 -0
- inpanel/public/lib/bootstrap/css/bootstrap.css.map +1 -0
- inpanel/public/lib/bootstrap/css/bootstrap.min.css +6 -0
- inpanel/public/lib/bootstrap/css/bootstrap.min.css.map +1 -0
- inpanel/public/lib/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
- inpanel/public/lib/bootstrap/fonts/glyphicons-halflings-regular.svg +288 -0
- inpanel/public/lib/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
- inpanel/public/lib/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
- inpanel/public/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
- inpanel/public/lib/bootstrap/img/glyphicons-halflings-white.png +0 -0
- inpanel/public/lib/bootstrap/img/glyphicons-halflings.png +0 -0
- inpanel/public/lib/bootstrap/js/bootstrap.js +2377 -0
- inpanel/public/lib/bootstrap/js/bootstrap.min.js +7 -0
- inpanel/public/lib/bootstrap/js/npm.js +13 -0
- inpanel/public/lib/codemirror/codemirror-compressed.js +1 -0
- inpanel/public/lib/codemirror/codemirror.css +173 -0
- inpanel/public/lib/jquery/jquery-1.12.4.min.js +5 -0
- inpanel/public/lib/md5/md5.js +379 -0
- inpanel/public/lib/md5/md5.min.js +1 -0
- inpanel/public/partials/database/index.html +172 -0
- inpanel/public/partials/database/mysql/dbedit.html +462 -0
- inpanel/public/partials/database/mysql/dbnew.html +348 -0
- inpanel/public/partials/database/mysql/useredit.html +310 -0
- inpanel/public/partials/database/mysql/usernew.html +97 -0
- inpanel/public/partials/directives/message.html +20 -0
- inpanel/public/partials/directives/navbar.html +25 -0
- inpanel/public/partials/directives/selector.html +57 -0
- inpanel/public/partials/directives/srvbase.html +72 -0
- inpanel/public/partials/directives/srvext.html +34 -0
- inpanel/public/partials/directives/srvfile.html +23 -0
- inpanel/public/partials/directives/srvinstall.html +34 -0
- inpanel/public/partials/directives/srvlog.html +23 -0
- inpanel/public/partials/directives/srvminiop.html +28 -0
- inpanel/public/partials/directives/srvuninstall.html +38 -0
- inpanel/public/partials/directives/srvupdate.html +30 -0
- inpanel/public/partials/ecs/account.html +156 -0
- inpanel/public/partials/ecs/ecs.html +198 -0
- inpanel/public/partials/ecs/index.html +40 -0
- inpanel/public/partials/ecs/setings.html +459 -0
- inpanel/public/partials/file/file.html +501 -0
- inpanel/public/partials/file/trash.html +95 -0
- inpanel/public/partials/ftp.html +36 -0
- inpanel/public/partials/log.html +83 -0
- inpanel/public/partials/login.html +79 -0
- inpanel/public/partials/logout.html +22 -0
- inpanel/public/partials/main.html +534 -0
- inpanel/public/partials/plugins/index.html +55 -0
- inpanel/public/partials/plugins/plugins.html +13 -0
- inpanel/public/partials/secure.html +13 -0
- inpanel/public/partials/service/apache.html +147 -0
- inpanel/public/partials/service/cron.html +71 -0
- inpanel/public/partials/service/index.html +293 -0
- inpanel/public/partials/service/iptables.html +40 -0
- inpanel/public/partials/service/lighttpd.html +63 -0
- inpanel/public/partials/service/mariadb.html +113 -0
- inpanel/public/partials/service/memcache.html +36 -0
- inpanel/public/partials/service/minio.html +44 -0
- inpanel/public/partials/service/mongodb.html +44 -0
- inpanel/public/partials/service/mysql.html +113 -0
- inpanel/public/partials/service/named.html +61 -0
- inpanel/public/partials/service/nginx.html +296 -0
- inpanel/public/partials/service/ntp.html +40 -0
- inpanel/public/partials/service/php.html +250 -0
- inpanel/public/partials/service/proftpd.html +59 -0
- inpanel/public/partials/service/pureftpd.html +59 -0
- inpanel/public/partials/service/redis.html +40 -0
- inpanel/public/partials/service/samba.html +58 -0
- inpanel/public/partials/service/sendmail.html +40 -0
- inpanel/public/partials/service/ssh.html +186 -0
- inpanel/public/partials/service/tomcat.html +65 -0
- inpanel/public/partials/service/vsftpd.html +195 -0
- inpanel/public/partials/setting.html +299 -0
- inpanel/public/partials/site/apache/site.html +277 -0
- inpanel/public/partials/site/index.html +344 -0
- inpanel/public/partials/site/nginx/site.html +558 -0
- inpanel/public/partials/sorry.html +19 -0
- inpanel/public/partials/storage/autofm.html +103 -0
- inpanel/public/partials/storage/backup.html +42 -0
- inpanel/public/partials/storage/index.html +360 -0
- inpanel/public/partials/storage/migrate.html +93 -0
- inpanel/public/partials/storage/movedata.html +98 -0
- inpanel/public/partials/storage/remote.html +77 -0
- inpanel/public/partials/utils/cron.html +486 -0
- inpanel/public/partials/utils/firewall.html +266 -0
- inpanel/public/partials/utils/index.html +193 -0
- inpanel/public/partials/utils/network.html +118 -0
- inpanel/public/partials/utils/process.html +239 -0
- inpanel/public/partials/utils/repository.html +373 -0
- inpanel/public/partials/utils/shell.html +28 -0
- inpanel/public/partials/utils/ssl.html +319 -0
- inpanel/public/partials/utils/time.html +109 -0
- inpanel/public/partials/utils/user.html +359 -0
- inpanel/public/robots.txt +2 -0
- inpanel/remote.py +109 -0
- inpanel/templates/file/preview.html +34 -0
- inpanel/templates/index.html +93 -0
- inpanel/utils.py +282 -0
- inpanel/web.py +1811 -0
- inpanel/yum.py +756 -0
- inpanel-1.2.1.dist-info/METADATA +399 -0
- inpanel-1.2.1.dist-info/RECORD +198 -0
- inpanel-1.2.1.dist-info/WHEEL +5 -0
- inpanel-1.2.1.dist-info/entry_points.txt +2 -0
- inpanel-1.2.1.dist-info/licenses/LICENSE +30 -0
- inpanel-1.2.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<table class="table table-hover">
|
|
2
|
+
<tbody>
|
|
3
|
+
<tr>
|
|
4
|
+
<td colspan="3">注意:如果您没有配置文件修改经验,请勿随意修改,否则可能导致服务无法启动。</td>
|
|
5
|
+
</tr>
|
|
6
|
+
<tr ng-repeat="item in items">
|
|
7
|
+
<td style="width:120px;">{{item.name}}</td>
|
|
8
|
+
<td>
|
|
9
|
+
<i class="glyphicon glyphicon-folder-open" ng-show="item.isdir"></i>
|
|
10
|
+
<i class="glyphicon glyphicon-file" ng-show="item.isfile"></i>
|
|
11
|
+
{{item.path}}
|
|
12
|
+
</td>
|
|
13
|
+
<td style="width:100px">
|
|
14
|
+
<a class="btn btn-default btn-xs" href="#/file?path={{item.path}}" ng-show="item.isdir">
|
|
15
|
+
打开 <i class="icon-chevron-right"></i>
|
|
16
|
+
</a>
|
|
17
|
+
<a class="btn btn-default btn-xs" href="#/file?file={{item.path}}" ng-show="item.isfile">
|
|
18
|
+
打开 <i class="icon-chevron-right"></i>
|
|
19
|
+
</a>
|
|
20
|
+
</td>
|
|
21
|
+
</tr>
|
|
22
|
+
</tbody>
|
|
23
|
+
</table>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<div class="well" style="display:none" ng-show="!$scope.installed&&!$scope.checking">
|
|
2
|
+
<div ng-show="!installing">
|
|
3
|
+
<p>系统检测到 {{name}} 当前尚未安装。</p>
|
|
4
|
+
<p>是否要开始安装?</p>
|
|
5
|
+
</div>
|
|
6
|
+
<div ng-show="installing" ng-bind-html-unsafe="installMsg"></div>
|
|
7
|
+
<p ng-show="!installing">
|
|
8
|
+
<button class="btn btn-default" style="margin-top:10px" onclick="history.back()">取消返回</button>
|
|
9
|
+
<button class="btn btn-default" style="margin-top:10px" ng-click="startInstall()">开始安装</button>
|
|
10
|
+
</p>
|
|
11
|
+
<table class="table table-condensed" style="margin-top:20px;display:none" ng-show="showVerList&&pkgs.length>0">
|
|
12
|
+
<thead>
|
|
13
|
+
<tr>
|
|
14
|
+
<th>版本</th>
|
|
15
|
+
<th style="width:70px">大小</th>
|
|
16
|
+
<th style="width:70px">软件源</th>
|
|
17
|
+
<th style="width:80px"></th>
|
|
18
|
+
</tr>
|
|
19
|
+
</thead>
|
|
20
|
+
<tbody>
|
|
21
|
+
<tr ng-repeat="pkg in pkgs">
|
|
22
|
+
<td>{{pkg.name}} v{{pkg.version}}-{{pkg.release}}</td>
|
|
23
|
+
<td>{{pkg.size}}</td>
|
|
24
|
+
<td>{{'已安装'|iftrue:pkg.repo=='installed'}}{{pkg.repo|iftrue:pkg.repo!='installed'}}</td>
|
|
25
|
+
<td>
|
|
26
|
+
<button class="btn btn-default btn-xs" ng-show="pkg.repo=='installed'"
|
|
27
|
+
ng-click="uninstall(pkg.repo, pkg.name, pkg.version, pkg.release)">清除此版本</button>
|
|
28
|
+
<button class="btn btn-default btn-xs" ng-show="pkg.repo!='installed'"
|
|
29
|
+
ng-click="install(pkg.repo, pkg.name, pkg.version, pkg.release)">安装此版本</button>
|
|
30
|
+
</td>
|
|
31
|
+
</tr>
|
|
32
|
+
</tbody>
|
|
33
|
+
</table>
|
|
34
|
+
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<table class="table table-hover">
|
|
2
|
+
<tbody>
|
|
3
|
+
<tr>
|
|
4
|
+
<td colspan="3">注意:尽量不要对日志文件进行修改,否则可能导致新日志无法写入。</td>
|
|
5
|
+
</tr>
|
|
6
|
+
<tr ng-repeat="item in items">
|
|
7
|
+
<td style="width:120px;">{{item.name}}</td>
|
|
8
|
+
<td>
|
|
9
|
+
<i class="glyphicon glyphicon-folder-open" ng-show="item.isdir"></i>
|
|
10
|
+
<i class="glyphicon glyphicon-file" ng-show="item.isfile"></i>
|
|
11
|
+
{{item.path}}
|
|
12
|
+
</td>
|
|
13
|
+
<td style="width:100px">
|
|
14
|
+
<a class="btn btn-default btn-xs" href="#/file?path={{item.path}}" ng-show="item.isdir">
|
|
15
|
+
打开 <i class="icon-chevron-right"></i>
|
|
16
|
+
</a>
|
|
17
|
+
<a class="btn btn-default btn-xs" href="#/file?file={{item.path}}" ng-show="item.isfile">
|
|
18
|
+
打开 <i class="icon-chevron-right"></i>
|
|
19
|
+
</a>
|
|
20
|
+
</td>
|
|
21
|
+
</tr>
|
|
22
|
+
</tbody>
|
|
23
|
+
</table>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<div>
|
|
2
|
+
<div class="btn-group btn-group-xs" ng-show="$scope.info['service.'+service]">
|
|
3
|
+
<button type="button" class="btn btn-default"
|
|
4
|
+
ng-class="'active' | iftrue:$scope.info['service.'+service].autostart" data-toggle="button" title="自动启动"
|
|
5
|
+
ng-disabled="$scope.waiting" ng-click="$scope.toggleAutostart(name, service)">
|
|
6
|
+
<span class="glyphicon glyphicon-check"></span>
|
|
7
|
+
</button>
|
|
8
|
+
<button type="button" class="btn btn-default" ng-show="$scope.info['service.'+service].status=='stopped'"
|
|
9
|
+
title="启动" ng-disabled="$scope.waiting" ng-click="$scope.start(name, service)">
|
|
10
|
+
<span class="glyphicon glyphicon-play"></span>
|
|
11
|
+
</button>
|
|
12
|
+
<button type="button" class="btn btn-default" ng-show="$scope.info['service.'+service].status=='running'"
|
|
13
|
+
title="停止" ng-disabled="$scope.waiting" ng-click="$scope.stop(name, service)">
|
|
14
|
+
<span class="glyphicon glyphicon-stop"></span>
|
|
15
|
+
</button>
|
|
16
|
+
<button type="button" class="btn btn-default"
|
|
17
|
+
ng-disabled="$scope.info['service.'+service].status=='stopped'||$scope.waiting" title="重启"
|
|
18
|
+
ng-click="$scope.restart(name, service)">
|
|
19
|
+
<span class="glyphicon glyphicon-refresh"></span>
|
|
20
|
+
</button>
|
|
21
|
+
<a class="btn btn-default btn-xs" role="button" href="#/service/{{urlname}}"
|
|
22
|
+
ng-show="$scope.info['service.'+service]!=null" title="设置">
|
|
23
|
+
<span class="glyphicon glyphicon-wrench"></span>
|
|
24
|
+
</a>
|
|
25
|
+
</div>
|
|
26
|
+
<a class="btn btn-default btn-xs" role="button" href="#/service/{{urlname}}"
|
|
27
|
+
ng-show="!$scope.info['service.'+service]">安装服务</a>
|
|
28
|
+
</div>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<div class="well" ng-show="$scope.installed&&!$scope.checking">
|
|
2
|
+
<div ng-show="!uninstalling">
|
|
3
|
+
<p>确定要卸载 {{name}} 吗?</p>
|
|
4
|
+
</div>
|
|
5
|
+
<div ng-show="uninstalling" ng-bind-html-unsafe="uninstallMsg"></div>
|
|
6
|
+
<p ng-show="!uninstalling">
|
|
7
|
+
<button class="btn btn-default btn-sm" style="margin-top:10px" ng-click="startUninstall()">开始卸载</button>
|
|
8
|
+
</p>
|
|
9
|
+
<table class="table table-condensed" style="margin-top:20px;display:none" ng-show="showVersion">
|
|
10
|
+
<thead>
|
|
11
|
+
<tr>
|
|
12
|
+
<th colspan="2">请确认要卸载的软件信息:</th>
|
|
13
|
+
</tr>
|
|
14
|
+
</thead>
|
|
15
|
+
<tbody>
|
|
16
|
+
<tr>
|
|
17
|
+
<td style="width:80px">名称:</td>
|
|
18
|
+
<td>{{pkginfo.name}}</td>
|
|
19
|
+
</tr>
|
|
20
|
+
<tr>
|
|
21
|
+
<td>版本:</td>
|
|
22
|
+
<td>{{pkginfo.version}}-{{pkginfo.release}}</td>
|
|
23
|
+
</tr>
|
|
24
|
+
<tr>
|
|
25
|
+
<td>大小:</td>
|
|
26
|
+
<td>{{pkginfo.size}}</td>
|
|
27
|
+
</tr>
|
|
28
|
+
<tr ng-show="pkginfo.from_repo">
|
|
29
|
+
<td>软件源:</td>
|
|
30
|
+
<td>{{pkginfo.from_repo}}</td>
|
|
31
|
+
</tr>
|
|
32
|
+
</tbody>
|
|
33
|
+
</table>
|
|
34
|
+
<p ng-show="showVersion">
|
|
35
|
+
<button class="btn btn-default"
|
|
36
|
+
ng-click="uninstall(pkginfo.repo, pkginfo.name, pkginfo.version, pkginfo.release)">确认并卸载</button>
|
|
37
|
+
</p>
|
|
38
|
+
</div>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<div class="well" style="display:none" ng-show="$scope.installed&&!$scope.checking">
|
|
2
|
+
<div ng-show="!updating">
|
|
3
|
+
<p>在此检测并查找可用的新版本并升级。</p>
|
|
4
|
+
</div>
|
|
5
|
+
<div ng-show="updating" ng-bind-html-unsafe="updateMsg"></div>
|
|
6
|
+
<p ng-show="!updating">
|
|
7
|
+
<button class="btn btn-default btn-sm" style="margin-top:10px" ng-click="startUpdate()">检测新版本</button>
|
|
8
|
+
</p>
|
|
9
|
+
<table class="table table-condensed" style="margin-top:20px;display:none" ng-show="showVerList&&pkgs.length>0">
|
|
10
|
+
<thead>
|
|
11
|
+
<tr>
|
|
12
|
+
<th>版本</th>
|
|
13
|
+
<th style="width:70px">大小</th>
|
|
14
|
+
<th style="width:70px">软件源</th>
|
|
15
|
+
<th style="width:90px">操作</th>
|
|
16
|
+
</tr>
|
|
17
|
+
</thead>
|
|
18
|
+
<tbody>
|
|
19
|
+
<tr ng-repeat="pkg in pkgs">
|
|
20
|
+
<td>{{pkg.name}} v{{pkg.version}}-{{pkg.release}}</td>
|
|
21
|
+
<td>{{pkg.size}}</td>
|
|
22
|
+
<td>{{'已安装'|iftrue:pkg.repo=='installed'}}{{pkg.repo|iftrue:pkg.repo!='installed'}}</td>
|
|
23
|
+
<td>
|
|
24
|
+
<button class="btn btn-default btn-xs" ng-show="pkg.repo!='installed'"
|
|
25
|
+
ng-click="update(pkg.repo, pkg.name, pkg.version, pkg.release)">升级到此版本</button>
|
|
26
|
+
</td>
|
|
27
|
+
</tr>
|
|
28
|
+
</tbody>
|
|
29
|
+
</table>
|
|
30
|
+
</div>
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<div navbar ng-init="currentItem='utils.ecs'"></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
|
+
<div class="widget widget-table" ng-init="load()">
|
|
12
|
+
<div class="widget-header">
|
|
13
|
+
<i class="icon-list-alt"></i>
|
|
14
|
+
<h3>帐号列表</h3>
|
|
15
|
+
<div class="pull-right" style="margin-right:10px">
|
|
16
|
+
<button class="btn btn-small" ng-click="addconfirm()"><i class="icon-plus"></i> 添加新帐号</button>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="widget-content">
|
|
20
|
+
<table class="table table-striped table-hover table-bordered table-condensed">
|
|
21
|
+
<thead>
|
|
22
|
+
<tr>
|
|
23
|
+
<th style="width:20px" class="td-right">#</th>
|
|
24
|
+
<th>帐号备注</th>
|
|
25
|
+
<th>Access Key ID</th>
|
|
26
|
+
<th>Access Key Secret</th>
|
|
27
|
+
<th>云服务器管理</th>
|
|
28
|
+
<th style="width:130px">操作</th>
|
|
29
|
+
</tr>
|
|
30
|
+
</thead>
|
|
31
|
+
<tbody>
|
|
32
|
+
<tr ng-show="accounts.length==0">
|
|
33
|
+
<td colspan="6">尚未添加帐号。</td>
|
|
34
|
+
</tr>
|
|
35
|
+
<tr ng-repeat="account in accounts">
|
|
36
|
+
<td class="td-right">{{$index+1}}</td>
|
|
37
|
+
<td>{{account.name}}</td>
|
|
38
|
+
<td>{{account.access_key_id}}</td>
|
|
39
|
+
<td>
|
|
40
|
+
<span ng-bind-html-unsafe="account.access_key_secret|account.secret" ng-show="!account.showsecret"></span>
|
|
41
|
+
<a ng-click="account.showsecret=true" ng-show="!account.showsecret">显示</a>
|
|
42
|
+
<span ng-show="account.showsecret">{{account.access_key_secret}}</span>
|
|
43
|
+
<a ng-click="account.showsecret=false" ng-show="account.showsecret">隐藏</a>
|
|
44
|
+
</td>
|
|
45
|
+
<td ng-bind-html-unsafe="account.status | account.status"></td>
|
|
46
|
+
<td>
|
|
47
|
+
<button class="btn btn-small" ng-click="editconfirm(account)">
|
|
48
|
+
<i class="icon-edit"></i> 修改
|
|
49
|
+
</button>
|
|
50
|
+
<button class="btn btn-small" ng-click="removeconfirm(account)">
|
|
51
|
+
<i class="icon-remove"></i> 删除
|
|
52
|
+
</button>
|
|
53
|
+
</td>
|
|
54
|
+
</tr>
|
|
55
|
+
</tbody>
|
|
56
|
+
</table>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<div id="addconfirm" class="modal hide fade">
|
|
62
|
+
<div class="modal-header">
|
|
63
|
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
64
|
+
<h3 class="modal-title">添加新帐号</h3>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="modal-body">
|
|
67
|
+
<div class="alert alert-info">
|
|
68
|
+
帐号请在阿里云用户中心中获取(“我的帐户”-“安全认证”)
|
|
69
|
+
</div>
|
|
70
|
+
<div class="form-horizontal" onsubmit="return false">
|
|
71
|
+
<div class="control-group">
|
|
72
|
+
<label class="control-label">帐号备注:</label>
|
|
73
|
+
<div class="controls">
|
|
74
|
+
<input type="text" class="input" ng-model="newaccount.name">
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="control-group">
|
|
78
|
+
<label class="control-label">Access Key ID:</label>
|
|
79
|
+
<div class="controls">
|
|
80
|
+
<input type="text" class="input" ng-model="newaccount.access_key_id">
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="control-group">
|
|
84
|
+
<label class="control-label">Access Key Secret:</label>
|
|
85
|
+
<div class="controls">
|
|
86
|
+
<input type="text" class="input" ng-model="newaccount.access_key_secret">
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
<div class="control-group">
|
|
90
|
+
<div class="controls">
|
|
91
|
+
<label class="checkbox">
|
|
92
|
+
<input type="checkbox" ng-model="newaccount.status"> 启用对该帐号下云服务器的管理
|
|
93
|
+
</label>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
<div class="modal-footer">
|
|
99
|
+
<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
|
|
100
|
+
<button class="btn btn-primary" onclick="$('#addconfirm').modal('hide')" ng-click="add()">添加帐号</button>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<div id="editconfirm" class="modal hide fade">
|
|
105
|
+
<div class="modal-header">
|
|
106
|
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
107
|
+
<h3 class="modal-title">更新帐号设置</h3>
|
|
108
|
+
</div>
|
|
109
|
+
<div class="modal-body">
|
|
110
|
+
<div class="form-horizontal" onsubmit="return false">
|
|
111
|
+
<div class="control-group">
|
|
112
|
+
<label class="control-label">帐号备注:</label>
|
|
113
|
+
<div class="controls">
|
|
114
|
+
<input type="text" class="input" ng-model="curaccount.name">
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
<div class="control-group">
|
|
118
|
+
<label class="control-label">Access Key ID:</label>
|
|
119
|
+
<div class="controls">
|
|
120
|
+
<input type="text" class="input" ng-model="curaccount.access_key_id">
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
<div class="control-group">
|
|
124
|
+
<label class="control-label">Access Key Secret:</label>
|
|
125
|
+
<div class="controls">
|
|
126
|
+
<input type="text" class="input" ng-model="curaccount.access_key_secret">
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
<div class="control-group">
|
|
130
|
+
<div class="controls">
|
|
131
|
+
<label class="checkbox">
|
|
132
|
+
<input type="checkbox" ng-model="curaccount.status"> 启用对该帐号下云服务器的管理
|
|
133
|
+
</label>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
<div class="modal-footer">
|
|
139
|
+
<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
|
|
140
|
+
<button class="btn btn-primary" onclick="$('#editconfirm').modal('hide')" ng-click="update()">保存设置</button>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<div id="removeconfirm" class="modal hide fade">
|
|
145
|
+
<div class="modal-header">
|
|
146
|
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
147
|
+
<h3 class="modal-title">删除确认</h3>
|
|
148
|
+
</div>
|
|
149
|
+
<div class="modal-body">
|
|
150
|
+
<p>是否确认删除 “{{curaccount.name}}” 这个帐号?</p>
|
|
151
|
+
</div>
|
|
152
|
+
<div class="modal-footer">
|
|
153
|
+
<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
|
|
154
|
+
<button class="btn btn-primary" onclick="$('#removeconfirm').modal('hide')" ng-click="remove()">确认删除</button>
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
<div navbar ng-init="currentItem='utils.ecs'"></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>云服务器(ECS)管理</h3>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="widget widget-table" ng-init="load()">
|
|
12
|
+
<div class="widget-header">
|
|
13
|
+
<i class="icon-list-alt"></i>
|
|
14
|
+
<h3>云服务器列表</h3>
|
|
15
|
+
<div class="pull-right" style="margin-right:10px;margin-top:5px;margin-bottom:-10px">
|
|
16
|
+
<div class="input-append">
|
|
17
|
+
<select style="width:180px" ng-options="account.access_key_id as account.name for account in accounts"
|
|
18
|
+
ng-model="$ecs.access_key_id"></select>
|
|
19
|
+
<button class="btn" ng-click="chaccount()">切换帐号</button>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="widget-content">
|
|
24
|
+
<div style="padding:20px;display:none" ng-show="instloading">
|
|
25
|
+
<div waiting ng-init="waitingText='正在加载云服务器列表,请稍候...'"></div>
|
|
26
|
+
</div>
|
|
27
|
+
<table class="table table-striped table-hover table-bordered table-condensed" ng-show="!instloading" style="display:none;">
|
|
28
|
+
<thead>
|
|
29
|
+
<tr>
|
|
30
|
+
<th style="width:20px" class="td-right">#</th>
|
|
31
|
+
<th>服务器编号</th>
|
|
32
|
+
<th>IP</th>
|
|
33
|
+
<th>系统安装镜像</th>
|
|
34
|
+
<th style="width:70px">状态</th>
|
|
35
|
+
<th style="width:80px">InPanel</th>
|
|
36
|
+
<th style="width:180px">操作</th>
|
|
37
|
+
</tr>
|
|
38
|
+
</thead>
|
|
39
|
+
<tbody>
|
|
40
|
+
<tr ng-show="instances.length==0">
|
|
41
|
+
<td colspan="7" style="font-size:14px">
|
|
42
|
+
<span ng-show="!errmsg">未检测到云服务器。</span>
|
|
43
|
+
<span ng-show="errmsg">{{errmsg}}</span>
|
|
44
|
+
</td>
|
|
45
|
+
</tr>
|
|
46
|
+
<tr ng-repeat="instance in instances">
|
|
47
|
+
<td class="td-right">{{$ecs.page_size*($ecs.page_number-1)+$index+1}}</td>
|
|
48
|
+
<td>
|
|
49
|
+
{{instance.InstanceName}}<br>
|
|
50
|
+
<span style="color:gray">配置:{{instance.CPUs}}核处理器 {{instance.Memory*1024*1024|bytes2human}}
|
|
51
|
+
{{instance.MaxBandwidthOut/1000/1024}}Mbps 容量{{instance.DiskSize}}GB</span>
|
|
52
|
+
</td>
|
|
53
|
+
<td>
|
|
54
|
+
公网:{{instance.PublicIpAddress.AllocateIpAddress}}<br>
|
|
55
|
+
内网:{{instance.InnerIpAddress}}
|
|
56
|
+
</td>
|
|
57
|
+
<td>{{instance.Image.ImageCode}}</td>
|
|
58
|
+
<td ng-bind-html-unsafe="instance.Status | instance.status"></td>
|
|
59
|
+
<td ng-bind-html-unsafe="instance.InPanelStatus | instance.inpanelstatus"></td>
|
|
60
|
+
<td>
|
|
61
|
+
<a class="btn btn-small" href="#/ecs/{{instance.InstanceName|urlencode}},{{$ecs.access_key_id|urlencode}}">
|
|
62
|
+
<i class="icon-wrench"></i> 管理
|
|
63
|
+
</a>
|
|
64
|
+
<a ng-show="instance.InPanelStatus&&instance.InPanelStatus.accessnet=='public'" class="btn btn-small"
|
|
65
|
+
href="/{{instance.InstanceName|urlencode}}/{{instance.PublicIpAddress.AllocateIpAddress|urlencode}}/8888/#/"
|
|
66
|
+
target="_blank">
|
|
67
|
+
<i class="icon-home"></i> 打开 InPanel
|
|
68
|
+
</a>
|
|
69
|
+
<a ng-show="instance.InPanelStatus&&instance.InPanelStatus.accessnet=='inner'" class="btn btn-small"
|
|
70
|
+
href="/{{instance.InstanceName|urlencode}}/{{instance.InnerIpAddress|urlencode}}/8888/#/"
|
|
71
|
+
target="_blank">
|
|
72
|
+
<i class="icon-home"></i> 打开 InPanel
|
|
73
|
+
</a>
|
|
74
|
+
<a ng-show="!instance.InPanelStatus" class="btn btn-small" href="#/ecs/{{instance.InstanceName|urlencode}},{{$ecs.access_key_id|urlencode}}?s=inpanel">
|
|
75
|
+
<i class="icon-plus-sign"></i> 安装 InPanel
|
|
76
|
+
</a>
|
|
77
|
+
</td>
|
|
78
|
+
</tr>
|
|
79
|
+
</tbody>
|
|
80
|
+
</table>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div style="height:30px" ng-show="!instloading&&!errmsg">
|
|
85
|
+
<div class="pull-right">
|
|
86
|
+
<div class="input-prepend" style="display:inline">
|
|
87
|
+
<span class="add-on">第{{$ecs.page_number}}页</span>
|
|
88
|
+
<select style="width:100px" ng-model="$ecs.page_size" ng-change="$ecs.page_number=1;loadinstances()">
|
|
89
|
+
<option value="1">1条/页</option>
|
|
90
|
+
<option value="5">5条/页</option>
|
|
91
|
+
<option value="10">10条/页</option>
|
|
92
|
+
<option value="20">20条/页</option>
|
|
93
|
+
<option value="30">30条/页</option>
|
|
94
|
+
<option value="40">40条/页</option>
|
|
95
|
+
<option value="50">50条/页</option>
|
|
96
|
+
</select>
|
|
97
|
+
</div>
|
|
98
|
+
<div class="btn-group" style="margin-left:20px;display:inline">
|
|
99
|
+
<button class="btn" ng-disabled="$ecs.page_number<=1" ng-click="loadinstances(-1)">上一页</button>
|
|
100
|
+
<button class="btn" ng-click="loadinstances(1)">下一页</button>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<div id="addconfirm" class="modal hide fade">
|
|
107
|
+
<div class="modal-header">
|
|
108
|
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
109
|
+
<h3 class="modal-title">添加新帐号</h3>
|
|
110
|
+
</div>
|
|
111
|
+
<div class="modal-body">
|
|
112
|
+
<div class="form-horizontal" onsubmit="return false">
|
|
113
|
+
<div class="control-group">
|
|
114
|
+
<label class="control-label">帐号备注:</label>
|
|
115
|
+
<div class="controls">
|
|
116
|
+
<input type="text" class="input" ng-model="newaccount.name">
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
<div class="control-group">
|
|
120
|
+
<label class="control-label">Access Key ID:</label>
|
|
121
|
+
<div class="controls">
|
|
122
|
+
<input type="text" class="input" ng-model="newaccount.access_key_id">
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
<div class="control-group">
|
|
126
|
+
<label class="control-label">Access Key Secret:</label>
|
|
127
|
+
<div class="controls">
|
|
128
|
+
<input type="text" class="input" ng-model="newaccount.access_key_secret">
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
<div class="control-group">
|
|
132
|
+
<div class="controls">
|
|
133
|
+
<label class="checkbox">
|
|
134
|
+
<input type="checkbox" ng-model="newaccount.status"> 启用对该帐号下云服务器的管理
|
|
135
|
+
</label>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
<div class="modal-footer">
|
|
141
|
+
<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
|
|
142
|
+
<button class="btn btn-primary" onclick="$('#addconfirm').modal('hide')" ng-click="add()">添加帐号</button>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
<div id="editconfirm" class="modal hide fade">
|
|
147
|
+
<div class="modal-header">
|
|
148
|
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
149
|
+
<h3 class="modal-title">更新帐号设置</h3>
|
|
150
|
+
</div>
|
|
151
|
+
<div class="modal-body">
|
|
152
|
+
<div class="form-horizontal" onsubmit="return false">
|
|
153
|
+
<div class="control-group">
|
|
154
|
+
<label class="control-label">帐号备注:</label>
|
|
155
|
+
<div class="controls">
|
|
156
|
+
<input type="text" class="input" ng-model="curaccount.name">
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
<div class="control-group">
|
|
160
|
+
<label class="control-label">Access Key ID:</label>
|
|
161
|
+
<div class="controls">
|
|
162
|
+
<input type="text" class="input" ng-model="curaccount.access_key_id">
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
<div class="control-group">
|
|
166
|
+
<label class="control-label">Access Key Secret:</label>
|
|
167
|
+
<div class="controls">
|
|
168
|
+
<input type="text" class="input" ng-model="curaccount.access_key_secret">
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
<div class="control-group">
|
|
172
|
+
<div class="controls">
|
|
173
|
+
<label class="checkbox">
|
|
174
|
+
<input type="checkbox" ng-model="curaccount.status"> 启用对该帐号下云服务器的管理
|
|
175
|
+
</label>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
<div class="modal-footer">
|
|
181
|
+
<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
|
|
182
|
+
<button class="btn btn-primary" onclick="$('#editconfirm').modal('hide')" ng-click="update()">保存设置</button>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
<div id="removeconfirm" class="modal hide fade">
|
|
187
|
+
<div class="modal-header">
|
|
188
|
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
189
|
+
<h3 class="modal-title">删除确认</h3>
|
|
190
|
+
</div>
|
|
191
|
+
<div class="modal-body">
|
|
192
|
+
<p>是否确认删除 “{{curaccount.name}}” 这个帐号?</p>
|
|
193
|
+
</div>
|
|
194
|
+
<div class="modal-footer">
|
|
195
|
+
<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
|
|
196
|
+
<button class="btn btn-primary" onclick="$('#removeconfirm').modal('hide')" ng-click="remove()">确认删除</button>
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<div navbar ng-init="currentItem='utils.ecs'"></div>
|
|
2
|
+
<div ng-show="Auth.processing||!loaded">
|
|
3
|
+
<div loading></div>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
<div id="main" ng-show="!Auth.processing&&loaded" style="display:none">
|
|
7
|
+
<div class="module-header">
|
|
8
|
+
<h3>云服务器(ECS)管理</h3>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="widget widget-table" style="width:600px" ng-init="load()">
|
|
12
|
+
<div class="widget-header">
|
|
13
|
+
<i class="icon-list-alt"></i>
|
|
14
|
+
<h3>基本功能</h3>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="widget-content">
|
|
17
|
+
<table class="table table-striped table-hover table-bordered table-condensed">
|
|
18
|
+
<thead>
|
|
19
|
+
<tr>
|
|
20
|
+
<th style="width:120px">功能</th>
|
|
21
|
+
<th>功能描述</th>
|
|
22
|
+
<th style="width:80px">操作</th>
|
|
23
|
+
</tr>
|
|
24
|
+
</thead>
|
|
25
|
+
<tbody>
|
|
26
|
+
<tr>
|
|
27
|
+
<td>帐号管理</td>
|
|
28
|
+
<td class="muted">在此添加和管理阿里云帐号密钥</td>
|
|
29
|
+
<td><a href="#/account" class="btn btn-small">进入管理</a></td>
|
|
30
|
+
</tr>
|
|
31
|
+
<tr>
|
|
32
|
+
<td>云服务器管理</td>
|
|
33
|
+
<td class="muted">对帐户下的所有云服务器进行管理</td>
|
|
34
|
+
<td><a href="#/ecs" class="btn btn-small">进入管理</a></td>
|
|
35
|
+
</tr>
|
|
36
|
+
</tbody>
|
|
37
|
+
</table>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|