mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 11:19:26 +02:00
Changed Chartpreview in Chart Admin to use jqueryui
This commit is contained in:
parent
0d2b6723ed
commit
e353229085
@ -124,6 +124,12 @@ if ( isset($_GET['defaultfilter']) )
|
||||
$content['chart_defaultfilter'] = $_GET['defaultfilter'];
|
||||
else
|
||||
$content['chart_defaultfilter'] = "";
|
||||
|
||||
if ( isset($_GET['basepath']) )
|
||||
$content['custombasepath'] = $_GET['basepath'];
|
||||
else
|
||||
$content['custombasepath'] = "";
|
||||
|
||||
// ---
|
||||
|
||||
// --- BEGIN CREATE TITLE
|
||||
@ -205,7 +211,7 @@ if ( !$content['error_occured'] )
|
||||
$YchartData[] = intval($myData);
|
||||
$XchartData[] = strlen($myKey) > 0 ? $myKey : "Unknown";
|
||||
if ( isset($fields[$content['chart_field']]['SearchField']) && strlen($myKey) > 0 )
|
||||
$chartImageMapLinks[] = $content['BASEPATH'] . "index.php?filter=" . $fields[$content['chart_field']]['SearchField'] . "%3A%3D" . urlencode($szEncodedKeyStr) . "&search=Search";
|
||||
$chartImageMapLinks[] = $content['custombasepath'] . "index.php?filter=" . $fields[$content['chart_field']]['SearchField'] . "%3A%3D" . urlencode($szEncodedKeyStr) . "&search=Search";
|
||||
else
|
||||
$chartImageMapLinks[] = "";
|
||||
|
||||
@ -536,7 +542,7 @@ if ( $content['error_occured'] )
|
||||
|
||||
// --- Output the image
|
||||
//$graph->Stroke();
|
||||
$graph->StrokeCSIM( basename(__FILE__), '', 0);
|
||||
$graph->StrokeCSIM( $content['custombasepath'] . basename(__FILE__), '', 0);
|
||||
// ---
|
||||
|
||||
?>
|
@ -1,4 +1,5 @@
|
||||
<!-- INCLUDE include_header.html -->
|
||||
<div id="dialog" title="Chartgenerator"><br/></div>
|
||||
|
||||
<!-- IF ISERROR="true" -->
|
||||
<br><br>
|
||||
@ -22,7 +23,7 @@
|
||||
<br><br>
|
||||
|
||||
<!-- IF LISTCHARTS="true" -->
|
||||
<table border="0" cellpadding="2" cellspacing="1" bgcolor="#DDDDDD" width="80%" class="with_border_alternate">
|
||||
<table border="0" cellpadding="2" cellspacing="1" bgcolor="#DDDDDD" width="80%" class="with_border_alternate" ID="chartoptions">
|
||||
<tr>
|
||||
<td align="center" width="5%" class="cellmenu1"><b>{LN_CHARTS_ID}</b></td>
|
||||
<td align="center" width="25%" class="cellmenu1"><b>{LN_CHARTS_NAME}</b></td>
|
||||
@ -54,8 +55,19 @@
|
||||
<img src="{MENU_EDIT_DISABLED}" width="16" title="{LN_GEN_DISABLED}">
|
||||
<img src="{MENU_DELETE_DISABLED}" width="16" title="{LN_GEN_DISABLED}">
|
||||
<!-- ENDIF ActionsAllowed!="true" -->
|
||||
<!--
|
||||
<a href="{BASEPATH}chartgenerator.php?type={chart_type}&byfield={chart_field}&width={chart_width}&maxrecords={maxrecords}&showpercent={showpercent}&defaultfilter={chart_defaultfilter_urldecoded}" target="_blank"><img src="{MENU_CHART_PREVIEW}" width="16" title="{LN_CHARTS_PREVIEW}"></a>
|
||||
|
||||
-->
|
||||
<a href="#" id="dialog-chart_{ID}"><img src="{MENU_CHART_PREVIEW}" width="16" title="{LN_CHARTS_PREVIEW}"></a>
|
||||
<script> $( "#dialog-chart_{ID}" ).click(function( event ) {
|
||||
$( "#dialog").html('<center></br><img src="{BASEPATH}images/ajax-loader.gif"></br></br></center>');
|
||||
$( "#dialog").load('{BASEPATH}chartgenerator.php?type={chart_type}&byfield={chart_field}&width={chart_width}&maxrecords={maxrecords}&showpercent={showpercent}&defaultfilter={chart_defaultfilter_urldecoded}&basepath={BASEPATH}');
|
||||
$( "#dialog").dialog("option","position",$("#dialog").dialog("option","position"));
|
||||
$( "#dialog").dialog( {title: "Chartgenerator"});
|
||||
$( "#dialog").dialog( "open" );
|
||||
$( "#dialog").focus();
|
||||
event.preventDefault(); });
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- END CHARTS -->
|
||||
@ -154,4 +166,32 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
// Popup Dialog Code
|
||||
$( "#dialog" ).dialog({
|
||||
autoOpen: false,
|
||||
resizable: false,
|
||||
width: 'auto',
|
||||
minHeight: 400,
|
||||
minWidth: 400,
|
||||
draggable: true,
|
||||
closeOnEscape: true,
|
||||
modal: true,
|
||||
buttons: [
|
||||
{
|
||||
text: "Ok",
|
||||
click: function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
/*
|
||||
$(window).resize(function() {
|
||||
$(".ui-dialog-content").dialog("option", "position", $("#dialog").dialog("option","position"));
|
||||
});
|
||||
*/
|
||||
</script>
|
||||
|
||||
<!-- INCLUDE include_footer.html -->
|
Loading…
x
Reference in New Issue
Block a user