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
83943f6e
Commit
83943f6e
authored
Sep 05, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add packages history page
parent
11007a6c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
1 deletion
+62
-1
debomatic-webui/lib/app.coffee
debomatic-webui/lib/app.coffee
+4
-0
debomatic-webui/lib/config.coffee
debomatic-webui/lib/config.coffee
+1
-0
debomatic-webui/routes/index.coffee
debomatic-webui/routes/index.coffee
+20
-1
debomatic-webui/views/header.ejs
debomatic-webui/views/header.ejs
+3
-0
debomatic-webui/views/history.ejs
debomatic-webui/views/history.ejs
+34
-0
No files found.
debomatic-webui/lib/app.coffee
View file @
83943f6e
...
...
@@ -42,6 +42,10 @@ if config.routes.preferences
if
config
.
routes
.
commands
app
.
get
(
config
.
routes
.
commands
,
routes
.
commands
)
# history page
if
config
.
routes
.
history
app
.
get
(
config
.
routes
.
history
,
routes
.
history
)
# debomatic static page
if
config
.
routes
.
debomatic
chroot_forbidden
=
(
res
)
->
...
...
debomatic-webui/lib/config.coffee
View file @
83943f6e
...
...
@@ -98,6 +98,7 @@ config.routes.debomatic = "/debomatic"
config
.
routes
.
distribution
=
"/distribution"
config
.
routes
.
preferences
=
"/preferences"
config
.
routes
.
commands
=
"/commands"
config
.
routes
.
history
=
"/history"
###
The events
...
...
debomatic-webui/routes/index.coffee
View file @
83943f6e
"use strict"
glob
=
require
(
"glob"
)
config
=
require
(
"../lib/config"
)
fs
=
require
(
"fs"
)
exports
.
index
=
(
req
,
res
)
->
res
.
render
"index"
,
config
return
...
...
@@ -15,3 +17,20 @@ exports.preferences = (req, res) ->
exports
.
commands
=
(
req
,
res
)
->
res
.
render
"commands"
,
config
return
exports
.
history
=
(
req
,
res
)
->
glob
"
#{
config
.
debomatic
.
path
}
/*/pool/*/*.json"
,
{},
(
err
,
files
)
->
get_info
=
(
json_path
)
->
json
=
JSON
.
parse
(
fs
.
readFileSync
(
json_path
,
'utf8'
))
delete
json
.
files
return
json
compare
=
(
a
,
b
)
->
if
a
.
end
<
b
.
end
return
-
1
if
a
.
end
>
b
.
end
return
1
return
0
config
.
history
=
(
get_info
(
f
)
for
f
in
files
)
config
.
history
.
sort
(
compare
)
res
.
render
"history"
,
config
debomatic-webui/views/header.ejs
View file @
83943f6e
...
...
@@ -22,6 +22,9 @@
</div>
<div
id=
"pages"
>
<ul
class=
"nav navbar-nav pull-right"
>
<
%
if
(
web
.
paths
.
history
)
{
%
>
<li><a
href=
"<%= web.paths.history %>"
>
History
</a></li>
<
%
}
%
>
<
%
if
(
web
.
paths
.
commands
)
{
%
>
<li><a
href=
"<%= web.paths.commands %>"
>
Commands
</a></li>
<
%
}
%
>
...
...
debomatic-webui/views/history.ejs
0 → 100644
View file @
83943f6e
<% include header.ejs %>
<article class="page">
<header><h2>History</h2></header>
<p class="lead text-muted">
The log of packages
</p>
<table class="table table-bordered table-striped">
<% console.log(history) %>
<thead>
<tr>
<th>Distribution</th>
<th>Package</th>
<th>Uploader</th>
<th>Start</th>
<th>End</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<% for (var i=0; i < history.length; i++) { %>
<tr>
<td><%= history[i].distribution %> </td>
<td><%= history[i].package %></td>
<td><%= history[i].ploader %></td>
<td><%= history[i].start %></td>
<td><%= history[i].end %></td>
<td><%= history[i].success %></td>
</tr>
<% } %>
</tbody>
</table>
</article>
<% include footer.ejs %>
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