summaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
authorMichalX Szopinski <michalx.szopinski@intel.com>2021-07-12 13:59:30 +0300
committerMaciej Magdziarz <maciejx.magdziarz@intel.com>2021-12-28 11:48:11 +0300
commitf4328edf86b284fe8836717251ce6696670dbdd5 (patch)
treea0b2688dd0defa4a079d027febbd3b08f5c5d230 /src/views
parent00cb42b615602bb6563ff02f91158eb2e3b603fc (diff)
downloadwebui-vue-f4328edf86b284fe8836717251ce6696670dbdd5.tar.xz
Remove hardcoded chassis in Manage power usage
Simmilar modification to https://gerrit.openbmc-project.xyz/c/openbmc/webui-vue/+/42988 which removes the hardcoded chassis name from url on Manage power usage tab. With this modification we are displaying only informations about first power device. This change also fixes the overwriting existing power cap value on load. Signed-off-by: MichalX Szopinski <michalx.szopinski@intel.com> Change-Id: Ia164db9f2c50d98bc767c0f4729e9572a2d01da1
Diffstat (limited to 'src/views')
-rw-r--r--src/views/ResourceManagement/Power.vue9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/views/ResourceManagement/Power.vue b/src/views/ResourceManagement/Power.vue
index 8e4acdd3..cc0cc993 100644
--- a/src/views/ResourceManagement/Power.vue
+++ b/src/views/ResourceManagement/Power.vue
@@ -118,8 +118,15 @@ export default {
return this.powerCapValue !== null;
},
set(value) {
- let newValue = value ? '' : null;
this.$v.$reset();
+ let newValue = null;
+ if (value) {
+ if (this.powerCapValue) {
+ newValue = this.powerCapValue;
+ } else {
+ newValue = '';
+ }
+ }
this.$store.dispatch('powerControl/setPowerCapUpdatedValue', newValue);
},
},