Sylvie-Wxr commented on code in PR #397:
URL: 
https://github.com/apache/skywalking-banyandb/pull/397#discussion_r1513940806


##########
ui/src/components/Read/index.vue:
##########
@@ -347,27 +344,25 @@ function handleCodeData() {
     getTableData()
 }
 function autoRefreshTimeRange() {
-    if (isDatePicker.value) {
-        let json = yamlToJson(data.code)
-        const begin = new Date()
-        const end = new Date()
-        const oldBeginDate = new Date(json.data.timeRange.begin)
-        const oldEndDate = new Date(json.data.timeRange.end)
-        const interval = oldEndDate.getTime() - oldBeginDate.getTime()
+    let json = yamlToJson(data.code)
+    const begin = new Date()
+    const end = new Date()
+    const oldBeginDate = new Date(json.data.timeRange.begin)
+    const oldEndDate = new Date(json.data.timeRange.end)
+    const interval = oldEndDate.getTime() - oldBeginDate.getTime()
         
-        if (interval === last15Minutes.value) {
-            begin.setTime(begin.getTime() - last15Minutes.value)
-        } else if (interval === lastWeek.value) {
-            begin.setTime(begin.getTime() - lastWeek.value)
-        } else if (interval === lastMonth.value) {
-            begin.setTime(begin.getTime() - lastMonth.value)
-        } else if (interval === last3Months.value) {
-            begin.setTime(begin.getTime() - last3Months.value)
-        }
-        json.data.timeRange.begin = begin.toISOString()
-        json.data.timeRange.end = end.toISOString()
-        data.code = jsonToYaml(json.data).data
+    if (interval === last15Minutes) {
+        begin.setTime(begin.getTime() - last15Minutes)
+    } else if (interval === lastWeek) {
+        begin.setTime(begin.getTime() - lastWeek)
+    } else if (interval === lastMonth) {
+        begin.setTime(begin.getTime() - lastMonth)
+    } else if (interval === last3Months) {
+        begin.setTime(begin.getTime() - last3Months)

Review Comment:
   Removed these code. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to