summaryrefslogtreecommitdiff
path: root/src/env
diff options
context:
space:
mode:
Diffstat (limited to 'src/env')
-rw-r--r--src/env/components/AppNavigation/ibm.js56
-rw-r--r--src/env/components/FirmwareSingleImage/FirmwareSingleImage.vue50
-rw-r--r--src/env/components/FirmwareSingleImage/FirmwareSingleImageModalRebootBackup.vue8
-rw-r--r--src/env/router/ibm.js98
-rw-r--r--src/env/store/FirmwareSingleImage/FirmwareSingleImageStore.js58
5 files changed, 135 insertions, 135 deletions
diff --git a/src/env/components/AppNavigation/ibm.js b/src/env/components/AppNavigation/ibm.js
index 1f25230a..a9870d3b 100644
--- a/src/env/components/AppNavigation/ibm.js
+++ b/src/env/components/AppNavigation/ibm.js
@@ -12,7 +12,7 @@ const AppNavigationMixin = {
iconControl: IconSettingsAdjust,
iconConfiguration: IconSettings,
iconAccessControl: IconPassword,
- iconExpand: IconChevronUp
+ iconExpand: IconChevronUp,
},
data() {
return {
@@ -21,7 +21,7 @@ const AppNavigationMixin = {
id: 'overview',
label: this.$t('appNavigation.overview'),
route: '/',
- icon: 'iconOverview'
+ icon: 'iconOverview',
},
{
id: 'health',
@@ -31,19 +31,19 @@ const AppNavigationMixin = {
{
id: 'event-logs',
label: this.$t('appNavigation.eventLogs'),
- route: '/health/event-logs'
+ route: '/health/event-logs',
},
{
id: 'hardware-status',
label: this.$t('appNavigation.hardwareStatus'),
- route: '/health/hardware-status'
+ route: '/health/hardware-status',
},
{
id: 'sensors',
label: this.$t('appNavigation.sensors'),
- route: '/health/sensors'
- }
- ]
+ route: '/health/sensors',
+ },
+ ],
},
{
id: 'control',
@@ -53,29 +53,29 @@ const AppNavigationMixin = {
{
id: 'manage-power-usage',
label: this.$t('appNavigation.managePowerUsage'),
- route: '/control/manage-power-usage'
+ route: '/control/manage-power-usage',
},
{
id: 'reboot-bmc',
label: this.$t('appNavigation.rebootBmc'),
- route: '/control/reboot-bmc'
+ route: '/control/reboot-bmc',
},
{
id: 'serial-over-lan',
label: this.$t('appNavigation.serialOverLan'),
- route: '/control/serial-over-lan'
+ route: '/control/serial-over-lan',
},
{
id: 'server-led',
label: this.$t('appNavigation.serverLed'),
- route: '/control/server-led'
+ route: '/control/server-led',
},
{
id: 'server-power-operations',
label: this.$t('appNavigation.serverPowerOperations'),
- route: '/control/server-power-operations'
- }
- ]
+ route: '/control/server-power-operations',
+ },
+ ],
},
{
id: 'configuration',
@@ -85,24 +85,24 @@ const AppNavigationMixin = {
{
id: 'date-time-settings',
label: this.$t('appNavigation.dateTimeSettings'),
- route: '/configuration/date-time-settings'
+ route: '/configuration/date-time-settings',
},
{
id: 'firmware',
label: this.$t('appNavigation.firmware'),
- route: '/configuration/firmware'
+ route: '/configuration/firmware',
},
{
id: 'network-settings',
label: this.$t('appNavigation.networkSettings'),
- route: '/configuration/network-settings'
+ route: '/configuration/network-settings',
},
{
id: 'snmp-settings',
label: this.$t('appNavigation.snmpSettings'),
- route: ''
- }
- ]
+ route: '',
+ },
+ ],
},
{
id: 'access-control',
@@ -112,23 +112,23 @@ const AppNavigationMixin = {
{
id: 'ldap',
label: this.$t('appNavigation.ldap'),
- route: '/access-control/ldap'
+ route: '/access-control/ldap',
},
{
id: 'local-user-management',
label: this.$t('appNavigation.localUserManagement'),
- route: '/access-control/local-user-management'
+ route: '/access-control/local-user-management',
},
{
id: 'ssl-certificates',
label: this.$t('appNavigation.sslCertificates'),
- route: '/access-control/ssl-certificates'
- }
- ]
- }
- ]
+ route: '/access-control/ssl-certificates',
+ },
+ ],
+ },
+ ],
};
- }
+ },
};
export default AppNavigationMixin;
diff --git a/src/env/components/FirmwareSingleImage/FirmwareSingleImage.vue b/src/env/components/FirmwareSingleImage/FirmwareSingleImage.vue
index 3ad717e5..03f5af4c 100644
--- a/src/env/components/FirmwareSingleImage/FirmwareSingleImage.vue
+++ b/src/env/components/FirmwareSingleImage/FirmwareSingleImage.vue
@@ -13,7 +13,7 @@
{{ $t('pageFirmware.alert.serverShutdownRequiredBeforeUpdate') }}
</p>
{{ $t('pageFirmware.alert.serverShutdownRequiredInfo') }}
- <template v-slot:action>
+ <template #action>
<b-btn variant="link" class="text-nowrap" @click="onClickShutDown">
{{ $t('pageFirmware.alert.shutDownServer') }}
</b-btn>
@@ -26,7 +26,7 @@
<b-card-group deck>
<!-- Current FW -->
<b-card header-bg-variant="success">
- <template v-slot:header>
+ <template #header>
<dl class="mb-0">
<dt>{{ $t('pageFirmware.current') }}</dt>
<dd class="mb-0">{{ systemFirmwareVersion }}</dd>
@@ -58,7 +58,7 @@
<!-- Backup FW -->
<b-card>
- <template v-slot:header>
+ <template #header>
<dl class="mb-0">
<dt>{{ $t('pageFirmware.backup') }}</dt>
<dd class="mb-0">{{ backupFirmwareVersion }}</dd>
@@ -226,7 +226,7 @@ export default {
ModalRebootBackup,
ModalUpload,
PageSection,
- PageTitle
+ PageTitle,
},
mixins: [BVToastMixin, LoadingBarMixin, VuelidateMixin],
data() {
@@ -235,7 +235,7 @@ export default {
file: null,
tftpIpAddress: null,
tftpFileName: null,
- timeoutId: null
+ timeoutId: null,
};
},
computed: {
@@ -252,26 +252,26 @@ export default {
'backupFirmwareStatus',
'backupFirmwareVersion',
'isRebootFromBackupAvailable',
- 'systemFirmwareVersion'
+ 'systemFirmwareVersion',
]),
isPageDisabled() {
return !this.isHostOff || this.loading || this.isOperationInProgress;
- }
+ },
},
watch: {
- isWorkstationSelected: function() {
+ isWorkstationSelected: function () {
this.$v.$reset();
this.file = null;
this.tftpIpAddress = null;
this.tftpFileName = null;
- }
+ },
},
created() {
this.startLoader();
this.$store.dispatch('firmwareSingleImage/getUpdateServiceApplyTime');
Promise.all([
this.$store.dispatch('global/getHostStatus'),
- this.$store.dispatch('firmwareSingleImage/getFirmwareInformation')
+ this.$store.dispatch('firmwareSingleImage/getFirmwareInformation'),
]).finally(() => this.endLoader());
},
beforeRouteLeave(to, from, next) {
@@ -282,20 +282,20 @@ export default {
validations() {
return {
file: {
- required: requiredIf(function() {
+ required: requiredIf(function () {
return this.isWorkstationSelected;
- })
+ }),
},
tftpIpAddress: {
- required: requiredIf(function() {
+ required: requiredIf(function () {
return !this.isWorkstationSelected;
- })
+ }),
},
tftpFileName: {
- required: requiredIf(function() {
+ required: requiredIf(function () {
return !this.isWorkstationSelected;
- })
- }
+ }),
+ },
};
},
methods: {
@@ -315,7 +315,7 @@ export default {
dispatchWorkstationUpload() {
this.$store
.dispatch('firmwareSingleImage/uploadFirmware', this.file)
- .then(success =>
+ .then((success) =>
this.infoToast(
success,
this.$t('pageFirmware.toast.successUploadTitle')
@@ -329,11 +329,11 @@ export default {
dispatchTftpUpload() {
const data = {
address: this.tftpIpAddress,
- filename: this.tftpFileName
+ filename: this.tftpFileName,
};
this.$store
.dispatch('firmwareSingleImage/uploadFirmwareTFTP', data)
- .then(success =>
+ .then((success) =>
this.infoToast(
success,
this.$t('pageFirmware.toast.successUploadTitle')
@@ -348,7 +348,7 @@ export default {
this.setRebootTimeout();
this.$store
.dispatch('firmwareSingleImage/switchFirmwareAndReboot')
- .then(success =>
+ .then((success) =>
this.infoToast(success, this.$t('global.status.success'))
)
.catch(({ message }) => {
@@ -384,14 +384,14 @@ export default {
.msgBoxConfirm(this.$t('pageFirmware.modal.serverShutdownMessage'), {
title: this.$t('pageFirmware.modal.serverShutdownWillCauseOutage'),
okTitle: this.$t('pageFirmware.modal.shutDownServer'),
- okVariant: 'danger'
+ okVariant: 'danger',
})
- .then(shutdownConfirmed => {
+ .then((shutdownConfirmed) => {
if (shutdownConfirmed)
this.$store.dispatch('controls/hostSoftPowerOff');
});
- }
- }
+ },
+ },
};
</script>
diff --git a/src/env/components/FirmwareSingleImage/FirmwareSingleImageModalRebootBackup.vue b/src/env/components/FirmwareSingleImage/FirmwareSingleImageModalRebootBackup.vue
index a8fb3ad5..5b700f2c 100644
--- a/src/env/components/FirmwareSingleImage/FirmwareSingleImageModalRebootBackup.vue
+++ b/src/env/components/FirmwareSingleImage/FirmwareSingleImageModalRebootBackup.vue
@@ -22,12 +22,12 @@ export default {
props: {
current: {
type: String,
- required: true
+ required: true,
},
backup: {
type: String,
- required: true
- }
- }
+ required: true,
+ },
+ },
};
</script>
diff --git a/src/env/router/ibm.js b/src/env/router/ibm.js
index 5b69475d..a6473720 100644
--- a/src/env/router/ibm.js
+++ b/src/env/router/ibm.js
@@ -35,8 +35,8 @@ const routes = [
name: 'login',
component: Login,
meta: {
- title: i18n.t('appPageTitle.login')
- }
+ title: i18n.t('appPageTitle.login'),
+ },
},
{
path: '/change-password',
@@ -44,16 +44,16 @@ const routes = [
component: ChangePassword,
meta: {
title: i18n.t('appPageTitle.changePassword'),
- requiresAuth: true
- }
- }
- ]
+ requiresAuth: true,
+ },
+ },
+ ],
},
{
path: '/console',
component: ConsoleLayout,
meta: {
- requiresAuth: true
+ requiresAuth: true,
},
children: [
{
@@ -61,15 +61,15 @@ const routes = [
name: 'serial-over-lan-console',
component: SerialOverLanConsole,
meta: {
- title: i18n.t('appPageTitle.serialOverLan')
- }
- }
- ]
+ title: i18n.t('appPageTitle.serialOverLan'),
+ },
+ },
+ ],
},
{
path: '/',
meta: {
- requiresAuth: true
+ requiresAuth: true,
},
component: AppLayout,
children: [
@@ -78,139 +78,139 @@ const routes = [
name: 'overview',
component: Overview,
meta: {
- title: i18n.t('appPageTitle.overview')
- }
+ title: i18n.t('appPageTitle.overview'),
+ },
},
{
path: '/profile-settings',
name: 'profile-settings',
component: ProfileSettings,
meta: {
- title: i18n.t('appPageTitle.profileSettings')
- }
+ title: i18n.t('appPageTitle.profileSettings'),
+ },
},
{
path: '/health/event-logs',
name: 'event-logs',
component: EventLogs,
meta: {
- title: i18n.t('appPageTitle.eventLogs')
- }
+ title: i18n.t('appPageTitle.eventLogs'),
+ },
},
{
path: '/health/hardware-status',
name: 'hardware-status',
component: HardwareStatus,
meta: {
- title: i18n.t('appPageTitle.hardwareStatus')
- }
+ title: i18n.t('appPageTitle.hardwareStatus'),
+ },
},
{
path: '/health/sensors',
name: 'sensors',
component: Sensors,
meta: {
- title: i18n.t('appPageTitle.sensors')
- }
+ title: i18n.t('appPageTitle.sensors'),
+ },
},
{
path: '/access-control/ldap',
name: 'ldap',
component: Ldap,
meta: {
- title: i18n.t('appPageTitle.ldap')
- }
+ title: i18n.t('appPageTitle.ldap'),
+ },
},
{
path: '/access-control/local-user-management',
name: 'local-users',
component: LocalUserManagement,
meta: {
- title: i18n.t('appPageTitle.localUserManagement')
- }
+ title: i18n.t('appPageTitle.localUserManagement'),
+ },
},
{
path: '/access-control/ssl-certificates',
name: 'ssl-certificates',
component: SslCertificates,
meta: {
- title: i18n.t('appPageTitle.sslCertificates')
- }
+ title: i18n.t('appPageTitle.sslCertificates'),
+ },
},
{
path: '/configuration/date-time-settings',
name: 'date-time-settings',
component: DateTimeSettings,
meta: {
- title: i18n.t('appPageTitle.dateTimeSettings')
- }
+ title: i18n.t('appPageTitle.dateTimeSettings'),
+ },
},
{
path: '/configuration/firmware',
name: 'firmware',
component: FirmwareSingleImage,
meta: {
- title: i18n.t('appPageTitle.firmware')
- }
+ title: i18n.t('appPageTitle.firmware'),
+ },
},
{
path: '/control/manage-power-usage',
name: 'manage-power-usage',
component: ManagePowerUsage,
meta: {
- title: i18n.t('appPageTitle.managePowerUsage')
- }
+ title: i18n.t('appPageTitle.managePowerUsage'),
+ },
},
{
path: '/configuration/network-settings',
name: 'network-settings',
component: NetworkSettings,
meta: {
- title: i18n.t('appPageTitle.networkSettings')
- }
+ title: i18n.t('appPageTitle.networkSettings'),
+ },
},
{
path: '/control/reboot-bmc',
name: 'reboot-bmc',
component: RebootBmc,
meta: {
- title: i18n.t('appPageTitle.rebootBmc')
- }
+ title: i18n.t('appPageTitle.rebootBmc'),
+ },
},
{
path: '/control/server-led',
name: 'server-led',
component: ServerLed,
meta: {
- title: i18n.t('appPageTitle.serverLed')
- }
+ title: i18n.t('appPageTitle.serverLed'),
+ },
},
{
path: '/control/serial-over-lan',
name: 'serial-over-lan',
component: SerialOverLan,
meta: {
- title: i18n.t('appPageTitle.serialOverLan')
- }
+ title: i18n.t('appPageTitle.serialOverLan'),
+ },
},
{
path: '/control/server-power-operations',
name: 'server-power-operations',
component: ServerPowerOperations,
meta: {
- title: i18n.t('appPageTitle.serverPowerOperations')
- }
+ title: i18n.t('appPageTitle.serverPowerOperations'),
+ },
},
{
path: '*',
name: 'page-not-found',
component: PageNotFound,
meta: {
- title: i18n.t('appPageTitle.pageNotFound')
- }
- }
- ]
- }
+ title: i18n.t('appPageTitle.pageNotFound'),
+ },
+ },
+ ],
+ },
];
export default routes;
diff --git a/src/env/store/FirmwareSingleImage/FirmwareSingleImageStore.js b/src/env/store/FirmwareSingleImage/FirmwareSingleImageStore.js
index 98f86fd5..ffc4bc4b 100644
--- a/src/env/store/FirmwareSingleImage/FirmwareSingleImageStore.js
+++ b/src/env/store/FirmwareSingleImage/FirmwareSingleImageStore.js
@@ -7,23 +7,23 @@ const FirmwareSingleImageStore = {
activeFirmware: {
version: '--',
id: null,
- location: null
+ location: null,
},
backupFirmware: {
version: '--',
id: null,
location: null,
- status: '--'
+ status: '--',
},
- applyTime: null
+ applyTime: null,
},
getters: {
- systemFirmwareVersion: state => state.activeFirmware.version,
- backupFirmwareVersion: state => state.backupFirmware.version,
- backupFirmwareStatus: state => state.backupFirmware.status,
- isRebootFromBackupAvailable: state =>
+ systemFirmwareVersion: (state) => state.activeFirmware.version,
+ backupFirmwareVersion: (state) => state.backupFirmware.version,
+ backupFirmwareStatus: (state) => state.backupFirmware.status,
+ isRebootFromBackupAvailable: (state) =>
state.backupFirmware.id ? true : false,
- bmcFirmwareCurrentVersion: state => state.activeFirmware.version //this getter is needed for the Overview page
+ bmcFirmwareCurrentVersion: (state) => state.activeFirmware.version, //this getter is needed for the Overview page
},
mutations: {
setActiveFirmware: (state, { version, id, location }) => {
@@ -37,7 +37,7 @@ const FirmwareSingleImageStore = {
state.backupFirmware.location = location;
state.backupFirmware.status = status;
},
- setApplyTime: (state, applyTime) => (state.applyTime = applyTime)
+ setApplyTime: (state, applyTime) => (state.applyTime = applyTime),
},
actions: {
async getFirmwareInformation({ commit }) {
@@ -47,8 +47,8 @@ const FirmwareSingleImageStore = {
const currentLocation = Links.ActiveSoftwareImage['@odata.id'];
// Check SoftwareImages list for not ActiveSoftwareImage id
const backupLocation = Links.SoftwareImages.map(
- item => item['@odata.id']
- ).find(location => {
+ (item) => item['@odata.id']
+ ).find((location) => {
const id = location.split('/').pop();
const currentId = currentLocation.split('/').pop();
return id !== currentId;
@@ -66,16 +66,16 @@ const FirmwareSingleImageStore = {
commit('setActiveFirmware', {
version: currentData?.data?.Version,
id: currentData?.data?.Id,
- location: currentData?.data?.['@odata.id']
+ location: currentData?.data?.['@odata.id'],
});
commit('setBackupFirmware', {
version: backupData.data?.Version,
id: backupData.data?.Id,
location: backupData.data?.['@odata.id'],
- status: backupData.data?.Status?.State
+ status: backupData.data?.Status?.State,
});
})
- .catch(error => console.log(error));
+ .catch((error) => console.log(error));
},
getUpdateServiceApplyTime({ commit }) {
api
@@ -85,20 +85,20 @@ const FirmwareSingleImageStore = {
data.HttpPushUriOptions.HttpPushUriApplyTime.ApplyTime;
commit('setApplyTime', applyTime);
})
- .catch(error => console.log(error));
+ .catch((error) => console.log(error));
},
setApplyTimeImmediate({ commit }) {
const data = {
HttpPushUriOptions: {
HttpPushUriApplyTime: {
- ApplyTime: 'Immediate'
- }
- }
+ ApplyTime: 'Immediate',
+ },
+ },
};
return api
.patch('/redfish/v1/UpdateService', data)
.then(() => commit('setApplyTime', 'Immediate'))
- .catch(error => console.log(error));
+ .catch((error) => console.log(error));
},
async uploadFirmware({ state, dispatch }, image) {
if (state.applyTime !== 'Immediate') {
@@ -108,11 +108,11 @@ const FirmwareSingleImageStore = {
}
return await api
.post('/redfish/v1/UpdateService', image, {
- headers: { 'Content-Type': 'application/octet-stream' }
+ headers: { 'Content-Type': 'application/octet-stream' },
})
.then(() => dispatch('getSystemFirwareVersion'))
.then(() => i18n.t('pageFirmware.toast.successUploadMessage'))
- .catch(error => {
+ .catch((error) => {
console.log(error);
throw new Error(i18n.t('pageFirmware.toast.errorUploadAndReboot'));
});
@@ -120,7 +120,7 @@ const FirmwareSingleImageStore = {
async uploadFirmwareTFTP({ state, dispatch }, { address, filename }) {
const data = {
TransferProtocol: 'TFTP',
- ImageURI: `${address}/${filename}`
+ ImageURI: `${address}/${filename}`,
};
if (state.applyTime !== 'Immediate') {
// ApplyTime must be set to Immediate before making
@@ -134,7 +134,7 @@ const FirmwareSingleImageStore = {
)
.then(() => dispatch('getSystemFirwareVersion'))
.then(() => i18n.t('pageFirmware.toast.successUploadMessage'))
- .catch(error => {
+ .catch((error) => {
console.log(error);
throw new Error(i18n.t('pageFirmware.toast.errorUploadAndReboot'));
});
@@ -144,19 +144,19 @@ const FirmwareSingleImageStore = {
const data = {
Links: {
ActiveSoftwareImage: {
- '@odata.id': backupLoaction
- }
- }
+ '@odata.id': backupLoaction,
+ },
+ },
};
return await api
.patch('/redfish/v1/Managers/bmc', data)
.then(() => i18n.t('pageFirmware.toast.successRebootFromBackup'))
- .catch(error => {
+ .catch((error) => {
console.log(error);
throw new Error(i18n.t('pageFirmware.toast.errorRebootFromBackup'));
});
- }
- }
+ },
+ },
};
export default FirmwareSingleImageStore;