mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Removed info icon, Included metadata feature
This commit is contained in:
parent
c863ea4aa1
commit
5930dc6354
@ -8,7 +8,8 @@ function ($, coreModule) {
|
||||
var editViewMap = {
|
||||
'settings': { src: 'app/features/dashboard/partials/settings.html', title: "Settings" },
|
||||
'annotations': { src: 'app/features/annotations/partials/editor.html', title: "Annotations" },
|
||||
'templating': { src: 'app/features/templating/partials/editor.html', title: "Templating" }
|
||||
'templating': { src: 'app/features/templating/partials/editor.html', title: "Templating" },
|
||||
'metadata': { src: 'app/features/dashboard/partials/metadata.html', title: "Metadata" }
|
||||
};
|
||||
|
||||
coreModule.directive('dashEditorLink', function($timeout) {
|
||||
|
@ -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');
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -1,10 +1,9 @@
|
||||
define([
|
||||
'angular',
|
||||
'lodash',
|
||||
'moment',
|
||||
'vendor/filesaver'
|
||||
],
|
||||
function (angular, _, moment) {
|
||||
function (angular, _) {
|
||||
'use strict';
|
||||
|
||||
var module = angular.module('grafana.controllers');
|
||||
@ -158,10 +157,6 @@ function (angular, _, moment) {
|
||||
playlistSrv.stop(1);
|
||||
};
|
||||
|
||||
$scope.formatDate = function(date) {
|
||||
return moment(date).format('MMM Do YYYY, h:mm a');
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -39,22 +39,9 @@
|
||||
<li><a class="pointer" ng-click="editJson();">View JSON</a></li>
|
||||
<li ng-if="contextSrv.isEditor"><a class="pointer" ng-click="saveDashboardAs();">Save As...</a></li>
|
||||
<li ng-if="dashboardMeta.canSave"><a class="pointer" ng-click="deleteDashboard();">Delete dashboard</a></li>
|
||||
<li><a class="pointer" ng-click="openEditView('metadata');">Metadata</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a class="pointer" ng-click="hideTooltip($event)" bs-tooltip="'Dashboard info'" data-placement="bottom" data-toggle="dropdown"><i class="fa fa-info"></i></a>
|
||||
<div class="dropdown-menu dropdown-text">
|
||||
<table>
|
||||
<tr>
|
||||
<td><b>Updated at</b></td><td> : </td>
|
||||
<td>{{formatDate(dashboardMeta.updated)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Created at</b></td><td> : </td>
|
||||
<td>{{formatDate(dashboardMeta.created)}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav dash-playlist-actions" ng-if="playlistSrv">
|
||||
|
46
public/app/features/dashboard/partials/metadata.html
Normal file
46
public/app/features/dashboard/partials/metadata.html
Normal file
@ -0,0 +1,46 @@
|
||||
<div class="gf-box-header">
|
||||
<div class="gf-box-title">
|
||||
<i class="fa fa-info"></i>
|
||||
Metadata
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="gf-box-body" style="padding-bottom: 50px;">
|
||||
<div class="editor-row">
|
||||
<div class="tight-form-section">
|
||||
<h5>Dashboard 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 class="gf-box-footer">
|
||||
<div class="grafana-version-info">
|
||||
<span class="editor-option small">
|
||||
Grafana version: {{contextSrv.version}}
|
||||
</span>
|
||||
<span grafana-version-check>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
@ -599,8 +599,3 @@ code, pre {
|
||||
margin-left: 0;
|
||||
margin-right: -1px;
|
||||
}
|
||||
|
||||
.dropdown-text {
|
||||
width: 220px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user