From 51afd867f9ae51c6c11c48bdfec91d4988f35397 Mon Sep 17 00:00:00 2001 From: Maksim Zakharov Date: Thu, 18 Aug 2022 17:33:32 +0300 Subject: add status for pci devises --- src/views/_sila/PciDevices/PciDevices.vue | 39 +++++++++++++++++-------------- 1 file changed, 21 insertions(+), 18 deletions(-) (limited to 'src/views') diff --git a/src/views/_sila/PciDevices/PciDevices.vue b/src/views/_sila/PciDevices/PciDevices.vue index 77f40b66..fc3e4527 100644 --- a/src/views/_sila/PciDevices/PciDevices.vue +++ b/src/views/_sila/PciDevices/PciDevices.vue @@ -22,46 +22,46 @@ import PageSection from '@/components/_sila/Global/PageSection'; import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import TableRowExpandMixin, { + expandRowLabel, +} from '@/components/_ibs/Mixins/TableRowExpandMixin'; export default { components: { PageTitle, PageSection }, - mixins: [DataFormatterMixin, LoadingBarMixin], + mixins: [DataFormatterMixin, LoadingBarMixin, TableRowExpandMixin], data() { return { isBusy: true, fields: [ { - key: 'id', - label: this.$t('pagePci.table.id'), - formatter: this.dataFormatter, - tdClass: 'text-nowrap', + key: 'expandRow', + label: '', + tdClass: 'table-row-expand', + sortable: false, }, { - key: 'name', + key: 'DeviceName', label: this.$t('pagePci.table.name'), formatter: this.dataFormatter, }, { - key: 'type', - label: this.$t('pagePci.table.type'), - formatter: this.dataFormatter, - }, - { - key: 'manufacturer', - label: this.$t('pagePci.table.manufacturer'), + key: 'health', + label: this.$t('pagePci.table.health'), formatter: this.dataFormatter, + tdClass: 'text-nowrap', }, { - key: 'classCode', - label: this.$t('pagePci.table.classCode'), + key: 'deviceClass', + label: this.$t('pagePci.table.type'), formatter: this.dataFormatter, }, { - key: 'deviceClass', - label: this.$t('pagePci.table.deviceClass'), + key: 'manufacturer', + label: this.$t('pagePci.table.manufacturer'), formatter: this.dataFormatter, }, ], + expandRowLabel: expandRowLabel, }; }, @@ -73,8 +73,11 @@ export default { created() { this.startLoader(); - this.$store + return this.$store .dispatch('pci/getDevices') + .then(() => { + return this.$store.dispatch('pci/getDevicesMembers'); + }) .then(() => { this.$store.dispatch('pci/getFunctionDevices'); }) -- cgit v1.2.3