-make rabbitmq_host configurable via $_SERVER var (.htaccess etc.)
This commit is contained in:
parent
4f546a1bc3
commit
d1de836a92
|
@ -176,8 +176,14 @@ class Application_Model_Systemstatus
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetRabbitMqStatus(){
|
public static function GetRabbitMqStatus(){
|
||||||
$docRoot = self::GetMonitStatus("localhost");
|
|
||||||
|
if (isset($_SERVER["RABBITMQ_HOST"])){
|
||||||
|
$rabbitmq_host = $_SERVER["RABBITMQ_HOST"];
|
||||||
|
} else {
|
||||||
|
$rabbitmq_host = "localhost";
|
||||||
|
}
|
||||||
|
$docRoot = self::GetMonitStatus($rabbitmq_host);
|
||||||
$data = self::ExtractServiceInformation($docRoot, "rabbitmq-server");
|
$data = self::ExtractServiceInformation($docRoot, "rabbitmq-server");
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
@ -192,7 +198,7 @@ class Application_Model_Systemstatus
|
||||||
|
|
||||||
$storPath = Application_Model_MusicDir::getStorDir()->getDirectory();
|
$storPath = Application_Model_MusicDir::getStorDir()->getDirectory();
|
||||||
|
|
||||||
list($usedSpace,) = preg_split("/[\s]+/", exec("du -s $storPath"));
|
list($usedSpace,) = preg_split("/[\s]+/", exec("du -bs $storPath"));
|
||||||
|
|
||||||
$partitions[$totalSpace]->totalSpace = $totalSpace;
|
$partitions[$totalSpace]->totalSpace = $totalSpace;
|
||||||
$partitions[$totalSpace]->totalFreeSpace = $totalSpace - $usedSpace;
|
$partitions[$totalSpace]->totalFreeSpace = $totalSpace - $usedSpace;
|
||||||
|
|
Loading…
Reference in New Issue