Compare commits

..

5 Commits

Author SHA1 Message Date
renovate[bot]
ecc4935c9d
⬆️ Update dependency express to v4.18.3 2024-02-29 13:22:02 +00:00
4c179d3dff
Merge pull request #214 from asheroto/master
Update nextcloud-settings-modal.ejs
2023-09-11 07:32:14 +02:00
asheroto
7fe3b23ef4
Update nextcloud-settings-modal.ejs
Fix misspelling of example
2023-09-10 22:10:07 -05:00
93e821794e
Revert "⬆️ Update dependency bootstrap to v5.2.0 (#168)"
This reverts commit f444243e5c.
2022-11-14 16:59:27 +01:00
cfe6778745
:hambulance: Fix backup order that have break auto clean 2022-11-14 16:51:39 +01:00
6 changed files with 39 additions and 31 deletions

View File

@ -9,12 +9,12 @@
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "6.1.2", "@fortawesome/fontawesome-free": "6.1.2",
"app-root-path": "3.0.0", "app-root-path": "3.0.0",
"bootstrap": "5.2.0", "bootstrap": "5.1.3",
"cookie-parser": "1.4.6", "cookie-parser": "1.4.6",
"cron": "2.1.0", "cron": "2.1.0",
"debug": "4.3.4", "debug": "4.3.4",
"ejs": "3.1.8", "ejs": "3.1.8",
"express": "4.18.2", "express": "4.18.3",
"form-data": "4.0.0", "form-data": "4.0.0",
"got": "12.3.0", "got": "12.3.0",
"http-errors": "2.0.0", "http-errors": "2.0.0",

View File

@ -21,7 +21,7 @@ router.get("/formated-local-snap", function (req, res, next) {
hassioApiTools.getSnapshots() hassioApiTools.getSnapshots()
.then((snaps) => { .then((snaps) => {
snaps.sort((a, b) => { snaps.sort((a, b) => {
return a.date < b.date ? 1 : -1 return Date.parse(b.date) - Date.parse(a.date);
}); });
res.render("localSnaps", { snaps: snaps, DateTime: DateTime }); res.render("localSnaps", { snaps: snaps, DateTime: DateTime });
@ -43,7 +43,7 @@ router.get("/formated-backup-manual", function (req, res, next) {
.getFolderContent(webdav.getConf().back_dir + pathTools.manual) .getFolderContent(webdav.getConf().back_dir + pathTools.manual)
.then((contents) => { .then((contents) => {
contents.sort((a, b) => { contents.sort((a, b) => {
return a.date < b.date ? 1 : -1 return Date.parse(b.lastmod) - Date.parse(a.lastmod)
}); });
//TODO Remove this when bug is fixed, etag contain '&quot;' at start and end ? //TODO Remove this when bug is fixed, etag contain '&quot;' at start and end ?
for (let backup of contents) { for (let backup of contents) {
@ -67,7 +67,7 @@ router.get("/formated-backup-auto", function (req, res, next) {
.getFolderContent(url) .getFolderContent(url)
.then((contents) => { .then((contents) => {
contents.sort((a, b) => { contents.sort((a, b) => {
return a.date < b.date ? 1 : -1 return Date.parse(b.lastmod) - Date.parse(a.lastmod)
}); });
//TODO Remove this when bug is fixed, etag contain '&quot;' at start and end ? //TODO Remove this when bug is fixed, etag contain '&quot;' at start and end ?
for (let backup of contents) { for (let backup of contents) {

View File

@ -295,7 +295,7 @@ function clean() {
return; return;
} }
snaps.sort((a, b) => { snaps.sort((a, b) => {
return a.date < b.date ? 1 : -1 return Date.parse(b.date) - Date.parse(a.date);
}); });
let toDel = snaps.slice(limit); let toDel = snaps.slice(limit);
for (let i of toDel) { for (let i of toDel) {

View File

@ -380,12 +380,13 @@ class WebdavTools {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.getFolderContent(this.getConf().back_dir + pathTools.auto) this.getFolderContent(this.getConf().back_dir + pathTools.auto)
.then(async (contents) => { .then(async (contents) => {
if (contents.length < limit) { if (contents.length < limit) {
resolve(); resolve();
return; return;
} }
contents.sort((a, b) => { contents.sort((a, b) => {
return a.date < b.date ? 1 : -1 return Date.parse(b.lastmod) - Date.parse(a.lastmod)
}); });
let toDel = contents.slice(limit); let toDel = contents.slice(limit);

View File

@ -30,7 +30,7 @@
<div class="col-12"> <div class="col-12">
<label for="hostname" class="form-label">Hostname</label> <label for="hostname" class="form-label">Hostname</label>
<input id="hostname" type="text" class="form-control" aria-describedby="hostname-help"> <input id="hostname" type="text" class="form-control" aria-describedby="hostname-help">
<div id="hostname-help" class="form-text">exemple.com:8080</span> <div id="hostname-help" class="form-text">example.com:8080</span>
</div> </div>
</div> </div>
</div> </div>
@ -70,4 +70,4 @@
</div> </div>
</div> </div>

View File

@ -177,12 +177,12 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"body-parser@npm:1.20.1": "body-parser@npm:1.20.2":
version: 1.20.1 version: 1.20.2
resolution: "body-parser@npm:1.20.1" resolution: "body-parser@npm:1.20.2"
dependencies: dependencies:
bytes: 3.1.2 bytes: 3.1.2
content-type: ~1.0.4 content-type: ~1.0.5
debug: 2.6.9 debug: 2.6.9
depd: 2.0.0 depd: 2.0.0
destroy: 1.2.0 destroy: 1.2.0
@ -190,19 +190,19 @@ __metadata:
iconv-lite: 0.4.24 iconv-lite: 0.4.24
on-finished: 2.4.1 on-finished: 2.4.1
qs: 6.11.0 qs: 6.11.0
raw-body: 2.5.1 raw-body: 2.5.2
type-is: ~1.6.18 type-is: ~1.6.18
unpipe: 1.0.0 unpipe: 1.0.0
checksum: f1050dbac3bede6a78f0b87947a8d548ce43f91ccc718a50dd774f3c81f2d8b04693e52acf62659fad23101827dd318da1fb1363444ff9a8482b886a3e4a5266 checksum: 14d37ec638ab5c93f6099ecaed7f28f890d222c650c69306872e00b9efa081ff6c596cd9afb9930656aae4d6c4e1c17537bea12bb73c87a217cb3cfea8896737
languageName: node languageName: node
linkType: hard linkType: hard
"bootstrap@npm:5.2.0": "bootstrap@npm:5.1.3":
version: 5.2.0 version: 5.1.3
resolution: "bootstrap@npm:5.2.0" resolution: "bootstrap@npm:5.1.3"
peerDependencies: peerDependencies:
"@popperjs/core": ^2.11.5 "@popperjs/core": ^2.10.2
checksum: 9dbfb5d26bbdac3e27a6b46cb7456cd4dd75ae3b48644737809885b8ea9c265d3359c4cdbf25a55bb7e5046f51e441557033ba21eeaf24ef8316bfbb3d420084 checksum: 301b5ed872efba061104cf22ac93568e3837867fb5527ab9326a51510fb752bd4883e1d488225c8be72f86d9d3a55ef5b166aa7fa62c2fdd077c3f05b65752f8
languageName: node languageName: node
linkType: hard linkType: hard
@ -401,6 +401,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"content-type@npm:~1.0.5":
version: 1.0.5
resolution: "content-type@npm:1.0.5"
checksum: 566271e0a251642254cde0f845f9dd4f9856e52d988f4eb0d0dcffbb7a1f8ec98de7a5215fc628f3bce30fe2fb6fd2bc064b562d721658c59b544e2d34ea2766
languageName: node
linkType: hard
"cookie-parser@npm:1.4.6": "cookie-parser@npm:1.4.6":
version: 1.4.6 version: 1.4.6
resolution: "cookie-parser@npm:1.4.6" resolution: "cookie-parser@npm:1.4.6"
@ -561,13 +568,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"express@npm:4.18.2": "express@npm:4.18.3":
version: 4.18.2 version: 4.18.3
resolution: "express@npm:4.18.2" resolution: "express@npm:4.18.3"
dependencies: dependencies:
accepts: ~1.3.8 accepts: ~1.3.8
array-flatten: 1.1.1 array-flatten: 1.1.1
body-parser: 1.20.1 body-parser: 1.20.2
content-disposition: 0.5.4 content-disposition: 0.5.4
content-type: ~1.0.4 content-type: ~1.0.4
cookie: 0.5.0 cookie: 0.5.0
@ -596,7 +603,7 @@ __metadata:
type-is: ~1.6.18 type-is: ~1.6.18
utils-merge: 1.0.1 utils-merge: 1.0.1
vary: ~1.1.2 vary: ~1.1.2
checksum: 3c4b9b076879442f6b968fe53d85d9f1eeacbb4f4c41e5f16cc36d77ce39a2b0d81b3f250514982110d815b2f7173f5561367f9110fcc541f9371948e8c8b037 checksum: 3d7fc8762a81dee0adf0b604f11627db2af082c5f2234e78a4aa8134f22c51f96c6282063f2f8b87f5dbc70679a3087caccb93b6107e324c6feb3a70960a5864
languageName: node languageName: node
linkType: hard linkType: hard
@ -1095,12 +1102,12 @@ __metadata:
dependencies: dependencies:
"@fortawesome/fontawesome-free": 6.1.2 "@fortawesome/fontawesome-free": 6.1.2
app-root-path: 3.0.0 app-root-path: 3.0.0
bootstrap: 5.2.0 bootstrap: 5.1.3
cookie-parser: 1.4.6 cookie-parser: 1.4.6
cron: 2.1.0 cron: 2.1.0
debug: 4.3.4 debug: 4.3.4
ejs: 3.1.8 ejs: 3.1.8
express: 4.18.2 express: 4.18.3
form-data: 4.0.0 form-data: 4.0.0
got: 12.3.0 got: 12.3.0
http-errors: 2.0.0 http-errors: 2.0.0
@ -1247,15 +1254,15 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"raw-body@npm:2.5.1": "raw-body@npm:2.5.2":
version: 2.5.1 version: 2.5.2
resolution: "raw-body@npm:2.5.1" resolution: "raw-body@npm:2.5.2"
dependencies: dependencies:
bytes: 3.1.2 bytes: 3.1.2
http-errors: 2.0.0 http-errors: 2.0.0
iconv-lite: 0.4.24 iconv-lite: 0.4.24
unpipe: 1.0.0 unpipe: 1.0.0
checksum: 5362adff1575d691bb3f75998803a0ffed8c64eabeaa06e54b4ada25a0cd1b2ae7f4f5ec46565d1bec337e08b5ac90c76eaa0758de6f72a633f025d754dec29e checksum: ba1583c8d8a48e8fbb7a873fdbb2df66ea4ff83775421bfe21ee120140949ab048200668c47d9ae3880012f6e217052690628cf679ddfbd82c9fc9358d574676
languageName: node languageName: node
linkType: hard linkType: hard