mirror of
https://github.com/unraid/webgui.git
synced 2026-01-10 03:30:03 -06:00
VM: add info box for VM over wireless interface
This commit is contained in:
@@ -44,9 +44,11 @@ input[type=checkbox]{margin-left:0}
|
||||
span.width{display:inline-block;width:280px}
|
||||
span.column1{display:inline-block;width:140px}
|
||||
span.column2{display:inline-block;width:220px}
|
||||
input#btnvCPUSelect{font-size:1rem;padding:5px 10px;margin:0 0 0 10px}
|
||||
input#btnvCPUSelect,input.wlan0_info{font-size:1rem;padding:5px 10px;margin:0 0 0 10px}
|
||||
span.space{display:inline-block;width:60px}
|
||||
span.label{display:inline-block;width:110px;text-align:right}
|
||||
span.ipvtap{margin-left:25px;font-family:bitstream}
|
||||
div.wlan0{text-align:left}
|
||||
select.narrow{min-width:90px!important}
|
||||
select.second{margin-left:12px;max-width:90px;margin-right:0}
|
||||
input.trim{width:98px;min-width:98px}
|
||||
|
||||
@@ -44,11 +44,13 @@ input[type=checkbox]{margin-left:0}
|
||||
span.width{display:inline-block;width:280px}
|
||||
span.column1{display:inline-block;width:140px}
|
||||
span.column2{display:inline-block;width:220px}
|
||||
input#btnvCPUSelect{font-size:1rem;padding:5px 10px;margin:0 0 0 10px}
|
||||
input#btnvCPUSelect,input.wlan0_info{font-size:1rem;padding:5px 10px;margin:0 0 0 10px}
|
||||
span.space{display:inline-block;width:60px}
|
||||
span.label{display:inline-block;width:110px;text-align:right}
|
||||
span.ipvtap{margin-left:25px;font-family:bitstream}
|
||||
select.narrow{min-width:90px!important}
|
||||
select.second{margin-left:12px;max-width:90px;margin-right:0}
|
||||
div.wlan0{text-align:left}
|
||||
input.trim{width:98px;min-width:98px}
|
||||
input.second{margin-left:8px}
|
||||
.autostart~.switch-button-background{margin-top:8px!important;margin-left:0!important}
|
||||
|
||||
@@ -1504,7 +1504,7 @@ foreach ($arrConfig['nic'] as $i => $arrNic) {
|
||||
}
|
||||
$wlan0_hidden = $arrNic['network'] == 'wlan0' ? '' : 'hidden';
|
||||
?>
|
||||
</select><span class="wlan0 orange-text <?=$wlan0_hidden?>"><i class="fa fa-fw fa-warning"></i> _(Requires static IP assignment on the VM and manual configuration of the ipvtap interface)_</span></span>
|
||||
</select><span class="wlan0 orange-text <?=$wlan0_hidden?>"><i class="fa fa-fw fa-warning"></i> _(Requires further manual configuration)_ <input type="button" class="wlan0_info" value="_(Info)_" onclick="wlan0_info()"></span></span>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@@ -1576,7 +1576,7 @@ foreach ($arrConfig['nic'] as $i => $arrNic) {
|
||||
foreach ($arrValidNetworks[$key] as $strNetwork) echo mk_option($domain_bridge, $strNetwork, $strNetwork);
|
||||
}
|
||||
?>
|
||||
</select><span class="wlan0 orange-text hidden"><i class="fa fa-fw fa-warning"></i> _(Requires static IP assignment on the VM and manual configuration of the ipvtap interface)_</span></span>
|
||||
</select><span class="wlan0 orange-text hidden"><i class="fa fa-fw fa-warning"></i> _(Requires further manual configuration)_ <input type="button" class="wlan0_info" value="_(Info)_" onclick="wlan0_info()"></span></span>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@@ -2203,6 +2203,17 @@ function ProtocolChange(protocol) {
|
||||
}
|
||||
}
|
||||
|
||||
function wlan0_info() {
|
||||
swal({
|
||||
title:"_(Manual Configuration Required)_",
|
||||
text:"<div class='wlan0'><i class='fa fa-fw fa-hand-o-right'></i> _(Configure the VM with a static IP address)_<br><br><i class='fa fa-fw fa-hand-o-right'></i> _(Only one VM can be active at the time)_<br><br><i class='fa fa-fw fa-hand-o-right'></i> _(Configure the same IP address on the ipvtap interface)_<br><span class='ipvtap'><i class='fa fa-fw fa-long-arrow-right'></i> ip addr add IP-ADDRESS dev shim-wlan0</span></div>",
|
||||
html:true,
|
||||
animation:"none",
|
||||
type:"info",
|
||||
confirmButtonText:"_(Ok)_"
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
function completeAfter(cm, pred) {
|
||||
var cur = cm.getCursor();
|
||||
@@ -2576,7 +2587,7 @@ $(function() {
|
||||
try {
|
||||
vmrc_window.focus();
|
||||
} catch (e) {
|
||||
swal({title:"_(Browser error)_",text:"_(Pop-up Blocker is enabled! Please add this site to your exception list)_",type:"warning",confirmButtonText:"_(Ok)_"},function(){ done() });
|
||||
swal({title:"_(Browser error)_",text:"_(Pop-up Blocker is enabled! Please add this site to your exception list)_",type:"warning",confirmButtonText:"_(Ok)_"},function(){done();});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user