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
92cff96f
Commit
92cff96f
authored
Nov 17, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements after review
parent
a22f5161
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
13 deletions
+41
-13
app/assets/javascripts/environments/components/environment_item.js.es6
...vascripts/environments/components/environment_item.js.es6
+41
-13
No files found.
app/assets/javascripts/environments/components/environment_item.js.es6
View file @
92cff96f
...
...
@@ -208,8 +208,7 @@
* @returns {Object|Undefined}
*/
commitRef() {
if (this.model.last_deployment &&
this.model.last_deployment.ref) {
if (this.model.last_deployment && this.model.last_deployment.ref) {
return this.model.last_deployment.ref;
}
return undefined;
...
...
@@ -327,10 +326,8 @@
* @returns {Boolean}
*/
deploymentHasUser() {
if (this.model.last_deployment && this.model.last_deployment.user) {
return true;
}
return false;
return !this.$options.isObjectEmpty(this.model.last_deployment) &&
!this.$options.isObjectEmpty(this.model.last_deployment.user);
},
/**
...
...
@@ -340,11 +337,38 @@
* @returns {Object}
*/
deploymentUser() {
if (this.model.last_deployment && this.model.last_deployment.user) {
if (!this.$options.isObjectEmpty(this.model.last_deployment) &&
!this.$options.isObjectEmpty(this.model.last_deployment.user)) {
return this.model.last_deployment.user;
}
return {};
},
/**
* Verifies if the build name column should be rendered by verifing
* if all the information needed is present
* and if the environment is not a folder.
*
* @returns {Boolean}
*/
shouldRenderBuildName() {
return !this.isFolder &&
!this.$options.isObjectEmpty(this.model.last_deployment) &&
!this.$options.isObjectEmpty(this.model.last_deployment.deployable);
},
/**
* Verifies if deplyment internal ID should be rendered by verifing
* if all the information needed is present
* and if the environment is not a folder.
*
* @returns {Boolean}
*/
shouldRenderDeploymentID() {
return !this.isFolder &&
!this.$options.isObjectEmpty(this.model.last_deployment) &&
this.model.last_deployment.iid !== undefined;
},
},
/**
...
...
@@ -385,7 +409,7 @@
<td class="deployment-column">
<span
v-if="
!isFolder && model.last_deployment && model.last_deployment.iid
"
v-if="
shouldRenderDeploymentID
"
v-html="deploymentInternalId">
</span>
...
...
@@ -401,7 +425,7 @@
</td>
<td>
<a v-if="
!isFolder && model.last_deployment && model.last_deployment.deployabl
e"
<a v-if="
shouldRenderBuildNam
e"
class="build-link"
:href="model.last_deployment.deployable.build_path"
v-html="buildName">
...
...
@@ -434,25 +458,29 @@
<td class="hidden-xs">
<div v-if="!isFolder">
<div v-if="hasManualActions && canCreateDeployment" class="inline js-manual-actions-container">
<div v-if="hasManualActions && canCreateDeployment"
class="inline js-manual-actions-container">
<actions-component
:actions="manualActions">
</actions-component>
</div>
<div v-if="model.external_url && canReadEnvironment" class="inline js-external-url-container">
<div v-if="model.external_url && canReadEnvironment"
class="inline js-external-url-container">
<external-url-component
:external_url="model.external_url">
</external_url-component>
</div>
<div v-if="isStoppable && canCreateDeployment" class="inline js-stop-component-container">
<div v-if="isStoppable && canCreateDeployment"
class="inline js-stop-component-container">
<stop-component
:stop_url="model.environment_path">
</stop-component>
</div>
<div v-if="canRetry && canCreateDeployment" class="inline js-rollback-component-container">
<div v-if="canRetry && canCreateDeployment"
class="inline js-rollback-component-container">
<rollback-component
:is_last_deployment="isLastDeployment"
:retry_url="retryUrl">
...
...
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