实现基础的智能调度

This commit is contained in:
GoEdgeLab
2023-05-17 18:41:27 +08:00
parent 19653b115c
commit 340ee6726c
7 changed files with 85 additions and 31 deletions

View File

@@ -67,7 +67,7 @@
</thead>
<tr v-for="task in tasks">
<td>
<span v-if="task.type == 'clusterChange'">{{task.cluster.name}}
<span v-if="(task.type == 'clusterChange' || task.type == 'clusterNodesChange') && task.cluster != null">{{task.cluster.name}}
<link-icon :href="'/dns/clusters/cluster?clusterId=' + task.cluster.id" target="_top"></link-icon>
</span>
<span v-if="task.type == 'nodeChange'">{{task.node.name}}</span>
@@ -75,7 +75,7 @@
<span v-if="task.type == 'domainChange'">{{task.domain.name}}</span>
</td>
<td>
<span v-if="task.type == 'clusterChange'">集群</span>
<span v-if="task.type == 'clusterChange' || task.type == 'clusterNodesChange'">集群</span>
<span v-if="task.type == 'nodeChange'">节点</span>
<span v-if="task.type == 'serverChange'">服务</span>
<span v-if="task.type == 'domainChange'">域名</span>
@@ -164,11 +164,15 @@
<link-red v-else title="点击设置" @click.prevent="updateNode(node.clusterId, node.id, node.ipAddrId)">没有设置</link-red>
</td>
<td>
<span v-if="node.isInstalled">
<span class="green" v-if="node.isResolved">解析</span>
<span v-else class="red">未解析</span>
</span>
<link-red :href="'/clusters/cluster/node/install?clusterId=' + cluster.id + '&nodeId=' + node.id" v-if="!node.isInstalled" title="节点未安装"><span class="red">未安装</span></link-red>
<span v-if="node.isBackup" class="red">备用节点</span>
<span v-else-if="node.isOffline" class="red">下线</span>
<div v-else="">
<span v-if="node.isInstalled">
<span class="green" v-if="node.isResolved">已解析</span>
<span v-else class="red">未解析</span>
</span>
<link-red :href="'/clusters/cluster/node/install?clusterId=' + cluster.id + '&nodeId=' + node.id" v-if="!node.isInstalled" title="节点未安装"><span class="red">未安装</span></link-red>
</div>
</td>
<td>
<link-popup @click.prevent="updateNode(node.clusterId, node.id, node.ipAddrId)">修改</link-popup>

View File

@@ -15,7 +15,7 @@
</thead>
<tr v-for="task in tasks">
<td nowrap="">
<span v-if="(task.type == 'clusterChange' || task.type == 'clusterRemoveDomain') && task.cluster != null">{{task.cluster.name}}
<span v-if="(task.type == 'clusterChange' || task.type == 'clusterNodesChange' || task.type == 'clusterRemoveDomain') && task.cluster != null">{{task.cluster.name}}
<link-icon :href="'/dns/clusters/cluster?clusterId=' + task.cluster.id" target="_top"></link-icon>
</span>
<span v-if="task.type == 'nodeChange'">{{task.node.name}}</span>
@@ -23,7 +23,7 @@
<span v-if="task.type == 'domainChange'">{{task.domain.name}}</span>
</td>
<td nowrap="">
<span v-if="task.type == 'clusterChange' || task.type == 'clusterRemoveDomain'">集群</span>
<span v-if="task.type == 'clusterChange' || task.type == 'clusterNodesChange' || task.type == 'clusterRemoveDomain'">集群</span>
<span v-if="task.type == 'nodeChange'">节点</span>
<span v-if="task.type == 'serverChange'">服务</span>
<span v-if="task.type == 'domainChange'">域名</span>