mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Panel inspect: Fix inspect keyboard shortcut when grafana served from subpath (#99366)
* Panel inspect: Fix inspect keyboard shortcut when grafana served from a subpath * Add e2e test
This commit is contained in:
parent
5b8e6f8fa8
commit
51b4ac50aa
@ -21,4 +21,12 @@ describe('Dashboard keybindings', () => {
|
||||
e2e.components.Panels.Panel.title('server = A, pod = Bob').should('be.visible');
|
||||
e2e.components.Panels.Panel.title('server = B, pod = Bob').should('be.visible');
|
||||
});
|
||||
|
||||
it('should open panel inspect', () => {
|
||||
e2e.flows.openDashboard({ uid: 'edediimbjhdz4b/a-tall-dashboard' });
|
||||
e2e.components.Panels.Panel.title('Panel #1').type('i');
|
||||
e2e.components.PanelInspector.Json.content().should('be.visible');
|
||||
cy.get('body').type('{esc}');
|
||||
e2e.components.PanelInspector.Json.content().should('not.exist');
|
||||
});
|
||||
});
|
||||
|
@ -105,7 +105,7 @@ export function setupKeyboardShortcuts(scene: DashboardScene) {
|
||||
keybindings.addBinding({
|
||||
key: 'i',
|
||||
onTrigger: withFocusedPanel(scene, async (vizPanel: VizPanel) => {
|
||||
locationService.push(getInspectUrl(vizPanel));
|
||||
locationService.push(locationUtil.stripBaseFromUrl(getInspectUrl(vizPanel)));
|
||||
}),
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user