summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-03-25 19:17:36 +0100
committerVincent Petry <pvince81@owncloud.com>2014-03-25 19:17:36 +0100
commit5111fad006a7a1e7beb18017bc63b307478a4881 (patch)
treed68b866fd4cc823af27511d6959366755e6e0b36 /settings
parent36c9d91f86bc893f1f2d782b1aa3e314cda7f3a2 (diff)
parente6b4d28229da406b621da61183568a6a1de11cd7 (diff)
downloadnextcloud-server-5111fad006a7a1e7beb18017bc63b307478a4881.tar.gz
nextcloud-server-5111fad006a7a1e7beb18017bc63b307478a4881.zip
Merge pull request #7689 from owncloud/last_cron_log
Log last cron execution
Diffstat (limited to 'settings')
-rwxr-xr-xsettings/admin.php2
-rw-r--r--settings/css/settings.css20
-rw-r--r--settings/templates/admin.php19
3 files changed, 40 insertions, 1 deletions
diff --git a/settings/admin.php b/settings/admin.php
index 80b038d2ef6..23b3a2d5a0e 100755
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -45,6 +45,8 @@ $tmpl->assign('isWebDavWorking', OC_Util::isWebDAVWorking());
$tmpl->assign('has_fileinfo', OC_Util::fileInfoLoaded());
$tmpl->assign('old_php', OC_Util::isPHPoutdated());
$tmpl->assign('backgroundjobs_mode', OC_Appconfig::getValue('core', 'backgroundjobs_mode', 'ajax'));
+$tmpl->assign('cron_log', OC_Config::getValue('cron_log', true));
+$tmpl->assign('lastcron', OC_Appconfig::getValue('core', 'lastcron', false));
$tmpl->assign('shareAPIEnabled', OC_Appconfig::getValue('core', 'shareapi_enabled', 'yes'));
// Check if connected using HTTPS
diff --git a/settings/css/settings.css b/settings/css/settings.css
index a47e7bf6563..280d022af4e 100644
--- a/settings/css/settings.css
+++ b/settings/css/settings.css
@@ -167,6 +167,26 @@ table.shareAPI td { padding-bottom: 0.8em; }
width: 40px;
}
+.cronlog {
+ margin-left: 10px;
+}
+
+.cronstatus {
+ display: inline-block;
+ height: 16px;
+ width: 16px;
+ vertical-align: text-bottom;
+}
+
+span.success {
+ background: #37ce02;
+ border-radius: 8px;
+}
+
+span.error {
+ background: #ce3702;
+}
+
/* HELP */
.pressed {background-color:#DDD;}
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index 6e816c1fff6..9092d2833fd 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -157,7 +157,24 @@ if (!$_['internetconnectionworking']) {
;?>
<fieldset class="personalblock" id="backgroundjobs">
- <h2><?php p($l->t('Cron'));?></h2>
+ <h2 class="inlineblock"><?php p($l->t('Cron'));?></h2>
+ <?php if ($_['cron_log']): ?>
+ <p class="cronlog inlineblock">
+ <?php if ($_['lastcron'] !== false):
+ $human_time = OC_Util::formatDate($_['lastcron']) . " UTC";
+ if (time() - $_['lastcron'] <= 3600): ?>
+ <span class="cronstatus success"></span>
+ <?php p($l->t("Last cron was executed at %s.", array($human_time)));
+ else: ?>
+ <span class="cronstatus error"></span>
+ <?php p($l->t("Last cron was executed at %s. This is more than an hour ago, something seems wrong.", array($human_time)));
+ endif;
+ else: ?>
+ <span class="cronstatus error"></span>
+ <?php p($l->t("Cron was not executed yet!"));
+ endif; ?>
+ </p>
+ <?php endif; ?>
<p>
<input type="radio" name="mode" value="ajax"
id="backgroundjobs_ajax" <?php if ($_['backgroundjobs_mode'] === "ajax") {