mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add ability to configure scheduled task time limit
This commit is contained in:
parent
2fd4d6247f
commit
ecd1311a59
2 changed files with 27 additions and 1 deletions
|
@ -40,7 +40,24 @@
|
|||
html += '<li>';
|
||||
|
||||
html += '<a href="#">';
|
||||
|
||||
html += '<h3>';
|
||||
html += ScheduledTaskPage.getTriggerFriendlyName(trigger);
|
||||
html += '</h3>';
|
||||
|
||||
if (trigger.MaxRuntimeMs) {
|
||||
html += '<p>';
|
||||
|
||||
var hours = trigger.MaxRuntimeMs / 3600000;
|
||||
|
||||
if (hours == 1) {
|
||||
html += Globalize.translate('ValueTimeLimitSingleHour');
|
||||
} else {
|
||||
html += Globalize.translate('ValueTimeLimitMultiHour', hours);
|
||||
}
|
||||
html += '</p>';
|
||||
}
|
||||
|
||||
html += '</a>';
|
||||
|
||||
html += '<a href="#" onclick="ScheduledTaskPage.confirmDeleteTrigger(' + i + ');">';
|
||||
|
@ -278,6 +295,11 @@
|
|||
trigger.IntervalTicks = $('#selectInterval', page).val();
|
||||
}
|
||||
|
||||
var timeLimit = $('#txtTimeLimit', page).val() || '0';
|
||||
timeLimit = parseFloat(timeLimit) * 3600000;
|
||||
|
||||
trigger.MaxRuntimeMs = timeLimit || null;
|
||||
|
||||
return trigger;
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue