This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git


The following commit(s) were added to refs/heads/main by this push:
     new 9e2460ef Fix the Stream List (#616)
9e2460ef is described below

commit 9e2460ef32050b459eb307f879ef2bcde675bff3
Author: Fine0830 <[email protected]>
AuthorDate: Fri Feb 28 19:37:32 2025 +0800

    Fix the Stream List (#616)
---
 CHANGES.md                       |  1 +
 ui/src/components/Read/index.vue | 28 ++++++++++++----------------
 2 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 8ba53c15..a6c53e3c 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -49,6 +49,7 @@ Release Notes.
 - Fix the bug that fails to update `Group` Schema's ResourceOpts.
 - UI: Implement TopNAggregation data query page.
 - UI: Update BanyanDB UI to Integrate New Property Query API.
+- UI: Fix the Stream List.
 
 ### Documentation
 
diff --git a/ui/src/components/Read/index.vue b/ui/src/components/Read/index.vue
index a075d22f..690c9c26 100644
--- a/ui/src/components/Read/index.vue
+++ b/ui/src/components/Read/index.vue
@@ -36,7 +36,6 @@
 
   // Loading
   const { proxy } = getCurrentInstance();
-  const $bus = getCurrentInstance().appContext.config.globalProperties.mittBus;
   const $loadingCreate = 
getCurrentInstance().appContext.config.globalProperties.$loadingCreate;
   const $loadingClose = proxy.$loadingClose;
   const tagType = {
@@ -215,18 +214,17 @@ orderBy:
   function setTableData(elements) {
     const tags = data.resourceData.tagFamilies[data.tagFamily].tags;
     const tableFields = data.tableFields;
-    data.tableData = elements.map((item) => {
-      let dataItem = {};
-      item.tagFamilies[0].tags.forEach((tag) => {
+    for (const item of elements) {
+      const dataItem = {};
+      for (const tag of item.tagFamilies[0].tags) {
         const index = tags.findIndex((item) => item.name === tag.key);
         const type = tags[index].type;
         if (tag.value[tagType[type]] === null) {
-          return (dataItem[tag.key] = 'Null');
+          dataItem[tag.key] = 'Null';
+        } else {
+          dataItem[tag.key] = tag.value[tagType[type]]?.value || 
tag.value[tagType[type]];
         }
-        dataItem[tag.key] = 
Object.hasOwnProperty.call(tag.value[tagType[type]], 'value')
-          ? tag.value[tagType[type]].value
-          : tag.value[tagType[type]];
-      });
+      }
       if (data.type === 'measure' && tableFields.length > 0) {
         item.fields.forEach((field) => {
           const name = field.name;
@@ -235,17 +233,15 @@ orderBy:
               return tableField.name === name;
             })[0].fieldType || '';
           if (field.value[fieldTypes[fieldType]] === null) {
-            return (dataItem[name] = 'Null');
+            dataItem[name] = 'Null';
+          } else {
+            dataItem[name] = field.value[fieldTypes[fieldType]]?.value || 
field.value[fieldTypes[fieldType]];
           }
-          dataItem[name] = 
Object.hasOwnProperty.call(field.value[fieldTypes[fieldType]], 'value')
-            ? field.value[fieldTypes[fieldType]].value
-            : field.value[fieldTypes[fieldType]];
         });
       }
-
       dataItem.timestamp = item.timestamp;
-      return dataItem;
-    });
+      data.tableData.push(dataItem);
+    }
     data.loading = false;
   }
   function setTableParam() {

Reply via email to