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); ...@@ -45,6 +45,8 @@ app.get('/', routes.index);
app.get(config.routes.distribution, routes.distribution); app.get(config.routes.distribution, routes.distribution);
if (config.routes.preferences) if (config.routes.preferences)
app.get(config.routes.preferences, 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), var server = http.createServer(app),
io = require('socket.io').listen(server, config.socket); io = require('socket.io').listen(server, config.socket);
......
...@@ -28,6 +28,7 @@ config.routes = {}; ...@@ -28,6 +28,7 @@ config.routes = {};
config.routes.debomatic = '/debomatic'; config.routes.debomatic = '/debomatic';
config.routes.distribution = '/distribution'; config.routes.distribution = '/distribution';
config.routes.preferences = '/preferences'; config.routes.preferences = '/preferences';
config.routes.commands = '/commands';
config.web = {}; config.web = {};
config.web.title = 'Deb-o-Matic web.ui'; config.web.title = 'Deb-o-Matic web.ui';
......
...@@ -13,3 +13,7 @@ exports.distribution = function (req, res) { ...@@ -13,3 +13,7 @@ exports.distribution = function (req, res) {
exports.preferences = function (req, res) { exports.preferences = function (req, res) {
res.render('preferences', config); res.render('preferences', config);
}; };
exports.commands = function (req, res) {
res.render('commands', config);
};
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<link rel="stylesheet" href="/external_libs/bootstrap-3.1.1-dist/css/bootstrap-theme.min.css"> <link rel="stylesheet" href="/external_libs/bootstrap-3.1.1-dist/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="/stylesheets/style.css?<%= version %>"> <link rel="stylesheet" href="/stylesheets/style.css?<%= version %>">
</head> </head>
<body> <body>
<div id="wrapper" class="container-fluid"> <div id="wrapper" class="container-fluid">
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
</div> </div>
<div id="pages"> <div id="pages">
<ul class="nav navbar-nav pull-right"> <ul class="nav navbar-nav pull-right">
<% if (web.paths.commands) { %>
<li><a href="<%= web.paths.commands %>">Commands</a></li>
<% } %>
<% if (web.paths.preferences) { %> <% if (web.paths.preferences) { %>
<li><a href="<%= web.paths.preferences %>">Preferences</a></li> <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