Apply suggestions
This commit is contained in:
parent
60329961b5
commit
05e26e6588
9 changed files with 12 additions and 9 deletions
|
@ -66,8 +66,10 @@ define(["jQuery", "loading", "events", "globalize", "serverNotifications", "date
|
|||
var html = "";
|
||||
if (task.State === "Idle") {
|
||||
if (task.LastExecutionResult) {
|
||||
html += globalize.translate("LabelScheduledTaskLastRan", datefns.formatDistanceToNow(Date.parse(task.LastExecutionResult.EndTimeUtc), { addSuffix: true, locale: dfnshelper.getLocale() }),
|
||||
datefns.formatDistance(Date.parse(task.LastExecutionResult.StartTimeUtc), Date.parse(task.LastExecutionResult.EndTimeUtc), { addSuffix: false, locale: dfnshelper.getLocale() }));
|
||||
var endtime = Date.parse(task.LastExecutionResult.EndTimeUtc);
|
||||
var starttime = Date.parse(task.LastExecutionResult.StartTimeUtc);
|
||||
html += globalize.translate("LabelScheduledTaskLastRan", datefns.formatDistanceToNow(endtime, dfnshelper.localeWithSuffix),
|
||||
datefns.formatDistance(starttime, endtime, dfnshelper.localeWithSuffix));
|
||||
if (task.LastExecutionResult.Status === "Failed") {
|
||||
html += " <span style='color:#FF0000;'>(" + globalize.translate("LabelFailed") + ")</span>";
|
||||
} else if (task.LastExecutionResult.Status === "Cancelled") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue