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
a6f8d571
Commit
a6f8d571
authored
Apr 17, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reorganized pie panel editor, added option to change legend position
parent
06d04828
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
22 deletions
+36
-22
common/css/main.css
+4
-0
panels/pie/editor.html
+24
-19
panels/pie/module.html
+6
-1
panels/pie/module.js
+2
-2
No files found.
common/css/main.css
View file @
a6f8d571
...
...
@@ -106,6 +106,10 @@
font-size
:
85%
;
}
.input-append
label
{
font-size
:
inherit
!important
;
}
.large
{
font-size
:
120%
;
}
...
...
panels/pie/editor.html
View file @
a6f8d571
<div
class=
"row-fluid"
ng-switch=
"panel.mode"
ng-controller=
"pie"
>
<div
ng-switch-when=
"terms"
>
<div
class=
"row-fluid"
>
<div
class=
"span4"
>
<div
class=
"row-fluid"
>
<div
class=
"span3"
>
<label
class=
"small"
>
Mode
</label>
<select
class=
"input-small"
ng-change=
"set_mode(panel.mode)"
ng-model=
"panel.mode"
ng-options=
"f for f in ['terms','goal']"
></select>
</div>
<div
class=
"span3"
>
<form
style=
"margin-bottom: 0px"
>
<
h6>
Field
</h6
>
<
label
class=
"small"
>
Field
</label
>
<input
type=
"text"
style=
"width:90%"
bs-typeahead=
"fields.list"
ng-model=
"panel.query.field"
>
</form>
</div>
<div
class=
"span
8
"
>
<div
class=
"span
5
"
>
<form
class=
"input-append"
style=
"margin-bottom: 0px"
>
<
h6>
Query
</h6
>
<
label
class=
"small"
>
Query
</label
>
<input
type=
"text"
style=
"width:80%"
ng-model=
"panel.query.query"
>
<button
class=
"btn"
ng-click=
"get_data()"
><i
class=
"icon-search"
></i></button>
</form>
</div>
</div>
<div
class=
"row-fluid"
>
<div
class=
"span
1
"
>
<
h6>
Length
</h6
>
<div
class=
"span
3
"
>
<
label
class=
"small"
>
Length
</label
>
<input
type=
"number"
style=
"width:80%"
ng-model=
"panel.size"
ng-change=
"get_data()"
>
</div>
<div
class=
"span
11
"
>
<div
class=
"span
8
"
>
<form
class=
"input-append"
style=
"margin-bottom: 0px"
>
<
h6>
Exclude Terms(s) (comma seperated)
</h6
>
<
label
class=
"small"
>
Exclude Terms(s) (comma seperated)
</label
>
<input
array-join
type=
"text"
style=
"width:90%"
ng-model=
'panel.exclude'
></input>
<button
class=
"btn"
ng-click=
"get_data()"
><i
class=
"icon-search"
></i></button>
</form>
...
...
@@ -30,16 +34,20 @@
</div>
</div>
<div
ng-switch-when=
"goal"
>
<div
class=
"row-fluid"
>
<div
class=
"row-fluid"
>
<div
class=
"span3"
>
<label
class=
"small"
>
Mode
</label>
<select
class=
"input-small"
ng-change=
"set_mode(panel.mode)"
ng-model=
"panel.mode"
ng-options=
"f for f in ['terms','goal']"
></select>
</div>
<div
class=
"span2"
>
<form
style=
"margin-bottom: 0px"
>
<
h6>
Goal
</h6
>
<
label
class=
"small"
>
Goal
</label
>
<input
type=
"number"
style=
"width:90%"
ng-model=
"panel.query.goal"
>
</form>
</div>
<div
class=
"span
9
"
>
<div
class=
"span
5
"
>
<form
class=
"input-append"
style=
"margin-bottom: 0px"
>
<
h6>
Query
</h6
>
<
label
class=
"small"
>
Query
</label
>
<input
type=
"text"
style=
"width:80%"
ng-model=
"panel.query.query"
>
<button
class=
"btn"
ng-click=
"get_data()"
><i
class=
"icon-search"
></i></button>
</form>
...
...
@@ -55,14 +63,11 @@
<label
class=
"small"
>
Tilt
</label><input
type=
"checkbox"
ng-model=
"panel.tilt"
ng-checked=
"panel.tilt"
>
</div>
<div
class=
"span1"
>
<label
class=
"small"
>
Legend
</label><input
type=
"checkbox"
ng-model=
"panel.legend"
ng-checked=
"panel.legend"
>
</div>
<div
class=
"span1"
>
<label
class=
"small"
>
Labels
</label><input
type=
"checkbox"
ng-model=
"panel.labels"
ng-checked=
"panel.labels"
>
</div>
<div
class=
"span
2"
>
<label
class=
"small"
>
Mode
</label>
<select
class=
"input-small"
ng-
change=
"set_mode(panel.mode)"
ng-model=
"panel.mode"
ng-options=
"f for f in ['terms','goal']"
></select
>
<div
class=
"span
3"
>
<label
class=
"small"
>
Legend
</label>
<select
class=
"input-small"
ng-
model=
"panel.legend"
ng-options=
"f for f in ['above','below','none']"
></select></span
>
</div>
</div>
<h5>
Panel Spy
</h5>
...
...
panels/pie/module.html
View file @
a6f8d571
...
...
@@ -3,10 +3,14 @@
<i
bs-modal=
"'partials/modal.html'"
class=
"icon-eye-open"
></i>
</span>
<div
ng-repeat=
"query in plot.getData()"
style=
"float:left;padding-left: 10px;"
>
<div
ng-
show=
"panel.legend == 'above'"
ng-
repeat=
"query in plot.getData()"
style=
"float:left;padding-left: 10px;"
>
<span
ng-show=
'panel.chart != "none"'
><div
style=
"display:inline-block;border-radius:5px;background:{{query.color}};height:10px;width:10px"
></div></span><span
class=
"small"
>
{{query.label}} ({{query.data[0][1]}})
</span></span>
</div><br>
<div
style=
"clear:both"
></div>
<div
pie
params=
"{{panel}}"
style=
"height:{{panel.height || row.height}};position:relative"
></div>
<div
ng-show=
"panel.legend == 'below'"
ng-repeat=
"query in plot.getData()"
style=
"float:left;padding-left: 10px;"
>
<span
ng-show=
'panel.chart != "none"'
><div
style=
"display:inline-block;border-radius:5px;background:{{query.color}};height:10px;width:10px"
></div></span><span
class=
"small"
>
{{query.label}} ({{query.data[0][1]}})
</span></span>
</div>
</kibana-panel>
\ No newline at end of file
panels/pie/module.js
View file @
a6f8d571
...
...
@@ -12,7 +12,7 @@ angular.module('kibana.pie', [])
labels
:
true
,
mode
:
"terms"
,
group
:
"default"
,
default_field
:
'
_all
'
,
default_field
:
'
DEFAULT
'
,
spyable
:
true
,
}
_
.
defaults
(
$scope
.
panel
,
_d
)
...
...
@@ -122,7 +122,7 @@ angular.module('kibana.pie', [])
var
complete
=
results
.
hits
.
total
;
var
remaining
=
$scope
.
panel
.
query
.
goal
-
complete
;
$scope
.
data
=
[
{
label
:
'Complete'
,
data
:
complete
,
color
:
'#
51A351
'
},
{
label
:
'Complete'
,
data
:
complete
,
color
:
'#
86B22D
'
},
{
data
:
remaining
,
color
:
'#EEE'
}]
$scope
.
$emit
(
'render'
);
});
...
...
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