From 4ed54f6aa9f938a29ddd3a9f13ce07641b22f3cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 18 Feb 2015 13:18:29 +0100 Subject: [PATCH] Force full reload when switching account, temp fix for refreshing frontend datasource, settings, and user account role --- src/app/features/profile/profileCtrl.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/features/profile/profileCtrl.js b/src/app/features/profile/profileCtrl.js index b028e48be1d..fab5367c726 100644 --- a/src/app/features/profile/profileCtrl.js +++ b/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() {