TekMonksGitHub / monkvision

Dashboarding framework
Other
1 stars 10 forks source link

Added time range options to adjust graph data #64

Closed Balaguru-DLT closed 3 months ago

Balaguru-DLT commented 3 months ago
  1. Added timeIntervals.json File

Contains a range of intervals. This file allows for easy addition or adjustment of intervals as needed.

  1. Updated main.html file

i) Added a select dropdown for choosing time intervals.

ii) Added CSS for select dropdown

  1. Modified main.mjs File

i) Updated router.addOnLoadPage Function

Added logic to set the options for the time picker on page load using the intervals from timeIntervals.json.

ii) Modified timeRangeUpdated Function

Updated the function to handle the following scenarios: When a time is selected from the dropdown, the datetimepicker's from and to values are updated accordingly. If the dropdown value is cleared, the datetimepicker range defaults to 1 week. If the datetimepicker value is changed directly, the dropdown value is cleared.

  1. In the theme.json, theme_dark.json, theme_light.json added the timepicker id in main_css.

I have added the screenshot as proof in the mantis note. 3886

TekMonksGitHub commented 3 months ago

Rejecting due to wrong logic.