summaryrefslogtreecommitdiff
path: root/src/views/Health/HardwareStatus
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/Health/HardwareStatus')
-rw-r--r--src/views/Health/HardwareStatus/HardwareStatus.vue174
-rw-r--r--src/views/Health/HardwareStatus/HardwareStatusTableBmcManager.vue252
-rw-r--r--src/views/Health/HardwareStatus/HardwareStatusTableChassis.vue188
-rw-r--r--src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue162
-rw-r--r--src/views/Health/HardwareStatus/HardwareStatusTableFans.vue189
-rw-r--r--src/views/Health/HardwareStatus/HardwareStatusTablePowerSupplies.vue207
-rw-r--r--src/views/Health/HardwareStatus/HardwareStatusTableProcessors.vue250
-rw-r--r--src/views/Health/HardwareStatus/HardwareStatusTableStystem.vue210
-rw-r--r--src/views/Health/HardwareStatus/index.js2
9 files changed, 0 insertions, 1634 deletions
diff --git a/src/views/Health/HardwareStatus/HardwareStatus.vue b/src/views/Health/HardwareStatus/HardwareStatus.vue
deleted file mode 100644
index 3da79dce..00000000
--- a/src/views/Health/HardwareStatus/HardwareStatus.vue
+++ /dev/null
@@ -1,174 +0,0 @@
-<template>
- <b-container fluid="xl">
- <page-title />
-
- <!-- Quicklinks section -->
- <page-section :section-title="$t('pageHardwareStatus.quicklinkTitle')">
- <b-row class="w-75">
- <b-col v-for="column in quicklinkColumns" :key="column.id" xl="4">
- <div v-for="item in column" :key="item.id">
- <b-link
- :href="item.href"
- :data-ref="item.dataRef"
- @click.prevent="scrollToOffset"
- >
- <jump-link /> {{ item.linkText }}
- </b-link>
- </div>
- </b-col>
- </b-row>
- </page-section>
-
- <!-- System table -->
- <table-system ref="system" />
-
- <!-- BMC manager table -->
- <table-bmc-manager ref="bmc" />
-
- <!-- Chassis table -->
- <table-chassis ref="chassis" />
-
- <!-- DIMM slot table -->
- <table-dimm-slot ref="dimms" />
-
- <!-- Fans table -->
- <table-fans ref="fans" />
-
- <!-- Power supplies table -->
- <table-power-supplies ref="powerSupply" />
-
- <!-- Processors table -->
- <table-processors ref="processors" />
- </b-container>
-</template>
-
-<script>
-import PageTitle from '@/components/Global/PageTitle';
-import TableSystem from './HardwareStatusTableStystem';
-import TablePowerSupplies from './HardwareStatusTablePowerSupplies';
-import TableDimmSlot from './HardwareStatusTableDimmSlot';
-import TableFans from './HardwareStatusTableFans';
-import TableBmcManager from './HardwareStatusTableBmcManager';
-import TableChassis from './HardwareStatusTableChassis';
-import TableProcessors from './HardwareStatusTableProcessors';
-import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin';
-import PageSection from '@/components/Global/PageSection';
-import JumpLink16 from '@carbon/icons-vue/es/jump-link/16';
-
-import JumpLinkMixin from '@/components/Mixins/JumpLinkMixin';
-
-import { chunk } from 'lodash';
-
-export default {
- components: {
- PageTitle,
- TableDimmSlot,
- TablePowerSupplies,
- TableSystem,
- TableFans,
- TableBmcManager,
- TableChassis,
- TableProcessors,
- PageSection,
- JumpLink: JumpLink16,
- },
- mixins: [LoadingBarMixin, JumpLinkMixin],
- beforeRouteLeave(to, from, next) {
- // Hide loader if user navigates away from page
- // before requests complete
- this.hideLoader();
- next();
- },
- data() {
- return {
- links: [
- {
- id: 'system',
- dataRef: 'system',
- href: '#system',
- linkText: this.$t('pageHardwareStatus.system'),
- },
- {
- id: 'bmc',
- dataRef: 'bmc',
- href: '#bmc',
- linkText: this.$t('pageHardwareStatus.bmcManager'),
- },
- {
- id: 'chassis',
- dataRef: 'chassis',
- href: '#chassis',
- linkText: this.$t('pageHardwareStatus.chassis'),
- },
- {
- id: 'dimms',
- dataRef: 'dimms',
- href: '#dimms',
- linkText: this.$t('pageHardwareStatus.dimmSlot'),
- },
- {
- id: 'fans',
- dataRef: 'fans',
- href: '#fans',
- linkText: this.$t('pageHardwareStatus.fans'),
- },
- {
- id: 'powerSupply',
- dataRef: 'powerSupply',
- href: '#powerSupply',
- linkText: this.$t('pageHardwareStatus.powerSupplies'),
- },
- {
- id: 'processors',
- dataRef: 'processors',
- href: '#processors',
- linkText: this.$t('pageHardwareStatus.processors'),
- },
- ],
- };
- },
- computed: {
- quicklinkColumns() {
- // Chunk links array to 3 array's to display 3 items per column
- return chunk(this.links, 3);
- },
- },
- created() {
- this.startLoader();
- const systemTablePromise = new Promise((resolve) => {
- this.$root.$on('hardware-status-system-complete', () => resolve());
- });
- const bmcManagerTablePromise = new Promise((resolve) => {
- this.$root.$on('hardware-status-bmc-manager-complete', () => resolve());
- });
- const chassisTablePromise = new Promise((resolve) => {
- this.$root.$on('hardware-status-chassis-complete', () => resolve());
- });
- const dimmSlotTablePromise = new Promise((resolve) => {
- this.$root.$on('hardware-status-dimm-slot-complete', () => resolve());
- });
- const fansTablePromise = new Promise((resolve) => {
- this.$root.$on('hardware-status-fans-complete', () => resolve());
- });
- const powerSuppliesTablePromise = new Promise((resolve) => {
- this.$root.$on('hardware-status-power-supplies-complete', () =>
- resolve()
- );
- });
- const processorsTablePromise = new Promise((resolve) => {
- this.$root.$on('hardware-status-processors-complete', () => resolve());
- });
- // Combine all child component Promises to indicate
- // when page data load complete
- Promise.all([
- systemTablePromise,
- bmcManagerTablePromise,
- chassisTablePromise,
- dimmSlotTablePromise,
- fansTablePromise,
- powerSuppliesTablePromise,
- processorsTablePromise,
- ]).finally(() => this.endLoader());
- },
-};
-</script>
diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableBmcManager.vue b/src/views/Health/HardwareStatus/HardwareStatusTableBmcManager.vue
deleted file mode 100644
index 07157448..00000000
--- a/src/views/Health/HardwareStatus/HardwareStatusTableBmcManager.vue
+++ /dev/null
@@ -1,252 +0,0 @@
-<template>
- <page-section :section-title="$t('pageHardwareStatus.bmcManager')">
- <b-table
- responsive="md"
- hover
- :items="items"
- :fields="fields"
- show-empty
- :empty-text="$t('global.table.emptyMessage')"
- >
- <!-- Expand chevron icon -->
- <template #cell(expandRow)="row">
- <b-button
- variant="link"
- data-test-id="hardwareStatus-button-expandBmc"
- :title="expandRowLabel"
- class="btn-icon-only"
- @click="toggleRowDetails(row)"
- >
- <icon-chevron />
- <span class="sr-only">{{ expandRowLabel }}</span>
- </b-button>
- </template>
-
- <!-- Health -->
- <template #cell(health)="{ value }">
- <status-icon :status="statusIcon(value)" />
- {{ value }}
- </template>
-
- <!-- Toggle identify LED -->
- <template #cell(identifyLed)="row">
- <b-form-checkbox
- v-if="hasIdentifyLed(row.item.identifyLed)"
- v-model="row.item.identifyLed"
- name="switch"
- switch
- @change="toggleIdentifyLedValue(row.item)"
- >
- <span v-if="row.item.identifyLed">
- {{ $t('global.status.on') }}
- </span>
- <span v-else> {{ $t('global.status.off') }} </span>
- </b-form-checkbox>
- <div v-else>--</div>
- </template>
-
- <template #row-details="{ item }">
- <b-container fluid>
- <b-row>
- <b-col class="mt-2" sm="6" xl="6">
- <dl>
- <!-- Name -->
- <dt>{{ $t('pageHardwareStatus.table.name') }}:</dt>
- <dd>{{ tableFormatter(item.name) }}</dd>
- <!-- Part number -->
- <dt>{{ $t('pageHardwareStatus.table.partNumber') }}:</dt>
- <dd>{{ tableFormatter(item.partNumber) }}</dd>
- <!-- Serial number -->
- <dt>{{ $t('pageHardwareStatus.table.serialNumber') }}:</dt>
- <dd>{{ tableFormatter(item.serialNumber) }}</dd>
- <!-- Spare part number -->
- <dt>{{ $t('pageHardwareStatus.table.sparePartNumber') }}:</dt>
- <dd>{{ tableFormatter(item.sparePartNumber) }}</dd>
- <!-- Model -->
- <dt>{{ $t('pageHardwareStatus.table.model') }}:</dt>
- <dd>{{ tableFormatter(item.model) }}</dd>
- <!-- UUID -->
- <dt>{{ $t('pageHardwareStatus.table.uuid') }}:</dt>
- <dd>{{ tableFormatter(item.uuid) }}</dd>
- <!-- Service entry point UUID -->
- <dt>
- {{ $t('pageHardwareStatus.table.serviceEntryPointUuid') }}:
- </dt>
- <dd>{{ tableFormatter(item.serviceEntryPointUuid) }}</dd>
- </dl>
- </b-col>
- <b-col class="mt-2" sm="6" xl="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>
- <!-- BMC date and time -->
- <dt>{{ $t('pageHardwareStatus.table.bmcDateTime') }}:</dt>
- <dd>
- {{ item.dateTime | formatDate }}
- {{ item.dateTime | formatTime }}
- </dd>
- <!-- Reset date and time -->
- <dt>{{ $t('pageHardwareStatus.table.lastResetTime') }}:</dt>
- <dd>
- {{ item.lastResetTime | formatDate }}
- {{ item.lastResetTime | formatTime }}
- </dd>
- </dl>
- </b-col>
- </b-row>
- <div class="section-divider mb-3 mt-3"></div>
- <b-row>
- <b-col class="mt-2" sm="6" xl="6">
- <dl>
- <!-- Manufacturer -->
- <dt>{{ $t('pageHardwareStatus.table.manufacturer') }}:</dt>
- <dd>{{ tableFormatter(item.manufacturer) }}</dd>
- <!-- Description -->
- <dt>{{ $t('pageHardwareStatus.table.description') }}:</dt>
- <dd>{{ tableFormatter(item.description) }}</dd>
- <!-- Manager type -->
- <dt>{{ $t('pageHardwareStatus.table.managerType') }}:</dt>
- <dd>{{ tableFormatter(item.managerType) }}</dd>
- </dl>
- </b-col>
- <b-col class="mt-2" sm="6" xl="6">
- <!-- Firmware Version -->
- <dl>
- <dt>{{ $t('pageHardwareStatus.table.firmwareVersion') }}:</dt>
- <dd>{{ item.firmwareVersion }}</dd>
- </dl>
- <!-- Graphical console -->
- <p class="mt-1 mb-2 h6 float-none m-0">
- {{ $t('pageHardwareStatus.table.graphicalConsole') }}
- </p>
- <dl class="ml-4">
- <dt>
- {{ $t('pageHardwareStatus.table.connectTypesSupported') }}:
- </dt>
- <dd>
- {{ tableFormatterArray(item.graphicalConsoleConnectTypes) }}
- </dd>
- <dt>
- {{ $t('pageHardwareStatus.table.maxConcurrentSessions') }}:
- </dt>
- <dd>
- {{ tableFormatter(item.graphicalConsoleMaxSessions) }}
- </dd>
- <dt>{{ $t('pageHardwareStatus.table.serviceEnabled') }}:</dt>
- <dd>
- {{ tableFormatter(item.graphicalConsoleEnabled) }}
- </dd>
- </dl>
- <!-- Serial console -->
- <p class="mt-1 mb-2 h6 float-none m-0">
- {{ $t('pageHardwareStatus.table.serialConsole') }}
- </p>
- <dl class="ml-4">
- <dt>
- {{ $t('pageHardwareStatus.table.connectTypesSupported') }}:
- </dt>
- <dd>
- {{ tableFormatterArray(item.serialConsoleConnectTypes) }}
- </dd>
- <dt>
- {{ $t('pageHardwareStatus.table.maxConcurrentSessions') }}:
- </dt>
- <dd>{{ tableFormatter(item.serialConsoleMaxSessions) }}</dd>
- <dt>{{ $t('pageHardwareStatus.table.serviceEnabled') }}:</dt>
- <dd>{{ tableFormatter(item.serialConsoleEnabled) }}</dd>
- </dl>
- </b-col>
- </b-row>
- </b-container>
- </template>
- </b-table>
- </page-section>
-</template>
-
-<script>
-import PageSection from '@/components/Global/PageSection';
-import IconChevron from '@carbon/icons-vue/es/chevron--down/20';
-import StatusIcon from '@/components/Global/StatusIcon';
-import BVToastMixin from '@/components/Mixins/BVToastMixin';
-import TableRowExpandMixin, {
- expandRowLabel,
-} from '@/components/Mixins/TableRowExpandMixin';
-import TableDataFormatterMixin from '@/components/Mixins/TableDataFormatterMixin';
-
-export default {
- components: { IconChevron, PageSection, StatusIcon },
- mixins: [BVToastMixin, TableRowExpandMixin, TableDataFormatterMixin],
- data() {
- return {
- fields: [
- {
- key: 'expandRow',
- label: '',
- tdClass: 'table-row-expand',
- },
- {
- key: 'id',
- label: this.$t('pageHardwareStatus.table.id'),
- formatter: this.tableFormatter,
- },
- {
- key: 'health',
- label: this.$t('pageHardwareStatus.table.health'),
- formatter: this.tableFormatter,
- },
- {
- key: 'locationNumber',
- label: this.$t('pageHardwareStatus.table.locationNumber'),
- formatter: this.tableFormatter,
- },
- {
- key: 'identifyLed',
- label: this.$t('pageHardwareStatus.table.identifyLed'),
- formatter: this.tableFormatter,
- },
- ],
- expandRowLabel: expandRowLabel,
- };
- },
- computed: {
- bmc() {
- return this.$store.getters['bmc/bmc'];
- },
- items() {
- if (this.bmc) {
- return [this.bmc];
- } else {
- return [];
- }
- },
- },
- created() {
- this.$store.dispatch('bmc/getBmcInfo').finally(() => {
- // Emit initial data fetch complete to parent component
- this.$root.$emit('hardware-status-bmc-manager-complete');
- });
- },
- methods: {
- toggleIdentifyLedValue(row) {
- this.$store
- .dispatch('bmc/updateIdentifyLedValue', {
- uri: row.uri,
- identifyLed: row.identifyLed,
- })
- .catch(({ message }) => this.errorToast(message));
- },
- // TO DO: remove hasIdentifyLed method once the following story is merged:
- // https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/43179
- hasIdentifyLed(identifyLed) {
- return typeof identifyLed === 'boolean';
- },
- },
-};
-</script>
diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableChassis.vue b/src/views/Health/HardwareStatus/HardwareStatusTableChassis.vue
deleted file mode 100644
index 6b783c0f..00000000
--- a/src/views/Health/HardwareStatus/HardwareStatusTableChassis.vue
+++ /dev/null
@@ -1,188 +0,0 @@
-<template>
- <page-section :section-title="$t('pageHardwareStatus.chassis')">
- <b-table
- responsive="md"
- hover
- :items="chassis"
- :fields="fields"
- show-empty
- :empty-text="$t('global.table.emptyMessage')"
- >
- <!-- Expand chevron icon -->
- <template #cell(expandRow)="row">
- <b-button
- variant="link"
- data-test-id="hardwareStatus-button-expandChassis"
- :title="expandRowLabel"
- class="btn-icon-only"
- @click="toggleRowDetails(row)"
- >
- <icon-chevron />
- <span class="sr-only">{{ expandRowLabel }}</span>
- </b-button>
- </template>
-
- <!-- Health -->
- <template #cell(health)="{ value }">
- <status-icon :status="statusIcon(value)" />
- {{ value }}
- </template>
- <!-- Toggle identify LED -->
- <template #cell(identifyLed)="row">
- <b-form-checkbox
- v-if="hasIdentifyLed(row.item.identifyLed)"
- v-model="row.item.identifyLed"
- name="switch"
- switch
- @change="toggleIdentifyLedValue(row.item)"
- >
- <span v-if="row.item.identifyLed">
- {{ $t('global.status.on') }}
- </span>
- <span v-else> {{ $t('global.status.off') }} </span>
- </b-form-checkbox>
- <div v-else>--</div>
- </template>
- <template #row-details="{ item }">
- <b-container fluid>
- <b-row>
- <b-col class="mt-2" sm="6" xl="6">
- <dl>
- <!-- Name -->
- <dt>{{ $t('pageHardwareStatus.table.name') }}:</dt>
- <dd>{{ tableFormatter(item.name) }}</dd>
- <!-- Part number -->
- <dt>{{ $t('pageHardwareStatus.table.partNumber') }}:</dt>
- <dd>{{ tableFormatter(item.partNumber) }}</dd>
- <!-- Serial Number -->
- <dt>{{ $t('pageHardwareStatus.table.serialNumber') }}:</dt>
- <dd>{{ tableFormatter(item.serialNumber) }}</dd>
- <!-- Model -->
- <dt>{{ $t('pageHardwareStatus.table.model') }}:</dt>
- <dd class="mb-2">
- {{ 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" xl="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.power) }}</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-2" sm="6" xl="6">
- <dl>
- <!-- Manufacturer -->
- <dt>{{ $t('pageHardwareStatus.table.manufacturer') }}:</dt>
- <dd>{{ tableFormatter(item.manufacturer) }}</dd>
- <!-- Chassis Type -->
- <dt>{{ $t('pageHardwareStatus.table.chassisType') }}:</dt>
- <dd>{{ tableFormatter(item.chassisType) }}</dd>
- </dl>
- </b-col>
- <b-col class="mt-2" sm="6" xl="6">
- <dl>
- <!-- Min power -->
- <dt>{{ $t('pageHardwareStatus.table.minPowerWatts') }}:</dt>
- <dd>{{ tableFormatter(item.minPowerWatts) }}</dd>
- <!-- Max power -->
- <dt>{{ $t('pageHardwareStatus.table.maxPowerWatts') }}:</dt>
- <dd>{{ tableFormatter(item.maxPowerWatts) }}</dd>
- </dl>
- </b-col>
- </b-row>
- </b-container>
- </template>
- </b-table>
- </page-section>
-</template>
-
-<script>
-import PageSection from '@/components/Global/PageSection';
-import IconChevron from '@carbon/icons-vue/es/chevron--down/20';
-import BVToastMixin from '@/components/Mixins/BVToastMixin';
-import StatusIcon from '@/components/Global/StatusIcon';
-
-import TableRowExpandMixin, {
- expandRowLabel,
-} from '@/components/Mixins/TableRowExpandMixin';
-import TableDataFormatterMixin from '@/components/Mixins/TableDataFormatterMixin';
-
-export default {
- components: { IconChevron, PageSection, StatusIcon },
- mixins: [BVToastMixin, TableRowExpandMixin, TableDataFormatterMixin],
- data() {
- return {
- fields: [
- {
- key: 'expandRow',
- label: '',
- tdClass: 'table-row-expand',
- },
- {
- key: 'id',
- label: this.$t('pageHardwareStatus.table.id'),
- formatter: this.tableFormatter,
- },
- {
- key: 'health',
- label: this.$t('pageHardwareStatus.table.health'),
- formatter: this.tableFormatter,
- tdClass: 'text-nowrap',
- },
- {
- key: 'locationNumber',
- label: this.$t('pageHardwareStatus.table.locationNumber'),
- formatter: this.tableFormatter,
- },
- {
- key: 'identifyLed',
- label: this.$t('pageHardwareStatus.table.identifyLed'),
- formatter: this.tableFormatter,
- },
- ],
- expandRowLabel: expandRowLabel,
- };
- },
- computed: {
- chassis() {
- return this.$store.getters['chassis/chassis'];
- },
- },
- created() {
- this.$store.dispatch('chassis/getChassisInfo').finally(() => {
- // Emit initial data fetch complete to parent component
- this.$root.$emit('hardware-status-chassis-complete');
- });
- },
- methods: {
- toggleIdentifyLedValue(row) {
- this.$store
- .dispatch('chassis/updateIdentifyLedValue', {
- uri: row.uri,
- identifyLed: row.identifyLed,
- })
- .catch(({ message }) => this.errorToast(message));
- },
- // TO DO: Remove this method when the LocationIndicatorActive is added from backend.
- hasIdentifyLed(identifyLed) {
- return typeof identifyLed === 'boolean';
- },
- },
-};
-</script>
diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue b/src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue
deleted file mode 100644
index ca9e949c..00000000
--- a/src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue
+++ /dev/null
@@ -1,162 +0,0 @@
-<template>
- <page-section :section-title="$t('pageHardwareStatus.dimmSlot')">
- <b-row class="align-items-end">
- <b-col sm="6" md="5" xl="4">
- <search
- @change-search="onChangeSearchInput"
- @clear-search="onClearSearchInput"
- />
- </b-col>
- <b-col sm="6" md="3" xl="2">
- <table-cell-count
- :filtered-items-count="filteredRows"
- :total-number-of-cells="dimms.length"
- ></table-cell-count>
- </b-col>
- </b-row>
- <b-table
- sort-icon-left
- no-sort-reset
- hover
- sort-by="health"
- responsive="md"
- show-empty
- :items="dimms"
- :fields="fields"
- :sort-desc="true"
- :sort-compare="sortCompare"
- :filter="searchFilter"
- :empty-text="$t('global.table.emptyMessage')"
- :empty-filtered-text="$t('global.table.emptySearchMessage')"
- @filtered="onFiltered"
- >
- <!-- Expand chevron icon -->
- <template #cell(expandRow)="row">
- <b-button
- variant="link"
- data-test-id="hardwareStatus-button-expandDimms"
- :title="expandRowLabel"
- class="btn-icon-only"
- @click="toggleRowDetails(row)"
- >
- <icon-chevron />
- <span class="sr-only">{{ expandRowLabel }}</span>
- </b-button>
- </template>
-
- <!-- Health -->
- <template #cell(health)="{ value }">
- <status-icon :status="statusIcon(value)" />
- {{ value }}
- </template>
-
- <template #row-details="{ item }">
- <b-container fluid>
- <b-row>
- <b-col sm="6" xl="4">
- <dl>
- <!-- Status state -->
- <dt>{{ $t('pageHardwareStatus.table.statusState') }}:</dt>
- <dd>{{ tableFormatter(item.statusState) }}</dd>
- </dl>
- </b-col>
- </b-row>
- </b-container>
- </template>
- </b-table>
- </page-section>
-</template>
-
-<script>
-import PageSection from '@/components/Global/PageSection';
-import IconChevron from '@carbon/icons-vue/es/chevron--down/20';
-
-import StatusIcon from '@/components/Global/StatusIcon';
-import TableCellCount from '@/components/Global/TableCellCount';
-
-import TableDataFormatterMixin from '@/components/Mixins/TableDataFormatterMixin';
-import TableSortMixin from '@/components/Mixins/TableSortMixin';
-import Search from '@/components/Global/Search';
-import SearchFilterMixin, {
- searchFilter,
-} from '@/components/Mixins/SearchFilterMixin';
-import TableRowExpandMixin, {
- expandRowLabel,
-} from '@/components/Mixins/TableRowExpandMixin';
-
-export default {
- components: { IconChevron, PageSection, StatusIcon, Search, TableCellCount },
- mixins: [
- TableRowExpandMixin,
- TableDataFormatterMixin,
- TableSortMixin,
- SearchFilterMixin,
- ],
- data() {
- return {
- fields: [
- {
- key: 'expandRow',
- label: '',
- tdClass: 'table-row-expand',
- sortable: false,
- },
- {
- key: 'id',
- label: this.$t('pageHardwareStatus.table.id'),
- formatter: this.tableFormatter,
- sortable: true,
- },
- {
- key: 'health',
- label: this.$t('pageHardwareStatus.table.health'),
- formatter: this.tableFormatter,
- sortable: true,
- tdClass: 'text-nowrap',
- },
- {
- key: 'partNumber',
- label: this.$t('pageHardwareStatus.table.partNumber'),
- formatter: this.tableFormatter,
- sortable: true,
- },
- {
- key: 'serialNumber',
- label: this.$t('pageHardwareStatus.table.serialNumber'),
- formatter: this.tableFormatter,
- sortable: true,
- },
- ],
- searchFilter: searchFilter,
- searchTotalFilteredRows: 0,
- expandRowLabel: expandRowLabel,
- };
- },
- computed: {
- filteredRows() {
- return this.searchFilter
- ? this.searchTotalFilteredRows
- : this.dimms.length;
- },
- dimms() {
- return this.$store.getters['memory/dimms'];
- },
- },
- created() {
- this.$store.dispatch('memory/getDimms').finally(() => {
- // Emit initial data fetch complete to parent component
- this.$root.$emit('hardware-status-dimm-slot-complete');
- });
- },
- methods: {
- sortCompare(a, b, key) {
- if (key === 'health') {
- return this.sortStatus(a, b, key);
- }
- },
- onFiltered(filteredItems) {
- this.searchTotalFilteredRows = filteredItems.length;
- },
- },
-};
-</script>
diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableFans.vue b/src/views/Health/HardwareStatus/HardwareStatusTableFans.vue
deleted file mode 100644
index fb998a38..00000000
--- a/src/views/Health/HardwareStatus/HardwareStatusTableFans.vue
+++ /dev/null
@@ -1,189 +0,0 @@
-<template>
- <page-section :section-title="$t('pageHardwareStatus.fans')">
- <b-row class="align-items-end">
- <b-col sm="6" md="5" xl="4">
- <search
- @change-search="onChangeSearchInput"
- @clear-search="onClearSearchInput"
- />
- </b-col>
- <b-col sm="6" md="3" xl="2">
- <table-cell-count
- :filtered-items-count="filteredRows"
- :total-number-of-cells="fans.length"
- ></table-cell-count>
- </b-col>
- </b-row>
- <b-table
- sort-icon-left
- no-sort-reset
- hover
- responsive="md"
- sort-by="health"
- show-empty
- :items="fans"
- :fields="fields"
- :sort-desc="true"
- :sort-compare="sortCompare"
- :filter="searchFilter"
- :empty-text="$t('global.table.emptyMessage')"
- :empty-filtered-text="$t('global.table.emptySearchMessage')"
- @filtered="onFiltered"
- >
- <!-- Expand chevron icon -->
- <template #cell(expandRow)="row">
- <b-button
- variant="link"
- data-test-id="hardwareStatus-button-expandFans"
- :title="expandRowLabel"
- class="btn-icon-only"
- @click="toggleRowDetails(row)"
- >
- <icon-chevron />
- <span class="sr-only">{{ expandRowLabel }}</span>
- </b-button>
- </template>
-
- <!-- Health -->
- <template #cell(health)="{ value }">
- <status-icon :status="statusIcon(value)" />
- {{ value }}
- </template>
-
- <template #row-details="{ item }">
- <b-container fluid>
- <b-row>
- <b-col sm="6" xl="4">
- <dl>
- <!-- Name -->
- <dt>{{ $t('pageHardwareStatus.table.name') }}:</dt>
- <dd>{{ tableFormatter(item.name) }}</dd>
- </dl>
- <dl>
- <!-- Serial number -->
- <dt>{{ $t('pageHardwareStatus.table.serialNumber') }}:</dt>
- <dd>{{ tableFormatter(item.serialNumber) }}</dd>
- </dl>
- <dl>
- <!-- Part number -->
- <dt>{{ $t('pageHardwareStatus.table.partNumber') }}:</dt>
- <dd>{{ tableFormatter(item.partNumber) }}</dd>
- </dl>
- <dl>
- <!-- Fan speed -->
- <dt>{{ $t('pageHardwareStatus.table.fanSpeed') }}:</dt>
- <dd>{{ tableFormatter(item.speed) }}</dd>
- </dl>
- </b-col>
- <b-col sm="6" xl="4">
- <dl>
- <!-- Status state -->
- <dt>{{ $t('pageHardwareStatus.table.statusState') }}:</dt>
- <dd>{{ tableFormatter(item.statusState) }}</dd>
- </dl>
- <dl>
- <!-- Health Rollup state -->
- <dt>
- {{ $t('pageHardwareStatus.table.statusHealthRollup') }}:
- </dt>
- <dd>{{ tableFormatter(item.healthRollup) }}</dd>
- </dl>
- </b-col>
- </b-row>
- </b-container>
- </template>
- </b-table>
- </page-section>
-</template>
-
-<script>
-import PageSection from '@/components/Global/PageSection';
-import IconChevron from '@carbon/icons-vue/es/chevron--down/20';
-import TableCellCount from '@/components/Global/TableCellCount';
-
-import StatusIcon from '@/components/Global/StatusIcon';
-import TableDataFormatterMixin from '@/components/Mixins/TableDataFormatterMixin';
-import TableSortMixin from '@/components/Mixins/TableSortMixin';
-import Search from '@/components/Global/Search';
-import SearchFilterMixin, {
- searchFilter,
-} from '@/components/Mixins/SearchFilterMixin';
-import TableRowExpandMixin, {
- expandRowLabel,
-} from '@/components/Mixins/TableRowExpandMixin';
-
-export default {
- components: { IconChevron, PageSection, StatusIcon, Search, TableCellCount },
- mixins: [
- TableRowExpandMixin,
- TableDataFormatterMixin,
- TableSortMixin,
- SearchFilterMixin,
- ],
- data() {
- return {
- fields: [
- {
- key: 'expandRow',
- label: '',
- tdClass: 'table-row-expand',
- sortable: false,
- },
- {
- key: 'id',
- label: this.$t('pageHardwareStatus.table.id'),
- formatter: this.tableFormatter,
- sortable: true,
- },
- {
- key: 'health',
- label: this.$t('pageHardwareStatus.table.health'),
- formatter: this.tableFormatter,
- sortable: true,
- tdClass: 'text-nowrap',
- },
- {
- key: 'locationNumber',
- label: this.$t('pageHardwareStatus.table.locationNumber'),
- formatter: this.tableFormatter,
- sortable: true,
- },
- {
- key: 'identifyLed',
- label: this.$t('pageHardwareStatus.table.identifyLed'),
- formatter: this.tableFormatter,
- },
- ],
- searchFilter: searchFilter,
- searchTotalFilteredRows: 0,
- expandRowLabel: expandRowLabel,
- };
- },
- computed: {
- filteredRows() {
- return this.searchFilter
- ? this.searchTotalFilteredRows
- : this.fans.length;
- },
- fans() {
- return this.$store.getters['fan/fans'];
- },
- },
- created() {
- this.$store.dispatch('fan/getFanInfo').finally(() => {
- // Emit initial data fetch complete to parent component
- this.$root.$emit('hardware-status-fans-complete');
- });
- },
- methods: {
- sortCompare(a, b, key) {
- if (key === 'health') {
- return this.sortStatus(a, b, key);
- }
- },
- onFiltered(filteredItems) {
- this.searchTotalFilteredRows = filteredItems.length;
- },
- },
-};
-</script>
diff --git a/src/views/Health/HardwareStatus/HardwareStatusTablePowerSupplies.vue b/src/views/Health/HardwareStatus/HardwareStatusTablePowerSupplies.vue
deleted file mode 100644
index a3d07655..00000000
--- a/src/views/Health/HardwareStatus/HardwareStatusTablePowerSupplies.vue
+++ /dev/null
@@ -1,207 +0,0 @@
-<template>
- <page-section :section-title="$t('pageHardwareStatus.powerSupplies')">
- <b-row class="align-items-end">
- <b-col sm="6" md="5" xl="4">
- <search
- @change-search="onChangeSearchInput"
- @clear-search="onClearSearchInput"
- />
- </b-col>
- <b-col sm="6" md="3" xl="2">
- <table-cell-count
- :filtered-items-count="filteredRows"
- :total-number-of-cells="powerSupplies.length"
- ></table-cell-count>
- </b-col>
- </b-row>
- <b-table
- sort-icon-left
- no-sort-reset
- hover
- responsive="md"
- sort-by="health"
- show-empty
- :items="powerSupplies"
- :fields="fields"
- :sort-desc="true"
- :sort-compare="sortCompare"
- :filter="searchFilter"
- :empty-text="$t('global.table.emptyMessage')"
- :empty-filtered-text="$t('global.table.emptySearchMessage')"
- @filtered="onFiltered"
- >
- <!-- Expand chevron icon -->
- <template #cell(expandRow)="row">
- <b-button
- variant="link"
- data-test-id="hardwareStatus-button-expandPowerSupplies"
- :title="expandRowLabel"
- class="btn-icon-only"
- @click="toggleRowDetails(row)"
- >
- <icon-chevron />
- <span class="sr-only">{{ expandRowLabel }}</span>
- </b-button>
- </template>
-
- <!-- Health -->
- <template #cell(health)="{ value }">
- <status-icon :status="statusIcon(value)" />
- {{ value }}
- </template>
-
- <template #row-details="{ item }">
- <b-container fluid>
- <b-row>
- <b-col sm="6" xl="4">
- <dl>
- <!-- Name -->
- <dt>{{ $t('pageHardwareStatus.table.name') }}:</dt>
- <dd>{{ tableFormatter(item.name) }}</dd>
- <!-- Part number -->
- <dt>{{ $t('pageHardwareStatus.table.partNumber') }}:</dt>
- <dd>{{ tableFormatter(item.partNumber) }}</dd>
- <!-- Serial number -->
- <dt>{{ $t('pageHardwareStatus.table.serialNumber') }}:</dt>
- <dd>{{ tableFormatter(item.serialNumber) }}</dd>
- <!-- Spare part number -->
- <dt>{{ $t('pageHardwareStatus.table.sparePartNumber') }}:</dt>
- <dd>{{ tableFormatter(item.sparePartNumber) }}</dd>
- <!-- Model -->
- <dt>{{ $t('pageHardwareStatus.table.model') }}:</dt>
- <dd>{{ tableFormatter(item.model) }}</dd>
- </dl>
- </b-col>
- <b-col sm="6" xl="4">
- <dl>
- <!-- Status state -->
- <dt>{{ $t('pageHardwareStatus.table.statusState') }}:</dt>
- <dd>{{ tableFormatter(item.statusState) }}</dd>
- <!-- Status Health rollup state -->
- <dt>
- {{ $t('pageHardwareStatus.table.statusHealthRollup') }}:
- </dt>
- <dd>{{ tableFormatter(item.statusHealth) }}</dd>
- <!-- Efficiency percent -->
- <dt>{{ $t('pageHardwareStatus.table.efficiencyPercent') }}:</dt>
- <dd>{{ tableFormatter(item.efficiencyPercent) }}</dd>
- <!-- Power input watts -->
- <dt>{{ $t('pageHardwareStatus.table.powerInputWatts') }}:</dt>
- <dd>{{ tableFormatter(item.powerInputWatts) }}</dd>
- </dl>
- </b-col>
- </b-row>
- <div class="section-divider mb-3 mt-3"></div>
- <b-row>
- <b-col sm="6" xl="4">
- <dl>
- <!-- Manufacturer -->
- <dt>{{ $t('pageHardwareStatus.table.manufacturer') }}:</dt>
- <dd>{{ tableFormatter(item.manufacturer) }}</dd>
- </dl>
- </b-col>
- <b-col sm="6" xl="4">
- <dl>
- <!-- Firmware version -->
- <dt>{{ $t('pageHardwareStatus.table.firmwareVersion') }}:</dt>
- <dd>{{ tableFormatter(item.firmwareVersion) }}</dd>
- </dl>
- </b-col>
- </b-row>
- </b-container>
- </template>
- </b-table>
- </page-section>
-</template>
-
-<script>
-import PageSection from '@/components/Global/PageSection';
-import IconChevron from '@carbon/icons-vue/es/chevron--down/20';
-
-import StatusIcon from '@/components/Global/StatusIcon';
-import TableCellCount from '@/components/Global/TableCellCount';
-import TableDataFormatterMixin from '@/components/Mixins/TableDataFormatterMixin';
-import TableSortMixin from '@/components/Mixins/TableSortMixin';
-import Search from '@/components/Global/Search';
-import SearchFilterMixin, {
- searchFilter,
-} from '@/components/Mixins/SearchFilterMixin';
-import TableRowExpandMixin, {
- expandRowLabel,
-} from '@/components/Mixins/TableRowExpandMixin';
-
-export default {
- components: { IconChevron, PageSection, StatusIcon, Search, TableCellCount },
- mixins: [
- TableRowExpandMixin,
- TableDataFormatterMixin,
- TableSortMixin,
- SearchFilterMixin,
- ],
- data() {
- return {
- fields: [
- {
- key: 'expandRow',
- label: '',
- tdClass: 'table-row-expand',
- sortable: false,
- },
- {
- key: 'id',
- label: this.$t('pageHardwareStatus.table.id'),
- formatter: this.tableFormatter,
- sortable: true,
- },
- {
- key: 'health',
- label: this.$t('pageHardwareStatus.table.health'),
- formatter: this.tableFormatter,
- sortable: true,
- tdClass: 'text-nowrap',
- },
- {
- key: 'locationNumber',
- label: this.$t('pageHardwareStatus.table.locationNumber'),
- formatter: this.tableFormatter,
- sortable: true,
- },
- {
- key: 'identifyLed',
- label: this.$t('pageHardwareStatus.table.identifyLed'),
- formatter: this.tableFormatter,
- },
- ],
- searchFilter: searchFilter,
- searchTotalFilteredRows: 0,
- expandRowLabel: expandRowLabel,
- };
- },
- computed: {
- filteredRows() {
- return this.searchFilter
- ? this.searchTotalFilteredRows
- : this.powerSupplies.length;
- },
- powerSupplies() {
- return this.$store.getters['powerSupply/powerSupplies'];
- },
- },
- created() {
- this.$store.dispatch('powerSupply/getAllPowerSupplies').finally(() => {
- // Emit initial data fetch complete to parent component
- this.$root.$emit('hardware-status-power-supplies-complete');
- });
- },
- methods: {
- sortCompare(a, b, key) {
- if (key === 'health') {
- return this.sortStatus(a, b, key);
- }
- },
- onFiltered(filteredItems) {
- this.searchTotalFilteredRows = filteredItems.length;
- },
- },
-};
-</script>
diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableProcessors.vue b/src/views/Health/HardwareStatus/HardwareStatusTableProcessors.vue
deleted file mode 100644
index e3b5735d..00000000
--- a/src/views/Health/HardwareStatus/HardwareStatusTableProcessors.vue
+++ /dev/null
@@ -1,250 +0,0 @@
-<template>
- <page-section :section-title="$t('pageHardwareStatus.processors')">
- <!-- Search -->
- <b-row class="align-items-end">
- <b-col sm="6" md="5" xl="4">
- <search
- @change-search="onChangeSearchInput"
- @clear-search="onClearSearchInput"
- />
- </b-col>
- <b-col sm="6" md="3" xl="2">
- <table-cell-count
- :filtered-items-count="filteredRows"
- :total-number-of-cells="processors.length"
- ></table-cell-count>
- </b-col>
- </b-row>
- <b-table
- sort-icon-left
- no-sort-reset
- hover
- responsive="md"
- show-empty
- :items="processors"
- :fields="fields"
- :sort-desc="true"
- :filter="searchFilter"
- :empty-text="$t('global.table.emptyMessage')"
- :empty-filtered-text="$t('global.table.emptySearchMessage')"
- @filtered="onFiltered"
- >
- <!-- Expand button -->
- <template #cell(expandRow)="row">
- <b-button
- variant="link"
- data-test-id="hardwareStatus-button-expandProcessors"
- :title="expandRowLabel"
- class="btn-icon-only"
- @click="toggleRowDetails(row)"
- >
- <icon-chevron />
- <span class="sr-only">{{ expandRowLabel }}</span>
- </b-button>
- </template>
- <!-- Health -->
- <template #cell(health)="{ value }">
- <status-icon :status="statusIcon(value)" />
- {{ value }}
- </template>
-
- <!-- Toggle identify LED -->
- <template #cell(identifyLed)="row">
- <b-form-checkbox
- v-if="hasIdentifyLed(row.item.identifyLed)"
- v-model="row.item.identifyLed"
- name="switch"
- switch
- @change="toggleIdentifyLedValue(row.item)"
- >
- <span v-if="row.item.identifyLed">
- {{ $t('global.status.on') }}
- </span>
- <span v-else> {{ $t('global.status.off') }} </span>
- </b-form-checkbox>
- <div v-else>--</div>
- </template>
-
- <template #row-details="{ item }">
- <b-container fluid>
- <b-row>
- <b-col class="mt-2" sm="6" xl="6">
- <dl>
- <!-- Name -->
- <dt>{{ $t('pageHardwareStatus.table.name') }}:</dt>
- <dd>{{ tableFormatter(item.name) }}</dd>
- <!-- Part Number -->
- <dt>{{ $t('pageHardwareStatus.table.partNumber') }}:</dt>
- <dd>{{ tableFormatter(item.partNumber) }}</dd>
- <!-- Serial Number -->
- <dt>{{ $t('pageHardwareStatus.table.serialNumber') }}:</dt>
- <dd>{{ tableFormatter(item.serialNumber) }}</dd>
- <!-- Spare Part Number -->
- <dt>{{ $t('pageHardwareStatus.table.sparePartNumber') }}:</dt>
- <dd>{{ tableFormatter(item.sparePartNumber) }}</dd>
- <!-- Model -->
- <dt>{{ $t('pageHardwareStatus.table.model') }}:</dt>
- <dd>{{ tableFormatter(item.model) }}</dd>
- <!-- Asset Tag -->
- <dt>{{ $t('pageHardwareStatus.table.assetTag') }}:</dt>
- <dd>{{ tableFormatter(item.assetTag) }}</dd>
- </dl>
- </b-col>
- <b-col class="mt-2" sm="6" xl="6">
- <dl>
- <!-- Status state -->
- <dt>{{ $t('pageHardwareStatus.table.statusState') }}:</dt>
- <dd>{{ tableFormatter(item.statusState) }}</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" xl="6">
- <dl>
- <!-- Manufacturer -->
- <dt>{{ $t('pageHardwareStatus.table.manufacturer') }}:</dt>
- <dd>{{ tableFormatter(item.manufacturer) }}</dd>
- <!-- Processor Type -->
- <dt>{{ $t('pageHardwareStatus.table.processorType') }}:</dt>
- <dd>{{ tableFormatter(item.processorType) }}</dd>
- <!-- Processor Architecture -->
- <dt>
- {{ $t('pageHardwareStatus.table.processorArchitecture') }}:
- </dt>
- <dd>{{ tableFormatter(item.processorArchitecture) }}</dd>
- <!-- Instruction Set -->
- <dt>{{ $t('pageHardwareStatus.table.instructionSet') }}:</dt>
- <dd>{{ tableFormatter(item.instructionSet) }}</dd>
- <!-- Version -->
- <dt>{{ $t('pageHardwareStatus.table.version') }}:</dt>
- <dd>{{ tableFormatter(item.version) }}</dd>
- </dl>
- </b-col>
- <b-col class="mt-1" sm="6" xl="6">
- <dl>
- <!-- Min Speed MHz -->
- <dt>{{ $t('pageHardwareStatus.table.minSpeedMHz') }}:</dt>
- <dd>{{ tableFormatter(item.minSpeedMHz) }}</dd>
- <!-- Max Speed MHz -->
- <dt>{{ $t('pageHardwareStatus.table.maxSpeedMHz') }}:</dt>
- <dd>{{ tableFormatter(item.maxSpeedMHz) }}</dd>
- <!-- Total Cores -->
- <dt>{{ $t('pageHardwareStatus.table.totalCores') }}:</dt>
- <dd>{{ tableFormatter(item.totalCores) }}</dd>
- <!-- Total Threads -->
- <dt>{{ $t('pageHardwareStatus.table.totalThreads') }}:</dt>
- <dd>{{ tableFormatter(item.totalThreads) }}</dd>
- </dl>
- </b-col>
- </b-row>
- </b-container>
- </template>
- </b-table>
- </page-section>
-</template>
-
-<script>
-import PageSection from '@/components/Global/PageSection';
-import IconChevron from '@carbon/icons-vue/es/chevron--down/20';
-import StatusIcon from '@/components/Global/StatusIcon';
-import TableCellCount from '@/components/Global/TableCellCount';
-import BVToastMixin from '@/components/Mixins/BVToastMixin';
-import TableSortMixin from '@/components/Mixins/TableSortMixin';
-import TableDataFormatterMixin from '@/components/Mixins/TableDataFormatterMixin';
-import Search from '@/components/Global/Search';
-import SearchFilterMixin, {
- searchFilter,
-} from '@/components/Mixins/SearchFilterMixin';
-import TableRowExpandMixin, {
- expandRowLabel,
-} from '@/components/Mixins/TableRowExpandMixin';
-
-export default {
- components: { IconChevron, PageSection, StatusIcon, Search, TableCellCount },
- mixins: [
- BVToastMixin,
- TableRowExpandMixin,
- TableDataFormatterMixin,
- TableSortMixin,
- SearchFilterMixin,
- ],
- data() {
- return {
- fields: [
- {
- key: 'expandRow',
- label: '',
- tdClass: 'table-row-expand',
- sortable: false,
- },
- {
- key: 'id',
- label: this.$t('pageHardwareStatus.table.id'),
- formatter: this.tableFormatter,
- sortable: true,
- },
- {
- key: 'health',
- label: this.$t('pageHardwareStatus.table.health'),
- formatter: this.tableFormatter,
- sortable: true,
- tdClass: 'text-nowrap',
- },
- {
- key: 'locationNumber',
- label: this.$t('pageHardwareStatus.table.locationNumber'),
- formatter: this.tableFormatter,
- sortable: true,
- },
- {
- key: 'identifyLed',
- label: this.$t('pageHardwareStatus.table.identifyLed'),
- formatter: this.tableFormatter,
- sortable: false,
- },
- ],
- searchFilter: searchFilter,
- searchTotalFilteredRows: 0,
- expandRowLabel: expandRowLabel,
- };
- },
- computed: {
- filteredRows() {
- return this.searchFilter
- ? this.searchTotalFilteredRows
- : this.processors.length;
- },
- processors() {
- return this.$store.getters['processors/processors'];
- },
- },
- created() {
- this.$store.dispatch('processors/getProcessorsInfo').finally(() => {
- // Emit initial data fetch complete to parent component
- this.$root.$emit('hardware-status-processors-complete');
- });
- },
- methods: {
- onFiltered(filteredItems) {
- this.searchTotalFilteredRows = filteredItems.length;
- },
- toggleIdentifyLedValue(row) {
- this.$store
- .dispatch('processors/updateIdentifyLedValue', {
- uri: row.uri,
- identifyLed: row.identifyLed,
- })
- .catch(({ message }) => this.errorToast(message));
- },
- // TO DO: remove hasIdentifyLed when the following is merged:
- // https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/37045
- hasIdentifyLed(identifyLed) {
- return typeof identifyLed === 'boolean';
- },
- },
-};
-</script>
diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableStystem.vue b/src/views/Health/HardwareStatus/HardwareStatusTableStystem.vue
deleted file mode 100644
index 1dccd51c..00000000
--- a/src/views/Health/HardwareStatus/HardwareStatusTableStystem.vue
+++ /dev/null
@@ -1,210 +0,0 @@
-<template>
- <page-section :section-title="$t('pageHardwareStatus.system')">
- <b-table
- responsive="md"
- hover
- show-empty
- :items="systems"
- :fields="fields"
- :empty-text="$t('global.table.emptyMessage')"
- >
- <!-- Expand chevron icon -->
- <template #cell(expandRow)="row">
- <b-button
- variant="link"
- data-test-id="hardwareStatus-button-expandSystem"
- :title="expandRowLabel"
- class="btn-icon-only"
- @click="toggleRowDetails(row)"
- >
- <icon-chevron />
- <span class="sr-only">{{ expandRowLabel }}</span>
- </b-button>
- </template>
-
- <!-- Health -->
- <template #cell(health)="{ value }">
- <status-icon :status="statusIcon(value)" />
- {{ 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 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>
- <!-- Sub Model -->
- <dt>{{ $t('pageHardwareStatus.table.subModel') }}:</dt>
- <dd>
- {{ tableFormatter(item.subModel) }}
- </dd>
- <!-- System Type -->
- <dt>{{ $t('pageHardwareStatus.table.systemType') }}:</dt>
- <dd>
- {{ tableFormatter(item.systemType) }}
- </dd>
- </dl>
- </b-col>
- <b-col sm="6">
- <dl>
- <!-- Memory Summary -->
- <dt class="mt-1 mb-2 font-weight-bold float-none">
- {{ $t('pageHardwareStatus.table.memorySummary') }}
- </dt>
- <!-- Status state -->
- <dt>{{ $t('pageHardwareStatus.table.statusState') }}:</dt>
- <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>
- </b-container>
- </template>
- </b-table>
- </page-section>
-</template>
-
-<script>
-import BVToastMixin from '@/components/Mixins/BVToastMixin';
-import PageSection from '@/components/Global/PageSection';
-import IconChevron from '@carbon/icons-vue/es/chevron--down/20';
-
-import StatusIcon from '@/components/Global/StatusIcon';
-
-import TableRowExpandMixin, {
- expandRowLabel,
-} from '@/components/Mixins/TableRowExpandMixin';
-import TableDataFormatterMixin from '@/components/Mixins/TableDataFormatterMixin';
-
-export default {
- components: { IconChevron, PageSection, StatusIcon },
- mixins: [BVToastMixin, TableRowExpandMixin, TableDataFormatterMixin],
- data() {
- return {
- fields: [
- {
- key: 'expandRow',
- label: '',
- tdClass: 'table-row-expand',
- },
- {
- key: 'id',
- label: this.$t('pageHardwareStatus.table.id'),
- 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: 'locationNumber',
- label: this.$t('pageHardwareStatus.table.locationNumber'),
- formatter: this.tableFormatter,
- },
- {
- key: 'locationIndicatorActive',
- label: this.$t('pageHardwareStatus.table.identifyLed'),
- formatter: this.tableFormatter,
- },
- ],
- expandRowLabel: expandRowLabel,
- };
- },
- computed: {
- systems() {
- return this.$store.getters['system/systems'];
- },
- },
- created() {
- this.$store.dispatch('system/getSystem').finally(() => {
- // Emit initial data fetch complete to parent component
- this.$root.$emit('hardware-status-system-complete');
- });
- },
- methods: {
- toggleIdentifyLedSwitch(state) {
- this.$store
- .dispatch('system/changeIdentifyLedState', state)
- .catch(({ message }) => this.errorToast(message));
- },
- },
-};
-</script>
diff --git a/src/views/Health/HardwareStatus/index.js b/src/views/Health/HardwareStatus/index.js
deleted file mode 100644
index 25d4551c..00000000
--- a/src/views/Health/HardwareStatus/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import HardwareStatus from './HardwareStatus.vue';
-export default HardwareStatus;