| 1234567891011121314151617181920212223 |
- define([
- 'angular',
- 'app/core/config',
- ],
- function (angular, config) {
- 'use strict';
- var module = angular.module('grafana.controllers');
- module.controller('NewOrgCtrl', function($scope, $http, backendSrv) {
- $scope.newOrg = {name: ''};
- $scope.createOrg = function() {
- backendSrv.post('/api/orgs/', $scope.newOrg).then(function(result) {
- backendSrv.post('/api/user/using/' + result.orgId).then(function() {
- window.location.href = config.appSubUrl + '/org';
- });
- });
- };
- });
- });
|