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
0f97925c
Unverified
Commit
0f97925c
authored
Oct 26, 2020
by
Darryl
Committed by
GitHub
Oct 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Templating: Custom variable edit UI, change text input into textarea (#28312) (#28322)
parent
3abd9957
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
public/app/features/variables/custom/CustomVariableEditor.tsx
+8
-5
No files found.
public/app/features/variables/custom/CustomVariableEditor.tsx
View file @
0f97925c
...
...
@@ -4,6 +4,7 @@ import { SelectionOptionsEditor } from '../editor/SelectionOptionsEditor';
import
{
OnPropChangeArguments
,
VariableEditorProps
}
from
'../editor/types'
;
import
{
connectWithStore
}
from
'app/core/utils/connectWithReduxStore'
;
import
{
MapDispatchToProps
,
MapStateToProps
}
from
'react-redux'
;
import
{
Field
,
TextArea
}
from
'@grafana/ui'
;
import
{
StoreState
}
from
'app/types'
;
import
{
changeVariableMultiValue
}
from
'../state/actions'
;
...
...
@@ -18,7 +19,7 @@ interface DispatchProps {
export
type
Props
=
OwnProps
&
ConnectedProps
&
DispatchProps
;
class
CustomVariableEditorUnconnected
extends
PureComponent
<
Props
>
{
onChange
=
(
event
:
ChangeEvent
<
HTML
Input
Element
>
)
=>
{
onChange
=
(
event
:
ChangeEvent
<
HTML
TextArea
Element
>
)
=>
{
this
.
props
.
onPropChange
({
propName
:
'query'
,
propValue
:
event
.
target
.
value
,
...
...
@@ -29,7 +30,7 @@ class CustomVariableEditorUnconnected extends PureComponent<Props> {
this
.
props
.
onPropChange
({
propName
,
propValue
,
updateOptions
:
true
});
};
onBlur
=
(
event
:
FocusEvent
<
HTML
Input
Element
>
)
=>
{
onBlur
=
(
event
:
FocusEvent
<
HTML
TextArea
Element
>
)
=>
{
this
.
props
.
onPropChange
({
propName
:
'query'
,
propValue
:
event
.
target
.
value
,
...
...
@@ -43,17 +44,19 @@ class CustomVariableEditorUnconnected extends PureComponent<Props> {
<
div
className=
"gf-form-group"
>
<
h5
className=
"section-heading"
>
Custom Options
</
h5
>
<
div
className=
"gf-form"
>
<
span
className=
"gf-form-label width-14"
>
Values separated by comma
</
span
>
<
input
type=
"text"
<
Field
label=
"Values separated by comma"
>
<
TextArea
className=
"gf-form-input"
value=
{
this
.
props
.
variable
.
query
}
onChange=
{
this
.
onChange
}
onBlur=
{
this
.
onBlur
}
rows=
{
5
}
cols=
{
81
}
placeholder=
"1, 10, mykey : myvalue, myvalue, escaped\,value"
required
aria
-
label=
"Variable editor Form Custom Query field"
/>
</
Field
>
</
div
>
</
div
>
<
SelectionOptionsEditor
...
...
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