2017-02-08 14:20:07 +01:00
|
|
|
import AdminListUsersCtrl from './admin_list_users_ctrl';
|
2017-11-23 17:05:08 +01:00
|
|
|
import './admin_list_orgs_ctrl';
|
|
|
|
|
import './admin_edit_org_ctrl';
|
|
|
|
|
import './admin_edit_user_ctrl';
|
2016-02-14 17:37:05 +01:00
|
|
|
|
|
|
|
|
import coreModule from 'app/core/core_module';
|
|
|
|
|
|
|
|
|
|
class AdminSettingsCtrl {
|
2017-06-02 14:00:42 +02:00
|
|
|
navModel: any;
|
2016-02-14 17:37:05 +01:00
|
|
|
|
|
|
|
|
/** @ngInject **/
|
2017-06-02 14:00:42 +02:00
|
|
|
constructor($scope, backendSrv, navModelSrv) {
|
2017-08-16 11:28:52 +02:00
|
|
|
this.navModel = navModelSrv.getNav('cfg', 'admin', 'server-settings');
|
2016-02-14 17:37:05 +01:00
|
|
|
|
|
|
|
|
backendSrv.get('/api/admin/settings').then(function(settings) {
|
|
|
|
|
$scope.settings = settings;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class AdminHomeCtrl {
|
2017-06-02 14:00:42 +02:00
|
|
|
navModel: any;
|
|
|
|
|
|
2016-02-14 17:37:05 +01:00
|
|
|
/** @ngInject **/
|
2017-06-02 14:00:42 +02:00
|
|
|
constructor(navModelSrv) {
|
2017-08-15 20:24:16 +02:00
|
|
|
this.navModel = navModelSrv.getNav('cfg', 'admin');
|
2016-03-03 23:05:08 +01:00
|
|
|
}
|
2016-02-14 17:37:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class AdminStatsCtrl {
|
|
|
|
|
stats: any;
|
2017-06-02 14:00:42 +02:00
|
|
|
navModel: any;
|
2016-02-14 17:37:05 +01:00
|
|
|
|
|
|
|
|
/** @ngInject */
|
2017-06-02 14:00:42 +02:00
|
|
|
constructor(backendSrv: any, navModelSrv) {
|
2017-08-16 11:28:52 +02:00
|
|
|
this.navModel = navModelSrv.getNav('cfg', 'admin', 'server-stats');
|
2017-06-02 14:00:42 +02:00
|
|
|
|
2016-02-14 17:37:05 +01:00
|
|
|
backendSrv.get('/api/admin/stats').then(stats => {
|
|
|
|
|
this.stats = stats;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-22 08:42:07 +02:00
|
|
|
export class ConfigurationHomeCtrl {
|
|
|
|
|
navModel: any;
|
2017-08-15 14:49:12 +02:00
|
|
|
|
|
|
|
|
/** @ngInject */
|
2017-09-22 08:42:07 +02:00
|
|
|
constructor(navModelSrv) {
|
2017-08-15 20:24:16 +02:00
|
|
|
this.navModel = navModelSrv.getNav('cfg');
|
2017-08-15 14:49:12 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
coreModule.controller('ConfigurationHomeCtrl', ConfigurationHomeCtrl);
|
2016-02-14 17:37:05 +01:00
|
|
|
coreModule.controller('AdminSettingsCtrl', AdminSettingsCtrl);
|
|
|
|
|
coreModule.controller('AdminHomeCtrl', AdminHomeCtrl);
|
|
|
|
|
coreModule.controller('AdminStatsCtrl', AdminStatsCtrl);
|
2017-02-08 14:20:07 +01:00
|
|
|
coreModule.controller('AdminListUsersCtrl', AdminListUsersCtrl);
|