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
c0273d88
Commit
c0273d88
authored
Feb 22, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed visual inconsistencies in the stringquery panel when using multiple queries
parent
ae2a3ee8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
22 deletions
+25
-22
panels/stringquery/editor.html
+1
-1
panels/stringquery/module.html
+18
-21
panels/stringquery/module.js
+6
-0
No files found.
panels/stringquery/editor.html
View file @
c0273d88
<div
class=
"row-fluid"
>
<div
class=
"span3"
>
<label
class=
"small"
>
Allow Mulitple
</label><input
type=
"checkbox"
ng-model=
"panel.multi"
ng-checked=
"panel.multi"
>
<label
class=
"small"
>
Mulit Query
</label><input
type=
"checkbox"
ng-change=
"set_multi(panel.multi) "
ng-model=
"panel.multi"
ng-checked=
"panel.multi"
>
</div>
<div
class=
"span4"
ng-show=
"panel.multi"
>
<label
class=
"small"
>
Multiquery Arrangement
</label>
...
...
panels/stringquery/module.html
View file @
c0273d88
<kibana-panel
ng-controller=
'stringquery'
>
<div
ng-switch=
"_.isArray(panel.query)"
>
<div
ng-switch-when=
"false"
>
<form
class=
"input-append"
style=
"margin-bottom:0px; width:100%; white-space:nowrap;"
>
<label><small>
{{panel.label}}
</small></label>
<input
type=
"text"
ng-model=
"panel.query"
style=
"width:85%"
>
<button
type=
"submit"
class=
"btn btn-info"
ng-click=
"send_query(panel.query)"
><i
class=
"icon-search"
></i></button>
<button
type=
"submit"
class=
"btn btn-danger"
ng-click=
"panel.query='';send_query(panel.query)"
><i
class=
"icon-ban-circle"
></i></button>
<button
ng-show=
"panel.multi"
type=
"submit"
class=
"btn"
ng-click=
"add_query()"
><i
class=
"icon-plus"
></i></button>
<div
ng-show=
"!panel.multi"
>
<form
class=
"input-append"
style=
"margin-bottom:0px; width:100%;z-index:1000;overflow:auto"
>
<label><small>
{{panel.label}}
</small></label>
<input
type=
"text"
ng-model=
"panel.query"
style=
"width:85%"
>
<button
type=
"submit"
class=
"btn btn-info"
ng-click=
"send_query(panel.query)"
><i
class=
"icon-search"
></i></button>
<button
type=
"submit"
class=
"btn btn-danger"
ng-click=
"panel.query='';send_query(panel.query)"
><i
class=
"icon-ban-circle"
></i></button>
<button
ng-show=
"panel.multi"
type=
"submit"
class=
"btn"
ng-click=
"add_query()"
><i
class=
"icon-plus"
></i></button>
</form>
</div>
<div
ng-show=
"panel.multi"
>
<form
ng-class=
"{'form-inline': panel.multi_arrange == 'horizontal'}"
style=
"width:100%;"
>
<span
ng-repeat=
"q in panel.query"
>
<span
class=
"input-append"
style=
"margin-bottom:0px;margin-right:5px"
>
<button
class=
"btn btn-danger"
type=
"submit"
style=
"width:50px;margin-left:-50px;visibility:hidden"
></button>
<input
style=
"margin-bottom:5px;"
type=
"text"
ng-model=
"panel.query[$index]"
ng-model-onblur
style=
"width:90%"
>
<button
class=
"btn btn-danger"
ng-show=
"panel.query.length > 1"
ng-click=
"remove_query($index);send_query(panel.query)"
><i
class=
"icon-minus"
></i></button><br>
</span><br
style:
"
height:0px
"
ng-show=
"panel.multi_arrange == 'vertical'"
>
</span>
</form>
</div>
<div
ng-switch-when=
"true"
>
<form
ng-class=
"{'form-inline': panel.multi_arrange == 'horizontal'}"
style=
"width:100%;"
>
<span
ng-repeat=
"q in panel.query"
>
<span
class=
"input-append"
style=
"margin-bottom:0px;margin-right:5px"
>
<button
class=
"btn btn-danger"
type=
"submit"
style=
"width:50px;margin-left:-50px;visibility:hidden"
></button>
<input
style=
"margin-bottom:5px;"
type=
"text"
ng-model=
"panel.query[$index]"
ng-model-onblur
style=
"width:90%"
>
<button
class=
"btn btn-danger"
ng-show=
"panel.query.length > 1"
ng-click=
"remove_query($index);send_query(panel.query)"
><i
class=
"icon-minus"
></i></button><br>
</span><br
style:
"
height:0px
"
ng-show=
"panel.multi_arrange == 'vertical'"
>
</span>
</form>
<button
type=
"submit"
class=
"btn btn-info"
ng-click=
"send_query(panel.query)"
><i
class=
"icon-search"
></i>
Search
</button>
<button
type=
"submit"
class=
"btn"
ng-click=
"send_query(panel.query);add_query();"
><i
class=
"icon-plus"
></i>
Add Query
</button>
</div>
</div>
</kibana-panel>
\ No newline at end of file
panels/stringquery/module.js
View file @
c0273d88
...
...
@@ -35,8 +35,14 @@ angular.module('kibana.stringquery', [])
}
}
$scope
.
set_multi
=
function
(
multi
)
{
$scope
.
panel
.
query
=
multi
?
new
Array
(
$scope
.
panel
.
query
)
:
$scope
.
panel
.
query
[
0
];
}
$scope
.
remove_query
=
function
(
index
)
{
$scope
.
panel
.
query
.
splice
(
index
,
1
);
console
.
log
(
$scope
.
panel
.
query
)
}
$scope
.
init
();
...
...
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