Feature #25: Job General Preferences
Initially to make 'long running job threshold' configurable. Updates to ManagedJobList and fix for missing GetClaimKeys method (#24).
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
@model Disco.Web.Areas.Config.Models.JobPreferences.IndexModel
|
||||
@{
|
||||
Authorization.Require(Claims.Config.JobPreferences.Show);
|
||||
|
||||
var canConfig = Authorization.Has(Claims.Config.JobPreferences.Configure);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Job Preferences");
|
||||
|
||||
if (canConfig)
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
|
||||
}
|
||||
}
|
||||
<div class="form" style="width: 530px;">
|
||||
<h2>General Preferences</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 200px">Long Running Threshold:
|
||||
</th>
|
||||
<td>@if (canConfig)
|
||||
{
|
||||
@Html.DropDownListFor(model => model.LongRunningJobDaysThreshold, Model.LongRunningJobDaysThresholdOptions().Select(o => new SelectListItem() { Value = o.Key.ToString(), Text = o.Value }))
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#LongRunningJobDaysThreshold'),
|
||||
null,
|
||||
'@(Url.Action(MVC.API.JobPreferences.UpdateLongRunningJobDaysThreshold()))',
|
||||
'LongRunningJobDaysThreshold');
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.LongRunningJobDaysThresholdOptions().First(o => o.Key == Model.LongRunningJobDaysThreshold).Value
|
||||
}
|
||||
<div class="smallMessage">
|
||||
Jobs which have been open for longer than the threshold are considered 'long-running' and will appear in the <code>Long Running Jobs</code> list.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
Reference in New Issue
Block a user