Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
70481953
Commit
70481953
authored
Jan 19, 2016
by
utkarshcmu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Snapshot name is saved in DB now
parent
870775e8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
2 deletions
+6
-2
pkg/api/dashboard_snapshot.go
+1
-0
pkg/models/dashboard_snapshot.go
+3
-2
pkg/services/sqlstore/dashboard_snapshot.go
+1
-0
public/app/features/dashboard/shareSnapshotCtrl.js
+1
-0
No files found.
pkg/api/dashboard_snapshot.go
View file @
70481953
...
...
@@ -36,6 +36,7 @@ func CreateDashboardSnapshot(c *middleware.Context, cmd m.CreateDashboardSnapsho
cmd
.
DeleteKey
=
util
.
GetRandomString
(
32
)
cmd
.
OrgId
=
c
.
OrgId
cmd
.
UserId
=
c
.
UserId
cmd
.
Name
=
c
.
Name
metrics
.
M_Api_Dashboard_Snapshot_Create
.
Inc
(
1
)
}
...
...
pkg/models/dashboard_snapshot.go
View file @
70481953
...
...
@@ -25,6 +25,7 @@ type DashboardSnapshot struct {
type
CreateDashboardSnapshotCommand
struct
{
Dashboard
map
[
string
]
interface
{}
`json:"dashboard" binding:"Required"`
Name
string
`json:"name" binding:"Required"`
Expires
int64
`json:"expires"`
// these are passed when storing an external snapshot ref
...
...
@@ -32,8 +33,8 @@ type CreateDashboardSnapshotCommand struct {
Key
string
`json:"key"`
DeleteKey
string
`json:"deleteKey"`
OrgId
int64
`json:"-"`
UserId
int64
`json:"-"`
OrgId
int64
`json:"-"`
UserId
int64
`json:"-"`
Result
*
DashboardSnapshot
}
...
...
pkg/services/sqlstore/dashboard_snapshot.go
View file @
70481953
...
...
@@ -24,6 +24,7 @@ func CreateDashboardSnapshot(cmd *m.CreateDashboardSnapshotCommand) error {
}
snapshot
:=
&
m
.
DashboardSnapshot
{
Name
:
cmd
.
Name
,
Key
:
cmd
.
Key
,
DeleteKey
:
cmd
.
DeleteKey
,
OrgId
:
cmd
.
OrgId
,
...
...
public/app/features/dashboard/shareSnapshotCtrl.js
View file @
70481953
...
...
@@ -60,6 +60,7 @@ function (angular, _) {
var
cmdData
=
{
dashboard
:
dash
,
name
:
dash
.
title
,
expires
:
$scope
.
snapshot
.
expires
,
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment