mirror of
https://github.com/unraid/webgui.git
synced 2026-05-04 08:49:47 -05:00
Prohibit CPU isolation in safe mode
This commit is contained in:
@@ -22,7 +22,11 @@ Tag="leaf"
|
||||
</table>
|
||||
<input type="button" value="Apply" onclick="apply(this.form)" disabled><input type="button" value="Done" onclick="done()"><span id="wait-is" class="red-text" style="display:none"><i class="fa fa-spinner fa-spin"></i> Please wait...</span>
|
||||
</form>
|
||||
<?if (!$safemode):?>
|
||||
<div class="notice isol" style="display:none">System must be rebooted for changes to take effect!</div>
|
||||
<?else:?>
|
||||
<div class="notice">CPU isolation is prohibited while system is running in SAFE MODE!</div>
|
||||
<?endif;?>
|
||||
|
||||
> CPU isolation allows the user to specify CPU cores that are to be explicitly reserved for assignment (to VMs or Docker containers).
|
||||
>
|
||||
|
||||
@@ -16,7 +16,8 @@ Tag="map-marker"
|
||||
?>
|
||||
<?
|
||||
$libvirtd = pgrep('libvirtd')!==false;
|
||||
$dockerd = pgrep('dockerd')!==false;
|
||||
$dockerd = pgrep('dockerd')!==false;
|
||||
$safemode = strpos(file_get_contents('/proc/cmdline'),'unraidsafemode')!==false;
|
||||
|
||||
$cpus = cpu_list();
|
||||
$total = count($cpus);
|
||||
@@ -132,6 +133,9 @@ function is() {
|
||||
$.post('/webGui/include/CPUset.php',{id:'is',cpus:'<?=$cpuset?>'},function(d){
|
||||
$('#table-is').html(d);
|
||||
buttons(document.is);
|
||||
<?if ($safemode):?>
|
||||
$('#table-is').find('input[type=checkbox]').prop('disabled',true);
|
||||
<?endif;?>
|
||||
});
|
||||
}
|
||||
function notice() {
|
||||
|
||||
Reference in New Issue
Block a user