cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Add UI to view and download usage records

Open vishesh92 opened this issue 1 year ago • 43 comments
trafficstars

Description

This PR adds a new dashboard for viewing and downloading usage records.

This PR also makes startdate and enddate as non required params for generateUsageRecords. (Fixes: #7133)

Types of changes

  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] Enhancement (improves an existing feature and functionality)
  • [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
  • [ ] build/CI

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • [x] Major
  • [ ] Minor

Screenshots (if appropriate):

image image image image image

How Has This Been Tested?

How did you try to break this feature and the system with this change?

vishesh92 avatar Feb 06 '24 10:02 vishesh92

@vishesh92 a [SL] 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 avatar Feb 06 '24 10:02 blueorangutan

Codecov Report

Attention: Patch coverage is 0.74906% with 265 lines in your changes are missing coverage. Please review.

Project coverage is 31.05%. Comparing base (37bb24f) to head (a4316c9). Report is 104 commits behind head on main.

Files Patch % Lines
ui/src/views/infra/UsageRecords.vue 0.00% 233 Missing :warning:
ui/src/utils/util.js 0.00% 14 Missing :warning:
ui/src/components/view/ListView.vue 0.00% 10 Missing and 1 partial :warning:
ui/src/components/widgets/Status.vue 0.00% 4 Missing :warning:
ui/src/views/iam/RolePermissionTab.vue 0.00% 2 Missing :warning:
ui/src/config/section/tools.js 0.00% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8615      +/-   ##
============================================
+ Coverage     30.59%   31.05%   +0.45%     
- Complexity    33772    33910     +138     
============================================
  Files          5353     5404      +51     
  Lines        375900   379976    +4076     
  Branches      54629    55425     +796     
============================================
+ Hits         115002   117993    +2991     
- Misses       245710   246348     +638     
- Partials      15188    15635     +447     
Flag Coverage Δ
simulator-marvin-tests 24.63% <ø> (+0.39%) :arrow_up:
uitests 4.31% <0.74%> (-0.07%) :arrow_down:
unit-tests 16.89% <ø> (+0.27%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 06 '24 10:02 codecov[bot]

@blueorangutan package

vishesh92 avatar Feb 06 '24 11:02 vishesh92

@vishesh92 a [SL] 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 avatar Feb 06 '24 11:02 blueorangutan

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8546

blueorangutan avatar Feb 06 '24 12:02 blueorangutan

@blueorangutan test alma9 kvm-alma9 keepEnv

DaanHoogland avatar Feb 06 '24 16:02 DaanHoogland

@DaanHoogland a [SL] Trillian-Jenkins test job (alma9 mgmt + kvm-alma9) has been kicked to run smoke tests

blueorangutan avatar Feb 06 '24 16:02 blueorangutan

[SF] Trillian test result (tid-9106) Environment: kvm-alma9 (x2), Advanced Networking with Mgmt server a9 Total time taken: 52074 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8615-t9106-kvm-alma9.zip Smoke tests completed. 121 look OK, 1 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_list_system_vms_metrics_history Failure 0.21 test_metrics_api.py

blueorangutan avatar Feb 07 '24 12:02 blueorangutan

@vishesh92 it seems to me this menu item should be under "tools". what do you think?

DaanHoogland avatar Feb 07 '24 16:02 DaanHoogland

@vishesh92 it seems to me this menu item should be under "tools". what do you think?

IMO, Tools should have something which contains tools which are used very infrequently and Usage is something someone might use on a regular basis. I don't have any strong opinions about this, but as of now tools have just Comments & Import-Export Instances. Let me know how should we proceed on this.

image

vishesh92 avatar Feb 07 '24 16:02 vishesh92

Others can comment on the placement of the menu option but I would prefer it under Tools

metoo

DaanHoogland avatar Feb 09 '24 15:02 DaanHoogland

@shwstppr @DaanHoogland Moved the menu item to under Tools.

vishesh92 avatar Feb 14 '24 13:02 vishesh92

@blueorangutan package

DaanHoogland avatar Feb 14 '24 17:02 DaanHoogland

@DaanHoogland a [SL] 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 avatar Feb 14 '24 17:02 blueorangutan

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8652

blueorangutan avatar Feb 14 '24 18:02 blueorangutan

@blueorangutan alma9 kvm-alma9 keepEnv

DaanHoogland avatar Feb 15 '24 08:02 DaanHoogland

@blueorangutan alma9 kvm-alma9 keepEnv

DaanHoogland avatar Feb 15 '24 09:02 DaanHoogland

@blueorangutan alma9 kvm-alma9 keepEnv

build started manually, no idea why the bot refuses yet...

DaanHoogland avatar Feb 15 '24 09:02 DaanHoogland

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8666

blueorangutan avatar Feb 15 '24 10:02 blueorangutan

@blueorangutan alma9 kvm-alma9 keepEnv

DaanHoogland avatar Feb 15 '24 10:02 DaanHoogland

@blueorangutan ui

rohityadavcloud avatar Feb 16 '24 05:02 rohityadavcloud

@rohityadavcloud a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Feb 16 '24 05:02 blueorangutan

UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/8615 (QA-JID-283)

blueorangutan avatar Feb 16 '24 06:02 blueorangutan

@blueorangutan package

vishesh92 avatar Feb 16 '24 08:02 vishesh92

@vishesh92 a [SL] 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 avatar Feb 16 '24 08:02 blueorangutan

@blueorangutan ui

vishesh92 avatar Feb 16 '24 08:02 vishesh92

@vishesh92 a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Feb 16 '24 08:02 blueorangutan

UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/8615 (QA-JID-284)

blueorangutan avatar Feb 16 '24 08:02 blueorangutan

[SF] Trillian test result (tid-9233) Environment: kvm-alma9 (x2), Advanced Networking with Mgmt server a9 Total time taken: 51113 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8615-t9233-kvm-alma9.zip Smoke tests completed. 129 look OK, 0 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File

blueorangutan avatar Feb 16 '24 09:02 blueorangutan

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8683

blueorangutan avatar Feb 16 '24 09:02 blueorangutan