Intranet: Show wscat version

This commit is contained in:
cytopia 2022-12-31 06:05:19 +01:00
parent 794e3d8961
commit 0b561dfdd2
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2
5 changed files with 31 additions and 2 deletions

View File

@ -13,8 +13,8 @@ error_reporting(-1);
putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1');
$DEVILBOX_VERSION = 'v3.0.0-beta-0.2';
$DEVILBOX_DATE = '2022-12-27';
$DEVILBOX_VERSION = 'v3.0.0-beta-0.3';
$DEVILBOX_DATE = '2022-12-31';
$DEVILBOX_API_PAGE = 'devilbox-api/status.json';
//

View File

@ -150,6 +150,11 @@ if (loadClass('Helper')->isLoggedIn()) {
$_GET['software'] => (($version = loadClass('Php')->getWpcliVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'wscat') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getWscatVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'yarn') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getYarnVersion()) !== false) ? $version : $no

View File

@ -428,6 +428,10 @@ $HEALTH_PERCENT = 100 - ceil(100 * $HEALTH_FAILS / $HEALTH_TOTAL);
<th>Wordpress Cli</th>
<td id="app_wpcli"></td>
</tr>
<tr>
<th>Wscat</th>
<td id="app_wscat"></td>
</tr>
<tr>
<th>Yarn</th>
<td id="app_yarn"></td>
@ -970,6 +974,7 @@ $HEALTH_PERCENT = 100 - ceil(100 * $HEALTH_FAILS / $HEALTH_TOTAL);
updateVersions('vue_cli');
updateVersions('webpack_cli');
updateVersions('wpcli');
updateVersions('wscat');
updateVersions('yarn');
})();
</script>

View File

@ -140,6 +140,11 @@ class Php extends BaseClass implements BaseInterface
$output = loadClass('Helper')->exec('wp --version 2>/dev/null | grep -i ^WP', $output);
return loadClass('Helper')->egrep('/[0-9.]+/', $output);
}
public function getWscatVersion()
{
$output = loadClass('Helper')->exec('wscat --version 2>/dev/null | head -1', $output);
return loadClass('Helper')->egrep('/[0-9.]+/', $output);
}
public function getYarnVersion()
{
$output = loadClass('Helper')->exec('yarn --version 2>/dev/null', $output);

View File

@ -6,6 +6,20 @@ Make sure to have a look at [UPDATING.md](https://github.com/cytopia/devilbox/bl
## Unreleased
## Release v3.0.0-beta-0.3 (2022-12-31)
### Fixed
- Intranet: mail.php fixed deprecation warnings [#798](https://github.com/cytopia/devilbox/issues/798)
### Changed
- Use `dvl.to` as default `TLD_SUFFIX` (it always poits to `127.0.0.1` removing the need to create `/etc/hosts` entries)
### Added
- Intranet: vhost overview shows listening ports
- Intranet: vhost overview now has modals to show httpd and vhost-gen configs
- Docs: Show available tools per version in README.md
## Release v3.0.0-beta-0.2 (2022-12-27)
The Backend configuration now supports websockets as well: