Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
20abacca
Commit
20abacca
authored
Apr 20, 2020
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
parent
8bdbf220
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
13 deletions
+43
-13
app/assets/javascripts/repository/components/breadcrumbs.vue
app/assets/javascripts/repository/components/breadcrumbs.vue
+2
-2
app/assets/javascripts/repository/components/table/parent_row.vue
...ts/javascripts/repository/components/table/parent_row.vue
+2
-1
app/assets/javascripts/repository/components/table/row.vue
app/assets/javascripts/repository/components/table/row.vue
+1
-1
app/assets/javascripts/repository/router.js
app/assets/javascripts/repository/router.js
+1
-1
spec/features/projects/files/user_browses_files_spec.rb
spec/features/projects/files/user_browses_files_spec.rb
+28
-0
spec/frontend/repository/router_spec.js
spec/frontend/repository/router_spec.js
+9
-8
No files found.
app/assets/javascripts/repository/components/breadcrumbs.vue
View file @
20abacca
...
...
@@ -108,14 +108,14 @@ export default {
return
acc
.
concat
({
name
,
path
,
to
:
`/-/tree/
${
joinPaths
(
e
ncodeURIComponent
(
this
.
ref
),
path
)}
`
,
to
:
`/-/tree/
${
joinPaths
(
e
scapeFileUrl
(
this
.
ref
),
path
)}
`
,
});
},
[
{
name
:
this
.
projectShortPath
,
path
:
'
/
'
,
to
:
`/-/tree/
${
e
ncodeURIComponent
(
this
.
ref
)}
/`
,
to
:
`/-/tree/
${
e
scapeFileUrl
(
this
.
ref
)}
/`
,
},
],
);
...
...
app/assets/javascripts/repository/components/table/parent_row.vue
View file @
20abacca
<
script
>
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
escapeFileUrl
}
from
'
~/lib/utils/url_utility
'
;
export
default
{
components
:
{
...
...
@@ -28,7 +29,7 @@ export default {
return
splitArray
.
map
(
p
=>
encodeURIComponent
(
p
)).
join
(
'
/
'
);
},
parentRoute
()
{
return
{
path
:
`/-/tree/
${
e
ncodeURIComponent
(
this
.
commitRef
)}
/
${
this
.
parentPath
}
`
};
return
{
path
:
`/-/tree/
${
e
scapeFileUrl
(
this
.
commitRef
)}
/
${
this
.
parentPath
}
`
};
},
},
methods
:
{
...
...
app/assets/javascripts/repository/components/table/row.vue
View file @
20abacca
...
...
@@ -99,7 +99,7 @@ export default {
computed
:
{
routerLinkTo
()
{
return
this
.
isFolder
?
{
path
:
`/-/tree/
${
e
ncodeURIComponent
(
this
.
ref
)}
/
${
escapeFileUrl
(
this
.
path
)}
`
}
?
{
path
:
`/-/tree/
${
e
scapeFileUrl
(
this
.
ref
)}
/
${
escapeFileUrl
(
this
.
path
)}
`
}
:
null
;
},
isFolder
()
{
...
...
app/assets/javascripts/repository/router.js
View file @
20abacca
...
...
@@ -12,7 +12,7 @@ export default function createRouter(base, baseRef) {
base
:
joinPaths
(
gon
.
relative_url_root
||
''
,
base
),
routes
:
[
{
path
:
`(/-)?/tree/(
${
encodeURIComponent
(
baseRef
)}
|
${
baseRef
}
)/:path*`
,
path
:
`(/-)?/tree/(
${
encodeURIComponent
(
baseRef
)
.
replace
(
/%2F/g
,
'
/
'
)
}
|
${
baseRef
}
)/:path*`
,
name
:
'
treePath
'
,
component
:
TreePage
,
props
:
route
=>
({
...
...
spec/features/projects/files/user_browses_files_spec.rb
View file @
20abacca
...
...
@@ -180,6 +180,20 @@ describe "User browses files" do
expect
(
page
).
to
have_content
(
"VERSION"
)
.
and
have_content
(
".gitignore"
)
.
and
have_content
(
"LICENSE"
)
click_link
(
"files"
)
page
.
within
(
'.repo-breadcrumb'
)
do
expect
(
page
).
to
have_link
(
'files'
)
end
click_link
(
"html"
)
page
.
within
(
'.repo-breadcrumb'
)
do
expect
(
page
).
to
have_link
(
'html'
)
end
expect
(
page
).
to
have_link
(
'500.html'
)
end
end
...
...
@@ -193,6 +207,20 @@ describe "User browses files" do
expect
(
page
).
to
have_content
(
"VERSION"
)
.
and
have_content
(
".gitignore"
)
.
and
have_content
(
"LICENSE"
)
click_link
(
"files"
)
page
.
within
(
'.repo-breadcrumb'
)
do
expect
(
page
).
to
have_link
(
'files'
)
end
click_link
(
"html"
)
page
.
within
(
'.repo-breadcrumb'
)
do
expect
(
page
).
to
have_link
(
'html'
)
end
expect
(
page
).
to
have_link
(
'500.html'
)
end
end
...
...
spec/frontend/repository/router_spec.js
View file @
20abacca
...
...
@@ -4,14 +4,15 @@ import createRouter from '~/repository/router';
describe
(
'
Repository router spec
'
,
()
=>
{
it
.
each
`
path | component | componentName
${
'
/
'
}
|
${
IndexPage
}
|
${
'
IndexPage
'
}
${
'
/tree/master
'
}
|
${
TreePage
}
|
${
'
TreePage
'
}
${
'
/-/tree/master
'
}
|
${
TreePage
}
|
${
'
TreePage
'
}
${
'
/-/tree/master/app/assets
'
}
|
${
TreePage
}
|
${
'
TreePage
'
}
${
'
/-/tree/123/app/assets
'
}
|
${
null
}
|
${
'
null
'
}
`
(
'
sets component as $componentName for path "$path"
'
,
({
path
,
component
})
=>
{
const
router
=
createRouter
(
''
,
'
master
'
);
path | branch | component | componentName
${
'
/
'
}
|
${
'
master
'
}
|
${
IndexPage
}
|
${
'
IndexPage
'
}
${
'
/tree/master
'
}
|
${
'
master
'
}
|
${
TreePage
}
|
${
'
TreePage
'
}
${
'
/-/tree/master
'
}
|
${
'
master
'
}
|
${
TreePage
}
|
${
'
TreePage
'
}
${
'
/-/tree/master/app/assets
'
}
|
${
'
master
'
}
|
${
TreePage
}
|
${
'
TreePage
'
}
${
'
/-/tree/feature/test-%23/app/assets
'
}
|
${
'
feature/test-#
'
}
|
${
TreePage
}
|
${
'
TreePage
'
}
${
'
/-/tree/123/app/assets
'
}
|
${
'
master
'
}
|
${
null
}
|
${
'
null
'
}
`
(
'
sets component as $componentName for path "$path"
'
,
({
path
,
component
,
branch
})
=>
{
const
router
=
createRouter
(
''
,
branch
);
const
componentsForRoute
=
router
.
getMatchedComponents
(
path
);
...
...
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