mirror of
https://github.com/grafana/grafana.git
synced 2024-11-22 17:06:57 -06:00
Explore Metrics: Duplicate subpath (#96287)
* explore metrics subpath * optimize
This commit is contained in:
parent
a049183ecd
commit
9cd2598e8c
@ -164,11 +164,9 @@ export class MetricActionBar extends SceneObjectBase<MetricActionBarState> {
|
||||
public openExploreLink = async () => {
|
||||
reportExploreMetrics('selected_metric_action_clicked', { action: 'open_in_explore' });
|
||||
this.getLinkToExplore().then((link) => {
|
||||
// We need to ensure we prefix with the appSubUrl for environments that don't host grafana at the root.
|
||||
const url = `${config.appSubUrl}${link}`;
|
||||
// We use window.open instead of a Link or <a> because we want to compute the explore link when clicking,
|
||||
// if we precompute it we have to keep track of a lot of dependencies
|
||||
window.open(url, '_blank');
|
||||
window.open(link, '_blank');
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user