GUI Option for #38 (Debug); Try fix #40 (Error)

Plus more respectful re-arrange of SQL, so we can look to supply update script/function to add missing columns.
This commit is contained in:
Luke S Thompson
2023-09-14 08:27:20 +10:00
parent aca15eb2d3
commit 88720b5f56
3 changed files with 11 additions and 2 deletions

View File

@@ -41,13 +41,13 @@ CREATE TABLE IF NOT EXISTS `mod_pvewhmcs_plans` (
`netmode` varchar(10) DEFAULT NULL,
`bridge` varchar(20) NOT NULL DEFAULT 'vmbr',
`vmbr` tinyint(1) unsigned NOT NULL DEFAULT '0',
`vlanid` varchar(10) DEFAULT NULL,
`netmodel` varchar(10) DEFAULT NULL,
`netrate` varchar(5) DEFAULT '0',
`firewall` tinyint(1) unsigned NOT NULL DEFAULT '0',
`bw` int(6) unsigned DEFAULT '0',
`kvm` tinyint(1) unsigned DEFAULT '0',
`onboot` tinyint(1) unsigned DEFAULT '0',
`vlanid` varchar(10) DEFAULT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE IF NOT EXISTS `mod_pvewhmcs_vms` (

View File

@@ -321,6 +321,14 @@ function pvewhmcs_output($vars) {
<input type="text" size="35" name="vnc_secret" id="vnc_secret" value="'.$config->vnc_secret.'"> Password of "vnc"@"pve" user. Mandatory for VNC proxying. See the <a href="https://github.com/The-Network-Crew/Proxmox-VE-for-WHMCS/wiki" target="_blank">Wiki</a> for more info.
</td>
</tr>
<tr>
<td class="fieldlabel">Debug Mode</td>
<td class="fieldarea">
<label class="checkbox-inline">
<input type="checkbox" name="debug_mode" value="'.$config->debug_mode.'"> Whether or not you want Debug Logging enabled (WHMCS Module Log for Debugging >> /admin/logs/module-log)
</label>
</td>
</tr>
</table>
<div class="btn-container">
<input type="submit" class="btn btn-primary" value="Save Changes" name="save_config" id="save_config">
@@ -348,6 +356,7 @@ function save_config() {
$connectionManager->table('mod_pvewhmcs')->update(
[
'vnc_secret' => $_POST['vnc_secret'],
'debug_mode' => $_POST['debug_mode'],
]
);
}

View File

@@ -756,7 +756,7 @@ function pvewhmcs_ClientArea($params) {
// OUTPUT: VM Statistics/Graphs render to Client Area
function pvewhmcs_vmStat($params) {
return true ;
return true;
}
// VNC: Console access to VM/CT via noVNC