diff --git a/res/app/control-panes/dashboard/shell/shell-controller.js b/res/app/control-panes/dashboard/shell/shell-controller.js
index b1452f16..950d7482 100644
--- a/res/app/control-panes/dashboard/shell/shell-controller.js
+++ b/res/app/control-panes/dashboard/shell/shell-controller.js
@@ -1,4 +1,4 @@
-module.exports = function ShellCtrl($scope, $rootScope) {
+module.exports = function ShellCtrl($scope, $rootScope, gettext) {
// TODO: implement multiple devices
// $scope.results = []
$scope.result = null
@@ -16,13 +16,13 @@ module.exports = function ShellCtrl($scope, $rootScope) {
return cmd.promise
.progressed(function(result) {
- //$scope.result = result
+ $scope.result = result
$scope.data = result.data.join('')
$scope.$digest()
})
.then(function(result) {
+ $scope.result = result
$scope.data = result.data.join('')
-// $scope.result = result
$scope.$digest()
})
}
@@ -30,5 +30,6 @@ module.exports = function ShellCtrl($scope, $rootScope) {
$scope.clear = function () {
$scope.command = ''
$scope.data = ''
+ $scope.result = null
}
}
diff --git a/res/app/control-panes/dashboard/shell/shell.css b/res/app/control-panes/dashboard/shell/shell.css
index 55bce68f..54799fc9 100644
--- a/res/app/control-panes/dashboard/shell/shell.css
+++ b/res/app/control-panes/dashboard/shell/shell.css
@@ -2,4 +2,8 @@
font-size: 12px;
color: #fefefe;
background: #444;
+}
+
+.stf-shell .shell-results-empty {
+ font-style: italic;
}
\ No newline at end of file
diff --git a/res/app/control-panes/dashboard/shell/shell.jade b/res/app/control-panes/dashboard/shell/shell.jade
index 65fa0593..adf5a6b7 100644
--- a/res/app/control-panes/dashboard/shell/shell.jade
+++ b/res/app/control-panes/dashboard/shell/shell.jade
@@ -11,9 +11,11 @@
.input-group.form-inline
input(type=text, ng-model='command', ng-enter='run(command)').form-control
span.input-group-btn
- button.btn.btn-primary-outline(ng-click='run(command)', tooltip-html-unsafe='{{"Run Command"|translate}}
Enter')
+ button.btn.btn-primary-outline(ng-click='run(command)', ng-disabled='!command', tooltip-html-unsafe='{{"Run Command"|translate}}
Enter')
i.fa.fa-play
pre.shell-results(ng-show='data') {{data}}
+ pre.shell-results(ng-show='result.settled && !data').shell-results-empty No output
+
// table
tr(ng-repeat='result in results track by result.device.serial')