Skip to content

Add support for custom UI labels to the GUI whitelabel runtime system#13415

Open
hsato03 wants to merge 1 commit into
apache:mainfrom
scclouds:gui-theme-add-white-label-for-messages
Open

Add support for custom UI labels to the GUI whitelabel runtime system#13415
hsato03 wants to merge 1 commit into
apache:mainfrom
scclouds:gui-theme-add-white-label-for-messages

Conversation

@hsato03

@hsato03 hsato03 commented Jun 12, 2026

Copy link
Copy Markdown
Member

Description

The GUI whitelabel management system has been extended with the customLabelsPath parameter to allow customization of UI labels. This parameter accepts the path to a directory containing the label files, which must be named according to their language code (e.g., en.json for English).

If files are stored directly on the Management Servers, the base path is /usr/share/cloudstack-management/webapp/, so only the relative path needs to be specified. Alternatively, a full URL to the directory hosting the JSON files can be provided.

Note: The path or URL where the custom language files are located must be accessible by the user.

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):

How Has This Been Tested?

  1. I created the en.json file in the /usr/share/cloudstack-management/webapp/locales/custom_labels directory with the following content:
{
    "label.name": "Nome custom"
}

I created the theme specifying the directory where the en.json file was created:

(local) 👻 > create guitheme name="test" customlabelspath="locales/custom_labels"  css='.layout.ant-layout .header {background: orange;}'
{
  "guiThemes": {
    "created": "2026-06-12T21:38:03+0000",
    "css": ".layout.ant-layout .header {background: orange;}",
    "customlabelspath": "locales/custom_labels",
    "id": "69e6e38b-8a56-442c-9ff4-141138a37b2f",
    "ispublic": true,
    "name": "test",
    "recursivedomains": false
  }
}

Navigating through the ACS GUI, I verified that the label was correctly applied:

label-local
  1. I updated the theme to use the endpoint http://192.168.103.1:8001/custom-labels/:
(local) 👻 > update guitheme id=69e6e38b-8a56-442c-9ff4-141138a37b2f customlabelspath="http://192.168.103.1:8001/custom-labels/"
{
  "guiThemes": {
    "created": "2026-06-12T21:38:03+0000",
    "css": ".layout.ant-layout .header {background: orange;}",
    "customlabelspath": "http://192.168.103.1:8001/custom-labels/",
    "id": "69e6e38b-8a56-442c-9ff4-141138a37b2f",
    "ispublic": true,
    "name": "test",
    "recursivedomains": false
  }
}

In this endpoint, there was an en.json file with the following content:

{
  "label.name": "Server name",
  "label.state": "Server state"
}

Navigating through the ACS GUI, I verified that the labels were also applied:

label-server

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

@hsato03

hsato03 commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@hsato03 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 47 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.76%. Comparing base (2fd83e1) to head (133c2c0).

Files with missing lines Patch % Lines
...rg/apache/cloudstack/gui/theme/GuiThemeJoinVO.java 0.00% 19 Missing ⚠️
...va/org/apache/cloudstack/gui/theme/GuiThemeVO.java 0.00% 8 Missing ⚠️
...ache/cloudstack/gui/theme/GuiThemeServiceImpl.java 0.00% 7 Missing ⚠️
...ache/cloudstack/api/response/GuiThemeResponse.java 0.00% 6 Missing ⚠️
.../api/command/user/gui/theme/CreateGuiThemeCmd.java 0.00% 3 Missing ⚠️
.../api/command/user/gui/theme/UpdateGuiThemeCmd.java 0.00% 3 Missing ⚠️
...src/main/java/com/cloud/api/ApiResponseHelper.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13415      +/-   ##
============================================
- Coverage     18.77%   18.76%   -0.02%     
+ Complexity    17989    17984       -5     
============================================
  Files          6163     6163              
  Lines        552779   552824      +45     
  Branches      67365    67366       +1     
============================================
- Hits         103780   103733      -47     
- Misses       437587   437690     +103     
+ Partials      11412    11401      -11     
Flag Coverage Δ
uitests 3.53% <ø> (-0.01%) ⬇️
unittests 19.95% <0.00%> (-0.02%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 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
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants