Skip to content

Commit

Permalink
Merge pull request #941 from cytopia/release/v2.4.0
Browse files Browse the repository at this point in the history
Release/v2.4.0
  • Loading branch information
cytopia authored Dec 18, 2022
2 parents c165fd2 + 826859a commit b5566c1
Show file tree
Hide file tree
Showing 10 changed files with 326 additions and 112 deletions.
4 changes: 2 additions & 2 deletions .devilbox/www/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1');


$DEVILBOX_VERSION = 'v2.3.0';
$DEVILBOX_DATE = '2022-12-04';
$DEVILBOX_VERSION = 'v2.4.0';
$DEVILBOX_DATE = '2022-12-18';
$DEVILBOX_API_PAGE = 'devilbox-api/status.json';

//
Expand Down
84 changes: 68 additions & 16 deletions .devilbox/www/htdocs/_ajax_callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,48 +36,69 @@
//
else if (isset($_GET['software'])) {
$no = '<span class="text-danger">not installed</span>';
$no_mod = '<span class="text-warning">PHP module not loaded</span>';
$software = array();

if ($_GET['software'] == 'composer') {
if ($_GET['software'] == 'angular_cli') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getComposerVersion()) !== false) ? $version : $no
$_GET['software'] => (($version = loadClass('Php')->getAngularCliVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'drupalc') {
else if ($_GET['software'] == 'asgardcms_installer') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getDrupalConsoleVersion()) !== false) ? $version : $no
$_GET['software'] => (($version = loadClass('Php')->getAsgardCmsInstallerVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'drush7') {
else if ($_GET['software'] == 'codeception') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getDrushVersion(7)) !== false) ? $version : $no
$_GET['software'] => (($version = loadClass('Php')->getCodeceptionVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'drush8') {
else if ($_GET['software'] == 'composer') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getDrushVersion(8)) !== false) ? $version : $no
$_GET['software'] => (($version = loadClass('Php')->getComposerVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'drush9') {
else if ($_GET['software'] == 'deployer') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getDrushVersion(9)) !== false) ? $version : $no
$_GET['software'] => (($version = loadClass('Php')->getDeployerVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'git') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getGitVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'laravel') {
else if ($_GET['software'] == 'grunt_cli') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getGruntCliVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'gulp') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getGulpVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'laravel_installer') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getLaravelInstallerVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'laravel_lumen') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getLaravelVersion()) !== false) ? $version : $no
$_GET['software'] => (($version = loadClass('Php')->getLaravelLumenVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'mds') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getMdsVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'mupdf_tools') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getMupdfToolsVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'node') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getNodeVersion()) !== false) ? $version : $no
Expand All @@ -88,20 +109,51 @@
$_GET['software'] => (($version = loadClass('Php')->getNpmVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'phalcon') {
else if ($_GET['software'] == 'phalcon_devtools') {
if (!extension_loaded('phalcon')) {
echo json_encode(array(
$_GET['software'] => $no_mod
));
} else {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getPhalconDevtoolsVersion()) !== false) ? $version : $no
));
}
}
else if ($_GET['software'] == 'phpunit') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getPhpunitVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'stylelint') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getStylelintVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'symfony_cli') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getPhalconVersion()) !== false) ? $version : $no
$_GET['software'] => (($version = loadClass('Php')->getSymfonyCliVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'symfony') {
else if ($_GET['software'] == 'vue_cli') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getSymfonyVersion()) !== false) ? $version : $no
$_GET['software'] => (($version = loadClass('Php')->getVueCliVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'webpack_cli') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getWebpackCliVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'wpcli') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getWpcliVersion()) !== false) ? $version : $no
));
}
else if ($_GET['software'] == 'yarn') {
echo json_encode(array(
$_GET['software'] => (($version = loadClass('Php')->getYarnVersion()) !== false) ? $version : $no
));
} else {
echo json_encode(array($_GET['software'] => 'unknown software'));
}
Expand Down
161 changes: 103 additions & 58 deletions .devilbox/www/htdocs/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,106 +334,104 @@
<div class="row">
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12 col-margin">
<div class="dash-box">
<div class="dash-box-head"><i class="fa fa-info-circle" aria-hidden="true"></i> PHP Container Setup</div>
<div class="dash-box-head"><i class="fa fa-info-circle" aria-hidden="true"></i> Available CLI Tools</div>
<div class="dash-box-body">
<p><small>You can also enter the php container via <code style="background-color:#3d3d3d;">./shell.sh</code> and use the following cli tools:</small></p>
<table class="table table-striped table-hover table-bordered table-sm font-small">
<p><small>You can also enter the php container and work from inside. The following is available inside the container:</small></p>
<thead class="thead-inverse">
<tr>
<th colspan="2">Settings</th>
<th colspan="2">Tools</th>
</tr>
</thead>
<tbody>
<tr>
<th>uid</th>
<td><?php echo loadClass('Php')->getUid(); ?></td>
<th>Angular Cli</th>
<td id="app_angular_cli"></td>
</tr>
<tr>
<th>gid</th>
<td><?php echo loadClass('Php')->getGid(); ?></td>
<th>AsgardCMS Installer</th>
<td id="app_asgardcms_installer"></td>
</tr>
<tr>
<th>vHost docroot dir</th>
<td><?php echo loadClass('Helper')->getEnv('HTTPD_DOCROOT_DIR'); ?></td>
<th>Codeception</th>
<td id="app_codeception"></td>
</tr>
<tr>
<th>vHost config dir</th>
<td><?php echo loadClass('Helper')->getEnv('HTTPD_TEMPLATE_DIR'); ?></td>
<th>Composer</th>
<td id="app_composer"></td>
</tr>
<tr>
<th>vHost TLD</th>
<td>*.<?php echo loadClass('Httpd')->getTldSuffix(); ?></td>
<th>Deployer</th>
<td id="app_deployer"></td>
</tr>
<tr>
<th>DNS</th>
<td><?php if ($avail_dns): ?>Enabled<?php else: ?><span class="text-danger">Offline</span><?php endif;?></td>
<th>Git</th>
<td id="app_git"></td>
</tr>
<tr>
<th>Postfix</th>
<td><?php echo loadClass('Helper')->getEnv('ENABLE_MAIL') ? 'Enabled' : '<span class="bg-danger">No</span> Disabled';?></td>
<th>Grunt Cli</th>
<td id="app_grunt_cli"></td>
</tr>
</tbody>
</table>

<table class="table table-striped table-hover table-bordered table-sm font-small">
<thead class="thead-inverse">
<tr>
<th colspan="2">Tools</th>
<th>Gulp</th>
<td id="app_gulp"></td>
</tr>
</thead>
<tbody>
<tr>
<th>composer</th>
<td id="app_composer"></td>
<th>Laravel Installer</th>
<td id="app_laravel_installer"></td>
</tr>
<tr>
<th>drupal-console</th>
<td id="app_drupalc"></td>
<th>Laravel Lumen</th>
<td id="app_laravel_lumen"></td>
</tr>
<tr>
<th>drush7</th>
<td id="app_drush7"></td>
<th>Mupdf Tools</th>
<td id="app_mupdf_tools"></td>
</tr>
<tr>
<th>drush8</th>
<td id="app_drush8"></td>
<th>mysqldump-secure</th>
<td id="app_mds"></td>
</tr>
<tr>
<th>drush9</th>
<td id="app_drush9"></td>
<th>Node</th>
<td id="app_node"></td>
</tr>
<tr>
<th>git</th>
<td id="app_git"></td>
<th>Npm</th>
<td id="app_npm"></td>
</tr>
<tr>
<th>Laravel installer</th>
<td id="app_laravel"></td>
<th>Phalcon Devtools</th>
<td id="app_phalcon_devtools"></td>
</tr>
<tr>
<th>mysqldump-secure</th>
<td id="app_mds"></td>
<th>Phpunit</th>
<td id="app_phpunit"></td>
</tr>
<tr>
<th>node</th>
<td id="app_node"></td>
<th>Stylelint</th>
<td id="app_stylelint"></td>
</tr>
<tr>
<th>npm</th>
<td id="app_npm"></td>
<th>Symfony Cli</th>
<td id="app_symfony_cli"></td>
</tr>
<tr>
<th>Phalcon devtools</th>
<td id="app_phalcon"></td>
<th>Vue Cli</th>
<td id="app_vue_cli"></td>
</tr>
<tr>
<th>Symfony installer</th>
<td id="app_symfony"></td>
<th>Webpack Cli</th>
<td id="app_webpack_cli"></td>
</tr>
<tr>
<th>Wordpress cli</th>
<th>Wordpress Cli</th>
<td id="app_wpcli"></td>
</tr>
<tr>
<th>Yarn</th>
<td id="app_yarn"></td>
</tr>
</tbody>
</table>

Expand All @@ -445,7 +443,45 @@
<div class="dash-box">
<div class="dash-box-head"><i class="fa fa-info-circle" aria-hidden="true"></i> PHP Container Status</div>
<div class="dash-box-body">
<p><small>The PHP Docker can connect to the following services via the specified hostnames and IP addresses.</small></p>
<p><small>You have made the following base configuration to the Devilbox:</small></p>
<table class="table table-striped table-hover table-bordered table-sm font-small">
<thead class="thead-inverse">
<tr>
<th colspan="2">Settings</th>
</tr>
</thead>
<tbody>
<tr>
<th>uid</th>
<td><?php echo loadClass('Php')->getUid(); ?></td>
</tr>
<tr>
<th>gid</th>
<td><?php echo loadClass('Php')->getGid(); ?></td>
</tr>
<tr>
<th>vHost docroot dir</th>
<td><?php echo loadClass('Helper')->getEnv('HTTPD_DOCROOT_DIR'); ?></td>
</tr>
<tr>
<th>vHost config dir</th>
<td><?php echo loadClass('Helper')->getEnv('HTTPD_TEMPLATE_DIR'); ?></td>
</tr>
<tr>
<th>vHost TLD</th>
<td>*.<?php echo loadClass('Httpd')->getTldSuffix(); ?></td>
</tr>
<tr>
<th>DNS</th>
<td><?php if ($avail_dns): ?>Enabled<?php else: ?><span class="text-danger">Offline</span><?php endif;?></td>
</tr>
<tr>
<th>Postfix</th>
<td><?php echo loadClass('Helper')->getEnv('ENABLE_MAIL') ? 'Enabled' : '<span class="bg-danger">No</span> Disabled';?></td>
</tr>
</tbody>
</table>
<p><small>The PHP container can connect to the following services via the specified hostnames and IP addresses.</small></p>
<table class="table table-striped table-hover table-bordered table-sm font-small">
<thead class="thead-inverse">
<tr>
Expand Down Expand Up @@ -913,19 +949,28 @@ function updateVersions(app) {
xhttp.open('GET', '_ajax_callback.php?software='+app, true);
xhttp.send();
}
updateVersions('angular_cli');
updateVersions('asgardcms_installer');
updateVersions('codeception');
updateVersions('composer');
updateVersions('drupalc');
updateVersions('drush7');
updateVersions('drush8');
updateVersions('drush9');
updateVersions('deployer');
updateVersions('git');
updateVersions('laravel');
updateVersions('grunt_cli');
updateVersions('gulp');
updateVersions('laravel_installer');
updateVersions('laravel_lumen');
updateVersions('mds');
updateVersions('mupdf_tools');
updateVersions('node');
updateVersions('npm');
updateVersions('phalcon');
updateVersions('symfony');
updateVersions('phalcon_devtools');
updateVersions('phpunit');
updateVersions('stylelint');
updateVersions('symfony_cli');
updateVersions('vue_cli');
updateVersions('webpack_cli');
updateVersions('wpcli');
updateVersions('yarn');
})();
</script>
</body>
Expand Down
Loading

0 comments on commit b5566c1

Please sign in to comment.