Files
grafana/public/app/features/profile/preferencesCtrl.js
2016-03-06 03:47:39 -08:00

26 lines
530 B
JavaScript

define([
'angular',
'app/core/config',
],
function (angular) {
'use strict';
var module = angular.module('grafana.controllers');
module.controller('PreferencesCtrl', function($scope, backendSrv, $location) {
$scope.prefData = {};
$scope.setUserPreferences = function() {
if (!$scope.userForm.$valid) { return; }
console.log($scope.command);
backendSrv.put('/api/user/prefs', { prefData : $scope.prefData }).then(function() {
$location.path("profile");
});
};
});
});