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
5eb8c41a
Commit
5eb8c41a
authored
Feb 20, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed NOT queries
parent
86408301
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
9 deletions
+10
-9
common/lib/shared.js
+3
-2
panels/fields/micropanel.html
+2
-2
panels/fields/module.js
+2
-2
panels/table/module.html
+1
-1
panels/table/module.js
+2
-2
No files found.
common/lib/shared.js
View file @
5eb8c41a
...
...
@@ -127,13 +127,14 @@ function top_field_values(docs,field,count) {
}).
reverse
().
slice
(
0
,
count
)
}
function
add_to_query
(
original
,
field
,
value
)
{
function
add_to_query
(
original
,
field
,
value
,
negate
)
{
var
not
=
negate
?
"NOT "
:
""
;
if
(
value
!==
''
)
var
query
=
field
+
":"
+
"
\"
"
+
addslashes
(
value
.
toString
())
+
"
\"
"
;
else
var
query
=
"_missing_:"
+
field
;
var
glue
=
original
!=
""
?
" AND "
:
""
;
return
original
+
glue
+
query
;
return
original
+
glue
+
not
+
query
;
}
/**
* Calculate a graph interval
...
...
panels/fields/micropanel.html
View file @
5eb8c41a
...
...
@@ -13,10 +13,10 @@
</thead>
<tbody>
<tr
ng-repeat=
'field in micropanel.values'
>
<td>
{{
field[0
]}}
</td>
<td>
{{
{true: "__blank__",false:field[0]}[field[0] == ""
]}}
</td>
<td>
<i
class=
"pointer icon-search"
ng-click=
"build_search(micropanel.field,field[0]);dismiss();"
></i>
<i
class=
"pointer icon-ban-circle"
ng-click=
"build_search(
'NOT '+micropanel.field,field[0]
);dismiss();"
></i>
<i
class=
"pointer icon-ban-circle"
ng-click=
"build_search(
micropanel.field,field[0],true
);dismiss();"
></i>
</td>
<td>
{{field[1]}}
</td>
</tr>
...
...
panels/fields/module.js
View file @
5eb8c41a
...
...
@@ -58,8 +58,8 @@ angular.module('kibana.fields', [])
eventBus
.
broadcast
(
$scope
.
$id
,
$scope
.
panel
.
group
,
"selected_fields"
,
$scope
.
active
)
}
$scope
.
build_search
=
function
(
field
,
value
)
{
$scope
.
panel
.
query
=
add_to_query
(
$scope
.
panel
.
query
,
field
,
value
)
$scope
.
build_search
=
function
(
field
,
value
,
negate
)
{
$scope
.
panel
.
query
=
add_to_query
(
$scope
.
panel
.
query
,
field
,
value
,
negate
)
eventBus
.
broadcast
(
$scope
.
$id
,
$scope
.
panel
.
group
,
'query'
,
$scope
.
panel
.
query
);
}
...
...
panels/table/module.html
View file @
5eb8c41a
...
...
@@ -39,7 +39,7 @@
<td>
{{key}}
</td>
<td>
<i
class=
'icon-search pointer'
ng-click=
"build_search(key,value)"
></i>
<i
class=
'icon-ban-circle pointer'
ng-click=
"build_search(
'NOT '+key,val
ue)"
></i>
<i
class=
'icon-ban-circle pointer'
ng-click=
"build_search(
key,value,tr
ue)"
></i>
</td>
<td>
{{value}}
</td>
</tr>
...
...
panels/table/module.js
View file @
5eb8c41a
...
...
@@ -67,8 +67,8 @@ angular.module('kibana.table', [])
$scope
.
get_data
();
}
$scope
.
build_search
=
function
(
field
,
value
)
{
$scope
.
panel
.
query
=
add_to_query
(
$scope
.
panel
.
query
,
field
,
value
)
$scope
.
build_search
=
function
(
field
,
value
,
negate
)
{
$scope
.
panel
.
query
=
add_to_query
(
$scope
.
panel
.
query
,
field
,
value
,
negate
)
$scope
.
panel
.
offset
=
0
;
$scope
.
get_data
();
eventBus
.
broadcast
(
$scope
.
$id
,
$scope
.
panel
.
group
,
'query'
,
$scope
.
panel
.
query
);
...
...
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