mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 03:09:21 +02:00
Done some minor changes
This commit is contained in:
parent
979aaa4db5
commit
79fa018c0a
@ -326,11 +326,14 @@ if ( isset($_GET['op']) )
|
||||
|
||||
// Init other outputTarget properties
|
||||
$content['outputTarget_filename'] = "";
|
||||
|
||||
// Create visible CronCommand
|
||||
$content['cronCommand'] = CreateCronCommand( null );
|
||||
|
||||
// Other settings ... TODO!
|
||||
// $content['customFilters'] = "";
|
||||
// $content['outputTarget'] = "";
|
||||
$content['scheduleSettings'] = "";
|
||||
// $content['scheduleSettings'] = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -410,6 +413,9 @@ if ( isset($_GET['op']) )
|
||||
$content['outputTarget_filename'] = "";
|
||||
InitOutputtargetDefinitions($myReport, $mySavedReport['outputTargetDetails']);
|
||||
|
||||
// Create visible CronCommand
|
||||
$content['cronCommand'] = CreateCronCommand( $mySavedReport );
|
||||
|
||||
// Other settings ... TODO!
|
||||
// $content['customFilters'] = "";
|
||||
// $content['outputTarget'] = "";
|
||||
@ -1172,6 +1178,30 @@ function InitOutputtargetDefinitions($myReport, $outputTargetDetails)
|
||||
}
|
||||
}
|
||||
|
||||
function CreateCronCommand( $mySavedReport )
|
||||
{
|
||||
global $content;
|
||||
|
||||
//echo $_SERVER['SERVER_SOFTWARE'];
|
||||
$pos = strpos( strtoupper($_SERVER['SERVER_SOFTWARE']), "WIN32");
|
||||
if ($pos !== false)
|
||||
{
|
||||
// Running on Windows
|
||||
$phpCmd = "C:/php/php.exe";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Running on LINUX
|
||||
$phpCmd = "/usr/bin/php";
|
||||
}
|
||||
|
||||
$content['enableCronCommand'] = false;
|
||||
|
||||
$szresult = "";
|
||||
|
||||
return $szresult;
|
||||
}
|
||||
|
||||
// --- END Helper functions
|
||||
|
||||
?>
|
@ -161,7 +161,7 @@ function RunReport()
|
||||
|
||||
// Check if exists
|
||||
if ( !isset($content['REPORTS'][ $content['reportid'] ]) )
|
||||
DieWithErrorMsg( GetAndReplaceLangStr($content["LN_CMD_LOGSTREAMNOTFOUND"], $content['reportid']) );
|
||||
DieWithErrorMsg( GetAndReplaceLangStr($content["LN_CMD_REPORTIDNOTFOUND"], $content['reportid']) );
|
||||
|
||||
// Get Reference to report!
|
||||
$myReport = $content['REPORTS'][ $content['reportid'] ];
|
||||
@ -177,7 +177,7 @@ function RunReport()
|
||||
|
||||
// Check if exists
|
||||
if ( !isset($myReport['SAVEDREPORTS'][ $content['savedreportid'] ]) )
|
||||
DieWithErrorMsg( GetAndReplaceLangStr($content["LN_CMD_LOGSTREAMNOTFOUND"], $content['savedreportid']) );
|
||||
DieWithErrorMsg( GetAndReplaceLangStr($content["LN_CMD_SAVEDREPORTIDNOTFOUND"], $content['savedreportid']) );
|
||||
}
|
||||
else
|
||||
DieWithErrorMsg( $content["LN_CMD_NOSAVEDREPORTID"] );
|
||||
|
@ -352,4 +352,11 @@ $content['LN_ORACLE_WHOIS'] = "WHOIS Lookup for '%1' value '%2'";
|
||||
$content['LN_GEN_ERROR_REPORTFAILEDTOGENERATE'] = "Failed to generate report, error details: %1";
|
||||
$content['LN_GEN_SUCCESS_REPORTWASGENERATED_DETAILS'] = "Successfully generated report: %1";
|
||||
|
||||
$content['LN_CMD_RUNREPORT'] = "Generating saved report '%1'";
|
||||
$content['LN_CMD_REPORTIDNOTFOUND'] = "Invalid Report ID '%1'";
|
||||
$content['LN_CMD_SAVEDREPORTIDNOTFOUND'] = "Invalid SavedReport ID '%1'";
|
||||
$content['LN_CMD_NOREPORTID'] = "Missing Report ID";
|
||||
$content['LN_CMD_NOSAVEDREPORTID'] = "Missing SavedReport ID";
|
||||
|
||||
|
||||
?>
|
@ -304,6 +304,12 @@
|
||||
</div>
|
||||
|
||||
<table border="0" cellpadding="1" cellspacing="1" bgcolor="#DDDDDD" width="750" class="with_border_alternate">
|
||||
<!-- IF enableCronCommand="true" -->
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2_naked" width="150" nowrap><b>{LN_REPORTS_CRONCMD}</b></td>
|
||||
<td align="left" class="line2" width="100%"><input readonly type="text" size="100" maxlength="255" value="{cronCommand}"></td>
|
||||
</tr>
|
||||
<!-- ENDIF enableCronCommand="true" -->
|
||||
<tr>
|
||||
<td align="center" colspan="2">
|
||||
<button name="op" type="submit" value="{REPORT_FORMACTION}" title="{REPORT_SENDBUTTON}">{REPORT_SENDBUTTON}</button>
|
||||
|
Loading…
x
Reference in New Issue
Block a user