diff --git a/dbm-ui/frontend/src/views/db-manage/elastic-search/list/components/detail/components/node-list/Index.vue b/dbm-ui/frontend/src/views/db-manage/elastic-search/list/components/detail/components/node-list/Index.vue index 4ab3184d68..8b9f460d37 100644 --- a/dbm-ui/frontend/src/views/db-manage/elastic-search/list/components/detail/components/node-list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/elastic-search/list/components/detail/components/node-list/Index.vue @@ -235,7 +235,7 @@ let clientNodeNum = 0; let hotNodeNum = 0; let coldNodeNum = 0; - tableData.value.forEach((nodeItem) => { + totalTableData.forEach((nodeItem) => { if (nodeItem.isClient) { clientNodeNum = clientNodeNum + 1; } else if (nodeItem.isHot) { @@ -286,6 +286,8 @@ } }); + let totalTableData: EsNodeModel[] = []; + const isAnomalies = ref(false); const isShowReplace = ref(false); const isShowExpandsion = ref(false); @@ -341,7 +343,7 @@ let hotNodeNum = 0; let coldNodeNumTotal = 0; let coldNodeNum = 0; - tableData.value.forEach((nodeItem) => { + totalTableData.forEach((nodeItem) => { if (nodeItem.isHot) { hotNodeNumTotal = hotNodeNumTotal + 1; } else if (nodeItem.isCold) { @@ -566,6 +568,9 @@ }).then((data) => { tableData.value = data.results; isAnomalies.value = false; + if (searchValue.value.length === 0) { + totalTableData = _.cloneDeep(tableData.value); + } }) .catch(() => { tableData.value = []; diff --git a/dbm-ui/frontend/src/views/db-manage/hdfs/list/components/detail/components/node-list/Index.vue b/dbm-ui/frontend/src/views/db-manage/hdfs/list/components/detail/components/node-list/Index.vue index c5eb6ed648..21dfe82b6b 100644 --- a/dbm-ui/frontend/src/views/db-manage/hdfs/list/components/detail/components/node-list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/hdfs/list/components/detail/components/node-list/Index.vue @@ -227,7 +227,7 @@ } else { // 其它类型的节点数不能全部被缩容,至少保留一个 let dataNodeNum = 0; - tableData.value.forEach((nodeItem) => { + totalTableData.forEach((nodeItem) => { if (nodeItem.isDataNode) { dataNodeNum = dataNodeNum + 1; } @@ -283,6 +283,8 @@ } }); + let totalTableData: HdfsNodeModel[] = []; + const isLoading = ref(false); const isAnomalies = ref(false); const isShowReplace = ref(false); @@ -325,7 +327,7 @@ // 其它类型的节点数不能全部被缩容,至少保留一个 let dataNodeNum = 0; - tableData.value.forEach((nodeItem) => { + totalTableData.forEach((nodeItem) => { if (checkedNodeMap.value[nodeItem.bk_host_id]) { return; } @@ -575,6 +577,9 @@ }).then((data) => { tableData.value = data.results; isAnomalies.value = false; + if (searchValue.value.length === 0) { + totalTableData = _.cloneDeep(tableData.value); + } }) .catch(() => { tableData.value = []; diff --git a/dbm-ui/frontend/src/views/db-manage/kafka/list/components/detail/components/node-list/Index.vue b/dbm-ui/frontend/src/views/db-manage/kafka/list/components/detail/components/node-list/Index.vue index 1d5300db6a..9fcc20b443 100644 --- a/dbm-ui/frontend/src/views/db-manage/kafka/list/components/detail/components/node-list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/kafka/list/components/detail/components/node-list/Index.vue @@ -234,7 +234,7 @@ } else { // 其它类型的节点数不能全部被缩容,至少保留一个 let brokerNum = 0; - tableData.value.forEach((nodeItem) => { + totalTableData.forEach((nodeItem) => { if (nodeItem.isBroker) { brokerNum = brokerNum + 1; } @@ -273,6 +273,8 @@ } }); + let totalTableData: KafkaNodeModel[] = []; + const isAnomalies = ref(false); const isShowReplace = ref(false); const isShowExpandsion = ref(false); @@ -312,7 +314,7 @@ return options; } let brokerNum = 0; - tableData.value.forEach((nodeItem) => { + totalTableData.forEach((nodeItem) => { if (checkedNodeMap.value[nodeItem.bk_host_id]) { return; } @@ -516,6 +518,9 @@ }).then((data) => { tableData.value = data.results; isAnomalies.value = false; + if (searchValue.value.length === 0) { + totalTableData = _.cloneDeep(tableData.value); + } }) .catch(() => { tableData.value = []; diff --git a/dbm-ui/frontend/src/views/db-manage/pulsar/list/components/detail/components/node-list/Index.vue b/dbm-ui/frontend/src/views/db-manage/pulsar/list/components/detail/components/node-list/Index.vue index 399744d2dc..e086619714 100644 --- a/dbm-ui/frontend/src/views/db-manage/pulsar/list/components/detail/components/node-list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/pulsar/list/components/detail/components/node-list/Index.vue @@ -233,7 +233,7 @@ // 其它类型的节点数不能全部被缩容,至少保留一个 let bookkeeperNodeNum = 0; let brokerNodeNum = 0; - tableData.value.forEach((nodeItem) => { + totalTableData.forEach((nodeItem) => { if (nodeItem.isBookkeeper) { bookkeeperNodeNum = bookkeeperNodeNum + 1; } else if (nodeItem.isBroker) { @@ -269,7 +269,7 @@ validateSearchValues, handleSearchValueChange, } = useLinkQueryColumnSerach({ - searchType: ClusterTypes.PULSAE, + searchType: ClusterTypes.PULSAR, attrs: ['bk_cloud_id'], fetchDataFn: () => fetchNodeList(), defaultSearchItem: { @@ -278,6 +278,8 @@ } }); + let totalTableData: PulsarNodeModel[] = []; + const isAnomalies = ref(false); const isShowReplace = ref(false); const isShowExpandsion = ref(false); @@ -323,7 +325,7 @@ // 其它类型的节点数不能全部被缩容,至少保留一个 let bookkeeperNodeNum = 0; let brokerNodeNum = 0; - tableData.value.forEach((nodeItem) => { + totalTableData.forEach((nodeItem) => { if (checkedNodeMap.value[nodeItem.bk_host_id]) { return; } @@ -532,6 +534,9 @@ }).then((data) => { tableData.value = data.results; isAnomalies.value = false; + if (searchValue.value.length === 0) { + totalTableData = _.cloneDeep(tableData.value); + } }) .catch(() => { tableData.value = []; diff --git a/dbm-ui/frontend/src/views/db-manage/redis/list/components/list/Index.vue b/dbm-ui/frontend/src/views/db-manage/redis/list/components/list/Index.vue index 5db61a327f..2f17a3ec7d 100644 --- a/dbm-ui/frontend/src/views/db-manage/redis/list/components/list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/redis/list/components/list/Index.vue @@ -45,7 +45,9 @@