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
a8a51f69
Commit
a8a51f69
authored
Mar 09, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made routes configurable
parent
28541eec
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
9 deletions
+15
-9
debomatic-webui/index.js
debomatic-webui/index.js
+3
-3
debomatic-webui/lib/config.js
debomatic-webui/lib/config.js
+5
-1
debomatic-webui/public/javascripts/main.js
debomatic-webui/public/javascripts/main.js
+2
-2
debomatic-webui/views/layout.ejs
debomatic-webui/views/layout.ejs
+5
-3
No files found.
debomatic-webui/index.js
View file @
a8a51f69
...
...
@@ -21,8 +21,8 @@ app.configure(function(){
app
.
use
(
express
.
methodOverride
());
app
.
use
(
app
.
router
);
app
.
use
(
express
.
static
(
__dirname
+
'
/public
'
));
app
.
use
(
config
.
debomatic
.
webpath
,
express
.
directory
(
config
.
debomatic
.
path
));
app
.
use
(
config
.
debomatic
.
webpath
,
express
.
static
(
config
.
debomatic
.
path
));
app
.
use
(
config
.
routes
.
debomatic
,
express
.
directory
(
config
.
debomatic
.
path
));
app
.
use
(
config
.
routes
.
debomatic
,
express
.
static
(
config
.
debomatic
.
path
));
});
app
.
configure
(
'
development
'
,
function
(){
...
...
@@ -37,7 +37,7 @@ var io = require('socket.io').listen(app);
// Routes
app
.
get
(
'
/
'
,
routes
.
index
);
app
.
get
(
'
/distribution
'
,
routes
.
distribution
)
app
.
get
(
config
.
routes
.
distribution
,
routes
.
distribution
)
io
.
sockets
.
on
(
'
connection
'
,
function
(
socket
)
{
send
.
distributions
(
socket
);
...
...
debomatic-webui/lib/config.js
View file @
a8a51f69
...
...
@@ -5,12 +5,16 @@ config.port = 3000
config
.
debomatic
=
{}
config
.
debomatic
.
path
=
'
/srv/debomatic-amd64
'
config
.
debomatic
.
webpath
=
'
/debomatic
'
config
.
routes
=
{}
config
.
routes
.
debomatic
=
'
/debomatic
'
config
.
routes
.
distribution
=
'
/distribution
'
config
.
web
=
{}
config
.
web
.
title
=
"
deb-o-matic web.ui
"
config
.
web
.
description
=
"
This is a web interface for debomatic
"
config
.
web
.
footer
=
"
Fork me on github.com
"
config
.
web
.
autoscroll
=
true
config
.
web
.
paths
=
config
.
routes
module
.
exports
=
config
debomatic-webui/public/javascripts/main.js
View file @
a8a51f69
...
...
@@ -4,11 +4,11 @@ var socket = io.connect('//localhost:3000');
socket
.
on
(
'
distributions
'
,
function
(
distributions
)
{
$
(
'
#distributions ul
'
).
html
(
''
);
distributions
.
forEach
(
function
(
name
){
$
(
'
#distributions ul
'
).
append
(
'
<li id="distribution-
'
+
name
+
'
"><a href="
/distribution#
'
+
name
+
'
">
'
+
name
+
'
</li>
'
);
$
(
'
#distributions ul
'
).
append
(
'
<li id="distribution-
'
+
name
+
'
"><a href="
'
+
DISTRIBUTION_PAGE
+
'
#
'
+
name
+
'
">
'
+
name
+
'
</li>
'
);
});
});
if
(
window
.
location
.
pathname
==
'
/distribution
'
)
{
if
(
window
.
location
.
pathname
==
DISTRIBUTION_PAGE
)
{
function
__check_hash_has_sense
()
{
info
=
window
.
location
.
hash
.
split
(
'
/
'
)
...
...
debomatic-webui/views/layout.ejs
View file @
a8a51f69
...
...
@@ -11,12 +11,14 @@
<script
src=
'/socket.io/socket.io.js'
></script>
<script
src=
"/libs/bootstrap/3.1.1/js/bootstrap.min.js"
></script>
<script
src=
'/javascripts/utils.js'
></script>
<script
src=
'/javascripts/page_distribution.js'
></script>
<script
src=
'/javascripts/main.js'
></script>
<script>
var
AUTOSCROLL
=
<%=
autoscroll
%>
var
DISTRIBUTION_PAGE
=
'
<%= paths.distribution %>
'
</script>
<script
src=
'/javascripts/utils.js'
></script>
<script
src=
'/javascripts/page_distribution.js'
></script>
<script
src=
'/javascripts/main.js'
></script>
</head>
<body>
<div
class=
"container-fluid"
>
...
...
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