mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Server stat fixes
This commit is contained in:
parent
7e6ddd1e79
commit
5c69b07f05
1 changed files with 11 additions and 8 deletions
|
@ -5,7 +5,7 @@
|
||||||
const cols = process.stdout.columns
|
const cols = process.stdout.columns
|
||||||
// const rows = process.stdout.rows
|
// const rows = process.stdout.rows
|
||||||
const maxStatLength = Math.floor(cols / 4)
|
const maxStatLength = Math.floor(cols / 4)
|
||||||
const statNameSpacing = 5
|
const statNameSpacing = 4
|
||||||
const beforeRowSpace = 13
|
const beforeRowSpace = 13
|
||||||
const coloredWords = {
|
const coloredWords = {
|
||||||
red: ['lred', 'thanks'],
|
red: ['lred', 'thanks'],
|
||||||
|
@ -64,7 +64,10 @@ const filterFromDailyStats = [
|
||||||
'.git',
|
'.git',
|
||||||
'apple-touch-icon',
|
'apple-touch-icon',
|
||||||
'/.env',
|
'/.env',
|
||||||
'/userFiles/'
|
'/userFiles/',
|
||||||
|
'.min.js',
|
||||||
|
'.xml',
|
||||||
|
'.aspx',
|
||||||
]
|
]
|
||||||
|
|
||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
|
@ -195,7 +198,7 @@ function pCols(cols, rowTitles, colorNames, firstRowColor, showDiff) {
|
||||||
cols
|
cols
|
||||||
.forEach((val) => {
|
.forEach((val) => {
|
||||||
if (!val[i]) {
|
if (!val[i]) {
|
||||||
row.push(getLetterNTimes(' ', maxStatLength + 5))
|
row.push(getLetterNTimes(' ', maxStatLength + statNameSpacing + 2))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,7 +231,7 @@ function pCols(cols, rowTitles, colorNames, firstRowColor, showDiff) {
|
||||||
}
|
}
|
||||||
|
|
||||||
let ammount = val[i].val ? val[i].val.toString() : ''
|
let ammount = val[i].val ? val[i].val.toString() : ''
|
||||||
while (ammount.length < 4) {
|
while (ammount.length < 5) {
|
||||||
ammount = ammount + ' '
|
ammount = ammount + ' '
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -373,20 +376,20 @@ pCols(
|
||||||
[
|
[
|
||||||
'Today',
|
'Today',
|
||||||
preProcessUIdTestSolving(clientIdTestSolving[getDayIndex()]),
|
preProcessUIdTestSolving(clientIdTestSolving[getDayIndex()]),
|
||||||
preProcessUIdTestSolving(clientIdTestSolving[getDayIndex()], 2),
|
preProcessUIdTestSolving(clientIdTestSolving[getDayIndex()], 5),
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'Yesterday',
|
'Yesterday',
|
||||||
preProcessUIdTestSolving(clientIdTestSolving[getDayIndex(-1)]),
|
preProcessUIdTestSolving(clientIdTestSolving[getDayIndex(-1)]),
|
||||||
preProcessUIdTestSolving(clientIdTestSolving[getDayIndex(-1)], 2),
|
preProcessUIdTestSolving(clientIdTestSolving[getDayIndex(-1)], 5),
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'Before Yesterday',
|
'Before Yesterday',
|
||||||
preProcessUIdTestSolving(clientIdTestSolving[getDayIndex(-2)]),
|
preProcessUIdTestSolving(clientIdTestSolving[getDayIndex(-2)]),
|
||||||
preProcessUIdTestSolving(clientIdTestSolving[getDayIndex(-2)], 2),
|
preProcessUIdTestSolving(clientIdTestSolving[getDayIndex(-2)], 5),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
['', 'All', 'More than 2'],
|
['', 'All', 'More than 5'],
|
||||||
false,
|
false,
|
||||||
'green'
|
'green'
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue