From 5930dc635484659339734c5f5b105bfdd2690ebb Mon Sep 17 00:00:00 2001 From: utkarshcmu Date: Sat, 21 Nov 2015 16:37:15 -0800 Subject: [PATCH] Removed info icon, Included metadata feature --- public/app/core/directives/dash_edit_link.js | 3 +- .../app/features/dashboard/dashboardCtrl.js | 7 ++- .../features/dashboard/dashboardNavCtrl.js | 7 +-- .../dashboard/partials/dashboardTopNav.html | 15 +----- .../features/dashboard/partials/metadata.html | 46 +++++++++++++++++++ public/less/overrides.less | 5 -- 6 files changed, 56 insertions(+), 27 deletions(-) create mode 100644 public/app/features/dashboard/partials/metadata.html diff --git a/public/app/core/directives/dash_edit_link.js b/public/app/core/directives/dash_edit_link.js index 9ab74fe6d74..06c44cc8262 100644 --- a/public/app/core/directives/dash_edit_link.js +++ b/public/app/core/directives/dash_edit_link.js @@ -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) { diff --git a/public/app/features/dashboard/dashboardCtrl.js b/public/app/features/dashboard/dashboardCtrl.js index cf071565515..eb2aa3bad89 100644 --- a/public/app/features/dashboard/dashboardCtrl.js +++ b/public/app/features/dashboard/dashboardCtrl.js @@ -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'); + }; + }); }); diff --git a/public/app/features/dashboard/dashboardNavCtrl.js b/public/app/features/dashboard/dashboardNavCtrl.js index 0d3d42a0fbf..56a64c4933f 100644 --- a/public/app/features/dashboard/dashboardNavCtrl.js +++ b/public/app/features/dashboard/dashboardNavCtrl.js @@ -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'); - }; - }); }); diff --git a/public/app/features/dashboard/partials/dashboardTopNav.html b/public/app/features/dashboard/partials/dashboardTopNav.html index 9bfeac03acd..baf6a9f3a62 100644 --- a/public/app/features/dashboard/partials/dashboardTopNav.html +++ b/public/app/features/dashboard/partials/dashboardTopNav.html @@ -39,22 +39,9 @@
  • View JSON
  • Save As...
  • Delete dashboard
  • +
  • Metadata
  • -