summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSivaprabu Ganesan <sivaprabug@ami.com>2023-09-25 16:13:10 +0300
committerSivaprabu Ganesan <sivaprabug@ami.com>2023-09-25 16:39:03 +0300
commit20983592cffa5213a37f30724b101a61a7caa550 (patch)
treecae81fc2572ea4249c213c2030a35760a4258182
parentebef6eeea82b00e281c14bf1e54b984197b2d399 (diff)
downloadwebui-vue-20983592cffa5213a37f30724b101a61a7caa550.tar.xz
Hide the trashcan icon for DHCP address
When the IPv4 address is in DHCP mode, hide the trashcan icon. If the address is in static IPv4 mode, the trashcan icon will show that the user can delete the IPv4 static address. Change-Id: I27dc8dc64d93b1e2425de6143473a91f7bc0b104 Signed-off-by: Sivaprabu Ganesan <sivaprabug@ami.com>
-rw-r--r--src/views/Settings/Network/TableIpv4.vue11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/views/Settings/Network/TableIpv4.vue b/src/views/Settings/Network/TableIpv4.vue
index 51f27f8c..8f10d625 100644
--- a/src/views/Settings/Network/TableIpv4.vue
+++ b/src/views/Settings/Network/TableIpv4.vue
@@ -45,7 +45,7 @@
>
<template #cell(actions)="{ item, index }">
<table-row-action
- v-for="(action, actionIndex) in item.actions"
+ v-for="(action, actionIndex) in filteredActions(item)"
:key="actionIndex"
:value="action.value"
:title="action.title"
@@ -139,6 +139,15 @@ export default {
return newValue;
},
},
+ filteredActions() {
+ return (item) => {
+ if (item.AddressOrigin === 'DHCP') {
+ return item.actions.filter((action) => action.value !== 'delete');
+ } else {
+ return item.actions;
+ }
+ };
+ },
},
watch: {
// Watch for change in tab index