Commit 2b58b6b5 by Carl Bergquist

Merge pull request #3304 from utkarshcmu/info

Added metadata info panel
parents 3868a796 384292b6
......@@ -2,8 +2,9 @@ define([
'angular',
'jquery',
'app/core/config',
'moment',
],
function (angular, $, config) {
function (angular, $, config, moment) {
"use strict";
var module = angular.module('grafana.controllers');
......@@ -149,6 +150,10 @@ function (angular, $, config) {
});
};
$scope.formatDate = function(date) {
return moment(date).format('MMM Do YYYY, h:mm:ss a');
};
});
});
......@@ -5,7 +5,7 @@
</div>
<div ng-model="editor.index" bs-tabs style="text-transform:capitalize;">
<div ng-repeat="tab in ['General', 'Rows', 'Links', 'Time picker']" data-title="{{tab}}">
<div ng-repeat="tab in ['General', 'Rows', 'Links', 'Time picker', 'Metadata']" data-title="{{tab}}">
</div>
</div>
......@@ -114,6 +114,36 @@
<gf-time-picker-settings dashboard="dashboard"></gf-time-picker-settings>
</div>
<div ng-if="editor.index == 4">
<div class="editor-row">
<div class="tight-form-section">
<h5>Info</h5>
<div class="tight-form">
<ul class="tight-form-list">
<li class="tight-form-item" style="width: 120px">
Last updated at:
</li>
<li class="tight-form-item" style="width: 180px">
{{formatDate(dashboardMeta.updated)}}
</li>
</ul>
<div class="clearfix"></div>
</div>
<div class="tight-form last">
<ul class="tight-form-list">
<li class="tight-form-item" style="width: 120px">
Created at:
</li>
<li class="tight-form-item" style="width: 180px">
{{formatDate(dashboardMeta.created)}}
</li>
</ul>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment