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.
;
;authorization = AuTh
authorization = qwe
;
; A value indicates whether agent offline or not.
;

View File

@ -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 {

View File

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

View File

@ -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, {

View File

@ -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 = '';

View File

@ -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