Opening custom links in same tab

(bluren) #1


I am using x-pack and have just begun with machine learning elements. In the metric viewer page, at the bottom, I see a table that contains the data pertaining to the anomalies detected. I was playing around with the custom links option and noticed that each custom link opens up in a new tab. I was just wondering if there is a way to have it open up in the same tab.


(Pete Harverson) #2


Thanks for the question on the Machine Learning plugin. Unfortunately there is not currently a way to configure whether the custom link opens in a new tab or the same tab - as you have noticed, the link will always open in a new tab. We will certainly consider adding in this ability when planning enhancements to the custom URL functionality for jobs.


(bluren) #3

Thanks Pete. I appreciate the response. I tried taking a look at achieving the same by modifying the content in
anomalies_table_links.html located at
changing a couple of _blank to _self. Although the changes were correct, they did not get reflected as I believe kibana optimizes the plugin code and the same will also need to be changed in ml.bundle.js present in kibana/optimize/bundles which doesn't sound to be a worthwhile hack. I shall look forward for the official implementation of the same.

While on the same topic, is it possible for us to manually reoptimize the package? I'm not sure if I'm phrasing it right, but is there a way to build the optimized bundle (in this case, ml.bundle.js) again to force any changes to reflect?


(Pete Harverson) #4


Yes, if editing the source files directly is an option then you can change the _blank to _self in the kibana/plugins/x-pack/plugins/ml/public/components/anomalies_table source. You mentioned editing anomalies_table_links.html, but I would edit the openCustomUrl function in anomalies_table_directive.js.

After editing a source file in Kibana, to get the bundles to rebuild, you need to stop the Kibana server, delete the contents of kibana/optimize and restart Kibana. Not sure if that is an option for you? Bear in mind, that whenever you upgrade you will need to reapply your code edit.

Hopefully we can build in this enhancement in a release before too long.


(bluren) #5

Ah yes. I was talking about the same file - anomalies_table_directive.js. My bad, copy paste error.

Thanks for this. Since I've just experimenting at the moment, I could keep an eye out to keep reapplying the edits each time there is an update... for now. :slight_smile:


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.