NPM and Node status

This commit is contained in:
David Bomba 2020-07-21 11:43:59 +10:00
parent 24e64fa911
commit b797c82249
4 changed files with 18 additions and 4 deletions

View File

@ -82,7 +82,7 @@ class SystemHealth
exec('node -v', $foo, $exitCode);
if ($exitCode === 0) {
return $exitCode;
return $foo[0];
}
} catch (\Exception $e) {
@ -98,7 +98,7 @@ class SystemHealth
exec('npm -v', $foo, $exitCode);
if ($exitCode === 0) {
return $exitCode;
return $foo[0];
}
}catch (\Exception $e) {

View File

@ -3238,5 +3238,7 @@ return [
'checkout_authorize_label' => 'Checkout.com can be can saved as payment method for future use, once you complete your first transaction. Don\'t forget to check "Save card" during payment process.',
'node_status_not_found' => 'I could not find Node anywhere. Is it installed?',
'npm_status_not_found' => 'I could not find NPM anywhere. Is it installed?',
];

View File

@ -68,7 +68,7 @@
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
@if($check['npm_status'])
<span class="alert alert-success block flex justify-between items-center">
<span>{{ strtoupper(ctrans('texts.ok')) }}</span>
<span>{{ $check['npm_status'] }} => {{ strtoupper(ctrans('texts.ok')) }}</span>
<span></span>
</span>
@else
@ -86,7 +86,7 @@
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
@if($check['node_status'])
<span class="alert alert-success block flex justify-between items-center">
<span>{{ strtoupper(ctrans('texts.ok')) }}</span>
<span>{{ $check['node_status'] }} => {{ strtoupper(ctrans('texts.ok')) }}</span>
<span></span>
</span>
@else

View File

@ -34,6 +34,18 @@
@include('setup._issues')
@else
@if(!$check['npm_status'])
<div class="alert alert-success mt-4">
<p>NPM Version => {{$check['npm_status']}}</p>
</div>
@endif
@if(!$check['node_status'])
<div class="alert alert-success mt-4">
<p>Node Version => {{$check['node_status']}}</p>
</div>
@endif
@include('setup._application')
@include('setup._database')
@include('setup._mail')