mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Custom snapshot topnav header, new custom dashboard snapshot icon, #1623
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user