legend aligns with left or right y axis depending on axis afinity
This commit is contained in:
@@ -4,6 +4,11 @@
|
||||
<div class="grafana-target-inner-wrapper">
|
||||
<div class="grafana-target-inner">
|
||||
<ul class="grafana-target-controls">
|
||||
<li ng-if="target.yaxis">
|
||||
<a class="pointer" ng-click="setYAxis()">
|
||||
y²
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="pointer" tabindex="1" ng-click="showTextEditor = !showTextEditor">
|
||||
<i class="icon-pencil"></i>
|
||||
|
||||
@@ -95,14 +95,14 @@ function ($, RQ, _, config) {
|
||||
var found = targets[0];
|
||||
|
||||
for (var i = 0; i < targets.length; i++) {
|
||||
if (targets[i].target == graphiteTargetStr) {
|
||||
if (targets[i].target === graphiteTargetStr) {
|
||||
found = targets[i];
|
||||
break;
|
||||
}
|
||||
if(targets[i].target.match("'" + graphiteTargetStr + "'")) {
|
||||
found = targets[i];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,10 @@
|
||||
</div>
|
||||
|
||||
<div class="grafana-legend-container">
|
||||
<span ng-show="panel.legend" ng-repeat='series in legend' class="histogram-legend">
|
||||
<span ng-show="panel.legend"
|
||||
ng-class="{'pull-right': series.yaxis === 2}"
|
||||
ng-repeat='series in legend'
|
||||
class="histogram-legend">
|
||||
<i class='icon-circle' ng-style="{color: series.color}"></i>
|
||||
<span class='small histogram-legend-item'>
|
||||
<span ng-if="panel.show_query">{{series.alias || series.query}}</span>
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+6
-2
@@ -84,10 +84,13 @@
|
||||
}
|
||||
|
||||
.grafana-legend-container {
|
||||
text-align: center;
|
||||
margin: 4px 15px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.panel-full-edit-tabs {
|
||||
margin-top: 10px;
|
||||
|
||||
.nav-tabs > li > a {
|
||||
line-height: 15px;
|
||||
padding-top: 6px;
|
||||
@@ -159,10 +162,11 @@
|
||||
}
|
||||
|
||||
.grafana-target-controls {
|
||||
width: 90px;
|
||||
width: 120px;
|
||||
float: right;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
text-align: right;
|
||||
|
||||
>li {
|
||||
display: inline-block;
|
||||
|
||||
Reference in New Issue
Block a user