mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 11:19:26 +02:00
Further enhanced admin panel
This commit is contained in:
parent
b889714ddb
commit
0948194b46
@ -248,6 +248,46 @@ if ( isset($_GET['op']) )
|
||||
$content['ERROR_MSG'] = $content['LN_REPORTS_ERROR_INVALIDID'];
|
||||
}
|
||||
}
|
||||
else if ($_GET['op'] == "addsavedreport")
|
||||
{
|
||||
// Set Mode to edit
|
||||
// $content['ISSHOWDETAILS'] = "true";
|
||||
$content['ISADDSAVEDREPORT'] = "true";
|
||||
$content['REPORT_FORMACTION'] = "addsavedreport";
|
||||
$content['REPORT_SENDBUTTON'] = $content['LN_REPORTS_ADDSAVEDREPORT'];
|
||||
|
||||
if ( isset($_GET['id']) )
|
||||
{
|
||||
//PreInit these values
|
||||
$content['ReportID'] = DB_RemoveBadChars($_GET['id']);
|
||||
if ( isset($content['REPORTS'][ $content['ReportID'] ]) )
|
||||
{
|
||||
// Get Reference to parser!
|
||||
$myReport = $content['REPORTS'][ $content['ReportID'] ];
|
||||
|
||||
// Set Report properties
|
||||
$content['DisplayName'] = $myReport['DisplayName'];
|
||||
$content['Description'] = $myReport['Description'];
|
||||
|
||||
// Set defaults for report
|
||||
$content['customTitle'] = $myReport['DisplayName'];
|
||||
$content['customComment'] = "";
|
||||
$content['filterString'] = "";
|
||||
$content['customFilters'] = "";
|
||||
|
||||
$content['outputFormat'] = REPORT_OUTPUT_HTML;
|
||||
CreateOutputformatList( $content['outputFormat'] );
|
||||
|
||||
$content['outputTarget'] = "";
|
||||
$content['scheduleSettings'] = "";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$content['ISERROR'] = true;
|
||||
$content['ERROR_MSG'] = $content['LN_REPORTS_ERROR_INVALIDID'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Default mode!
|
||||
|
@ -397,6 +397,21 @@ function CreateDBTypesList( $selectedDBType )
|
||||
if ( $selectedDBType == $content['DBTYPES'][DB_SQLITE]['type'] ) { $content['DBTYPES'][DB_SQLITE]['selected'] = "selected"; } else { $content['DB_ODBC'][DB_SQLITE]['selected'] = ""; }
|
||||
}
|
||||
|
||||
function CreateOutputformatList( $selectedOutputformat )
|
||||
{
|
||||
global $content;
|
||||
|
||||
// REPORT_OUTPUT_HTML
|
||||
$content['OUTPUTFORMATS'][REPORT_OUTPUT_HTML]['formatid'] = REPORT_OUTPUT_HTML;
|
||||
$content['OUTPUTFORMATS'][REPORT_OUTPUT_HTML]['formatdisplayname'] = $content['LN_GEN_REPORT_OUTPUT_HTML'];
|
||||
if ( $selectedOutputformat == $content['OUTPUTFORMATS'][REPORT_OUTPUT_HTML]['formatid'] ) { $content['OUTPUTFORMATS'][REPORT_OUTPUT_HTML]['formatselected'] = "selected"; } else { $content['OUTPUTFORMATS'][REPORT_OUTPUT_HTML]['formatselected'] = ""; }
|
||||
|
||||
// REPORT_OUTPUT_PDF
|
||||
$content['OUTPUTFORMATS'][REPORT_OUTPUT_PDF]['formatid'] = REPORT_OUTPUT_PDF;
|
||||
$content['OUTPUTFORMATS'][REPORT_OUTPUT_PDF]['formatdisplayname'] = $content['LN_GEN_REPORT_OUTPUT_PDF'];
|
||||
if ( $selectedOutputformat == $content['OUTPUTFORMATS'][REPORT_OUTPUT_PDF]['formatid'] ) { $content['OUTPUTFORMATS'][REPORT_OUTPUT_PDF]['formatselected'] = "selected"; } else { $content['OUTPUTFORMATS'][REPORT_OUTPUT_PDF]['formatselected'] = ""; }
|
||||
}
|
||||
|
||||
function CreatePagesizesList()
|
||||
{
|
||||
global $content;
|
||||
|
@ -393,6 +393,10 @@ $content['LN_REPORTS_ERROR_HASBEENADDED'] = "All required settings for the repor
|
||||
$content['LN_REPORTS_ERROR_NOFIELDS'] = "The report '%1' does not have any custom settings which can be added.";
|
||||
$content['LN_REPORTS_ERROR_REPORTDOESNTNEEDTOBEREMOVED'] = "The report '%1' does not need to be removed or initialized.";
|
||||
$content['LN_REPORTS_ADDSAVEDREPORT'] = "Add Savedreport";
|
||||
$content['LN_REPORTS_CUSTOMTITLE'] = "Report Title";
|
||||
$content['LN_REPORTS_CUSTOMCOMMENT'] = "Comment / Description";
|
||||
$content['LN_REPORTS_FILTERSTRING'] = "Filterstring";
|
||||
$content['LN_REPORTS_OUTPUTFORMAT'] = "Outputformat";
|
||||
$content['LN_REPORTS_'] = "";
|
||||
|
||||
?>
|
@ -100,6 +100,8 @@ $content['LN_ERROR_NORECORDS'] = "Es wurden keine syslog-Einträge gefunden.
|
||||
$content['LN_ERROR_REDIRECTABORTED'] = 'Automatic redirect to the <a href="%1">page</a> was aborted, as an internal error occured. Please see the error details above and contact our support forums if you need assistance.';
|
||||
$content['LN_DEBUGLEVEL'] = "Debug Level";
|
||||
$content['LN_DEBUGMESSAGE'] = "Debug Message";
|
||||
$content['LN_GEN_REPORT_OUTPUT_HTML'] = "HTML Format";
|
||||
$content['LN_GEN_REPORT_OUTPUT_PDF'] = "PDF Format";
|
||||
|
||||
// Topmenu Entries
|
||||
$content['LN_MENU_SEARCH'] = "Suchen";
|
||||
|
@ -406,6 +406,12 @@ $content['LN_REPORTS_ERROR_HASBEENADDED'] = "All required settings for the repor
|
||||
$content['LN_REPORTS_ERROR_NOFIELDS'] = "The report '%1' does not have any custom settings which can be added.";
|
||||
$content['LN_REPORTS_ERROR_REPORTDOESNTNEEDTOBEREMOVED'] = "The report '%1' does not need to be removed or initialized.";
|
||||
$content['LN_REPORTS_ADDSAVEDREPORT'] = "Add Savedreport";
|
||||
$content['LN_REPORTS_CUSTOMTITLE'] = "Report Title";
|
||||
$content['LN_REPORTS_CUSTOMCOMMENT'] = "Comment / Description";
|
||||
$content['LN_REPORTS_FILTERSTRING'] = "Filterstring";
|
||||
$content['LN_REPORTS_OUTPUTFORMAT'] = "Outputformat";
|
||||
$content['LN_REPORTS_'] = "";
|
||||
|
||||
$content['LN_REPORTS_'] = "";
|
||||
|
||||
|
||||
|
@ -102,6 +102,8 @@ $content['LN_ERROR_DB_DBFIELDNOTFOUND'] = "Database Field mapping for at least o
|
||||
$content['LN_ERROR_REDIRECTABORTED'] = 'Automatic redirect to the <a href="%1">page</a> was aborted, as an internal error occured. Please see the error details above and contact our support forums if you need assistance.';
|
||||
$content['LN_DEBUGLEVEL'] = "Debug Level";
|
||||
$content['LN_DEBUGMESSAGE'] = "Debug Message";
|
||||
$content['LN_GEN_REPORT_OUTPUT_HTML'] = "HTML Format";
|
||||
$content['LN_GEN_REPORT_OUTPUT_PDF'] = "PDF Format";
|
||||
|
||||
|
||||
// Topmenu Entries
|
||||
|
@ -406,6 +406,10 @@ $content['LN_REPORTS_ERROR_HASBEENADDED'] = "All required settings for the repor
|
||||
$content['LN_REPORTS_ERROR_NOFIELDS'] = "The report '%1' does not have any custom settings which can be added.";
|
||||
$content['LN_REPORTS_ERROR_REPORTDOESNTNEEDTOBEREMOVED'] = "The report '%1' does not need to be removed or initialized.";
|
||||
$content['LN_REPORTS_ADDSAVEDREPORT'] = "Add Savedreport";
|
||||
$content['LN_REPORTS_CUSTOMTITLE'] = "Report Title";
|
||||
$content['LN_REPORTS_CUSTOMCOMMENT'] = "Comment / Description";
|
||||
$content['LN_REPORTS_FILTERSTRING'] = "Filterstring";
|
||||
$content['LN_REPORTS_OUTPUTFORMAT'] = "Outputformat";
|
||||
$content['LN_REPORTS_'] = "";
|
||||
|
||||
?>
|
@ -393,6 +393,10 @@ $content['LN_REPORTS_ERROR_HASBEENADDED'] = "All required settings for the repor
|
||||
$content['LN_REPORTS_ERROR_NOFIELDS'] = "The report '%1' does not have any custom settings which can be added.";
|
||||
$content['LN_REPORTS_ERROR_REPORTDOESNTNEEDTOBEREMOVED'] = "The report '%1' does not need to be removed or initialized.";
|
||||
$content['LN_REPORTS_ADDSAVEDREPORT'] = "Add Savedreport";
|
||||
$content['LN_REPORTS_CUSTOMTITLE'] = "Report Title";
|
||||
$content['LN_REPORTS_CUSTOMCOMMENT'] = "Comment / Description";
|
||||
$content['LN_REPORTS_FILTERSTRING'] = "Filterstring";
|
||||
$content['LN_REPORTS_OUTPUTFORMAT'] = "Outputformat";
|
||||
$content['LN_REPORTS_'] = "";
|
||||
|
||||
?>
|
@ -102,6 +102,8 @@ $content['LN_ERROR_NORECORDS'] = "Sem mensagens encontradas.";
|
||||
$content['LN_WARNING_DBUPGRADE'] = "Database Upgrade required";
|
||||
$content['LN_WARNING_DBUPGRADE_TEXT'] = "The current installed database version is '%1'.<br>An update to version '%2' is available.";
|
||||
$content['LN_ERROR_REDIRECTABORTED'] = 'Automatic redirect to the <a href="%1">page</a> was aborted, as an internal error occured. Please see the error details above and contact our support forums if you need assistance.';
|
||||
$content['LN_GEN_REPORT_OUTPUT_HTML'] = "HTML Format";
|
||||
$content['LN_GEN_REPORT_OUTPUT_PDF'] = "PDF Format";
|
||||
|
||||
// Topmenu Entries
|
||||
$content['LN_MENU_SEARCH'] = "Search";
|
||||
|
@ -110,6 +110,47 @@
|
||||
<a href="javascript:history.back();" target="_top">{LN_GEN_ERRORRETURNPREV}</a>
|
||||
<!-- ENDIF ISSHOWDETAILS="true" -->
|
||||
|
||||
<!-- IF ISADDSAVEDREPORT="true" -->
|
||||
<form action="{BASEPATH}admin/reports.php" method="post">
|
||||
<input type="hidden" name="id" value="{ReportID}">
|
||||
<input type="hidden" name="op" value="addsavedreport">
|
||||
<table border="0" cellpadding="1" cellspacing="1" bgcolor="#DDDDDD" width="600" class="with_border_alternate">
|
||||
<tr>
|
||||
<td align="center" class="cellmenu1" colspan="2"><b>{LN_REPORTS_ADDSAVEDREPORT}: '{DisplayName}'</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" width="150" nowrap><b>{LN_REPORTS_CUSTOMTITLE}</b></td>
|
||||
<td align="right" class="line0" width="100%"><input type="text" name="report_customtitle" size="40" maxlength="255" value="{customTitle}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" width="150" nowrap><b>{LN_REPORTS_CUSTOMCOMMENT}</b></td>
|
||||
<td align="right" class="line0" width="100%"><input type="text" name="report_customcomment" size="40" maxlength="255" value="{customComment}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" width="150" nowrap><b>{LN_REPORTS_FILTERSTRING}</b></td>
|
||||
<td align="right" class="line0" width="100%"><input type="text" name="report_filterString" size="40" maxlength="255" value="{filterString}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" width="150" nowrap><b>{LN_REPORTS_OUTPUTFORMAT}</b></td>
|
||||
<td align="right" class="line0" width="100%">
|
||||
<select name="outputFormat" size="1" STYLE="width: 190px">
|
||||
<!-- BEGIN OUTPUTFORMATS -->
|
||||
<option value="{formatid}" {formatselected}>{formatdisplayname}</option>
|
||||
<!-- END OUTPUTFORMATS -->
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="center" colspan="2">
|
||||
<input type="submit" value="{REPORT_SENDBUTTON}">
|
||||
<input type="hidden" name="op" value="{REPORT_FORMACTION}">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<!-- ENDIF ISADDSAVEDREPORT="true" -->
|
||||
|
||||
<br><br>
|
||||
|
||||
</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user