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,
|
required: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@ -31,6 +31,7 @@ export default {
|
|||||||
const _hash = {
|
const _hash = {
|
||||||
pciclaims: this.$store.dispatch(`${ inStore }/findAll`, { type: HCI.PCI_CLAIM }),
|
pciclaims: this.$store.dispatch(`${ inStore }/findAll`, { type: HCI.PCI_CLAIM }),
|
||||||
sriovs: this.$store.dispatch(`${ inStore }/findAll`, { type: HCI.SR_IOV }),
|
sriovs: this.$store.dispatch(`${ inStore }/findAll`, { type: HCI.SR_IOV }),
|
||||||
|
srigpuovs: this.$store.dispatch(`${ inStore }/findAll`, { type: HCI.SR_IOVGPU_DEVICE }),
|
||||||
};
|
};
|
||||||
|
|
||||||
await allHash(_hash);
|
await allHash(_hash);
|
||||||
@ -106,19 +107,27 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
parentSriovOptions() {
|
allSriovs() {
|
||||||
const inStore = this.$store.getters['currentProduct'].inStore;
|
const inStore = this.$store.getters['currentProduct'].inStore;
|
||||||
const allSriovs = this.$store.getters[`${ inStore }/all`](HCI.SR_IOV) || [];
|
return this.$store.getters[`${ inStore }/all`](HCI.SR_IOV) || [];
|
||||||
|
},
|
||||||
return allSriovs.map((sriov) => {
|
allSriovGPUs() {
|
||||||
return sriov.id;
|
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() {
|
parentSriovLabel() {
|
||||||
return HCI_ANNOTATIONS.PARENT_SRIOV;
|
return HCI_ANNOTATIONS.PARENT_SRIOV;
|
||||||
}
|
},
|
||||||
|
parentSriovGPULabel() {
|
||||||
|
return HCI_ANNOTATIONS.PARENT_SRIOV_GPU;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
enableGroup(rows = []) {
|
enableGroup(rows = []) {
|
||||||
const row = rows[0];
|
const row = rows[0];
|
||||||
@ -206,6 +215,14 @@ export default {
|
|||||||
:rows="rows"
|
:rows="rows"
|
||||||
@change-rows="changeRows"
|
@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>
|
</template>
|
||||||
</ResourceTable>
|
</ResourceTable>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -1832,7 +1832,8 @@ harvester:
|
|||||||
numVFs: Number Of Virtual Functions
|
numVFs: Number Of Virtual Functions
|
||||||
vfAddresses: Virtual Functions Addresses
|
vfAddresses: Virtual Functions Addresses
|
||||||
showMore: Show More
|
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:
|
sriovgpu:
|
||||||
label: SR-IOV GPU Devices
|
label: SR-IOV GPU Devices
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user