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
4f56d4ac
Commit
4f56d4ac
authored
Dec 14, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snapshots: fixed snapshot issues, fixes #10214
parent
4e385264
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
public/app/features/dashboard/partials/shareModal.html
+2
-1
public/app/features/dashboard/shareSnapshotCtrl.js
+11
-4
public/sass/components/_modals.scss
+1
-1
No files found.
public/app/features/dashboard/partials/shareModal.html
View file @
4f56d4ac
...
...
@@ -2,7 +2,8 @@
<div
class=
"modal-header"
>
<h2
class=
"modal-header-title"
>
{{modalTitle}}
<i
class=
"fa fa-share-square-o"
></i>
<span
class=
"p-l-1"
>
{{modalTitle}}
</span>
</h2>
<ul
class=
"gf-tabs"
>
...
...
public/app/features/dashboard/shareSnapshotCtrl.js
View file @
4f56d4ac
...
...
@@ -103,14 +103,17 @@ function (angular, _) {
$scope
.
scrubDashboard
=
function
(
dash
)
{
// change title
dash
.
title
=
$scope
.
snapshot
.
name
;
// make relative times absolute
dash
.
time
=
timeSrv
.
timeRange
();
// remove panel queries & links
dash
.
forEachPanel
(
function
(
panel
)
{
_
.
each
(
dash
.
panels
,
function
(
panel
)
{
panel
.
targets
=
[];
panel
.
links
=
[];
panel
.
datasource
=
null
;
});
// remove annotation queries
dash
.
annotations
.
list
=
_
.
chain
(
dash
.
annotations
.
list
)
.
filter
(
function
(
annotation
)
{
...
...
@@ -124,6 +127,7 @@ function (angular, _) {
snapshotData
:
annotation
.
snapshotData
};
}).
value
();
// remove template queries
_
.
each
(
dash
.
templating
.
list
,
function
(
variable
)
{
variable
.
query
=
""
;
...
...
@@ -133,9 +137,12 @@ function (angular, _) {
// snapshot single panel
if
(
$scope
.
modeSharePanel
)
{
var
singlePanel
=
dash
.
getPanelById
(
$scope
.
panel
.
id
);
singlePanel
.
span
=
12
;
dash
.
rows
=
[{
height
:
'500px'
,
span
:
12
,
panels
:
[
singlePanel
]
}];
var
singlePanel
=
$scope
.
panel
.
getSaveModel
();
singlePanel
.
gridPos
.
w
=
24
;
singlePanel
.
gridPos
.
x
=
0
;
singlePanel
.
gridPos
.
y
=
0
;
singlePanel
.
gridPos
.
h
=
20
;
dash
.
panels
=
[
singlePanel
];
}
// cleanup snapshotData
...
...
public/sass/components/_modals.scss
View file @
4f56d4ac
...
...
@@ -57,7 +57,7 @@
.modal-header-close
{
float
:
right
;
padding
:
0
.75rem
$spacer
;
padding
:
9px
$spacer
;
}
// Body (where all modal content resides)
...
...
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