mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Support bundles: small UX improvements (#63277)
support bundle ux improvements
This commit is contained in:
parent
d4cfbd9fd3
commit
229f8b6e6d
@ -51,7 +51,7 @@ func basicCollector(cfg *setting.Cfg) supportbundles.Collector {
|
|||||||
loc, _ := time.LoadLocation("UTC")
|
loc, _ := time.LoadLocation("UTC")
|
||||||
now := collectionDate.In(loc)
|
now := collectionDate.In(loc)
|
||||||
|
|
||||||
data, err := json.Marshal(basicInfo{
|
info := basicInfo{
|
||||||
Version: cfg.BuildVersion,
|
Version: cfg.BuildVersion,
|
||||||
Commit: cfg.BuildCommit,
|
Commit: cfg.BuildCommit,
|
||||||
CollectionDate: now,
|
CollectionDate: now,
|
||||||
@ -69,7 +69,8 @@ func basicCollector(cfg *setting.Cfg) supportbundles.Collector {
|
|||||||
GoOS: runtime.GOOS,
|
GoOS: runtime.GOOS,
|
||||||
GoArch: runtime.GOARCH,
|
GoArch: runtime.GOARCH,
|
||||||
GoCompiler: runtime.Compiler,
|
GoCompiler: runtime.Compiler,
|
||||||
})
|
}
|
||||||
|
data, err := json.MarshalIndent(info, "", " ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -91,7 +92,7 @@ func settingsCollector(settings setting.Provider) supportbundles.Collector {
|
|||||||
Default: true,
|
Default: true,
|
||||||
Fn: func(ctx context.Context) (*supportbundles.SupportItem, error) {
|
Fn: func(ctx context.Context) (*supportbundles.SupportItem, error) {
|
||||||
current := settings.Current()
|
current := settings.Current()
|
||||||
data, err := json.Marshal(current)
|
data, err := json.MarshalIndent(current, "", " ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -66,20 +66,22 @@ export const SupportBundlesCreateUnconnected = ({
|
|||||||
{({ register, errors }) => {
|
{({ register, errors }) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{collectors.map((component) => {
|
{[...collectors]
|
||||||
return (
|
.sort((a, b) => a.displayName.localeCompare(b.displayName))
|
||||||
<Field key={component.uid}>
|
.map((component) => {
|
||||||
<Checkbox
|
return (
|
||||||
{...register(component.uid)}
|
<Field key={component.uid}>
|
||||||
label={component.displayName}
|
<Checkbox
|
||||||
id={component.uid}
|
{...register(component.uid)}
|
||||||
description={component.description}
|
label={component.displayName}
|
||||||
defaultChecked={component.default}
|
id={component.uid}
|
||||||
disabled={component.includedByDefault}
|
description={component.description}
|
||||||
/>
|
defaultChecked={component.default}
|
||||||
</Field>
|
disabled={component.includedByDefault}
|
||||||
);
|
/>
|
||||||
})}
|
</Field>
|
||||||
|
);
|
||||||
|
})}
|
||||||
<HorizontalGroup>
|
<HorizontalGroup>
|
||||||
<Button type="submit">Create</Button>
|
<Button type="submit">Create</Button>
|
||||||
<LinkButton href="/support-bundles" variant="secondary">
|
<LinkButton href="/support-bundles" variant="secondary">
|
||||||
|
Loading…
Reference in New Issue
Block a user