ocket8888 commented on a change in pull request #3739: TP: adds the ability to
rearrange delivery service table columns as well as toggle column
visibility/searchability
URL: https://github.com/apache/trafficcontrol/pull/3739#discussion_r308311535
##########
File path:
traffic_portal/app/src/common/modules/table/deliveryServices/TableDeliveryServicesController.js
##########
@@ -235,10 +298,24 @@ var TableDeliveryServicesController =
function(deliveryServices, $anchorScroll,
null, // Divider
{
text: 'View Charts',
+ displayed: function () {
+ // only show if custom ds charts link is NOT configured
+ return !showCustomCharts;
+ },
click: function ($itemScope) {
locationUtils.navigateToPath('/delivery-services/' +
$itemScope.ds.id + '/charts?type=' + $itemScope.ds.type);
}
},
+ {
+ text: 'View Charts',
+ displayed: function () {
+ // only show if custom ds charts link IS configured
+ return showCustomCharts;
+ },
+ click: function ($itemScope, event) {
+ deliveryServiceUtils.openCharts($itemScope.ds, event);
Review comment:
This is shadowing [the global
`window.event`](https://developer.mozilla.org/en-US/docs/Web/API/Window/event)
variable, I'd recommend not doing that to avoid confusion.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services