Set DHCP on "Save settings"
Set the DHCP enabled field when the user selects "Save settings"
and accepts the popup. Added a TODO for issue #3154, Rest server
should return a proper JSON bool.
Resolves openbmc/openbmc#3165
Tested: Set "Obtain an IP address automatically using DHCP"
on a Witherspoon.
Change-Id: I45c817e3ddd8bf9c4f582460b1f9230e38548ff8
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 e9b819c..1d59b37 100644
--- a/app/configuration/controllers/network-controller.html
+++ b/app/configuration/controllers/network-controller.html
@@ -40,13 +40,14 @@
<fieldset>
<div class="row column">
<label class="control-radio" for="dhcp-address">Obtain an IP address automatically using DHCP
- <input type="radio" name="ip-address" id="dhcp-address" ng-checked="true" ng-model="interface.DHCPEnabled" ng-value="true">
+ <!-- TODO: openbmc/openbmc#3154 Rest server should return a proper JSON bool instead of "0" or "1"-->
+ <input type="radio" name="ip-address" id="dhcp-address" ng-checked="true" ng-model="interface.DHCPEnabled" ng-value="1">
<span class="control__indicator control__indicator-on"></span>
</label>
</div>
<div class="row column">
<label class="control-radio" for="static-ip-address">Assign a static IP address
- <input type="radio" name="ip-address" id="static-ip-address" ng-model="interface.DHCPEnabled" ng-value="false"/>
+ <input type="radio" name="ip-address" id="static-ip-address" ng-model="interface.DHCPEnabled" ng-value="0"/>
<span class="control__indicator control__indicator-on"></span>
</label>
</div>