Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
ba610419
Commit
ba610419
authored
Mar 12, 2020
by
Dominik Prokop
Committed by
Arve Knudsen
Mar 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DashboardSave: Autofocus save dashboard form input (#22748)
(cherry picked from commit
b441b733
)
parent
eaaca91f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
public/app/features/dashboard/components/SaveDashboard/forms/SaveDashboardAsForm.tsx
+6
-1
public/app/features/dashboard/components/SaveDashboard/forms/SaveDashboardForm.tsx
+6
-1
No files found.
public/app/features/dashboard/components/SaveDashboard/forms/SaveDashboardAsForm.tsx
View file @
ba610419
...
...
@@ -75,7 +75,12 @@ export const SaveDashboardAsForm: React.FC<SaveDashboardFormProps & { isNew?: bo
{
({
register
,
control
,
errors
})
=>
(
<>
<
Forms
.
Field
label=
"Dashboard name"
invalid=
{
!!
errors
.
title
}
error=
"Dashboard name is required"
>
<
Forms
.
Input
name=
"title"
ref=
{
register
({
required
:
true
})
}
aria
-
label=
"Save dashboard title field"
/>
<
Forms
.
Input
name=
"title"
ref=
{
register
({
required
:
true
})
}
aria
-
label=
"Save dashboard title field"
autoFocus
/>
</
Forms
.
Field
>
<
Forms
.
Field
label=
"Folder"
>
<
Forms
.
InputControl
...
...
public/app/features/dashboard/components/SaveDashboard/forms/SaveDashboardForm.tsx
View file @
ba610419
...
...
@@ -31,7 +31,12 @@ export const SaveDashboardForm: React.FC<SaveDashboardFormProps> = ({ dashboard,
{
({
register
,
errors
})
=>
(
<>
<
Forms
.
Field
label=
"Changes description"
>
<
Forms
.
TextArea
name=
"message"
ref=
{
register
}
placeholder=
"Add a note to describe your changes..."
/>
<
Forms
.
TextArea
name=
"message"
ref=
{
register
}
placeholder=
"Add a note to describe your changes..."
autoFocus
/>
</
Forms
.
Field
>
{
hasTimeChanged
&&
(
<
Forms
.
Field
label=
"Save current time range"
description=
"Dashboard time range has changed"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment