Commit b75411c6 authored by Leo Iannacone's avatar Leo Iannacone

add commands path and route

parent eaccb988
......@@ -45,6 +45,8 @@ app.get('/', routes.index);
app.get(config.routes.distribution, routes.distribution);
if (config.routes.preferences)
app.get(config.routes.preferences, routes.preferences);
if (config.routes.commands)
app.get(config.routes.commands, routes.commands);
var server = http.createServer(app),
io = require('socket.io').listen(server, config.socket);
......
......@@ -28,6 +28,7 @@ config.routes = {};
config.routes.debomatic = '/debomatic';
config.routes.distribution = '/distribution';
config.routes.preferences = '/preferences';
config.routes.commands = '/commands';
config.web = {};
config.web.title = 'Deb-o-Matic web.ui';
......
......@@ -13,3 +13,7 @@ exports.distribution = function (req, res) {
exports.preferences = function (req, res) {
res.render('preferences', config);
};
exports.commands = function (req, res) {
res.render('commands', config);
};
......@@ -27,6 +27,9 @@
</div>
<div id="pages">
<ul class="nav navbar-nav pull-right">
<% if (web.paths.commands) { %>
<li><a href="<%= web.paths.commands %>">Commands</a></li>
<% } %>
<% if (web.paths.preferences) { %>
<li><a href="<%= web.paths.preferences %>">Preferences</a></li>
<% } %>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment