summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2019-10-14 13:04:05 -0500
committerGunnar Mills <gmills@us.ibm.com>2019-10-17 15:53:44 +0000
commit254b16ee2e354b1fe7a27c0efe38f568bd159c29 (patch)
tree6601e6360b5e613ee19f4e32b27f1aafefb59a10
parent9aee5e672b5429169a299494f368f9c4498432bf (diff)
downloadphosphor-webui-254b16ee2e354b1fe7a27c0efe38f568bd159c29.tar.gz
phosphor-webui-254b16ee2e354b1fe7a27c0efe38f568bd159c29.zip
NTP: Remove workaround for empty list array
This workaround is no longer needed with bmcweb. curl -k -H "Content-Type: application/json" -X PUT \ -d '{"data": [] }' \ https://${bmc}/xyz/openbmc_project/network/eth0/attr/NTPServers See https://github.com/openbmc/openbmc/issues/3240 Tested: Built and loaded on a Witherspoon. Added, removed, and edited NTP servers. Change-Id: Ia106067a479c63a5761b1f62c624d3ccc6df55c7 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
-rw-r--r--app/configuration/controllers/date-time-controller.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/app/configuration/controllers/date-time-controller.js b/app/configuration/controllers/date-time-controller.js
index d678ab4..92864db 100644
--- a/app/configuration/controllers/date-time-controller.js
+++ b/app/configuration/controllers/date-time-controller.js
@@ -164,15 +164,10 @@ window.angular && (function(angular) {
};
function setNTPServers() {
- // Remove any empty strings from the array. Important because we add an
- // empty string to the end so the user can add a new NTP server, if the
+ // Remove any empty strings from the array. If the
// user doesn't fill out the field, we don't want to add.
$scope.ntp.servers = $scope.ntp.servers.filter(Boolean);
- // NTP servers does not allow an empty array, since we remove all empty
- // strings above, could have an empty array. TODO: openbmc/openbmc#3240
- if ($scope.ntp.servers.length == 0) {
- $scope.ntp.servers.push('');
- }
+
return APIUtils.setNTPServers($scope.ntp.servers);
}
OpenPOWER on IntegriCloud