ocket8888 commented on code in PR #7613:
URL: https://github.com/apache/trafficcontrol/pull/7613#discussion_r1251108679
##########
experimental/traffic-portal/src/app/core/types/detail/type-detail.component.html:
##########
@@ -16,6 +16,8 @@
<tp-loading *ngIf="!type"></tp-loading>
<form ngNativeValidate (ngSubmit)="submit($event)" *ngIf="type">
<mat-card-header class="headers-container" *ngIf="!new">
+ <a mat-raised-button color="primary"
*ngIf="type.useInTable === 'cachegroup'" [routerLink]="'/core/cache-groups'"
[queryParams]="{search: type.name}">View Cache Groups</a>
+ <a mat-raised-button color="primary"
*ngIf="type.useInTable === 'server'" [routerLink]="'/core/servers'"
[queryParams]="{search: type.name}">View Servers</a>
Review Comment:
These should not use search, as that will highlight matches across all
string-type properties of the object. For example, if your type name is `EDGE`,
then clicking the servers button will show e.g. all cache servers with `edge`
in the hostname - which could be quite a lot. And more to the point, inaccurate.
Instead use the appropriate filtering via query parameters e.g.
`typeName=EDGE`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]