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
91e9c22c
Commit
91e9c22c
authored
May 13, 2021
by
Jose Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address technical debt in job_container_item component
parent
ca3dd4eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
+19
-16
app/assets/javascripts/jobs/components/job_container_item.vue
...assets/javascripts/jobs/components/job_container_item.vue
+17
-10
app/assets/stylesheets/page_bundles/build.scss
app/assets/stylesheets/page_bundles/build.scss
+0
-4
spec/features/projects/jobs_spec.rb
spec/features/projects/jobs_spec.rb
+2
-2
No files found.
app/assets/javascripts/jobs/components/job_container_item.vue
View file @
91e9c22c
...
...
@@ -35,33 +35,40 @@ export default {
return
text
;
},
jobName
()
{
return
this
.
job
.
name
?
this
.
job
.
name
:
this
.
job
.
id
;
},
classes
()
{
return
{
retried
:
this
.
job
.
retried
,
'
gl-font-weight-bold
'
:
this
.
isActive
,
};
},
dataTestId
()
{
return
this
.
isActive
?
'
active-job
'
:
null
;
},
},
};
</
script
>
<
template
>
<div
class=
"build-job gl-relative"
:class=
"
{
retried: job.retried,
active: isActive,
}"
>
<div
class=
"build-job gl-relative"
:class=
"classes"
>
<gl-link
v-gl-tooltip:tooltip-container
.
left
:href=
"job.status.details_path"
:title=
"tooltipText"
class=
"js-job-link gl-display-flex gl-align-items-center"
class=
"gl-display-flex gl-align-items-center"
:data-testid=
"dataTestId"
>
<gl-icon
v-if=
"isActive"
name=
"arrow-right"
class=
"
js-arrow-right
icon-arrow-right gl-absolute gl-display-block"
class=
"icon-arrow-right gl-absolute gl-display-block"
/>
<ci-icon
:status=
"job.status"
/>
<span
class=
"
text-truncate w-100"
>
{{
job
.
name
?
job
.
name
:
job
.
id
}}
</span>
<span
class=
"
gl-text-truncate gl-w-full"
>
{{
jobName
}}
</span>
<gl-icon
v-if=
"job.retried"
name=
"retry"
/>
</gl-link>
...
...
app/assets/stylesheets/page_bundles/build.scss
View file @
91e9c22c
...
...
@@ -198,10 +198,6 @@
}
.build-job
{
&
.active
{
font-weight
:
$gl-font-weight-bold
;
}
&
.retried
{
background-color
:
var
(
--
gray-10
,
$gray-10
);
}
...
...
spec/features/projects/jobs_spec.rb
View file @
91e9c22c
...
...
@@ -136,7 +136,7 @@ RSpec.describe 'Jobs', :clean_gitlab_redis_shared_state do
visit
project_job_path
(
project
,
job
)
wait_for_requests
expect
(
page
).
to
have_selector
(
'
.build-job.active
'
)
expect
(
page
).
to
have_selector
(
'
[data-testid="active-job"]
'
)
end
end
...
...
@@ -255,7 +255,7 @@ RSpec.describe 'Jobs', :clean_gitlab_redis_shared_state do
end
it
'renders escaped tooltip name'
do
page
.
find
(
'
.active.build-job a
'
).
hover
page
.
find
(
'
[data-testid="active-job"]
'
).
hover
expect
(
page
).
to
have_content
(
'<img src=x onerror=alert(document.domain)> - passed'
)
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