From b30dcce4bc6c4557ee8702902b702674d1666c17 Mon Sep 17 00:00:00 2001 From: utkarshcmu Date: Thu, 28 Jan 2016 00:52:52 -0800 Subject: [PATCH] Added dtos and UI for more metadata --- pkg/api/dtos/models.go | 30 ++++---- .../features/dashboard/partials/settings.html | 76 +++++++++++++++---- 2 files changed, 78 insertions(+), 28 deletions(-) diff --git a/pkg/api/dtos/models.go b/pkg/api/dtos/models.go index b35b5c472b6..4617f89d3c9 100644 --- a/pkg/api/dtos/models.go +++ b/pkg/api/dtos/models.go @@ -30,19 +30,23 @@ type CurrentUser struct { } type DashboardMeta struct { - IsStarred bool `json:"isStarred,omitempty"` - IsHome bool `json:"isHome,omitempty"` - IsSnapshot bool `json:"isSnapshot,omitempty"` - Type string `json:"type,omitempty"` - CanSave bool `json:"canSave"` - CanEdit bool `json:"canEdit"` - CanStar bool `json:"canStar"` - Slug string `json:"slug"` - Expires time.Time `json:"expires"` - Created time.Time `json:"created"` - Updated time.Time `json:"updated"` - UpdatedBy string `json:"updatedBy"` - CreatedBy string `json:"createdBy"` + IsStarred bool `json:"isStarred,omitempty"` + IsHome bool `json:"isHome,omitempty"` + IsSnapshot bool `json:"isSnapshot,omitempty"` + Type string `json:"type,omitempty"` + CanSave bool `json:"canSave"` + CanEdit bool `json:"canEdit"` + CanStar bool `json:"canStar"` + Slug string `json:"slug"` + Expires time.Time `json:"expires"` + Created time.Time `json:"created"` + Updated time.Time `json:"updated"` + UpdatedBy string `json:"updatedBy"` + CreatedBy string `json:"createdBy"` + TotalRows int64 `json:"totalRows"` + TotalPanels int64 `json:"totalPanels"` + TotalQueries int64 `json:"totalQueries"` + Version int `json:"version"` } type DashboardFullWithMeta struct { diff --git a/public/app/features/dashboard/partials/settings.html b/public/app/features/dashboard/partials/settings.html index d1a02924f0b..579f3717ebc 100644 --- a/public/app/features/dashboard/partials/settings.html +++ b/public/app/features/dashboard/partials/settings.html @@ -115,9 +115,9 @@
-
-
-
Dashboard info
+
+
Dashboard info
+
  • @@ -130,17 +130,6 @@
-
    -
  • - Created at: -
  • -
  • - {{formatDate(dashboardMeta.created)}} -
  • -
-
-
-
  • Last updated by: @@ -150,6 +139,17 @@
+
+
+
    +
  • + Created at: +
  • +
  • + {{formatDate(dashboardMeta.created)}} +
  • +
+
    @@ -158,7 +158,53 @@
  • {{dashboardMeta.createdBy}} -
  • + +
+
+
+
+
+
+
    +
  • + Total rows: +
  • +
  • + {{dashboardMeta.totalRows}} +
  • +
+
+
+
+
    +
  • + Total panels: +
  • +
  • + {{dashboardMeta.totalPanels}} +
  • +
+
+
+
+
    +
  • + Total queries: +
  • +
  • + {{dashboardMeta.totalQueries}} +
  • +
+
+
+
+
    +
  • + Version: +
  • +
  • + {{dashboardMeta.version}} +