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
d3db49ae
Commit
d3db49ae
authored
Mar 27, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed snapshot sharing issue
parent
7be7aeb7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
pkg/api/dashboard_snapshot.go
+1
-1
src/app/features/dashboard/shareSnapshotCtrl.js
+1
-1
src/app/services/backendSrv.js
+5
-1
No files found.
pkg/api/dashboard_snapshot.go
View file @
d3db49ae
...
@@ -15,7 +15,7 @@ import (
...
@@ -15,7 +15,7 @@ import (
func
CreateDashboardSnapshot
(
c
*
middleware
.
Context
,
cmd
m
.
CreateDashboardSnapshotCommand
)
{
func
CreateDashboardSnapshot
(
c
*
middleware
.
Context
,
cmd
m
.
CreateDashboardSnapshotCommand
)
{
if
cmd
.
External
{
if
cmd
.
External
{
// external snapshot ref requires key and delete key
// external snapshot ref requires key and delete key
if
cmd
.
Key
!=
""
&&
cmd
.
DeleteKey
!
=
""
{
if
cmd
.
Key
==
""
||
cmd
.
DeleteKey
=
=
""
{
c
.
JsonApiErr
(
400
,
"Missing key and delete key for external snapshot"
,
nil
)
c
.
JsonApiErr
(
400
,
"Missing key and delete key for external snapshot"
,
nil
)
return
return
}
}
...
...
src/app/features/dashboard/shareSnapshotCtrl.js
View file @
d3db49ae
...
@@ -102,7 +102,7 @@ function (angular, _) {
...
@@ -102,7 +102,7 @@ function (angular, _) {
// save external in local instance as well
// save external in local instance as well
cmdData
.
external
=
true
;
cmdData
.
external
=
true
;
cmdData
.
key
=
results
.
key
;
cmdData
.
key
=
results
.
key
;
cmdData
.
delete
_key
=
results
.
delete_k
ey
;
cmdData
.
delete
Key
=
results
.
deleteK
ey
;
backendSrv
.
post
(
'/api/snapshots/'
,
cmdData
);
backendSrv
.
post
(
'/api/snapshots/'
,
cmdData
);
};
};
...
...
src/app/services/backendSrv.js
View file @
d3db49ae
...
@@ -54,12 +54,16 @@ function (angular, _, config) {
...
@@ -54,12 +54,16 @@ function (angular, _, config) {
this
.
request
=
function
(
options
)
{
this
.
request
=
function
(
options
)
{
var
httpOptions
=
{
var
httpOptions
=
{
url
:
config
.
appSubUrl
+
options
.
url
,
url
:
options
.
url
,
method
:
options
.
method
,
method
:
options
.
method
,
data
:
options
.
data
,
data
:
options
.
data
,
params
:
options
.
params
,
params
:
options
.
params
,
};
};
if
(
httpOptions
.
url
.
indexOf
(
'/'
)
===
0
)
{
httpOptions
.
url
=
config
.
appSubUrl
+
httpOptions
.
url
;
}
return
$http
(
httpOptions
).
then
(
function
(
results
)
{
return
$http
(
httpOptions
).
then
(
function
(
results
)
{
if
(
options
.
method
!==
'GET'
)
{
if
(
options
.
method
!==
'GET'
)
{
if
(
results
&&
results
.
data
.
message
)
{
if
(
results
&&
results
.
data
.
message
)
{
...
...
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