Uh oh!
There was an error while loading. Please reload this page.
VM stats history visualization - #6401
Conversation
acs-robot
commented
May 20, 2022
Found UI changes, kicking a new UI QA build |
blueorangutan
commented
May 20, 2022
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
blueorangutan
commented
May 20, 2022
UI build: ✔️ |
DaanHoogland
commented
May 20, 2022
@blueorangutan package |
blueorangutan
commented
May 20, 2022
@DaanHoogland a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
yadvr
commented
May 20, 2022
Looks fantastic, looking forward to reviewing/testing this. |
nvazquez
commented
May 20, 2022
Wow - looks very nice @joseflauzino thanks! |
blueorangutan
commented
May 20, 2022
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3459 |
DaanHoogland
commented
May 20, 2022
@blueorangutan test keepEnv |
blueorangutan
commented
May 20, 2022
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
May 21, 2022
Trillian test result (tid-4223)
|
DaanHoogland
commented
May 23, 2022
@joseflauzino, two minor points
in general tests good and looks good, |
joseflauzino
commented
May 23, 2022
@DaanHoogland thanks for your review and testing.
Both
This was also an intentional detail. The idea is to have the user open the filtering modal and click the OK button whenever they want to get updated data for the selected period. The reason is that during our tests there were several times when users clicked the refresh button and it looked like the data was not updated. But what happened was that the selected period was in the past, so the data would always be the same. The way it is now is that the user will always check the selected period before getting updated data. My intention is to leave it this way for now and according to the feedback we get from users we could think of other ways to improve the user experience. |
DaanHoogland
commented
May 23, 2022
@joseflauzino |
acs-robot
commented
Jun 3, 2022
Found UI changes, kicking a new UI QA build |
blueorangutan
commented
Jun 3, 2022
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
blueorangutan
commented
Jun 3, 2022
UI build: ✔️ |
joseflauzino
commented
Jun 3, 2022
@DaanHoogland I have just committed a change that applies your suggestion related to the submit button text. |
DaanHoogland
commented
Jun 7, 2022
looks ok, I can imagine the novice won´t be clear on this, but letś go for it! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
acs-robot
commented
Aug 8, 2022
Found UI changes, kicking a new UI QA build |
blueorangutan
commented
Aug 8, 2022
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
blueorangutan
commented
Aug 8, 2022
UI build: ✔️ |
shwstppr
commented
Aug 8, 2022
@blueorangutan package |
blueorangutan
commented
Aug 8, 2022
@shwstppr a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
blueorangutan
commented
Aug 8, 2022
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3939 |
shwstppr
left a comment
There was a problem hiding this comment.
@joseflauzino found a couple of issues while testing this time,
- While filtering stats, API is called with hidden fields. eg: First filter using start, end dates Then select All data. Check API call, it still contains start/enddate param even though they are hidden in UI.
- Time in filter UI is shown in the local timezone and the same is used in the API call without any timezone. Does
listVirtualMachinesUsageHistoryAPI convert it to server time? I guess not and it won't list stats correctly in many cases
acs-robot
commented
Aug 8, 2022
Found UI changes, kicking a new UI QA build |
blueorangutan
commented
Aug 8, 2022
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
joseflauzino
commented
Aug 8, 2022
Good point. I fixed this bug now.
The timestamps come in server timezone, but the Currently, the backend only supports dates in the |
blueorangutan
commented
Aug 8, 2022
UI build: ✔️ |
@joseflauzino sorry if I didn't explain myself better. I'm not saying API should accept timezone but maybe we can call API with timezone that the server expects. My issue currently is,
In short, I think while calling the API it is needed to convert the selected time back |
joseflauzino
commented
Aug 11, 2022
To do that, before calling the API, we would have to convert the client timezone (from the browser) to the management server timezone, right? In this case, my question is: in the UI context (on the client), how can we find out the management server timezone before calling the API? Is there a ready-made mechanism to do this? If there is, please let me know and then I will implement this timezone conversion. If not, I think we can address this in another issue and then implement this kind of timezone conversion in this and other views that do similar filtering (API calls passing date objects as parameters). |
shwstppr
commented
Aug 12, 2022
@joseflauzino maybe the reverse of how we convert server time into local time, https://github.com/apache/cloudstack/blob/main/ui/src/utils/plugins.js#L294-L301 |
yadvr
commented
Aug 17, 2022
ping @joseflauzino are you able to address the comment - I think we're very close to merging this. |
acs-robot
commented
Aug 25, 2022
Found UI changes, kicking a new UI QA build |
blueorangutan
commented
Aug 25, 2022
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
blueorangutan
commented
Aug 25, 2022
UI build: ✔️ |
Kudos, SonarCloud Quality Gate passed! |
Codecov Report
@@ Coverage Diff @@## main #6401 +/- ##
=========================================
Coverage 5.87% 5.87% Complexity 3934 3934 =========================================
Files 2454 2454 Lines 242682 242682 Branches 37980 37980 =========================================
Hits 14261 14261 Misses 226842 226842 Partials 1579 1579 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
shwstppr
commented
Aug 25, 2022
@blueorangutan package |
blueorangutan
commented
Aug 25, 2022
@shwstppr a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
blueorangutan
commented
Aug 25, 2022
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4061 |
yadvr
commented
Aug 29, 2022
Good stuff @joseflauzino ! |
* Add VM stats view feature * Add dynamic label to the submit button of the VM stats filtering modal * Improve CPU info message * Reduce identation * Remove missed line * Fix timestamp when 'Use local timezone' is selected * Fix bug when filtering for all data * Support for toggle 'Use local timezone' button Co-authored-by: joseflauzino <jose@scclouds.com.br> Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>








Description
PR #5984 recently implemented the
listVirtualMachinesUsageHistoryAPI, which provides historical data of VM stats. However, the current ACS UI only shows VM stats from the most recent data collection.This PR implements new features in the UI which allow ACS users to view the historical stats of each VM individually.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots:
Charts:
Possible Filtering:

How Has This Been Tested?
I went to Compute > Instances >
any-vm-instance> Statistics and was able to visualize all the statistics charts for the selected VM.Also, I filtered by different period combinations and the data was presented correctly.