diff --git a/css/style.css b/css/style.css index b3603e7d..9baedcc0 100644 --- a/css/style.css +++ b/css/style.css @@ -316,3 +316,24 @@ .cpu-wrapper { width: 100%; } + +.server-info-table table { + width: 100%; +} + +.server-info-table td { + padding: 6px; +} + +.server-info__tag-wrapper { + display: flex; + flex-wrap: wrap; +} + +.server-info__php-extension-tag { + display: inline-block; + margin: 2px; + padding: 2px 12px; + border-radius: 16px; + border: 1px solid var(--color-main-text); +} \ No newline at end of file diff --git a/lib/PhpStatistics.php b/lib/PhpStatistics.php index 289ad64e..c2b39248 100644 --- a/lib/PhpStatistics.php +++ b/lib/PhpStatistics.php @@ -101,9 +101,15 @@ protected function getAPCuStatus(): array { /** * Get all loaded php extensions * - * @return array of strings with the names of the loaded extensions + * @return array|null of strings with the names of the loaded extensions */ protected function getLoadedPhpExtensions(): ?array { - return (function_exists('get_loaded_extensions') ? get_loaded_extensions() : null); + if (!function_exists('get_loaded_extensions')) { + return null; + } + $extensions = get_loaded_extensions(); + sort($extensions); + + return $extensions; } } diff --git a/templates/settings-admin.php b/templates/settings-admin.php index cffaeede..f537eb3a 100644 --- a/templates/settings-admin.php +++ b/templates/settings-admin.php @@ -57,13 +57,34 @@ function FormatMegabytes(int $byte): string { -

t('Operating System:')); ?>

-

t('CPU:')); ?> getName()) ?> (getThreads() ?> t('threads')); ?>)

-

t('Memory:')); ?> - getMemTotal() > 0): ?> getMemTotal())) ?>

- -

t('Server time:')); ?>

-

t('Uptime:')); ?>

+
+ + + + + + + + + + + getMemTotal() > 0): ?> + + + + + + + + + + + + + + +
t('Operating System:')); ?>
t('CPU:')); ?>getName()) ?> (getThreads() ?> t('threads')); ?>)
t('Memory:')); ?>getMemTotal())) ?>
t('Server time:')); ?>
t('Uptime:')); ?>
+
0): ?> @@ -335,93 +356,110 @@ function FormatMegabytes(int $byte): string { t('PHP')); ?> -
-
-

- t('Version:')); ?> - -

-

- t('Memory limit:')); ?> - -

-

- t('Max execution time:')); ?> - -

-

- t('Upload max size:')); ?> - -

-

- t('OPcache Revalidate Frequency:')); ?> - -

-

- t('Extensions:')); ?> - t('Unable to list extensions')); ?> -

- -

- t('Show phpinfo')) ?> -

- -
-
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
t('Version:')); ?>
t('Memory limit:')); ?> t('MB')); ?>
t('Max execution time:')); ?> t('seconds')); ?>
t('Upload max size:')); ?> t('MB')); ?>
t('OPcache Revalidate Frequency:')); ?> t('seconds')); ?>
t('Extensions:')); ?>
+ + t('Unable to list extensions'); + endif; +?> +
t('PHP Info:')); ?> + t('Show phpinfo')) ?> +
+

t('FPM worker pool')); ?>

-
-
-

- t('Pool name:')); ?> - -

-

- t('Pool type:')); ?> - -

-

- t('Start time:')); ?> - -

-

- t('Accepted connections:')); ?> - -

-

- t('Total processes:')); ?> - -

-

- t('Active processes:')); ?> - -

-

- t('Idle processes:')); ?> - -

-

- t('Listen queue:')); ?> - -

-

- t('Slow requests:')); ?> - -

-

- t('Max listen queue:')); ?> - -

-

- t('Max active processes:')); ?> - -

-

- t('Max children reached:')); ?> - -

-
-
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
t('Pool name:')); ?>
t('Pool type:')); ?>
t('Start time:')); ?>
t('Accepted connections:')); ?>
t('Total processes:')); ?>
t('Active processes:')); ?>
t('Idle processes:')); ?>
t('Listen queue:')); ?>
t('Slow requests:')); ?>
t('Max listen queue:')); ?>
t('Max active processes:')); ?>
t('Max children reached:')); ?>
+
@@ -431,22 +469,24 @@ function FormatMegabytes(int $byte): string { t('Database')); ?> -
-
-

- t('Type:')); ?> - -

-

- t('Version:')); ?> - -

-

- t('Size:')); ?> - -

-
-
+
+ + + + + + + + + + + + + + + +
t('Type:')); ?>
t('Version:')); ?>
t('Size:')); ?> t('MB')); ?>
+