You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@submarine.apache.org by GitBox <gi...@apache.org> on 2020/04/03 18:00:17 UTC

[GitHub] [submarine] kobe860219 opened a new pull request #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular

kobe860219 opened a new pull request #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular
URL: https://github.com/apache/submarine/pull/255
 
 
   ### What is this PR for?
   Implement frontend of team page in workbench with Angular
   
   
   ### What type of PR is it?
   Feature
   
   ### Todos
   
   ### What is the Jira issue?
   https://issues.apache.org/jira/browse/SUBMARINE-454
   
   ### How should this be tested?
   https://travis-ci.org/github/kobe860219/submarine
   
   ### Screenshots (if appropriate)
   <img width="1436" alt="teamDemo" src="https://user-images.githubusercontent.com/48027290/78390800-c59dcd00-7617-11ea-820e-c16f7c8d9b83.png">
   
   https://imgur.com/84kc6WV
   
   ### Questions:
   * Does the licenses files need update? No
   * Is there breaking changes for older versions? No
   * Does this needs documentation? No
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [submarine] kobe860219 commented on issue #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
kobe860219 commented on issue #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular
URL: https://github.com/apache/submarine/pull/255#issuecomment-609610012
 
 
   Fix the problem in comment and add teamIT.java e2e test file.
   <img width="566" alt="teamITDemo" src="https://user-images.githubusercontent.com/48027290/78532554-0a915180-781a-11ea-9fd9-a72626dce0b2.png">
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [submarine] pingsutw commented on a change in pull request #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
pingsutw commented on a change in pull request #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular
URL: https://github.com/apache/submarine/pull/255#discussion_r403653466
 
 

 ##########
 File path: submarine-workbench/workbench-web-ng/src/app/pages/workbench/workspace/team/team.component.ts
 ##########
 @@ -18,17 +18,152 @@
  */
 
 import { Component, OnInit } from '@angular/core';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { NzNotificationService } from 'ng-zorro-antd/notification';
 
 @Component({
   selector: 'app-team',
   templateUrl: './team.component.html',
   styleUrls: ['./team.component.scss']
 })
-export class TeamComponent implements OnInit {
-  isSpinning = true;
-  constructor() { }
+export class TeamComponent implements OnInit {  
+
+  // Get into a Team or not
+  isEntering = false;
+
+  //Get Current Team Data (Now Use Simulated Data) 
+  currentTeamName: string;
+  currentTeamDepartment: string;
+  currentTeamDescription: string;
+  currentTeamProjectNum: Number;
+  currentTeamMemberNum: Number;
+  currentTeamSettingPermission: boolean;
+
+  // Is Editging Members or not
+  isEditingMember = false;
+
+  // For AddUserModal
+  isVisible = false;
+  isOkLoading = false;
+
+  // Simulated Data for Members
+  member = [
+    {
+      name: 'Anna',
+      email: 'test@mail.com',
+      permission: 'admin'
+    },
+    {
+      name: 'James',
+      email: 'test@mail.com',
+      permission: 'admin'
+    },
+    {
+      name: 'Jack',
+      email: 'test@mail.com',
+      permission: 'contributer'
+    },
+    {
+      name: 'Ken',
+      email: 'test@mail.com',
+      permission: 'viwer'
+    }
+  ]
+
+  // Simulated Data for Teams
+  existTeams = [
+    {
+      name: "Submarine",
+      department: "Apache",
+      description: "Something about this team...",
+      projectNum: 3,
+      memberNum: 3,
+      role: 'admin',
+      settingPermission: true
+    },
+    {
+      name: "Team2",
+      department: "Apple",
+      description: "Something about this team...",
+      projectNum: 3,
+      memberNum: 3,
+      role: 'viwer',
+      settingPermission: false
+    },
+  ]
+  constructor(
+    private nzMessageService: NzMessageService, 
+    private notification: NzNotificationService,
+    ) { }
 
   ngOnInit() {
   }
 
-}
+  enter(team) {
+    this.isEntering = true;
+    this.currentTeamName = team.name;
+    this.currentTeamDepartment = team.department;
+    this.currentTeamDescription = team.description;
+    this.currentTeamProjectNum = team.projectNum;
+    this.currentTeamMemberNum = team.memberNum;
+    this.currentTeamSettingPermission = team.settingPermission;
+  }
+
+  startEditMember() {
+    this.isEditingMember=true;
+  }
+
+  saveEditMember() {
+    this.isEditingMember=false;
+  }
+
+  cancel(): void {
+  }
+
+  confirm(): void {
+    this.nzMessageService.info('Delete Successful!');
+  }
+
+  // For AddUserModal
+  startAddUser(): void {
+    this.isVisible = true;
+  }
+
+  // Add Success
+  createNotification(type: string): void {
+    this.notification.create(
+      type,
+      'Add Successful!',
+      'Make sure thar user check invitation!'
+    );
+  }
+  
+  // For AddUserModal
+  handleOk(): void {
+    this.isOkLoading = true;
+    setTimeout(() => {
+      this.isVisible = false;
+      this.isOkLoading = false;
+      this.createNotification("success");
+    }, 1000);
+  }
+
+  // For AddUserModal
+  handleCancel(): void {
+    this.isVisible = false;
+  }
+
+  //TODO:kobe860219 ; Get Team From DataBase
+  getTeamDataFromDB() {
+
+  }
+
+  //TODO:kobe860219 ; Get User From DataBase
+  getUserDataFromDB() {
+  }
+
+  //TODO:kobe860219 ; Update Data to DataBase
 
 Review comment:
   ```suggestion
     //TODO(kobe860219): Update Data to DataBase
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [submarine] kobe860219 commented on issue #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
kobe860219 commented on issue #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular
URL: https://github.com/apache/submarine/pull/255#issuecomment-608587228
 
 
   1.Presenting functions with simulated data at this stage.
   2.Currently mainly presents the permission settings of the members of the team.
   3.Functions will be cut into small components in the future and continue developing.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [submarine] pingsutw commented on a change in pull request #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
pingsutw commented on a change in pull request #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular
URL: https://github.com/apache/submarine/pull/255#discussion_r403653397
 
 

 ##########
 File path: submarine-workbench/workbench-web-ng/src/app/pages/workbench/workspace/team/team.component.ts
 ##########
 @@ -18,17 +18,152 @@
  */
 
 import { Component, OnInit } from '@angular/core';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { NzNotificationService } from 'ng-zorro-antd/notification';
 
 @Component({
   selector: 'app-team',
   templateUrl: './team.component.html',
   styleUrls: ['./team.component.scss']
 })
-export class TeamComponent implements OnInit {
-  isSpinning = true;
-  constructor() { }
+export class TeamComponent implements OnInit {  
+
+  // Get into a Team or not
+  isEntering = false;
+
+  //Get Current Team Data (Now Use Simulated Data) 
+  currentTeamName: string;
+  currentTeamDepartment: string;
+  currentTeamDescription: string;
+  currentTeamProjectNum: Number;
+  currentTeamMemberNum: Number;
+  currentTeamSettingPermission: boolean;
+
+  // Is Editging Members or not
+  isEditingMember = false;
+
+  // For AddUserModal
+  isVisible = false;
+  isOkLoading = false;
+
+  // Simulated Data for Members
+  member = [
+    {
+      name: 'Anna',
+      email: 'test@mail.com',
+      permission: 'admin'
+    },
+    {
+      name: 'James',
+      email: 'test@mail.com',
+      permission: 'admin'
+    },
+    {
+      name: 'Jack',
+      email: 'test@mail.com',
+      permission: 'contributer'
+    },
+    {
+      name: 'Ken',
+      email: 'test@mail.com',
+      permission: 'viwer'
+    }
+  ]
+
+  // Simulated Data for Teams
+  existTeams = [
+    {
+      name: "Submarine",
+      department: "Apache",
+      description: "Something about this team...",
+      projectNum: 3,
+      memberNum: 3,
+      role: 'admin',
+      settingPermission: true
+    },
+    {
+      name: "Team2",
+      department: "Apple",
+      description: "Something about this team...",
+      projectNum: 3,
+      memberNum: 3,
+      role: 'viwer',
+      settingPermission: false
+    },
+  ]
+  constructor(
+    private nzMessageService: NzMessageService, 
+    private notification: NzNotificationService,
+    ) { }
 
   ngOnInit() {
   }
 
-}
+  enter(team) {
+    this.isEntering = true;
+    this.currentTeamName = team.name;
+    this.currentTeamDepartment = team.department;
+    this.currentTeamDescription = team.description;
+    this.currentTeamProjectNum = team.projectNum;
+    this.currentTeamMemberNum = team.memberNum;
+    this.currentTeamSettingPermission = team.settingPermission;
+  }
+
+  startEditMember() {
+    this.isEditingMember=true;
+  }
+
+  saveEditMember() {
+    this.isEditingMember=false;
+  }
+
+  cancel(): void {
+  }
+
+  confirm(): void {
+    this.nzMessageService.info('Delete Successful!');
+  }
+
+  // For AddUserModal
+  startAddUser(): void {
+    this.isVisible = true;
+  }
+
+  // Add Success
+  createNotification(type: string): void {
+    this.notification.create(
+      type,
+      'Add Successful!',
+      'Make sure thar user check invitation!'
+    );
+  }
+  
+  // For AddUserModal
+  handleOk(): void {
+    this.isOkLoading = true;
+    setTimeout(() => {
+      this.isVisible = false;
+      this.isOkLoading = false;
+      this.createNotification("success");
+    }, 1000);
+  }
+
+  // For AddUserModal
+  handleCancel(): void {
+    this.isVisible = false;
+  }
+
+  //TODO:kobe860219 ; Get Team From DataBase
 
 Review comment:
   ```suggestion
     //TODO(kobe860219): Get Team From DataBase
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [submarine] jasoonn commented on issue #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
jasoonn commented on issue #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular
URL: https://github.com/apache/submarine/pull/255#issuecomment-609373389
 
 
   Thanks for your contribution, @kobe860219
   It looks great, and I have some suggestion.
   1. Add some basic E2E unit tests: you can refer to this [this](https://github.com/apache/submarine/blob/master/submarine-test/test-e2e/src/test/java/org/apache/submarine/integration/workspaceIT.java). Maybe add a function in the file for testing the team page.
   2. There should be newline at the end of all the files.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [submarine] kobe860219 commented on issue #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
kobe860219 commented on issue #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular
URL: https://github.com/apache/submarine/pull/255#issuecomment-609629900
 
 
   @jasoonn  @liuxunorg  I have updated done. Please help me preview this PR, thanks a lot.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [submarine] asfgit closed pull request #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular
URL: https://github.com/apache/submarine/pull/255
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [submarine] pingsutw commented on a change in pull request #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
pingsutw commented on a change in pull request #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular
URL: https://github.com/apache/submarine/pull/255#discussion_r403653431
 
 

 ##########
 File path: submarine-workbench/workbench-web-ng/src/app/pages/workbench/workspace/team/team.component.ts
 ##########
 @@ -18,17 +18,152 @@
  */
 
 import { Component, OnInit } from '@angular/core';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { NzNotificationService } from 'ng-zorro-antd/notification';
 
 @Component({
   selector: 'app-team',
   templateUrl: './team.component.html',
   styleUrls: ['./team.component.scss']
 })
-export class TeamComponent implements OnInit {
-  isSpinning = true;
-  constructor() { }
+export class TeamComponent implements OnInit {  
+
+  // Get into a Team or not
+  isEntering = false;
+
+  //Get Current Team Data (Now Use Simulated Data) 
+  currentTeamName: string;
+  currentTeamDepartment: string;
+  currentTeamDescription: string;
+  currentTeamProjectNum: Number;
+  currentTeamMemberNum: Number;
+  currentTeamSettingPermission: boolean;
+
+  // Is Editging Members or not
+  isEditingMember = false;
+
+  // For AddUserModal
+  isVisible = false;
+  isOkLoading = false;
+
+  // Simulated Data for Members
+  member = [
+    {
+      name: 'Anna',
+      email: 'test@mail.com',
+      permission: 'admin'
+    },
+    {
+      name: 'James',
+      email: 'test@mail.com',
+      permission: 'admin'
+    },
+    {
+      name: 'Jack',
+      email: 'test@mail.com',
+      permission: 'contributer'
+    },
+    {
+      name: 'Ken',
+      email: 'test@mail.com',
+      permission: 'viwer'
+    }
+  ]
+
+  // Simulated Data for Teams
+  existTeams = [
+    {
+      name: "Submarine",
+      department: "Apache",
+      description: "Something about this team...",
+      projectNum: 3,
+      memberNum: 3,
+      role: 'admin',
+      settingPermission: true
+    },
+    {
+      name: "Team2",
+      department: "Apple",
+      description: "Something about this team...",
+      projectNum: 3,
+      memberNum: 3,
+      role: 'viwer',
+      settingPermission: false
+    },
+  ]
+  constructor(
+    private nzMessageService: NzMessageService, 
+    private notification: NzNotificationService,
+    ) { }
 
   ngOnInit() {
   }
 
-}
+  enter(team) {
+    this.isEntering = true;
+    this.currentTeamName = team.name;
+    this.currentTeamDepartment = team.department;
+    this.currentTeamDescription = team.description;
+    this.currentTeamProjectNum = team.projectNum;
+    this.currentTeamMemberNum = team.memberNum;
+    this.currentTeamSettingPermission = team.settingPermission;
+  }
+
+  startEditMember() {
+    this.isEditingMember=true;
+  }
+
+  saveEditMember() {
+    this.isEditingMember=false;
+  }
+
+  cancel(): void {
+  }
+
+  confirm(): void {
+    this.nzMessageService.info('Delete Successful!');
+  }
+
+  // For AddUserModal
+  startAddUser(): void {
+    this.isVisible = true;
+  }
+
+  // Add Success
+  createNotification(type: string): void {
+    this.notification.create(
+      type,
+      'Add Successful!',
+      'Make sure thar user check invitation!'
+    );
+  }
+  
+  // For AddUserModal
+  handleOk(): void {
+    this.isOkLoading = true;
+    setTimeout(() => {
+      this.isVisible = false;
+      this.isOkLoading = false;
+      this.createNotification("success");
+    }, 1000);
+  }
+
+  // For AddUserModal
+  handleCancel(): void {
+    this.isVisible = false;
+  }
+
+  //TODO:kobe860219 ; Get Team From DataBase
+  getTeamDataFromDB() {
+
+  }
+
+  //TODO:kobe860219 ; Get User From DataBase
 
 Review comment:
   ```suggestion
     //TODO(kobe860219): Get User From DataBase
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [submarine] liuxunorg commented on issue #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
liuxunorg commented on issue #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular
URL: https://github.com/apache/submarine/pull/255#issuecomment-610459485
 
 
   Will merge if no more comments.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [submarine] jasoonn commented on a change in pull request #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
jasoonn commented on a change in pull request #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular
URL: https://github.com/apache/submarine/pull/255#discussion_r403661665
 
 

 ##########
 File path: submarine-workbench/workbench-web-ng/src/app/pages/workbench/workspace/team/team.component.html
 ##########
 @@ -17,7 +17,149 @@
   ~ under the License.
   -->
 
-<div id="teamDiv">
-  <nz-spin [nzSpinning]="isSpinning">
-  </nz-spin>
+<!--TeamHome-->
+<div id="teamDiv" *ngIf="!isEntering">
+  <div id="searchRegion" align="right">
+    <nz-input-group nzSearch [nzAddOnAfter]="searchIconBtn" style="width:300px;margin: 10px;">
+      <input type="text"  nz-input placeholder="Search...">
+    </nz-input-group>
+    <ng-template  #searchIconBtn>
+      <button nz-button nzType="primary" nzSearch>
+        <i nz-icon nzType="search"></i>
+      </button>
+    </ng-template>
+    <button nz-button nzType="primary" style="margin: 10px;">
+      <i nz-icon nzType="usergroup-add" nzTheme="outline"></i>Create Team
+    </button>
+  </div>
+  <div id="teamList" style="margin: 20px;">
+    <div nz-row [nzGutter]="12" nzType="flex" nzJustify="start">
+      <div *ngFor="let team of existTeams" nz-col [nzSpan]="8">
+        <nz-card [nzTitle]="team.name" [nzExtra]="team.department" [nzActions]="[actionEnter]">
+          {{ team.description }}
+          <br>
+          <br>
+          <label>
+            <i nz-icon nzType="project" nzTheme="outline"></i> {{ team.projectNum }}
+            <nz-divider nzType="vertical"></nz-divider> 
+            <i nz-icon nzType="user" nzTheme="outline"></i> {{ team.memberNum }}
+            <nz-divider nzType="vertical"></nz-divider>
+            <i nz-icon nzType="idcard" nzTheme="outline"></i> {{ team.role }}
+          </label>
+        </nz-card>
+        <ng-template  #actionEnter>
+          <a (click)="enter(team)"><i nz-icon nzType="arrow-right" nzTheme="outline"></i> Enter</a> 
+        </ng-template>
+      </div>
+    </div>
+  </div>
 </div>
+
+<!--Enter a team-->
+<div *ngIf="isEntering" style="margin: 20px;background-color: white;">
+  <nz-card [nzTitle]="currentTeamName" [nzExtra]=cardExtra>
+    <ng-template  #cardExtra>
+      {{ currentTeamDepartment }}
+      <button nz-button nzType="primary" nzSize="small" (click)="isEntering=false" style="margin-left: 10px;">
+        <i nz-icon nzType="rollback" nzTheme="outline"></i>Go Back
+      </button>
+    </ng-template>
+    <nz-tabset>
+      <!--Profile-->
+      <nz-tab [nzTitle]="tab1">
+        <div style="text-align: center;">
+          <nz-spin [nzSize]="'large'" nzSimple></nz-spin>
+        </div>
+      </nz-tab>
+      <!--Projects-->
+      <nz-tab [nzTitle]="tab2">
+        <div style="text-align: center;">
+          <nz-spin [nzSize]="'large'" nzSimple></nz-spin>
+        </div>
+      </nz-tab>
+      <!--Members-->
+      <nz-tab [nzTitle]="tab3">
+        <div style="margin: 15px;" align="right">
+          <button nz-button nzType="primary" style="margin-right: 10px;" (click)="startAddUser()"[disabled]="!currentTeamSettingPermission"><i nz-icon nzType="plus"></i>Add</button>
+          <button nz-button nzType="primary" style="margin-right: 10px;" (click)="startEditMember()" [disabled]="!currentTeamSettingPermission"><i nz-icon nzType="edit"></i>Edit</button>
+          <button nz-button nzType="primary" style="margin-right: 10px;" (click)="saveEditMember()" [disabled]="!isEditingMember"><i nz-icon nzType="check"></i>Save</button>
+        </div>
+        <div>
+          <nz-table #basicTable [nzData]="member">
+            <thead>
+              <tr>
+                <th style="width: 100px;">Name</th>
+                <th style="width: 100px;">Email</th>
+                <th style="width: 100px;">Role</th>
+                <th *ngIf="isEditingMember" style="width: 200px;">Edit</th>
+              </tr>
+            </thead>
+            <tbody>
+              <tr *ngFor="let data of basicTable.data">
+                <td>{{ data.name }}</td>
+                <td>{{ data.email }}</td>
+                <td>{{ data.permission }}</td>
+                <td *ngIf="isEditingMember">
+                  <nz-select [(ngModel)]="data.permission" style="width: 150px;">
+                    <nz-option nzValue="admin" nzLabel="admin"></nz-option>
+                    <nz-option nzValue="contributer" nzLabel="contributer"></nz-option>
+                    <nz-option nzValue="viwer" nzLabel="viwer"></nz-option>
+                  </nz-select>
+                  <nz-divider nzType="vertical"></nz-divider>
+                  <a
+                    nz-popconfirm
+                    nzTitle="Are you sure to delete this user ?"
+                    nzOkText="Ok"
+                    nzCancelText="Cancel"
+                    (nzOnConfirm)="confirm()"
+                    (nzOnCancel)="cancel()"
+                    >Delete</a>
+                </td>
+              </tr>
+            </tbody>
+          </nz-table>
+        </div>
+      </nz-tab>
+      <!--Cluster-->
+      <nz-tab [nzTitle]="tab4">
+        <div style="text-align: center;">
+          <nz-spin [nzSize]="'large'" nzSimple></nz-spin>
+        </div>
+      </nz-tab>
+      <!--Setting-->
+      <nz-tab [nzTitle]="tab5" [nzDisabled]="!currentTeamSettingPermission">
+        <div style="text-align: center;">
+          <nz-spin [nzSize]="'large'" nzSimple></nz-spin>
+        </div>
+      </nz-tab>
+    </nz-tabset>
+  </nz-card>
+  <!--Template for Title of Tabs-->
+  <ng-template #tab1>
+    <i nz-icon nzType="profile" nzTheme="outline"></i>Profile
+  </ng-template>
+  <ng-template #tab2>
+    <i nz-icon nzType="project" nzTheme="outline"></i>Projects
+  </ng-template>
+  <ng-template #tab3>
+    <i nz-icon nzType="team" nzTheme="outline"></i>Members
+  </ng-template>
+  <ng-template #tab4>
+    <i nz-icon nzType="cluster" nzTheme="outline"></i>Cluster
+  </ng-template>
+  <ng-template #tab5>
+    <i nz-icon nzType="setting" nzTheme="outline"></i>Setting
+  </ng-template>
+</div>
+
+<!--Add User Modal-->
+<nz-modal
+  [(nzVisible)]="isVisible"
+    nzTitle="Invite new member"
+    (nzOnCancel)="handleCancel()"
+    (nzOnOk)="handleOk()"
+    [nzOkLoading]="isOkLoading"
+>
+  <p>Use E-mail to add member!</p>
+  
+</nz-modal>
 
 Review comment:
   Should be added newline at the end of the file.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [submarine] pingsutw commented on a change in pull request #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
pingsutw commented on a change in pull request #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular
URL: https://github.com/apache/submarine/pull/255#discussion_r403654042
 
 

 ##########
 File path: submarine-workbench/workbench-web-ng/src/app/pages/workbench/workspace/team/team.component.ts
 ##########
 @@ -18,17 +18,152 @@
  */
 
 import { Component, OnInit } from '@angular/core';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { NzNotificationService } from 'ng-zorro-antd/notification';
 
 @Component({
   selector: 'app-team',
   templateUrl: './team.component.html',
   styleUrls: ['./team.component.scss']
 })
-export class TeamComponent implements OnInit {
-  isSpinning = true;
-  constructor() { }
+export class TeamComponent implements OnInit {  
+
+  // Get into a Team or not
+  isEntering = false;
+
+  //Get Current Team Data (Now Use Simulated Data) 
+  currentTeamName: string;
+  currentTeamDepartment: string;
+  currentTeamDescription: string;
+  currentTeamProjectNum: Number;
+  currentTeamMemberNum: Number;
+  currentTeamSettingPermission: boolean;
+
+  // Is Editging Members or not
+  isEditingMember = false;
+
+  // For AddUserModal
+  isVisible = false;
+  isOkLoading = false;
+
+  // Simulated Data for Members
+  member = [
+    {
+      name: 'Anna',
+      email: 'test@mail.com',
+      permission: 'admin'
+    },
+    {
+      name: 'James',
+      email: 'test@mail.com',
+      permission: 'admin'
+    },
+    {
+      name: 'Jack',
+      email: 'test@mail.com',
+      permission: 'contributer'
+    },
+    {
+      name: 'Ken',
+      email: 'test@mail.com',
+      permission: 'viwer'
+    }
+  ]
+
+  // Simulated Data for Teams
+  existTeams = [
+    {
+      name: "Submarine",
+      department: "Apache",
+      description: "Something about this team...",
+      projectNum: 3,
+      memberNum: 3,
+      role: 'admin',
+      settingPermission: true
+    },
+    {
+      name: "Team2",
+      department: "Apple",
+      description: "Something about this team...",
+      projectNum: 3,
+      memberNum: 3,
+      role: 'viwer',
+      settingPermission: false
+    },
+  ]
+  constructor(
+    private nzMessageService: NzMessageService, 
+    private notification: NzNotificationService,
+    ) { }
 
   ngOnInit() {
   }
 
-}
+  enter(team) {
+    this.isEntering = true;
+    this.currentTeamName = team.name;
+    this.currentTeamDepartment = team.department;
+    this.currentTeamDescription = team.description;
+    this.currentTeamProjectNum = team.projectNum;
+    this.currentTeamMemberNum = team.memberNum;
+    this.currentTeamSettingPermission = team.settingPermission;
+  }
+
+  startEditMember() {
+    this.isEditingMember=true;
+  }
+
+  saveEditMember() {
+    this.isEditingMember=false;
+  }
+
+  cancel(): void {
+  }
+
+  confirm(): void {
+    this.nzMessageService.info('Delete Successful!');
+  }
+
+  // For AddUserModal
+  startAddUser(): void {
+    this.isVisible = true;
+  }
+
+  // Add Success
+  createNotification(type: string): void {
+    this.notification.create(
+      type,
+      'Add Successful!',
+      'Make sure thar user check invitation!'
 
 Review comment:
   ```suggestion
         'Make sure that user check invitation!'
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [submarine] jasoonn commented on issue #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
jasoonn commented on issue #255: SUBMARINE-454. Implement frontend of team page in workbench with Angular
URL: https://github.com/apache/submarine/pull/255#issuecomment-609690937
 
 
   @kobe860219 Thank for your contribution. It looks good to me :))

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services