Dashboard: Handle no renderer available in panel share dialog (#23856)

Show a message when sharing dashboard panel on the Link tab and
 there's no renderer available/installed. 

Ref #13802
This commit is contained in:
Marcus Efraimsson 2020-04-24 16:40:18 +02:00 committed by GitHub
parent 3d9a88c7af
commit 8f2be870f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
import React, { PureComponent } from 'react';
import { e2e } from '@grafana/e2e';
import { LegacyForms, ClipboardButton, Icon } from '@grafana/ui';
import { LegacyForms, ClipboardButton, Icon, InfoBox } from '@grafana/ui';
const { Select, Switch } = LegacyForms;
import { SelectableValue, PanelModel, AppEvents } from '@grafana/data';
import { DashboardModel } from 'app/features/dashboard/state';
@ -135,6 +135,22 @@ export class ShareLink extends PureComponent<Props, State> {
</a>
</div>
)}
{panel && !config.rendererAvailable && (
<InfoBox>
<p>
<>To render a panel image, you must install the </>
<a
href="https://grafana.com/grafana/plugins/grafana-image-renderer"
target="_blank"
rel="noopener"
className="external-link"
>
Grafana Image Renderer plugin
</a>
. Please contact your Grafana administrator to install the plugin.
</p>
</InfoBox>
)}
</div>
</div>
</div>