diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-26 00:08:32 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-26 00:08:32 +0300 |
commit | aadc5da1b1ccba52944e6df0f2173fad5d3fe675 (patch) | |
tree | 3b43f157e9117be6713fc0c79014878e06308c6e /app/assets/javascripts/projects | |
parent | 0599ea8fb389d70cab67a78e80d61eadc6aeaaff (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/projects')
-rw-r--r-- | app/assets/javascripts/projects/compare/components/app.vue | 20 | ||||
-rw-r--r-- | app/assets/javascripts/projects/compare/index.js | 12 |
2 files changed, 22 insertions, 10 deletions
diff --git a/app/assets/javascripts/projects/compare/components/app.vue b/app/assets/javascripts/projects/compare/components/app.vue index bda58091b97..4ba7156b026 100644 --- a/app/assets/javascripts/projects/compare/components/app.vue +++ b/app/assets/javascripts/projects/compare/components/app.vue @@ -15,7 +15,11 @@ export default { type: String, required: true, }, - refsProjectPath: { + sourceProjectRefsPath: { + type: String, + required: true, + }, + targetProjectRefsPath: { type: String, required: true, }, @@ -37,7 +41,11 @@ export default { type: String, required: true, }, - defaultProject: { + sourceProject: { + type: Object, + required: true, + }, + targetProject: { type: Object, required: true, }, @@ -50,14 +58,14 @@ export default { return { from: { projects: this.projects, - selectedProject: this.defaultProject, + selectedProject: this.targetProject, revision: this.paramsFrom, - refsProjectPath: this.refsProjectPath, + refsProjectPath: this.targetProjectRefsPath, }, to: { - selectedProject: this.defaultProject, + selectedProject: this.sourceProject, revision: this.paramsTo, - refsProjectPath: this.refsProjectPath, + refsProjectPath: this.sourceProjectRefsPath, }, }; }, diff --git a/app/assets/javascripts/projects/compare/index.js b/app/assets/javascripts/projects/compare/index.js index e485a086d39..074b8565c3c 100644 --- a/app/assets/javascripts/projects/compare/index.js +++ b/app/assets/javascripts/projects/compare/index.js @@ -5,13 +5,15 @@ export default function init() { const el = document.getElementById('js-compare-selector'); const { - refsProjectPath, + sourceProjectRefsPath, + targetProjectRefsPath, paramsFrom, paramsTo, projectCompareIndexPath, projectMergeRequestPath, createMrPath, - projectTo, + sourceProject, + targetProject, projectsFrom, } = el.dataset; @@ -23,13 +25,15 @@ export default function init() { render(createElement) { return createElement(CompareApp, { props: { - refsProjectPath, + sourceProjectRefsPath, + targetProjectRefsPath, paramsFrom, paramsTo, projectCompareIndexPath, projectMergeRequestPath, createMrPath, - defaultProject: JSON.parse(projectTo), + sourceProject: JSON.parse(sourceProject), + targetProject: JSON.parse(targetProject), projects: JSON.parse(projectsFrom), }, }); |