Skip to content

Commit b5566c1

Browse files
authored
Merge pull request #941 from cytopia/release/v2.4.0
Release/v2.4.0
2 parents c165fd2 + 826859a commit b5566c1

File tree

10 files changed

+326
-112
lines changed

10 files changed

+326
-112
lines changed

.devilbox/www/config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1');
1414

1515

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

2020
//

.devilbox/www/htdocs/_ajax_callback.php

Lines changed: 68 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,48 +36,69 @@
3636
//
3737
else if (isset($_GET['software'])) {
3838
$no = '<span class="text-danger">not installed</span>';
39+
$no_mod = '<span class="text-warning">PHP module not loaded</span>';
3940
$software = array();
4041

41-
if ($_GET['software'] == 'composer') {
42+
if ($_GET['software'] == 'angular_cli') {
4243
echo json_encode(array(
43-
$_GET['software'] => (($version = loadClass('Php')->getComposerVersion()) !== false) ? $version : $no
44+
$_GET['software'] => (($version = loadClass('Php')->getAngularCliVersion()) !== false) ? $version : $no
4445
));
4546
}
46-
else if ($_GET['software'] == 'drupalc') {
47+
else if ($_GET['software'] == 'asgardcms_installer') {
4748
echo json_encode(array(
48-
$_GET['software'] => (($version = loadClass('Php')->getDrupalConsoleVersion()) !== false) ? $version : $no
49+
$_GET['software'] => (($version = loadClass('Php')->getAsgardCmsInstallerVersion()) !== false) ? $version : $no
4950
));
5051
}
51-
else if ($_GET['software'] == 'drush7') {
52+
else if ($_GET['software'] == 'codeception') {
5253
echo json_encode(array(
53-
$_GET['software'] => (($version = loadClass('Php')->getDrushVersion(7)) !== false) ? $version : $no
54+
$_GET['software'] => (($version = loadClass('Php')->getCodeceptionVersion()) !== false) ? $version : $no
5455
));
5556
}
56-
else if ($_GET['software'] == 'drush8') {
57+
else if ($_GET['software'] == 'composer') {
5758
echo json_encode(array(
58-
$_GET['software'] => (($version = loadClass('Php')->getDrushVersion(8)) !== false) ? $version : $no
59+
$_GET['software'] => (($version = loadClass('Php')->getComposerVersion()) !== false) ? $version : $no
5960
));
6061
}
61-
else if ($_GET['software'] == 'drush9') {
62+
else if ($_GET['software'] == 'deployer') {
6263
echo json_encode(array(
63-
$_GET['software'] => (($version = loadClass('Php')->getDrushVersion(9)) !== false) ? $version : $no
64+
$_GET['software'] => (($version = loadClass('Php')->getDeployerVersion()) !== false) ? $version : $no
6465
));
6566
}
6667
else if ($_GET['software'] == 'git') {
6768
echo json_encode(array(
6869
$_GET['software'] => (($version = loadClass('Php')->getGitVersion()) !== false) ? $version : $no
6970
));
7071
}
71-
else if ($_GET['software'] == 'laravel') {
72+
else if ($_GET['software'] == 'grunt_cli') {
73+
echo json_encode(array(
74+
$_GET['software'] => (($version = loadClass('Php')->getGruntCliVersion()) !== false) ? $version : $no
75+
));
76+
}
77+
else if ($_GET['software'] == 'gulp') {
78+
echo json_encode(array(
79+
$_GET['software'] => (($version = loadClass('Php')->getGulpVersion()) !== false) ? $version : $no
80+
));
81+
}
82+
else if ($_GET['software'] == 'laravel_installer') {
83+
echo json_encode(array(
84+
$_GET['software'] => (($version = loadClass('Php')->getLaravelInstallerVersion()) !== false) ? $version : $no
85+
));
86+
}
87+
else if ($_GET['software'] == 'laravel_lumen') {
7288
echo json_encode(array(
73-
$_GET['software'] => (($version = loadClass('Php')->getLaravelVersion()) !== false) ? $version : $no
89+
$_GET['software'] => (($version = loadClass('Php')->getLaravelLumenVersion()) !== false) ? $version : $no
7490
));
7591
}
7692
else if ($_GET['software'] == 'mds') {
7793
echo json_encode(array(
7894
$_GET['software'] => (($version = loadClass('Php')->getMdsVersion()) !== false) ? $version : $no
7995
));
8096
}
97+
else if ($_GET['software'] == 'mupdf_tools') {
98+
echo json_encode(array(
99+
$_GET['software'] => (($version = loadClass('Php')->getMupdfToolsVersion()) !== false) ? $version : $no
100+
));
101+
}
81102
else if ($_GET['software'] == 'node') {
82103
echo json_encode(array(
83104
$_GET['software'] => (($version = loadClass('Php')->getNodeVersion()) !== false) ? $version : $no
@@ -88,20 +109,51 @@
88109
$_GET['software'] => (($version = loadClass('Php')->getNpmVersion()) !== false) ? $version : $no
89110
));
90111
}
91-
else if ($_GET['software'] == 'phalcon') {
112+
else if ($_GET['software'] == 'phalcon_devtools') {
113+
if (!extension_loaded('phalcon')) {
114+
echo json_encode(array(
115+
$_GET['software'] => $no_mod
116+
));
117+
} else {
118+
echo json_encode(array(
119+
$_GET['software'] => (($version = loadClass('Php')->getPhalconDevtoolsVersion()) !== false) ? $version : $no
120+
));
121+
}
122+
}
123+
else if ($_GET['software'] == 'phpunit') {
124+
echo json_encode(array(
125+
$_GET['software'] => (($version = loadClass('Php')->getPhpunitVersion()) !== false) ? $version : $no
126+
));
127+
}
128+
else if ($_GET['software'] == 'stylelint') {
129+
echo json_encode(array(
130+
$_GET['software'] => (($version = loadClass('Php')->getStylelintVersion()) !== false) ? $version : $no
131+
));
132+
}
133+
else if ($_GET['software'] == 'symfony_cli') {
92134
echo json_encode(array(
93-
$_GET['software'] => (($version = loadClass('Php')->getPhalconVersion()) !== false) ? $version : $no
135+
$_GET['software'] => (($version = loadClass('Php')->getSymfonyCliVersion()) !== false) ? $version : $no
94136
));
95137
}
96-
else if ($_GET['software'] == 'symfony') {
138+
else if ($_GET['software'] == 'vue_cli') {
97139
echo json_encode(array(
98-
$_GET['software'] => (($version = loadClass('Php')->getSymfonyVersion()) !== false) ? $version : $no
140+
$_GET['software'] => (($version = loadClass('Php')->getVueCliVersion()) !== false) ? $version : $no
141+
));
142+
}
143+
else if ($_GET['software'] == 'webpack_cli') {
144+
echo json_encode(array(
145+
$_GET['software'] => (($version = loadClass('Php')->getWebpackCliVersion()) !== false) ? $version : $no
99146
));
100147
}
101148
else if ($_GET['software'] == 'wpcli') {
102149
echo json_encode(array(
103150
$_GET['software'] => (($version = loadClass('Php')->getWpcliVersion()) !== false) ? $version : $no
104151
));
152+
}
153+
else if ($_GET['software'] == 'yarn') {
154+
echo json_encode(array(
155+
$_GET['software'] => (($version = loadClass('Php')->getYarnVersion()) !== false) ? $version : $no
156+
));
105157
} else {
106158
echo json_encode(array($_GET['software'] => 'unknown software'));
107159
}

.devilbox/www/htdocs/index.php

Lines changed: 103 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -334,106 +334,104 @@
334334
<div class="row">
335335
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12 col-margin">
336336
<div class="dash-box">
337-
<div class="dash-box-head"><i class="fa fa-info-circle" aria-hidden="true"></i> PHP Container Setup</div>
337+
<div class="dash-box-head"><i class="fa fa-info-circle" aria-hidden="true"></i> Available CLI Tools</div>
338338
<div class="dash-box-body">
339+
<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>
339340
<table class="table table-striped table-hover table-bordered table-sm font-small">
340-
<p><small>You can also enter the php container and work from inside. The following is available inside the container:</small></p>
341341
<thead class="thead-inverse">
342342
<tr>
343-
<th colspan="2">Settings</th>
343+
<th colspan="2">Tools</th>
344344
</tr>
345345
</thead>
346346
<tbody>
347347
<tr>
348-
<th>uid</th>
349-
<td><?php echo loadClass('Php')->getUid(); ?></td>
348+
<th>Angular Cli</th>
349+
<td id="app_angular_cli"></td>
350350
</tr>
351351
<tr>
352-
<th>gid</th>
353-
<td><?php echo loadClass('Php')->getGid(); ?></td>
352+
<th>AsgardCMS Installer</th>
353+
<td id="app_asgardcms_installer"></td>
354354
</tr>
355355
<tr>
356-
<th>vHost docroot dir</th>
357-
<td><?php echo loadClass('Helper')->getEnv('HTTPD_DOCROOT_DIR'); ?></td>
356+
<th>Codeception</th>
357+
<td id="app_codeception"></td>
358358
</tr>
359359
<tr>
360-
<th>vHost config dir</th>
361-
<td><?php echo loadClass('Helper')->getEnv('HTTPD_TEMPLATE_DIR'); ?></td>
360+
<th>Composer</th>
361+
<td id="app_composer"></td>
362362
</tr>
363363
<tr>
364-
<th>vHost TLD</th>
365-
<td>*.<?php echo loadClass('Httpd')->getTldSuffix(); ?></td>
364+
<th>Deployer</th>
365+
<td id="app_deployer"></td>
366366
</tr>
367367
<tr>
368-
<th>DNS</th>
369-
<td><?php if ($avail_dns): ?>Enabled<?php else: ?><span class="text-danger">Offline</span><?php endif;?></td>
368+
<th>Git</th>
369+
<td id="app_git"></td>
370370
</tr>
371371
<tr>
372-
<th>Postfix</th>
373-
<td><?php echo loadClass('Helper')->getEnv('ENABLE_MAIL') ? 'Enabled' : '<span class="bg-danger">No</span> Disabled';?></td>
372+
<th>Grunt Cli</th>
373+
<td id="app_grunt_cli"></td>
374374
</tr>
375-
</tbody>
376-
</table>
377-
378-
<table class="table table-striped table-hover table-bordered table-sm font-small">
379-
<thead class="thead-inverse">
380375
<tr>
381-
<th colspan="2">Tools</th>
376+
<th>Gulp</th>
377+
<td id="app_gulp"></td>
382378
</tr>
383-
</thead>
384-
<tbody>
385379
<tr>
386-
<th>composer</th>
387-
<td id="app_composer"></td>
380+
<th>Laravel Installer</th>
381+
<td id="app_laravel_installer"></td>
388382
</tr>
389383
<tr>
390-
<th>drupal-console</th>
391-
<td id="app_drupalc"></td>
384+
<th>Laravel Lumen</th>
385+
<td id="app_laravel_lumen"></td>
392386
</tr>
393387
<tr>
394-
<th>drush7</th>
395-
<td id="app_drush7"></td>
388+
<th>Mupdf Tools</th>
389+
<td id="app_mupdf_tools"></td>
396390
</tr>
397391
<tr>
398-
<th>drush8</th>
399-
<td id="app_drush8"></td>
392+
<th>mysqldump-secure</th>
393+
<td id="app_mds"></td>
400394
</tr>
401395
<tr>
402-
<th>drush9</th>
403-
<td id="app_drush9"></td>
396+
<th>Node</th>
397+
<td id="app_node"></td>
404398
</tr>
405399
<tr>
406-
<th>git</th>
407-
<td id="app_git"></td>
400+
<th>Npm</th>
401+
<td id="app_npm"></td>
408402
</tr>
409403
<tr>
410-
<th>Laravel installer</th>
411-
<td id="app_laravel"></td>
404+
<th>Phalcon Devtools</th>
405+
<td id="app_phalcon_devtools"></td>
412406
</tr>
413407
<tr>
414-
<th>mysqldump-secure</th>
415-
<td id="app_mds"></td>
408+
<th>Phpunit</th>
409+
<td id="app_phpunit"></td>
416410
</tr>
417411
<tr>
418-
<th>node</th>
419-
<td id="app_node"></td>
412+
<th>Stylelint</th>
413+
<td id="app_stylelint"></td>
420414
</tr>
421415
<tr>
422-
<th>npm</th>
423-
<td id="app_npm"></td>
416+
<th>Symfony Cli</th>
417+
<td id="app_symfony_cli"></td>
424418
</tr>
425419
<tr>
426-
<th>Phalcon devtools</th>
427-
<td id="app_phalcon"></td>
420+
<th>Vue Cli</th>
421+
<td id="app_vue_cli"></td>
428422
</tr>
429423
<tr>
430-
<th>Symfony installer</th>
431-
<td id="app_symfony"></td>
424+
<th>Webpack Cli</th>
425+
<td id="app_webpack_cli"></td>
432426
</tr>
433427
<tr>
434-
<th>Wordpress cli</th>
428+
<th>Wordpress Cli</th>
435429
<td id="app_wpcli"></td>
436430
</tr>
431+
<tr>
432+
<th>Yarn</th>
433+
<td id="app_yarn"></td>
434+
</tr>
437435
</tbody>
438436
</table>
439437

@@ -445,7 +443,45 @@
445443
<div class="dash-box">
446444
<div class="dash-box-head"><i class="fa fa-info-circle" aria-hidden="true"></i> PHP Container Status</div>
447445
<div class="dash-box-body">
448-
<p><small>The PHP Docker can connect to the following services via the specified hostnames and IP addresses.</small></p>
446+
<p><small>You have made the following base configuration to the Devilbox:</small></p>
447+
<table class="table table-striped table-hover table-bordered table-sm font-small">
448+
<thead class="thead-inverse">
449+
<tr>
450+
<th colspan="2">Settings</th>
451+
</tr>
452+
</thead>
453+
<tbody>
454+
<tr>
455+
<th>uid</th>
456+
<td><?php echo loadClass('Php')->getUid(); ?></td>
457+
</tr>
458+
<tr>
459+
<th>gid</th>
460+
<td><?php echo loadClass('Php')->getGid(); ?></td>
461+
</tr>
462+
<tr>
463+
<th>vHost docroot dir</th>
464+
<td><?php echo loadClass('Helper')->getEnv('HTTPD_DOCROOT_DIR'); ?></td>
465+
</tr>
466+
<tr>
467+
<th>vHost config dir</th>
468+
<td><?php echo loadClass('Helper')->getEnv('HTTPD_TEMPLATE_DIR'); ?></td>
469+
</tr>
470+
<tr>
471+
<th>vHost TLD</th>
472+
<td>*.<?php echo loadClass('Httpd')->getTldSuffix(); ?></td>
473+
</tr>
474+
<tr>
475+
<th>DNS</th>
476+
<td><?php if ($avail_dns): ?>Enabled<?php else: ?><span class="text-danger">Offline</span><?php endif;?></td>
477+
</tr>
478+
<tr>
479+
<th>Postfix</th>
480+
<td><?php echo loadClass('Helper')->getEnv('ENABLE_MAIL') ? 'Enabled' : '<span class="bg-danger">No</span> Disabled';?></td>
481+
</tr>
482+
</tbody>
483+
</table>
484+
<p><small>The PHP container can connect to the following services via the specified hostnames and IP addresses.</small></p>
449485
<table class="table table-striped table-hover table-bordered table-sm font-small">
450486
<thead class="thead-inverse">
451487
<tr>
@@ -913,19 +949,28 @@ function updateVersions(app) {
913949
xhttp.open('GET', '_ajax_callback.php?software='+app, true);
914950
xhttp.send();
915951
}
952+
updateVersions('angular_cli');
953+
updateVersions('asgardcms_installer');
954+
updateVersions('codeception');
916955
updateVersions('composer');
917-
updateVersions('drupalc');
918-
updateVersions('drush7');
919-
updateVersions('drush8');
920-
updateVersions('drush9');
956+
updateVersions('deployer');
921957
updateVersions('git');
922-
updateVersions('laravel');
958+
updateVersions('grunt_cli');
959+
updateVersions('gulp');
960+
updateVersions('laravel_installer');
961+
updateVersions('laravel_lumen');
923962
updateVersions('mds');
963+
updateVersions('mupdf_tools');
924964
updateVersions('node');
925965
updateVersions('npm');
926-
updateVersions('phalcon');
927-
updateVersions('symfony');
966+
updateVersions('phalcon_devtools');
967+
updateVersions('phpunit');
968+
updateVersions('stylelint');
969+
updateVersions('symfony_cli');
970+
updateVersions('vue_cli');
971+
updateVersions('webpack_cli');
928972
updateVersions('wpcli');
973+
updateVersions('yarn');
929974
})();
930975
</script>
931976
</body>

0 commit comments

Comments
 (0)