Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
Vestibule
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Nicolas PERNOUD
Vestibule
Commits
0b508144
Commit
0b508144
authored
5 years ago
by
Nicolas Pernoud
Browse files
Options
Downloads
Patches
Plain Diff
fix: code smells
parent
b29b803c
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#6146
passed
5 years ago
Stage: sonar-analysis
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pkg/tokens/tokens_test.go
+1
-1
1 addition, 1 deletion
pkg/tokens/tokens_test.go
web/components/davs/explorer.js
+10
-10
10 additions, 10 deletions
web/components/davs/explorer.js
web/index.html
+17
-15
17 additions, 15 deletions
web/index.html
with
28 additions
and
26 deletions
pkg/tokens/tokens_test.go
+
1
−
1
View file @
0b508144
...
@@ -17,7 +17,7 @@ func (u user) String() string {
...
@@ -17,7 +17,7 @@ func (u user) String() string {
return
fmt
.
Sprintf
(
"Login: %v, Password: %v"
,
u
.
Login
,
u
.
Password
)
return
fmt
.
Sprintf
(
"Login: %v, Password: %v"
,
u
.
Login
,
u
.
Password
)
}
}
func
Test
_m
anager
_
CreateToken
_u
nStoreData
(
t
*
testing
.
T
)
{
func
Test
M
anagerCreateToken
U
nStoreData
(
t
*
testing
.
T
)
{
key
,
_
:=
common
.
GenerateRandomBytes
(
32
)
key
,
_
:=
common
.
GenerateRandomBytes
(
32
)
key2
,
_
:=
common
.
GenerateRandomBytes
(
32
)
key2
,
_
:=
common
.
GenerateRandomBytes
(
32
)
type
fields
struct
{
type
fields
struct
{
...
...
This diff is collapsed.
Click to expand it.
web/components/davs/explorer.js
+
10
−
10
View file @
0b508144
...
@@ -82,9 +82,9 @@ export class Explorer {
...
@@ -82,9 +82,9 @@ export class Explorer {
await
this
.
navigate
(
"
/
"
);
await
this
.
navigate
(
"
/
"
);
}
}
async
navigate
(
p
ath
)
{
async
navigate
(
destP
ath
)
{
if
(
!
p
ath
.
endsWith
(
"
/
"
))
p
ath
+=
"
/
"
;
if
(
!
destP
ath
.
endsWith
(
"
/
"
))
destP
ath
+=
"
/
"
;
this
.
path
=
p
ath
;
this
.
path
=
destP
ath
;
this
.
progress
.
classList
.
remove
(
"
is-hidden
"
);
this
.
progress
.
classList
.
remove
(
"
is-hidden
"
);
try
{
try
{
const
response
=
await
fetch
(
this
.
fullHostname
+
this
.
path
,
{
const
response
=
await
fetch
(
this
.
fullHostname
+
this
.
path
,
{
...
@@ -577,11 +577,11 @@ function parseWebDavResponse(txt) {
...
@@ -577,11 +577,11 @@ function parseWebDavResponse(txt) {
return
files
.
sort
(
fileSortFunction
);
return
files
.
sort
(
fileSortFunction
);
}
}
function
goUp
(
p
ath
)
{
function
goUp
(
destP
ath
)
{
if
(
p
ath
===
"
/
"
)
return
p
ath
;
if
(
destP
ath
===
"
/
"
)
return
destP
ath
;
if
(
p
ath
.
endsWith
(
"
/
"
))
p
ath
=
p
ath
.
substring
(
0
,
p
ath
.
length
-
1
);
if
(
destP
ath
.
endsWith
(
"
/
"
))
destP
ath
=
destP
ath
.
substring
(
0
,
destP
ath
.
length
-
1
);
const
lastSlashPosition
=
p
ath
.
lastIndexOf
(
"
/
"
);
const
lastSlashPosition
=
destP
ath
.
lastIndexOf
(
"
/
"
);
return
lastSlashPosition
===
0
?
"
/
"
:
p
ath
.
substring
(
0
,
lastSlashPosition
+
1
);
return
lastSlashPosition
===
0
?
"
/
"
:
destP
ath
.
substring
(
0
,
lastSlashPosition
+
1
);
}
}
function
sizeToHuman
(
size
)
{
function
sizeToHuman
(
size
)
{
...
@@ -625,6 +625,6 @@ export async function LoadImage(image, url, user) {
...
@@ -625,6 +625,6 @@ export async function LoadImage(image, url, user) {
}
}
}
}
function
path
(
p
ath
,
name
)
{
function
path
(
destP
ath
,
name
)
{
return
p
ath
+
encodeURIComponent
(
name
);
return
destP
ath
+
encodeURIComponent
(
name
);
}
}
This diff is collapsed.
Click to expand it.
web/index.html
+
17
−
15
View file @
0b508144
<!DOCTYPE html>
<!DOCTYPE html>
<html
lang=
"en"
class=
"has-navbar-fixed-top"
>
<html
lang=
"en"
class=
"has-navbar-fixed-top"
>
<title>
Vestibule
</title>
<head>
<meta
charset=
"UTF-8"
/>
<title>
Vestibule
</title>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<meta
charset=
"UTF-8"
/>
<link
rel=
"icon"
href=
"assets/brand/icons/icon-152x152.png"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<link
rel=
"manifest"
href=
"assets/brand/manifest.json"
/>
<link
rel=
"icon"
href=
"assets/brand/icons/icon-152x152.png"
/>
<link
rel=
"stylesheet"
href=
"assets/bulma.min.css"
/>
<link
rel=
"manifest"
href=
"assets/brand/manifest.json"
/>
<link
rel=
"stylesheet"
href=
"assets/animate.css"
/>
<link
rel=
"stylesheet"
href=
"assets/bulma.min.css"
/>
<style>
<link
rel=
"stylesheet"
href=
"assets/animate.css"
/>
:root
{
<style>
--animate-duration
:
0.25s
;
:root
{
}
--animate-duration
:
0.25s
;
</style>
}
<script
defer
src=
"assets/fontawesome/solid.min.js"
></script>
</style>
<script
defer
src=
"assets/fontawesome/fontawesome.min.js"
></script>
<script
defer
src=
"assets/fontawesome/solid.min.js"
></script>
<script
defer
type=
"module"
src=
"main.js"
></script>
<script
defer
src=
"assets/fontawesome/fontawesome.min.js"
></script>
<script
defer
type=
"module"
src=
"main.js"
></script>
</head>
<body>
<body>
<!-- Navbar -->
<!-- Navbar -->
<nav
id=
"navbar"
class=
"navbar is-fixed-top"
role=
"navigation"
aria-label=
"main navigation"
></nav>
<nav
id=
"navbar"
class=
"navbar is-fixed-top"
role=
"navigation"
aria-label=
"main navigation"
></nav>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment