Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
beat
beat.web
Commits
798e5688
There was a problem fetching the pipeline summary.
Commit
798e5688
authored
7 years ago
by
Jaden DIEFENBAUGH
Browse files
Options
Downloads
Patches
Plain Diff
more url fixes when injecting plots into reports
parent
f75559a1
No related branches found
No related tags found
1 merge request
!232
Fix angular dependency injection scheme
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
beat/web/reports/static/reports/app/services/plotService.js
+8
-6
8 additions, 6 deletions
beat/web/reports/static/reports/app/services/plotService.js
with
8 additions
and
6 deletions
beat/web/reports/static/reports/app/services/plotService.js
+
8
−
6
View file @
798e5688
...
...
@@ -117,7 +117,9 @@ angular.module('reportApp').factory('PlotService', ['UrlService', function(UrlSe
};
const
fetchDownload
=
(
requestData
,
contentType
)
=>
{
const
urlPrefix
=
''
;
let
prefix
=
new
URL
(
UrlService
.
getPrefix
()).
pathname
;
if
(
prefix
.
endsWith
(
'
/
'
))
prefix
=
prefix
.
slice
(
0
,
-
1
);
// override the 'merged' property to always request the merged version.
// requested the unmerged version only downloads the first image.
...
...
@@ -126,7 +128,7 @@ angular.module('reportApp').factory('PlotService', ['UrlService', function(UrlSe
return
new
Promise
((
resolve
,
reject
)
=>
{
beat
.
experiments
.
utils
.
getPlotData
(
// url_prefix
urlP
refix
,
p
refix
,
// spread out the request data to fill the next 3 spots
...
requestData
,
// content type: png, jpeg, pdf
...
...
@@ -142,14 +144,14 @@ angular.module('reportApp').factory('PlotService', ['UrlService', function(UrlSe
// makes the call to the server, via some helper funcs found in the global namespace
const
fetchRender
=
(
requestData
,
containerId
,
onRenderCallback
)
=>
{
// the 'url_prefix' field found throughout the BEAT code is confusing,
// but it seems to always be an empty string now
const
urlPrefix
=
''
;
//UrlService.getApiSegment()
.s
p
li
t('/').filter(s => s.length > 0).join('/'
);
let
prefix
=
new
URL
(
UrlService
.
getPrefix
()).
pathname
;
if
(
prefix
.
endsWith
(
'
/
'
))
prefix
=
prefix
.
sli
ce
(
0
,
-
1
);
// this func *cannot* be promisified! the callback is fired whenever the plot is re-rendered.
beat
.
experiments
.
utils
.
displayPlot
(
// url_prefix
urlP
refix
,
p
refix
,
// element to append render to
document
.
getElementById
(
`
${
containerId
}
`
),
// spread out the request data to fill the next 3 spots
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment