mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
fixed errors in graph min and max warning and critical for edition module
This commit is contained in:
parent
001861b746
commit
f317f3e736
@ -303,7 +303,7 @@ if (modules_is_string_type($id_module_type) || $edit) {
|
|||||||
$table_simple->data[4][1] .= html_print_checkbox ("warning_inverse", 1, $warning_inverse, true, $disabledBecauseInPolicy);
|
$table_simple->data[4][1] .= html_print_checkbox ("warning_inverse", 1, $warning_inverse, true, $disabledBecauseInPolicy);
|
||||||
|
|
||||||
if (!modules_is_string_type($id_module_type) || $edit) {
|
if (!modules_is_string_type($id_module_type) || $edit) {
|
||||||
$table_simple->data[4][2] = '<svg id="svg_dinamic" width="800" height="300"> </svg>';
|
$table_simple->data[4][2] = '<svg id="svg_dinamic" width="500" height="300"> </svg>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$table_simple->data[5][0] = __('Critical status').' ' . ui_print_help_icon ('critical_status', true);
|
$table_simple->data[5][0] = __('Critical status').' ' . ui_print_help_icon ('critical_status', true);
|
||||||
|
@ -129,7 +129,7 @@ $table->data[4][1] .= html_print_input_text ('str_warning', $str_warning,
|
|||||||
$table->data[4][1] .= '<br /><em>'.__('Inverse interval').'</em>';
|
$table->data[4][1] .= '<br /><em>'.__('Inverse interval').'</em>';
|
||||||
$table->data[4][1] .= html_print_checkbox ("warning_inverse", 1, $warning_inverse, true);
|
$table->data[4][1] .= html_print_checkbox ("warning_inverse", 1, $warning_inverse, true);
|
||||||
|
|
||||||
$table->data[4][2] = '<svg id="svg_dinamic" width="800" height="300"> </svg>';
|
$table->data[4][2] = '<svg id="svg_dinamic" width="500" height="300"> </svg>';
|
||||||
$table->colspan[4][2] = 2;
|
$table->colspan[4][2] = 2;
|
||||||
$table->rowspan[4][2] = 3;
|
$table->rowspan[4][2] = 3;
|
||||||
|
|
||||||
|
@ -1264,6 +1264,7 @@ function pagination_show_more(params, message){
|
|||||||
datatype: "html"
|
datatype: "html"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*function use d3.js for paint graph
|
*function use d3.js for paint graph
|
||||||
*/
|
*/
|
||||||
@ -1344,11 +1345,11 @@ function paint_graph_status(min_w, max_w, min_c, max_c, inverse_w, inverse_c, er
|
|||||||
//delete elements
|
//delete elements
|
||||||
svg.selectAll("g").remove();
|
svg.selectAll("g").remove();
|
||||||
|
|
||||||
width_x = 201;
|
width_x = 101;
|
||||||
height_x = 50;
|
height_x = 50;
|
||||||
|
|
||||||
svg.append("g")
|
svg.append("g")
|
||||||
.attr("transform", "translate(200, 150)")
|
.attr("transform", "translate(100, 150)")
|
||||||
.call(yAxis);
|
.call(yAxis);
|
||||||
|
|
||||||
//legend Normal text
|
//legend Normal text
|
||||||
@ -1473,7 +1474,6 @@ function paint_graph_status(min_w, max_w, min_c, max_c, inverse_w, inverse_c, er
|
|||||||
.attr("width", 300)
|
.attr("width", 300)
|
||||||
.attr("height", ((range_max - min_w) * position) - ((max_w - min_w) * position))
|
.attr("height", ((range_max - min_w) * position) - ((max_w - min_w) * position))
|
||||||
.style("fill", "#ffd731");
|
.style("fill", "#ffd731");
|
||||||
|
|
||||||
}
|
}
|
||||||
//controls the inverse critical
|
//controls the inverse critical
|
||||||
if(inverse_c == 0){
|
if(inverse_c == 0){
|
||||||
@ -1507,7 +1507,6 @@ function paint_graph_status(min_w, max_w, min_c, max_c, inverse_w, inverse_c, er
|
|||||||
.attr("height", ((range_max - min_c) * position) - ((max_c - min_c) * position))
|
.attr("height", ((range_max - min_c) * position) - ((max_c - min_c) * position))
|
||||||
.style("fill", "#fc4444");
|
.style("fill", "#fc4444");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
d3.select("#svg_dinamic rect").remove();
|
d3.select("#svg_dinamic rect").remove();
|
||||||
@ -1515,7 +1514,7 @@ function paint_graph_status(min_w, max_w, min_c, max_c, inverse_w, inverse_c, er
|
|||||||
var svg = d3.select("#svg_dinamic");
|
var svg = d3.select("#svg_dinamic");
|
||||||
svg.selectAll("g").remove();
|
svg.selectAll("g").remove();
|
||||||
|
|
||||||
width_x = 201;
|
width_x = 10;
|
||||||
height_x = 50;
|
height_x = 50;
|
||||||
|
|
||||||
//message error warning
|
//message error warning
|
||||||
@ -1548,7 +1547,6 @@ function paint_graph_status(min_w, max_w, min_c, max_c, inverse_w, inverse_c, er
|
|||||||
.html(message_error_critical)
|
.html(message_error_critical)
|
||||||
.style("text-anchor", "first");
|
.style("text-anchor", "first");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user