Skip to content

Commit

Permalink
add check health + update lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc committed Oct 11, 2018
1 parent 4038a81 commit dbfa6dc
Show file tree
Hide file tree
Showing 34 changed files with 652 additions and 631 deletions.
16 changes: 14 additions & 2 deletions core/class/jeedom.class.php
Expand Up @@ -195,6 +195,14 @@ public static function health() {
'comment' => '',
);

$value = self::checkSpaceLeft(self::getTmpFolder());
$return[] = array(
'name' => __('Espace disque libre tmp', __FILE__),
'state' => ($value > 10),
'result' => $value . ' %',
'comment' => __('Si en erreur essayez de redemarrer, si le probleme se poursuit il faut tester en désactivant les plugins un à un jusqu\'à trouver le coupable', __FILE__),
);

$values = getSystemMemInfo();
$value = round(($values['MemAvailable'] / $values['MemTotal']) * 100);
$return[] = array(
Expand Down Expand Up @@ -1165,8 +1173,12 @@ public static function cleanFileSytemRight() {
exec(system::getCmdSudo() . 'chown -R ' . $processUser . ':' . $processGroup . ' ' . $path . ';' . system::getCmdSudo() . 'chmod 775 -R ' . $path);
}

public static function checkSpaceLeft() {
$path = __DIR__ . '/../../';
public static function checkSpaceLeft($_dir = null) {
if ($_dir == null) {
$path = __DIR__ . '/../../';
} else {
$path = $_dir;
}
return round(disk_free_space($path) / disk_total_space($path) * 100);
}

Expand Down
1 change: 1 addition & 0 deletions docs/fr_FR/changelog.md
Expand Up @@ -24,6 +24,7 @@ Changelog
- L'information de mise à jour disponible est maintenant masquée aux utilisateurs non admin
- Amélioration du support des () dans le calcul d'expressions
- Possibilité d'éditer les scénarios en mode text/json
- Ajout sur la page santé d'une verification de l'espace libre pour le tmp Jeedom


3.2.11
Expand Down
2 changes: 1 addition & 1 deletion vendor/composer/autoload_files.php
Expand Up @@ -16,6 +16,6 @@
'5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'bd9634f2d41831496de0d3dfe4c94881' => $vendorDir . '/symfony/polyfill-php56/bootstrap.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'bd9634f2d41831496de0d3dfe4c94881' => $vendorDir . '/symfony/polyfill-php56/bootstrap.php',
);
2 changes: 1 addition & 1 deletion vendor/composer/autoload_static.php
Expand Up @@ -17,8 +17,8 @@ class ComposerStaticInit5a0c414efab2298f121e5cbed8bbcba9
'5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php',
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'bd9634f2d41831496de0d3dfe4c94881' => __DIR__ . '/..' . '/symfony/polyfill-php56/bootstrap.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'bd9634f2d41831496de0d3dfe4c94881' => __DIR__ . '/..' . '/symfony/polyfill-php56/bootstrap.php',
);

public static $prefixLengthsPsr4 = array (
Expand Down

0 comments on commit dbfa6dc

Please sign in to comment.