mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
SupportBundles: Add URL in troubleshoot panels to support bundles (#62477)
* add link * add link * update text * update access --------- Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
parent
6d4e8ec4d6
commit
99155c75e6
@ -237,7 +237,7 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *contextmodel.ReqContext) (map[st
|
||||
}
|
||||
|
||||
func isSupportBundlesEnabled(hs *HTTPServer) bool {
|
||||
return hs.Cfg.SectionWithEnvOverrides("support_bundles").Key("enabled").MustBool(false) &&
|
||||
return hs.Cfg.SectionWithEnvOverrides("support_bundles").Key("enabled").MustBool(true) &&
|
||||
hs.Features.IsEnabled(featuremgmt.FlagSupportBundles)
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ func (s *ServiceImpl) getHomeNode(c *contextmodel.ReqContext, prefs *pref.Prefer
|
||||
}
|
||||
|
||||
func isSupportBundlesEnabled(s *ServiceImpl) bool {
|
||||
return s.cfg.SectionWithEnvOverrides("support_bundles").Key("enabled").MustBool(false) &&
|
||||
return s.cfg.SectionWithEnvOverrides("support_bundles").Key("enabled").MustBool(true) &&
|
||||
s.features.IsEnabled(featuremgmt.FlagSupportBundles)
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ import {
|
||||
} from '@grafana/ui';
|
||||
import { contextSrv } from 'app/core/services/context_srv';
|
||||
import { PanelModel } from 'app/features/dashboard/state';
|
||||
import { AccessControlAction } from 'app/types';
|
||||
|
||||
import { ShowMessage, SnapshotTab, SupportSnapshotService } from './SupportSnapshotService';
|
||||
|
||||
@ -70,6 +71,10 @@ export function HelpWizard({ panel, plugin, onClose }: Props) {
|
||||
{ label: 'Data', value: SnapshotTab.Data },
|
||||
];
|
||||
|
||||
const hasSupportBundleAccess =
|
||||
config.supportBundlesEnabled &&
|
||||
contextSrv.hasAccess(AccessControlAction.ActionSupportBundlesCreate, contextSrv.isGrafanaAdmin);
|
||||
|
||||
return (
|
||||
<Drawer
|
||||
title={`Get help with this panel`}
|
||||
@ -94,6 +99,12 @@ export function HelpWizard({ panel, plugin, onClose }: Props) {
|
||||
To request troubleshooting help, send a snapshot of this panel to Grafana Labs Technical Support. The
|
||||
snapshot contains query response data and panel settings.
|
||||
</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>.
|
||||
</span>
|
||||
)}
|
||||
</Stack>
|
||||
}
|
||||
tabs={
|
||||
|
Loading…
Reference in New Issue
Block a user