Skip to content

Commit 0c4673b

Browse files
Merge branch 'ibm-openbmc:1050' into ledchanges
2 parents d02f180 + 47c46eb commit 0c4673b

File tree

23 files changed

+290
-108
lines changed

23 files changed

+290
-108
lines changed

src/locales/en-US.json

+22-10
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,10 @@
351351
"errorDeleteCertificate": "Error deleting certificate.",
352352
"errorReplaceCertificate": "Error replacing certificate.",
353353
"successAddCertificate": "Successfully added %{certificate}.",
354+
"successAddedHTTPCertificate": "Successfully added %{certificate}. Reload the browser page to see the changes.",
354355
"successDeleteCertificate": "Successfully deleted %{certificate}.",
355-
"successReplaceCertificate": "Successfully replaced %{certificate}."
356+
"successReplaceCertificate": "Successfully replaced %{certificate}.",
357+
"successReplacedHTTPCertificate": "Successfully replaced %{certificate}. Reload the browser page to see the changes."
356358
}
357359
},
358360
"pageChangePassword": {
@@ -391,7 +393,8 @@
391393
},
392394
"toast": {
393395
"errorSaveDateTime": "Error saving date and time settings.",
394-
"successSaveDateTime": "Successfully saved date and time settings."
396+
"successSaveDateTime": "Successfully saved date and time settings.",
397+
"successSaveDateTimeForNtpServer": "Successfully saved date and time settings. It would take about 20 seconds to update date and time."
395398
}
396399
},
397400
"pageConcurrentMaintenance": {
@@ -862,15 +865,15 @@
862865
"toast": {
863866
"errorDisableIdentifyLed": "Error disabling Identify LED.",
864867
"errorDisableLampTest": "Error disabling Lamp test.",
865-
"errorDisableSystemAttentionLed": "Error disabling System Attention LED.",
868+
"errorDisableSystemAttentionLed": "Error disabling System attention LED.",
866869
"errorEnableIdentifyLed": "Error enabling Identify LED.",
867870
"errorEnableLampTest": "Error enabling Lamp test.",
868-
"errorEnableSystemAttentionLed": "Error enabling System Attention LED.",
869871
"errorEnclosureSettings": "Error updating enclosure settings.",
870872
"infoRemoveAssembly": "Refresh to confirm whether '%{assemblyName}' is ready to be removed.",
871873
"successEnclosureSettings": "Successfully updated enclosure settings.",
872874
"successEnableIdentifyLed": "Successfully enabled Identify LED.",
873875
"successDisableIdentifyLed": "Successfully disabled Identify LED.",
876+
"successDisableSystemAttentionLed": "Successfully disabled System attention LED.",
874877
"successEnableLampTest": "Successfully enabled Lamp test. The LEDs will stay on for 4 minutes."
875878
}
876879
},
@@ -948,20 +951,23 @@
948951
"toast": {
949952
"errorSavingAggressivePrefetch": "Error saving aggressive prefetch",
950953
"errorSavingFrequencyCap": "Error saving frequency cap",
951-
"errorSavingImmediateTestRequested": "Error saving immediate test request",
952954
"errorSavingGardOnError": "Error saving Gard on error",
953955
"errorSavingLateralCastOut": "Error saving lateral cast out mode",
954956
"errorSavingRpdPolicy": "Error saving RPD policy",
955957
"errorSavingRpdFeature": "Error saving RPD feature",
956958
"errorSavingRpdRun": "Error saving RPD scheduled run",
957-
"successSavingRpdRun": "RPD scheduled run saved successfully",
959+
"errorStartingDiagnosticTestRun": "Error starting diagnostic test run",
960+
"errorStoppingDiagnosticTestRun": "Error stopping diagnostic test run",
961+
"successSavingRpdRun": "RPD scheduled run saved successfully. NOTE: System must be powered on at RPD scheduled run time of day, else the diagnostic test run will take effect on the next available schedule.",
958962
"successSavingAggressivePrefetch": "Aggressive prefetch saved successfully",
959963
"successSavingFrequencyCap": "Frequency cap saved successfully",
960-
"successSavingImmediateTestRequested": "Immediate test request saved successfully",
961964
"successSavingGardOnError": "Gard on error saved successfully",
962965
"successSavingLateralCastOut": "Lateral cast out mode saved successfully",
963966
"successSavingRpdPolicy": "RPD policy saved successfully",
964-
"successSavingRpdFeature": "RPD feature saved successfully. Changes made will take effect on next reboot."
967+
"successSavingRpdFeature": "RPD feature saved successfully. Changes made will take effect on next reboot.",
968+
"successStartingDiagnosticTestRun": "Diagnostic test run started successfully",
969+
"successStartingDiagnosticTestRunIfPoweredOff": "Diagnostic test run saved successfully, Tests will start once the system is powered on.",
970+
"successStoppingDiagnosticTestRun": "Diagnostic test run stopped successfully"
965971
}
966972
},
967973
"pageLdap": {
@@ -1234,11 +1240,15 @@
12341240
}
12351241
},
12361242
"toast": {
1243+
"errorDisableIdentifyLed": "Error disabling Identify LED.",
1244+
"errorEnableIdentifyLed": "Error enabling Identify LED.",
12371245
"errorReset": "Error resetting link %{id}",
12381246
"errorSavePcieTopology": "Error saving PCIe topology Info.",
12391247
"errorSwitchingLed": "Error turning %{operation} LED for %{value}",
12401248
"resetInfoTitle": "Link ID %{id} being reset.",
12411249
"resetInfoDescription": "this operation may take a few seconds to complete.",
1250+
"successDisableIdentifyLed": "Successfully disabled Identify LED.",
1251+
"successEnableIdentifyLed": "Successfully enabled Identify LED.",
12421252
"successReset": "Reset link %{id} successfully initiated. Check event logs for any issues.",
12431253
"successSavePcieTopology": "Successfully saved PCIe topology Info."
12441254
}
@@ -1264,10 +1274,12 @@
12641274
"toast": {
12651275
"errorNetworkPolicyUpdate": "Error updating %{policy}.",
12661276
"successDisableBmcShell": "Successfully disabled BMC shell (via SSH), Please allow 15 seconds for the disable to become effective.",
1267-
"successEnableBmcShell": "Successfully enabled BMC shell (via SSH)",
1277+
"successEnableBmcShell": "Successfully enabled BMC shell (via SSH).",
12681278
"successNetworkPolicyUpdate": "Successfully updated %{policy}.",
1279+
"successIpmiNetworkPolicyUpdate": "Successfully updated %{policy}. The BMC normally takes about 30 seconds to change the state.",
12691280
"successNextBootToast": "Applying changes to %{policy}. Changes made to %{policy} will take effect on next reboot."
12701281
},
1282+
"acfUploadEnablementConfirmText": "Caution: Enabling this setting allows unauthenticated users to upload Access Control Files (ACFs) without logging in and without pressing Function 74 on the Operator Panel. Do you want to proceed?",
12711283
"vtpm": "VirtualTPM",
12721284
"vtpmDescription": "Enabling vTPM makes a TPM available to the guest operating system."
12731285
},
@@ -1592,7 +1604,7 @@
15921604
},
15931605
"alert": {
15941606
"heading": "Warning",
1595-
"message": "If the HMC is active, it will attempt to reconnect. To disconnect a working HMC, disconnect from the HMC itself."
1607+
"message": "For users with an HMC attached, if you try to disconnect it from this page and the HMC is active, it will attempt to reconnect. The proper way to disconnect a working HMC is to disconnect it from the HMC itself."
15961608
},
15971609
"modal": {
15981610
"disconnectMessage": "Are you sure you want to disconnect %{count} session? This action cannot be undone. | Are you sure you want to disconnect %{count} sessions? This action cannot be undone.",

src/store/modules/HardwareStatus/PcieSlotsStore.js

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ const PcieSlotsStore = {
4747
return await api
4848
.patch(`${led.uri}/PCIeSlots`, updatedIdentifyLedValue)
4949
.then(() => {
50-
dispatch('getPcieSlotsInfo', { uri: led.uri });
5150
if (led.identifyLed) {
5251
return i18n.t('pageInventory.toast.successEnableIdentifyLed');
5352
} else {

src/store/modules/HardwareStatus/PcieTopologyStore.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1018,13 +1018,13 @@ const PcieTopologyStore = {
10181018
};
10191019
await api.patch(uri, updatedIdentifyLedValue).catch((error) => {
10201020
console.log('error', error);
1021-
if (!requestBody.locationIndicatorActive) {
1021+
if (requestBody.value.led) {
10221022
throw new Error(
1023-
i18n.t('pageInventory.toast.errorEnableIdentifyLed')
1023+
i18n.t('pagePcieTopology.toast.errorEnableIdentifyLed')
10241024
);
10251025
} else {
10261026
throw new Error(
1027-
i18n.t('pageInventory.toast.errorDisableIdentifyLed')
1027+
i18n.t('pagePcieTopology.toast.errorDisableIdentifyLed')
10281028
);
10291029
}
10301030
});

src/store/modules/HardwareStatus/SystemStore.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ const SystemStore = {
108108
},
109109
})
110110
.then(() => {
111-
if (ledState) {
112-
return i18n.t('pageInventory.toast.successEnableIdentifyLed');
113-
} else {
114-
return i18n.t('pageInventory.toast.successDisableIdentifyLed');
111+
if (!ledState) {
112+
return i18n.t(
113+
'pageInventory.toast.successDisableSystemAttentionLed'
114+
);
115115
}
116116
})
117117
.catch((error) => {

src/store/modules/ResourceManagement/SystemParametersStore.js

+19-8
Original file line numberDiff line numberDiff line change
@@ -312,22 +312,33 @@ const systemParametersStore = {
312312
updatedImmediateTestRequestedValue
313313
)
314314
.then(() => {
315-
return i18n.t(
316-
'pageSystemParameters.toast.successSavingImmediateTestRequested'
317-
);
315+
if (value === 'Enabled') {
316+
return i18n.t(
317+
'pageSystemParameters.toast.successStartingDiagnosticTestRun'
318+
);
319+
} else {
320+
return i18n.t(
321+
'pageSystemParameters.toast.successStoppingDiagnosticTestRun'
322+
);
323+
}
318324
})
319325
.catch((error) => {
320326
console.log(error);
321327
if (value === 'Enabled') {
322328
commit('setImmediateTestRequested', false);
329+
throw new Error(
330+
i18n.t(
331+
'pageSystemParameters.toast.errorStartingDiagnosticTestRun'
332+
)
333+
);
323334
} else {
324335
commit('setImmediateTestRequested', true);
336+
throw new Error(
337+
i18n.t(
338+
'pageSystemParameters.toast.errorStoppingDiagnosticTestRun'
339+
)
340+
);
325341
}
326-
throw new Error(
327-
i18n.t(
328-
'pageSystemParameters.toast.errorSavingImmediateTestRequested'
329-
)
330-
);
331342
});
332343
},
333344
async saveGardOnError({ commit }, updatedImmediateTestRequested) {

src/store/modules/SecurityAndAccess/CertificatesStore.js

+32-12
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ const CertificatesStore = {
158158
Oem: {
159159
IBM: {
160160
ACF: {
161-
ACFFile: base64File.split('base64,')[1].slice(0, -1),
161+
ACFFile: base64File.split('base64,')[1],
162162
},
163163
},
164164
},
@@ -187,7 +187,7 @@ const CertificatesStore = {
187187
Oem: {
188188
IBM: {
189189
ACF: {
190-
ACFFile: base64File.split('base64,')[1].slice(0, -1),
190+
ACFFile: base64File.split('base64,')[1],
191191
},
192192
},
193193
},
@@ -207,16 +207,26 @@ const CertificatesStore = {
207207
});
208208
},
209209
async addNewCertificate({ dispatch }, { file, type }) {
210+
const typeOfCertificate = getCertificateProp(type, 'label');
210211
return await api
211212
.post(getCertificateProp(type, 'location'), file, {
212213
headers: { 'Content-Type': 'application/x-pem-file' },
213214
})
214215
.then(() => dispatch('getCertificates'))
215-
.then(() =>
216-
i18n.t('pageCertificates.toast.successAddCertificate', {
217-
certificate: getCertificateProp(type, 'label'),
218-
})
219-
)
216+
.then(() => {
217+
if (typeOfCertificate === 'HTTPS Certificate') {
218+
return i18n.t(
219+
'pageCertificates.toast.successAddedHTTPCertificate',
220+
{
221+
certificate: getCertificateProp(type, 'label'),
222+
}
223+
);
224+
} else {
225+
return i18n.t('pageCertificates.toast.successAddCertificate', {
226+
certificate: getCertificateProp(type, 'label'),
227+
});
228+
}
229+
})
220230
.catch((error) => {
221231
console.log(error);
222232
throw new Error(i18n.t('pageCertificates.toast.errorAddCertificate'));
@@ -228,7 +238,7 @@ const CertificatesStore = {
228238
Oem: {
229239
IBM: {
230240
ACF: {
231-
ACFFile: base64File.split('base64,')[1].slice(0, -1),
241+
ACFFile: base64File.split('base64,')[1],
232242
},
233243
},
234244
},
@@ -261,6 +271,7 @@ const CertificatesStore = {
261271
data.CertificateString = certificateString;
262272
data.CertificateType = 'PEM';
263273
data.CertificateUri = { '@odata.id': location };
274+
const typeOfCertificate = getCertificateProp(type, 'label');
264275
return await api
265276
.post(
266277
'/redfish/v1/CertificateService/Actions/CertificateService.ReplaceCertificate',
@@ -271,9 +282,18 @@ const CertificatesStore = {
271282
dispatch('getCertificates');
272283
})
273284
.then(() => {
274-
return i18n.t('pageCertificates.toast.successReplaceCertificate', {
275-
certificate: getCertificateProp(type, 'label'),
276-
});
285+
if (typeOfCertificate === 'HTTPS Certificate') {
286+
return i18n.t(
287+
'pageCertificates.toast.successReplacedHTTPCertificate',
288+
{
289+
certificate: getCertificateProp(type, 'label'),
290+
}
291+
);
292+
} else {
293+
return i18n.t('pageCertificates.toast.successReplaceCertificate', {
294+
certificate: getCertificateProp(type, 'label'),
295+
});
296+
}
277297
})
278298
.catch((error) => {
279299
console.log(error);
@@ -287,7 +307,7 @@ const CertificatesStore = {
287307
Oem: {
288308
IBM: {
289309
ACF: {
290-
ACFFile: null,
310+
ACFFile: '',
291311
},
292312
},
293313
},

src/store/modules/SecurityAndAccess/PoliciesStore.js

+11-2
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,12 @@ const PoliciesStore = {
189189
);
190190
});
191191
},
192-
async saveIpmiProtocolState({ commit }, protocolEnabled) {
192+
async getNetworkProtocolStatusAfterDelay({ dispatch }) {
193+
setTimeout(() => {
194+
dispatch('getNetworkProtocolStatus');
195+
}, 30000);
196+
},
197+
async saveIpmiProtocolState({ commit, dispatch }, protocolEnabled) {
193198
commit('setIpmiProtocolEnabled', protocolEnabled);
194199
const ipmi = {
195200
IPMI: {
@@ -199,7 +204,11 @@ const PoliciesStore = {
199204
return await api
200205
.patch('/redfish/v1/Managers/bmc/NetworkProtocol', ipmi)
201206
.then(() => {
202-
return i18n.t('pagePolicies.toast.successNetworkPolicyUpdate', {
207+
// Getting protocol data here so that the Ipmi gets enabled/disabled
208+
dispatch('getNetworkProtocolStatusAfterDelay');
209+
})
210+
.then(() => {
211+
return i18n.t('pagePolicies.toast.successIpmiNetworkPolicyUpdate', {
203212
policy: i18n.t('pagePolicies.ipmi'),
204213
});
205214
})

src/store/modules/SecurityAndAccess/SessionsStore.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const SessionsStore = {
3232
? sessionUri.data?.ClientOriginIPAddress.slice(7)
3333
: sessionUri.data?.ClientOriginIPAddress;
3434
return {
35-
clientID: sessionUri.data?.Oem?.OpenBMC.ClientID,
35+
clientID: sessionUri.data?.Context,
3636
username: sessionUri.data?.UserName,
3737
ipAddress: filteredIPAddress,
3838
uri: sessionUri.data['@odata.id'],

src/store/modules/SecurityAndAccess/UserManagementStore.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ const UserManagementStore = {
160160
const data = {};
161161
if (username) data.UserName = username;
162162
if (password) data.Password = password;
163-
if (privilege) data.RoleId = privilege;
163+
if (privilege && privilege !== 'ReadOnly') data.RoleId = privilege;
164164
if (status !== undefined) data.Enabled = status;
165165
if (locked !== undefined) data.Locked = locked;
166166
return await api
@@ -172,11 +172,7 @@ const UserManagementStore = {
172172
})
173173
)
174174
.catch((error) => {
175-
console.log(error);
176-
177-
const messageId =
178-
error.response.data['[email protected]'][0].MessageId;
179-
175+
const messageId = error?.response?.data?.error?.code;
180176
const message =
181177
messageId === 'Base.1.8.1.PropertyValueFormatError'
182178
? i18n.t(

src/store/modules/Settings/DateTimeStore.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ const DateTimeStore = {
6868
}
6969
})
7070
.then(() => {
71-
return i18n.t('pageDateTime.toast.successSaveDateTime');
71+
if (dateTimeForm.ntpProtocolEnabled) {
72+
return i18n.t('pageDateTime.toast.successSaveDateTimeForNtpServer');
73+
} else {
74+
return i18n.t('pageDateTime.toast.successSaveDateTime');
75+
}
7276
})
7377
.catch((error) => {
7478
console.log(error);

0 commit comments

Comments
 (0)