Commit ca06893e by Patrick O'Carroll

removed mock-teams, now gets teams from backend

parent beddfdd8
......@@ -32,13 +32,11 @@
<thead>
<tr>
<th>Name</th>
<th>Members</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="team in ctrl.user.teams">
<tr ng-repeat="team in ctrl.teams">
<td>{{team.name}}</td>
<td>{{team.members}}</td>
</tr>
</tbody>
</table>
......
......@@ -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;
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment