Commit 3768de80 authored by Filipa Lacerda's avatar Filipa Lacerda

Uniformize props name format

parent 1c529171
......@@ -7,14 +7,14 @@
window.gl.environmentsList.ExternalUrlComponent = Vue.component('external-url-component', {
props: {
external_url: {
externalUrl: {
type: String,
default: '',
},
},
template: `
<a class="btn external_url" :href="external_url" target="_blank">
<a class="btn external_url" :href="externalUrl" target="_blank">
<i class="fa fa-external-link"></i>
</a>
`,
......
......@@ -461,9 +461,9 @@
<div v-if="!isFolder && hasLastDeploymentKey" class="js-commit-component">
<commit-component
:tag="commitTag"
:commit_ref="commitRef"
:commit_url="commitUrl"
:short_sha="commitShortSha"
:commit-ref="commitRef"
:commit-url="commitUrl"
:short-sha="commitShortSha"
:title="commitTitle"
:author="commitAuthor"
:commit-icon-svg="commitIconSvg">
......@@ -495,22 +495,22 @@
<div v-if="model.external_url && canReadEnvironment"
class="inline js-external-url-container">
<external-url-component
:external_url="model.external_url">
</external_url-component>
:external-url="model.external_url">
</external-url-component>
</div>
<div v-if="isStoppable && canCreateDeployment"
class="inline js-stop-component-container">
<stop-component
:stop_url="model.stop_path">
:stop-url="model.stop_path">
</stop-component>
</div>
<div v-if="canRetry && canCreateDeployment"
class="inline js-rollback-component-container">
<rollback-component
:is_last_deployment="isLastDeployment"
:retry_url="retryUrl">
:is-last-deployment="isLastDeployment"
:retry-url="retryUrl">
</rollback-component>
</div>
</div>
......
......@@ -7,19 +7,20 @@
window.gl.environmentsList.RollbackComponent = Vue.component('rollback-component', {
props: {
retry_url: {
retryUrl: {
type: String,
default: '',
},
is_last_deployment: {
isLastDeployment: {
type: Boolean,
default: true,
},
},
template: `
<a class="btn" :href="retry_url" data-method="post" rel="nofollow">
<span v-if="is_last_deployment">
<a class="btn" :href="retryUrl" data-method="post" rel="nofollow">
<span v-if="isLastDeployment">
Re-deploy
</span>
<span v-else>
......
......@@ -7,7 +7,7 @@
window.gl.environmentsList.StopComponent = Vue.component('stop-component', {
props: {
stop_url: {
stopUrl: {
type: String,
default: '',
},
......@@ -15,7 +15,7 @@
template: `
<a class="btn stop-env-link"
:href="stop_url"
:href="stopUrl"
data-confirm="Are you sure you want to stop this environment?"
data-method="post"
rel="nofollow">
......
......@@ -23,7 +23,7 @@
* name
* ref_url
*/
commit_ref: {
commitRef: {
type: Object,
required: false,
default: () => ({}),
......@@ -32,7 +32,7 @@
/**
* Used to link to the commit sha.
*/
commit_url: {
commitUrl: {
type: String,
required: false,
default: '',
......@@ -41,7 +41,7 @@
/**
* Used to show the commit short_sha that links to the commit url.
*/
short_sha: {
shortSha: {
type: String,
required: false,
default: '',
......@@ -85,7 +85,7 @@
* @returns {Boolean}
*/
hasCommitRef() {
return this.commit_ref && this.commit_ref.name && this.commit_ref.ref_url;
return this.commitRef && this.commitRef.name && this.commitRef.ref_url;
},
/**
......@@ -125,15 +125,15 @@
<a v-if="hasCommitRef"
class="monospace branch-name"
:href="commit_ref.ref_url">
{{commit_ref.name}}
:href="commitRef.ref_url">
{{commitRef.name}}
</a>
<div v-html="commitIconSvg" class="commit-icon"></div>
<a class="commit-id monospace"
:href="commit_url">
{{short_sha}}
:href="commitUrl">
{{shortSha}}
</a>
<p class="commit-title">
......@@ -149,7 +149,7 @@
</a>
<a class="commit-row-message"
:href="commit_url">
:href="commitUrl">
{{title}}
</a>
</span>
......
......@@ -12,7 +12,7 @@ describe('External URL Component', () => {
const component = new window.gl.environmentsList.ExternalUrlComponent({
el: document.querySelector('.test-dom-element'),
propsData: {
external_url: externalURL,
externalUrl: externalURL,
},
});
......
......@@ -13,8 +13,8 @@ describe('Rollback Component', () => {
const component = new window.gl.environmentsList.RollbackComponent({
el: document.querySelector('.test-dom-element'),
propsData: {
retry_url: retryURL,
is_last_deployment: true,
retryUrl: retryURL,
isLastDeployment: true,
},
});
......@@ -25,8 +25,8 @@ describe('Rollback Component', () => {
const component = new window.gl.environmentsList.RollbackComponent({
el: document.querySelector('.test-dom-element'),
propsData: {
retry_url: retryURL,
is_last_deployment: true,
retryUrl: retryURL,
isLastDeployment: true,
},
});
......@@ -38,8 +38,8 @@ describe('Rollback Component', () => {
const component = new window.gl.environmentsList.RollbackComponent({
el: document.querySelector('.test-dom-element'),
propsData: {
retry_url: retryURL,
is_last_deployment: false,
retryUrl: retryURL,
isLastDeployment: false,
},
});
......
......@@ -13,7 +13,7 @@ describe('Stop Component', () => {
component = new window.gl.environmentsList.StopComponent({
el: document.querySelector('.test-dom-element'),
propsData: {
stop_url: stopURL,
stopUrl: stopURL,
},
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment