Skip to content

Conversation

@OlegChuev
Copy link
Contributor

Description

This PR makes the User Card toggleable via config.json, which is particularly useful when users shouldn’t be aware of API docs or other information.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • 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
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

With "enabled": true and when enabled absent from the config.json
image

With "enabled": false:

image

How Has This Been Tested?

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

@DaanHoogland
Copy link
Contributor

@blueorangutan ui

@DaanHoogland DaanHoogland added this to the 4.21.0 milestone Mar 12, 2025
@blueorangutan
Copy link

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

@codecov
Copy link

codecov bot commented Mar 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 16.26%. Comparing base (b387bc1) to head (4632795).
⚠️ Report is 467 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #10545   +/-   ##
=========================================
  Coverage     16.26%   16.26%           
  Complexity    13389    13389           
=========================================
  Files          5674     5674           
  Lines        498927   498927           
  Branches      60337    60337           
=========================================
+ Hits          81157    81159    +2     
+ Misses       408729   408728    -1     
+ Partials       9041     9040    -1     
Flag Coverage Δ
uitests 3.99% <ø> (ø)
unittests 17.12% <ø> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/10545 (QA-JID-576)

@bernardodemarco bernardodemarco self-requested a review March 14, 2025 15:05
Copy link
Member

@bernardodemarco bernardodemarco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, manually tested it

  1. I locally ran the UI environment (npm run start)
  2. Accessed the ui/public/config.json file and changed the enabled property of the userCard object from true to false
  3. Verified that the card was not displayed to end users:
    image
  4. Changed the enabled property back to true and verified that the card was correctly displayed to end users:
    image

@fmaximus
Copy link
Contributor

fmaximus commented Jul 1, 2025

Can we maybe also rename it to helpCard, as the name userCard is completely wrong.

Copy link
Contributor

Copilot AI left a 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 the ability to hide the User Card component from the dashboard via a configuration option. The enhancement allows administrators to control whether users can see the User Card, which may contain API documentation or other sensitive information.

  • Adds a configurable enabled property to the userCard configuration object
  • Implements conditional rendering of the User Card component based on the configuration setting
  • Defaults to showing the User Card when the configuration is not specified (backwards compatibility)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
ui/src/views/dashboard/UsageDashboard.vue Adds conditional rendering logic to hide/show User Card based on config
ui/public/config.json Adds the enabled property to userCard configuration with default value

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

Copy link
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. didn't test.

@DaanHoogland DaanHoogland merged commit 2105794 into apache:main Aug 29, 2025
25 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Apache CloudStack 4.22.0 Aug 29, 2025
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

9 participants