From 4f6e253c54fbf33472f579da858324db941e53c8 Mon Sep 17 00:00:00 2001
From: Marco Malavolti <marco.malavolti@gmail.com>
Date: Wed, 9 Sep 2020 16:08:20 +0200
Subject: [PATCH] Fixed clean script and enriched GUI
---
clean7daysOldFiles.sh | 9 ++++++---
web/index.php | 5 ++---
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/clean7daysOldFiles.sh b/clean7daysOldFiles.sh
index 13d5ba5..f06b1b1 100755
--- a/clean7daysOldFiles.sh
+++ b/clean7daysOldFiles.sh
@@ -1,10 +1,13 @@
#!/bin/bash
+BASEDIR=/var/www/html/eccs2
+
# Remove ECCS2 result older than 7 days
-find $HOME/eccs2/output/* -mtime +6 -type f -delete
+find $BASEDIR/output/* -mtime +6 -type f -delete
# Remove ECCS2 logs older than 7 days
-find $HOME/eccs2/logs/* -mtime +6 -type f -delete
+find $BASEDIR/logs/* -mtime +6 -type f -delete
# Remove ECCS2 HTML code older than 7 days
-find $HOME/eccs2/html/* -mtime +6 -type f -delete
+find $BASEDIR/html/* -mtime +6 -type f -delete
+find $BASEDIR/html -type d -empty -delete
diff --git a/web/index.php b/web/index.php
index 17db15d..25afe88 100644
--- a/web/index.php
+++ b/web/index.php
@@ -25,9 +25,10 @@ $lastDate = str_replace($str2strip, "", $lastFile);
<body>
<hr>
<div id="status">
+ <strong>Show IdPs with status:</strong>
<input type="checkbox" name="status" value="ERROR">ERROR</input>
<input type="checkbox" name="status" value="OK">OK</input>
- <input type="checkbox" name="status" value="DISABLE">DISABLE</input>
+ <input type="checkbox" name="status" value="DISABLED">DISABLED</input>
<button style="float:right;" onclick="getPastResults()">Go</button>
<input style="float:right;" type="date" id="myDate" min="<?php echo $firstDate ?>" max="<?php echo $lastDate ?>" value="<?php echo $lastDate ?>"/>
</div>
@@ -52,5 +53,3 @@ $lastDate = str_replace($str2strip, "", $lastFile);
<script type="text/javascript" src="script.js" /></script>
</body>
</html>
-
-
--
GitLab