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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
8b6162ee
Commit
8b6162ee
authored
Jan 11, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove remaining word from artifacts date
parent
d9aaf0ba
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
17 deletions
+2
-17
app/assets/javascripts/job.js
app/assets/javascripts/job.js
+1
-11
app/views/projects/jobs/_sidebar.html.haml
app/views/projects/jobs/_sidebar.html.haml
+1
-1
spec/javascripts/job_spec.js
spec/javascripts/job_spec.js
+0
-5
No files found.
app/assets/javascripts/job.js
View file @
8b6162ee
...
...
@@ -71,7 +71,6 @@ export default class Job {
.
off
(
'
resize.build
'
)
.
on
(
'
resize.build
'
,
_
.
throttle
(
this
.
sidebarOnResize
.
bind
(
this
),
100
));
this
.
updateArtifactRemoveDate
();
this
.
initAffixTopArea
();
this
.
getBuildTrace
();
...
...
@@ -261,16 +260,7 @@ export default class Job {
sidebarOnClick
()
{
if
(
this
.
shouldHideSidebarForViewport
())
this
.
toggleSidebar
();
}
// eslint-disable-next-line class-methods-use-this, consistent-return
updateArtifactRemoveDate
()
{
const
$date
=
$
(
'
.js-artifacts-remove
'
);
if
(
$date
.
length
)
{
const
date
=
$date
.
text
();
return
$date
.
text
(
timeFor
(
new
Date
(
date
.
replace
(
/
([
0-9
]
+
)
-
([
0-9
]
+
)
-
([
0-9
]
+
)
/g
,
'
$1/$2/$3
'
))),
);
}
}
// eslint-disable-next-line class-methods-use-this
populateJobs
(
stage
)
{
$
(
'
.build-job
'
).
hide
();
...
...
app/views/projects/jobs/_sidebar.html.haml
View file @
8b6162ee
...
...
@@ -24,7 +24,7 @@
-
elsif
@build
.
has_expiring_artifacts?
%p
.build-detail-row
The artifacts will be removed in
%span
.js-artifacts-remove
=
@build
.
artifacts_expire_at
%span
=
time_ago_in_words
@build
.
artifacts_expire_at
-
if
@build
.
artifacts?
.btn-group.btn-group-justified
{
role: :group
}
...
...
spec/javascripts/job_spec.js
View file @
8b6162ee
...
...
@@ -52,11 +52,6 @@ describe('Job', () => {
expect
(
$
(
'
.build-job[data-stage="test"]
'
).
is
(
'
:visible
'
)).
toBe
(
false
);
expect
(
$
(
'
.build-job[data-stage="deploy"]
'
).
is
(
'
:visible
'
)).
toBe
(
false
);
});
it
(
'
displays the remove date correctly
'
,
()
=>
{
const
removeDateElement
=
document
.
querySelector
(
'
.js-artifacts-remove
'
);
expect
(
removeDateElement
.
innerText
.
trim
()).
toBe
(
'
1 year remaining
'
);
});
});
describe
(
'
running build
'
,
()
=>
{
...
...
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