diff --git a/internal/web/actions/default/clusters/cluster/node/detail.go b/internal/web/actions/default/clusters/cluster/node/detail.go index bcef8d30..824515e4 100644 --- a/internal/web/actions/default/clusters/cluster/node/detail.go +++ b/internal/web/actions/default/clusters/cluster/node/detail.go @@ -187,6 +187,8 @@ func (this *DetailAction) RunGet(params struct { "route": route.Name, "value": addr.Ip, "clusterName": cluster.Name, + "isBackup": dnsInfo.IsBackupForCluster || dnsInfo.IsBackupForGroup, + "isOffline": dnsInfo.IsOffline, }) } } @@ -343,25 +345,29 @@ func (this *DetailAction) RunGet(params struct { } this.Data["node"] = maps.Map{ - "id": node.Id, - "name": node.Name, - "ipAddresses": ipAddressMaps, - "cluster": clusterMap, - "secondaryClusters": secondaryClustersMaps, - "login": loginMap, - "installDir": node.InstallDir, - "isInstalled": node.IsInstalled, - "uniqueId": node.UniqueId, - "secret": node.Secret, - "maxCPU": node.MaxCPU, - "isOn": node.IsOn, - "records": recordMaps, - "routes": routeMaps, - "level": node.Level, - "levelInfo": nodeconfigs.FindNodeLevel(int(node.Level)), - "lnAddrs": lnAddrs, - "enableIPLists": node.EnableIPLists, - "apiNodeAddrs": apiNodeAddrStrings, + "id": node.Id, + "name": node.Name, + "ipAddresses": ipAddressMaps, + "cluster": clusterMap, + "secondaryClusters": secondaryClustersMaps, + "login": loginMap, + "installDir": node.InstallDir, + "isInstalled": node.IsInstalled, + "uniqueId": node.UniqueId, + "secret": node.Secret, + "maxCPU": node.MaxCPU, + "isOn": node.IsOn, + "records": recordMaps, + "routes": routeMaps, + "level": node.Level, + "levelInfo": nodeconfigs.FindNodeLevel(int(node.Level)), + "lnAddrs": lnAddrs, + "enableIPLists": node.EnableIPLists, + "apiNodeAddrs": apiNodeAddrStrings, + "offlineDay": node.OfflineDay, + "isOffline": len(node.OfflineDay) > 0 && node.OfflineDay < timeutil.Format("Ymd"), + "isBackupForCluster": node.IsBackupForCluster, + "isBackupForGroup": node.IsBackupForGroup, "status": maps.Map{ "isActive": status.IsActive, diff --git a/internal/web/actions/default/dns/clusters/cluster.go b/internal/web/actions/default/dns/clusters/cluster.go index 300ca285..2ff155a9 100644 --- a/internal/web/actions/default/dns/clusters/cluster.go +++ b/internal/web/actions/default/dns/clusters/cluster.go @@ -136,6 +136,8 @@ func (this *ClusterAction) RunGet(params struct { "clusterId": node.NodeClusterId, "isResolved": isResolved, "isInstalled": isInstalled, + "isBackup": node.IsBackupForCluster || node.IsBackupForGroup, + "isOffline": node.IsOffline, }) } } else { @@ -171,6 +173,8 @@ func (this *ClusterAction) RunGet(params struct { "clusterId": node.NodeClusterId, "isResolved": isResolved, "isInstalled": isInstalled, + "isBackup": node.IsBackupForCluster || node.IsBackupForGroup, + "isOffline": node.IsOffline, }) } } diff --git a/web/public/js/components/common/time-duration-box.js b/web/public/js/components/common/time-duration-box.js index 4d8943fc..19891a6f 100644 --- a/web/public/js/components/common/time-duration-box.js +++ b/web/public/js/components/common/time-duration-box.js @@ -1,5 +1,5 @@ Vue.component("time-duration-box", { - props: ["v-name", "v-value", "v-count", "v-unit"], + props: ["name", "v-name", "v-value", "v-count", "v-unit"], mounted: function () { this.change() }, @@ -14,9 +14,18 @@ Vue.component("time-duration-box", { if (typeof (v["count"]) != "number") { v["count"] = -1 } + + let realName = "" + if (typeof this.name == "string" && this.name.length > 0) { + realName = this.name + } else if (typeof this.vName == "string" && this.vName.length > 0) { + realName = this.vName + } + return { duration: v, - countString: (v.count >= 0) ? v.count.toString() : "" + countString: (v.count >= 0) ? v.count.toString() : "", + realName: realName } }, watch: { @@ -39,7 +48,7 @@ Vue.component("time-duration-box", { } }, template: `
- +
diff --git a/web/public/js/components/messages/message-row.js b/web/public/js/components/messages/message-row.js index 6e6434dd..5adeac16 100644 --- a/web/public/js/components/messages/message-row.js +++ b/web/public/js/components/messages/message-row.js @@ -95,6 +95,16 @@ Vue.component("message-row", {
去审核
+ + +
+ 查看调度状态 » +
+ + +
+ 查看详情 » +
diff --git a/web/views/@default/clusters/cluster/node/detail.html b/web/views/@default/clusters/cluster/node/detail.html index 538e0282..eeb12807 100644 --- a/web/views/@default/clusters/cluster/node/detail.html +++ b/web/views/@default/clusters/cluster/node/detail.html @@ -16,6 +16,21 @@ + + + 备用节点 + + 集群备用节点 + 分组备用节点 +   [修改] + + + + 租期结束日期 + + {{node.offlineDay.substring(0, 4)}}-{{node.offlineDay.substring(4, 6)}}-{{node.offlineDay.substring(6, 8)}}   [修改] +

已到期

+ IP地址 @@ -60,6 +75,7 @@ 记录类型 线路 记录值 + 状态 @@ -72,6 +88,11 @@ 默认 {{record.value}} + + 备用节点 + 已下线 + 正常 +

通过设置A记录可以将集群上的服务请求转发到不同线路的节点上。

diff --git a/web/views/@default/dns/clusters/cluster.html b/web/views/@default/dns/clusters/cluster.html index 8a7e1001..b43bd91a 100644 --- a/web/views/@default/dns/clusters/cluster.html +++ b/web/views/@default/dns/clusters/cluster.html @@ -67,7 +67,7 @@ - {{task.cluster.name}} + {{task.cluster.name}} {{task.node.name}} @@ -75,7 +75,7 @@ {{task.domain.name}} - 集群 + 集群 节点 服务 域名 @@ -164,11 +164,15 @@ 没有设置 - - 已解析 - 未解析 - - 未安装 + 备用节点 + 已下线 +
+ + 已解析 + 未解析 + + 未安装 +
修改 diff --git a/web/views/@default/dns/tasks/listPopup.html b/web/views/@default/dns/tasks/listPopup.html index 0b81727d..febfecec 100644 --- a/web/views/@default/dns/tasks/listPopup.html +++ b/web/views/@default/dns/tasks/listPopup.html @@ -15,7 +15,7 @@ - {{task.cluster.name}} + {{task.cluster.name}} {{task.node.name}} @@ -23,7 +23,7 @@ {{task.domain.name}} - 集群 + 集群 节点 服务 域名