From 890c527ae5d4bfe24d60e3e02969916776ec4a53 Mon Sep 17 00:00:00 2001 From: utkarshcmu Date: Sat, 21 Nov 2015 06:16:28 -0800 Subject: [PATCH 1/6] Added info dropdown --- public/app/features/dashboard/dashboardNavCtrl.js | 7 ++++++- .../dashboard/partials/dashboardTopNav.html | 14 ++++++++++++++ public/less/overrides.less | 5 +++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/public/app/features/dashboard/dashboardNavCtrl.js b/public/app/features/dashboard/dashboardNavCtrl.js index 56a64c4933f..3f4cfc52ac3 100644 --- a/public/app/features/dashboard/dashboardNavCtrl.js +++ b/public/app/features/dashboard/dashboardNavCtrl.js @@ -1,9 +1,10 @@ define([ 'angular', 'lodash', + 'moment', 'vendor/filesaver' ], -function (angular, _) { +function (angular, _, moment) { 'use strict'; var module = angular.module('grafana.controllers'); @@ -157,6 +158,10 @@ function (angular, _) { playlistSrv.stop(1); }; + $scope.dateFormat = function(date) { + return moment(date).format('MMMM Do YYYY, h:mm a'); + }; + }); }); diff --git a/public/app/features/dashboard/partials/dashboardTopNav.html b/public/app/features/dashboard/partials/dashboardTopNav.html index 8fa6da1ee2f..a8ffb08fa4c 100644 --- a/public/app/features/dashboard/partials/dashboardTopNav.html +++ b/public/app/features/dashboard/partials/dashboardTopNav.html @@ -41,6 +41,20 @@
  • Delete dashboard
  • + - diff --git a/public/app/features/dashboard/partials/metadata.html b/public/app/features/dashboard/partials/metadata.html deleted file mode 100644 index 11eaa6d542a..00000000000 --- a/public/app/features/dashboard/partials/metadata.html +++ /dev/null @@ -1,49 +0,0 @@ -
    -
    - - Metadata -
    - -
    - -
    -
    -
    -
    Dashboard info
    -
    -
      -
    • - Last updated at: -
    • -
    • - {{formatDate(dashboardMeta.updated)}} -
    • -
    -
    -
    -
    -
      -
    • - Created at: -
    • -
    • - {{formatDate(dashboardMeta.created)}} -
    • -
    -
    -
    -
    -
    -
    - - diff --git a/public/app/features/dashboard/partials/settings.html b/public/app/features/dashboard/partials/settings.html index 541ef45e9ab..347265afed4 100644 --- a/public/app/features/dashboard/partials/settings.html +++ b/public/app/features/dashboard/partials/settings.html @@ -5,7 +5,7 @@
    -
    +
    @@ -114,6 +114,36 @@
    +
    +
    +
    +
    Info
    +
    +
      +
    • + Last updated at: +
    • +
    • + {{formatDate(dashboardMeta.updated)}} +
    • +
    +
    +
    +
    +
      +
    • + Created at: +
    • +
    • + {{formatDate(dashboardMeta.created)}} +
    • +
    +
    +
    +
    +
    +
    +