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 e1128f58 [UI] Fix offset update issues (#477)
e1128f58 is described below

commit e1128f58e7bb9fe2eecb3a643cc2fcf23d591482
Author: Sylvie-Wxr <129717259+sylvie-...@users.noreply.github.com>
AuthorDate: Wed Jun 26 16:41:11 2024 -0700

    [UI] Fix offset update issues (#477)
---
 ui/src/components/Read/index.vue | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ui/src/components/Read/index.vue b/ui/src/components/Read/index.vue
index 629b46a5..6e71fe4f 100644
--- a/ui/src/components/Read/index.vue
+++ b/ui/src/components/Read/index.vue
@@ -194,7 +194,7 @@ function initCode() {
         }
         timeRange = jsonToYaml(timeRange).data
         data.code = ref(
-            `${timeRange}offset: 1
+            `${timeRange}offset: 0
 limit: 10
 orderBy:
   indexRuleName: ""
@@ -315,8 +315,8 @@ function changeTagFamilies() {
 }
 function handleCodeData() {
     const json = yamlToJson(data.code).data
-    param.offset = json.offset ? json.offset : param.offset
-    param.limit = json.limit ? json.limit : param.limit
+    param.offset = (json.offset !== undefined) ? json.offset : 0;
+    param.limit = (json.limit !== undefined) ? json.limit : 10;
     /* json.orderBy ? param.orderBy = json.orderBy : null */
     delete param.timeRange
     if (json.timeRange && !isNaN(Date.parse(json.timeRange.begin)) && 
!isNaN(Date.parse(json.timeRange.end))) {

Reply via email to