summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShubhi Garg <shgarg@nvidia.com>2024-09-19 14:38:28 +0300
committershgarg <shgarg@nvidia.com>2024-10-11 22:49:13 +0300
commit918526f20c16a05c261a56814657942a707323dd (patch)
tree6abc3446bd6acbb964318be26cbab6ef99c46f60
parent825059ac475c16d5dcbbdb1af2d33d4f73d30f66 (diff)
downloadwebui-vue-918526f20c16a05c261a56814657942a707323dd.tar.xz
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>
-rw-r--r--src/locales/en-US.json12
-rw-r--r--src/locales/ru-RU.json12
-rw-r--r--src/views/Operations/ServerPowerOperations/ServerPowerOperations.vue32
3 files changed, 42 insertions, 14 deletions
diff --git a/src/locales/en-US.json b/src/locales/en-US.json
index bd8206669..52e04e4f5 100644
--- a/src/locales/en-US.json
+++ b/src/locales/en-US.json
@@ -883,14 +883,18 @@
"currentStatus": "Current status",
"serverBootSettings": "Boot settings",
"serverStatus": "Server status",
- "immediateReboot": "Immediate – Server reboots without operating system shutting down; may cause data corruption",
- "immediateShutdown": "Immediate - Server shuts down without operating system shutting down; may cause data corruption",
"lastPowerOperation": "Last power operation",
"oneTimeBootWarning": "Pending one time boot. Next boot will be performed with the specified one time boot settings. Subsequent boots will be performed with the default settings.",
"operationInProgress": "There are no options to display while a power operation is in progress. When complete, power operations will be displayed here.",
"operations": "Operations",
- "orderlyReboot": "Orderly – operating system shuts down, then server reboots",
- "orderlyShutdown": "Orderly - operating system shuts down, then server shuts down",
+ "forceRestart": "Force Restart",
+ "forceRestartInfo": "Shut down immediately and non-gracefully and restart the unit",
+ "forceOff": "Force Off",
+ "forceOffInfo": "Turn off the unit immediately (non-graceful shutdown)",
+ "gracefulRestart": "Graceful Restart",
+ "gracefulRestartInfo": "Shut down gracefully and restart the unit",
+ "gracefulShutdown": "Graceful Shutdown",
+ "gracefulShutdownInfo": "Shut down gracefully and power off",
"powerOn": "Power on",
"reboot": "Reboot",
"rebootServer": "Reboot server",
diff --git a/src/locales/ru-RU.json b/src/locales/ru-RU.json
index 4a6106de3..8d60a2a34 100644
--- a/src/locales/ru-RU.json
+++ b/src/locales/ru-RU.json
@@ -869,14 +869,18 @@
"currentStatus": "Текущий статус",
"serverBootSettings": "Настройки загрузки",
"serverStatus": "Статус сервера",
- "immediateReboot": "Немедленно – сервер перезапустится без выключения ОС; может вызвать повреждение данных",
- "immediateShutdown": "Немедленно - сервер выключится без выключения ОС; может вызвать повреждение данных",
"lastPowerOperation": "Последняя операция управления питанием сервера",
"oneTimeBootWarning": "Единовременное изменение порядка загрузки сервера. Последующие запуски сервера будут производиться в соответствии с установленным порядком загрузки.",
"operationInProgress": "Выполняется операция управления электропитанием сервера. Изменение настроек будет возможно после её окончания.",
"operations": "Действия",
- "orderlyReboot": "По порядку – ОС выключается, затем сервер перезапускается",
- "orderlyShutdown": "По порядку - ОС выключается, затем сервер выключается",
+ "forceRestart": "Принудительный перезапуск",
+ "forceRestartInfo": "Немедленно и некорректно выключить и перезапустить устройство",
+ "forceOff": "Принудительно выключить",
+ "forceOffInfo": "Немедленно выключить устройство (некорректное завершение работы)",
+ "gracefulRestart": "Милый перезапуск",
+ "gracefulRestartInfo": "Завершите работу корректно и перезапустите устройство",
+ "gracefulShutdown": "Мягкое завершение работы",
+ "gracefulShutdownInfo": "Завершите работу корректно и выключите",
"powerOn": "Включить",
"reboot": "Перезапустить",
"rebootServer": "Перезапустить сервер",
diff --git a/src/views/Operations/ServerPowerOperations/ServerPowerOperations.vue b/src/views/Operations/ServerPowerOperations/ServerPowerOperations.vue
index caa608e8f..9c36f2431 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 BVToastMixin from '@/components/Mixins/BVToastMixin';
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();