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
77921c4d
Commit
77921c4d
authored
Mar 13, 2017
by
Daniel Lee
Committed by
Torkel Ödegaard
Mar 13, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renderpng: fixes invalid image link (#7797)
Closes #7770
parent
8637207b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
4 deletions
+28
-4
public/app/features/dashboard/shareModalCtrl.js
+4
-3
public/test/specs/shareModalCtrl-specs.js
+24
-1
No files found.
public/app/features/dashboard/shareModalCtrl.js
View file @
77921c4d
...
@@ -76,9 +76,10 @@ function (angular, _, $, moment, require, config) {
...
@@ -76,9 +76,10 @@ function (angular, _, $, moment, require, config) {
$scope
.
shareUrl
=
linkSrv
.
addParamsToUrl
(
baseUrl
,
params
);
$scope
.
shareUrl
=
linkSrv
.
addParamsToUrl
(
baseUrl
,
params
);
var
soloUrl
=
$scope
.
shareUrl
;
var
soloUrl
=
baseUrl
.
replace
(
config
.
appSubUrl
+
'/dashboard/'
,
config
.
appSubUrl
+
'/dashboard-solo/'
);
soloUrl
=
soloUrl
.
replace
(
config
.
appSubUrl
+
'/dashboard/'
,
config
.
appSubUrl
+
'/dashboard-solo/'
);
delete
params
.
fullscreen
;
soloUrl
=
soloUrl
.
replace
(
"&fullscreen"
,
""
).
replace
(
"&edit"
,
""
);
delete
params
.
edit
;
soloUrl
=
linkSrv
.
addParamsToUrl
(
soloUrl
,
params
);
$scope
.
iframeHtml
=
'<iframe src="'
+
soloUrl
+
'" width="450" height="200" frameborder="0"></iframe>'
;
$scope
.
iframeHtml
=
'<iframe src="'
+
soloUrl
+
'" width="450" height="200" frameborder="0"></iframe>'
;
...
...
public/test/specs/shareModalCtrl-specs.js
View file @
77921c4d
...
@@ -71,6 +71,30 @@ define([
...
@@ -71,6 +71,30 @@ define([
expect
(
ctx
.
scope
.
shareUrl
).
to
.
be
(
'http://server/#!/test?from=1000&to=2000&orgId=1&theme=light'
);
expect
(
ctx
.
scope
.
shareUrl
).
to
.
be
(
'http://server/#!/test?from=1000&to=2000&orgId=1&theme=light'
);
});
});
it
(
'should remove fullscreen from image url when is first param in querystring and modeSharePanel is true'
,
function
()
{
ctx
.
$location
.
url
(
'/test?fullscreen&edit'
);
ctx
.
scope
.
modeSharePanel
=
true
;
ctx
.
scope
.
panel
=
{
id
:
1
};
ctx
.
scope
.
buildUrl
();
expect
(
ctx
.
scope
.
shareUrl
).
to
.
contain
(
'?fullscreen&edit&from=1000&to=2000&orgId=1&panelId=1'
);
expect
(
ctx
.
scope
.
imageUrl
).
to
.
contain
(
'?from=1000&to=2000&orgId=1&panelId=1&width=1000&height=500&tz=UTC'
);
});
it
(
'should remove edit from image url when is first param in querystring and modeSharePanel is true'
,
function
()
{
ctx
.
$location
.
url
(
'/test?edit&fullscreen'
);
ctx
.
scope
.
modeSharePanel
=
true
;
ctx
.
scope
.
panel
=
{
id
:
1
};
ctx
.
scope
.
buildUrl
();
expect
(
ctx
.
scope
.
shareUrl
).
to
.
contain
(
'?edit&fullscreen&from=1000&to=2000&orgId=1&panelId=1'
);
expect
(
ctx
.
scope
.
imageUrl
).
to
.
contain
(
'?from=1000&to=2000&orgId=1&panelId=1&width=1000&height=500&tz=UTC'
);
});
it
(
'should include template variables in url'
,
function
()
{
it
(
'should include template variables in url'
,
function
()
{
ctx
.
$location
.
path
(
'/test'
);
ctx
.
$location
.
path
(
'/test'
);
ctx
.
scope
.
options
.
includeTemplateVars
=
true
;
ctx
.
scope
.
options
.
includeTemplateVars
=
true
;
...
@@ -83,7 +107,6 @@ define([
...
@@ -83,7 +107,6 @@ define([
ctx
.
scope
.
buildUrl
();
ctx
.
scope
.
buildUrl
();
expect
(
ctx
.
scope
.
shareUrl
).
to
.
be
(
'http://server/#!/test?from=1000&to=2000&orgId=1&var-app=mupp&var-server=srv-01'
);
expect
(
ctx
.
scope
.
shareUrl
).
to
.
be
(
'http://server/#!/test?from=1000&to=2000&orgId=1&var-app=mupp&var-server=srv-01'
);
});
});
});
});
});
});
...
...
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