Opening custom links in same tab

Hello,

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.

Thanks.

Hi,

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.

Thanks
Pete

1 Like

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
kibana/plugins/x-pack/plugins/ml/public/components/anomalies_table
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?

Thanks.

Hi,

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.

Thanks
Pete

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:

Thanks.

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