summaryrefslogtreecommitdiffstats
path: root/app/configuration/controllers/snmp-controller.html
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2018-09-18 14:50:39 -0500
committerEd Tanous <ed.tanous@intel.com>2018-10-29 19:15:19 +0000
commit022b6cf15cb41b3e7bedc33b98d2cfe5a5be83a0 (patch)
tree6b0b87e1037cdd6b36ab321354552bd6726f186b /app/configuration/controllers/snmp-controller.html
parent854fbba169307e14f27a3b1f840a802f068725c6 (diff)
downloadphosphor-webui-022b6cf15cb41b3e7bedc33b98d2cfe5a5be83a0.tar.gz
phosphor-webui-022b6cf15cb41b3e7bedc33b98d2cfe5a5be83a0.zip
Remove SNMP Managers
Allow the user to remove SNMP Managers. If the SNMP Manager being removed exists in the backend, make a call to remove it. Tested: Removed SNMP Managers on a Witherspoon Change-Id: Ib392cda30754adfaa58f6301592c2d666ff2c29e Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to 'app/configuration/controllers/snmp-controller.html')
-rw-r--r--app/configuration/controllers/snmp-controller.html11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/configuration/controllers/snmp-controller.html b/app/configuration/controllers/snmp-controller.html
index 2458e3d..3fd9aa3 100644
--- a/app/configuration/controllers/snmp-controller.html
+++ b/app/configuration/controllers/snmp-controller.html
@@ -9,15 +9,16 @@
</div>
<fieldset>
<div class="row column snmp__managers-wrap">
- <div class="snmp__managers" ng-repeat="manager in managers">
- <div class="inline snmp__manager-field">
+ <div class="snmp__managers" ng-repeat="manager in managers track by $index">
+ <div class="snmp__manager-field">
<label>SNMP Manager Server</label>
- <input id="snmp-manager{{$index+1}}-address" type="text" ng-model="manager.address" ng-blur="managers[$index].address = manager.address"/>
+ <input class="inline" id="snmp-manager{{$index+1}}-address" type="text" ng-model="manager.address" ng-blur="managers[$index].address = manager.address"/>
</div>
- <div class="inline snmp__manager-field">
+ <div class="snmp__manager-field">
<label>Port</label>
- <input id="snmp-manager{{$index+1}}-port" type="text" ng-model="manager.port" ng-blur="managers[$index].port = manager.port"/>
+ <input class="inline" id="snmp-manager{{$index+1}}-port" type="text" ng-model="manager.port" ng-blur="managers[$index].port = manager.port"/>
</div>
+ <button class="snmp__manager-remove" ng-click="removeSNMPManager($index)">Remove</button>
</div>
<button type="button" class="btn-primary inline" ng-click="addNewSNMPManager()">Add SNMP manager</button>
</div>
OpenPOWER on IntegriCloud