summaryrefslogtreecommitdiff
path: root/src/views/_sila/Overview/Inventory/InventoryPciDevices.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/_sila/Overview/Inventory/InventoryPciDevices.vue')
-rw-r--r--src/views/_sila/Overview/Inventory/InventoryPciDevices.vue43
1 files changed, 13 insertions, 30 deletions
diff --git a/src/views/_sila/Overview/Inventory/InventoryPciDevices.vue b/src/views/_sila/Overview/Inventory/InventoryPciDevices.vue
index 74858649..9e5ec4d4 100644
--- a/src/views/_sila/Overview/Inventory/InventoryPciDevices.vue
+++ b/src/views/_sila/Overview/Inventory/InventoryPciDevices.vue
@@ -4,7 +4,7 @@
responsive="md"
show-empty
hover
- :items="items"
+ :items="pci"
:fields="fields"
:empty-text="$t('global.table.emptyMessage')"
:busy="isBusy"
@@ -12,8 +12,8 @@
<template #cell(expandRow)="row">
<b-button
v-if="
- items[row.index].DeviceType !== 'SingleFunction' &&
- items[row.index].Functions
+ pci[row.index].DeviceType !== 'SingleFunction' &&
+ pci[row.index].Functions
"
variant="link"
:title="expandRowLabel"
@@ -24,30 +24,18 @@
<span class="sr-only">{{ expandRowLabel }}</span>
</b-button>
</template>
- <template #cell(DeviceName)="data">
- <span v-if="items[data.index].DeviceType === 'SingleFunction'">
- {{ data.value }}</span
- >
- <span v-else>
- {{
- items[data.index].Functions
- ? items[data.index].Functions[0].DeviceName
- : '--'
- }}</span
- >
- </template>
<template #cell(health)>
<status-icon :status="statusIcon('OK')" />
{{ $t('pagePci.table.health_d') }}
</template>
<template #cell(deviceClass)="data">
- <span v-if="items[data.index].DeviceType === 'SingleFunction'">
+ <span v-if="pci[data.index].DeviceType === 'SingleFunction'">
{{ data.value }}</span
>
<span v-else>
{{
- items[data.index].Functions
- ? items[data.index].Functions[0].deviceClass
+ pci[data.index].Functions
+ ? pci[data.index].Functions[0].deviceClass
: '--'
}}</span
>
@@ -81,6 +69,8 @@
</template>
<script>
+import { mapState } from 'vuex';
+
import PageSection from '@/components/_sila/Global/PageSection';
import IconChevron from '@carbon/icons-vue/es/chevron--down/20';
import StatusIcon from '@/components/_sila/Global/StatusIcon';
@@ -136,21 +126,14 @@ export default {
},
computed: {
- items() {
- return this.$store.getters['pci/pciDevices'];
- },
+ ...mapState('pciStore', ['pci']),
},
created() {
- return this.$store
- .dispatch('pci/getDevices')
- .then(() => {
- this.$store.dispatch('pci/getDevicesMembers');
- })
- .finally(() => {
- this.$root.$emit('hardware-status-pci-complete');
- this.isBusy = false;
- });
+ return this.$store.dispatch('pciStore/getDevices').finally(() => {
+ this.$root.$emit('hardware-status-pci-complete');
+ this.isBusy = false;
+ });
},
};
</script>