ocket8888 commented on code in PR #7243:
URL: https://github.com/apache/trafficcontrol/pull/7243#discussion_r1049997971
##########
experimental/traffic-portal/src/app/core/cache-groups/divisions/table/divisions-table.component.ts:
##########
@@ -121,15 +121,16 @@ export class DivisionsTableComponent implements OnInit {
});
ref.afterClosed().subscribe(result => {
if(result) {
-
this.api.deleteDivision(data.id);
+
this.api.deleteDivision(data.id).then(async () => this.divisions =
this.api.getDivisions());
}
});
break;
case "edit":
await this.router.navigate(["/core/division",
data.id]);
break;
case "viewRegions":
- console.log("Regions not implemented");
+ await this.router.navigate(["/core/regions"]);
Review Comment:
This is supposed to be a link to the regions *of the selected division(s)*,
not just all regions. If you're going to implement this, you need to navigate
to a filtered table view.
##########
experimental/traffic-portal/src/app/core/cache-groups/regions/table/regions-table.component.ts:
##########
@@ -94,21 +94,26 @@ export class RegionsTableComponent implements OnInit {
name: "Delete"
},
{
- action: "viewRegions",
+ action: "viewDivision",
multiRow: false,
- name: "View Regions"
+ name: "View Division"
Review Comment:
Links should be used for navigation, not click handlers. Instead of a
`ContextMenuAction`, this should be a `ContextMenuLink` that has an `href`
function that constructs the requisite link from the input selected Region.
--
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]