diff --git a/pm2-gui.ini b/pm2-gui.ini index 7e4b6bd..9134c03 100644 --- a/pm2-gui.ini +++ b/pm2-gui.ini @@ -52,7 +52,7 @@ level = info ; ; This authorization will be used to authorize socket / web connections if it's set. ; -;authorization = AuTh +authorization = qwe ; ; A value indicates whether agent offline or not. ; diff --git a/web/public/css/auth.css b/web/public/css/auth.css index d248c73..8cfbe79 100644 --- a/web/public/css/auth.css +++ b/web/public/css/auth.css @@ -9,7 +9,7 @@ body { letter-spacing: 0.5px; height: 100%; -webkit-text-size-adjust: none; - background: transparent url(/img/carbon.png) 0 0 repeat; + background: transparent url(/processes/img/carbon.png) 0 0 repeat; } .load { diff --git a/web/public/js/auth.html.js b/web/public/js/auth.html.js index 2a1b28a..94f6243 100644 --- a/web/public/js/auth.html.js +++ b/web/public/js/auth.html.js @@ -45,7 +45,7 @@ function login() { if (res.error) { return info(res.error); } else { - window.location.href = '/'; + window.location.href = '/processes/'; } } }); diff --git a/web/routes/index.js b/web/routes/index.js index b146601..f0951b4 100644 --- a/web/routes/index.js +++ b/web/routes/index.js @@ -1,10 +1,10 @@ var _ = require('lodash') var Monitor = require('../../lib/monitor') - +var baseUrl = '/processes' // Authorization action(function auth (req, res) { if (!req._config.agent || (req._config.agent.authorization === req.session['authorization'])) { - return res.redirect('/') + return res.redirect(baseUrl + '/') } res.render('auth', { title: 'Authorization' @@ -14,7 +14,7 @@ action(function auth (req, res) { // Index action(function (req, res) { if (req._config.agent && (req._config.agent.authorization !== req.session['authorization'])) { - return res.redirect('/auth') + return res.redirect(baseUrl + '/auth') } var options = _.clone(req._config) var q = Monitor.available(_.extend(options, { diff --git a/web/templates/layouts/default.jade b/web/templates/layouts/default.jade index b8e8272..94ea5ad 100644 --- a/web/templates/layouts/default.jade +++ b/web/templates/layouts/default.jade @@ -1,14 +1,15 @@ doctype html html(lang=en) head + base(href="/processes/") meta(charset='UTF-8') title= title + '- PM2 Monitor' meta(name='viewport', content='width=device-width, initial-scale=1.0, maximum-scale=2.0') - link(rel='stylesheet', href='/css/bootstrap.min.css') - link(rel='stylesheet', href='/css/jquery.sticky.min.css') - link(rel='stylesheet', href='/css/animation.min.css') - link(rel='stylesheet', href='/css/jquery.avgrund.min.css') - link(rel='shortcut icon' href='/img/favicon.ico') + link(rel='stylesheet', href='/processes/css/bootstrap.min.css') + link(rel='stylesheet', href='/processes/css/jquery.sticky.min.css') + link(rel='stylesheet', href='/processes/css/animation.min.css') + link(rel='stylesheet', href='/processes/css/jquery.avgrund.min.css') + link(rel='shortcut icon' href='/processes/img/favicon.ico') block head - var bodyClassName = ''; diff --git a/web/templates/views/index.jade b/web/templates/views/index.jade index 4b7f587..847d8a4 100644 --- a/web/templates/views/index.jade +++ b/web/templates/views/index.jade @@ -1,14 +1,13 @@ extends ../layouts/default block head - link(rel='stylesheet', href='/css/jquery.fullPage.css') - link(rel='stylesheet', href='/css/index.css') + link(rel='stylesheet', href='/processes/css/jquery.fullPage.css') + link(rel='stylesheet', href='/processes/css/index.css') block content #fullpage .section .repo.bounceInDown - a(href='https://github.com/Tjatse/pm2-gui', target='_blank') Github Repo span .polar-usage .system-info