Skip to content
Snippets Groups Projects
Commit 0efed5c2 authored by Jakob Sack's avatar Jakob Sack
Browse files

Add absolute time of last cronjob as hover tip

parent 6e906fc4
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,8 @@ $(document).ready(function(){
} );
});
$('#backgroundjobs span.crondate').tipsy({fade: true, gravity: 's', live: true});
$('#backgroundjobs input').change(function(){
if($(this).attr('checked')){
var mode = $(this).val();
......
......@@ -237,13 +237,18 @@ if ($_['suggestedOverwriteCliUrl']) {
<p class="cronlog inlineblock">
<?php if ($_['lastcron'] !== false):
$human_time = relative_modified_date($_['lastcron']);
$absolute_time = OC_Util::formatDate($_['lastcron']);
if (time() - $_['lastcron'] <= 3600): ?>
<span class="cronstatus success"></span>
<?php p($l->t("Last cron was executed %s.", array($human_time)));
else: ?>
<span class="crondate" original-title="<?php p($absolute_time);?>">
<?php p($l->t("Last cron was executed %s.", array($human_time)));?>
</span>
<?php else: ?>
<span class="cronstatus error"></span>
<?php p($l->t("Last cron was executed %s. Something seems wrong.", array($human_time)));
endif;
<span class="crondate" original-title="<?php p($absolute_time);?>">
<?php p($l->t("Last cron was executed %s. Something seems wrong.", array($human_time)));?>
</span>
<?php endif;
else: ?>
<span class="cronstatus error"></span>
<?php p($l->t("Cron was not executed yet!"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment