summaryrefslogtreecommitdiff
path: root/src/views/_sila/PciDevices/PciDevices.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/_sila/PciDevices/PciDevices.vue')
-rw-r--r--src/views/_sila/PciDevices/PciDevices.vue126
1 files changed, 0 insertions, 126 deletions
diff --git a/src/views/_sila/PciDevices/PciDevices.vue b/src/views/_sila/PciDevices/PciDevices.vue
deleted file mode 100644
index 1b831a06..00000000
--- a/src/views/_sila/PciDevices/PciDevices.vue
+++ /dev/null
@@ -1,126 +0,0 @@
-<template>
- <b-container fluid="xl">
- <page-title />
- <page-section :section-title="$t('pagePci.title')">
- <b-table
- responsive="md"
- show-empty
- hover
- :items="items"
- :fields="fields"
- :empty-text="$t('global.table.emptyMessage')"
- :busy="isBusy"
- >
- <template #cell(expandRow)="row">
- <b-button
- v-if="items[row.index].DeviceType !== 'SingleFunction'"
- variant="link"
- :title="expandRowLabel"
- class="btn-icon-only"
- @click="toggleRowDetails(row)"
- >
- <icon-chevron />
- <span class="sr-only">{{ expandRowLabel }}</span>
- </b-button>
- </template>
- <template #cell(health)>
- <status-icon :status="statusIcon('OK')" />
- {{ $t('pagePci.table.health_d') }}
- </template>
- <template #row-details="data">
- <b-container fluid>
- <b-row v-for="item in data.item.Functions" :key="item.deviceId">
- <b-col xs="6">
- <dl>
- <dt>{{ $t('pagePci.table.name') }}:</dt>
- <dd>{{ dataFormatter(item.DeviceName) }}</dd>
- </dl>
- </b-col>
- <b-col xs="6">
- <dl>
- <dt>{{ $t('pagePci.table.type') }}:</dt>
- <dd>{{ dataFormatter(item.deviceClass) }}</dd>
- </dl>
- </b-col>
- </b-row>
- </b-container>
- </template>
- </b-table>
- </page-section>
- </b-container>
-</template>
-
-<script>
-import PageTitle from '@/components/_sila/Global/PageTitle';
-import PageSection from '@/components/_sila/Global/PageSection';
-import IconChevron from '@carbon/icons-vue/es/chevron--down/20';
-import StatusIcon from '@/components/_sila/Global/StatusIcon';
-
-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, StatusIcon, IconChevron },
- mixins: [DataFormatterMixin, LoadingBarMixin, TableRowExpandMixin],
- data() {
- return {
- isBusy: true,
- fields: [
- {
- key: 'expandRow',
- label: '',
- tdClass: 'table-row-expand',
- sortable: false,
- },
- {
- key: 'DeviceName',
- label: this.$t('pagePci.table.name'),
- formatter: this.dataFormatter,
- },
- {
- key: 'health',
- label: this.$t('pagePci.table.health'),
- formatter: this.dataFormatter,
- tdClass: 'text-nowrap',
- },
- {
- key: 'deviceClass',
- label: this.$t('pagePci.table.type'),
- formatter: this.dataFormatter,
- },
- {
- key: 'manufacturer',
- label: this.$t('pagePci.table.manufacturer'),
- formatter: this.dataFormatter,
- },
- ],
- expandRowLabel: expandRowLabel,
- };
- },
-
- computed: {
- items() {
- return this.$store.getters['pci/pciDevices'];
- },
- },
-
- created() {
- this.startLoader();
- return this.$store
- .dispatch('pci/getDevices')
- .then(() => {
- return this.$store.dispatch('pci/getDevicesMembers');
- })
- .then(() => {
- this.$store.dispatch('pci/getFunctionDevices');
- })
- .finally(() => {
- this.endLoader();
- this.isBusy = false;
- });
- },
-};
-</script>