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
34a2f0b3
Commit
34a2f0b3
authored
Oct 24, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Query deactivation
parent
8454a951
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
11 deletions
+21
-11
src/app/panels/query/meta.html
+1
-1
src/app/panels/query/module.html
+6
-3
src/app/panels/query/query.css
+5
-0
src/app/services/querySrv.js
+7
-6
src/css/bootstrap.dark.min.css
+0
-0
src/vendor/bootstrap/less/bootswatch.dark.less
+2
-1
No files found.
src/app/panels/query/meta.html
View file @
34a2f0b3
...
...
@@ -27,7 +27,7 @@
<div
class=
"pull-right"
>
<a
class=
"btn btn-mini"
ng-click=
"querySrv.list[id].enable=false;dashboard.refresh();dismiss();"
class=
"pointer"
>
Deactivate
</a>
<a
class=
"btn btn-mini"
ng-class=
"{active:querySrv.list[id].pin}"
ng-click=
"toggle_pin(id);dismiss();"
class=
"pointer"
>
Pin
<i
class=
"icon-pushpin"
></i></a>
<input
class=
"btn btn-mini"
ng-click=
"dashboard.refresh();dismiss();"
type=
"submit"
/
value=
"Close"
>
</div>
...
...
src/app/panels/query/module.html
View file @
34a2f0b3
...
...
@@ -2,11 +2,12 @@
<div
ng-repeat=
"id in (unPinnedQueries = (querySrv.ids|pinnedQuery:false))"
ng-class=
"{'short-query': unPinnedQueries.length>1}"
>
<form
class=
"form-search"
style=
"position:relative;margin-bottom:5px;"
ng-submit=
"refresh()"
>
<span
class=
"begin-query"
>
<i
class=
"pointer"
ng-class=
"queryIcon(querySrv.list[id].type)"
data-unique=
"1"
bs-popover=
"'app/panels/query/meta.html'"
data-placement=
"bottomLeft"
ng-style=
"{color: querySrv.list[id].color}"
></i>
<i
class=
"pointer"
ng-class=
"queryIcon(querySrv.list[id].type)"
ng-show=
"querySrv.list[id].enable"
data-unique=
"1"
bs-popover=
"'app/panels/query/meta.html'"
data-placement=
"bottomLeft"
ng-style=
"{color: querySrv.list[id].color}"
></i>
<i
class=
"pointer icon-circle-blank"
ng-click=
"querySrv.list[id].enable=true;dashboard.refresh();"
ng-hide=
"querySrv.list[id].enable"
bs-tooltip=
"'Activate query'"
ng-style=
"{color: querySrv.list[id].color}"
></i>
<i
class=
"icon-remove-sign pointer remove-query"
ng-show=
"querySrv.ids.length > 1"
ng-click=
"querySrv.remove(id);refresh()"
></i>
</span>
<span>
<input
class=
"search-query panel-query"
ng-class=
"{ 'input-block-level': unPinnedQueries.length==1, 'last-query': $last, 'has-remove': querySrv.ids.length > 1 }"
bs-typeahead=
"panel.history"
data-min-length=
0
data-items=
100
type=
"text"
ng-model=
"querySrv.list[id].query"
/>
<input
class=
"search-query panel-query"
ng-
disabled=
"!querySrv.list[id].enable"
ng-
class=
"{ 'input-block-level': unPinnedQueries.length==1, 'last-query': $last, 'has-remove': querySrv.ids.length > 1 }"
bs-typeahead=
"panel.history"
data-min-length=
0
data-items=
100
type=
"text"
ng-model=
"querySrv.list[id].query"
/>
</span>
<span
class=
"end-query"
>
<i
class=
"icon-search pointer"
ng-click=
"refresh()"
ng-show=
"$last"
></i>
...
...
@@ -17,7 +18,9 @@
<div
style=
"display:inline-block"
ng-repeat=
"id in querySrv.ids|pinnedQuery:true"
>
<span
class=
"pointer"
ng-show=
"$first"
ng-click=
"panel.pinned = !panel.pinned"
><span
class=
"pins"
>
Pinned
</span>
<i
ng-class=
"{'icon-caret-right':panel.pinned,'icon-caret-left':!panel.pinned}"
></i></span>
<span
ng-show=
"panel.pinned"
class=
"badge pinned"
>
<i
class=
"icon-circle pointer"
ng-style=
"{color: querySrv.list[id].color}"
data-unique=
"1"
bs-popover=
"'app/panels/query/meta.html'"
data-placement=
"bottomLeft"
></i><span
bs-tooltip=
"querySrv.list[id].query"
>
{{querySrv.list[id].alias || querySrv.list[id].query}}
</span>
<i
class=
"icon-circle pointer"
ng-show=
"querySrv.list[id].enable"
ng-style=
"{color: querySrv.list[id].color}"
data-unique=
"1"
bs-popover=
"'app/panels/query/meta.html'"
data-placement=
"bottomLeft"
></i>
<i
class=
"pointer icon-circle-blank"
bs-tooltip=
"'Activate query'"
ng-click=
"querySrv.list[id].enable=true;dashboard.refresh();"
ng-hide=
"querySrv.list[id].enable"
ng-style=
"{color: querySrv.list[id].color}"
></i>
<span
bs-tooltip=
"querySrv.list[id].query"
>
{{querySrv.list[id].alias || querySrv.list[id].query}}
</span>
</span>
</div>
<span
style=
"display:inline-block"
ng-show=
"unPinnedQueries.length == 0"
>
...
...
src/app/panels/query/query.css
View file @
34a2f0b3
...
...
@@ -22,6 +22,11 @@
-moz-box-sizing
:
border-box
;
/* Firefox, other Gecko */
box-sizing
:
border-box
;
/* Opera/IE 8+ */
}
.query-disabled
{
opacity
:
0.3
;
}
.form-search
:hover
.has-remove
{
padding-left
:
50px
!important
;
}
...
...
src/app/services/querySrv.js
View file @
34a2f0b3
...
...
@@ -40,7 +40,8 @@ function (angular, _, config, kbn) {
var
_query
=
{
alias
:
''
,
pin
:
false
,
type
:
'lucene'
type
:
'lucene'
,
enable
:
true
};
// Defaults for specific query types
...
...
@@ -214,15 +215,15 @@ function (angular, _, config, kbn) {
switch
(
config
.
mode
)
{
case
'all'
:
return
self
.
ids
;
return
_
.
pluck
(
_
.
where
(
self
.
list
,{
enable
:
true
}),
'id'
)
;
case
'pinned'
:
return
_
.
pluck
(
_
.
where
(
self
.
list
,{
pin
:
true
}),
'id'
);
return
_
.
pluck
(
_
.
where
(
self
.
list
,{
pin
:
true
,
enable
:
true
}),
'id'
);
case
'unpinned'
:
return
_
.
difference
(
self
.
ids
,
_
.
pluck
(
_
.
where
(
self
.
list
,{
pin
:
true
}),
'id'
));
return
_
.
difference
(
self
.
ids
,
_
.
pluck
(
_
.
where
(
self
.
list
,{
pin
:
true
,
enable
:
true
}),
'id'
));
case
'selected'
:
return
_
.
intersection
(
self
.
ids
,
config
.
ids
);
return
_
.
intersection
(
_
.
pluck
(
_
.
where
(
self
.
list
,{
enable
:
true
}),
'id'
)
,
config
.
ids
);
default
:
return
self
.
ids
;
return
_
.
pluck
(
_
.
where
(
self
.
list
,{
enable
:
true
}),
'id'
)
;
}
};
...
...
src/css/bootstrap.dark.min.css
View file @
34a2f0b3
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/vendor/bootstrap/less/bootswatch.dark.less
View file @
34a2f0b3
...
...
@@ -436,7 +436,8 @@ textarea[disabled],
input[readonly],
select[readonly],
textarea[readonly] {
color: @white;
color: @gray;
background: @grayDarker;
}
.form-actions {
...
...
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