From 31bbf1bc1b185295c712b6caa30de65228efbe1c Mon Sep 17 00:00:00 2001 From: Christopher Young Date: Mon, 19 Sep 2016 12:25:23 -0400 Subject: [PATCH] Don't display serialout settings unless a serialout device is present. --- web/plates/js/settings.js | 2 ++ web/plates/settings.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/web/plates/js/settings.js b/web/plates/js/settings.js index 2f2dd8b7..8f85df85 100755 --- a/web/plates/js/settings.js +++ b/web/plates/js/settings.js @@ -17,8 +17,10 @@ function SettingsCtrl($rootScope, $scope, $state, $location, $window, $http) { settings = angular.fromJson(data); // consider using angular.extend() $scope.rawSettings = angular.toJson(data, true); + $scope.visible_serialout = false; if ((settings.SerialOutputs !== undefined) && (settings.SerialOutputs !== null) && (settings.SerialOutputs['/dev/serialout0'] !== undefined)) { $scope.Baud = settings.SerialOutputs['/dev/serialout0'].Baud; + $scope.visible_serialout = true; } $scope.UAT_Enabled = settings.UAT_Enabled; $scope.ES_Enabled = settings.ES_Enabled; diff --git a/web/plates/settings.html b/web/plates/settings.html index 130db997..641c0985 100755 --- a/web/plates/settings.html +++ b/web/plates/settings.html @@ -92,7 +92,7 @@ -
+