Commit 3acf1063 by Patrick O'Carroll Committed by Torkel Ödegaard

migrated admin files to ts (#9975)

parent b9483957
import AdminListUsersCtrl from './admin_list_users_ctrl'; import AdminListUsersCtrl from './admin_list_users_ctrl';
import './adminListOrgsCtrl'; import './admin_list_orgs_ctrl';
import './adminEditOrgCtrl'; import './admin_edit_org_ctrl';
import './adminEditUserCtrl'; import './admin_edit_user_ctrl';
import coreModule from 'app/core/core_module'; import coreModule from 'app/core/core_module';
......
define([ import angular from 'angular';
'angular',
],
function (angular) {
'use strict';
var module = angular.module('grafana.controllers'); export class AdminEditOrgCtrl {
module.controller('AdminEditOrgCtrl', function($scope, $routeParams, backendSrv, $location, navModelSrv) {
/** @ngInject */
constructor($scope, $routeParams, backendSrv, $location, navModelSrv) {
$scope.init = function() { $scope.init = function() {
$scope.navModel = navModelSrv.getAdminNav(); $scope.navModel = navModelSrv.getAdminNav();
...@@ -48,7 +44,7 @@ function (angular) { ...@@ -48,7 +44,7 @@ function (angular) {
}; };
$scope.init(); $scope.init();
}
}
}); angular.module('grafana.controllers').controller('AdminEditOrgCtrl', AdminEditOrgCtrl);
});
define([ import angular from 'angular';
'angular', import _ from 'lodash';
'lodash',
],
function (angular, _) {
'use strict';
var module = angular.module('grafana.controllers'); export class AdminEditUserCtrl {
module.controller('AdminEditUserCtrl', function($scope, $routeParams, backendSrv, $location, navModelSrv) { /** @ngInject */
constructor($scope, $routeParams, backendSrv, $location, navModelSrv) {
$scope.user = {}; $scope.user = {};
$scope.newOrg = { name: '', role: 'Editor' }; $scope.newOrg = { name: '', role: 'Editor' };
$scope.permissions = {}; $scope.permissions = {};
...@@ -106,6 +103,7 @@ function (angular, _) { ...@@ -106,6 +103,7 @@ function (angular, _) {
}; };
$scope.init(); $scope.init();
}
}
}); angular.module('grafana.controllers').controller('AdminEditUserCtrl', AdminEditUserCtrl);
});
define([ import angular from 'angular';
'angular',
],
function (angular) {
'use strict';
var module = angular.module('grafana.controllers'); export class AdminListOrgsCtrl {
module.controller('AdminListOrgsCtrl', function($scope, backendSrv, navModelSrv) {
/** @ngInject */
constructor($scope, backendSrv, navModelSrv) {
$scope.init = function() { $scope.init = function() {
$scope.navModel = navModelSrv.getAdminNav(); $scope.navModel = navModelSrv.getAdminNav();
$scope.getOrgs(); $scope.getOrgs();
...@@ -35,7 +31,7 @@ function (angular) { ...@@ -35,7 +31,7 @@ function (angular) {
}; };
$scope.init(); $scope.init();
}
}
}); angular.module('grafana.controllers').controller('AdminListOrgsCtrl', AdminListOrgsCtrl);
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment