Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2019-11-02 00:06:19 +00:00
parent 9c4066878f
commit 2af6d2c437
4 changed files with 6 additions and 3 deletions

View File

@ -37,7 +37,7 @@ export function fetchLogsTree(client, path, offset, resolver = null) {
const { ref } = client.readQuery({ query: getRef });
fetchpromise = axios
.get(`${gon.gitlab_url}/${projectPath}/refs/${ref}/logs_tree${path ? `/${path}` : ''}`, {
.get(`${gon.gitlab_url}/${projectPath}/refs/${ref}/logs_tree/${path.replace(/^\//, '')}`, {
params: { format: 'json', offset },
})
.then(({ data, headers }) => {

View File

@ -16,7 +16,7 @@ export default function createRouter(base, baseRef) {
name: 'treePath',
component: TreePage,
props: route => ({
path: route.params.pathMatch && route.params.pathMatch.replace(/^\//, ''),
path: route.params.pathMatch && (route.params.pathMatch.replace(/^\//, '') || '/'),
}),
},
{

View File

@ -7080,6 +7080,9 @@ msgstr ""
msgid "FeatureFlags|Get started with feature flags"
msgstr ""
msgid "FeatureFlags|ID"
msgstr ""
msgid "FeatureFlags|Inactive"
msgstr ""

View File

@ -81,7 +81,7 @@ describe('fetchLogsTree', () => {
it('calls axios get', () =>
fetchLogsTree(client, '', '0', resolver).then(() => {
expect(axios.get).toHaveBeenCalledWith(
'https://test.com/gitlab-org/gitlab-foss/refs/master/logs_tree',
'https://test.com/gitlab-org/gitlab-foss/refs/master/logs_tree/',
{ params: { format: 'json', offset: '0' } },
);
}));