Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
debomatic-webui
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
debomatic-webui-admins
debomatic-webui
Commits
87eef9f0
Commit
87eef9f0
authored
Aug 29, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'github/master' into portable
parents
0bfc52d3
cd7f5c26
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
21 deletions
+24
-21
History.md
History.md
+1
-0
debomatic-webui/lib/app.coffee
debomatic-webui/lib/app.coffee
+20
-18
debomatic-webui/public/stylesheets/style.css
debomatic-webui/public/stylesheets/style.css
+3
-3
No files found.
History.md
View file @
87eef9f0
...
...
@@ -2,6 +2,7 @@
*
[new] [module] add parser for blhc log file
*
[new] show file size for package files
*
[new] disable autoscroll pressing on "back on top" panel
*
[new] log files can be now showed directly in the browsers
*
[fix] [module] use readline while parsing piuparts log file
*
[fix] add support to sourceupload.changes
*
[fix] add support to source format 1.0 - closes #6
...
...
debomatic-webui/lib/app.coffee
View file @
87eef9f0
...
...
@@ -5,6 +5,7 @@ app = module.exports = require("express")()
server
=
require
(
"http"
).
createServer
(
app
)
io
=
require
(
"socket.io"
)(
server
)
path
=
require
(
"path"
)
serve_static
=
require
(
"serve-static"
)
serve_index
=
require
(
"serve-index"
)
errorhandler
=
require
(
"errorhandler"
)
...
...
@@ -44,25 +45,26 @@ if config.routes.commands
# debomatic static page
if
config
.
routes
.
debomatic
app
.
all
config
.
routes
.
debomatic
+
"*"
,
(
req
,
res
,
next
)
->
# send 403 status when users want to browse the chroots:
# - unstable/unstable
# - unstable/build/*
# this prevents system crashes
base
=
config
.
routes
.
debomatic
base
+=
"/"
if
base
[
base
.
length
-
1
]
isnt
"/"
# append /
match
=
req
.
url
.
replace
(
base
,
""
).
split
(
"/"
)
match
.
pop
()
if
match
[
match
.
length
-
1
]
is
""
if
match
.
length
>=
2
and
((
match
[
0
]
is
match
[
1
])
or
# case unstable/unstable
(
match
[
1
]
is
"build"
and
match
.
length
>
2
))
# case unstable/build/*
res
.
status
(
403
).
send
"""<h1>403 Forbidden</h1>
<h2>You cannot see the chroot internals</h2>
"""
else
# call next() here to move on to next middleware/router
chroot_forbidden
=
(
res
)
->
res
.
status
(
403
).
send
"""<h1>403 Forbidden</h1>
<h2>You cannot see the chroot internals</h2>"""
app
.
get
config
.
routes
.
debomatic
+
'/:distribution/:subdir'
,
(
req
,
res
,
next
)
->
if
req
.
params
.
distribution
==
req
.
params
.
subdir
chroot_forbidden
(
res
)
else
next
()
return
app
.
get
config
.
routes
.
debomatic
+
'/:distribution/build/:subdir'
,
(
req
,
res
)
->
chroot_forbidden
(
res
)
app
.
get
config
.
routes
.
debomatic
+
'/:distribution/logs/:file'
,
(
req
,
res
)
->
distribution
=
req
.
params
.
distribution
file
=
req
.
params
.
file
full_path
=
path
.
join
(
config
.
debomatic
.
path
,
distribution
,
'logs'
,
file
)
res
.
set
(
'Content-Type'
,
'text/plain'
)
res
.
sendFile
(
full_path
)
app
.
use
(
config
.
routes
.
debomatic
,
serve_static
(
config
.
debomatic
.
path
))
app
.
use
(
config
.
routes
.
debomatic
,
serve_index
(
config
.
debomatic
.
path
,
...
...
debomatic-webui/public/stylesheets/style.css
View file @
87eef9f0
...
...
@@ -65,15 +65,15 @@ pre {
margin
:
10px
;
}
aside
.nav-pills
li
{
aside
#sidebar
.nav-pills
li
{
line-height
:
10px
;
}
#sidebar
{
aside
#sidebar
{
position
:
relative
;
}
#sidebar
.fixed
{
aside
#sidebar
.fixed
{
position
:
fixed
;
min-width
:
220px
!important
;
top
:
0
;
...
...
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