diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2018-01-17 10:26:56 +0300 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2018-01-17 10:26:56 +0300 |
commit | 73cb6c3e717f3aa4979003552e00c715c052241a (patch) | |
tree | d27aa9bbba23108b7cfdf5f28dbcdaffa6d079db /app | |
parent | a8e11414777b986f7280bdaf83c7caad9a566eee (diff) | |
parent | 3f1235a17cf420ed2a1c830c4030b1a062039c51 (diff) |
Merge branch '41929-artifacts-time' into 'master'
Resolve "Remove "remaining" word from artifacts information in job's page sidebar"
Closes #41929
See merge request gitlab-org/gitlab-ce!16405
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/job.js | 13 | ||||
-rw-r--r-- | app/views/projects/jobs/_sidebar.html.haml | 2 |
2 files changed, 2 insertions, 13 deletions
diff --git a/app/assets/javascripts/job.js b/app/assets/javascripts/job.js index 8f32dcc94e2..9b5092c5e3f 100644 --- a/app/assets/javascripts/job.js +++ b/app/assets/javascripts/job.js @@ -3,7 +3,6 @@ import { visitUrl } from './lib/utils/url_utility'; import bp from './breakpoints'; import { numberToHumanSize } from './lib/utils/number_utils'; import { setCiStatusFavicon } from './lib/utils/common_utils'; -import { timeFor } from './lib/utils/datetime_utility'; export default class Job { constructor(options) { @@ -71,7 +70,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 +259,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(); diff --git a/app/views/projects/jobs/_sidebar.html.haml b/app/views/projects/jobs/_sidebar.html.haml index a71333497e6..e779473c239 100644 --- a/app/views/projects/jobs/_sidebar.html.haml +++ b/app/views/projects/jobs/_sidebar.html.haml @@ -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 } |