mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
migration of org files from js to ts (#9974)
* migration of org files from js to ts * more migration of org files to ts * minor fix to change_password * renamed files
This commit is contained in:
parent
b7956ef499
commit
b94839574c
@ -15,6 +15,8 @@ class Settings {
|
|||||||
disableLoginForm: boolean;
|
disableLoginForm: boolean;
|
||||||
defaultDatasource: string;
|
defaultDatasource: string;
|
||||||
alertingEnabled: boolean;
|
alertingEnabled: boolean;
|
||||||
|
authProxyEnabled: boolean;
|
||||||
|
ldapEnabled: boolean;
|
||||||
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
var defaults = {
|
var defaults = {
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
define([
|
|
||||||
'./org_users_ctrl',
|
|
||||||
'./profile_ctrl',
|
|
||||||
'./org_users_ctrl',
|
|
||||||
'./select_org_ctrl',
|
|
||||||
'./change_password_ctrl',
|
|
||||||
'./newOrgCtrl',
|
|
||||||
'./userInviteCtrl',
|
|
||||||
'./orgApiKeysCtrl',
|
|
||||||
'./orgDetailsCtrl',
|
|
||||||
'./prefs_control',
|
|
||||||
], function () {});
|
|
10
public/app/features/org/all.ts
Normal file
10
public/app/features/org/all.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import './org_users_ctrl';
|
||||||
|
import './profile_ctrl';
|
||||||
|
import './org_users_ctrl';
|
||||||
|
import './select_org_ctrl';
|
||||||
|
import './change_password_ctrl';
|
||||||
|
import './new_org_ctrl';
|
||||||
|
import './user_invite_ctrl';
|
||||||
|
import './org_api_keys_ctrl';
|
||||||
|
import './org_details_ctrl';
|
||||||
|
import './prefs_control';
|
@ -1,16 +1,10 @@
|
|||||||
define([
|
import angular from 'angular';
|
||||||
'angular',
|
import config from 'app/core/config';
|
||||||
'app/core/config',
|
|
||||||
],
|
|
||||||
function (angular, config) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
config = config.default;
|
export class ChangePasswordCtrl {
|
||||||
|
|
||||||
var module = angular.module('grafana.controllers');
|
|
||||||
|
|
||||||
module.controller('ChangePasswordCtrl', function($scope, backendSrv, $location, navModelSrv) {
|
|
||||||
|
|
||||||
|
/** @ngInject **/
|
||||||
|
constructor($scope, backendSrv, $location, navModelSrv) {
|
||||||
$scope.command = {};
|
$scope.command = {};
|
||||||
$scope.authProxyEnabled = config.authProxyEnabled;
|
$scope.authProxyEnabled = config.authProxyEnabled;
|
||||||
$scope.ldapEnabled = config.ldapEnabled;
|
$scope.ldapEnabled = config.ldapEnabled;
|
||||||
@ -28,6 +22,7 @@ function (angular, config) {
|
|||||||
$location.path("profile");
|
$location.path("profile");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
});
|
angular.module('grafana.controllers').controller('ChangePasswordCtrl', ChangePasswordCtrl);
|
||||||
});
|
|
@ -1,16 +1,10 @@
|
|||||||
define([
|
import angular from 'angular';
|
||||||
'angular',
|
import config from 'app/core/config';
|
||||||
'app/core/config',
|
|
||||||
],
|
|
||||||
function (angular, config) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
config = config.default;
|
export class NewOrgCtrl {
|
||||||
|
|
||||||
var module = angular.module('grafana.controllers');
|
|
||||||
|
|
||||||
module.controller('NewOrgCtrl', function($scope, $http, backendSrv, navModelSrv) {
|
|
||||||
|
|
||||||
|
/** @ngInject **/
|
||||||
|
constructor($scope, $http, backendSrv, navModelSrv) {
|
||||||
$scope.navModel = navModelSrv.getOrgNav(0);
|
$scope.navModel = navModelSrv.getOrgNav(0);
|
||||||
$scope.newOrg = {name: ''};
|
$scope.newOrg = {name: ''};
|
||||||
|
|
||||||
@ -21,6 +15,7 @@ function (angular, config) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
});
|
angular.module('grafana.controllers').controller('NewOrgCtrl', NewOrgCtrl);
|
||||||
});
|
|
@ -1,13 +1,9 @@
|
|||||||
define([
|
import angular from 'angular';
|
||||||
'angular',
|
|
||||||
],
|
|
||||||
function (angular) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var module = angular.module('grafana.controllers');
|
export class OrgApiKeysCtrl {
|
||||||
|
|
||||||
module.controller('OrgApiKeysCtrl', function($scope, $http, backendSrv, navModelSrv) {
|
|
||||||
|
|
||||||
|
/** @ngInject **/
|
||||||
|
constructor ($scope, $http, backendSrv, navModelSrv) {
|
||||||
$scope.navModel = navModelSrv.getOrgNav(0);
|
$scope.navModel = navModelSrv.getOrgNav(0);
|
||||||
$scope.roleTypes = ['Viewer', 'Editor', 'Admin'];
|
$scope.roleTypes = ['Viewer', 'Editor', 'Admin'];
|
||||||
$scope.token = { role: 'Viewer' };
|
$scope.token = { role: 'Viewer' };
|
||||||
@ -43,6 +39,7 @@ function (angular) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.init();
|
$scope.init();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
});
|
angular.module('grafana.controllers').controller('OrgApiKeysCtrl', OrgApiKeysCtrl);
|
||||||
});
|
|
@ -1,13 +1,9 @@
|
|||||||
define([
|
import angular from 'angular';
|
||||||
'angular',
|
|
||||||
],
|
|
||||||
function (angular) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var module = angular.module('grafana.controllers');
|
export class OrgDetailsCtrl {
|
||||||
|
|
||||||
module.controller('OrgDetailsCtrl', function($scope, $http, backendSrv, contextSrv, navModelSrv) {
|
|
||||||
|
|
||||||
|
/** @ngInject **/
|
||||||
|
constructor($scope, $http, backendSrv, contextSrv, navModelSrv) {
|
||||||
$scope.init = function() {
|
$scope.init = function() {
|
||||||
$scope.getOrgInfo();
|
$scope.getOrgInfo();
|
||||||
$scope.navModel = navModelSrv.getOrgNav(0);
|
$scope.navModel = navModelSrv.getOrgNav(0);
|
||||||
@ -33,6 +29,7 @@ function (angular) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.init();
|
$scope.init();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
});
|
angular.module('grafana.controllers').controller('OrgDetailsCtrl', OrgDetailsCtrl);
|
||||||
});
|
|
@ -1,16 +1,10 @@
|
|||||||
define([
|
import angular from 'angular';
|
||||||
'angular',
|
import config from 'app/core/config';
|
||||||
'app/core/config',
|
|
||||||
],
|
|
||||||
function (angular, config) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
config = config.default;
|
export class SelectOrgCtrl {
|
||||||
|
|
||||||
var module = angular.module('grafana.controllers');
|
|
||||||
|
|
||||||
module.controller('SelectOrgCtrl', function($scope, backendSrv, contextSrv) {
|
|
||||||
|
|
||||||
|
/** @ngInject **/
|
||||||
|
constructor($scope, backendSrv, contextSrv) {
|
||||||
contextSrv.sidemenu = false;
|
contextSrv.sidemenu = false;
|
||||||
|
|
||||||
$scope.init = function() {
|
$scope.init = function() {
|
||||||
@ -30,6 +24,7 @@ function (angular, config) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.init();
|
$scope.init();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
});
|
angular.module('grafana.controllers').controller('SelectOrgCtrl', SelectOrgCtrl);
|
||||||
});
|
|
@ -1,14 +1,10 @@
|
|||||||
define([
|
import angular from 'angular';
|
||||||
'angular',
|
import _ from 'lodash';
|
||||||
'lodash',
|
|
||||||
],
|
|
||||||
function (angular, _) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var module = angular.module('grafana.controllers');
|
export class UserInviteCtrl {
|
||||||
|
|
||||||
module.controller('UserInviteCtrl', function($scope, backendSrv) {
|
|
||||||
|
|
||||||
|
/** @ngInject **/
|
||||||
|
constructor($scope, backendSrv) {
|
||||||
$scope.invites = [
|
$scope.invites = [
|
||||||
{name: '', email: '', role: 'Editor'},
|
{name: '', email: '', role: 'Editor'},
|
||||||
];
|
];
|
||||||
@ -44,5 +40,7 @@ function (angular, _) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
});
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
|
angular.module('grafana.controllers').controller('UserInviteCtrl', UserInviteCtrl);
|
Loading…
Reference in New Issue
Block a user