瀏覽代碼

team list for profile page + mock teams

Patrick O'Carroll 7 年之前
父節點
當前提交
b0ddc15e1a
共有 2 個文件被更改,包括 5 次插入6 次删除
  1. 2 2
      public/app/features/org/partials/profile.html
  2. 3 4
      public/app/features/org/profile_ctrl.ts

+ 2 - 2
public/app/features/org/partials/profile.html

@@ -32,13 +32,13 @@
       <thead>
       <thead>
         <tr>
         <tr>
           <th>Name</th>
           <th>Name</th>
-          <th>Email</th>
+          <th>Members</th>
         </tr>
         </tr>
       </thead>
       </thead>
       <tbody>
       <tbody>
         <tr ng-repeat="team in ctrl.user.teams">
         <tr ng-repeat="team in ctrl.user.teams">
           <td>{{team.name}}</td>
           <td>{{team.name}}</td>
-          <td>{{team.email}}</td>
+          <td>{{team.members}}</td>
         </tr>
         </tr>
       </tbody>
       </tbody>
     </table>
     </table>

+ 3 - 4
public/app/features/org/profile_ctrl.ts

@@ -28,12 +28,11 @@ export class ProfileCtrl {
   }
   }
 
 
   getUserTeams() {
   getUserTeams() {
-    console.log(this.backendSrv.get('/api/teams'));
     this.backendSrv.get('/api/user').then(teams => {
     this.backendSrv.get('/api/user').then(teams => {
       this.user.teams = [
       this.user.teams = [
-        { name: 'Backend', email: 'backend@grafana.com', members: 2 },
-        { name: 'Frontend', email: 'frontend@grafana.com', members: 2 },
-        { name: 'Ops', email: 'ops@grafana.com', members: 2 },
+        { 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.showTeamsList = this.user.teams.length > 1;
     });
     });