Improve Client Area (fix #154, fix #155)

This commit is contained in:
Luke S Thompson
2025-08-18 18:02:23 +10:00
parent 335ff949be
commit ecb6a4aa51
10 changed files with 33 additions and 24 deletions

View File

@@ -5,6 +5,10 @@ All notable changes to Proxmox VE for WHMCS will be documented in this file.
### 💅 Polish
- SQL Expansion: Prepare for Nodes/ISOs/TPLs/Logs/SSH Keys/etc
- Client Area: Improved layout and formatting of guest details (#155)
### 🐛 Bug Fix
- Client Area, Swap %: "NaN%" replaced with "0%" for QEMU cases (#154)
https://github.com/The-Network-Crew/Proxmox-VE-for-WHMCS/milestones

View File

@@ -97,6 +97,10 @@ Configured in the _Module_ as detailed below, once you've added/restricted it in
<img alt="Pane/tab where you need to SAVE the module Plan & Pool against the WHMCS Service" src="_images/zProductSave.png">
#### Admin GUI: WHMCS Servers > Links direct to PVE GUI
<img alt="WHMCS Admin > Configuration > Servers interface, showing link button to Proxmox GUI, labelled with the PVE hostname" src="_images/zServerListLink.png">
## 🥽 2. noVNC: Console Tunnel (Client Area)
After forking the module, we considered how to improve security of Console Tunneling via WHMCS. We decided to implement a routing method which uses a secondary user in Proxmox VE with very restrictive permissions.
@@ -130,6 +134,8 @@ After forking the module, we considered how to improve security of Console Tunne
>
> **Note**: Custom WHMCS install folders like /clients/ are not yet VNC-supported. #114
<img alt="Client Area GUI showing the reply which links off to the VNC Console/Client" src="_images/zConsoleReady.png">
### Important info about Console Access
**noVNC has been overhauled. It isn't guaranteed, nor the project at all. :-)**

BIN
_images/zConsoleReady.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

BIN
_images/zServerListLink.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 KiB

After

Width:  |  Height:  |  Size: 286 KiB

View File

@@ -19,7 +19,6 @@
<img src="/modules/servers/pvewhmcs/img/{$vm_status['status']}.png"/><br/>
<span style="text-transform: uppercase"><strong><i>{$vm_status['status']}</i></strong></span><br/>
Up:&nbsp;{$vm_status['uptime']}
</div>
<div class="col col-md-7">
<div class="row">
@@ -57,28 +56,13 @@
<table class="table table-bordered table-striped">
<tr>
<td><strong>IP</strong> (Addressing)</td><td><strong>{$vm_config['ipv4']}</strong><br/>Subnet Mask:&nbsp;{$vm_config['netmask4']}<br/>Gateway:&nbsp;{$vm_config['gateway4']}</td>
</tr>
<tr>
<td><strong>OS/etc</strong> (System)</td>
<td>Kernel:&nbsp;{$vm_config['ostype']}</td>
<td><strong>Memory</strong> (RAM)</td>
<td><strong>{$vm_config['memory']}MB</strong></td>
</tr>
<tr>
<td><strong>Compute</strong> (CPU)</td>
<td>{$vm_config['sockets']}&nbsp;socket/s,&nbsp;{$vm_config['cores']}&nbsp;core/s<br />
Emulation: {$vm_config['cpu']}</td>
</tr>
<tr>
<td><strong>Memory</strong> (RAM)</td>
<td>{$vm_config['memory']}MB</td>
</tr>
<tr>
<td><strong>NIC</strong> (Interface #1)</td>
<td>{($vm_config['net0']|replace:',':'<br/>')}</td>
</tr>
<tr>
<td><strong>NIC</strong> (Interface #2)</td>
<td>{$vm_config['net1']}</td>
<td><strong>{$vm_config['cpu']}&nbsp;{$vm_config['cores']}&nbsp;core/s&nbsp;on&nbsp;{$vm_config['sockets']}&nbsp;socket/s
</strong></td>
</tr>
<tr>
<td><strong>Storage</strong> (SSD/HDD)</td>
@@ -91,6 +75,21 @@
{($vm_config['virtio0']|replace:',':'<br/>')}
</td>
</tr>
<tr>
<td><strong>OS/etc</strong> (System)</td>
<td>Kernel:&nbsp;{$vm_config['ostype']}</td>
</tr>
<tr>
<td><strong>IP</strong> (Addressing)</td><td><strong>{$vm_config['ipv4']}</strong><br/>Mask:&nbsp;{$vm_config['netmask4']}<br/>Gateway:&nbsp;{$vm_config['gateway4']}</td>
</tr>
<tr>
<td><strong>NIC</strong> (Interface #1)</td>
<td>{($vm_config['net0']|replace:',':'<br/>')}</td>
</tr>
<tr>
<td><strong>NIC</strong> (Interface #2)</td>
<td>{$vm_config['net1']}</td>
</tr>
</table>
{if ($smarty.get.a eq 'vmStat')}
<h4>VM Statistics</h4>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -961,10 +961,10 @@ function pvewhmcs_ClientArea($params) {
$ct_specific = $proxmox->get('/nodes/'.$first_node.'/lxc/'.$guest->vmid.'/status/current');
if ($ct_specific['maxswap'] != 0) {
$vm_status['swapusepercent'] = intval($ct_specific['swap'] * 100 / $ct_specific['maxswap']);
} else {
// Fall back to 0% usage to satisfy chart requirement
$vm_status['swapusepercent'] = 0;
}
}
} else {
// Fall back to 0% usage to satisfy chart requirement
$vm_status['swapusepercent'] = 0;
}
} else {
// Handle the VM not found in the cluster resources (Optional)