Commit 3cb69228e88227f3c6c7f749bca337c3158e0b9c
1 parent
5844c8d4d7
Exists in
master
relayout with panel
Showing 2 changed files with 10 additions and 0 deletions Side-by-side Diff
index.js
... | ... | @@ -30,6 +30,14 @@ function matchedPasswordAndHash(password, hash) { |
30 | 30 | return (hash == sha256sum.digest('hex')) |
31 | 31 | } |
32 | 32 | |
33 | +function renderDashboard(req, res) { | |
34 | + res.render('dashboard.html', { | |
35 | + gateway_name: config.globals.gateway_name, | |
36 | + title: 'Dashboard', | |
37 | + config: config, | |
38 | + }); | |
39 | +} | |
40 | + | |
33 | 41 | function renderConfigIndex(req, res) { |
34 | 42 | |
35 | 43 | masked = ['config.expresso.password']; |
... | ... | @@ -277,6 +285,7 @@ function createServer() { |
277 | 285 | }); |
278 | 286 | |
279 | 287 | app.get('/', loggedIn, function(req, res) { res.redirect('/runtime-info'); }); |
288 | + app.get('/dashboard', loggedIn, renderDashboard); | |
280 | 289 | app.get('/config', loggedIn, renderConfigIndex); |
281 | 290 | app.get('/login', renderLoginPage); |
282 | 291 | app.post('/login', passport.authenticate('local', { successRedirect: '/', failureRedirect: '/login' })); |
views/layout-with-topbar.html
... | ... | @@ -40,6 +40,7 @@ |
40 | 40 | <div id="navbar" class="collapse navbar-collapse"> |
41 | 41 | <ul class="nav navbar-nav"> |
42 | 42 | <li><a href="/">Home</a></li> |
43 | + <li><a href="/dashboard">Dashboard</a></li> | |
43 | 44 | <li><a href="/config">Config</a></li> |
44 | 45 | <li><a href="/runtime-info">Runtime</a></li> |
45 | 46 | <li><a href="/logout">Logout</a></li> |