Skip to content

Commit 85b2d31

Browse files
committed
Rename host firmware to bios firmware
Problem: - Host firmware naming was inconsistent with actual functionality Changes: - Rename hostFirmware to biosFirmware in store - Update component names and references - Modify i18n translation keys Tested: - Verified store mutations/actions - Confirmed component rendering - Checked i18n translations - npx eslint without error related to 'host' Change-Id: Ib97e4682f649d4a52f65e69df50422d84f23e916 Signed-off-by: Shane Lin <[email protected]>
1 parent 6e53b14 commit 85b2d31

File tree

5 files changed

+26
-26
lines changed

5 files changed

+26
-26
lines changed

src/locales/en-US.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@
332332
"cardTitleRunning": "Running image",
333333
"sectionTitleBmcCards": "BMC",
334334
"sectionTitleBmcCardsCombined": "BMC and server",
335-
"sectionTitleHostCards": "Host",
335+
"sectionTitleBiosCards": "BIOS",
336336
"sectionTitleUpdateFirmware": "Update firmware",
337337
"alert": {
338338
"operationInProgress": "Server power operation in progress.",

src/locales/ru-RU.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@
331331
"cardTitleRunning": "Рабочий образ",
332332
"sectionTitleBmcCards": "BMC",
333333
"sectionTitleBmcCardsCombined": "BMC и сервер",
334-
"sectionTitleHostCards": "Хост",
334+
"sectionTitleBiosCards": "BIOS",
335335
"sectionTitleUpdateFirmware": "Обновить встроенное ПО",
336336
"alert": {
337337
"operationInProgress": "Выполняется операция управления питанием сервера.",

src/store/modules/Operations/FirmwareStore.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,49 +5,49 @@ const FirmwareStore = {
55
namespaced: true,
66
state: {
77
bmcFirmware: [],
8-
hostFirmware: [],
8+
biosFirmware: [],
99
bmcActiveFirmwareId: null,
10-
hostActiveFirmwareId: null,
10+
biosActiveFirmwareId: null,
1111
applyTime: null,
1212
multipartHttpPushUri: null,
1313
httpPushUri: null,
1414
},
1515
getters: {
16-
isSingleFileUploadEnabled: (state) => state.hostFirmware.length === 0,
16+
isSingleFileUploadEnabled: (state) => state.biosFirmware.length === 0,
1717
activeBmcFirmware: (state) => {
1818
return state.bmcFirmware.find(
1919
(firmware) => firmware.id === state.bmcActiveFirmwareId,
2020
);
2121
},
22-
activeHostFirmware: (state) => {
23-
return state.hostFirmware.find(
24-
(firmware) => firmware.id === state.hostActiveFirmwareId,
22+
activeBiosFirmware: (state) => {
23+
return state.biosFirmware.find(
24+
(firmware) => firmware.id === state.biosActiveFirmwareId,
2525
);
2626
},
2727
backupBmcFirmware: (state) => {
2828
return state.bmcFirmware.find(
2929
(firmware) => firmware.id !== state.bmcActiveFirmwareId,
3030
);
3131
},
32-
backupHostFirmware: (state) => {
33-
return state.hostFirmware.find(
34-
(firmware) => firmware.id !== state.hostActiveFirmwareId,
32+
backupBiosFirmware: (state) => {
33+
return state.biosFirmware.find(
34+
(firmware) => firmware.id !== state.biosActiveFirmwareId,
3535
);
3636
},
3737
},
3838
mutations: {
3939
setActiveBmcFirmwareId: (state, id) => (state.bmcActiveFirmwareId = id),
40-
setActiveHostFirmwareId: (state, id) => (state.hostActiveFirmwareId = id),
40+
setActiveBiosFirmwareId: (state, id) => (state.biosActiveFirmwareId = id),
4141
setBmcFirmware: (state, firmware) => (state.bmcFirmware = firmware),
42-
setHostFirmware: (state, firmware) => (state.hostFirmware = firmware),
42+
setBiosFirmware: (state, firmware) => (state.biosFirmware = firmware),
4343
setApplyTime: (state, applyTime) => (state.applyTime = applyTime),
4444
setHttpPushUri: (state, httpPushUri) => (state.httpPushUri = httpPushUri),
4545
setMultipartHttpPushUri: (state, multipartHttpPushUri) =>
4646
(state.multipartHttpPushUri = multipartHttpPushUri),
4747
},
4848
actions: {
4949
async getFirmwareInformation({ dispatch }) {
50-
dispatch('getActiveHostFirmware');
50+
dispatch('getActiveBiosFirmware');
5151
dispatch('getActiveBmcFirmware');
5252
return await dispatch('getFirmwareInventory');
5353
},
@@ -60,12 +60,12 @@ const FirmwareStore = {
6060
})
6161
.catch((error) => console.log(error));
6262
},
63-
async getActiveHostFirmware({ commit }) {
63+
async getActiveBiosFirmware({ commit }) {
6464
return api
6565
.get(`${await this.dispatch('global/getSystemPath')}/Bios`)
6666
.then(({ data: { Links } }) => {
6767
const id = Links?.ActiveSoftwareImage['@odata.id'].split('/').pop();
68-
commit('setActiveHostFirmwareId', id);
68+
commit('setActiveBiosFirmwareId', id);
6969
})
7070
.catch((error) => console.log(error));
7171
},
@@ -80,7 +80,7 @@ const FirmwareStore = {
8080
.all(inventoryList)
8181
.then((response) => {
8282
const bmcFirmware = [];
83-
const hostFirmware = [];
83+
const biosFirmware = [];
8484
response.forEach(({ data }) => {
8585
const firmwareType = data?.RelatedItem?.[0]?.['@odata.id']
8686
.split('/')
@@ -94,11 +94,11 @@ const FirmwareStore = {
9494
if (firmwareType === 'bmc') {
9595
bmcFirmware.push(item);
9696
} else if (firmwareType === 'Bios') {
97-
hostFirmware.push(item);
97+
biosFirmware.push(item);
9898
}
9999
});
100100
commit('setBmcFirmware', bmcFirmware);
101-
commit('setHostFirmware', hostFirmware);
101+
commit('setBiosFirmware', biosFirmware);
102102
})
103103
.catch((error) => {
104104
console.log(error);

src/views/Operations/Firmware/Firmware.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
:is-server-off="isServerOff"
1616
/>
1717

18-
<!-- Host Firmware -->
19-
<host-cards v-if="!isSingleFileUploadEnabled" />
18+
<!-- Bios Firmware -->
19+
<bios-cards v-if="!isSingleFileUploadEnabled" />
2020
</b-col>
2121
</b-row>
2222

@@ -41,7 +41,7 @@
4141
import AlertsServerPower from './FirmwareAlertServerPower';
4242
import BmcCards from './FirmwareCardsBmc';
4343
import FormUpdate from './FirmwareFormUpdate';
44-
import HostCards from './FirmwareCardsHost';
44+
import BiosCards from './FirmwareCardsBios';
4545
import PageSection from '@/components/Global/PageSection';
4646
import PageTitle from '@/components/Global/PageTitle';
4747
@@ -54,7 +54,7 @@ export default {
5454
AlertsServerPower,
5555
BmcCards,
5656
FormUpdate,
57-
HostCards,
57+
BiosCards,
5858
PageSection,
5959
PageTitle,
6060
},

src/views/Operations/Firmware/FirmwareCardsHost.vue renamed to src/views/Operations/Firmware/FirmwareCardsBios.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<page-section :section-title="$t('pageFirmware.sectionTitleHostCards')">
2+
<page-section :section-title="$t('pageFirmware.sectionTitleBiosCards')">
33
<b-card-group deck>
44
<!-- Running image -->
55
<b-card>
@@ -49,10 +49,10 @@ export default {
4949
},
5050
computed: {
5151
running() {
52-
return this.$store.getters['firmware/activeHostFirmware'];
52+
return this.$store.getters['firmware/activeBiosFirmware'];
5353
},
5454
backup() {
55-
return this.$store.getters['firmware/backupHostFirmware'];
55+
return this.$store.getters['firmware/backupBiosFirmware'];
5656
},
5757
runningVersion() {
5858
return this.running?.version || '--';

0 commit comments

Comments
 (0)