diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-18 21:07:37 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-18 21:07:37 +0000 |
commit | 7f8330873c1a5860b8a9a52d111083a65d210249 (patch) | |
tree | e6c7019f2942b8d2fff313545b7cb4bb996b6870 /app | |
parent | bbe243060399191abcba33c7ebd611f6ec34c6cd (diff) | |
download | gitlab-ce-7f8330873c1a5860b8a9a52d111083a65d210249.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
11 files changed, 21 insertions, 23 deletions
diff --git a/app/assets/javascripts/ide/stores/utils.js b/app/assets/javascripts/ide/stores/utils.js index 06e66da1069..47a2e6b5202 100644 --- a/app/assets/javascripts/ide/stores/utils.js +++ b/app/assets/javascripts/ide/stores/utils.js @@ -163,7 +163,7 @@ export const createCommitPayload = ({ }); export const createNewMergeRequestUrl = (projectUrl, source, target) => - `${projectUrl}/-/merge_requests/new?merge_request[source_branch]=${source}&merge_request[target_branch]=${target}&nav_source=webide`; + `${projectUrl}/merge_requests/new?merge_request[source_branch]=${source}&merge_request[target_branch]=${target}&nav_source=webide`; const sortTreesByTypeAndName = (a, b) => { if (a.type === 'tree' && b.type === 'blob') { diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js index 8d09e88e772..52674107df2 100644 --- a/app/assets/javascripts/merge_request_tabs.js +++ b/app/assets/javascripts/merge_request_tabs.js @@ -32,17 +32,17 @@ import { __ } from './locale'; // // <ul class="nav-links merge-request-tabs"> // <li class="notes-tab active"> -// <a data-action="notes" data-target="#notes" data-toggle="tab" href="/foo/bar/-/merge_requests/1"> +// <a data-action="notes" data-target="#notes" data-toggle="tab" href="/foo/bar/merge_requests/1"> // Discussion // </a> // </li> // <li class="commits-tab"> -// <a data-action="commits" data-target="#commits" data-toggle="tab" href="/foo/bar/-/merge_requests/1/commits"> +// <a data-action="commits" data-target="#commits" data-toggle="tab" href="/foo/bar/merge_requests/1/commits"> // Commits // </a> // </li> // <li class="diffs-tab"> -// <a data-action="diffs" data-target="#diffs" data-toggle="tab" href="/foo/bar/-/merge_requests/1/diffs"> +// <a data-action="diffs" data-target="#diffs" data-toggle="tab" href="/foo/bar/merge_requests/1/diffs"> // Diffs // </a> // </li> @@ -260,17 +260,17 @@ export default class MergeRequestTabs { // // Examples: // - // location.pathname # => "/namespace/project/-/merge_requests/1" + // location.pathname # => "/namespace/project/merge_requests/1" // setCurrentAction('diffs') - // location.pathname # => "/namespace/project/-/merge_requests/1/diffs" + // location.pathname # => "/namespace/project/merge_requests/1/diffs" // - // location.pathname # => "/namespace/project/-/merge_requests/1/diffs" + // location.pathname # => "/namespace/project/merge_requests/1/diffs" // setCurrentAction('show') - // location.pathname # => "/namespace/project/-/merge_requests/1" + // location.pathname # => "/namespace/project/merge_requests/1" // - // location.pathname # => "/namespace/project/-/merge_requests/1/diffs" + // location.pathname # => "/namespace/project/merge_requests/1/diffs" // setCurrentAction('commits') - // location.pathname # => "/namespace/project/-/merge_requests/1/commits" + // location.pathname # => "/namespace/project/merge_requests/1/commits" // // Returns the new URL String setCurrentAction(action) { diff --git a/app/assets/javascripts/repository/components/breadcrumbs.vue b/app/assets/javascripts/repository/components/breadcrumbs.vue index e1382aa86d9..f6b9ea5d30d 100644 --- a/app/assets/javascripts/repository/components/breadcrumbs.vue +++ b/app/assets/javascripts/repository/components/breadcrumbs.vue @@ -104,10 +104,10 @@ export default { return acc.concat({ name, path, - to: `/-/tree/${this.ref}${path}`, + to: `/tree/${this.ref}${path}`, }); }, - [{ name: this.projectShortPath, path: '/', to: `/-/tree/${this.ref}/` }], + [{ name: this.projectShortPath, path: '/', to: `/tree/${this.ref}/` }], ); }, canCreateMrFromFork() { diff --git a/app/assets/javascripts/repository/components/table/parent_row.vue b/app/assets/javascripts/repository/components/table/parent_row.vue index 38aa672bc1c..3c39f404226 100644 --- a/app/assets/javascripts/repository/components/table/parent_row.vue +++ b/app/assets/javascripts/repository/components/table/parent_row.vue @@ -15,7 +15,7 @@ export default { const splitArray = this.path.split('/'); splitArray.pop(); - return { path: `/-/tree/${this.commitRef}/${splitArray.join('/')}` }; + return { path: `/tree/${this.commitRef}/${splitArray.join('/')}` }; }, }, methods: { diff --git a/app/assets/javascripts/repository/components/table/row.vue b/app/assets/javascripts/repository/components/table/row.vue index 57dd08c2142..cf0457a2abf 100644 --- a/app/assets/javascripts/repository/components/table/row.vue +++ b/app/assets/javascripts/repository/components/table/row.vue @@ -84,7 +84,7 @@ export default { }, computed: { routerLinkTo() { - return this.isFolder ? { path: `/-/tree/${this.ref}/${this.path}` } : null; + return this.isFolder ? { path: `/tree/${this.ref}/${this.path}` } : null; }, iconName() { return `fa-${getIconName(this.type, this.path)}`; diff --git a/app/assets/javascripts/repository/router.js b/app/assets/javascripts/repository/router.js index fa544444be8..ebf0a7091ea 100644 --- a/app/assets/javascripts/repository/router.js +++ b/app/assets/javascripts/repository/router.js @@ -12,7 +12,7 @@ export default function createRouter(base, baseRef) { base: joinPaths(gon.relative_url_root || '', base), routes: [ { - path: `/-/tree/${baseRef}(/.*)?`, + path: `/tree/${baseRef}(/.*)?`, name: 'treePath', component: TreePage, props: route => ({ diff --git a/app/assets/javascripts/vue_shared/components/diff_viewer/diff_viewer.vue b/app/assets/javascripts/vue_shared/components/diff_viewer/diff_viewer.vue index bf3c3666300..b874bedab36 100644 --- a/app/assets/javascripts/vue_shared/components/diff_viewer/diff_viewer.vue +++ b/app/assets/javascripts/vue_shared/components/diff_viewer/diff_viewer.vue @@ -79,10 +79,10 @@ export default { return this.projectPath.indexOf('/') === 0 ? '' : `${gon.relative_url_root}/`; }, fullOldPath() { - return `${this.basePath}${this.projectPath}/-/raw/${this.oldSha}/${this.oldPath}`; + return `${this.basePath}${this.projectPath}/raw/${this.oldSha}/${this.oldPath}`; }, fullNewPath() { - return `${this.basePath}${this.projectPath}/-/raw/${this.newSha}/${this.newPath}`; + return `${this.basePath}${this.projectPath}/raw/${this.newSha}/${this.newPath}`; }, }, }; diff --git a/app/helpers/submodule_helper.rb b/app/helpers/submodule_helper.rb index e5400652458..4b83988e8bb 100644 --- a/app/helpers/submodule_helper.rb +++ b/app/helpers/submodule_helper.rb @@ -43,8 +43,6 @@ module SubmoduleHelper elsif github_dot_com_url?(url) standard_links('github.com', namespace, project, submodule_item_id) elsif gitlab_dot_com_url?(url) - # This need to be replaced with /-/tree routing once one is landed on - # GitLab.com. Issue https://gitlab.com/gitlab-org/gitlab/issues/42764 standard_links('gitlab.com', namespace, project, submodule_item_id) else [sanitize_submodule_url(url), nil] diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index 0b50b8b1130..af1919eeb40 100644 --- a/app/helpers/tree_helper.rb +++ b/app/helpers/tree_helper.rb @@ -38,13 +38,13 @@ module TreeHelper # many paths, as with a repository tree that has thousands of items. def fast_project_blob_path(project, blob_path) ActionDispatch::Journey::Router::Utils.escape_path( - File.join(relative_url_root, project.path_with_namespace, '-', 'blob', blob_path) + File.join(relative_url_root, project.path_with_namespace, 'blob', blob_path) ) end def fast_project_tree_path(project, tree_path) ActionDispatch::Journey::Router::Utils.escape_path( - File.join(relative_url_root, project.path_with_namespace, '-', 'tree', tree_path) + File.join(relative_url_root, project.path_with_namespace, 'tree', tree_path) ) end diff --git a/app/models/project_services/chat_message/merge_message.rb b/app/models/project_services/chat_message/merge_message.rb index dc62a4c8908..46313ba7bec 100644 --- a/app/models/project_services/chat_message/merge_message.rb +++ b/app/models/project_services/chat_message/merge_message.rb @@ -62,7 +62,7 @@ module ChatMessage end def merge_request_url - "#{project_url}/-/merge_requests/#{merge_request_iid}" + "#{project_url}/merge_requests/#{merge_request_iid}" end # overridden in EE diff --git a/app/models/project_services/hipchat_service.rb b/app/models/project_services/hipchat_service.rb index c92e8ecb31c..019bd54f48c 100644 --- a/app/models/project_services/hipchat_service.rb +++ b/app/models/project_services/hipchat_service.rb @@ -184,7 +184,7 @@ class HipchatService < Service description = obj_attr[:description] title = render_line(obj_attr[:title]) - merge_request_url = "#{project_url}/-/merge_requests/#{merge_request_id}" + merge_request_url = "#{project_url}/merge_requests/#{merge_request_id}" merge_request_link = "<a href=\"#{merge_request_url}\">merge request !#{merge_request_id}</a>" message = ["#{user_name} #{state} #{merge_request_link} in " \ "#{project_link}: <b>#{title}</b>"] |