@ -3,6 +3,7 @@ import _ from 'lodash';
import coreModule from 'app/core/core_module' ;
import coreModule from 'app/core/core_module' ;
import appEvents from 'app/core/app_events' ;
import appEvents from 'app/core/app_events' ;
import { getExploreUrl } from 'app/core/utils/explore' ;
import { getExploreUrl } from 'app/core/utils/explore' ;
import locationUtil from 'app/core/utils/location_util' ;
import { store } from 'app/store/store' ;
import { store } from 'app/store/store' ;
import Mousetrap from 'mousetrap' ;
import Mousetrap from 'mousetrap' ;
@ -220,8 +221,10 @@ export class KeybindingSrv {
const panel = dashboard . getPanelById ( dashboard . meta . focusPanelId ) ;
const panel = dashboard . getPanelById ( dashboard . meta . focusPanelId ) ;
const datasource = await this . datasourceSrv . get ( panel . datasource ) ;
const datasource = await this . datasourceSrv . get ( panel . datasource ) ;
const url = await getExploreUrl ( panel , panel . targets , datasource , this . datasourceSrv , this . timeSrv ) ;
const url = await getExploreUrl ( panel , panel . targets , datasource , this . datasourceSrv , this . timeSrv ) ;
if ( url ) {
const urlWithoutBase = locationUtil . stripBaseFromUrl ( url ) ;
this . $timeout ( ( ) = > this . $location . url ( url ) ) ;
if ( urlWithoutBase ) {
this . $timeout ( ( ) = > this . $location . url ( urlWithoutBase ) ) ;
}
}
}
}
} ) ;
} ) ;