Add modules to repository

This commit is contained in:
Sebastian Kinne
2017-11-16 16:42:22 +11:00
commit d0aa1e38ef
707 changed files with 96750 additions and 0 deletions

67
Commander/js/module.js Normal file
View File

@@ -0,0 +1,67 @@
registerController('CommanderController', ['$api', '$scope', function($api, $scope) {
$scope.commanderRunning = false;
$scope.startCommander = (function() {
$api.request({
module: 'Commander',
action: 'startCommander'
}, function(response) {
if (response.success === true) {
$scope.commanderRunning = true;
}
});
});
$scope.stopCommander = (function() {
$api.request({
module: 'Commander',
action: 'stopCommander'
}, function(response){
if (response.success === true) {
$scope.commanderRunning = false;
}
});
});
}]);
registerController('CommanderManageController', ['$api', '$scope', '$timeout', function($api, $scope, $timeout) {
$scope.CommanderConfiguration = "";
$scope.getConfiguration = (function() {
$api.request({
module: 'Commander',
action: 'getConfiguration'
}, function(response) {
console.log(response);
if (response.error === undefined){
$scope.CommanderConfiguration = response.CommanderConfiguration;
}
});
});
$scope.saveConfiguration = (function() {
$api.request({
module: 'Commander',
action: 'saveConfiguration',
CommanderConfiguration: $scope.CommanderConfiguration
}, function(response) {
console.log(response);
if (response.success === true){
$scope.getConfiguration();
}
});
});
$scope.restoreDefaultConfiguration = (function() {
$api.request({
module: 'Commander',
action: 'restoreDefaultConfiguration'
}, function(response) {
if (response.success === true) {
$scope.getConfiguration();
}
});
});
$scope.getConfiguration();
}]);