summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--index.js2
-rw-r--r--public/style.css30
-rw-r--r--views/index.html17
3 files changed, 40 insertions, 9 deletions
diff --git a/index.js b/index.js
index 3c1e06a..7df1b70 100644
--- a/index.js
+++ b/index.js
@@ -3,7 +3,7 @@ var express = require("express");
var ejs = require("ejs");
var winston = require("winston");
winston.remove(winston.transports.Console);
-winston.add(winston.transports.Console, {'timestamp': true});
+winston.add(winston.transports.Console, {'handleExceptions': true, 'exitOnError': false, 'timestamp': true});
winston.add(winston.transports.File, { filename: './logs/server.log', level: 'info', timestamp: true, handleExceptions: true, maxsize: 5242880, maxFiles: 10});
winston.level = 'info';
diff --git a/public/style.css b/public/style.css
index 9983bea..ea0dc90 100644
--- a/public/style.css
+++ b/public/style.css
@@ -3,12 +3,15 @@ body {
font-family: 'Lato', sans-serif;
font-weight: 400;
font-style: italic;
+ font-size: 18px;
}
-div {
+.system {
margin: 10px;
border-radius: 10px;
padding: 3px;
+ display: flex;
+ height: 20vh;
}
h1, h2, h3 {
@@ -18,7 +21,30 @@ h1, h2, h3 {
}
h1 {
- font-size: 40px;
+}
+
+.system-title-container {
+ display: inline-flex;
+ text-align: left;
+ justify-content: center;
+ flex-direction: column;
+}
+
+.system-info-container {
+ display: inline-flex;
+ text-align: right;
+ flex-direction: column;
+ padding: 10px;
+ margin-left: auto;
+ justify-content: center;
+}
+
+.system-title {
+ font-size: 7vw;
+}
+
+.system-info-elem {
+ font-size: 5vw;
}
.good-system {
diff --git a/views/index.html b/views/index.html
index fe2e79d..8ea3571 100644
--- a/views/index.html
+++ b/views/index.html
@@ -3,6 +3,7 @@
<head>
<meta charset="utf-8">
+ <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
<link href='https://fonts.googleapis.com/css?family=Lato:300,400italic' rel='stylesheet' type='text/css'>
<title>Radiodiodi system status</title>
<script src="angular.min.js"></script>
@@ -11,12 +12,16 @@
</head>
<body ng-controller="status-controller">
- <div ng-repeat="system in systems" ng-class="system.status ? 'good-system' : 'bad-system'">
- <h1>
- {{ system.name }}
- </h1>
- <h3>{{ system.status ? "UP" : "DOWN" }}</h3>
- <h3>Uptime: {{ system.uptime }}%</h3>
+ <div ng-repeat="system in systems" class="system" ng-class="system.status ? 'good-system' : 'bad-system'">
+ <div class="system-title-container">
+ <h1 class="system-title">
+ {{ system.name }}
+ </h1>
+ </div>
+ <div class="system-info-container">
+ <h3 class="system-info-elem">{{ system.status ? "UP" : "DOWN" }}</h3>
+ <h3 class="system-info-elem">Uptime: {{ system.uptime }}%</h3>
+ </div>
</div>
</body>