"Show Last" metrics should be visible in the dashboard even if no data is present
Currently 'Show Last' metrics is only shown when data appears. This means that:
- The user can only see the dropdown when there is data.
- 8 hours is the default
- Example: If there is data for the last 3 days, but not in last 8 hours, user can never reach that data.
- The dropdowns "shift" positions suddenly after the page is loaded.
- Will be more obvious when more filters are added.
Example of the button "showing up":
Technical implementation
<gl-form-group
v-if="!showEmptyState"
:label="s__('Metrics|Show last')"
label-size="sm"
label-for="monitor-time-window-dropdown"
>
...
</gl-form-group>
I suggest to remove the v-if="!showEmptyState"
from that dropdown.
This comes from the discussion at gitlab-ce!31239:
-
@mrincon started a discussion: (+2 comments) @adriel I have removed the conditional on the time window dropdown.
I found that there could be no recent data available, but users might want to see older data. It also reduces the "jumpiness" of the UI when the screen is first loaded.
Edited by Miguel Rincon