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 './adminListOrgsCtrl';
import './adminEditOrgCtrl';
import './adminEditUserCtrl';
import './admin_list_orgs_ctrl';
import './admin_edit_org_ctrl';
import './admin_edit_user_ctrl';
import coreModule from 'app/core/core_module';
......
define([
'angular',
],
function (angular) {
'use strict';
import angular from 'angular';
var module = angular.module('grafana.controllers');
module.controller('AdminEditOrgCtrl', function($scope, $routeParams, backendSrv, $location, navModelSrv) {
export class AdminEditOrgCtrl {
/** @ngInject */
constructor($scope, $routeParams, backendSrv, $location, navModelSrv) {
$scope.init = function() {
$scope.navModel = navModelSrv.getAdminNav();
......@@ -48,7 +44,7 @@ function (angular) {
};
$scope.init();
}
}
});
});
angular.module('grafana.controllers').controller('AdminEditOrgCtrl', AdminEditOrgCtrl);
define([
'angular',
'lodash',
],
function (angular, _) {
'use strict';
import angular from 'angular';
import _ from 'lodash';
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.newOrg = { name: '', role: 'Editor' };
$scope.permissions = {};
......@@ -106,6 +103,7 @@ function (angular, _) {
};
$scope.init();
}
}
});
});
angular.module('grafana.controllers').controller('AdminEditUserCtrl', AdminEditUserCtrl);
define([
'angular',
],
function (angular) {
'use strict';
import angular from 'angular';
var module = angular.module('grafana.controllers');
module.controller('AdminListOrgsCtrl', function($scope, backendSrv, navModelSrv) {
export class AdminListOrgsCtrl {
/** @ngInject */
constructor($scope, backendSrv, navModelSrv) {
$scope.init = function() {
$scope.navModel = navModelSrv.getAdminNav();
$scope.getOrgs();
......@@ -35,7 +31,7 @@ function (angular) {
};
$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