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
aac190ea
Commit
aac190ea
authored
Jan 26, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(panels): graph panel starting to work
parent
ebba7a03
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
49 deletions
+51
-49
public/app/plugins/panel/graph/axisEditor.html
+37
-37
public/app/plugins/panel/graph/legend.js
+6
-5
public/app/plugins/panel/graph/legend.popover.html
+4
-4
public/app/plugins/panel/graph/module.html
+3
-3
public/app/plugins/panel/graph/module.ts
+1
-0
No files found.
public/app/plugins/panel/graph/axisEditor.html
View file @
aac190ea
This diff is collapsed.
Click to expand it.
public/app/plugins/panel/graph/legend.js
View file @
aac190ea
...
...
@@ -8,7 +8,7 @@ define([
function
(
angular
,
_
,
$
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.
panels.graph
'
);
var
module
=
angular
.
module
(
'grafana.
directives
'
);
module
.
directive
(
'graphLegend'
,
function
(
popoverSrv
)
{
...
...
@@ -16,13 +16,14 @@ function (angular, _, $) {
link
:
function
(
scope
,
elem
)
{
var
$container
=
$
(
'<section class="graph-legend"></section>'
);
var
firstRender
=
true
;
var
panel
=
scope
.
panel
;
var
ctrl
=
scope
.
ctrl
;
var
panel
=
ctrl
.
panel
;
var
data
;
var
seriesList
;
var
i
;
scope
.
$on
(
'render'
,
function
()
{
data
=
scope
.
seriesList
;
data
=
ctrl
.
seriesList
;
if
(
data
)
{
render
();
}
...
...
@@ -54,7 +55,7 @@ function (angular, _, $) {
var
el
=
$
(
e
.
currentTarget
);
var
index
=
getSeriesIndexForElement
(
el
);
var
seriesInfo
=
seriesList
[
index
];
scope
.
toggleSeries
(
seriesInfo
,
e
);
ctrl
.
toggleSeries
(
seriesInfo
,
e
);
}
function
sortLegend
(
e
)
{
...
...
@@ -148,7 +149,7 @@ function (angular, _, $) {
var
html
=
'<div class="graph-legend-series'
;
if
(
series
.
yaxis
===
2
)
{
html
+=
' pull-right'
;
}
if
(
scope
.
hiddenSeries
[
series
.
alias
])
{
html
+=
' graph-legend-series-hidden'
;
}
if
(
ctrl
.
hiddenSeries
[
series
.
alias
])
{
html
+=
' graph-legend-series-hidden'
;
}
html
+=
'" data-series-index="'
+
i
+
'">'
;
html
+=
'<div class="graph-legend-icon">'
;
html
+=
'<i class="fa fa-minus pointer" style="color:'
+
series
.
color
+
'"></i>'
;
...
...
public/app/plugins/panel/graph/legend.popover.html
View file @
aac190ea
...
...
@@ -3,12 +3,12 @@
<div
class=
"editor-row small"
style=
"padding-bottom: 0;"
>
<label>
Axis:
</label>
<button
ng-click=
"toggleYAxis(series);dismiss();"
<button
ng-click=
"
ctrl.
toggleYAxis(series);dismiss();"
class=
"btn btn-mini"
ng-class=
"{'btn-success': series.yaxis === 1 }"
>
Left
</button>
<button
ng-click=
"toggleYAxis(series);dismiss();"
<button
ng-click=
"
ctrl.
toggleYAxis(series);dismiss();"
class=
"btn btn-mini"
ng-class=
"{'btn-success': series.yaxis === 2 }"
>
Right
...
...
@@ -16,10 +16,10 @@
</div>
<div
class=
"editor-row"
>
<i
ng-repeat=
"color in colors"
class=
"pointer"
<i
ng-repeat=
"color in c
trl.c
olors"
class=
"pointer"
ng-class=
"{'fa fa-circle-o': color === series.color,'fa fa-circle': color !== series.color}"
ng-style=
"{color:color}"
ng-click=
"changeSeriesColor(series, color);dismiss();"
>
</i>
ng-click=
"c
trl.c
hangeSeriesColor(series, color);dismiss();"
>
</i>
</div>
</div>
public/app/plugins/panel/graph/module.html
View file @
aac190ea
<div
class=
"graph-wrapper"
ng-class=
"{'graph-legend-rightside': panel.legend.rightSide}"
>
<div
class=
"graph-wrapper"
ng-class=
"{'graph-legend-rightside':
ctrl.
panel.legend.rightSide}"
>
<div
class=
"graph-canvas-wrapper"
>
<div
ng-if=
"datapointsWarning"
class=
"datapoints-warning"
>
...
...
@@ -8,12 +8,12 @@
<span
class=
"small"
ng-show=
"datapointsOutside"
>
Datapoints outside time range
<tip>
Can be caused by timezone mismatch between browser and graphite server
</tip></span>
</div>
<div
grafana-graph
class=
"histogram-chart"
ng-dblclick=
"zoomOut()"
>
<div
grafana-graph
class=
"histogram-chart"
ng-dblclick=
"
ctrl.
zoomOut()"
>
</div>
</div>
<div
class=
"graph-legend-wrapper"
ng-if=
"panel.legend.show"
graph-legend
></div>
<div
class=
"graph-legend-wrapper"
ng-if=
"
ctrl.
panel.legend.show"
graph-legend
></div>
</div>
<div
class=
"clearfix"
></div>
...
...
public/app/plugins/panel/graph/module.ts
View file @
aac190ea
...
...
@@ -3,6 +3,7 @@ import {PanelDirective} from '../../../features/panel/panel';
import
{
GraphCtrl
}
from
'./graph_ctrl'
;
import
'./graph'
;
import
'./legend'
;
class
GraphPanel
extends
PanelDirective
{
controller
=
GraphCtrl
;
...
...
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