@ -2,7 +2,7 @@ import { css } from '@emotion/css';
import { useMemo , useEffect } from 'react' ;
import AutoSizer from 'react-virtualized-auto-sizer' ;
import { PanelPlugin , GrafanaTheme2 , FeatureState } from '@grafana/data' ;
import { PanelPlugin , GrafanaTheme2 } from '@grafana/data' ;
import { config } from '@grafana/runtime' ;
import {
Drawer ,
@ -11,17 +11,16 @@ import {
CodeEditor ,
useStyles2 ,
Field ,
HorizontalGroup ,
InlineSwitch ,
Button ,
Spinner ,
Alert ,
FeatureBadge ,
Select ,
ClipboardButton ,
Icon ,
Stack ,
} from '@grafana/ui' ;
import { Trans } from 'app/core/internationalization' ;
import { contextSrv } from 'app/core/services/context_srv' ;
import { PanelModel } from 'app/features/dashboard/state' ;
import { AccessControlAction } from 'app/types' ;
@ -76,7 +75,6 @@ export function HelpWizard({ panel, plugin, onClose }: Props) {
subtitle = {
< Stack direction = "column" gap = { 1 } >
< Stack direction = "row" gap = { 1 } >
< FeatureBadge featureState = { FeatureState . beta } / >
< a
href = "https://grafana.com/docs/grafana/latest/troubleshooting/"
target = "blank"
@ -87,13 +85,17 @@ export function HelpWizard({ panel, plugin, onClose }: Props) {
< / a >
< / Stack >
< span className = "muted" >
To request troubleshooting help , send a snapshot of this panel to Grafana Labs Technical Support . The
snapshot contains query response data and panel settings .
< Trans i18nKey = "help-wizard.troubleshooting-help" >
To request troubleshooting help , send a snapshot of this panel to Grafana Labs Technical Support . The
snapshot contains query response data and panel settings .
< / Trans >
< / span >
{ hasSupportBundleAccess && (
< span className = "muted" >
You can also retrieve a support bundle containing information concerning your Grafana instance and
configured datasources in the < a href = "/support-bundles" > support bundles section < / a > .
< Trans i18nKey = "help-wizard.support-bundle" >
You can also retrieve a support bundle containing information concerning your Grafana instance and
configured datasources in the < a href = "/support-bundles" > support bundles section < / a > .
< / Trans >
< / span >
) }
< / Stack >
@ -150,10 +152,10 @@ export function HelpWizard({ panel, plugin, onClose }: Props) {
{ currentTab === SnapshotTab . Support && (
< >
< Field
label = "Randomiz e data"
label = "Obfuscat e data"
description = "Modify the original data to hide sensitve information. Note the lengths will stay the same, and duplicate values will be equal."
>
< HorizontalGroup >
< Stack direction = "row" gap = { 1 } >
< InlineSwitch
label = "Labels"
id = "randomize-labels"
@ -175,27 +177,27 @@ export function HelpWizard({ panel, plugin, onClose }: Props) {
value = { Boolean ( randomize . values ) }
onChange = { ( ) = > service . onToggleRandomize ( 'values' ) }
/ >
< / HorizontalGroup >
< / Stack >
< / Field >
< Field label = "Support snapshot" description = { ` Panel: ${ panelTitle } ` } >
< Stack >
< Button icon = "download-alt" onClick = { service . onDownloadDashboard } >
Dashboard ( { snapshotSize } )
< Trans i18nKey = "help-wizard.download-snapshot" > Download snapshot < / Trans > ( { snapshotSize } )
< / Button >
< ClipboardButton
icon = "github"
getText = { service . onGetMarkdownForClipboard }
title = "Copy a complete GitHub comment to the clipboard"
>
Copy to clipboard
< Trans i18nKey = "help-wizard.github-comment" > Copy Github comment < / Trans >
< / ClipboardButton >
< Button
icon = "eye"
onClick = { service . onPreviewDashboard }
variant = "secondary"
title = "Open support snapshot dashboard in a new tab"
>
Preview
< Trans i18nKey = "help-wizard.preview-snapshot" > Preview snapshot < / Trans >
< / Button >
< / Stack >
< / Field >