summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/locales/en-US.json5
-rw-r--r--src/store/modules/Health/SystemStore.js33
-rw-r--r--src/views/Health/HardwareStatus/HardwareStatusTableStystem.vue126
3 files changed, 134 insertions, 30 deletions
diff --git a/src/locales/en-US.json b/src/locales/en-US.json
index 3196dcf8..c9e6bc56 100644
--- a/src/locales/en-US.json
+++ b/src/locales/en-US.json
@@ -378,6 +378,7 @@
"bmcDateTime": "BMC date and time",
"chassisType": "Chassis type",
"connectTypesSupported": "Connect types supported",
+ "count": "Count",
"description": "Description",
"efficiencyPercent": "Efficiency percent",
"fanSpeed": "Fan speed",
@@ -388,7 +389,6 @@
"healthRollup": "Health rollup",
"id": "ID",
"identifyLed": "Identify LED",
- "indicatorLed": "Indicator LED",
"instructionSet": "Instruction set",
"lastResetTime": "Last reset time",
"locationNumber": "Location number",
@@ -400,12 +400,14 @@
"maxPowerWatts": "Max power watts",
"minPowerWatts": "Min power watts",
"model": "Model",
+ "memorySummary": "Memory summary",
"name": "Name",
"partNumber": "Part number",
"power": "Power",
"powerInputWatts": "Power input watts",
"powerState": "Power state",
"processorArchitecture": "Processor architecture",
+ "processorSummary": "Processor summary",
"processorType": "Processor type",
"serialConsole": "Serial console",
"serialNumber": "Serial number",
@@ -414,6 +416,7 @@
"sparePartNumber": "Spare part number",
"statusHealthRollup": "Status (Health rollup)",
"statusState": "Status (State)",
+ "subModel": "Sub model",
"systemType": "System type",
"totalCores": "Total cores",
"totalThreads": "Total threads",
diff --git a/src/store/modules/Health/SystemStore.js b/src/store/modules/Health/SystemStore.js
index 23b12d72..b4ee3847 100644
--- a/src/store/modules/Health/SystemStore.js
+++ b/src/store/modules/Health/SystemStore.js
@@ -1,4 +1,5 @@
import api from '@/store/api';
+import i18n from '@/i18n';
const SystemStore = {
namespaced: true,
@@ -14,15 +15,25 @@ const SystemStore = {
system.assetTag = data.AssetTag;
system.description = data.Description;
system.firmwareVersion = data.BiosVersion;
+ system.hardwareType = data.Name;
system.health = data.Status.Health;
system.id = data.Id;
system.locationIndicatorActive = data.LocationIndicatorActive;
+ system.locationNumber = data.LocationNumber;
system.manufacturer = data.Manufacturer;
+ system.memorySummaryHealth = data.MemorySummary.Status.Health;
+ system.memorySummaryHealthRollup = data.MemorySummary.Status.HealthRollup;
+ system.memorySummaryState = data.MemorySummary.Status.State;
system.model = data.Model;
- system.partNumber = data.PartNumber;
+ system.processorSummaryCount = data.ProcessorSummary.Count;
+ system.processorSummaryHealth = data.ProcessorSummary.Status.Health;
+ system.processorSummaryHealthRoll =
+ data.ProcessorSummary.Status.HealthRollup;
+ system.processorSummaryState = data.ProcessorSummary.Status.State;
system.powerState = data.PowerState;
system.serialNumber = data.SerialNumber;
system.healthRollup = data.Status.HealthRollup;
+ system.subModel = data.SubModel;
system.statusState = data.Status.State;
system.systemType = data.SystemType;
state.systems = [system];
@@ -35,6 +46,26 @@ const SystemStore = {
.then(({ data }) => commit('setSystemInfo', data))
.catch((error) => console.log(error));
},
+ changeIdentifyLedState({ dispatch }, ledState) {
+ api
+ .patch('/redfish/v1/Systems/system', {
+ LocationIndicatorActive: ledState,
+ })
+ .then(() => dispatch('getSystem'))
+ .catch((error) => {
+ dispatch('getSystem');
+ console.log('error', error);
+ if (ledState) {
+ throw new Error(
+ i18n.t('pageHardwareStatus.toast.errorTurnOnIdentifyLed')
+ );
+ } else {
+ throw new Error(
+ i18n.t('pageHardwareStatus.toast.errorTurnOffIdentifyLed')
+ );
+ }
+ });
+ },
},
};
diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableStystem.vue b/src/views/Health/HardwareStatus/HardwareStatusTableStystem.vue
index 9f2e7852..1dccd51c 100644
--- a/src/views/Health/HardwareStatus/HardwareStatusTableStystem.vue
+++ b/src/views/Health/HardwareStatus/HardwareStatusTableStystem.vue
@@ -28,47 +28,103 @@
{{ value }}
</template>
+ <template #cell(locationIndicatorActive)="{ item }">
+ <b-form-checkbox
+ id="identifyLedSwitch"
+ v-model="item.locationIndicatorActive"
+ data-test-id="hardwareStatus-toggle-identifyLed"
+ switch
+ @change="toggleIdentifyLedSwitch"
+ >
+ </b-form-checkbox>
+ </template>
+
<template #row-details="{ item }">
<b-container fluid>
<b-row>
- <b-col sm="6" xl="4">
+ <b-col class="mt-2" sm="6">
<dl>
+ <!-- Serial number -->
+ <dt>{{ $t('pageHardwareStatus.table.serialNumber') }}:</dt>
+ <dd>{{ tableFormatter(item.serialNumber) }}</dd>
+ <!-- Model -->
+ <dt>{{ $t('pageHardwareStatus.table.model') }}:</dt>
+ <dd>{{ tableFormatter(item.model) }}</dd>
<!-- Asset tag -->
<dt>{{ $t('pageHardwareStatus.table.assetTag') }}:</dt>
+ <dd class="mb-2">
+ {{ tableFormatter(item.assetTag) }}
+ </dd>
+ </dl>
+ </b-col>
+ <b-col class="mt-2" sm="6">
+ <dl>
+ <!-- Status state -->
+ <dt>{{ $t('pageHardwareStatus.table.statusState') }}:</dt>
+ <dd>{{ tableFormatter(item.statusState) }}</dd>
+ <!-- Power state -->
+ <dt>{{ $t('pageHardwareStatus.table.power') }}:</dt>
+ <dd>{{ tableFormatter(item.powerState) }}</dd>
+ <!-- Health rollup -->
+ <dt>{{ $t('pageHardwareStatus.table.healthRollup') }}:</dt>
+ <dd>{{ tableFormatter(item.healthRollup) }}</dd>
+ </dl>
+ </b-col>
+ </b-row>
+ <div class="section-divider mb-3 mt-3"></div>
+ <b-row>
+ <b-col class="mt-1" sm="6">
+ <dl>
+ <!-- Manufacturer -->
+ <dt>{{ $t('pageHardwareStatus.table.manufacturer') }}:</dt>
<dd>{{ tableFormatter(item.assetTag) }}</dd>
<!-- Description -->
<dt>{{ $t('pageHardwareStatus.table.description') }}:</dt>
<dd>{{ tableFormatter(item.description) }}</dd>
- <!-- Indicator LED -->
- <dt>{{ $t('pageHardwareStatus.table.indicatorLed') }}:</dt>
- <dd v-if="item.locationIndicatorActive === true">
- {{ $t('global.status.on') }}
+ <!-- Sub Model -->
+ <dt>{{ $t('pageHardwareStatus.table.subModel') }}:</dt>
+ <dd>
+ {{ tableFormatter(item.subModel) }}
</dd>
- <dd v-else-if="item.locationIndicatorActive === false">
- {{ $t('global.status.off') }}
+ <!-- System Type -->
+ <dt>{{ $t('pageHardwareStatus.table.systemType') }}:</dt>
+ <dd>
+ {{ tableFormatter(item.systemType) }}
</dd>
- <dd v-else>--</dd>
- <!-- Model -->
- <dt>{{ $t('pageHardwareStatus.table.model') }}:</dt>
- <dd>{{ tableFormatter(item.model) }}</dd>
</dl>
</b-col>
- <b-col sm="6" xl="4">
+ <b-col sm="6">
<dl>
- <!-- Power state -->
- <dt>{{ $t('pageHardwareStatus.table.powerState') }}:</dt>
- <dd>{{ tableFormatter(item.powerState) }}</dd>
- <!-- Health rollup -->
- <dt>
- {{ $t('pageHardwareStatus.table.statusHealthRollup') }}:
+ <!-- Memory Summary -->
+ <dt class="mt-1 mb-2 font-weight-bold float-none">
+ {{ $t('pageHardwareStatus.table.memorySummary') }}
</dt>
- <dd>{{ tableFormatter(item.healthRollup) }}</dd>
<!-- Status state -->
<dt>{{ $t('pageHardwareStatus.table.statusState') }}:</dt>
- <dd>{{ tableFormatter(item.statusState) }}</dd>
- <!-- System type -->
- <dt>{{ $t('pageHardwareStatus.table.systemType') }}:</dt>
- <dd>{{ tableFormatter(item.systemType) }}</dd>
+ <dd>{{ tableFormatter(item.memorySummaryState) }}</dd>
+ <!-- Health -->
+ <dt>{{ $t('pageHardwareStatus.table.health') }}:</dt>
+ <dd>{{ tableFormatter(item.memorySummaryHealth) }}</dd>
+ <!-- Health Roll -->
+ <dt>{{ $t('pageHardwareStatus.table.healthRollup') }}:</dt>
+ <dd>{{ tableFormatter(item.memorySummaryHealthRoll) }}</dd>
+
+ <!-- Processor Summary -->
+ <dt class="mt-1 mb-2 font-weight-bold float-none">
+ {{ $t('pageHardwareStatus.table.processorSummary') }}
+ </dt>
+ <!-- Status state -->
+ <dt>{{ $t('pageHardwareStatus.table.statusState') }}:</dt>
+ <dd>{{ tableFormatter(item.processorSummaryState) }}</dd>
+ <!-- Health -->
+ <dt>{{ $t('pageHardwareStatus.table.health') }}:</dt>
+ <dd>{{ tableFormatter(item.processorSummaryHealth) }}</dd>
+ <!-- Health Rollup -->
+ <dt>{{ $t('pageHardwareStatus.table.healthRollup') }}:</dt>
+ <dd>{{ tableFormatter(item.processorSummaryHealthRoll) }}</dd>
+ <!-- Count -->
+ <dt>{{ $t('pageHardwareStatus.table.count') }}:</dt>
+ <dd>{{ tableFormatter(item.processorSummaryCount) }}</dd>
</dl>
</b-col>
</b-row>
@@ -79,6 +135,7 @@
</template>
<script>
+import BVToastMixin from '@/components/Mixins/BVToastMixin';
import PageSection from '@/components/Global/PageSection';
import IconChevron from '@carbon/icons-vue/es/chevron--down/20';
@@ -91,7 +148,7 @@ import TableDataFormatterMixin from '@/components/Mixins/TableDataFormatterMixin
export default {
components: { IconChevron, PageSection, StatusIcon },
- mixins: [TableRowExpandMixin, TableDataFormatterMixin],
+ mixins: [BVToastMixin, TableRowExpandMixin, TableDataFormatterMixin],
data() {
return {
fields: [
@@ -106,19 +163,25 @@ export default {
formatter: this.tableFormatter,
},
{
+ key: 'hardwareType',
+ label: this.$t('pageHardwareStatus.table.hardwareType'),
+ formatter: this.tableFormatter,
+ tdClass: 'text-nowrap',
+ },
+ {
key: 'health',
label: this.$t('pageHardwareStatus.table.health'),
formatter: this.tableFormatter,
tdClass: 'text-nowrap',
},
{
- key: 'partNumber',
- label: this.$t('pageHardwareStatus.table.partNumber'),
+ key: 'locationNumber',
+ label: this.$t('pageHardwareStatus.table.locationNumber'),
formatter: this.tableFormatter,
},
{
- key: 'serialNumber',
- label: this.$t('pageHardwareStatus.table.serialNumber'),
+ key: 'locationIndicatorActive',
+ label: this.$t('pageHardwareStatus.table.identifyLed'),
formatter: this.tableFormatter,
},
],
@@ -136,5 +199,12 @@ export default {
this.$root.$emit('hardware-status-system-complete');
});
},
+ methods: {
+ toggleIdentifyLedSwitch(state) {
+ this.$store
+ .dispatch('system/changeIdentifyLedState', state)
+ .catch(({ message }) => this.errorToast(message));
+ },
+ },
};
</script>