You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2022/07/14 18:16:24 UTC

[GitHub] [trafficcontrol] ocket8888 opened a new pull request, #6964: TPv2 Tenants table

ocket8888 opened a new pull request, #6964:
URL: https://github.com/apache/trafficcontrol/pull/6964

   This PR adds a "tenants" table to TPv2. It also fixes a bug I found where the generic table component wouldn't properly recognize that a multi-row context menu action should be disabled when there's no explicit selection.
   
   <hr/>
   
   ## Which Traffic Control components are affected by this PR?
   - Traffic Portal (experimental v2)
   
   ## What is the best way to verify this PR?
   Make sure the provided tests have sufficient coverage and all pass.
   
   ## PR submission checklist
   - [x] This PR has tests
   - [x] This PR has JSDoc documentation
   - [x] This PR needs no CHANGELOG.md entry
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY**


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] shamrickus commented on a diff in pull request #6964: TPv2 Tenants table

Posted by GitBox <gi...@apache.org>.
shamrickus commented on code in PR #6964:
URL: https://github.com/apache/trafficcontrol/pull/6964#discussion_r922304353


##########
experimental/traffic-portal/src/app/shared/tp-header/tp-header.component.html:
##########
@@ -48,4 +50,10 @@ <h1>{{title ? title : 'Welcome to Traffic Portal!'}}</h1>
 	<mat-menu #themeMenu="matMenu">
 		<button mat-menu-item *ngFor="let theme of themeSvc.themes" (click)="themeSvc.loadTheme(theme)">{{theme.name}}</button>
 	</mat-menu>
+	<mat-menu #usersMenu="matMenu">
+		<a mat-menu-item routerLink="/core/users" *ngIf="hasPermission('USER:READ')">View Users</a>
+		<button mat-button type="button" *ngIf="!hasPermission('USER:READ')">View Users</button>

Review Comment:
   Should these buttons be disabled?



##########
experimental/traffic-portal/src/app/shared/tp-header/tp-header.component.html:
##########
@@ -48,4 +50,10 @@ <h1>{{title ? title : 'Welcome to Traffic Portal!'}}</h1>
 	<mat-menu #themeMenu="matMenu">
 		<button mat-menu-item *ngFor="let theme of themeSvc.themes" (click)="themeSvc.loadTheme(theme)">{{theme.name}}</button>
 	</mat-menu>
+	<mat-menu #usersMenu="matMenu">
+		<a mat-menu-item routerLink="/core/users" *ngIf="hasPermission('USER:READ')">View Users</a>
+		<button mat-button type="button" *ngIf="!hasPermission('USER:READ')">View Users</button>
+		<a mat-menu-item routerLink="/core/tenants" *ngIf="hasPermission('TENANT:READ')">View Tenants</a>
+		<button mat-button type="button" *ngIf="!hasPermission('TENANT:READ')">View Users</button>

Review Comment:
   Should this be "View Tenants"?



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] shamrickus merged pull request #6964: TPv2 Tenants table

Posted by GitBox <gi...@apache.org>.
shamrickus merged PR #6964:
URL: https://github.com/apache/trafficcontrol/pull/6964


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] ocket8888 commented on a diff in pull request #6964: TPv2 Tenants table

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on code in PR #6964:
URL: https://github.com/apache/trafficcontrol/pull/6964#discussion_r922315527


##########
experimental/traffic-portal/src/app/shared/tp-header/tp-header.component.html:
##########
@@ -48,4 +50,10 @@ <h1>{{title ? title : 'Welcome to Traffic Portal!'}}</h1>
 	<mat-menu #themeMenu="matMenu">
 		<button mat-menu-item *ngFor="let theme of themeSvc.themes" (click)="themeSvc.loadTheme(theme)">{{theme.name}}</button>
 	</mat-menu>
+	<mat-menu #usersMenu="matMenu">
+		<a mat-menu-item routerLink="/core/users" *ngIf="hasPermission('USER:READ')">View Users</a>
+		<button mat-button type="button" *ngIf="!hasPermission('USER:READ')">View Users</button>
+		<a mat-menu-item routerLink="/core/tenants" *ngIf="hasPermission('TENANT:READ')">View Tenants</a>
+		<button mat-button type="button" *ngIf="!hasPermission('TENANT:READ')">View Users</button>

Review Comment:
   Yes



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] ocket8888 commented on a diff in pull request #6964: TPv2 Tenants table

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on code in PR #6964:
URL: https://github.com/apache/trafficcontrol/pull/6964#discussion_r922315810


##########
experimental/traffic-portal/src/app/shared/tp-header/tp-header.component.html:
##########
@@ -48,4 +50,10 @@ <h1>{{title ? title : 'Welcome to Traffic Portal!'}}</h1>
 	<mat-menu #themeMenu="matMenu">
 		<button mat-menu-item *ngFor="let theme of themeSvc.themes" (click)="themeSvc.loadTheme(theme)">{{theme.name}}</button>
 	</mat-menu>
+	<mat-menu #usersMenu="matMenu">
+		<a mat-menu-item routerLink="/core/users" *ngIf="hasPermission('USER:READ')">View Users</a>
+		<button mat-button type="button" *ngIf="!hasPermission('USER:READ')">View Users</button>

Review Comment:
   Yes



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org