mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
removed mock-teams, now gets teams from backend
This commit is contained in:
parent
beddfdd86b
commit
ca06893e69
@ -32,13 +32,11 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Members</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr ng-repeat="team in ctrl.user.teams">
|
<tr ng-repeat="team in ctrl.teams">
|
||||||
<td>{{team.name}}</td>
|
<td>{{team.name}}</td>
|
||||||
<td>{{team.members}}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -28,13 +28,9 @@ export class ProfileCtrl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getUserTeams() {
|
getUserTeams() {
|
||||||
this.backendSrv.get('/api/user').then(teams => {
|
this.backendSrv.get('/api/user/teams').then(teams => {
|
||||||
this.user.teams = [
|
this.teams = teams;
|
||||||
{ name: 'Backend', email: 'backend@grafana.com', members: 5 },
|
this.showTeamsList = this.teams.length > 1;
|
||||||
{ name: 'Frontend', email: 'frontend@grafana.com', members: 4 },
|
|
||||||
{ name: 'Ops', email: 'ops@grafana.com', members: 6 },
|
|
||||||
];
|
|
||||||
this.showTeamsList = this.user.teams.length > 1;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user