Uploaded image for project: 'Observability UI'
  1. Observability UI
  2. OU-859

[monitoring > perses dashboards] Allow Perses Dashboard Definition to set initial `duration` and `timeInterval`

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • 2
    • None
    • None
    • None

      Background

      The Perses Dashboards currently default the Time Range to 'Last 30 minutes' and the Time Interval (time between refresh) to '0s', which is displayed as 'Off'. 

      --- 

      #web/src/components/dashboards/perses/PersesWrapper.tsx

      const DEFAULT_DASHBOARD_DURATION = '30m';

      const DEFAULT_REFRESH_INTERVAL = '0s';

      const initialRefreshInterval = useInitialRefreshInterval(DEFAULT_REFRESH_INTERVAL);

      const initialTimeRange = useInitialTimeRange(DEFAULT_DASHBOARD_DURATION);

      ...

      <TimeRangeProviderWithQueryParams
            initialTimeRange={initialTimeRange}
            initialRefreshInterval={initialRefreshInterval}
          >

      ---

       

      Criteria

      Should be updated to read the dashboard.spec.duration and dashboard.spec.timeInterval before using default values. 

      If dashboard.spec.duration is 0s then default should be used. 

      Outcome 

      Perses Dashboard definition `spec.duration` and `spec.timeInterval` can be used as the initial values for a dashboard's Time Range (duration) and Time Interval. 

              jezhu@redhat.com Jenny Zhu
              jezhu@redhat.com Jenny Zhu
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: