Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
318c9bf4
Commit
318c9bf4
authored
Sep 10, 2020
by
Tomas Vik
Committed by
Bob Van Landuyt
Sep 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Multi-project pipelines in Web IDE lead to 404"
parent
b5467943
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
3 deletions
+36
-3
app/assets/javascripts/ide/components/jobs/detail/description.vue
...ts/javascripts/ide/components/jobs/detail/description.vue
+7
-1
app/serializers/job_entity.rb
app/serializers/job_entity.rb
+2
-1
changelogs/unreleased/216480-ide-multiproject-pipelines.yml
changelogs/unreleased/216480-ide-multiproject-pipelines.yml
+5
-0
spec/frontend/ide/components/jobs/detail/description_spec.js
spec/frontend/ide/components/jobs/detail/description_spec.js
+8
-0
spec/frontend/ide/mock_data.js
spec/frontend/ide/mock_data.js
+2
-1
spec/serializers/job_entity_spec.rb
spec/serializers/job_entity_spec.rb
+12
-0
No files found.
app/assets/javascripts/ide/components/jobs/detail/description.vue
View file @
318c9bf4
...
...
@@ -26,7 +26,13 @@ export default {
<ci-icon
:status=
"job.status"
:borderless=
"true"
:size=
"24"
class=
"d-flex"
/>
<span
class=
"gl-ml-3"
>
{{
job
.
name
}}
<a
:href=
"job.path"
target=
"_blank"
class=
"ide-external-link position-relative"
>
<a
v-if=
"job.path"
:href=
"job.path"
target=
"_blank"
class=
"ide-external-link gl-relative"
data-testid=
"description-detail-link"
>
{{
jobId
}}
<gl-icon
:size=
"12"
name=
"external-link"
/>
</a>
</span>
...
...
app/serializers/job_entity.rb
View file @
318c9bf4
...
...
@@ -9,7 +9,8 @@ class JobEntity < Grape::Entity
expose
:started?
,
as: :started
expose
:archived?
,
as: :archived
expose
:build_path
do
|
build
|
# bridge jobs don't have build detail pages
expose
:build_path
,
if:
->
(
build
)
{
!
build
.
is_a?
(
Ci
::
Bridge
)
}
do
|
build
|
build_path
(
build
)
end
...
...
changelogs/unreleased/216480-ide-multiproject-pipelines.yml
0 → 100644
View file @
318c9bf4
---
title
:
Multi-project pipelines in Web IDE lead to
404
merge_request
:
41082
author
:
type
:
fixed
spec/frontend/ide/components/jobs/detail/description_spec.js
View file @
318c9bf4
...
...
@@ -27,4 +27,12 @@ describe('IDE job description', () => {
vm
.
$el
.
querySelector
(
'
.ci-status-icon [data-testid="status_success_borderless-icon"]
'
),
).
not
.
toBe
(
null
);
});
it
(
'
renders bridge job details without the job link
'
,
()
=>
{
vm
=
mountComponent
(
Component
,
{
job
:
{
...
jobs
[
0
],
path
:
undefined
},
});
expect
(
vm
.
$el
.
querySelector
(
'
[data-testid="description-detail-link"]
'
)).
toBe
(
null
);
});
});
spec/frontend/ide/mock_data.js
View file @
318c9bf4
...
...
@@ -112,7 +112,8 @@ export const jobs = [
{
id
:
4
,
name
:
'
test 4
'
,
path
:
'
testing4
'
,
// bridge jobs don't have details page and so there is no path attribute
// see https://gitlab.com/gitlab-org/gitlab/-/issues/216480
status
:
{
icon
:
'
status_failed
'
,
text
:
'
failed
'
,
...
...
spec/serializers/job_entity_spec.rb
View file @
318c9bf4
...
...
@@ -218,4 +218,16 @@ RSpec.describe JobEntity do
expect
(
subject
).
not_to
include
(
'recoverable'
)
end
end
context
'when job is a bridge'
do
let
(
:job
)
{
create
(
:ci_bridge
)
}
it
'does not include build path'
do
expect
(
subject
).
not_to
include
(
:build_path
)
end
it
'does not include cancel path'
do
expect
(
subject
).
not_to
include
(
:cancel_path
)
end
end
end
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