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")
|
||||
now := collectionDate.In(loc)
|
||||
|
||||
data, err := json.Marshal(basicInfo{
|
||||
info := basicInfo{
|
||||
Version: cfg.BuildVersion,
|
||||
Commit: cfg.BuildCommit,
|
||||
CollectionDate: now,
|
||||
@ -69,7 +69,8 @@ func basicCollector(cfg *setting.Cfg) supportbundles.Collector {
|
||||
GoOS: runtime.GOOS,
|
||||
GoArch: runtime.GOARCH,
|
||||
GoCompiler: runtime.Compiler,
|
||||
})
|
||||
}
|
||||
data, err := json.MarshalIndent(info, "", " ")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -91,7 +92,7 @@ func settingsCollector(settings setting.Provider) supportbundles.Collector {
|
||||
Default: true,
|
||||
Fn: func(ctx context.Context) (*supportbundles.SupportItem, error) {
|
||||
current := settings.Current()
|
||||
data, err := json.Marshal(current)
|
||||
data, err := json.MarshalIndent(current, "", " ")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -66,20 +66,22 @@ export const SupportBundlesCreateUnconnected = ({
|
||||
{({ register, errors }) => {
|
||||
return (
|
||||
<>
|
||||
{collectors.map((component) => {
|
||||
return (
|
||||
<Field key={component.uid}>
|
||||
<Checkbox
|
||||
{...register(component.uid)}
|
||||
label={component.displayName}
|
||||
id={component.uid}
|
||||
description={component.description}
|
||||
defaultChecked={component.default}
|
||||
disabled={component.includedByDefault}
|
||||
/>
|
||||
</Field>
|
||||
);
|
||||
})}
|
||||
{[...collectors]
|
||||
.sort((a, b) => a.displayName.localeCompare(b.displayName))
|
||||
.map((component) => {
|
||||
return (
|
||||
<Field key={component.uid}>
|
||||
<Checkbox
|
||||
{...register(component.uid)}
|
||||
label={component.displayName}
|
||||
id={component.uid}
|
||||
description={component.description}
|
||||
defaultChecked={component.default}
|
||||
disabled={component.includedByDefault}
|
||||
/>
|
||||
</Field>
|
||||
);
|
||||
})}
|
||||
<HorizontalGroup>
|
||||
<Button type="submit">Create</Button>
|
||||
<LinkButton href="/support-bundles" variant="secondary">
|
||||
|
Loading…
Reference in New Issue
Block a user