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
70f6a297
Commit
70f6a297
authored
Feb 05, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added missing text panel, added hover to pie and histogram
parent
4b9310ea
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
6 deletions
+58
-6
dashboards.js
+7
-5
panels/histogram/module.js
+27
-0
panels/pie/module.js
+1
-1
panels/text/module.html
+5
-0
panels/text/module.js
+18
-0
No files found.
dashboards.js
View file @
70f6a297
...
...
@@ -41,7 +41,8 @@ var dashboards =
span
:
3
,
content
:
"Panels can send events to other panels. In the case of"
+
" the sort panel, it also receives a field event that it uses"
+
" to populate its list of fields from the table panel"
" to populate its list of fields from the table panel. The time "
+
" selector is a member of two groups."
},
]
},
...
...
@@ -55,10 +56,11 @@ var dashboards =
title
:
"About"
,
fontsize
:
"85%"
,
span
:
2
,
content
:
"These pies demonstrate configurable binding. They are"
+
content
:
"These donut charts demonstrate configurable binding."
+
" They exist in a different group from the other panels and are"
+
" bound only to the time selector, not to the query input. Thus"
+
" they will change when you select a new time range, but not if"
+
" you enter a search.
Try hovering over a pie slice.
"
,
" you enter a search."
,
},
{
title
:
"Hamlet"
,
...
...
@@ -175,8 +177,8 @@ var dashboards =
title
:
"Monkey Shakespeare Lines"
,
type
:
"histogram"
,
span
:
5
,
show
:
[
'
line
s'
,
'stack'
],
fill
:
0.3
,
show
:
[
'
bar
s'
,
'stack'
],
fill
:
1
,
query
:
[
{
label
:
"Query Hits"
,
query
:
"*"
,
color
:
'#86B32D'
},
{
label
:
"Hamlet"
,
query
:
"play_name:Hamlet"
},
...
...
panels/histogram/module.js
View file @
70f6a297
...
...
@@ -164,6 +164,33 @@ angular.module('kibana.histogram', [])
}
})
})
function
tt
(
x
,
y
,
contents
)
{
var
tooltip
=
$
(
'#pie-tooltip'
).
length
?
$
(
'#pie-tooltip'
)
:
$
(
'<div id="pie-tooltip"></div>'
);
//var tooltip = $('#pie-tooltip')
tooltip
.
text
(
contents
).
css
({
position
:
'absolute'
,
top
:
y
+
5
,
left
:
x
+
5
,
color
:
"#FFF"
,
border
:
'1px solid #FFF'
,
padding
:
'2px'
,
'font-size'
:
'8pt'
,
'background-color'
:
'#000'
,
}).
appendTo
(
"body"
);
}
elem
.
bind
(
"plothover"
,
function
(
event
,
pos
,
item
)
{
if
(
item
)
{
var
percent
=
parseFloat
(
item
.
series
.
percent
).
toFixed
(
1
)
+
"%"
;
tt
(
pos
.
pageX
,
pos
.
pageY
,
item
.
datapoint
[
1
].
toFixed
(
1
)
+
" @ "
+
new
Date
(
item
.
datapoint
[
0
]).
format
(
config
.
timeformat
));
}
else
{
$
(
"#pie-tooltip"
).
remove
();
}
});
}
}
};
...
...
panels/pie/module.js
View file @
70f6a297
...
...
@@ -191,7 +191,7 @@ angular.module('kibana.pie', [])
elem
.
bind
(
"plothover"
,
function
(
event
,
pos
,
item
)
{
if
(
item
)
{
var
percent
=
parseFloat
(
item
.
series
.
percent
).
toFixed
(
2
)
+
"%"
;
var
percent
=
parseFloat
(
item
.
series
.
percent
).
toFixed
(
1
)
+
"%"
;
piett
(
pos
.
pageX
,
pos
.
pageY
,
percent
+
" "
+
item
.
series
.
label
);
}
else
{
$
(
"#pie-tooltip"
).
remove
();
...
...
panels/text/module.html
0 → 100644
View file @
70f6a297
<div
ng-controller=
'text'
>
<h4
ng-class=
"{'ng-cloak': !panel.title}"
>
{{panel.title}}
</h4>
<p
style=
"font-size:{{panel.fontsize}}"
>
{{panel.content}}
</p>
</div>
\ No newline at end of file
panels/text/module.js
0 → 100644
View file @
70f6a297
angular
.
module
(
'kibana.text'
,
[])
.
controller
(
'text'
,
function
(
$scope
,
$rootScope
)
{
var
_id
=
_
.
uniqueId
();
// Set and populate defaults
var
_d
=
{
group
:
"default"
,
content
:
""
,
'fontsize'
:
"100%"
}
_
.
defaults
(
$scope
.
panel
,
_d
);
$scope
.
init
=
function
()
{
}
$scope
.
init
();
})
\ No newline at end of file
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