MCSManager/public/template/server.html
2018-07-18 15:49:18 +08:00

102 lines
3.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div id='ServerList' class="OneContainer">
<div class="row">
<div class="col-md-12 ">
<div class="Panel PanelBlue">
<div class="PanelTitle">服务器列表</div>
<div class="PanelBody">
<div class="row">
<div class="col-sm-12 PanelItemF">
<div class="PanelItem" v-on:click="newServerx()">
<span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span> 引导创建服务器
</div>
<div class="PanelItem" v-on:click="newServer()">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> 直接创建新的服务器
</div>
<div class="PanelItem" v-on:click="opt_all('start')">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> 启动所有服务端
</div>
<div class="PanelItem" v-on:click="opt_all('stop')">
<span class="glyphicon glyphicon-remove-sign" aria-hidden="true"></span> 关闭所有服务端
</div>
</div>
</div>
<div class=" ItemTableList"></div>
<div class="PanelItem ItemTableList" v-for="item of items">
<div class="row">
<div class="col-md-7">
<div class="PanelItemInfo">
<h4 v-if="item.data.jarName == '' && !item.data.highCommande ">
<span class="color-high-red">[未配置] </span>
<s v-text="item.serverName"></s>
</h4>
<h4 v-if="item.data.highCommande">
<span class="color-red">[自定义]</span>
<span v-text="item.serverName"></span>
</h4>
<h4 v-if="item.data.jarName != '' && !item.data.highCommande">
<span class="color-green">[普通端]</span>
<span v-text="item.serverName"></span>
</h4>
状态:
<span v-if="item.data.run" class="color-green"> 正在运行 </span>
<span v-else="item.data.run" class="color-red"> 关闭 </span> | 创建时间
<span v-text="item.data.createDate"> </span> | 最后启动:
<span v-text="item.data.lastDate"> </span> | 端:
<span v-text="item.data.jarName"> </span>
</div>
</div>
<div class="col-md-5 NextCol">
<div class="PanelItemMuem">
<button class="btn btn-info" v-on:click="onRedirect('./template/component/server.html','server/get',item.serverName)">
基本参数
</button>
<button class="btn btn-success" v-on:click="onRedirect('./template/component/console.html', 'server/console', item.serverName );">
控制台
</button>
<span style="margin-left: 8px;"> | </span>
<button class="btn btn-danger" v-on:click="toDeleteServer(item.serverName)">删除</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
MI.rListener('onload', function () {
VIEW_MODEL.newVue('ServerList', {
el: '#ServerList',
methods: {
onRedirect: function (link, api, serverName) {
RES.redirectPage(link, api, serverName);
},
newServer: function () {
RES.redirectPage('./template/component/newserver.html', null, '');
},
newServerx: function () {
RES.redirectPage('./template/component/newserverx.html', null, '');
},
opt_all: function (command) {
if (confirm("您真的要执行这个影响所有服务器的操作吗?")) {
WS.sendMsg('server/opt_all', command);
setTimeout(function () {
PAGE.refresh();
}, 2000);
}
},
toDeleteServer: function (serverName) {
var result = confirm('是否删除 [' + serverName + '] 这个服务端?\n注意: 删除服务器并不会删除服务端文件,只会从控制面板删除!');
if (!result) return;
WS.sendMsg('server/delete', serverName);
RES.redirectPage('./template/server.html', 'server/view');
}
}
});
});
MI.rListener('onend', function () {});
</script>