Merge branch 'develop' into renovate/winston-daily-rotate-file-3.x
commit
6a63536bc8
@ -1,4 +1,20 @@
|
||||
$main-color: #9289f5
|
||||
$highlight-color: #FFF
|
||||
$link-color: #FAA
|
||||
$bar-color: #2310f7
|
||||
$cPrimary: #9289f5
|
||||
$cPrimaryVariant: #4c10a5
|
||||
$cSecondary: #c889f5
|
||||
$cSecondaryVariant: #740bce
|
||||
$cBackground: #fff
|
||||
$cBackgroundVariant: #000
|
||||
$cSurface: #fff
|
||||
$cSurfaceVariant: #000
|
||||
$cError: #f59289
|
||||
$cErrorVariant: #b20a00
|
||||
$cOnPrimary: #fff
|
||||
$cOnSecondary: #000
|
||||
$cOnSurface: #000
|
||||
$cOnSurfaceShadow: lighten($cOnSurface, 30%)
|
||||
$cOnSurfaceVariant: #fff
|
||||
$cOnBackground: #000
|
||||
$cOnBackgroundShadow: lighten($cOnBackground, 30%)
|
||||
$cOnBackgroundVariant: #fff
|
||||
$cOnError: #000
|
||||
$cOnErrorVariant: #fff
|
@ -0,0 +1,175 @@
|
||||
@import layout
|
||||
@import colors
|
||||
|
||||
.app
|
||||
background: $cBackground
|
||||
color: $cOnBackground
|
||||
user-select: none
|
||||
::-webkit-scrollbar
|
||||
width: 12px
|
||||
height: 12px
|
||||
::-webkit-scrollbar-thumb
|
||||
background: $cSecondary
|
||||
::-webkit-scrollbar-track
|
||||
background: lighten($cPrimary, 10%)
|
||||
|
||||
.mainview
|
||||
transition-duration: 1s
|
||||
box-shadow: 0 5px 5px $cOnSurfaceShadow
|
||||
background: $cBackground
|
||||
|
||||
.mainview[state=retracted]
|
||||
width: 80%
|
||||
|
||||
.accentBar
|
||||
@extend .bar
|
||||
background: $cSecondary
|
||||
height: 10px
|
||||
|
||||
.navigationBar
|
||||
@extend .bar
|
||||
background: $cPrimary
|
||||
color: $cOnPrimary
|
||||
min-height: 35px
|
||||
box-shadow: 0 5px 5px $cOnSurfaceShadow
|
||||
position: relative
|
||||
z-index: 999
|
||||
text-align: center
|
||||
.menu
|
||||
height: 2em
|
||||
width: 2em
|
||||
padding: calc(0.5em + 5px) $sPadding 0.5em
|
||||
background: url("/icons/menu.svg") no-repeat center, $cPrimary
|
||||
transition-duration: 0.3s
|
||||
cursor: pointer
|
||||
border-radius: 0
|
||||
.menu:hover
|
||||
background: url("/icons/menu.svg") no-repeat center, darken($cPrimary, 4%)
|
||||
.menu:active
|
||||
background: url("/icons/menu.svg") no-repeat center, lighten($cPrimary, 4%)
|
||||
border-radius: 2em
|
||||
.button
|
||||
background: $cPrimary
|
||||
padding: 1em $sPadding 0
|
||||
height: 2em
|
||||
float: left
|
||||
text-align: center
|
||||
transition-duration: 0.3s
|
||||
cursor: pointer
|
||||
border-bottom: 5px solid $cPrimary
|
||||
span
|
||||
vertical-align: middle
|
||||
display: inline-block
|
||||
.button:hover
|
||||
background: darken($cPrimary, 4%)
|
||||
border-bottom: 5px solid darken($cPrimary, 4%)
|
||||
.button:active
|
||||
background: lighten($cPrimary, 4%)
|
||||
border-bottom: 5px solid lighten($cPrimary, 4%)
|
||||
.current
|
||||
border-bottom: 5px solid $cSurface !important
|
||||
.title
|
||||
padding: 0.5em $sPadding 0.5em
|
||||
font-size: 18pt
|
||||
font-weight: bold
|
||||
text-align: center
|
||||
width: 100%
|
||||
|
||||
.actionList
|
||||
background: $cPrimary
|
||||
color: $cOnPrimary
|
||||
width: 20%
|
||||
height: 100%
|
||||
ul
|
||||
list-style: none
|
||||
padding-left: 0
|
||||
li
|
||||
padding: $sPadding
|
||||
width: 100%
|
||||
cursor: pointer
|
||||
transition-duration: 0.3s
|
||||
li:hover
|
||||
background: darken($cPrimary, 4%)
|
||||
li:active
|
||||
background: lighten($cPrimary, 4%)
|
||||
|
||||
.panelContainer
|
||||
background: $cSurface
|
||||
color: $cOnSurface
|
||||
.panel
|
||||
transition-duration: 0.3s
|
||||
background: $cPrimary
|
||||
color: $cOnPrimary
|
||||
display: inline-block
|
||||
position: relative
|
||||
min-height: 225px
|
||||
min-width: 225px
|
||||
padding: $sPadding
|
||||
max-width: 100vw
|
||||
max-height: 100vw
|
||||
margin: 25px
|
||||
border-radius: $sPadding
|
||||
box-shadow: 0 5px 5px $cOnSurfaceShadow
|
||||
cursor: pointer
|
||||
text-align: justify
|
||||
.panel.max-width
|
||||
width: calc(100% - 75px)
|
||||
.panel.half-width
|
||||
width: calc(50% - 77.5px)
|
||||
.panel:hover
|
||||
background: darken($cPrimary, 4%)
|
||||
.panel:active
|
||||
background: lighten($cPrimary, 4%)
|
||||
box-shadow: 0 7px 5px $cOnSurfaceShadow
|
||||
.panel
|
||||
.title
|
||||
position: absolute
|
||||
padding: $sPadding
|
||||
text-align: center
|
||||
width: calc(100% - 25px)
|
||||
top: 0
|
||||
left: 0
|
||||
font-size: 16pt
|
||||
font-weight: bold
|
||||
.icon
|
||||
position: absolute
|
||||
padding: $sPadding
|
||||
left: 0
|
||||
top: calc(1em + 12.5px)
|
||||
height: calc(50% - 50px)
|
||||
width: calc(100% - 25px)
|
||||
img
|
||||
height: 100%
|
||||
width: auto
|
||||
margin: 0 calc(50% - 25px)
|
||||
.description
|
||||
position: absolute
|
||||
padding: $sPadding
|
||||
top: 50%
|
||||
height: calc(50% - 37.5px)
|
||||
left: 0
|
||||
overflow: auto
|
||||
.graph
|
||||
position: absolute
|
||||
left: $sPadding
|
||||
top: 20%
|
||||
height: calc(80% - 12.5px)
|
||||
width: calc(100% - 25px)
|
||||
|
||||
.graph
|
||||
color: $cPrimaryVariant
|
||||
box-shadow: inset 0 1px 5px $cOnSurfaceShadow
|
||||
border-radius: $sPadding
|
||||
outline-color: $cOnPrimary
|
||||
background: darken($cPrimary, 4%)
|
||||
canvas, .labels
|
||||
position: absolute
|
||||
top: 0
|
||||
left: 0
|
||||
height: 100%
|
||||
width: 100%
|
||||
span
|
||||
padding: 2px
|
||||
font-weight: bold
|
||||
color: $cOnPrimary
|
||||
opacity: 0.75
|
@ -0,0 +1,29 @@
|
||||
$sPadding: 12.5px
|
||||
|
||||
.app
|
||||
width: 100%
|
||||
height: 100%
|
||||
position: absolute
|
||||
top: 0
|
||||
left: 0
|
||||
display: flex
|
||||
|
||||
.mainview
|
||||
width: 100%
|
||||
min-height: 100%
|
||||
position: absolute
|
||||
right: 0
|
||||
|
||||
.content
|
||||
flex: 100%
|
||||
overflow: auto
|
||||
height: calc(100vh - 2em - 75px)
|
||||
padding: 25px
|
||||
|
||||
.row
|
||||
display: flex
|
||||
|
||||
.bar
|
||||
display: flex
|
||||
width: 100%
|
||||
min-height: 10px
|
@ -1,12 +1,13 @@
|
||||
{
|
||||
"license": "GPL-v3",
|
||||
"dependencies": {
|
||||
"args-parser": "1.1.0",
|
||||
"jquery": "3.3.1",
|
||||
"jsdom": "13.1.0",
|
||||
"node-sass": "4.11.0",
|
||||
"perfy": "1.1.5",
|
||||
"winston": "3.1.0",
|
||||
"args-parser": "^1.1.0",
|
||||
"jquery": "^3.3.1",
|
||||
"jsdom": "13.2.0",
|
||||
"node-sass": "^4.9.3",
|
||||
"perfy": "^1.1.5",
|
||||
"systeminformation": "^3.45.9",
|
||||
"winston": "^3.1.0",
|
||||
"winston-daily-rotate-file": "3.6.0"
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1 @@
|
||||
{"100perc":[[0,11.679560768654854],[1,13.460578842315368],[2,15.246188452886777],[3,12.640379336161716],[4,13.812429941462199],[5,16.54219566840926],[6,12.078861991514849],[7,11.912186603467632],[8,7.1883189816548105],[9,8.998875140607424],[10,11.888460102078923],[11,12.426845971859047],[12,22.391033623910335],[13,14.020207059997505],[14,19.357660584853786],[15,11.685917915949865],[16,12.731134432783609],[17,12.10302575643911],[18,11.10277569392348],[19,12.86105577689243],[20,12.230663843567068],[21,15.060617422822148],[22,14.219782961207434],[23,7.586723234339905],[24,11.123581493951864],[25,7.223955084217093],[26,9.706686552324136],[27,10.684931506849315],[28,10.15],[29,11.129132875857767],[30,10.925],[31,14.40667413771635],[32,8.388548568571071],[33,22.928828716929576],[34,15.932036444225561],[35,21.684789401324835],[36,20.67631644621912],[37,19.880269393863806],[38,11.3125],[39,22.19178082191781],[40,20.004970178926442],[41,22.27914532050481],[42,24.20907840440165],[43,26.30396805590217],[44,27.641568139390166],[45,10.927731932983246],[46,25.33998752339364],[47,24.579124579124578],[48,17.480687764764514],[49,11.745595401724353],[50,14.023705552089833],[51,27.266028002947678],[52,4.311961004874391],[53,4.8533998752339365],[54,1.762720340042505],[55,5.22835038682306],[56,3.3191914150237083],[57,3.7041656273384884],[58,3.7655860349127184],[59,4.0564153769345985],[60,2.9125],[61,6.238303181534623],[62,8.366533864541832],[63,13.248502994011977],[64,7.412028949338658],[65,7.225],[66,2.5618595351162208],[67,4.2880360045005625],[68,6.660834791302174],[69,5.651902682470368],[70,3.0534351145038165],[71,2.5125],[72,2.5618595351162208],[73,3.925],[74,4.451669376016007],[75,9.367593863041037],[76,20.694826293426644],[77,7.634730538922156],[78,8.5875],[79,10.519091589717993],[80,8.549675486769845],[81,7.646176911544228],[82,2.5250000000000004],[83,5.289421157684631],[84,3.488372093023256],[85,3.312914114264283],[86,0.775],[87,4.93503248375812],[88,4.6563745019920315],[89,5.276319079769943],[90,4.2875000000000005],[91,7.62595324415552],[92,6.424650698602795],[93,10.389291415940072],[94,1.9520851818988465],[95,9.974204643164231],[96,8.184653774173425],[97,8.570359281437126],[98,20.433320881583864],[99,9.357454772301933]]}
|
@ -0,0 +1,53 @@
|
||||
<script type="text/javascript">
|
||||
setTitle('About');
|
||||
</script>
|
||||
<div class="panelContainer">
|
||||
<div class="panel">
|
||||
<p>
|
||||
The Raspberry pi Communication-Network is a network of Raspberry-Pi's.
|
||||
It's currently still in development. <br> The purpose of this server is to
|
||||
display the status of all raspberry-pi's in the network and the data
|
||||
of several sensors that are connected to these raspberry pi's. The data
|
||||
is stored in a database running on the main backend-server. The
|
||||
frontend-server is running either on a differend device or also on the
|
||||
backend-server-device. If this is the case, then the data is directly
|
||||
fetched from several json files instead of using webservices. The json-
|
||||
files are generated by a script running in the background that get's
|
||||
data from the database and stores it in these json-files every few
|
||||
seconds (depending on the type of data).
|
||||
</p>
|
||||
</div>
|
||||
<div class="panel half-width">
|
||||
<span class="title">
|
||||
CPU Temperature
|
||||
</span>
|
||||
<div class="graph" onmouseout="hideTooltip()">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel half-width">
|
||||
<span class="title">
|
||||
CPU Temperature
|
||||
</span>
|
||||
<div class="graph" onmouseout="hideTooltip()">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel half-width">
|
||||
<span class="title">
|
||||
CPU Temperature
|
||||
</span>
|
||||
<div class="graph" onmouseout="hideTooltip()">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel half-width">
|
||||
<span class="title">
|
||||
CPU Temperature
|
||||
</span>
|
||||
<div class="graph" onmouseout="hideTooltip()">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="about.js"></script>
|
@ -0,0 +1,14 @@
|
||||
<div class="panelContainer">
|
||||
<div class="panel" style="width: 50%">
|
||||
<span class="title">
|
||||
CPU Temperature
|
||||
</span>
|
||||
<div class="graph" onmouseout="hideTooltip()">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
setTitle('Data')
|
||||
</script>
|
||||
<script src="/data.js" type="text/javascript">
|
||||
</script>
|
@ -1,20 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"></script>
|
||||
<script src="https://unpkg.com/vue-chartjs/dist/vue-chartjs.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1> Data </h1>
|
||||
<div id="app">
|
||||
<div style="height: 100px; width: 100%">
|
||||
<svg viewBox="0 0 100 100" style="height: 100%; width: 100%">
|
||||
<polygon
|
||||
v-bind:points="temperatureData">
|
||||
</polygon>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/data.js" type="text/javascript">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,24 @@
|
||||
<div class="panelContainer">
|
||||
<div class="panel">
|
||||
<div class="title">
|
||||
<span>Hey, I am a title</span>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<img src="RCN-Logo.png">
|
||||
</div>
|
||||
<div class="description">
|
||||
<span>This very long app description goes from bottom to top.
|
||||
Let us force this description into ULTIMATE-OVERFLOW-MODE!
|
||||
That requires a bit more text so I will just write it here. Looks like it doesn't work</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel">
|
||||
</div>
|
||||
<div class="panel">
|
||||
</div>
|
||||
<div class="panel">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
setTitle('Home')
|
||||
</script>
|
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" fill="white"/></svg>
|
After Width: | Height: | Size: 196 B |
@ -0,0 +1,9 @@
|
||||
function draw() {
|
||||
$.getJSON('sys.json', data =>{
|
||||
let graphs = document.querySelectorAll('.graph');
|
||||
graphs.forEach(c => drawGraph(c, data['100perc'], {yMax: 100, yMin: "0", xUnit: "s", yUnit: "%"}));
|
||||
});
|
||||
}
|
||||
|
||||
draw();
|
||||
registerInterval(draw, 1000);
|
@ -1,28 +1,9 @@
|
||||
function getFormattedData(dataArray) {
|
||||
let arrData = ["0,100"];
|
||||
for (let d of dataArray) {
|
||||
arrData.push(d[0]+","+(100-d[1]));
|
||||
}
|
||||
arrData.push("100,100");
|
||||
return arrData.join(" ");
|
||||
function draw() {
|
||||
$.getJSON('cpu.json', data =>{
|
||||
let c = document.querySelector('.graph');
|
||||
drawGraph(c, data['100temp'], {yMax: 50, yMin: "0", xUnit: "s", yUnit: "°C"});
|
||||
});
|
||||
}
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
temperatureData: [1,2,3,4],
|
||||
percentData: [2,3,4,5],
|
||||
labels: ["1", "2", "3", "4", "5"],
|
||||
chartOptions: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let self = this;
|
||||
$.getJSON('cpu.json', d => {
|
||||
self.temperatureData = getFormattedData(d['100temp']),
|
||||
self.percentData = getFormattedData(d['100perc'])
|
||||
})
|
||||
}
|
||||
})
|
||||
draw();
|
||||
registerInterval(draw, 1000);
|
Loading…
Reference in New Issue