Commit 075fb8e9 by Johannes Schill

chore: Rename isDataPanel to noQueries

parent b7b1a794
......@@ -145,7 +145,7 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *m.ReqContext) (map[string]interf
"info": panel.Info,
"hideFromList": panel.HideFromList,
"sort": getPanelSort(panel.Id),
"isDataPanel": panel.IsDataPanel,
"noQueries": panel.NoQueries,
}
}
......
......@@ -47,7 +47,7 @@ type PluginBase struct {
BaseUrl string `json:"baseUrl"`
HideFromList bool `json:"hideFromList,omitempty"`
State PluginState `json:"state,omitempty"`
IsDataPanel bool `json:"isDataPanel"`
NoQueries bool `json:"noQueries"`
IncludedInAppId string `json:"-"`
PluginDir string `json:"-"`
......
......@@ -131,8 +131,11 @@ export class PanelChrome extends PureComponent<Props, State> {
this.renderPanelPlugin(LoadingState.Done, snapshotDataToPanelData(panel), width, height)
) : (
<>
{plugin.isDataPanel === true ?
<DataPanel
{plugin.noQueries === true ?
this.renderPanelPlugin(LoadingState.Done, null, width, height)
: (
<DataPanel
panelId={panel.id}
datasource={datasource}
queries={targets}
......@@ -146,8 +149,6 @@ export class PanelChrome extends PureComponent<Props, State> {
return this.renderPanelPlugin(loading, panelData, width, height);
}}
</DataPanel>
: (
this.renderPanelPlugin(LoadingState.Done, null, width, height)
)}
</>
)}
......
......@@ -107,7 +107,7 @@ export class PanelEditor extends PureComponent<PanelEditorProps> {
];
// handle panels that do not have queries tab
if (!plugin.isDataPanel) {
if (plugin.noQueries === true) {
// remove queries tab
tabs.shift();
// switch tab
......
......@@ -2,7 +2,6 @@
"type": "panel",
"name": "Gauge",
"id": "gauge",
"isDataPanel": true,
"info": {
"author": {
......
......@@ -2,7 +2,6 @@
"type": "panel",
"name": "React Graph",
"id": "graph2",
"isDataPanel": true,
"state": "alpha",
"info": {
......
......@@ -3,7 +3,7 @@
"name": "Text v2",
"id": "text2",
"state": "alpha",
"isDataPanel": false,
"noQueries": true,
"info": {
"author": {
......
......@@ -9,7 +9,7 @@ export interface PanelPlugin {
info: any;
sort: number;
exports?: PluginExports;
isDataPanel?: boolean;
noQueries?: boolean;
}
export interface Plugin {
......
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