mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
prettier: change to single quoting
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import config from "app/core/config";
|
||||
import { coreModule } from "app/core/core";
|
||||
import config from 'app/core/config';
|
||||
import { coreModule } from 'app/core/core';
|
||||
|
||||
export class ProfileCtrl {
|
||||
user: any;
|
||||
@@ -19,26 +19,26 @@ export class ProfileCtrl {
|
||||
) {
|
||||
this.getUser();
|
||||
this.getUserOrgs();
|
||||
this.navModel = navModelSrv.getNav("profile", "profile-settings", 0);
|
||||
this.navModel = navModelSrv.getNav('profile', 'profile-settings', 0);
|
||||
}
|
||||
|
||||
getUser() {
|
||||
this.backendSrv.get("/api/user").then(user => {
|
||||
this.backendSrv.get('/api/user').then(user => {
|
||||
this.user = user;
|
||||
this.user.theme = user.theme || "dark";
|
||||
this.user.theme = user.theme || 'dark';
|
||||
});
|
||||
}
|
||||
|
||||
getUserOrgs() {
|
||||
this.backendSrv.get("/api/user/orgs").then(orgs => {
|
||||
this.backendSrv.get('/api/user/orgs').then(orgs => {
|
||||
this.orgs = orgs;
|
||||
this.showOrgsList = orgs.length > 1;
|
||||
});
|
||||
}
|
||||
|
||||
setUsingOrg(org) {
|
||||
this.backendSrv.post("/api/user/using/" + org.orgId).then(() => {
|
||||
window.location.href = config.appSubUrl + "/profile";
|
||||
this.backendSrv.post('/api/user/using/' + org.orgId).then(() => {
|
||||
window.location.href = config.appSubUrl + '/profile';
|
||||
});
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ export class ProfileCtrl {
|
||||
return;
|
||||
}
|
||||
|
||||
this.backendSrv.put("/api/user/", this.user).then(() => {
|
||||
this.backendSrv.put('/api/user/', this.user).then(() => {
|
||||
this.contextSrv.user.name = this.user.name || this.user.login;
|
||||
if (this.old_theme !== this.user.theme) {
|
||||
window.location.href = config.appSubUrl + this.$location.path();
|
||||
@@ -56,4 +56,4 @@ export class ProfileCtrl {
|
||||
}
|
||||
}
|
||||
|
||||
coreModule.controller("ProfileCtrl", ProfileCtrl);
|
||||
coreModule.controller('ProfileCtrl', ProfileCtrl);
|
||||
|
||||
Reference in New Issue
Block a user