Fix buttons switch and clean up unused headers

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia 2024-09-23 12:33:30 +02:00
parent 40944a24f0
commit 9f84a4c26b
No known key found for this signature in database
GPG Key ID: E6D011B7415D4393
3 changed files with 8 additions and 9 deletions

View File

@ -1,6 +1,5 @@
<script>
import { HCI } from '../types';
import { STATE, SIMPLE_NAME } from '@shell/config/table-headers';
import { allHash } from '@shell/utils/promise';
import Banner from '@components/Banner/Banner.vue';
import Loading from '@shell/components/Loading';
@ -42,10 +41,6 @@ export default {
hasPCIAddon: false,
schema: null,
toPciAddon: `${ HCI.ADD_ONS }/harvester-system/${ ADD_ONS.PCI_DEVICE_CONTROLLER }?mode=edit`,
headers: [
{ ...STATE },
SIMPLE_NAME,
],
};
},

View File

@ -36,14 +36,16 @@ export default class PCIDevice extends SteveModel {
icon: 'icon icon-fw icon-dot',
label: 'Enable Passthrough',
bulkable: true,
bulkAction: 'enablePassthroughBulk'
bulkAction: 'enablePassthroughBulk',
weight: 1
},
{
action: 'disablePassthrough',
enabled: this.isEnabling && this.claimedByMe,
icon: 'icon icon-fw icon-dot-open',
label: 'Disable Passthrough',
bulkable: true
bulkable: true,
weight: 0
},
);

View File

@ -36,14 +36,16 @@ export default class USBDevice extends SteveModel {
icon: 'icon icon-fw icon-dot',
label: 'Enable Passthrough',
bulkable: true,
bulkAction: 'enablePassthroughBulk'
bulkAction: 'enablePassthroughBulk',
weight: 1
},
{
action: 'disablePassthrough',
enabled: this.status.enabled,
icon: 'icon icon-fw icon-dot-open',
label: 'Disable Passthrough',
bulkable: true
bulkable: true,
weight: 0
},
);