Custom snapshot topnav header, new custom dashboard snapshot icon, #1623

This commit is contained in:
Torkel Ödegaard
2015-03-28 17:53:52 +01:00
parent 80c771c945
commit 8e9a0eddf5
16 changed files with 157 additions and 57 deletions

View File

@@ -65,7 +65,11 @@ func GetDashboardSnapshot(c *middleware.Context) {
dto := dtos.Dashboard{
Model: snapshot.Dashboard,
Meta: dtos.DashboardMeta{IsSnapshot: true},
Meta: dtos.DashboardMeta{
IsSnapshot: true,
Created: snapshot.Created,
Expires: snapshot.Expires,
},
}
metrics.M_Api_Dashboard_Snapshot_Get.Inc(1)

View File

@@ -4,6 +4,7 @@ import (
"crypto/md5"
"fmt"
"strings"
"time"
m "github.com/grafana/grafana/pkg/models"
)
@@ -27,10 +28,12 @@ type CurrentUser struct {
}
type DashboardMeta struct {
IsStarred bool `json:"isStarred"`
IsHome bool `json:"isHome"`
IsSnapshot bool `json:"isSnapshot"`
Slug string `json:"slug"`
IsStarred bool `json:"isStarred"`
IsHome bool `json:"isHome"`
IsSnapshot bool `json:"isSnapshot"`
Slug string `json:"slug"`
Expires time.Time `json:"expires"`
Created time.Time `json:"created"`
}
type Dashboard struct {