This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository mum. See http://git.chorem.org/mum.git commit 3eff4c308f8a65005a94e2c3bdb8de23162a7068 Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Wed Mar 25 10:51:14 2015 +0100 restructuration des envois JSON --- app/app.py | 9 +- app/module_loader.py | 8 +- app/modules/storage_modules/shelve_db.py | 14 +-- static/js/controllers/headCtrl.js | 36 +++--- static/js/controllers/hostPageCtrl.js | 54 +++++---- static/js/controllers/notificationsCtrl.js | 54 +++++---- static/js/controllers/profileCtrl.js | 26 ++++ static/js/controllers/usersCtrl.js | 8 +- static/js/mumApp.js | 4 +- views/hostpage.html | 187 ++++++----------------------- views/index.html | 8 +- views/profile.html | 7 +- 12 files changed, 173 insertions(+), 242 deletions(-) diff --git a/app/app.py b/app/app.py index c7b9743..829f32f 100755 --- a/app/app.py +++ b/app/app.py @@ -136,10 +136,11 @@ def receive(ws): ws.send(json.dumps({"RES_INFO_HOST": db.get_host_informations(msg["GET_HOST_INFO"])})) elif code == "CALL_FUNC_DB": # asked when the request can directly pass by database res = ml.launch_db_function(msg["CALL_FUNC_DB"]) - if res is not None: - ws.send(json.dumps({"RES_CALL_FUNC_DB": res})) - else: - print 'res is None' + msg = json.dumps({"RES_CALL_FUNC_DB": { + "func": msg["CALL_FUNC_DB"]['func'], + "res": res + }}) + ws.send(msg) elif code == "GET_LOADED_CONN_MOD": # asked from hostpage, at the connection configuration ws.send(json_dumps({"RES_GET_LOADED_CONN_MOD": ml.get_info_mod_conn()})) elif code == "GET_LOADED_MONI_MOD": # asked from hostpage, at the block activation conf diff --git a/app/module_loader.py b/app/module_loader.py index 97ce3be..4ad1949 100644 --- a/app/module_loader.py +++ b/app/module_loader.py @@ -239,7 +239,7 @@ class ModuleLoader: res[mod]['compatible_os'] = self.loaded_mod_moni[mod]['compatible_os'] res[mod]['unit'] = self.loaded_mod_moni[mod]['unit'] res[mod]['block'] = self.loaded_mod_moni[mod]['block'] - return json.dumps(res) + return res def load_all_connection_modules(self): """ @@ -293,7 +293,7 @@ class ModuleLoader: res = {} for mod in self.loaded_mod_conn: res[mod] = self.loaded_mod_conn[mod]['params'] - return json.dumps(res) + return res def load_all_notification_modules(self): """ @@ -329,7 +329,7 @@ class ModuleLoader: res = {} for mod in self.loaded_mod_notif: res[mod] = '' - return json.dumps(res) + return res def run_notification_modules(self, dict_notif): """ @@ -389,4 +389,4 @@ class ModuleLoader: self.db.config_mod_activation(args, self.get_monitoring_modules_list()) def get_public_keys_list(self): - return json.dumps(os.listdir(self.conf['keys_location'])) \ No newline at end of file + return os.listdir(self.conf['keys_location']) \ No newline at end of file diff --git a/app/modules/storage_modules/shelve_db.py b/app/modules/storage_modules/shelve_db.py index 749c831..e7f62fa 100644 --- a/app/modules/storage_modules/shelve_db.py +++ b/app/modules/storage_modules/shelve_db.py @@ -232,7 +232,7 @@ class shelve_db: print e.__str__() finally: self.close_db() - return json.dumps(res) + return res def get_monitoring_instructions(self, addr_host): """ @@ -340,7 +340,7 @@ class shelve_db: print e.__str__() finally: self.close_db() - return json.dumps(res) + return res def get_host_informations(self, addr_host): """ @@ -396,7 +396,7 @@ class shelve_db: print e.__str__() finally: self.close_db() - return json.dumps(res) + return res def remove_host(self, args): """ @@ -578,7 +578,7 @@ class shelve_db: print e.__str__() finally: self.close_db() - return json.dumps(res) + return res def set_conf_mod(self, args): """ @@ -949,7 +949,7 @@ class shelve_db: print e.__str__() finally: self.close_db() - return json.dumps(res) + return res def create_user(self, args): """ @@ -986,7 +986,7 @@ class shelve_db: print e.__str__() finally: self.close_db() - return json.dumps(res) + return res def remove_user(self, args): """ @@ -1100,4 +1100,4 @@ class shelve_db: print e.__str__() finally: self.close_db() - return json.dumps(res) \ No newline at end of file + return res \ No newline at end of file diff --git a/static/js/controllers/headCtrl.js b/static/js/controllers/headCtrl.js index 6560902..1d87198 100644 --- a/static/js/controllers/headCtrl.js +++ b/static/js/controllers/headCtrl.js @@ -24,47 +24,48 @@ mumApp.controller('headCtrl', function($scope, $rootScope, toastr, $interval, $r }); ws.onmessage = function (evt) { // actions effectuees lors de la reception d'un message via la websocket - JSON.parse(evt.data, function (key, value) { + var obj = JSON.parse(evt.data); + for(key in obj){ switch(key){ case "SUCCESS_MODULE": // Success of a module execution - $rootScope.$broadcast("success", value); - toastr.success(value, "Success on module execution"); + $rootScope.$broadcast("success", obj[key]); + toastr.success(obj[key], "Success on module execution"); break; case "RES_INFO_HOST": // Informations concerning one host - $rootScope.$broadcast("hostInfos", JSON.parse(value)); + $rootScope.$broadcast("hostInfos", obj[key]); break; case "RES_GET_HOSTS": // List of hosts under monitoring - DataHosts.Items = JSON.parse(value); + DataHosts.Items = obj[key]; $rootScope.$broadcast("hostsUpdate"); $scope.$apply(function(){ $scope.items = DataHosts.Items; }); break; case "RES_GET_LOADED_CONN_MOD": - $rootScope.$broadcast("resGetLoadedConnMod", JSON.parse(value)); + $rootScope.$broadcast("resGetLoadedConnMod", obj[key]); break; case "RES_GET_LOADED_MONI_MOD": - $rootScope.$broadcast("resGetLoadedMoniMod", JSON.parse(value)); + $rootScope.$broadcast("resGetLoadedMoniMod", obj[key]); break; case "RES_GET_LOADED_NOTIF_MOD": - $rootScope.$broadcast("resGetLoadedNotifMod", JSON.parse(value)); + $rootScope.$broadcast("resGetLoadedNotifMod", obj[key]); break; case "RES_CALL_FUNC_DB": // Get a result after calling a funcion on the db - $rootScope.$broadcast("resCall", JSON.parse(value)); + $rootScope.$broadcast("resCall", obj[key]); break; case "CURRENT_STATE_INFO": $scope.$apply(function(){ - $scope.state = value; + $scope.state = obj[key]; }); - $rootScope.$broadcast("stateUpdate", value); - toastr.info(value, "Current status is :"); + $rootScope.$broadcast("stateUpdate", obj[key]); + toastr.info(obj[key], "Current status is :"); /* $scope.$apply(function(){ - $scope.state = value + $scope.state = obj[key] });*/ break; case "BROWSER_NOTIFICATION": - params = value.split(','); + params = obj[key].split(','); if(params[0]=='success'){ $scope.pop_success("Success on " + params[1], params[2]); } @@ -76,16 +77,15 @@ mumApp.controller('headCtrl', function($scope, $rootScope, toastr, $interval, $r } break; case "KEYS_LIST": - $rootScope.$broadcast("keysList", JSON.parse(value)); + $rootScope.$broadcast("keysList", obj[key]); break case "ERROR": - toastr.error(value, "Server error"); + toastr.error(obj[key], "Server error"); break; default: break; } - }); - + } }; $scope.pop_success = function(title, msg){ diff --git a/static/js/controllers/hostPageCtrl.js b/static/js/controllers/hostPageCtrl.js index 0835013..a1d9669 100644 --- a/static/js/controllers/hostPageCtrl.js +++ b/static/js/controllers/hostPageCtrl.js @@ -177,26 +177,28 @@ mumApp.controller('ModalConfInstanceCtrl', function ($scope, $rootScope, $modalI // when the actual conf of the module is received $scope.$on("resCall", function (event, args) { - $scope.$apply(function(){ - $scope.items = args; - $scope.freq_days = Math.floor(args.freq / 86400); - $scope.freq_hours = Math.floor((args.freq - $scope.freq_days * 86400) / 3600); - $scope.freq_minutes = Math.floor((args.freq - ($scope.freq_days * 86400) - ($scope.freq_hours * 3600)) / 60) - - if(args.unit == 'bool'){ - if(args.major_limit){ - $scope.limit_bool = 'major'; + if(args.func == 'get_conf_mod'){ + $scope.$apply(function(){ + $scope.items = args.res; + $scope.freq_days = Math.floor(args.res.freq / 86400); + $scope.freq_hours = Math.floor((args.res.freq - $scope.freq_days * 86400) / 3600); + $scope.freq_minutes = Math.floor((args.res.freq - ($scope.freq_days * 86400) - ($scope.freq_hours * 3600)) / 60) + + if(args.res.unit == 'bool'){ + if(args.res.major_limit){ + $scope.limit_bool = 'major'; + } } - } - else if(args.unit == '%'){ - $scope.minor_limit_percent = args.minor_limit; - $scope.major_limit_percent = args.major_limit; - } - else{ - $scope.minor_limit_unit = args.minor_limit; - $scope.major_limit_unit = args.major_limit; - } - }); + else if(args.res.unit == '%'){ + $scope.minor_limit_percent = args.res.minor_limit; + $scope.major_limit_percent = args.res.major_limit; + } + else{ + $scope.minor_limit_unit = args.res.minor_limit; + $scope.major_limit_unit = args.res.major_limit; + } + }); + } }); // after validation @@ -276,12 +278,14 @@ mumApp.controller('ModalConnInstanceCtrl', function ($scope, $rootScope, $modalI // when the configuration of the connection is received $scope.$on("resCall", function (event, args) { - $scope.$apply(function(){ - $scope.current_config = args; - for(mod in args){ - $scope.priorities[mod] = args[mod]['priority'] - } - }); + if(args.func == 'get_conn_param'){ + $scope.$apply(function(){ + $scope.current_config = args.res; + for(mod in args.res){ + $scope.priorities[mod] = args.res[mod]['priority'] + } + }); + } }); $scope.ok = function () { diff --git a/static/js/controllers/notificationsCtrl.js b/static/js/controllers/notificationsCtrl.js index 3557407..7b0d559 100644 --- a/static/js/controllers/notificationsCtrl.js +++ b/static/js/controllers/notificationsCtrl.js @@ -77,30 +77,32 @@ mumApp.controller('notificationsCtrl', function($scope, $rootScope, $modal, Data { notif_mod: priority }, ... }}} */ - $scope.$apply(function(){ - var sd = {}; - for(user in args){ - sd[user] = {}; - sd[user]['minor'] = {}; - sd[user]['major'] = {}; - for(notif_mod in args[user]['minor']){ - sd[user]['minor'][notif_mod] = - {'activated': args[user]['minor'][notif_mod]['activated'], - 'priority':args[user]['minor'][notif_mod]['priority']}; - sd[user]['major'][notif_mod] = - {'activated': args[user]['major'][notif_mod]['activated'], - 'priority':args[user]['major'][notif_mod]['priority']}; - } - for(notif_mod in $scope.notif_mods){ - if(!sd[user]['minor'].hasOwnProperty(notif_mod)){ - sd[user]['minor'][notif_mod] = {'activated': false, 'priority': null}; - sd[user]['major'][notif_mod] = {'activated': false, 'priority': null}; + if(args.func == 'get_host_subscribers'){ + $scope.$apply(function(){ + var sd = {}; + for(user in args.res){ + sd[user] = {}; + sd[user]['minor'] = {}; + sd[user]['major'] = {}; + for(notif_mod in args.res[user]['minor']){ + sd[user]['minor'][notif_mod] = + {'activated': args.res[user]['minor'][notif_mod]['activated'], + 'priority':args.res[user]['minor'][notif_mod]['priority']}; + sd[user]['major'][notif_mod] = + {'activated': args.res[user]['major'][notif_mod]['activated'], + 'priority':args.res[user]['major'][notif_mod]['priority']}; + } + for(notif_mod in $scope.notif_mods){ + if(!sd[user]['minor'].hasOwnProperty(notif_mod)){ + sd[user]['minor'][notif_mod] = {'activated': false, 'priority': null}; + sd[user]['major'][notif_mod] = {'activated': false, 'priority': null}; + } } } - } - $scope.subscriber_data = sd; - $scope.subscriber_data_unchanged = sd; - }); + $scope.subscriber_data = sd; + $scope.subscriber_data_unchanged = sd; + }); + } }); $scope.discard = function(){ @@ -166,9 +168,11 @@ mumApp.controller('ModalAddSubscriberInstanceCtrl', function ($scope, $rootScope // receiving the user list $scope.$on("resCall", function (event, args) { - $scope.$apply(function(){ - $scope.users = args; - }); + if(args.func == 'get_users'){ + $scope.$apply(function(){ + $scope.users = args.res; + }); + } }); $scope.ok = function () { diff --git a/static/js/controllers/profileCtrl.js b/static/js/controllers/profileCtrl.js new file mode 100644 index 0000000..dd3e3ab --- /dev/null +++ b/static/js/controllers/profileCtrl.js @@ -0,0 +1,26 @@ +mumApp.controller('profileCtrl', function($scope, $rootScope){ + + $scope.users = {}; + + $scope.selected_user = ""; + + $rootScope.$broadcast("sendViaWs", JSON.stringify({"CALL_FUNC_DB": {'func': 'get_users', 'args': null}})); + + // receiving the user list + $scope.$on("resCall", function (event, args) { + if(args.func == 'get_users'){ + $scope.$apply(function(){ + $scope.users = args.res; + }); + } + }); + + $scope.get_user_settings = function(){ + args = {}; + if($scope.selected_user != ''){ + args['username'] = $scope.selected_user; + } + + $rootScope.$broadcast("sendViaWs", JSON.stringify({"CALL_FUNC_DB": {'func': 'get_users', 'args': null}})); + } +}); \ No newline at end of file diff --git a/static/js/controllers/usersCtrl.js b/static/js/controllers/usersCtrl.js index dca6322..87237d3 100644 --- a/static/js/controllers/usersCtrl.js +++ b/static/js/controllers/usersCtrl.js @@ -11,9 +11,11 @@ mumApp.controller('usersCtrl', function($scope, $rootScope, $route) { // receiving the user list $scope.$on("resCall", function (event, args) { - $scope.$apply(function(){ - $scope.users = args; - }); + if(args.func == 'get_users'){ + $scope.$apply(function(){ + $scope.users = args.res; + }); + } }); $scope.addUser = function(){ diff --git a/static/js/mumApp.js b/static/js/mumApp.js index 3f76c6d..75d3325 100644 --- a/static/js/mumApp.js +++ b/static/js/mumApp.js @@ -31,8 +31,8 @@ mumApp.config(function($routeProvider){ controller : 'notificationsCtrl' }) .when('/profile',{ - templateUrl : 'profile.html' - //controller : 'mainController' + templateUrl : 'profile.html', + controller : 'profileCtrl' }) .when('/scan',{ templateUrl : 'scan.html', diff --git a/views/hostpage.html b/views/hostpage.html index 689a4b6..c579267 100644 --- a/views/hostpage.html +++ b/views/hostpage.html @@ -22,8 +22,10 @@ <td>{{item.value}}</td> <td>{{item.state}}</td> <td>{{item.date.split('.')[0]}}</td> - <td><button type="button" class="btn btn-primary btn-xs" ng-click="open_modal_conf(itemname)">Configure</button></td> - <td><button type="button" class="btn btn-info btn-xs" ng-click="check(itemname)">Check now</button></td> + <td><button type="button" class="btn btn-primary btn-xs" + ng-click="open_modal_conf(itemname)">Configure</button></td> + <td><button type="button" class="btn btn-info btn-xs" + ng-click="check(itemname)">Check now</button></td> </tr> </tbody> </table> @@ -54,7 +56,8 @@ </accordion-group> <accordion-group heading="Interventions done"> - <button type="button" class="btn btn-primary btn-xs" ng-click="open_modal_interv()">Add a new intervention</button> + <button type="button" class="btn btn-primary btn-xs" + ng-click="open_modal_interv()">Add a new intervention</button> <div ng-show="items.interventions != ''"> <table class="table table-bordered table-hover"> <thead> @@ -88,20 +91,25 @@ <label for="freq">Frequency check: each</label> <div class="row" id="freq"> <div class="col-xs-2"> - <input type="number" min="0" class="form-control" ng-model="freq_days"> days + <input type="number" min="0" class="form-control" + ng-model="freq_days"> days </div> <div class="col-xs-2"> - <input type="number" min="0" max="23" class="form-control" ng-model="freq_hours"> hours + <input type="number" min="0" max="23" class="form-control" + ng-model="freq_hours"> hours </div> <div class="col-xs-2"> - <input type="number" min="0" max="59" class="form-control" ng-model="freq_minutes"> minutes + <input type="number" min="0" max="59" class="form-control" + ng-model="freq_minutes"> minutes </div> </div> <div ng-show="items.unit == '%'"> <label for="minor_%">Minor notification at {{minor_limit_percent}}% of charge</label> - <input type="range" min="0" max="99" id="minor_%" ng-model="minor_limit_percent"> + <input type="range" min="0" max="99" id="minor_%" + ng-model="minor_limit_percent"> <label for="major_%">Major notification at {{major_limit_percent}}% of charge</label> - <input type="range" min="{{minor_limit_percent}}" max="100" id="major_%" ng-model="major_limit_percent"> + <input type="range" min="{{minor_limit_percent}}" max="100" id="major_%" + ng-model="major_limit_percent"> </div> <div ng-show="items.unit == 'bool'"> <label for="minor_bool">If down, send a </label> @@ -120,15 +128,18 @@ </div> <div ng-show="items.unit != '%' && items.unit != 'bool'"> <label for="minor_unit">Minor notif at {{minor_limit_unit}}</label> - <input type="number" class="form-control" id="minor_unit" min="0" ng-model="minor_limit_unit"> + <input type="number" class="form-control" id="minor_unit" min="0" + ng-model="minor_limit_unit"> <label for="maj_pack">Major notif at {{major_limit_unit}}</label> - <input type="number" class="form-control" id="maj_pack" min="0" ng-model="major_limit_unit"> + <input type="number" class="form-control" id="maj_pack" min="0" + ng-model="major_limit_unit"> </div> </div> </form> </div> <div class="modal-footer"> - <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="cancel()">Close</button> + <button type="button" class="btn btn-default" data-dismiss="modal" + ng-click="cancel()">Close</button> <button type="button" class="btn btn-primary" ng-click="ok()">Save changes</button> </div> </script> @@ -177,9 +188,11 @@ <tbody> <tr ng-repeat="(modname, modconf) in current_config"> <td>{{modname}}</td> - <td><input type="number" min="0" ng-model="priorities[modname]" ng-disabled="isNotConfigured(modname)"></td> + <td><input type="number" min="0" ng-model="priorities[modname]" + ng-disabled="isNotConfigured(modname)"></td> <td> - <button type="button" class="btn btn-primary" ng-click="open_modal_conf_conn(modname)">Advanced configuration</button> + <button type="button" class="btn btn-primary" + ng-click="open_modal_conf_conn(modname)">Advanced configuration</button> <button type="button" class="btn btn-success">Test</button> </td> @@ -213,7 +226,9 @@ <div class="row"> <div class="col-xs-3"> <label for="private_key">Select a private key</label> - <select class="form-control input-sm" id="private_key" ng-model="private_key" ng-options="key as key for key in keys_list"></select> + <select class="form-control input-sm" id="private_key" + ng-model="private_key" + ng-options="key as key for key in keys_list"></select> </div> </div> <div class="row"> @@ -268,145 +283,17 @@ <tr ng-repeat-end ng-repeat="mod in block"> <td>{{mod.modname}}</td> - <td><input type="checkbox" ng-model="mod.activated" ng-disabled="is_not_compatible(mod.modname)"></td> + <td><input type="checkbox" + ng-model="mod.activated" + ng-disabled="is_not_compatible(mod.modname)"></td> </tr> </table> </div> <div class="modal-footer"> - <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="cancel()">Close</button> - <button type="button" class="btn btn-primary" ng-click="ok()">Save changes</button> + <button type="button" class="btn btn-default" data-dismiss="modal" + ng-click="cancel()">Close</button> + <button type="button" class="btn btn-primary" + ng-click="ok()">Save changes</button> </div> </script> - </div> - <!-- - <div class="modal fade bs-example-modal-lg" id="modal_conf_conn" tabindex="-1" role="dialog" aria-labelledby="modal_conf_conn_label" aria-hidden="true"> - <div class="modal-dialog modal-lg"> - <div class="modal-content"> - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> - <h4 class="modal-title" id="modal_conf_conn_label">Advanced settings for SSH</h4> - </div> - <div class="modal-body"> - <div class="row"> - <div class="col-xs-2"> - <label for="port">Port used</label> - <input type="number" id="port" min="0" placeholder="22"> - </div> - </div> - <div class="row"> - <div class="col-xs-3"> - <label for="usrname">Login</label> - <input type="text" id="usrname" placeholder="mylogin"> - </div> - </div> - <div class="row"> - <div class="col-xs-3"> - <label for="publickey">Public key</label> - <select class="form-control" id="publickey"> - <option>mykey1</option> - <option>mykey2</option> - </select> - </div> - <button type="button" class="btn btn-primary btn-xs">Add public key</button> - <button type="button" class="btn btn-danger btn-xs">Remove selected</button> - </div> - <div class="row"> - <div class="col-xs-3"> - <label for="privatekey">Private key</label> - <select class="form-control" id="privatekey"> - <option>mypkey1</option> - <option>mypkey2</option> - </select> - </div> - <button type="button" class="btn btn-primary btn-xs">Add private key</button> - <button type="button" class="btn btn-danger btn-xs">Remove selected</button> - </div> - </div> - <div class="modal-footer"> - <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> - <button type="button" class="btn btn-primary">Save changes</button> - </div> - </div> - </div> - </div> - - <div class="modal fade" id="modal_block" tabindex="-1" role="dialog" aria-labelledby="modal_block_label" aria-hidden="true"> - <div class="modal-dialog"> - <div class="modal-content"> - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> - <h4 class="modal-title" id="modal_block_label">Activate/Deactivate monitoring blocks</h4> - </div> - <div class="modal-body"> - <form> - <div class="form-group"> - <h3>Network</h3> - <button type="button" class="btn btn-defaule">Select all</button> - <button type="button" class="btn btn-defaule">Select none</button> - <table class="table table-bordered table-hover"> - <thead> - <tr> - <th>Part </th> - <th>Activated </th> - </tr> - </thead> - <tbody> - <tr> - <td>HTTP</td> - <td><input type="checkbox" value="http" checked></td> - </tr> - <tr> - <td>SMTP</td> - <td><input type="checkbox" value="smtp" checked></td> - </tr> - </tbody> - </table> - <h3>Hardware</h3> - <button type="button" class="btn btn-defaule">Select all</button> - <button type="button" class="btn btn-defaule">Select none</button> - <table class="table table-bordered table-hover"> - <thead> - <tr> - <th>Part </th> - <th>Activated </th> - </tr> - </thead> - <tbody> - <tr> - <td>CPU</td> - <td><input type="checkbox" value="http" checked></td> - </tr> - <tr> - <td>Drive</td> - <td><input type="checkbox" value="smtp" checked></td> - </tr> - </tbody> - </table> - <h3>Software</h3> - <button type="button" class="btn btn-defaule">Select all</button> - <button type="button" class="btn btn-defaule">Select none</button> - <table class="table table-bordered table-hover"> - <thead> - <tr> - <th>Part </th> - <th>Activated </th> - </tr> - </thead> - <tbody> - <tr> - <td>Packages updated</td> - <td><input type="checkbox" value="http"></td> - </tr> - </tbody> - </table> - </div> - </form> - </div> - <div class="modal-footer"> - <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> - <button type="button" class="btn btn-primary">Save changes</button> - </div> - </div> - </div> - </div> - --> + </div> \ No newline at end of file diff --git a/views/index.html b/views/index.html index bb44098..13335ff 100644 --- a/views/index.html +++ b/views/index.html @@ -28,12 +28,14 @@ <script src="static/js/mumApp.js"></script> <script src="static/js/controllers/dashboardCtrl.js"></script> + <script src="static/js/controllers/groupCtrl.js"></script> + <script src="static/js/controllers/hostPageCtrl.js"></script> <script src="static/js/controllers/headCtrl.js"></script> + <script src="static/js/controllers/notificationsCtrl.js"></script> + <script src="static/js/controllers/profileCtrl.js"></script> <script src="static/js/controllers/scanCtrl.js"></script> - <script src="static/js/controllers/hostPageCtrl.js"></script> - <script src="static/js/controllers/groupCtrl.js"></script> <script src="static/js/controllers/usersCtrl.js"></script> - <script src="static/js/controllers/notificationsCtrl.js"></script> + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]><!-- diff --git a/views/profile.html b/views/profile.html index df1c645..61553d3 100644 --- a/views/profile.html +++ b/views/profile.html @@ -1,13 +1,18 @@ <div class="col-md-offset-2 main"> <h1 class="page-header">Your account</h1> + <select class="form-control input-sm" id="usrlist" + ng-model="selected_user" + ng-options="user as user for user in users" + ng-change="get_user_settings()"> + </select> <!--<h2 class="sub-header">They will be applied on each new host you will add.</h2>--> <form> <div class="row"> <h3>Personal informations</h3> <div class="col-xs-3"> <label for="username">Username</label> - <input type="username" class="form-control" id="username" placeholder="Username"> + <input type="text" class="form-control" id="username" placeholder="Username"> </div> <div class="row"></div> <div class="col-xs-3"> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.