Add global CPU core pinning for containers

Should make possible to (re)allocate CPU resources across all containers faster. Currently, it requires manual clicking on thread numbers per container individually, which in a large pool of containers can be very repetitive. The change allows for thread numbers to be clickable, doing so enables or disables thread pinning across all containers.
This commit is contained in:
realies
2018-10-07 19:45:52 +01:00
committed by GitHub
parent 6dde7a8811
commit 9d508a9abc

View File

@@ -126,6 +126,10 @@ function ct() {
$('#table-ct').html(data[0]);
$('#names-ct').val(data[1]);
buttons(document.ct);
// inject global cpu pinning links
$('form[name=ct]').find('thead tr th:gt(1)').each((i, elem) => {
elem.innerHTML = elem.innerHTML.replace(/(\d+)/g, `<a href="javascript:void(0)" data-state="false" onclick="$(this).data('state', !$(this).data('state')); $('form[name=ct]').find('[name$=&quot;:$1&quot;]').prop('checked', $(this).data('state'))">$1</a>`);
});
});
}
function is() {