newOrgCtrl.js 354 B

123456789101112131415161718
  1. define([
  2. 'angular',
  3. ],
  4. function (angular) {
  5. 'use strict';
  6. var module = angular.module('grafana.controllers');
  7. module.controller('NewOrgCtrl', function($scope, $http, backendSrv) {
  8. $scope.newOrg = {name: ''};
  9. $scope.createOrg = function() {
  10. backendSrv.post('/api/org/', $scope.newOrg).then($scope.getUserOrgs);
  11. };
  12. });
  13. });