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
ff98f464
Commit
ff98f464
authored
Nov 04, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Closes #653.
parent
90d765d9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
src/app/services/querySrv.js
+6
-4
No files found.
src/app/services/querySrv.js
View file @
ff98f464
...
@@ -106,13 +106,14 @@ function (angular, _, config, kbn) {
...
@@ -106,13 +106,14 @@ function (angular, _, config, kbn) {
)))).
size
(
0
);
)))).
size
(
0
);
var
results
=
request
.
doSearch
();
var
results
=
request
.
doSearch
();
// Like the regex and lucene queries, this returns a promise
return
results
.
then
(
function
(
data
)
{
return
results
.
then
(
function
(
data
)
{
var
_colors
=
kbn
.
colorSteps
(
q
.
color
,
data
.
facets
.
query
.
terms
.
length
);
var
_colors
=
kbn
.
colorSteps
(
q
.
color
,
data
.
facets
.
query
.
terms
.
length
);
var
i
=
-
1
;
var
i
=
-
1
;
return
_
.
map
(
data
.
facets
.
query
.
terms
,
function
(
t
)
{
return
_
.
map
(
data
.
facets
.
query
.
terms
,
function
(
t
)
{
++
i
;
++
i
;
return
self
.
defaults
({
return
self
.
defaults
({
query
:
q
.
field
+
':"'
+
t
.
term
+
'"'
+
suffix
,
query
:
q
.
field
+
':"'
+
kbn
.
addslashes
(
t
.
term
)
+
'"'
+
suffix
,
alias
:
t
.
term
+
(
q
.
alias
?
" ("
+
q
.
alias
+
")"
:
""
),
alias
:
t
.
term
+
(
q
.
alias
?
" ("
+
q
.
alias
+
")"
:
""
),
type
:
'lucene'
,
type
:
'lucene'
,
color
:
_colors
[
i
],
color
:
_colors
[
i
],
...
@@ -143,7 +144,8 @@ function (angular, _, config, kbn) {
...
@@ -143,7 +144,8 @@ function (angular, _, config, kbn) {
}
}
};
};
// This is used both for adding queries and modifying them. If an id is passed, the query at that id is updated
// This is used both for adding queries and modifying them. If an id is passed,
// the query at that id is updated
this
.
set
=
function
(
query
,
id
)
{
this
.
set
=
function
(
query
,
id
)
{
if
(
!
_
.
isUndefined
(
id
))
{
if
(
!
_
.
isUndefined
(
id
))
{
if
(
!
_
.
isUndefined
(
self
.
list
[
id
]))
{
if
(
!
_
.
isUndefined
(
self
.
list
[
id
]))
{
...
@@ -185,8 +187,8 @@ function (angular, _, config, kbn) {
...
@@ -185,8 +187,8 @@ function (angular, _, config, kbn) {
}
}
};
};
// In the case of a compound query, such as a derived query, we'd need to
//
return an array of elasticJS objects. Not sure if that is appropriate?
//
These are the only query types that can be returned by a compound query.
this
.
toEjsObj
=
function
(
q
)
{
this
.
toEjsObj
=
function
(
q
)
{
switch
(
q
.
type
)
switch
(
q
.
type
)
{
{
...
...
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