Commit 5202770b by Hugo Häggmark Committed by GitHub

Grafana Image Renderer: Fixes plugin page (#19664)

Fixes #19659
parent ec6d69f4
...@@ -10,6 +10,7 @@ export enum PluginType { ...@@ -10,6 +10,7 @@ export enum PluginType {
panel = 'panel', panel = 'panel',
datasource = 'datasource', datasource = 'datasource',
app = 'app', app = 'app',
renderer = 'renderer',
} }
export interface PluginMeta<T extends {} = KeyValue> { export interface PluginMeta<T extends {} = KeyValue> {
......
...@@ -3,21 +3,20 @@ import React, { PureComponent } from 'react'; ...@@ -3,21 +3,20 @@ import React, { PureComponent } from 'react';
import { hot } from 'react-hot-loader'; import { hot } from 'react-hot-loader';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import find from 'lodash/find'; import find from 'lodash/find';
// Types // Types
import { UrlQueryMap } from '@grafana/runtime'; import { UrlQueryMap } from '@grafana/runtime';
import { StoreState, AppNotificationSeverity } from 'app/types'; import { AppNotificationSeverity, StoreState } from 'app/types';
import { import {
Alert, Alert,
PluginType, AppPlugin,
GrafanaPlugin, GrafanaPlugin,
PluginInclude,
PluginDependencies, PluginDependencies,
PluginInclude,
PluginIncludeType,
PluginMeta, PluginMeta,
PluginMetaInfo, PluginMetaInfo,
PluginType,
Tooltip, Tooltip,
AppPlugin,
PluginIncludeType,
} from '@grafana/ui'; } from '@grafana/ui';
import { NavModel, NavModelItem } from '@grafana/data'; import { NavModel, NavModelItem } from '@grafana/data';
...@@ -63,6 +62,9 @@ function loadPlugin(pluginId: string): Promise<GrafanaPlugin> { ...@@ -63,6 +62,9 @@ function loadPlugin(pluginId: string): Promise<GrafanaPlugin> {
}); });
}); });
} }
if (info.type === PluginType.renderer) {
return Promise.resolve({ meta: info } as GrafanaPlugin);
}
return Promise.reject('Unknown Plugin type: ' + info.type); return Promise.reject('Unknown Plugin type: ' + info.type);
}); });
} }
......
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