Compare commits

..

1 Commits

Author SHA1 Message Date
Roman 07c22b7fdb add baseUrl 2017-09-01 20:20:31 +03:00
6 changed files with 14 additions and 14 deletions

View File

@ -52,7 +52,7 @@ level = info
; ;
; This authorization will be used to authorize socket / web connections if it's set. ; 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. ; A value indicates whether agent offline or not.
; ;

View File

@ -9,7 +9,7 @@ body {
letter-spacing: 0.5px; letter-spacing: 0.5px;
height: 100%; height: 100%;
-webkit-text-size-adjust: none; -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 { .load {

View File

@ -45,7 +45,7 @@ function login() {
if (res.error) { if (res.error) {
return info(res.error); return info(res.error);
} else { } else {
window.location.href = '/'; window.location.href = '/processes/';
} }
} }
}); });

View File

@ -1,10 +1,10 @@
var _ = require('lodash') var _ = require('lodash')
var Monitor = require('../../lib/monitor') var Monitor = require('../../lib/monitor')
var baseUrl = '/processes'
// Authorization // Authorization
action(function auth (req, res) { action(function auth (req, res) {
if (!req._config.agent || (req._config.agent.authorization === req.session['authorization'])) { if (!req._config.agent || (req._config.agent.authorization === req.session['authorization'])) {
return res.redirect('/') return res.redirect(baseUrl + '/')
} }
res.render('auth', { res.render('auth', {
title: 'Authorization' title: 'Authorization'
@ -14,7 +14,7 @@ action(function auth (req, res) {
// Index // Index
action(function (req, res) { action(function (req, res) {
if (req._config.agent && (req._config.agent.authorization !== req.session['authorization'])) { 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 options = _.clone(req._config)
var q = Monitor.available(_.extend(options, { var q = Monitor.available(_.extend(options, {

View File

@ -1,14 +1,15 @@
doctype html doctype html
html(lang=en) html(lang=en)
head head
base(href="/processes/")
meta(charset='UTF-8') meta(charset='UTF-8')
title= title + '- PM2 Monitor' title= title + '- PM2 Monitor'
meta(name='viewport', content='width=device-width, initial-scale=1.0, maximum-scale=2.0') 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='/processes/css/bootstrap.min.css')
link(rel='stylesheet', href='/css/jquery.sticky.min.css') link(rel='stylesheet', href='/processes/css/jquery.sticky.min.css')
link(rel='stylesheet', href='/css/animation.min.css') link(rel='stylesheet', href='/processes/css/animation.min.css')
link(rel='stylesheet', href='/css/jquery.avgrund.min.css') link(rel='stylesheet', href='/processes/css/jquery.avgrund.min.css')
link(rel='shortcut icon' href='/img/favicon.ico') link(rel='shortcut icon' href='/processes/img/favicon.ico')
block head block head
- var bodyClassName = ''; - var bodyClassName = '';

View File

@ -1,14 +1,13 @@
extends ../layouts/default extends ../layouts/default
block head block head
link(rel='stylesheet', href='/css/jquery.fullPage.css') link(rel='stylesheet', href='/processes/css/jquery.fullPage.css')
link(rel='stylesheet', href='/css/index.css') link(rel='stylesheet', href='/processes/css/index.css')
block content block content
#fullpage #fullpage
.section .section
.repo.bounceInDown .repo.bounceInDown
a(href='https://github.com/Tjatse/pm2-gui', target='_blank') Github Repo
span span
.polar-usage .polar-usage
.system-info .system-info