mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
wux console view
This commit is contained in:
parent
8958dd0900
commit
ab3cd7dcc0
@ -178,7 +178,7 @@ function vbar_graph($flash_chart, $chart_data, $width, $height,
|
|||||||
$color, $legend, $long_index, $no_data_image, $xaxisname = "",
|
$color, $legend, $long_index, $no_data_image, $xaxisname = "",
|
||||||
$yaxisname = "", $water_mark = "", $font = '', $font_size = '',
|
$yaxisname = "", $water_mark = "", $font = '', $font_size = '',
|
||||||
$unit = '', $ttl = 1, $homeurl = '', $backgroundColor = 'white',
|
$unit = '', $ttl = 1, $homeurl = '', $backgroundColor = 'white',
|
||||||
$from_ux = false) {
|
$from_ux = false, $from_wux = false) {
|
||||||
setup_watermark($water_mark, $water_mark_file, $water_mark_url);
|
setup_watermark($water_mark, $water_mark_file, $water_mark_url);
|
||||||
|
|
||||||
if (empty($chart_data)) {
|
if (empty($chart_data)) {
|
||||||
@ -188,7 +188,7 @@ function vbar_graph($flash_chart, $chart_data, $width, $height,
|
|||||||
if ($flash_chart) {
|
if ($flash_chart) {
|
||||||
return flot_vcolumn_chart ($chart_data, $width, $height, $color,
|
return flot_vcolumn_chart ($chart_data, $width, $height, $color,
|
||||||
$legend, $long_index, $homeurl, $unit, $water_mark_url,
|
$legend, $long_index, $homeurl, $unit, $water_mark_url,
|
||||||
$homedir,$font,$font_size, $from_ux);
|
$homedir,$font,$font_size, $from_ux, $from_wux);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$graph = array();
|
$graph = array();
|
||||||
|
@ -457,7 +457,7 @@ function showTooltip(x, y, color, contents) {
|
|||||||
}).appendTo("body").fadeIn(200);
|
}).appendTo("body").fadeIn(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
function pandoraFlotVBars(graph_id, values, labels, labels_long, legend, colors, water_mark, maxvalue, water_mark, separator, separator2, font, font_size , from_ux) {
|
function pandoraFlotVBars(graph_id, values, labels, labels_long, legend, colors, water_mark, maxvalue, water_mark, separator, separator2, font, font_size , from_ux, from_wux) {
|
||||||
values = values.split(separator2);
|
values = values.split(separator2);
|
||||||
legend = legend.split(separator);
|
legend = legend.split(separator);
|
||||||
font = font.split("/").pop().split(".").shift();
|
font = font.split("/").pop().split(".").shift();
|
||||||
@ -552,6 +552,17 @@ function pandoraFlotVBars(graph_id, values, labels, labels_long, legend, colors,
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(from_wux){
|
||||||
|
options.series.bars.barWidth = 0.5;
|
||||||
|
options.grid.aboveData = true;
|
||||||
|
options.grid.borderWidth = 0;
|
||||||
|
options.grid.markings = [ { xaxis: { from: -0.25, to: -0.25 }, color: "#000" },
|
||||||
|
{ yaxis: { from: 0, to: 0 }, color: "#000" }];
|
||||||
|
|
||||||
|
options.xaxis.tickLength = 0;
|
||||||
|
options.yaxis.tickLength = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))
|
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))
|
||||||
options.xaxis.labelWidth = 100;
|
options.xaxis.labelWidth = 100;
|
||||||
|
|
||||||
|
@ -752,7 +752,7 @@ function flot_hcolumn_chart ($graph_data, $width, $height, $water_mark, $font =
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Returns a 3D column chart
|
// Returns a 3D column chart
|
||||||
function flot_vcolumn_chart ($graph_data, $width, $height, $color, $legend, $long_index, $homeurl, $unit, $water_mark, $homedir, $font, $font_size, $from_ux) {
|
function flot_vcolumn_chart ($graph_data, $width, $height, $color, $legend, $long_index, $homeurl, $unit, $water_mark, $homedir, $font, $font_size, $from_ux, $from_wux) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
include_javascript_dependencies_flot_graph();
|
include_javascript_dependencies_flot_graph();
|
||||||
@ -835,10 +835,15 @@ function flot_vcolumn_chart ($graph_data, $width, $height, $color, $legend, $lon
|
|||||||
$return .= "<script type='text/javascript'>";
|
$return .= "<script type='text/javascript'>";
|
||||||
|
|
||||||
if ($from_ux) {
|
if ($from_ux) {
|
||||||
$return .= "pandoraFlotVBars('$graph_id', '$values', '$labels', '$labels', '$legend', '$colors', false, $max, '$water_mark', '$separator', '$separator2','$font',$font_size, true)";
|
if($from_wux){
|
||||||
|
$return .= "pandoraFlotVBars('$graph_id', '$values', '$labels', '$labels', '$legend', '$colors', false, $max, '$water_mark', '$separator', '$separator2','$font',$font_size, true, true)";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$return .= "pandoraFlotVBars('$graph_id', '$values', '$labels', '$labels', '$legend', '$colors', false, $max, '$water_mark', '$separator', '$separator2','$font',$font_size, true, false)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$return .= "pandoraFlotVBars('$graph_id', '$values', '$labels', '$labels', '$legend', '$colors', false, $max, '$water_mark', '$separator', '$separator2','$font',$font_size, false)";
|
$return .= "pandoraFlotVBars('$graph_id', '$values', '$labels', '$labels', '$legend', '$colors', false, $max, '$water_mark', '$separator', '$separator2','$font',$font_size, false, false)";
|
||||||
}
|
}
|
||||||
|
|
||||||
$return .= "</script>";
|
$return .= "</script>";
|
||||||
|
@ -4191,4 +4191,87 @@ div#footer_help{
|
|||||||
#mssg_error_div{
|
#mssg_error_div{
|
||||||
color: red;
|
color: red;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View WUX
|
||||||
|
*/
|
||||||
|
|
||||||
|
.wux_global_result_container{
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 30px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wux_global_result_title{
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
color:white;
|
||||||
|
background-color: #373737;
|
||||||
|
border: 1px solid #373737;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wux_global_result_title p {
|
||||||
|
margin: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wux_global_result_content{
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid #e2e2e2;
|
||||||
|
height: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wux_global_result_content_left{
|
||||||
|
float:left;
|
||||||
|
width: 40%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wux_global_result_content_left ul{
|
||||||
|
display: inline-flex;
|
||||||
|
margin-top: 23px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.wux_global_result_content_left ul li p{
|
||||||
|
margin-top: 30px;
|
||||||
|
margin-right: 10px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wux_global_result_content_right{
|
||||||
|
float:right;
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wux_global_result_content_right ul{
|
||||||
|
display: inline-flex;
|
||||||
|
margin-top: 23px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wux_global_result_content_right ul li p{
|
||||||
|
margin-top: 30px;
|
||||||
|
margin-right: 10px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wux_transaction_container{
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wux_result_transaction{
|
||||||
|
width: 33%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wux_transaction_graphs{
|
||||||
|
width: 33%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wux_transaction_graphs_pie{
|
||||||
|
width: 33%;
|
||||||
|
float: left;
|
||||||
}
|
}
|
@ -1047,6 +1047,10 @@ $ux_console_tab = enterprise_hook('ux_console_tab');
|
|||||||
if ($ux_console_tab == -1)
|
if ($ux_console_tab == -1)
|
||||||
$ux_console_tab = "";
|
$ux_console_tab = "";
|
||||||
|
|
||||||
|
/* UX Console */
|
||||||
|
$wux_console_tab = enterprise_hook('wux_console_tab');
|
||||||
|
if ($wux_console_tab == -1)
|
||||||
|
$wux_console_tab = "";
|
||||||
|
|
||||||
/* GIS tab */
|
/* GIS tab */
|
||||||
$gistab="";
|
$gistab="";
|
||||||
@ -1178,7 +1182,8 @@ $onheader = array('manage' => $managetab,
|
|||||||
'custom' => $custom_fields,
|
'custom' => $custom_fields,
|
||||||
'graphs' => $graphs,
|
'graphs' => $graphs,
|
||||||
'policy' => $policyTab,
|
'policy' => $policyTab,
|
||||||
'ux_console' => $ux_console_tab);
|
'ux_console' => $ux_console_tab,
|
||||||
|
'wux_console' => $wux_console_tab);
|
||||||
|
|
||||||
//Added after it exists
|
//Added after it exists
|
||||||
// If the agent has incidents associated
|
// If the agent has incidents associated
|
||||||
@ -1291,6 +1296,9 @@ switch ($tab) {
|
|||||||
case "ux_console_tab":
|
case "ux_console_tab":
|
||||||
enterprise_include ("operation/agentes/ux_console_view.php");
|
enterprise_include ("operation/agentes/ux_console_view.php");
|
||||||
break;
|
break;
|
||||||
|
case "wux_console_tab":
|
||||||
|
enterprise_include ("operation/agentes/wux_console_view.php");
|
||||||
|
break;
|
||||||
case "graphs";
|
case "graphs";
|
||||||
require("operation/agentes/graphs.php");
|
require("operation/agentes/graphs.php");
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user