diff --git a/src/app/features/panel/panelHelper.js b/src/app/features/panel/panelHelper.js index aa920079f23..c2842fb225e 100644 --- a/src/app/features/panel/panelHelper.js +++ b/src/app/features/panel/panelHelper.js @@ -54,6 +54,10 @@ function (angular, _, kbn, $) { scope.rangeUnparsed = scope.range; } + + if (scope.panel.hideTimeOverride) { + scope.panelMeta.timeInfo = ''; + } }; this.issueMetricQuery = function(scope, datasource) { diff --git a/src/app/features/panel/panelMenu.js b/src/app/features/panel/panelMenu.js index d72b47cc977..a529dd87b5c 100644 --- a/src/app/features/panel/panelMenu.js +++ b/src/app/features/panel/panelMenu.js @@ -13,6 +13,7 @@ function (angular, $, _) { '' + '{{panel.title | interpolateTemplateVars}}' + '' + + ' {{panelMeta.timeInfo}}' + ''; function createMenuTemplate($scope) { diff --git a/src/app/features/panel/panelSrv.js b/src/app/features/panel/panelSrv.js index 45c9d745494..7411b887303 100644 --- a/src/app/features/panel/panelSrv.js +++ b/src/app/features/panel/panelSrv.js @@ -89,7 +89,7 @@ function (angular, _, config) { }; $scope.getCurrentDatasource = function() { - if ($scope.datasource) { + if ($scope.datasource) { return $q.when($scope.datasource); } diff --git a/src/app/features/panel/partials/panelTime.html b/src/app/features/panel/partials/panelTime.html index 0c407cf2ff1..f5bfac1d8d9 100644 --- a/src/app/features/panel/partials/panelTime.html +++ b/src/app/features/panel/partials/panelTime.html @@ -5,7 +5,7 @@
  • -
  • +
  • Override relative time
  • @@ -24,7 +24,7 @@
  • -
  • +
  • Add time shift
  • @@ -38,6 +38,22 @@
    +
    + +
    +
    diff --git a/src/app/panels/graph/module.html b/src/app/panels/graph/module.html index 09f2b4dbb59..b0793780fa8 100644 --- a/src/app/panels/graph/module.html +++ b/src/app/panels/graph/module.html @@ -3,9 +3,9 @@
    - - {{panelMeta.timeInfo}} - + + +
    diff --git a/src/css/less/graph.less b/src/css/less/graph.less index 46263a43988..665dbd4f4ce 100644 --- a/src/css/less/graph.less +++ b/src/css/less/graph.less @@ -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; -} diff --git a/src/css/less/panel.less b/src/css/less/panel.less index e8c683ab371..6a8c2355b5b 100644 --- a/src/css/less/panel.less +++ b/src/css/less/panel.less @@ -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; +}