Commit 5ccefed7 by Torkel Ödegaard

NewPanelEditor: Tab rename and minor fix

parent c4ba425d
......@@ -128,6 +128,7 @@ export class KeybindingSrv {
if (search.editPanel) {
delete search.editPanel;
delete search.tab;
this.$location.search(search);
return;
}
......
......@@ -77,7 +77,7 @@ export class PanelEditorUnconnected extends PureComponent<Props> {
onPanelExit = () => {
this.props.updateLocation({
query: { editPanel: null },
query: { editPanel: null, tab: null },
partial: true,
});
};
......@@ -85,7 +85,7 @@ export class PanelEditorUnconnected extends PureComponent<Props> {
onDiscard = () => {
this.props.setDiscardChanges(true);
this.props.updateLocation({
query: { editPanel: null },
query: { editPanel: null, tab: null },
partial: true,
});
};
......
......@@ -46,9 +46,9 @@ export const PanelEditorTabs: React.FC<PanelEditorTabsProps> = ({ panel, dashboa
})}
</TabsBar>
<TabContent className={styles.tabContent}>
{activeTab.id === PanelEditorTabId.Queries && <QueriesTab panel={panel} dashboard={dashboard} />}
{activeTab.id === PanelEditorTabId.Query && <QueriesTab panel={panel} dashboard={dashboard} />}
{activeTab.id === PanelEditorTabId.Alert && <AlertTab panel={panel} dashboard={dashboard} />}
{activeTab.id === PanelEditorTabId.Visualization && <VisualizationTab panel={panel} />}
{activeTab.id === PanelEditorTabId.Visualize && <VisualizationTab panel={panel} />}
{activeTab.id === PanelEditorTabId.Transform && data.state !== LoadingState.NotStarted && (
<TransformationsEditor
transformations={panel.transformations || []}
......
......@@ -10,14 +10,14 @@ export const getPanelEditorTabs = memoizeOne((location: LocationState, plugin?:
return tabs;
}
let defaultTab = PanelEditorTabId.Visualization;
let defaultTab = PanelEditorTabId.Visualize;
if (!plugin.meta.skipDataQuery) {
defaultTab = PanelEditorTabId.Queries;
defaultTab = PanelEditorTabId.Query;
tabs.push({
id: PanelEditorTabId.Queries,
text: 'Queries',
id: PanelEditorTabId.Query,
text: 'Query',
icon: 'gicon gicon-datasources',
active: false,
});
......@@ -31,8 +31,8 @@ export const getPanelEditorTabs = memoizeOne((location: LocationState, plugin?:
}
tabs.push({
id: PanelEditorTabId.Visualization,
text: 'Visualization',
id: PanelEditorTabId.Visualize,
text: 'Visualize',
icon: 'fa fa-bar-chart',
active: false,
});
......
......@@ -6,9 +6,9 @@ export interface PanelEditorTab {
}
export enum PanelEditorTabId {
Queries = 'queries',
Query = 'Query',
Transform = 'transform',
Visualization = 'visualization',
Visualize = 'visualize',
Alert = 'alert',
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment