Skip to content

Conversation

@shwstppr
Copy link
Contributor

@shwstppr shwstppr commented Sep 26, 2025

Description

Fixes #11643
Disable reset configuration action when the current value for the config is its default value

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?

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

reset-cfg-disabled.mp4

Fixes apache#11643

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@codecov
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.56%. Comparing base (5798fb4) to head (ee1bcc6).
⚠️ Report is 192 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11728      +/-   ##
============================================
- Coverage     17.56%   17.56%   -0.01%     
+ Complexity    15548    15545       -3     
============================================
  Files          5913     5913              
  Lines        529440   529454      +14     
  Branches      64670    64674       +4     
============================================
- Hits          93018    93005      -13     
- Misses       425964   425991      +27     
  Partials      10458    10458              
Flag Coverage Δ
uitests 3.58% <ø> (-0.01%) ⬇️
unittests 18.63% <ø> (-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.

@shwstppr
Copy link
Contributor Author

@blueorangutan ui

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

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

@shwstppr shwstppr marked this pull request as ready for review September 27, 2025 03:17
@github-actions
Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

…dedaultvalue

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@DaanHoogland
Copy link
Contributor

@blueorangutan ui

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@DaanHoogland
Copy link
Contributor

did some testing in qa and will have to retry in a 4.22 env as resetting at domain level did not seem to work.

@blueorangutan
Copy link

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

@blueorangutan
Copy link

[SF] Trillian Build Failed (tid-14884)

@DaanHoogland
Copy link
Contributor

did some testing in qa and will have to retry in a 4.22 env as resetting at domain level did not seem to work.

ok, found the quirk:

  1. set a value at global level
  2. set a value at domain level
  3. reset at domain level => adjusted value from global is used and not the default, reset button is still active.
    I think this is kind of expected, but the reset button does not dissappear in this case, while resetting no longer changes the value.

I am not sure if the UI contains enough data to fix this, but it is acceptable to me. (i.e. test succeeds)

@RosiKyu
Copy link
Collaborator

RosiKyu commented Jan 26, 2026

@blueorangutan package

@blueorangutan
Copy link

@RosiKyu 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.

@blueorangutan
Copy link

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

@RosiKyu
Copy link
Collaborator

RosiKyu commented Jan 27, 2026

WIP (testing)

TC1: Reset button disabled for default values (Global Configuration)

Objective:
Verify that the reset configuration button is disabled (greyed out) when the current configuration value equals the default value.

Test Steps:

  1. Navigated to http://10.0.34.171:8080/client/#/dashboard
  2. Logged in as admin user
  3. Navigated to Configuration → Global Settings
  4. Searched for configuration: account.cleanup.interval
  5. Observed the reset (reload) icon button state
  6. Attempted to click the reset button

Expected Result: The reset button should be disabled/greyed out and non-interactive when the current value (86400) equals the default value (86400).

Actual Result: The reset button is greyed out and cannot be interacted with. The button shows tooltip "Reset to default value" but does not respond to clicks.

Test Evidence:

  • Configuration tested: account.cleanup.interval
  • Current value: 86400
  • Default value: 86400
  • Reset button state: Disabled (greyed out)
  • Comparison test: host configuration (value: 10.0.34.171, default: localhost) shows reset button as enabled/clickable, confirming the differential behavior works correctly.
image

TC2: Reset button enabled for non-default values (Global Configuration)

Objective:
Verify that the reset configuration button is enabled when the current configuration value differs from the default value, and that after reset the button becomes disabled.

Test Steps:

  1. Navigated to Configuration → Global Settings
  2. Searched for configuration: host
  3. Observed the reset button state (enabled, not greyed out)
  4. Clicked the reset button
  5. Confirmation dialog appeared: "Are you sure you want reset configuration - host?"
  6. Clicked "Yes" to confirm reset
  7. Observed the value change and reset button state after reset

Expected Result:

  • Reset button should be enabled when value differs from default
  • Clicking reset should show confirmation dialog
  • After reset, value should change to default and reset button should become disabled

Actual Result:

  • Reset button was enabled (darker icon, clickable) when value was 10.0.34.171
  • Confirmation dialog appeared with message "Reset to default value - Are you sure you want reset configuration - host?"
  • After clicking "Yes", value changed from 10.0.34.171 to localhost
  • Reset button became greyed out/disabled after reset (UI updated without page refresh)

Test Evidence:

  • Configuration tested: host

  • Value before reset: 10.0.34.171

  • Default value: localhost

  • Value after reset: localhost

  • Reset button state before: Enabled (clickable)

  • Reset button state after: Disabled (greyed out)

  • Confirmation dialog: Displayed correctly

  • before reset

image
  • during
image
  • after reset
image

TC3: UI refresh after value update and reset

Objective:
Verify the complete cycle: modify a configuration value, confirm reset button becomes enabled, perform reset, and confirm reset button becomes disabled again - all without manual page refresh.

Test Steps:

  1. Navigated to Configuration → Global Settings
  2. Searched for configuration: expunge.delay
  3. Verified initial state: value 86400 equals default 86400, reset button disabled
  4. Clicked on value field and modified value to 90000
  5. Clicked save button
  6. Observed success notification "Setting Updated: expunge.delay"
  7. Verified reset button became enabled after save
  8. Clicked reset button
  9. Confirmation dialog appeared: "Are you sure you want reset configuration - expunge.delay?"
  10. Clicked "Yes" to confirm
  11. Observed success notification "Setting expunge.delay Reset to default value"
  12. Verified value returned to 86400 and reset button became disabled

Expected Result:

  • Reset button should be disabled when value equals default
  • After modifying value, reset button should become enabled (without page refresh)
  • After reset, value should return to default and reset button should become disabled (without page refresh)

Actual Result:

  • Initial state: value 86400, reset button disabled (greyed out)
  • After modifying to 90000 and saving: reset button became enabled (darker icon, clickable)
  • Confirmation dialog displayed correctly
  • After reset: value returned to 86400, reset button became disabled (greyed out)
  • UI updated dynamically without requiring manual page refresh

Test Evidence:

  • Configuration tested: expunge.delay
  • Initial value: 86400 (default)
  • Modified value: 90000
  • Value after reset: 86400
  • Success notification on update: "Setting Updated: expunge.delay"
  • Success notification on reset: "Setting expunge.delay Reset to default value"
  • Status notification: "Please restart your management server(s) for your new settings to take effect"
  • Reset button state transitions: Disabled → Enabled (after edit) → Disabled (after reset)
Screencast.from.2026-01-27.14-31-33.webm

TC4: Zone-level configuration reset behavior

Objective:
Verify that the reset button behavior works correctly at the Zone scope level.

Test Steps:

  1. Navigated to Infrastructure → Zones
  2. Selected zone: ref-trl-10742-k-Mol9-rositsa-kyuchukova
  3. Clicked on Settings tab
  4. Verified reset button states for configurations

Expected Result:

  • Reset button disabled for configurations where value equals default
  • Reset button enabled for configurations where value differs from default

Actual Result:

  • Configurations with default values show reset button as inactive/greyed out
  • Configurations with modified values show reset button as enabled and can be reset

Test Evidence:

  • Zone tested: ref-trl-10742-k-Mol9-rositsa-kyuchukova
  • Zone ID: f5705cb8-e9dc-4582-aecc-f55bb443198c
  • Reset button behavior confirmed consistent with Global Settings behavior
Screencast.from.2026-01-27.14-35-05.webm

Copy link
Collaborator

@RosiKyu RosiKyu left a comment

Choose a reason for hiding this comment

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

LGTM

Tested reset button enable/disable functionality at Global, Zone, Cluster, Account, and Domain levels - all working as expected.

Test Results Summary

TC# Test Case Scope Status
TC1 Reset button disabled for default values Global PASSED
TC2 Reset button enabled for non-default values Global PASSED
TC3 UI refresh after value update and reset Global PASSED
TC4 Zone-level configuration reset behavior Zone PASSED
TC5 Cluster-level configuration reset behavior Cluster PASSED
TC6 Account-level configuration reset behavior Account PASSED
TC7 Domain-level configuration reset behavior Domain PASSED

Detailed Test Execution Report

TC1: Reset button disabled for default values (Global Configuration)

Objective:
Verify that the reset configuration button is disabled (greyed out) when the current configuration value equals the default value.

Test Steps:
1.. Logged in as admin user
3. Navigated to Configuration → Global Settings
4. Searched for configuration: account.cleanup.interval
5. Observed the reset (reload) icon button state
6. Attempted to click the reset button

Expected Result: The reset button should be disabled/greyed out and non-interactive when the current value (86400) equals the default value (86400).

Actual Result: The reset button is greyed out and cannot be interacted with. The button shows tooltip "Reset to default value" but does not respond to clicks.

Test Evidence:

  • Configuration tested: account.cleanup.interval
  • Current value: 86400
  • Default value: 86400
  • Reset button state: Disabled (greyed out)
  • Comparison test: host configuration (value: 10.0.34.171, default: localhost) shows reset button as enabled/clickable, confirming the differential behavior works correctly.
image

TC2: Reset button enabled for non-default values (Global Configuration)

Objective:
Verify that the reset configuration button is enabled when the current configuration value differs from the default value, and that after reset the button becomes disabled.

Test Steps:

  1. Navigated to Configuration → Global Settings
  2. Searched for configuration: host
  3. Observed the reset button state (enabled, not greyed out)
  4. Clicked the reset button
  5. Confirmation dialog appeared: "Are you sure you want reset configuration - host?"
  6. Clicked "Yes" to confirm reset
  7. Observed the value change and reset button state after reset

Expected Result:

  • Reset button should be enabled when value differs from default
  • Clicking reset should show confirmation dialog
  • After reset, value should change to default and reset button should become disabled

Actual Result:

  • Reset button was enabled (darker icon, clickable) when value was 10.0.34.171
  • Confirmation dialog appeared with message "Reset to default value - Are you sure you want reset configuration - host?"
  • After clicking "Yes", value changed from 10.0.34.171 to localhost
  • Reset button became greyed out/disabled after reset (UI updated without page refresh)

Test Evidence:

  • Configuration tested: host

  • Value before reset: 10.0.34.171

  • Default value: localhost

  • Value after reset: localhost

  • Reset button state before: Enabled (clickable)

  • Reset button state after: Disabled (greyed out)

  • Confirmation dialog: Displayed correctly

  • before reset

image
  • during
image
  • after reset
image

TC3: UI refresh after value update and reset

Objective:
Verify the complete cycle: modify a configuration value, confirm reset button becomes enabled, perform reset, and confirm reset button becomes disabled again - all without manual page refresh.

Test Steps:

  1. Navigated to Configuration → Global Settings
  2. Searched for configuration: expunge.delay
  3. Verified initial state: value 86400 equals default 86400, reset button disabled
  4. Clicked on value field and modified value to 90000
  5. Clicked save button
  6. Observed success notification "Setting Updated: expunge.delay"
  7. Verified reset button became enabled after save
  8. Clicked reset button
  9. Confirmation dialog appeared: "Are you sure you want reset configuration - expunge.delay?"
  10. Clicked "Yes" to confirm
  11. Observed success notification "Setting expunge.delay Reset to default value"
  12. Verified value returned to 86400 and reset button became disabled

Expected Result:

  • Reset button should be disabled when value equals default
  • After modifying value, reset button should become enabled (without page refresh)
  • After reset, value should return to default and reset button should become disabled (without page refresh)

Actual Result:

  • Initial state: value 86400, reset button disabled (greyed out)
  • After modifying to 90000 and saving: reset button became enabled (darker icon, clickable)
  • Confirmation dialog displayed correctly
  • After reset: value returned to 86400, reset button became disabled (greyed out)
  • UI updated dynamically without requiring manual page refresh

Test Evidence:

  • Configuration tested: expunge.delay
  • Initial value: 86400 (default)
  • Modified value: 90000
  • Value after reset: 86400
  • Success notification on update: "Setting Updated: expunge.delay"
  • Success notification on reset: "Setting expunge.delay Reset to default value"
  • Status notification: "Please restart your management server(s) for your new settings to take effect"
  • Reset button state transitions: Disabled → Enabled (after edit) → Disabled (after reset)
Screencast.from.2026-01-27.14-31-33.webm

TC4: Zone-level configuration reset behavior

Objective:
Verify that the reset button behavior works correctly at the Zone scope level.

Test Steps:

  1. Navigated to Infrastructure → Zones
  2. Selected zone: ref-trl-10742-k-Mol9-rositsa-kyuchukova
  3. Clicked on Settings tab
  4. Verified reset button states for configurations

Expected Result:

  • Reset button disabled for configurations where value equals default
  • Reset button enabled for configurations where value differs from default

Actual Result:

  • Configurations with default values show reset button as inactive/greyed out
  • Configurations with modified values show reset button as enabled and can be reset

Test Evidence:

  • Zone tested: ref-trl-10742-k-Mol9-rositsa-kyuchukova
  • Zone ID: f5705cb8-e9dc-4582-aecc-f55bb443198c
  • Reset button behavior confirmed consistent with Global Settings behavior
Screencast.from.2026-01-27.14-35-05.webm

TC5: Cluster-level configuration reset behavior (UPDATED)

Objective:
Verify that the reset button behavior works correctly at the Cluster scope level.

Test Steps:

  1. Navigated to Infrastructure → Clusters → p1-c1
  2. Clicked on Settings tab
  3. Verified reset button states for various configurations

Expected Result:

  • Reset button enabled when value differs from default
  • Reset button disabled when value equals default

Actual Result:

  • Reset button correctly shows enabled/disabled states based on value vs default comparison

Note:
Initial observation of cpu.overprovisioning.factor showing value 2.0 was due to inheritance from global settings, not an explicit cluster-level override. This is expected behavior.

**Status: PASSED **

TC6: Account-level configuration reset behavior

Objective:
Verify that the reset button behavior works correctly at the Account scope level.

Test Steps:

  1. Navigated to Accounts
  2. Selected an account (e.g., admin)
  3. Clicked on Settings tab
  4. Verified reset button states for configurations

Expected Result:

  • Reset button disabled for configurations where value equals default
  • Reset button enabled for configurations where value differs from default

Actual Result:

  • Reset button correctly shows disabled state for default values
  • Reset button correctly shows enabled state for modified values

Test Evidence:

  • Scope tested: Account-level Settings
  • Reset button behavior: Consistent with Global, Zone, and Cluster levels
image

**Status: PASSED **

TC7: Domain-level configuration reset behavior

Objective:
Verify that the reset button behavior works correctly at the Domain scope level.

Test Steps:

  1. Navigated to Domains
  2. Selected ROOT domain
  3. Clicked on Settings tab
  4. Verified reset button states for configurations

Expected Result:

  • Reset button disabled for configurations where value equals default
  • Reset button enabled for configurations where value differs from default

Actual Result:

  • Reset button correctly shows disabled state for default values

Test Evidence:

  • Domain tested: ROOT
  • Configurations observed:
    • "Allow user view all domain accounts" (allow.user.view.all.domain.accounts): toggle OFF, reset button disabled
    • "Allow user view all zones" (allow.user.view.all.zones): toggle ON, reset button disabled
  • Both configurations at default values, reset buttons correctly disabled
image

**Status: PASSED **

@DaanHoogland DaanHoogland merged commit 5aced73 into apache:main Jan 27, 2026
28 checks passed
@DaanHoogland DaanHoogland deleted the ui-resetcfg-disabled-dedaultvalue branch January 27, 2026 15:48
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.

indicate a setting has a default value (and what it is)

4 participants