summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksim Zakharov <m.zakharov@IBS.RU>2022-08-24 12:40:45 +0300
committerMaksim Zakharov <m.zakharov@IBS.RU>2022-08-24 12:40:45 +0300
commit155fcf7d6f5498604674e2d6bb77e734468a236b (patch)
treef8cae55809dddc7317423dfb299ff3fe45bdcfa0
parent25ae6bf858099a438387a1688b4e32c2e129e988 (diff)
downloadwebui-vue-155fcf7d6f5498604674e2d6bb77e734468a236b.tar.xz
fix for inventory pci devices
-rw-r--r--src/views/_sila/Overview/Inventory/InventoryPciDevices.vue25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/views/_sila/Overview/Inventory/InventoryPciDevices.vue b/src/views/_sila/Overview/Inventory/InventoryPciDevices.vue
index 91e131de..81ff0000 100644
--- a/src/views/_sila/Overview/Inventory/InventoryPciDevices.vue
+++ b/src/views/_sila/Overview/Inventory/InventoryPciDevices.vue
@@ -11,7 +11,10 @@
>
<template #cell(expandRow)="row">
<b-button
- v-if="items[row.index].DeviceType !== 'SingleFunction'"
+ v-if="
+ items[row.index].DeviceType !== 'SingleFunction' &&
+ items[row.index].Functions
+ "
variant="link"
:title="expandRowLabel"
class="btn-icon-only"
@@ -27,7 +30,7 @@
>
<span v-else>
{{
- items[data.index].Functions[0].DeviceName
+ items[data.index].Functions
? items[data.index].Functions[0].DeviceName
: '--'
}}</span
@@ -41,7 +44,13 @@
<span v-if="items[data.index].DeviceType === 'SingleFunction'">
{{ data.value }}</span
>
- <span v-else> {{ items[data.index].Functions[0].deviceClass }}</span>
+ <span v-else>
+ {{
+ items[data.index].Functions
+ ? items[data.index].Functions[0].deviceClass
+ : '--'
+ }}</span
+ >
</template>
<template #row-details="data">
<b-container fluid>
@@ -49,13 +58,19 @@
<b-col xs="6">
<dl>
<dt>{{ $t('pagePci.table.name') }}:</dt>
- <dd>{{ dataFormatter(item.DeviceName) }}</dd>
+ <dd v-if="item.DeviceName">
+ {{ dataFormatter(item.DeviceName) }}
+ </dd>
+ <dd v-else>{{ '--' }}</dd>
</dl>
</b-col>
<b-col xs="6">
<dl>
<dt>{{ $t('pagePci.table.type') }}:</dt>
- <dd>{{ dataFormatter(item.deviceClass) }}</dd>
+ <dd v-if="item.deviceClass">
+ {{ dataFormatter(item.deviceClass) }}
+ </dd>
+ <dd v-else>{{ '--' }}</dd>
</dl>
</b-col>
</b-row>