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
a5bdfec0
Commit
a5bdfec0
authored
Aug 02, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ES: return .raw fields in field lookups, closes #8975
parent
a5d5f3d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
public/app/plugins/datasource/elasticsearch/datasource.js
+9
-2
public/app/plugins/datasource/elasticsearch/specs/datasource_specs.ts
+5
-1
No files found.
public/app/plugins/datasource/elasticsearch/datasource.js
View file @
a5bdfec0
...
@@ -272,10 +272,17 @@ function (angular, _, moment, kbn, ElasticQueryBuilder, IndexPattern, ElasticRes
...
@@ -272,10 +272,17 @@ function (angular, _, moment, kbn, ElasticQueryBuilder, IndexPattern, ElasticRes
var
subObj
=
obj
[
key
];
var
subObj
=
obj
[
key
];
// Check mapping field for nested fields
// Check mapping field for nested fields
if
(
subObj
.
hasOwnProperty
(
'properties'
))
{
if
(
_
.
isObject
(
subObj
.
properties
))
{
fieldNameParts
.
push
(
key
);
fieldNameParts
.
push
(
key
);
getFieldsRecursively
(
subObj
.
properties
);
getFieldsRecursively
(
subObj
.
properties
);
}
else
{
}
if
(
_
.
isObject
(
subObj
.
fields
))
{
fieldNameParts
.
push
(
key
);
getFieldsRecursively
(
subObj
.
fields
);
}
if
(
_
.
isString
(
subObj
.
type
))
{
var
fieldName
=
fieldNameParts
.
concat
(
key
).
join
(
'.'
);
var
fieldName
=
fieldNameParts
.
concat
(
key
).
join
(
'.'
);
// Hide meta-fields and check field type
// Hide meta-fields and check field type
...
...
public/app/plugins/datasource/elasticsearch/specs/datasource_specs.ts
View file @
a5bdfec0
...
@@ -129,7 +129,10 @@ describe('ElasticDatasource', function() {
...
@@ -129,7 +129,10 @@ describe('ElasticDatasource', function() {
'@timestamp'
:
{
type
:
'date'
},
'@timestamp'
:
{
type
:
'date'
},
beat
:
{
beat
:
{
properties
:
{
properties
:
{
name
:
{
type
:
'string'
},
name
:
{
fields
:
{
raw
:
{
type
:
'keyword'
}},
type
:
'string'
},
hostname
:
{
type
:
'string'
},
hostname
:
{
type
:
'string'
},
}
}
},
},
...
@@ -169,6 +172,7 @@ describe('ElasticDatasource', function() {
...
@@ -169,6 +172,7 @@ describe('ElasticDatasource', function() {
var
fields
=
_
.
map
(
fieldObjects
,
'text'
);
var
fields
=
_
.
map
(
fieldObjects
,
'text'
);
expect
(
fields
).
to
.
eql
([
expect
(
fields
).
to
.
eql
([
'@timestamp'
,
'@timestamp'
,
'beat.name.raw'
,
'beat.name'
,
'beat.name'
,
'beat.hostname'
,
'beat.hostname'
,
'system.cpu.system'
,
'system.cpu.system'
,
...
...
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