Update update_2

This commit is contained in:
bergware
2023-12-25 08:50:45 +01:00
parent 803b5d8d92
commit da2c32a269

View File

@@ -355,7 +355,6 @@ while (true) {
// parity schedule
$a = 'schedule';
$echo[$a] = [];
[$delta,$bytes] = [_var($var,'mdResyncDt',0),_var($var,'mdResyncDb',0)];
$synced = create_sync($stamps);
$sbSynced = array_shift($synced) ?: _var($var,'sbSynced');
@@ -365,6 +364,7 @@ while (true) {
$echo[$a][] = "<br><i class='fa fa-fw fa-clock-o'></i> "._('Elapsed time').": "._(my_clock(floor((time()-$sbSynced)/60)),2);
$echo[$a][] = "<br><i class='fa fa-fw fa-flag-checkered'></i> "._('Estimated finish').': '.($bytes ? _(my_clock(round(((($delta*(($size-$spot)/($bytes/100+1)))/100)/60),0)),2) : _('Unknown'));
$echo[$a][] = "<br><i class='fa fa-fw fa-search'></i> ".print_error(_var($var,'sbSyncErrs',0));
$echo[$a] = implode($echo[$a]);
} else {
[$date,$duration,$speed,$status,$error,$action,$size] = last_parity_log();
if (_var($var,'sbSyncExit',0)!=0) {
@@ -460,17 +460,14 @@ while (true) {
case 'WL': $t = stage(0); break;}
break;
}
$echo[$a][] = "\n";
if ($check) {
$frmt = _var($display,'date').(_var($display,'date')!='%c' ? ", "._var($display,'time') : "");
$echo[$a][] = sprintf(_('Next check scheduled on **%s**'),_(my_date($frmt,$time+$t),0));
$echo[$a][] = "<br><i class='fa fa-fw fa-clock-o'></i> "._('Due in').": "._(my_clock(floor($t/60)),2);
$extra = sprintf(_('Next check scheduled on **%s**'),_(my_date($frmt,$time+$t),0))."<br><i class='fa fa-fw fa-clock-o'></i> "._('Due in').": "._(my_clock(floor($t/60)),2);
} else {
$echo[$a][] = _('Scheduled parity check is disabled');
$extra = _('Scheduled parity check is disabled');
}
$echo[$a] = [implode($echo[$a]), $extra];
}
$echo[$a] = implode($echo[$a]);
$echo = json_encode($echo);
$md5_new = md5($echo,true);
if ($md5_new !== $md5_old) {