BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
8b6a075e
Commit
8b6a075e
authored
Aug 02, 2016
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement commit in merge conflicts UI.
parent
c2295fbd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
6 deletions
+25
-6
merge_conflict_data_provider.js.es6
app/assets/javascripts/merge_conflict_data_provider.js.es6
+9
-1
merge_conflict_resolver.js.es6
app/assets/javascripts/merge_conflict_resolver.js.es6
+10
-0
merge_request_tabs.js
app/assets/javascripts/merge_request_tabs.js
+1
-1
conflicts.html.haml
app/views/projects/merge_requests/conflicts.html.haml
+5
-4
No files found.
app/assets/javascripts/merge_conflict_data_provider.js.es6
View file @
8b6a075e
...
@@ -26,7 +26,7 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider {
...
@@ -26,7 +26,7 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider {
}
}
else {
else {
data.shortCommitSha = data.commit_sha.slice(0, 7);
data.shortCommitSha = data.commit_sha.slice(0, 7);
data.commitMes
age
= data.commit_message;
data.commitMes
sage
= data.commit_message;
this.setParallelLines(data);
this.setParallelLines(data);
this.setInlineLines(data);
this.setInlineLines(data);
...
@@ -284,4 +284,12 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider {
...
@@ -284,4 +284,12 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider {
vueInstance.conflictsData.errorMessage = 'Something went wrong!';
vueInstance.conflictsData.errorMessage = 'Something went wrong!';
}
}
getCommitData() {
return {
commitMessage: this.vueInstance.conflictsData.commitMessage,
sections: this.vueInstance.resolutionData
}
}
}
}
app/assets/javascripts/merge_conflict_resolver.js.es6
View file @
8b6a075e
...
@@ -22,6 +22,9 @@ window.MergeConflictResolver = class MergeConflictResolver {
...
@@ -22,6 +22,9 @@ window.MergeConflictResolver = class MergeConflictResolver {
},
},
handleViewTypeChange(newType) {
handleViewTypeChange(newType) {
that.dataProvider.updateViewType(newType);
that.dataProvider.updateViewType(newType);
},
commit() {
that.commit();
}
}
}
}
})
})
...
@@ -54,4 +57,11 @@ window.MergeConflictResolver = class MergeConflictResolver {
...
@@ -54,4 +57,11 @@ window.MergeConflictResolver = class MergeConflictResolver {
}
}
}
}
commit() {
$.post('./resolve_conflicts', this.dataProvider.getCommitData())
.always( (data) => {
console.log(data)
})
}
}
}
app/assets/javascripts/merge_request_tabs.js
View file @
8b6a075e
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
if
(
action
===
'show'
)
{
if
(
action
===
'show'
)
{
action
=
'notes'
;
action
=
'notes'
;
}
}
new_state
=
this
.
_location
.
pathname
.
replace
(
/
\/(
commits|diffs|builds
|conflicts
)(\.
html
)?\/?
$/
,
''
);
new_state
=
this
.
_location
.
pathname
.
replace
(
/
\/(
commits|diffs|builds
)(\.
html
)?\/?
$/
,
''
);
if
(
action
!==
'notes'
)
{
if
(
action
!==
'notes'
)
{
new_state
+=
"/"
+
action
;
new_state
+=
"/"
+
action
;
}
}
...
...
app/views/projects/merge_requests/conflicts.html.haml
View file @
8b6a075e
...
@@ -107,10 +107,11 @@
...
@@ -107,10 +107,11 @@
.commit-message-container.form-group
.commit-message-container.form-group
.max-width-marker
.max-width-marker
%textarea
.form-control.js-commit-message
{
":disabled"
=>
"!allResolved"
}
{{{conflictsData.commitMessage}}}
%textarea
.form-control.js-commit-message
{
":disabled"
=>
"!allResolved"
,
"v-model"
=>
"conflictsData.commitMessage"
}
{{{conflictsData.commitMessage}}}
%button
{
type:
'button'
,
class:
'btn btn-success js-submit-button'
,
":disabled"
=>
"!allResolved"
}
%button
{
type:
'button'
,
class:
'btn btn-success js-submit-button'
,
":disabled"
=>
"!allResolved"
,
"@click"
=>
"commit()"
}
Commit conflict resolution
Commit conflict resolution
%button
{
type:
'button'
,
class:
'btn btn-cancel'
}
/
%button{type: 'button', class: 'btn btn-cancel'}
Cancel
/
Cancel
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