Update DNS Servers on "Save settings"
"Nameservers" is called "DNS Servers" on the GUI. Update the
property if it has changed when the user hits Save settings
and confirms.
Had difficulties getting the DNS input fields to update the
interface.Nameservers array. The
"ng-blur="interface.Nameservers[$index] = dns" solution is from:
https://stackoverflow.com/questions/13714884/difficulty-with-ng-model-ng-repeat-and-inputs
Tested: Changed some DNS Servers on a Witherspoon.
Change-Id: Ib9c4be044d0725ac50e57e2733c3dc2ef8e29053
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/app/configuration/controllers/network-controller.html b/app/configuration/controllers/network-controller.html
index 41ab8a3..dc81ed3 100644
--- a/app/configuration/controllers/network-controller.html
+++ b/app/configuration/controllers/network-controller.html
@@ -75,12 +75,11 @@
</div>
<fieldset>
<div class="column small-12 large-4">
- <ul>
- <li ng-repeat="dns in interface.Nameservers track by $index">
- <label for="net-config__prime-dns">DNS Server {{$index+1}}</label>{{dns}}
- <br/>
- </li>
- </ul>
+ <!-- Call Nameservers "DNS Servers" on the GUI -->
+ <fieldset class="net-config__static-ip-wrap" ng-repeat="dns in interface.Nameservers track by $index">
+ <label for="net-config__prime-dns">DNS Server {{$index+1}}</label>
+ <input id="net-config__prime-dns" type="text" ng-model="dns" ng-blur="interface.Nameservers[$index] = dns"/>
+ </fieldset>
</div>
</fieldset>
<div class="network-config__submit-wrapper">