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
c62a0aa4
Unverified
Commit
c62a0aa4
authored
Dec 04, 2020
by
Torkel Ödegaard
Committed by
GitHub
Dec 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Elastic: Fixes config UI issues (#29608)
* Elastic: Fixes config UI issues * Fixed index name input issue
parent
563478ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
47 deletions
+46
-47
public/app/plugins/datasource/elasticsearch/configuration/DataLink.tsx
+1
-0
public/app/plugins/datasource/elasticsearch/configuration/DataLinks.tsx
+19
-19
public/app/plugins/datasource/elasticsearch/configuration/ElasticDetails.tsx
+26
-28
No files found.
public/app/plugins/datasource/elasticsearch/configuration/DataLink.tsx
View file @
c62a0aa4
...
...
@@ -92,6 +92,7 @@ export const DataLink = (props: Props) => {
<
div
className=
{
styles
.
row
}
>
<
Switch
labelClass=
{
'width-6'
}
label=
"Internal link"
checked=
{
showInternalLink
}
onChange=
{
()
=>
{
...
...
public/app/plugins/datasource/elasticsearch/configuration/DataLinks.tsx
View file @
c62a0aa4
...
...
@@ -32,9 +32,9 @@ export const DataLinks = (props: Props) => {
Add links to existing fields. Links will be shown in log row details next to the field value.
</
div
>
<
div
className=
"gf-form-group"
>
{
value
&&
value
.
map
((
field
,
index
)
=>
{
{
value
&&
value
.
length
>
0
&&
(
<
div
className=
"gf-form-group"
>
{
value
.
map
((
field
,
index
)
=>
{
return
(
<
DataLink
className=
{
styles
.
dataLink
}
...
...
@@ -61,23 +61,23 @@ export const DataLinks = (props: Props) => {
/>
);
})
}
<
div
>
<
Button
variant=
{
'secondary'
}
className=
{
css
`
margin-right: 10px;
`
}
icon=
"plus"
onClick=
{
event
=>
{
event
.
preventDefault
();
const
newDataLinks
=
[...(
value
||
[]),
{
field
:
''
,
url
:
''
}];
onChange
(
newDataLinks
);
}
}
>
Add
</
Button
>
</
div
>
</
div
>
)
}
<
Button
variant=
{
'secondary'
}
className=
{
css
`
margin-right: 10px;
`
}
icon=
"plus"
onClick=
{
event
=>
{
event
.
preventDefault
();
const
newDataLinks
=
[...(
value
||
[]),
{
field
:
''
,
url
:
''
}];
onChange
(
newDataLinks
);
}
}
>
Add
</
Button
>
</>
);
};
public/app/plugins/datasource/elasticsearch/configuration/ElasticDetails.tsx
View file @
c62a0aa4
...
...
@@ -34,7 +34,7 @@ export const ElasticDetails = (props: Props) => {
<
div
className=
"gf-form-group"
>
<
div
className=
"gf-form-inline"
>
<
div
className=
"gf-form
max-width-25
"
>
<
div
className=
"gf-form"
>
<
FormField
labelWidth=
{
10
}
inputWidth=
{
15
}
...
...
@@ -46,7 +46,7 @@ export const ElasticDetails = (props: Props) => {
/>
</
div
>
<
div
className=
"gf-form
width-14
"
>
<
div
className=
"gf-form"
>
<
FormField
labelWidth=
{
10
}
label=
"Pattern"
...
...
@@ -76,32 +76,30 @@ export const ElasticDetails = (props: Props) => {
</
div
>
<
div
className=
"gf-form"
>
<
span
className=
"gf-form-select-wrapper"
>
<
FormField
labelWidth=
{
10
}
label=
"Version"
inputEl=
{
<
Select
options=
{
esVersions
}
onChange=
{
option
=>
{
const
maxConcurrentShardRequests
=
getMaxConcurrenShardRequestOrDefault
(
value
.
jsonData
.
maxConcurrentShardRequests
,
option
.
value
!
);
onChange
({
...
value
,
jsonData
:
{
...
value
.
jsonData
,
esVersion
:
option
.
value
!
,
maxConcurrentShardRequests
,
},
});
}
}
value=
{
esVersions
.
find
(
version
=>
version
.
value
===
value
.
jsonData
.
esVersion
)
}
/>
}
/>
</
span
>
<
FormField
labelWidth=
{
10
}
label=
"Version"
inputEl=
{
<
Select
options=
{
esVersions
}
onChange=
{
option
=>
{
const
maxConcurrentShardRequests
=
getMaxConcurrenShardRequestOrDefault
(
value
.
jsonData
.
maxConcurrentShardRequests
,
option
.
value
!
);
onChange
({
...
value
,
jsonData
:
{
...
value
.
jsonData
,
esVersion
:
option
.
value
!
,
maxConcurrentShardRequests
,
},
});
}
}
value=
{
esVersions
.
find
(
version
=>
version
.
value
===
value
.
jsonData
.
esVersion
)
}
/>
}
/>
</
div
>
{
value
.
jsonData
.
esVersion
>=
56
&&
(
<
div
className=
"gf-form max-width-30"
>
...
...
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