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
578ee88f
Commit
578ee88f
authored
Feb 08, 2018
by
ilgizar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #7107
parent
39238c19
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
public/app/plugins/panel/graph/threshold_manager.ts
+14
-0
public/app/plugins/panel/graph/thresholds_form.ts
+10
-0
No files found.
public/app/plugins/panel/graph/threshold_manager.ts
View file @
578ee88f
...
@@ -222,12 +222,25 @@ export class ThresholdManager {
...
@@ -222,12 +222,25 @@ export class ThresholdManager {
// fill
// fill
if
(
threshold
.
fill
)
{
if
(
threshold
.
fill
)
{
if
(
threshold
.
yaxis
===
'right'
&&
this
.
shouldDrawHandles
)
{
options
.
grid
.
markings
.
push
({
y2axis
:
{
from
:
threshold
.
value
,
to
:
limit
},
color
:
fillColor
,
});
}
else
{
options
.
grid
.
markings
.
push
({
options
.
grid
.
markings
.
push
({
yaxis
:
{
from
:
threshold
.
value
,
to
:
limit
},
yaxis
:
{
from
:
threshold
.
value
,
to
:
limit
},
color
:
fillColor
,
color
:
fillColor
,
});
});
}
}
}
if
(
threshold
.
line
)
{
if
(
threshold
.
line
)
{
if
(
threshold
.
yaxis
===
'right'
&&
this
.
shouldDrawHandles
)
{
options
.
grid
.
markings
.
push
({
y2axis
:
{
from
:
threshold
.
value
,
to
:
threshold
.
value
},
color
:
lineColor
,
});
}
else
{
options
.
grid
.
markings
.
push
({
options
.
grid
.
markings
.
push
({
yaxis
:
{
from
:
threshold
.
value
,
to
:
threshold
.
value
},
yaxis
:
{
from
:
threshold
.
value
,
to
:
threshold
.
value
},
color
:
lineColor
,
color
:
lineColor
,
...
@@ -235,4 +248,5 @@ export class ThresholdManager {
...
@@ -235,4 +248,5 @@ export class ThresholdManager {
}
}
}
}
}
}
}
}
}
public/app/plugins/panel/graph/thresholds_form.ts
View file @
578ee88f
...
@@ -29,6 +29,7 @@ export class ThresholdFormCtrl {
...
@@ -29,6 +29,7 @@ export class ThresholdFormCtrl {
op
:
'gt'
,
op
:
'gt'
,
fill
:
true
,
fill
:
true
,
line
:
true
,
line
:
true
,
yaxis
:
'left'
,
});
});
this
.
panelCtrl
.
render
();
this
.
panelCtrl
.
render
();
}
}
...
@@ -110,6 +111,15 @@ var template = `
...
@@ -110,6 +111,15 @@ var template = `
</div>
</div>
<div class="gf-form">
<div class="gf-form">
<label class="gf-form-label">Y-axis</label>
<div class="gf-form-select-wrapper">
<select class="gf-form-input" ng-model="threshold.yaxis"
ng-options="f for f in ['left', 'right']" ng-change="ctrl.render()" ng-disabled="ctrl.disabled">
</select>
</div>
</div>
<div class="gf-form">
<label class="gf-form-label">
<label class="gf-form-label">
<a class="pointer" ng-click="ctrl.removeThreshold($index)" ng-disabled="ctrl.disabled">
<a class="pointer" ng-click="ctrl.removeThreshold($index)" ng-disabled="ctrl.disabled">
<i class="fa fa-trash"></i>
<i class="fa fa-trash"></i>
...
...
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