From 66962bab446c262f0dcd125c18f6b4deb7ff9b63 Mon Sep 17 00:00:00 2001 From: Aldo Turmon Date: Tue, 6 Oct 2020 20:19:14 -0500 Subject: [PATCH 1/4] Adding track progress bar to show total disk space at 100% --- app.js | 22 +++++++++++----------- views/index.ejs | 5 ++++- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/app.js b/app.js index 86340e5..d0aa02e 100644 --- a/app.js +++ b/app.js @@ -1,15 +1,15 @@ -const express = require('express') -const app = express() -const http = require('http') -const chalk = require('chalk') -const fs = require('fs') -const fileUpload = require('express-fileupload') -const shortid = require('shortid') -const mime = require('mime-types') +const express = require('express'); +const app = express(); +const http = require('http'); +const chalk = require('chalk'); +const fs = require('fs'); +const fileUpload = require('express-fileupload'); +const shortid = require('shortid'); +const mime = require('mime-types'); const path = require('path'); const checkDiskSpace = require('check-disk-space'); -const mb = require('./lib/msgBuilder.js') -const isValidJSON = require('./lib/isvalidjson.js') +const mb = require('./lib/msgBuilder.js'); +const isValidJSON = require('./lib/isvalidjson.js'); const dataFile = `${__dirname}/config.json`; @@ -106,4 +106,4 @@ httpServer.listen(config.port, () => { if (err) return console.error(err) files.forEach(f => fs.unlink(path.join(config.uploadDir, f), () => {})) }) -}); \ No newline at end of file +}); diff --git a/views/index.ejs b/views/index.ejs index 03aaa64..90c3d39 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -16,6 +16,9 @@ Usage

<%= disk.used %>/<%= disk.total %> GB // <%= disk.percentage %>%

+
+
Total Disk Space
+
@@ -34,4 +37,4 @@ - \ No newline at end of file + From 765fe83e4db81a466745d6f5f31a4b1995527b5e Mon Sep 17 00:00:00 2001 From: Aldo Turmon Date: Wed, 7 Oct 2020 15:34:16 -0500 Subject: [PATCH 2/4] Removing decorators and classes --- app.js | 20 ++++++++++---------- views/index.ejs | 4 +--- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/app.js b/app.js index d0aa02e..414ccb8 100644 --- a/app.js +++ b/app.js @@ -1,15 +1,15 @@ -const express = require('express'); -const app = express(); -const http = require('http'); -const chalk = require('chalk'); -const fs = require('fs'); -const fileUpload = require('express-fileupload'); -const shortid = require('shortid'); -const mime = require('mime-types'); +const express = require('express') +const app = express() +const http = require('http') +const chalk = require('chalk') +const fs = require('fs') +const fileUpload = require('express-fileupload') +const shortid = require('shortid') +const mime = require('mime-types') const path = require('path'); const checkDiskSpace = require('check-disk-space'); -const mb = require('./lib/msgBuilder.js'); -const isValidJSON = require('./lib/isvalidjson.js'); +const mb = require('./lib/msgBuilder.js') +const isValidJSON = require('./lib/isvalidjson.js') const dataFile = `${__dirname}/config.json`; diff --git a/views/index.ejs b/views/index.ejs index 90c3d39..7f9eef3 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -16,9 +16,7 @@ Usage

<%= disk.used %>/<%= disk.total %> GB // <%= disk.percentage %>%

-
-
Total Disk Space
-
+
Total Disk Space
From 913ed4e98d9cc1214e9d8b5aad3549c250c6d61f Mon Sep 17 00:00:00 2001 From: AldoTurmon Date: Wed, 7 Oct 2020 15:35:33 -0500 Subject: [PATCH 3/4] Update app.js From b2f289ec2e657bb2860cbb9fa21bca9b2452fc69 Mon Sep 17 00:00:00 2001 From: AldoTurmon Date: Wed, 7 Oct 2020 15:35:59 -0500 Subject: [PATCH 4/4] Update index.ejs