summaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
authorYoshie Muranaka <yoshiemuranaka@gmail.com>2020-06-12 18:29:42 +0300
committerYoshie Muranaka <yoshiemuranaka@gmail.com>2020-06-18 00:18:37 +0300
commit54c6bfc2d40def4db1bc3a13ab92ee71091b1e4f (patch)
tree19b739c20f1a61a3459ad130180e6ca376bced32 /src/views
parent09e8b5d478f212c094b7bea66c570fe0e673756e (diff)
downloadwebui-vue-54c6bfc2d40def4db1bc3a13ab92ee71091b1e4f.tar.xz
Add BMC manager table to hardware status page
Add properties at /redfish/v1/Managers/bmc endpoint in a table with expandable row to view details. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: Ieb32a9b2a535ddd7d24edcb68761c51eace2e5a8
Diffstat (limited to 'src/views')
-rw-r--r--src/views/Health/HardwareStatus/HardwareStatus.vue9
-rw-r--r--src/views/Health/HardwareStatus/HardwareStatusTableBmcManager.vue186
2 files changed, 195 insertions, 0 deletions
diff --git a/src/views/Health/HardwareStatus/HardwareStatus.vue b/src/views/Health/HardwareStatus/HardwareStatus.vue
index 598313e1..364baad2 100644
--- a/src/views/Health/HardwareStatus/HardwareStatus.vue
+++ b/src/views/Health/HardwareStatus/HardwareStatus.vue
@@ -5,6 +5,9 @@
<!-- System table -->
<table-system />
+ <!-- BMC manager table -->
+ <table-bmc-manager />
+
<!-- Chassis table -->
<table-chassis />
@@ -25,6 +28,7 @@ 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 LoadingBarMixin from '@/components/Mixins/LoadingBarMixin';
@@ -35,6 +39,7 @@ export default {
TablePowerSupplies,
TableSystem,
TableFans,
+ TableBmcManager,
TableChassis
},
mixins: [LoadingBarMixin],
@@ -43,6 +48,9 @@ export default {
const systemTablePromise = new Promise(resolve => {
this.$root.$on('hardwareStatus::system::complete', () => resolve());
});
+ const bmcManagerTablePromise = new Promise(resolve => {
+ this.$root.$on('hardwareStatus::bmcManager::complete', () => resolve());
+ });
const chassisTablePromise = new Promise(resolve => {
this.$root.$on('hardwareStatus::chassis::complete', () => resolve());
});
@@ -61,6 +69,7 @@ export default {
// when page data load complete
Promise.all([
systemTablePromise,
+ bmcManagerTablePromise,
chassisTablePromise,
dimmSlotTablePromise,
fansTablePromise,
diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableBmcManager.vue b/src/views/Health/HardwareStatus/HardwareStatusTableBmcManager.vue
new file mode 100644
index 00000000..94dde6d4
--- /dev/null
+++ b/src/views/Health/HardwareStatus/HardwareStatusTableBmcManager.vue
@@ -0,0 +1,186 @@
+<template>
+ <page-section :section-title="$t('pageHardwareStatus.bmcManager')">
+ <b-table :items="items" :fields="fields">
+ <!-- Expand chevron icon -->
+ <template v-slot:cell(expandRow)="row">
+ <b-button variant="link" @click="row.toggleDetails">
+ <icon-chevron />
+ </b-button>
+ </template>
+
+ <!-- Health -->
+ <template v-slot:cell(health)="{ value }">
+ <status-icon :status="statusIcon(value)" />
+ {{ value }}
+ </template>
+
+ <template v-slot:row-details="{ item }">
+ <b-container fluid>
+ <b-row>
+ <b-col sm="6">
+ <dl>
+ <!-- Description -->
+ <dt class="d-block">
+ {{ $t('pageHardwareStatus.table.description') }}:
+ </dt>
+ <dd class="mb-4">
+ {{ tableFormatter(item.description) }}
+ </dd>
+ <br />
+ <!-- Firmware version -->
+ <dt class="d-block">
+ {{ $t('pageHardwareStatus.table.firmwareVersion') }}:
+ </dt>
+ <dd class="mb-4">
+ {{ tableFormatter(item.firmwareVersion) }}
+ </dd>
+ <br />
+ <!-- Service entry point UUID -->
+ <dt class="d-block">
+ {{ $t('pageHardwareStatus.table.serviceEntryPointUuid') }}:
+ </dt>
+ <dd class="mb-4">
+ {{ tableFormatter(item.serviceEntryPointUuid) }}
+ </dd>
+ <br />
+ <!-- UUID -->
+ <dt class="d-block">
+ {{ $t('pageHardwareStatus.table.uuid') }}:
+ </dt>
+ <dd class="mb-4">
+ {{ tableFormatter(item.uuid) }}
+ </dd>
+ </dl>
+ </b-col>
+ <b-col sm="6">
+ <dl>
+ <!-- Power state -->
+ <dt>{{ $t('pageHardwareStatus.table.powerState') }}:</dt>
+ <dd>{{ tableFormatter(item.powerState) }}</dd>
+ <br />
+
+ <!-- Model -->
+ <dt>{{ $t('pageHardwareStatus.table.model') }}:</dt>
+ <dd>{{ tableFormatter(item.model) }}</dd>
+ <br />
+
+ <!-- Health rollup -->
+ <dt>
+ {{ $t('pageHardwareStatus.table.statusHealthRollup') }}:
+ </dt>
+ <dd>{{ tableFormatter(item.healthRollup) }}</dd>
+ <br />
+
+ <!-- Status state -->
+ <dt>{{ $t('pageHardwareStatus.table.statusState') }}:</dt>
+ <dd>{{ tableFormatter(item.statusState) }}</dd>
+ <br />
+
+ <!-- Graphical console -->
+ <dt class="font-weight-bold mt-3 mb-2 d-block">
+ {{ $t('pageHardwareStatus.table.graphicalConsole') }}
+ </dt>
+ <dt>
+ {{ $t('pageHardwareStatus.table.connectTypesSupported') }}:
+ </dt>
+ <dd>
+ {{ tableFormatterArray(item.graphicalConsoleConnectTypes) }}
+ </dd>
+ <br />
+ <dt>
+ {{ $t('pageHardwareStatus.table.maxConcurrentSessions') }}:
+ </dt>
+ <dd>{{ tableFormatter(item.graphicalConsoleMaxSessions) }}</dd>
+ <br />
+ <dt>{{ $t('pageHardwareStatus.table.serviceEnabled') }}:</dt>
+ <dd>{{ tableFormatter(item.graphicalConsoleEnabled) }}</dd>
+ <br />
+
+ <!-- Serial console -->
+ <dt class="font-weight-bold mt-3 mb-2 d-block">
+ {{ $t('pageHardwareStatus.table.serialConsole') }}
+ </dt>
+ <dt>
+ {{ $t('pageHardwareStatus.table.connectTypesSupported') }}:
+ </dt>
+ <dd>
+ {{ tableFormatterArray(item.serialConsoleConnectTypes) }}
+ </dd>
+ <br />
+ <dt>
+ {{ $t('pageHardwareStatus.table.maxConcurrentSessions') }}:
+ </dt>
+ <dd>{{ tableFormatter(item.serialConsoleMaxSessions) }}</dd>
+ <br />
+ <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 TableDataFormatter from '@/components/Mixins/TableDataFormatter';
+
+export default {
+ components: { IconChevron, PageSection, StatusIcon },
+ mixins: [TableDataFormatter],
+ 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: 'partNumber',
+ label: this.$t('pageHardwareStatus.table.partNumber'),
+ formatter: this.tableFormatter
+ },
+ {
+ key: 'serialNumber',
+ label: this.$t('pageHardwareStatus.table.serialNumber'),
+ formatter: this.tableFormatter
+ }
+ ]
+ };
+ },
+ 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 intial data fetch complete to parent component
+ this.$root.$emit('hardwareStatus::bmcManager::complete');
+ });
+ }
+};
+</script>