Don’t hardcode paths
This commit is contained in:
parent
add01596cf
commit
4d7c201414
3 changed files with 5 additions and 6 deletions
|
@ -45,7 +45,7 @@ window.MergeConflictResolver = class MergeConflictResolver {
|
|||
fetchData() {
|
||||
const dp = this.dataProvider;
|
||||
|
||||
$.get('./conflicts.json')
|
||||
$.get($('#conflicts').data('conflictsPath'))
|
||||
.done((data) => {
|
||||
dp.decorateData(this.vue, data);
|
||||
})
|
||||
|
@ -69,7 +69,7 @@ window.MergeConflictResolver = class MergeConflictResolver {
|
|||
commit() {
|
||||
this.vue.isSubmitting = true;
|
||||
|
||||
$.post('./resolve_conflicts', this.dataProvider.getCommitData())
|
||||
$.post($('#conflicts').data('resolveConflictsPath'), this.dataProvider.getCommitData())
|
||||
.done((data) => {
|
||||
window.location.href = data.redirect_to;
|
||||
})
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
|
||||
= render 'shared/issuable/sidebar', issuable: @merge_request
|
||||
|
||||
#conflicts{"v-cloak" => "true"}
|
||||
#conflicts{"v-cloak" => "true", data: { conflicts_path: conflicts_namespace_project_merge_request_path(@merge_request.project.namespace, @merge_request.project, @merge_request, format: :json),
|
||||
resolve_conflicts_path: resolve_conflicts_namespace_project_merge_request_path(@merge_request.project.namespace, @merge_request.project, @merge_request) } }
|
||||
.loading{"v-if" => "isLoading"}
|
||||
%i.fa.fa-spinner.fa-spin
|
||||
|
||||
|
|
|
@ -13,6 +13,4 @@
|
|||
%span Commit conflict resolution
|
||||
%a.fa.fa-spin.fa-spinner{":class" => "{'hidden': !isSubmitting}"}
|
||||
|
||||
/ FIXME: Hardcoded path
|
||||
%a.btn.btn-cancel{"href" => "diffs"}
|
||||
Cancel
|
||||
= link_to "Cancel", namespace_project_merge_request_path(@merge_request.project.namespace, @merge_request.project, @merge_request), class: "btn btn-cancel"
|
||||
|
|
Loading…
Reference in a new issue