Fix power operations as per DMTF redfish spec
[Problem Description]:
1) Power Operations page uses "Orderly" and "Immediate" strings
for "Graceful reboot/shutdown" and "Force reboot/shutdown".
These names do not align according to redfish spec and causes
user confusion.
2) For boot settings, if "BootSourceOverrideEnabled" flag is false,
WebUI allows to modify boot options.
[Changes]:
1) Changed reboot/shutdown naming convention as per DMTF redfish spec
to view correct names on WebUI.
2) Added info-tooltip to give detailed information on Reboot/Shutdown
options.
Information is referenced from:
https://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/ResetType
3) Added "oneTimeBootEnabled" condition check to render BootSettings if
condition is true. "oneTimeBootEnabled" checks BootSourceOverrideEnabled
flag, if true then BootSettings will be able to modify boot options.
[Testing]:
1) Load WebUI with the changes and go to Power operations page.
2) Check reboot shutdown names have changes to Graceful
reboot/shutdown" and "Force reboot/shutdown".
3) Check if BootSettings template renders as expected.
Change-Id: I5a86e05ee03167ebb93ffd381af3a47c277990fd
Signed-off-by: Shubhi Garg <shgarg@nvidia.com>
diff --git a/src/views/Operations/ServerPowerOperations/ServerPowerOperations.vue b/src/views/Operations/ServerPowerOperations/ServerPowerOperations.vue
index caa608e..9c36f24 100644
--- a/src/views/Operations/ServerPowerOperations/ServerPowerOperations.vue
+++ b/src/views/Operations/ServerPowerOperations/ServerPowerOperations.vue
@@ -55,7 +55,12 @@
</b-col>
</b-row>
<b-row>
- <b-col v-if="hasBootSourceOptions" sm="8" md="6" xl="4">
+ <b-col
+ v-if="hasBootSourceOptions && oneTimeBootEnabled"
+ sm="8"
+ md="6"
+ xl="4"
+ >
<page-section
:section-title="$t('pageServerPowerOperations.serverBootSettings')"
>
@@ -95,7 +100,10 @@
data-test-id="serverPowerOperations-radio-rebootOrderly"
value="orderly"
>
- {{ $t('pageServerPowerOperations.orderlyReboot') }}
+ {{ $t('pageServerPowerOperations.gracefulRestart') }}
+ <info-tooltip
+ :title="$t('pageServerPowerOperations.gracefulRestartInfo')"
+ />
</b-form-radio>
<b-form-radio
v-model="form.rebootOption"
@@ -103,7 +111,10 @@
data-test-id="serverPowerOperations-radio-rebootImmediate"
value="immediate"
>
- {{ $t('pageServerPowerOperations.immediateReboot') }}
+ {{ $t('pageServerPowerOperations.forceRestart') }}
+ <info-tooltip
+ :title="$t('pageServerPowerOperations.forceRestartInfo')"
+ />
</b-form-radio>
</b-form-group>
<b-button
@@ -125,7 +136,12 @@
data-test-id="serverPowerOperations-radio-shutdownOrderly"
value="orderly"
>
- {{ $t('pageServerPowerOperations.orderlyShutdown') }}
+ {{ $t('pageServerPowerOperations.gracefulShutdown') }}
+ <info-tooltip
+ :title="
+ $t('pageServerPowerOperations.gracefulShutdownInfo')
+ "
+ />
</b-form-radio>
<b-form-radio
v-model="form.shutdownOption"
@@ -133,7 +149,10 @@
data-test-id="serverPowerOperations-radio-shutdownImmediate"
value="immediate"
>
- {{ $t('pageServerPowerOperations.immediateShutdown') }}
+ {{ $t('pageServerPowerOperations.forceOff') }}
+ <info-tooltip
+ :title="$t('pageServerPowerOperations.forceOffInfo')"
+ />
</b-form-radio>
</b-form-group>
<b-button
@@ -158,12 +177,13 @@
import BootSettings from './BootSettings';
import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin';
import Alert from '@/components/Global/Alert';
+import InfoTooltip from '@/components/Global/InfoTooltip';
import { useI18n } from 'vue-i18n';
import i18n from '@/i18n';
export default {
name: 'ServerPowerOperations',
- components: { PageTitle, PageSection, BootSettings, Alert },
+ components: { PageTitle, PageSection, BootSettings, Alert, InfoTooltip },
mixins: [BVToastMixin, LoadingBarMixin],
beforeRouteLeave(to, from, next) {
this.hideLoader();