2017-04-21 11:16:22 -04:00
|
|
|
<script>
|
2017-03-13 20:58:26 -04:00
|
|
|
import Timeago from 'timeago.js';
|
2017-05-10 12:17:31 -04:00
|
|
|
import _ from 'underscore';
|
2017-04-15 19:38:07 -04:00
|
|
|
import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
|
2017-03-17 13:30:32 -04:00
|
|
|
import '../../lib/utils/text_utility';
|
2017-04-21 11:16:22 -04:00
|
|
|
import ActionsComponent from './environment_actions.vue';
|
2017-04-20 05:04:06 -04:00
|
|
|
import ExternalUrlComponent from './environment_external_url.vue';
|
|
|
|
import StopComponent from './environment_stop.vue';
|
2017-04-20 07:48:54 -04:00
|
|
|
import RollbackComponent from './environment_rollback.vue';
|
2017-04-20 05:04:06 -04:00
|
|
|
import TerminalButtonComponent from './environment_terminal_button.vue';
|
2017-04-20 07:48:54 -04:00
|
|
|
import MonitoringButtonComponent from './environment_monitoring.vue';
|
2017-06-14 09:04:50 -04:00
|
|
|
import CommitComponent from '../../vue_shared/components/commit.vue';
|
2017-03-27 12:37:26 -04:00
|
|
|
import eventHub from '../event_hub';
|
2017-02-09 06:52:22 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Envrionment Item Component
|
|
|
|
*
|
|
|
|
* Renders a table row for each environment.
|
|
|
|
*/
|
|
|
|
const timeagoInstance = new Timeago();
|
|
|
|
|
2017-03-13 20:58:26 -04:00
|
|
|
export default {
|
2017-02-09 06:52:22 -05:00
|
|
|
components: {
|
2017-04-15 19:38:07 -04:00
|
|
|
userAvatarLink,
|
2017-03-17 13:30:32 -04:00
|
|
|
'commit-component': CommitComponent,
|
2017-02-09 06:52:22 -05:00
|
|
|
'actions-component': ActionsComponent,
|
|
|
|
'external-url-component': ExternalUrlComponent,
|
|
|
|
'stop-component': StopComponent,
|
|
|
|
'rollback-component': RollbackComponent,
|
|
|
|
'terminal-button-component': TerminalButtonComponent,
|
2017-03-31 05:20:11 -04:00
|
|
|
'monitoring-button-component': MonitoringButtonComponent,
|
2017-02-09 06:52:22 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
props: {
|
|
|
|
model: {
|
|
|
|
type: Object,
|
|
|
|
required: true,
|
|
|
|
default: () => ({}),
|
|
|
|
},
|
2016-11-09 13:52:26 -05:00
|
|
|
|
2017-02-09 06:52:22 -05:00
|
|
|
canCreateDeployment: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false,
|
|
|
|
},
|
2016-10-26 11:00:16 -04:00
|
|
|
|
2017-02-09 06:52:22 -05:00
|
|
|
canReadEnvironment: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
},
|
2016-10-24 07:42:01 -04:00
|
|
|
|
2017-02-09 06:52:22 -05:00
|
|
|
computed: {
|
|
|
|
/**
|
|
|
|
* Verifies if `last_deployment` key exists in the current Envrionment.
|
|
|
|
* This key is required to render most of the html - this method works has
|
|
|
|
* an helper.
|
|
|
|
*
|
|
|
|
* @returns {Boolean}
|
|
|
|
*/
|
|
|
|
hasLastDeploymentKey() {
|
2017-02-15 14:45:19 -05:00
|
|
|
if (this.model &&
|
|
|
|
this.model.last_deployment &&
|
2017-05-10 12:17:31 -04:00
|
|
|
!_.isEmpty(this.model.last_deployment)) {
|
2017-02-09 06:52:22 -05:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Verifies is the given environment has manual actions.
|
|
|
|
* Used to verify if we should render them or nor.
|
|
|
|
*
|
|
|
|
* @returns {Boolean|Undefined}
|
|
|
|
*/
|
|
|
|
hasManualActions() {
|
2017-02-15 14:45:19 -05:00
|
|
|
return this.model &&
|
|
|
|
this.model.last_deployment &&
|
|
|
|
this.model.last_deployment.manual_actions &&
|
|
|
|
this.model.last_deployment.manual_actions.length > 0;
|
2017-02-09 06:52:22 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the value of the `stop_action?` key provided in the response.
|
|
|
|
*
|
|
|
|
* @returns {Boolean}
|
|
|
|
*/
|
|
|
|
hasStopAction() {
|
2017-02-15 14:45:19 -05:00
|
|
|
return this.model && this.model['stop_action?'];
|
2017-02-09 06:52:22 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Verifies if the `deployable` key is present in `last_deployment` key.
|
|
|
|
* Used to verify whether we should or not render the rollback partial.
|
|
|
|
*
|
|
|
|
* @returns {Boolean|Undefined}
|
|
|
|
*/
|
|
|
|
canRetry() {
|
2017-02-15 14:45:19 -05:00
|
|
|
return this.model &&
|
2017-02-12 07:10:29 -05:00
|
|
|
this.hasLastDeploymentKey &&
|
2017-02-15 14:45:19 -05:00
|
|
|
this.model.last_deployment &&
|
|
|
|
this.model.last_deployment.deployable;
|
2017-02-09 06:52:22 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Verifies if the date to be shown is present.
|
|
|
|
*
|
|
|
|
* @returns {Boolean|Undefined}
|
|
|
|
*/
|
|
|
|
canShowDate() {
|
2017-02-15 14:45:19 -05:00
|
|
|
return this.model &&
|
|
|
|
this.model.last_deployment &&
|
|
|
|
this.model.last_deployment.deployable &&
|
|
|
|
this.model.last_deployment.deployable !== undefined;
|
2017-02-09 06:52:22 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Human readable date.
|
|
|
|
*
|
|
|
|
* @returns {String}
|
|
|
|
*/
|
|
|
|
createdDate() {
|
2017-02-15 14:45:19 -05:00
|
|
|
if (this.model &&
|
|
|
|
this.model.last_deployment &&
|
|
|
|
this.model.last_deployment.deployable &&
|
|
|
|
this.model.last_deployment.deployable.created_at) {
|
|
|
|
return timeagoInstance.format(this.model.last_deployment.deployable.created_at);
|
2017-02-12 07:10:29 -05:00
|
|
|
}
|
|
|
|
return '';
|
2016-10-14 13:38:13 -04:00
|
|
|
},
|
|
|
|
|
2016-11-17 16:32:43 -05:00
|
|
|
/**
|
2017-02-09 06:52:22 -05:00
|
|
|
* Returns the manual actions with the name parsed.
|
|
|
|
*
|
|
|
|
* @returns {Array.<Object>|Undefined}
|
2016-11-17 16:32:43 -05:00
|
|
|
*/
|
2017-02-09 06:52:22 -05:00
|
|
|
manualActions() {
|
|
|
|
if (this.hasManualActions) {
|
2017-02-15 14:45:19 -05:00
|
|
|
return this.model.last_deployment.manual_actions.map((action) => {
|
2017-02-09 06:52:22 -05:00
|
|
|
const parsedAction = {
|
|
|
|
name: gl.text.humanize(action.name),
|
|
|
|
play_path: action.play_path,
|
2017-03-17 12:25:17 -04:00
|
|
|
playable: action.playable,
|
2017-02-09 06:52:22 -05:00
|
|
|
};
|
|
|
|
return parsedAction;
|
|
|
|
});
|
2016-11-17 16:32:43 -05:00
|
|
|
}
|
2017-02-09 06:52:22 -05:00
|
|
|
return [];
|
2016-11-17 16:32:43 -05:00
|
|
|
},
|
|
|
|
|
2017-02-09 06:52:22 -05:00
|
|
|
/**
|
|
|
|
* Builds the string used in the user image alt attribute.
|
|
|
|
*
|
|
|
|
* @returns {String}
|
|
|
|
*/
|
|
|
|
userImageAltDescription() {
|
2017-02-15 14:45:19 -05:00
|
|
|
if (this.model &&
|
|
|
|
this.model.last_deployment &&
|
|
|
|
this.model.last_deployment.user &&
|
|
|
|
this.model.last_deployment.user.username) {
|
|
|
|
return `${this.model.last_deployment.user.username}'s avatar'`;
|
2017-02-09 06:52:22 -05:00
|
|
|
}
|
|
|
|
return '';
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If provided, returns the commit tag.
|
|
|
|
*
|
|
|
|
* @returns {String|Undefined}
|
|
|
|
*/
|
|
|
|
commitTag() {
|
2017-02-15 14:45:19 -05:00
|
|
|
if (this.model &&
|
|
|
|
this.model.last_deployment &&
|
|
|
|
this.model.last_deployment.tag) {
|
|
|
|
return this.model.last_deployment.tag;
|
2017-02-09 06:52:22 -05:00
|
|
|
}
|
|
|
|
return undefined;
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If provided, returns the commit ref.
|
|
|
|
*
|
|
|
|
* @returns {Object|Undefined}
|
|
|
|
*/
|
|
|
|
commitRef() {
|
2017-02-15 14:45:19 -05:00
|
|
|
if (this.model &&
|
|
|
|
this.model.last_deployment &&
|
|
|
|
this.model.last_deployment.ref) {
|
|
|
|
return this.model.last_deployment.ref;
|
2017-02-09 06:52:22 -05:00
|
|
|
}
|
|
|
|
return undefined;
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If provided, returns the commit url.
|
|
|
|
*
|
|
|
|
* @returns {String|Undefined}
|
|
|
|
*/
|
|
|
|
commitUrl() {
|
2017-02-15 14:45:19 -05:00
|
|
|
if (this.model &&
|
|
|
|
this.model.last_deployment &&
|
|
|
|
this.model.last_deployment.commit &&
|
|
|
|
this.model.last_deployment.commit.commit_path) {
|
|
|
|
return this.model.last_deployment.commit.commit_path;
|
2017-02-09 06:52:22 -05:00
|
|
|
}
|
|
|
|
return undefined;
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If provided, returns the commit short sha.
|
|
|
|
*
|
|
|
|
* @returns {String|Undefined}
|
|
|
|
*/
|
|
|
|
commitShortSha() {
|
2017-02-15 14:45:19 -05:00
|
|
|
if (this.model &&
|
|
|
|
this.model.last_deployment &&
|
|
|
|
this.model.last_deployment.commit &&
|
|
|
|
this.model.last_deployment.commit.short_id) {
|
|
|
|
return this.model.last_deployment.commit.short_id;
|
2017-02-09 06:52:22 -05:00
|
|
|
}
|
|
|
|
return undefined;
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If provided, returns the commit title.
|
|
|
|
*
|
|
|
|
* @returns {String|Undefined}
|
|
|
|
*/
|
|
|
|
commitTitle() {
|
2017-02-15 14:45:19 -05:00
|
|
|
if (this.model &&
|
|
|
|
this.model.last_deployment &&
|
|
|
|
this.model.last_deployment.commit &&
|
|
|
|
this.model.last_deployment.commit.title) {
|
|
|
|
return this.model.last_deployment.commit.title;
|
2017-02-09 06:52:22 -05:00
|
|
|
}
|
|
|
|
return undefined;
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If provided, returns the commit tag.
|
|
|
|
*
|
|
|
|
* @returns {Object|Undefined}
|
|
|
|
*/
|
|
|
|
commitAuthor() {
|
2017-02-15 14:45:19 -05:00
|
|
|
if (this.model &&
|
|
|
|
this.model.last_deployment &&
|
|
|
|
this.model.last_deployment.commit &&
|
|
|
|
this.model.last_deployment.commit.author) {
|
|
|
|
return this.model.last_deployment.commit.author;
|
2017-02-09 06:52:22 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Verifies if the `retry_path` key is present and returns its value.
|
|
|
|
*
|
|
|
|
* @returns {String|Undefined}
|
|
|
|
*/
|
|
|
|
retryUrl() {
|
2017-02-15 14:45:19 -05:00
|
|
|
if (this.model &&
|
|
|
|
this.model.last_deployment &&
|
|
|
|
this.model.last_deployment.deployable &&
|
|
|
|
this.model.last_deployment.deployable.retry_path) {
|
|
|
|
return this.model.last_deployment.deployable.retry_path;
|
2017-02-09 06:52:22 -05:00
|
|
|
}
|
|
|
|
return undefined;
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Verifies if the `last?` key is present and returns its value.
|
|
|
|
*
|
|
|
|
* @returns {Boolean|Undefined}
|
|
|
|
*/
|
|
|
|
isLastDeployment() {
|
2017-02-15 14:45:19 -05:00
|
|
|
return this.model && this.model.last_deployment &&
|
|
|
|
this.model.last_deployment['last?'];
|
2017-02-09 06:52:22 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Builds the name of the builds needed to display both the name and the id.
|
|
|
|
*
|
|
|
|
* @returns {String}
|
|
|
|
*/
|
|
|
|
buildName() {
|
2017-02-15 14:45:19 -05:00
|
|
|
if (this.model &&
|
|
|
|
this.model.last_deployment &&
|
|
|
|
this.model.last_deployment.deployable) {
|
|
|
|
return `${this.model.last_deployment.deployable.name} #${this.model.last_deployment.deployable.id}`;
|
2017-02-09 06:52:22 -05:00
|
|
|
}
|
|
|
|
return '';
|
|
|
|
},
|
2016-11-09 05:55:00 -05:00
|
|
|
|
2017-02-09 06:52:22 -05:00
|
|
|
/**
|
|
|
|
* Builds the needed string to show the internal id.
|
|
|
|
*
|
|
|
|
* @returns {String}
|
|
|
|
*/
|
|
|
|
deploymentInternalId() {
|
2017-02-15 14:45:19 -05:00
|
|
|
if (this.model &&
|
|
|
|
this.model.last_deployment &&
|
|
|
|
this.model.last_deployment.iid) {
|
|
|
|
return `#${this.model.last_deployment.iid}`;
|
2017-02-09 06:52:22 -05:00
|
|
|
}
|
|
|
|
return '';
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Verifies if the user object is present under last_deployment object.
|
|
|
|
*
|
|
|
|
* @returns {Boolean}
|
|
|
|
*/
|
|
|
|
deploymentHasUser() {
|
2017-02-15 14:45:19 -05:00
|
|
|
return this.model &&
|
2017-05-10 12:17:31 -04:00
|
|
|
!_.isEmpty(this.model.last_deployment) &&
|
|
|
|
!_.isEmpty(this.model.last_deployment.user);
|
2017-02-09 06:52:22 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the user object nested with the last_deployment object.
|
|
|
|
* Used to render the template.
|
|
|
|
*
|
|
|
|
* @returns {Object}
|
|
|
|
*/
|
|
|
|
deploymentUser() {
|
2017-02-15 14:45:19 -05:00
|
|
|
if (this.model &&
|
2017-05-10 12:17:31 -04:00
|
|
|
!_.isEmpty(this.model.last_deployment) &&
|
|
|
|
!_.isEmpty(this.model.last_deployment.user)) {
|
2017-02-15 14:45:19 -05:00
|
|
|
return this.model.last_deployment.user;
|
2017-02-09 06:52:22 -05:00
|
|
|
}
|
|
|
|
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.model.isFolder &&
|
2017-05-10 12:17:31 -04:00
|
|
|
!_.isEmpty(this.model.last_deployment) &&
|
|
|
|
!_.isEmpty(this.model.last_deployment.deployable);
|
2017-02-09 06:52:22 -05:00
|
|
|
},
|
|
|
|
|
2017-02-12 07:10:29 -05:00
|
|
|
/**
|
|
|
|
* Verifies the presence of all the keys needed to render the buil_path.
|
|
|
|
*
|
|
|
|
* @return {String}
|
|
|
|
*/
|
|
|
|
buildPath() {
|
2017-02-15 14:45:19 -05:00
|
|
|
if (this.model &&
|
|
|
|
this.model.last_deployment &&
|
|
|
|
this.model.last_deployment.deployable &&
|
|
|
|
this.model.last_deployment.deployable.build_path) {
|
|
|
|
return this.model.last_deployment.deployable.build_path;
|
2017-02-12 07:10:29 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return '';
|
|
|
|
},
|
2017-02-12 08:04:00 -05:00
|
|
|
|
2017-02-12 07:10:29 -05:00
|
|
|
/**
|
|
|
|
* Verifies the presence of all the keys needed to render the external_url.
|
|
|
|
*
|
|
|
|
* @return {String}
|
|
|
|
*/
|
|
|
|
externalURL() {
|
2017-02-15 14:45:19 -05:00
|
|
|
if (this.model && this.model.external_url) {
|
|
|
|
return this.model.external_url;
|
2017-02-12 07:10:29 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return '';
|
|
|
|
},
|
|
|
|
|
2017-02-09 06:52:22 -05:00
|
|
|
/**
|
|
|
|
* 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.model.isFolder &&
|
2017-05-10 12:17:31 -04:00
|
|
|
!_.isEmpty(this.model.last_deployment) &&
|
2017-02-15 14:45:19 -05:00
|
|
|
this.model.last_deployment.iid !== undefined;
|
2017-02-09 06:52:22 -05:00
|
|
|
},
|
2017-02-12 07:10:29 -05:00
|
|
|
|
|
|
|
environmentPath() {
|
2017-02-15 14:45:19 -05:00
|
|
|
if (this.model && this.model.environment_path) {
|
|
|
|
return this.model.environment_path;
|
2017-02-12 07:10:29 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return '';
|
|
|
|
},
|
2017-02-12 11:58:53 -05:00
|
|
|
|
2017-03-31 05:20:11 -04:00
|
|
|
monitoringUrl() {
|
|
|
|
if (this.model && this.model.metrics_path) {
|
|
|
|
return this.model.metrics_path;
|
|
|
|
}
|
|
|
|
|
|
|
|
return '';
|
|
|
|
},
|
|
|
|
|
2017-06-20 12:34:07 -04:00
|
|
|
displayEnvironmentActions() {
|
|
|
|
return this.hasManualActions ||
|
|
|
|
this.externalURL ||
|
|
|
|
this.monitoringUrl ||
|
|
|
|
this.hasStopAction ||
|
|
|
|
this.canRetry;
|
|
|
|
},
|
2017-02-09 06:52:22 -05:00
|
|
|
},
|
|
|
|
|
2017-03-27 12:37:26 -04:00
|
|
|
methods: {
|
|
|
|
onClickFolder() {
|
2017-08-21 11:46:45 -04:00
|
|
|
eventHub.$emit('toggleFolder', this.model);
|
2017-03-27 12:37:26 -04:00
|
|
|
},
|
|
|
|
},
|
2017-04-21 11:16:22 -04:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<template>
|
2017-06-06 08:58:29 -04:00
|
|
|
<div
|
2017-06-07 21:15:40 -04:00
|
|
|
:class="{ 'js-child-row environment-child-row': model.isChildren, 'folder-row': model.isFolder, 'gl-responsive-table-row': !model.isFolder }"
|
|
|
|
role="row">
|
2017-06-06 08:58:29 -04:00
|
|
|
<div class="table-section section-10" role="gridcell">
|
|
|
|
<div
|
|
|
|
v-if="!model.isFolder"
|
2017-06-07 21:15:40 -04:00
|
|
|
class="table-mobile-header"
|
|
|
|
role="rowheader">
|
2017-06-06 08:58:29 -04:00
|
|
|
Environment
|
|
|
|
</div>
|
2017-04-21 11:16:22 -04:00
|
|
|
<a
|
|
|
|
v-if="!model.isFolder"
|
2017-06-06 08:58:29 -04:00
|
|
|
class="environment-name flex-truncate-parent table-mobile-content"
|
2017-04-21 11:16:22 -04:00
|
|
|
:href="environmentPath">
|
2017-06-06 08:58:29 -04:00
|
|
|
<span class="flex-truncate-child">{{model.name}}</span>
|
2017-04-21 11:16:22 -04:00
|
|
|
</a>
|
|
|
|
<span
|
|
|
|
v-else
|
|
|
|
class="folder-name"
|
|
|
|
@click="onClickFolder"
|
|
|
|
role="button">
|
|
|
|
|
|
|
|
<span class="folder-icon">
|
|
|
|
<i
|
|
|
|
v-show="model.isOpen"
|
|
|
|
class="fa fa-caret-down"
|
|
|
|
aria-hidden="true" />
|
|
|
|
<i
|
|
|
|
v-show="!model.isOpen"
|
|
|
|
class="fa fa-caret-right"
|
|
|
|
aria-hidden="true"/>
|
2017-03-27 12:37:26 -04:00
|
|
|
</span>
|
2017-02-09 06:52:22 -05:00
|
|
|
|
2017-04-21 11:16:22 -04:00
|
|
|
<span class="folder-icon">
|
|
|
|
<i
|
|
|
|
class="fa fa-folder"
|
|
|
|
aria-hidden="true" />
|
2017-02-09 06:52:22 -05:00
|
|
|
</span>
|
|
|
|
|
2017-04-21 11:16:22 -04:00
|
|
|
<span>
|
|
|
|
{{model.folderName}}
|
2017-02-09 06:52:22 -05:00
|
|
|
</span>
|
|
|
|
|
2017-04-21 11:16:22 -04:00
|
|
|
<span class="badge">
|
|
|
|
{{model.size}}
|
2017-02-09 06:52:22 -05:00
|
|
|
</span>
|
2017-04-21 11:16:22 -04:00
|
|
|
</span>
|
2017-06-06 08:58:29 -04:00
|
|
|
</div>
|
2017-04-21 11:16:22 -04:00
|
|
|
|
2017-06-06 08:58:29 -04:00
|
|
|
<div class="table-section section-10 deployment-column hidden-xs hidden-sm" role="gridcell">
|
2017-04-21 11:16:22 -04:00
|
|
|
<span v-if="shouldRenderDeploymentID">
|
|
|
|
{{deploymentInternalId}}
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span v-if="!model.isFolder && deploymentHasUser">
|
|
|
|
by
|
2017-04-15 19:38:07 -04:00
|
|
|
<user-avatar-link
|
|
|
|
class="js-deploy-user-container"
|
|
|
|
:link-href="deploymentUser.web_url"
|
|
|
|
:img-src="deploymentUser.avatar_url"
|
|
|
|
:img-alt="userImageAltDescription"
|
|
|
|
:tooltip-text="deploymentUser.username"
|
|
|
|
/>
|
2017-04-21 11:16:22 -04:00
|
|
|
</span>
|
2017-06-06 08:58:29 -04:00
|
|
|
</div>
|
2017-04-21 11:16:22 -04:00
|
|
|
|
2017-06-06 08:58:29 -04:00
|
|
|
<div class="table-section section-15 hidden-xs hidden-sm" role="gridcell">
|
2017-04-21 11:16:22 -04:00
|
|
|
<a
|
|
|
|
v-if="shouldRenderBuildName"
|
2017-07-12 13:26:57 -04:00
|
|
|
class="build-link flex-truncate-parent"
|
2017-04-21 11:16:22 -04:00
|
|
|
:href="buildPath">
|
2017-07-12 13:26:57 -04:00
|
|
|
<span class="flex-truncate-child">{{buildName}}</span>
|
2017-04-21 11:16:22 -04:00
|
|
|
</a>
|
2017-06-06 08:58:29 -04:00
|
|
|
</div>
|
2017-04-21 11:16:22 -04:00
|
|
|
|
2017-06-06 08:58:29 -04:00
|
|
|
<div class="table-section section-25" role="gridcell">
|
|
|
|
<div
|
|
|
|
v-if="!model.isFolder"
|
2017-06-07 21:15:40 -04:00
|
|
|
role="rowheader"
|
2017-06-06 08:58:29 -04:00
|
|
|
class="table-mobile-header">
|
|
|
|
Commit
|
|
|
|
</div>
|
2017-04-21 11:16:22 -04:00
|
|
|
<div
|
|
|
|
v-if="!model.isFolder && hasLastDeploymentKey"
|
2017-06-06 08:58:29 -04:00
|
|
|
class="js-commit-component table-mobile-content">
|
2017-04-21 11:16:22 -04:00
|
|
|
<commit-component
|
|
|
|
:tag="commitTag"
|
|
|
|
:commit-ref="commitRef"
|
|
|
|
:commit-url="commitUrl"
|
|
|
|
:short-sha="commitShortSha"
|
|
|
|
:title="commitTitle"
|
|
|
|
:author="commitAuthor"/>
|
|
|
|
</div>
|
2017-06-06 08:58:29 -04:00
|
|
|
<div
|
2017-04-21 11:16:22 -04:00
|
|
|
v-if="!model.isFolder && !hasLastDeploymentKey"
|
2017-06-07 21:15:40 -04:00
|
|
|
class="commit-title table-mobile-content">
|
2017-04-21 11:16:22 -04:00
|
|
|
No deployments yet
|
2017-06-06 08:58:29 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-04-21 11:16:22 -04:00
|
|
|
|
2017-06-06 08:58:29 -04:00
|
|
|
<div class="table-section section-10" role="gridcell">
|
|
|
|
<div
|
|
|
|
v-if="!model.isFolder"
|
2017-06-07 21:15:40 -04:00
|
|
|
role="rowheader"
|
2017-06-06 08:58:29 -04:00
|
|
|
class="table-mobile-header">
|
|
|
|
Updated
|
|
|
|
</div>
|
2017-04-21 11:16:22 -04:00
|
|
|
<span
|
|
|
|
v-if="!model.isFolder && canShowDate"
|
2017-06-06 08:58:29 -04:00
|
|
|
class="environment-created-date-timeago table-mobile-content">
|
2017-04-21 11:16:22 -04:00
|
|
|
{{createdDate}}
|
|
|
|
</span>
|
2017-06-06 08:58:29 -04:00
|
|
|
</div>
|
2017-04-21 11:16:22 -04:00
|
|
|
|
2017-06-20 12:34:07 -04:00
|
|
|
<div
|
|
|
|
v-if="!model.isFolder && displayEnvironmentActions"
|
|
|
|
class="table-section section-30 table-button-footer"
|
|
|
|
role="gridcell">
|
|
|
|
|
2017-04-21 11:16:22 -04:00
|
|
|
<div
|
2017-06-16 08:00:28 -04:00
|
|
|
class="btn-group table-action-buttons"
|
2017-04-21 11:16:22 -04:00
|
|
|
role="group">
|
|
|
|
|
|
|
|
<actions-component
|
|
|
|
v-if="hasManualActions && canCreateDeployment"
|
2017-05-03 10:23:12 -04:00
|
|
|
:actions="manualActions"
|
|
|
|
/>
|
2017-04-21 11:16:22 -04:00
|
|
|
|
|
|
|
<external-url-component
|
|
|
|
v-if="externalURL && canReadEnvironment"
|
2017-05-03 10:23:12 -04:00
|
|
|
:external-url="externalURL"
|
|
|
|
/>
|
2017-04-21 11:16:22 -04:00
|
|
|
|
|
|
|
<monitoring-button-component
|
|
|
|
v-if="monitoringUrl && canReadEnvironment"
|
2017-05-03 10:23:12 -04:00
|
|
|
:monitoring-url="monitoringUrl"
|
|
|
|
/>
|
2017-04-21 11:16:22 -04:00
|
|
|
|
|
|
|
<terminal-button-component
|
|
|
|
v-if="model && model.terminal_path"
|
2017-05-03 10:23:12 -04:00
|
|
|
:terminal-path="model.terminal_path"
|
|
|
|
/>
|
2017-04-21 11:16:22 -04:00
|
|
|
|
|
|
|
<stop-component
|
|
|
|
v-if="hasStopAction && canCreateDeployment"
|
|
|
|
:stop-url="model.stop_path"
|
2017-05-03 10:23:12 -04:00
|
|
|
/>
|
2017-04-21 11:16:22 -04:00
|
|
|
|
|
|
|
<rollback-component
|
|
|
|
v-if="canRetry && canCreateDeployment"
|
|
|
|
:is-last-deployment="isLastDeployment"
|
|
|
|
:retry-url="retryUrl"
|
2017-05-03 10:23:12 -04:00
|
|
|
/>
|
2017-04-21 11:16:22 -04:00
|
|
|
</div>
|
2017-06-06 08:58:29 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-04-21 11:16:22 -04:00
|
|
|
</template>
|