Merge pull request #1289 from mafoo/Enhance-app/system
Enhance app system
This commit is contained in:
commit
44f528f744
|
|
@ -80,6 +80,16 @@ $text['label-os']['sv-se'] = "Operativsystem";
|
|||
$text['label-os']['uk'] = "Операційна система ";
|
||||
$text['label-os']['de-at'] = "Betriebssystem";
|
||||
|
||||
$text['label-version']['en-us'] = "Version";
|
||||
$text['label-version']['es-cl'] = "";
|
||||
$text['label-version']['pt-pt'] = "";
|
||||
$text['label-version']['fr-fr'] = "";
|
||||
$text['label-version']['pt-br'] = "";
|
||||
$text['label-version']['pl'] = "";
|
||||
$text['label-version']['sv-se'] = "";
|
||||
$text['label-version']['uk'] = "";
|
||||
$text['label-version']['de-at'] = "";
|
||||
|
||||
$text['label-git_info']['en-us'] = "Git Information";
|
||||
$text['label-git_info']['es-cl'] = "";
|
||||
$text['label-git_info']['pt-pt'] = "";
|
||||
|
|
@ -90,6 +100,16 @@ $text['label-git_info']['sv-se'] = "";
|
|||
$text['label-git_info']['uk'] = "";
|
||||
$text['label-git_info']['de-at'] = "";
|
||||
|
||||
$text['label-switch_version']['en-us'] = "Switch Version";
|
||||
$text['label-switch_version']['es-cl'] = "";
|
||||
$text['label-switch_version']['pt-pt'] = "";
|
||||
$text['label-switch_version']['fr-fr'] = "";
|
||||
$text['label-switch_version']['pt-br'] = "";
|
||||
$text['label-switch_version']['pl'] = "";
|
||||
$text['label-switch_version']['sv-se'] = "";
|
||||
$text['label-switch_version']['uk'] = "";
|
||||
$text['label-switch_version']['de-at'] = "";
|
||||
|
||||
$text['label-git_branch']['en-us'] = "Branch:";
|
||||
$text['label-git_branch']['es-cl'] = "";
|
||||
$text['label-git_branch']['pt-pt'] = "";
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ $document['title'] = $text['title-sys-status'];
|
|||
if (permission_exists('system_view_info')) {
|
||||
echo "<tr>\n";
|
||||
echo " <td width='20%' class=\"vncell\" style='text-align: left;'>\n";
|
||||
echo " Version\n";
|
||||
echo " ".$text['label-version']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class=\"row_style1\">\n";
|
||||
echo " ".software_version()."\n";
|
||||
|
|
@ -86,22 +86,38 @@ $document['title'] = $text['title-sys-status'];
|
|||
echo "</tr>\n";
|
||||
|
||||
$git_path = normalize_path_to_os($_SERVER["DOCUMENT_ROOT"]."/.git");
|
||||
$git_branch = shell_exec('git --git-dir='.$git_path.' name-rev --name-only HEAD');
|
||||
rtrim($git_branch);
|
||||
$git_commit = shell_exec('git --git-dir='.$git_path.' rev-parse HEAD');
|
||||
rtrim($git_commit);
|
||||
$git_origin = shell_exec('git --git-dir='.$git_path.' config --get remote.origin.url');
|
||||
rtrim($git_commit);
|
||||
echo "<tr>\n";
|
||||
echo " <td width='20%' class=\"vncell\" style='text-align: left;'>\n";
|
||||
echo " ".$text['label-git_info']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class=\"row_style1\">\n";
|
||||
echo " ".$text['label-git_branch']." ".$git_branch."<br>\n";
|
||||
echo " ".$text['label-git_commit']." ".$git_commit."<br>\n";
|
||||
echo " ".$text['label-git_origin']." ".$git_origin."<br>\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
if(file_exists($git_path)){
|
||||
$git_branch = shell_exec('git --git-dir='.$git_path.' name-rev --name-only HEAD');
|
||||
rtrim($git_branch);
|
||||
$git_commit = shell_exec('git --git-dir='.$git_path.' rev-parse HEAD');
|
||||
rtrim($git_commit);
|
||||
$git_origin = shell_exec('git --git-dir='.$git_path.' config --get remote.origin.url');
|
||||
rtrim($git_commit);
|
||||
echo "<tr>\n";
|
||||
echo " <td width='20%' class=\"vncell\" style='text-align: left;'>\n";
|
||||
echo " ".$text['label-git_info']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class=\"row_style1\">\n";
|
||||
echo " ".$text['label-git_branch']." ".$git_branch."<br>\n";
|
||||
echo " ".$text['label-git_commit']." ".$git_commit."<br>\n";
|
||||
echo " ".$text['label-git_origin']." ".$git_origin."<br>\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$switch_version = event_socket_request($fp, 'api version');
|
||||
preg_match("/FreeSWITCH Version (\d+\.\d+\.\d+(?:\.\d+)?).*\(\s*(\d+\w+)\s*\)/", $switch_version, $matches);
|
||||
$switch_version = $matches[1];
|
||||
$switch_bits = $matches[2];
|
||||
echo "<tr>\n";
|
||||
echo " <td width='20%' class=\"vncell\" style='text-align: left;'>\n";
|
||||
echo " ".$text['label-switch_version']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class=\"row_style1\">$switch_version ($switch_bits)</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "<!--\n";
|
||||
$tmp_result = shell_exec('uname -a');
|
||||
|
|
|
|||
Loading…
Reference in New Issue