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
54e62874
Commit
54e62874
authored
Nov 29, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements after review
parent
edc97c9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
app/assets/javascripts/environments/components/environment_item.js.es6
...vascripts/environments/components/environment_item.js.es6
+10
-4
No files found.
app/assets/javascripts/environments/components/environment_item.js.es6
View file @
54e62874
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
window.gl = window.gl || {};
window.gl = window.gl || {};
window.gl.environmentsList = window.gl.environmentsList || {};
window.gl.environmentsList = window.gl.environmentsList || {};
window.gl.environmentsList.timeagoInstance = new timeago(); // eslint-disable-line
gl.environmentsList.EnvironmentItem = Vue.component('environment-item', {
gl.environmentsList.EnvironmentItem = Vue.component('environment-item', {
...
@@ -147,10 +148,15 @@
...
@@ -147,10 +148,15 @@
this.model.last_deployment.deployable;
this.model.last_deployment.deployable;
},
},
/**
* Verifies if the date to be shown is present.
*
* @returns {Boolean|Undefined}
*/
canShowDate() {
canShowDate() {
return this.model.last_deployment &&
return this.model.last_deployment &&
this.model.last_deployment.deployable &&
this.model.last_deployment.deployable &&
this.model.last_deployment.deployable
.created_at
;
this.model.last_deployment.deployable
!== undefined
;
},
},
/**
/**
...
@@ -159,9 +165,9 @@
...
@@ -159,9 +165,9 @@
* @returns {String}
* @returns {String}
*/
*/
createdDate() {
createdDate() {
const timeagoInstance = new timeago(); // eslint-disable-line
return window.gl.environmentsList.timeagoInstance.format(
this.model.last_deployment.deployable.created_at
return timeagoInstance.format(this.model.last_deployment.deployable.created_at
);
);
},
},
/**
/**
...
...
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