-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implemented auto refresh button for VM metrics #10900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Implemented auto refresh button for VM metrics #10900
Conversation
@bernardodemarco a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
UI build: ✔️ |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10900 +/- ##
============================================
+ Coverage 16.49% 16.53% +0.03%
- Complexity 13705 13801 +96
============================================
Files 5708 5717 +9
Lines 504083 506308 +2225
Branches 61101 61441 +340
============================================
+ Hits 83139 83705 +566
- Misses 411665 413228 +1563
- Partials 9279 9375 +96
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds an auto-refresh control to the VM Metrics tab, letting users pick refresh intervals (None, 5s, 30s, 1min, 5min) and automatically re-fetch stats. It also externalizes hard-coded duration labels into i18n keys.
- Switched the “1 hour” label to use
label.duration.1hour
(and added corresponding locale entries). - Added a select dropdown bound to
refreshTime
with options for different intervals. - Introduced
refreshTime
andrefreshIntervalId
data fields, a calculated reaction to interval changes, and anunmounted
hook to clear timers.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
ui/src/components/view/StatsTab.vue | Added auto-refresh select, data/computed fields, and lifecycle cleanup for intervals |
ui/public/locales/pt_BR.json | Added Portuguese translations for auto-refresh labels |
ui/public/locales/en.json | Added English translations for auto-refresh labels |
Comments suppressed due to low confidence (2)
ui/src/components/view/StatsTab.vue:310
- [nitpick] The data property 'refreshTime' is ambiguous (it represents milliseconds). Consider renaming to 'refreshIntervalMs' for better clarity.
refreshTime: '0',
ui/src/components/view/StatsTab.vue:67
- There are no tests covering the auto-refresh dropdown behavior. Consider adding unit or integration tests to verify interval selection, fetch triggering, and interval cleanup.
v-model:value="refreshTime"
Description
This PR adds an option to the VM
Metrics
tab, that allow users to enable auto refresh for VM resource usage data after the selected amount of time. The interval options are: None (Disabled), 5s, 30s, 1min and 5min.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
How Has This Been Tested?
Metrics
tabNone
was selected) after the selected amount of time.