ccaominh commented on a change in pull request #9956:
URL: https://github.com/apache/druid/pull/9956#discussion_r433351381



##########
File path: web-console/src/components/segment-timeline/segment-timeline.tsx
##########
@@ -394,14 +394,16 @@ ORDER BY "start" DESC`;
   onTimeSpanChange = (e: any) => {
     const dStart = new Date();
     const dEnd = new Date();
-    dStart.setMonth(dStart.getMonth() - e);
+    const capabilities = this.props.capabilities;
+    const timeSpan = parseInt(e, 10) || 3;

Review comment:
       Please add some test cases to 
`web-console/src/components/segment-timeline/segment-timeline.spec.tsx`:
   - Default `timeSpan` value of 3
   - Custom `timeSpan` value (that is different from default)




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to