mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 10:18:57 +00:00
Ensure $rootScope.agent is the manager
This commit is contained in:
parent
666c8ce66e
commit
450c644c8a
@ -1,14 +1,15 @@
|
||||
// Require config
|
||||
let app = require('ui/modules').get('app/wazuh', []);
|
||||
|
||||
app.controller('managerController', function ($scope,$rootScope, $routeParams, $location) {
|
||||
app.controller('managerController', function ($scope,$rootScope, $routeParams, $location,apiReq) {
|
||||
$scope.submenuNavItem = 'status';
|
||||
$scope.submenuNavItem2 = 'rules';
|
||||
|
||||
if ($routeParams.tab){
|
||||
$scope.submenuNavItem = $routeParams.tab;
|
||||
}
|
||||
|
||||
apiReq.request('GET', `/agents/000`, {})
|
||||
.then(data => $rootScope.agent = data.data.data);
|
||||
// Watchers
|
||||
$scope.$watch('submenuNavItem', () => {
|
||||
console.log(`submenuNavItem: ${$scope.submenuNavItem}`)
|
||||
|
Loading…
Reference in New Issue
Block a user