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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
76abe0ed
Commit
76abe0ed
authored
Dec 02, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change ref property to commitRef
parent
a1556200
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
app/assets/javascripts/environments/components/environment_item.js.es6
...vascripts/environments/components/environment_item.js.es6
+1
-1
app/assets/javascripts/vue_common_component/commit.js.es6
app/assets/javascripts/vue_common_component/commit.js.es6
+7
-7
spec/javascripts/vue_common_components/commit_spec.js.es6
spec/javascripts/vue_common_components/commit_spec.js.es6
+5
-5
No files found.
app/assets/javascripts/environments/components/environment_item.js.es6
View file @
76abe0ed
...
@@ -451,7 +451,7 @@
...
@@ -451,7 +451,7 @@
<div v-if="!isFolder && hasLastDeploymentKey" class="js-commit-component">
<div v-if="!isFolder && hasLastDeploymentKey" class="js-commit-component">
<commit-component
<commit-component
:tag="commitTag"
:tag="commitTag"
:
r
ef="commitRef"
:
commitR
ef="commitRef"
:commit_url="commitUrl"
:commit_url="commitUrl"
:short_sha="commitShortSha"
:short_sha="commitShortSha"
:title="commitTitle"
:title="commitTitle"
...
...
app/assets/javascripts/vue_common_component/commit.js.es6
View file @
76abe0ed
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* name
* name
* ref_url
* ref_url
*/
*/
r
ef: {
commitR
ef: {
type: Object,
type: Object,
required: false,
required: false,
default: () => ({}),
default: () => ({}),
...
@@ -79,8 +79,8 @@
...
@@ -79,8 +79,8 @@
*
*
* @returns {Boolean}
* @returns {Boolean}
*/
*/
hasRef() {
has
Commit
Ref() {
return this.
ref && this.ref.name && this.r
ef.ref_url;
return this.
commitRef && this.commitRef.name && this.commitR
ef.ref_url;
},
},
/**
/**
...
@@ -131,15 +131,15 @@
...
@@ -131,15 +131,15 @@
template: `
template: `
<div class="branch-commit">
<div class="branch-commit">
<div v-if="hasRef" class="icon-container">
<div v-if="has
Commit
Ref" class="icon-container">
<i v-if="tag" class="fa fa-tag"></i>
<i v-if="tag" class="fa fa-tag"></i>
<i v-if="!tag" class="fa fa-code-fork"></i>
<i v-if="!tag" class="fa fa-code-fork"></i>
</div>
</div>
<a v-if="hasRef"
<a v-if="has
Commit
Ref"
class="monospace branch-name"
class="monospace branch-name"
:href="
r
ef.ref_url">
:href="
commitR
ef.ref_url">
{{
r
ef.name}}
{{
commitR
ef.name}}
</a>
</a>
<div class="icon-container commit-icon commit-icon-container"></div>
<div class="icon-container commit-icon commit-icon-container"></div>
...
...
spec/javascripts/vue_common_components/commit_spec.js.es6
View file @
76abe0ed
...
@@ -10,7 +10,7 @@ describe('Commit component', () => {
...
@@ -10,7 +10,7 @@ describe('Commit component', () => {
el: document.querySelector('.test-commit-container'),
el: document.querySelector('.test-commit-container'),
propsData: {
propsData: {
tag: false,
tag: false,
r
ef: {
commitR
ef: {
name: 'master',
name: 'master',
ref_url: 'http://localhost/namespace2/gitlabhq/tree/master',
ref_url: 'http://localhost/namespace2/gitlabhq/tree/master',
},
},
...
@@ -34,7 +34,7 @@ describe('Commit component', () => {
...
@@ -34,7 +34,7 @@ describe('Commit component', () => {
props = {
props = {
tag: true,
tag: true,
r
ef: {
commitR
ef: {
name: 'master',
name: 'master',
ref_url: 'http://localhost/namespace2/gitlabhq/tree/master',
ref_url: 'http://localhost/namespace2/gitlabhq/tree/master',
},
},
...
@@ -59,11 +59,11 @@ describe('Commit component', () => {
...
@@ -59,11 +59,11 @@ describe('Commit component', () => {
});
});
it('should render a link to the ref url', () => {
it('should render a link to the ref url', () => {
expect(component.$el.querySelector('.branch-name').getAttribute('href')).toEqual(props.
r
ef.ref_url);
expect(component.$el.querySelector('.branch-name').getAttribute('href')).toEqual(props.
commitR
ef.ref_url);
});
});
it('should render the ref name', () => {
it('should render the ref name', () => {
expect(component.$el.querySelector('.branch-name').textContent).toContain(props.
r
ef.name);
expect(component.$el.querySelector('.branch-name').textContent).toContain(props.
commitR
ef.name);
});
});
it('should render the commit short sha with a link to the commit url', () => {
it('should render the commit short sha with a link to the commit url', () => {
...
@@ -103,7 +103,7 @@ describe('Commit component', () => {
...
@@ -103,7 +103,7 @@ describe('Commit component', () => {
fixture.set('<div class="test-commit-container"></div>');
fixture.set('<div class="test-commit-container"></div>');
props = {
props = {
tag: false,
tag: false,
r
ef: {
commitR
ef: {
name: 'master',
name: 'master',
ref_url: 'http://localhost/namespace2/gitlabhq/tree/master',
ref_url: 'http://localhost/namespace2/gitlabhq/tree/master',
},
},
...
...
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