Skip to content

Commit

Permalink
Merge pull request #22434 from glefloch/fix/22335
Browse files Browse the repository at this point in the history
Add the abilty to filter schedulers in dev-ui
  • Loading branch information
mkouba authored Dec 21, 2021
2 parents 3cc2737 + a95c743 commit 3a9f0dd
Showing 1 changed file with 34 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,25 @@
color:blue;
text-decoration:underline;
}

.formInputButton:hover {
color: #3366ac !important;
cursor: pointer;
}

#filterInputGroup {
padding-bottom: 10px;
}
{/style}
{#script}
$(document).ready(function(){
$("#filterInput").on("keyup", function() {
var value = $(this).val().toLowerCase();
$(".schedulerTable tr").filter(function() {
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);
});
});

if (!ideKnown()) {
return;
}
Expand All @@ -23,6 +39,16 @@
openInIDE($(this).text());
});
});

function clearFilterInput(){
$("#filterInput").val("");
$(".schedulerTable tr").filter(function() {
if(!$(this).is(":visible")){
$(this).toggle(true)
}
});
}

{/script}
{#body}
{#if info:scheduler.running}
Expand All @@ -39,6 +65,13 @@
</form>
{/if}
<hr/>
<div id="filterInputGroup" class="input-group application-properties-form">
<input id="filterInput" type="text" class="form-control" aria-describedby="filterInputPrepend" placeholder="Search...">
<div class="input-group-append">
<span class="input-group-text formInputButton" onclick="clearFilterInput();"><i class="fas fa-times"></i></span>
</div>
</div>

<table class="table table-striped">
<thead class="thead-dark">
<tr>
Expand All @@ -48,7 +81,7 @@
<th scope="col">Actions</th>
</tr>
</thead>
<tbody>
<tbody class="schedulerTable">
{#for scheduledMethod in info:schedulerContext.scheduledMethods}
<tr>
<td>{scheduledMethod_count}.</td>
Expand Down

0 comments on commit 3a9f0dd

Please sign in to comment.