diff --git a/web/css/main.css b/web/css/main.css index f7d1d1a9..38a9da3b 100755 --- a/web/css/main.css +++ b/web/css/main.css @@ -199,6 +199,24 @@ padding: 1px 2px 1px 3px; } +.fake-btn { + background-color:#ccc; + margin-bottom:0; + font-weight:400; + text-align:center; + vertical-align:middle; + cursor:pointer; + border:1px solid transparent; + white-space:nowrap; + padding: 6px 12px; + line-height: 1.43; + border-radius:4px; +} +.fake-btn-block { + display:inline-block; + width: 100%; +} + /* *************************************************************************** everything below this comment represents tweeks to the mobile-angular-uis CSS diff --git a/web/plates/js/logs.js b/web/plates/js/logs.js index cb618a12..34c06947 100755 --- a/web/plates/js/logs.js +++ b/web/plates/js/logs.js @@ -1,8 +1,11 @@ angular.module('appControllers').controller('LogsCtrl', LogsCtrl); // get the main module contollers set -LogsCtrl.$inject = ['$scope', '$http']; // Inject my dependencies +LogsCtrl.$inject = ['$scope', '$state', '$http']; // Inject my dependencies // create our controller function with all necessary logic -function LogsCtrl($scope, $http) { - $scope.userAgent = navigator.userAgent; +function LogsCtrl($scope, $state, $http) { + $scope.$parent.helppage = 'plates/logs-help.html'; + + // just a couple environment variables that may bve useful for dev/debugging but otherwise not significant + $scope.userAgent = navigator.userAgent; $scope.deviceViewport = 'screen = ' + window.screen.width + ' x ' + window.screen.height; } diff --git a/web/plates/js/settings.js b/web/plates/js/settings.js index bb2166dd..5e7b1baf 100755 --- a/web/plates/js/settings.js +++ b/web/plates/js/settings.js @@ -11,7 +11,8 @@ function SettingsCtrl($rootScope, $scope, $state, $http) { for (i = 0; i < toggles.length; i++) { settings[toggles[i]] = undefined; } - + $scope.update_files = ''; + function loadSettings(data) { settings = angular.fromJson(data); // consider using angular.extend() @@ -39,7 +40,6 @@ function SettingsCtrl($rootScope, $scope, $state, $http) { for (i = 0; i < toggles.length; i++) { settings[toggles[i]] = false; } - }); }; @@ -88,7 +88,7 @@ function SettingsCtrl($rootScope, $scope, $state, $http) { setSettings(angular.toJson(newsettings)); } }; - + $scope.updatewatchlist = function () { if ($scope.WatchList !== settings["WatchList"]) { settings["WatchList"] = $scope.WatchList.toUpperCase(); @@ -118,14 +118,38 @@ function SettingsCtrl($rootScope, $scope, $state, $http) { $http.post('/reboot'); }; - $scope.uploadFile = function(files) { + $scope.setUploadFile = function (files) { + $scope.update_files = files; + $scope.$apply(); + } + $scope.resetUploadFile = function () { + $scope.update_files = ''; + $scope.$apply(); + } + $scope.uploadFile = function () { var fd = new FormData(); //Take the first selected file - fd.append("update_file", files[0]); + var file = $scope.update_files[0]; + // check for empty string + if (file === undefined || file === null) { + alert ("update file not selected") + return; + } + var filename = file.name; + // check for expected file naming convention + var re = /^update.*\.sh$/; + if (!re.exec(filename)) { + alert ("file does not appear to be an update") + return; + } + + fd.append("update_file", file); $http.post("/updateUpload", fd, { withCredentials: true, - headers: {'Content-Type': undefined }, + headers: { + 'Content-Type': undefined + }, transformRequest: angular.identity }).success(function (data) { alert("success. wait 60 seconds and refresh home page to verify new version."); @@ -135,4 +159,4 @@ function SettingsCtrl($rootScope, $scope, $state, $http) { }); }; -}; +}; \ No newline at end of file diff --git a/web/plates/logs-help.html b/web/plates/logs-help.html new file mode 100644 index 00000000..0bb2ade4 --- /dev/null +++ b/web/plates/logs-help.html @@ -0,0 +1,5 @@ +
+

The Logs page provides basic access to teh replay logs and system logs generated on the Stratux device.

+

+

NOTE: It is the intent that minimal log processing be done to enalbve users to see recent activity from the logs. However, this is a lower value to the current project and has been prioritized accordingly.

+
\ No newline at end of file diff --git a/web/plates/logs.html b/web/plates/logs.html index be7c294d..f430b641 100755 --- a/web/plates/logs.html +++ b/web/plates/logs.html @@ -7,14 +7,14 @@
- stratux.log + stratux.log
- SDR, AHRS, and GPS logs + SDR, AHRS, and GPS logs
(Enable device logging on "Settings" page) - +
diff --git a/web/plates/settings.html b/web/plates/settings.html index d5b227de..13d0e1e2 100755 --- a/web/plates/settings.html +++ b/web/plates/settings.html @@ -50,8 +50,11 @@
- - + + + +
+
Configuration
@@ -80,44 +83,36 @@
+
-
Shutdown
+
Commands
-
-
- + +
+ + + Click to select System Update file + + + + + + +
+
+
+ +
+
+
+
+
-
-
-
Reboot
-
-
-
- -
-
-
-
-
- - -
-
-
Update
-
-
-
- -
-
-
-
-