Commit ca06893e by Patrick O'Carroll

removed mock-teams, now gets teams from backend

parent beddfdd8
...@@ -32,13 +32,11 @@ ...@@ -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 { ...@@ -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;
}); });
} }
......
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