Added different time period override to singlestat panel, added option to hide panel time override info, Closes #171
This commit is contained in:
@@ -54,6 +54,10 @@ function (angular, _, kbn, $) {
|
||||
|
||||
scope.rangeUnparsed = scope.range;
|
||||
}
|
||||
|
||||
if (scope.panel.hideTimeOverride) {
|
||||
scope.panelMeta.timeInfo = '';
|
||||
}
|
||||
};
|
||||
|
||||
this.issueMetricQuery = function(scope, datasource) {
|
||||
|
||||
@@ -13,6 +13,7 @@ function (angular, $, _) {
|
||||
'<span class="panel-title drag-handle pointer">' +
|
||||
'<span class="panel-title-text drag-handle">{{panel.title | interpolateTemplateVars}}</span>' +
|
||||
'<span class="panel-links-icon"></span>' +
|
||||
'<span class="panel-time-info" ng-show="panelMeta.timeInfo"><i class="fa fa-clock-o"></i> {{panelMeta.timeInfo}}</span>' +
|
||||
'</span>';
|
||||
|
||||
function createMenuTemplate($scope) {
|
||||
|
||||
@@ -89,7 +89,7 @@ function (angular, _, config) {
|
||||
};
|
||||
|
||||
$scope.getCurrentDatasource = function() {
|
||||
if ($scope.datasource) {
|
||||
if ($scope.datasource) {
|
||||
return $q.when($scope.datasource);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<li class="tight-form-item tight-form-item-icon">
|
||||
<i class="fa fa-clock-o"></i>
|
||||
</li>
|
||||
<li class="tight-form-item" style="width: 148px">
|
||||
<li class="tight-form-item" style="width: 178px">
|
||||
<strong>Override relative time</strong>
|
||||
</li>
|
||||
<li class="tight-form-item" style="width: 50px">
|
||||
@@ -24,7 +24,7 @@
|
||||
<li class="tight-form-item tight-form-item-icon">
|
||||
<i class="fa fa-clock-o"></i>
|
||||
</li>
|
||||
<li class="tight-form-item" style="width: 148px">
|
||||
<li class="tight-form-item" style="width: 178px">
|
||||
<strong>Add time shift</strong>
|
||||
</li>
|
||||
<li class="tight-form-item" style="width: 50px">
|
||||
@@ -38,6 +38,22 @@
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="tight-form">
|
||||
<ul class="tight-form-list">
|
||||
<li class="tight-form-item tight-form-item-icon">
|
||||
<i class="fa fa-clock-o"></i>
|
||||
</li>
|
||||
<li class="tight-form-item" style="width: 178px">
|
||||
<strong>Hide time override info</strong>
|
||||
</li>
|
||||
<li class="tight-form-item last">
|
||||
<input class="cr1" id="panel.hideTimeOverride" type="checkbox"
|
||||
ng-model="panel.hideTimeOverride" ng-checked="panel.hideTimeOverride" ng-change="get_data()">
|
||||
<label for="panel.hideTimeOverride" class="cr1"></label>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
<div class="graph-wrapper" ng-class="{'graph-legend-rightside': panel.legend.rightSide}">
|
||||
<div class="graph-canvas-wrapper">
|
||||
|
||||
<span class="graph-time-info" ng-if="panelMeta.timeInfo">
|
||||
<i class="fa fa-clock-o"></i> {{panelMeta.timeInfo}}
|
||||
</span>
|
||||
<!-- <span class="graph-time-info" ng-if="panelMeta.timeInfo"> -->
|
||||
<!-- <i class="fa fa-clock-o"></i> {{panelMeta.timeInfo}} -->
|
||||
<!-- </span> -->
|
||||
|
||||
<div ng-if="datapointsWarning" class="datapoints-warning">
|
||||
<span class="small" ng-show="!datapointsCount">
|
||||
|
||||
@@ -141,7 +141,6 @@
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
left: 4px;
|
||||
top: -25px;
|
||||
}
|
||||
|
||||
.graph-legend {
|
||||
@@ -268,13 +267,4 @@
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.graph-time-info {
|
||||
font-weight: bold;
|
||||
float: right;
|
||||
margin-right: 15px;
|
||||
color: @blue;
|
||||
font-size: 85%;
|
||||
position: relative;
|
||||
top: -20px;
|
||||
}
|
||||
|
||||
|
||||
@@ -169,4 +169,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
.panel-time-info {
|
||||
font-weight: bold;
|
||||
float: right;
|
||||
margin-right: 15px;
|
||||
color: @blue;
|
||||
font-size: 85%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user