فهرست منبع

Force full reload when switching account, temp fix for refreshing frontend datasource, settings, and user account role

Torkel Ödegaard 11 سال پیش
والد
کامیت
4ed54f6aa9
1فایلهای تغییر یافته به همراه5 افزوده شده و 2 حذف شده
  1. 5 2
      src/app/features/profile/profileCtrl.js

+ 5 - 2
src/app/features/profile/profileCtrl.js

@@ -1,7 +1,8 @@
 define([
   'angular',
+  'config',
 ],
-function (angular) {
+function (angular, config) {
   'use strict';
 
   var module = angular.module('grafana.controllers');
@@ -28,7 +29,9 @@ function (angular) {
     };
 
     $scope.setUsingAccount = function(account) {
-      backendSrv.post('/api/user/using/' + account.accountId).then($scope.getUserAccounts);
+      backendSrv.post('/api/user/using/' + account.accountId).then(function() {
+        window.location.href = config.appSubUrl + '/profile';
+      });
     };
 
     $scope.update = function() {