mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 12:20:28 +08:00
优化界面
This commit is contained in:
@@ -28,7 +28,7 @@ Vue.component("message-row", {
|
||||
{{message.body}}
|
||||
|
||||
<div v-if="message.type == 'HealthCheckFail'" style="margin-top: 0.8em">
|
||||
<a :href="'/clusters/cluster/node?clusterId=' + message.cluster.id + '&nodeId=' + param.node.id" v-for="param in params" class="ui label tiny">{{param.node.name}}</a>
|
||||
<a :href="'/clusters/cluster/node?clusterId=' + message.cluster.id + '&nodeId=' + param.node.id" v-for="param in params" class="ui label tiny" style="margin-bottom: 0.5em">{{param.node.name}}: {{param.error}}</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -210,12 +210,11 @@ window.teaweb = {
|
||||
});
|
||||
},
|
||||
confirm: function (message, callback) {
|
||||
var width = "20em";
|
||||
let width = "20em";
|
||||
if (message.length > 30) {
|
||||
width = "30em";
|
||||
}
|
||||
Swal.fire({
|
||||
text: message,
|
||||
let config = {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
showCancelButton: true,
|
||||
@@ -233,7 +232,13 @@ window.teaweb = {
|
||||
callback.call(Tea.Vue);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (message.startsWith("html:")) {
|
||||
config.html = message.substring(5)
|
||||
} else {
|
||||
config.text = message
|
||||
}
|
||||
Swal.fire(config);
|
||||
},
|
||||
reload: function () {
|
||||
window.location.reload()
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</a>
|
||||
|
||||
<div class="right menu">
|
||||
<a href="" class="item" v-if="globalChangedClusters.length > 0" @click.prevent="syncClustersConfigs()"><i class="icon refresh"></i>{{globalChangedClusters.length}}个集群服务已变更,点此同步</a>
|
||||
<a href="" class="item" v-if="globalChangedClusters.length > 0" @click.prevent="syncClustersConfigs()"><span class="blink"><i class="icon refresh"></i></span>{{globalChangedClusters.length}}个集群服务变更</a>
|
||||
<a href="/messages" class="item" :class="{active:teaMenu == 'message'}"><span :class="{'blink':globalMessageBadge > 0}"><i class="icon bell"></i>消息({{globalMessageBadge}}) </span></a>
|
||||
<a href="/settings/profile" class="item" :class="{active: teaMenu == 'settings'}">
|
||||
<i class="icon user" v-if="teaUserAvatar.length == 0"></i>
|
||||
|
||||
@@ -88,7 +88,7 @@ Tea.context(function () {
|
||||
* 同步集群配置
|
||||
*/
|
||||
this.syncClustersConfigs = function () {
|
||||
teaweb.confirm("确定要同步集群服务配置吗?", function () {
|
||||
teaweb.confirm("html:有若干个集群配置已变更!<br/>确定要同步配置到边缘节点吗?", function () {
|
||||
this.$post("/clusters/sync")
|
||||
.success(function () {
|
||||
this.globalChangedClusters = [];
|
||||
|
||||
Reference in New Issue
Block a user