mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-03-21 20:51:45 +00:00
feat: add another filter button
Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
parent
62b80b3cec
commit
465488b52d
@ -29,6 +29,8 @@ export default {
|
||||
required: true,
|
||||
},
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
data() {
|
||||
|
||||
@ -31,6 +31,7 @@ export default {
|
||||
const _hash = {
|
||||
pciclaims: this.$store.dispatch(`${ inStore }/findAll`, { type: HCI.PCI_CLAIM }),
|
||||
sriovs: this.$store.dispatch(`${ inStore }/findAll`, { type: HCI.SR_IOV }),
|
||||
srigpuovs: this.$store.dispatch(`${ inStore }/findAll`, { type: HCI.SR_IOVGPU_DEVICE }),
|
||||
};
|
||||
|
||||
await allHash(_hash);
|
||||
@ -106,19 +107,27 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
parentSriovOptions() {
|
||||
allSriovs() {
|
||||
const inStore = this.$store.getters['currentProduct'].inStore;
|
||||
const allSriovs = this.$store.getters[`${ inStore }/all`](HCI.SR_IOV) || [];
|
||||
|
||||
return allSriovs.map((sriov) => {
|
||||
return sriov.id;
|
||||
});
|
||||
return this.$store.getters[`${ inStore }/all`](HCI.SR_IOV) || [];
|
||||
},
|
||||
allSriovGPUs() {
|
||||
const inStore = this.$store.getters['currentProduct'].inStore;
|
||||
return this.$store.getters[`${ inStore }/all`](HCI.SR_IOVGPU_DEVICE) || [];
|
||||
},
|
||||
parentSriovOptions() {
|
||||
return this.allSriovs.map((sriov) => sriov.id);
|
||||
},
|
||||
parentSriovGPUOptions() {
|
||||
return this.allSriovGPUs.map((sriovgpu) => sriovgpu.id);
|
||||
},
|
||||
parentSriovLabel() {
|
||||
return HCI_ANNOTATIONS.PARENT_SRIOV;
|
||||
}
|
||||
},
|
||||
|
||||
parentSriovGPULabel() {
|
||||
return HCI_ANNOTATIONS.PARENT_SRIOV_GPU;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
enableGroup(rows = []) {
|
||||
const row = rows[0];
|
||||
@ -206,6 +215,14 @@ export default {
|
||||
:rows="rows"
|
||||
@change-rows="changeRows"
|
||||
/>
|
||||
<FilterBySriov
|
||||
ref="filterByParentSRIOVGPU"
|
||||
:parent-sriov-options="parentSriovGPUOptions"
|
||||
:parent-sriov-label="parentSriovGPULabel"
|
||||
:label="t('harvester.sriov.parentSriovGPU')"
|
||||
:rows="rows"
|
||||
@change-rows="changeRows"
|
||||
/>
|
||||
</template>
|
||||
</ResourceTable>
|
||||
</template>
|
||||
|
||||
@ -1832,7 +1832,8 @@ harvester:
|
||||
numVFs: Number Of Virtual Functions
|
||||
vfAddresses: Virtual Functions Addresses
|
||||
showMore: Show More
|
||||
parentSriov: Filter By Parent SR-IOV
|
||||
parentSriov: Filter By Parent SR-IOV Netork Device
|
||||
parentSriovGPU: Filter By Parent SR-IOV GPU Device
|
||||
|
||||
sriovgpu:
|
||||
label: SR-IOV GPU Devices
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user