CC-2807: Remove AIRTIME_VERSION from constants.php and use the value in the database instead

-done
This commit is contained in:
martin 2011-09-23 16:26:19 -04:00
parent e60db9e031
commit cd95170b06
10 changed files with 94 additions and 147 deletions

View file

@ -174,11 +174,6 @@ class Application_Model_Systemstatus
return $data;
}
public static function GetAirtimeVersion(){
return AIRTIME_VERSION;
}
public static function GetDiskInfo(){
/* First lets get all the watched directories. Then we can group them
* into the same paritions by comparing the partition sizes. */
@ -202,58 +197,4 @@ class Application_Model_Systemstatus
return array_values($partitions);
}
/*
private function getCheckSystemResults(){
//exec("airtime-check-system", $output);
require_once "/usr/lib/airtime/utils/airtime-check-system.php";
$arrs = AirtimeCheck::CheckAirtimeDaemons();
$status = array("AIRTIME_VERSION" => AIRTIME_VERSION);
foreach($arrs as $arr){
$status[$arr[0]] = $arr[1];
}
$storDir = Application_Model_MusicDir::getStorDir()->getDirectory();
$freeSpace = disk_free_space($storDir);
$totalSpace = disk_total_space($storDir);
$status["DISK_SPACE"] = sprintf("%01.3f%%", $freeSpace/$totalSpace*100);
return $status;
}
public function getResults(){
$keyValues = $this->getCheckSystemResults();
$results = array();
$key = "AIRTIME_VERSION";
$results[$key] = array("Airtime Version", $keyValues[$key], false);
$triplets = array(array("PLAYOUT_ENGINE_RUNNING_SECONDS", "Playout Engine Status", true),
array("LIQUIDSOAP_RUNNING_SECONDS", "Liquidsoap Status", true),
array("MEDIA_MONITOR_RUNNING_SECONDS", "Media-Monitor Status", true),
array("SHOW_RECORDER_RUNNING_SECONDS", "Show-Recorder Status", true));
foreach($triplets as $triple){
list($key, $desc, $downloadLog) = $triple;
$results[$key] = array($desc, $this->convertRunTimeToPassFail($keyValues[$key]), $downloadLog);
}
$key = "DISK_SPACE";
$results[$key] = array("Disk Space Free: ", $keyValues[$key], false);
return $results;
}
private function convertRunTimeToPassFail($runTime){
return $runTime > 3 ? "Pass" : "Fail";
}
*/
}