removed mock-teams, now gets teams from backend

This commit is contained in:
Patrick O'Carroll
2018-08-08 10:50:27 +02:00
parent beddfdd86b
commit ca06893e69
2 changed files with 4 additions and 10 deletions

View File

@@ -28,13 +28,9 @@ export class ProfileCtrl {
}
getUserTeams() {
this.backendSrv.get('/api/user').then(teams => {
this.user.teams = [
{ name: 'Backend', email: 'backend@grafana.com', members: 5 },
{ name: 'Frontend', email: 'frontend@grafana.com', members: 4 },
{ name: 'Ops', email: 'ops@grafana.com', members: 6 },
];
this.showTeamsList = this.user.teams.length > 1;
this.backendSrv.get('/api/user/teams').then(teams => {
this.teams = teams;
this.showTeamsList = this.teams.length > 1;
});
}