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

hanahmily 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 13c194f9 Parse string and int array in the query result table (#577)
13c194f9 is described below

commit 13c194f9cf505e49631878d48db34a1dd2eb7fec
Author: Fine0830 <[email protected]>
AuthorDate: Thu Dec 19 19:17:11 2024 +0800

    Parse string and int array in the query result table (#577)
    
    * fix style
    
    * fix
    
    * fix data
    
    * update
    
    * clean up
    
    * format
    
    * update changes
    
    * fix
    
    * format
---
 CHANGES.md                                         |  1 +
 ui/src/components/GroupTree/index.vue              |  1 +
 ui/src/components/Property/PropertyValueReader.vue |  4 ----
 ui/src/components/Read/index.vue                   | 26 ++++++++++++++++------
 ui/vite.config.mjs                                 |  7 ++++++
 5 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index ddaede98..353e7084 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -27,6 +27,7 @@ Release Notes.
 - Metadata: Fix the bug that the cache load nil value that is the unknown 
index rule on the index rule binding.
 - Queue: Fix the bug that the client remove a registered node in the eviction 
list. The node is controlled by the recovery loop, doesn't need to be removed 
in the failover process.
 - UI: Add prettier to enforce a consistent style by parsing code.
+- Parse string and int array in the query result table.
 - Fix the bug that fails to update `Group` Schema's ResourceOpts.
 
 ### Documentation
diff --git a/ui/src/components/GroupTree/index.vue 
b/ui/src/components/GroupTree/index.vue
index 173ced30..fa22aeb3 100644
--- a/ui/src/components/GroupTree/index.vue
+++ b/ui/src/components/GroupTree/index.vue
@@ -851,6 +851,7 @@
     z-index: 9999 !important;
     padding: 10px;
     font-size: 14px;
+    background-color: #fff;
     div {
       height: 30px;
       line-height: 30px;
diff --git a/ui/src/components/Property/PropertyValueReader.vue 
b/ui/src/components/Property/PropertyValueReader.vue
index af1dbcef..1f63c99f 100644
--- a/ui/src/components/Property/PropertyValueReader.vue
+++ b/ui/src/components/Property/PropertyValueReader.vue
@@ -27,12 +27,8 @@
   });
 
   const numSpaces = 2;
-  const initData = () => {
-    valueData.data = temp;
-  };
   const closeDialog = () => {
     showDialog.value = false;
-    initData();
   };
 
   const downloadValue = () => {
diff --git a/ui/src/components/Read/index.vue b/ui/src/components/Read/index.vue
index c6c25253..70ee9acf 100644
--- a/ui/src/components/Read/index.vue
+++ b/ui/src/components/Read/index.vue
@@ -211,11 +211,6 @@ orderBy:
       );
     }
   }
-  function changeCode(name, value) {
-    let code = yamlToJson(data.code).data;
-    code[name] = value;
-    data.code = jsonToYaml(code).data;
-  }
   function initData() {
     $loadingCreate();
     getStreamOrMeasure(data.type, data.group, data.name)
@@ -456,7 +451,7 @@ orderBy:
               range-separator="to"
               start-placeholder="begin"
               end-placeholder="end"
-              align="right"
+              :align="`right`"
             >
             </el-date-picker>
             <el-button :icon="Search" @click="searchTableData" style="flex: 0 
0 auto" color="#6E38F7" plain></el-button>
@@ -479,7 +474,7 @@ orderBy:
         element-loading-background="rgba(0, 0, 0, 0.8)"
         ref="multipleTable"
         stripe
-        border
+        :border="true"
         highlight-current-row
         tooltip-effect="dark"
         empty-text="No data yet"
@@ -496,6 +491,23 @@ orderBy:
           :prop="item.name"
           show-overflow-tooltip
         >
+          <template #default="scope">
+            <el-popover
+              v-if="item.type.includes(`ARRAY`) && scope.row[item.name] !== 
`Null`"
+              effect="dark"
+              trigger="hover"
+              placement="top"
+              width="auto"
+            >
+              <template #default>
+                <div>{{ scope.row[item.name].join('; ') }}</div>
+              </template>
+              <template #reference>
+                <el-tag>View</el-tag>
+              </template>
+            </el-popover>
+            <div v-else>{{ scope.row[item.name] }}</div>
+          </template>
         </el-table-column>
       </el-table>
     </el-card>
diff --git a/ui/vite.config.mjs b/ui/vite.config.mjs
index 0c46889b..d44c81a4 100644
--- a/ui/vite.config.mjs
+++ b/ui/vite.config.mjs
@@ -42,6 +42,13 @@ export default ({ mode }) => {
         '@': fileURLToPath(new URL('./src', import.meta.url)),
       },
     },
+    css: {
+      preprocessorOptions: {
+        scss: {
+          api: 'modern-compiler'
+        }
+      }
+    },
     server: {
       proxy: {
         '^/api': {

Reply via email to