feat: Introduce IsDataPanel attribute to plugin.json

This commit is contained in:
Johannes Schill
2019-02-07 21:26:23 +01:00
parent 8d9c347cb1
commit a8a9bca07b
6 changed files with 6 additions and 2 deletions

View File

@@ -145,6 +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,
}
}

View File

@@ -47,6 +47,7 @@ type PluginBase struct {
BaseUrl string `json:"baseUrl"`
HideFromList bool `json:"hideFromList,omitempty"`
State PluginState `json:"state,omitempty"`
IsDataPanel bool `json:"isDataPanel"`
IncludedInAppId string `json:"-"`
PluginDir string `json:"-"`

View File

@@ -2,6 +2,7 @@
"type": "panel",
"name": "Gauge",
"id": "gauge",
"isDataPanel": true,
"info": {
"author": {

View File

@@ -2,7 +2,7 @@
"type": "panel",
"name": "React Graph",
"id": "graph2",
"isDataPanel": true,
"state": "alpha",
"info": {

View File

@@ -2,8 +2,8 @@
"type": "panel",
"name": "Text v2",
"id": "text2",
"state": "alpha",
"isDataPanel": false,
"info": {
"author": {

View File

@@ -9,6 +9,7 @@ export interface PanelPlugin {
info: any;
sort: number;
exports?: PluginExports;
isDataPanel?: boolean;
}
export interface Plugin {