mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Some fixes in the visual console.
This commit is contained in:
parent
43e8edc049
commit
ab032aa17a
@ -1144,8 +1144,10 @@ function set_static_graph_status(idElement, image, status) {
|
|||||||
set_static_graph_status(idElement, image, data);
|
set_static_graph_status(idElement, image, data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case '1':
|
case '1':
|
||||||
//Critical (BAD)
|
//Critical (BAD)
|
||||||
@ -1186,7 +1188,6 @@ function set_static_graph_status(idElement, image, status) {
|
|||||||
$("#image_" + idElement).attr('src', data);
|
$("#image_" + idElement).attr('src', data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setModuleGraph(id_data) {
|
function setModuleGraph(id_data) {
|
||||||
@ -1540,53 +1541,6 @@ function createItem(type, values, id_data) {
|
|||||||
break;
|
break;
|
||||||
case 'group_item':
|
case 'group_item':
|
||||||
case 'static_graph':
|
case 'static_graph':
|
||||||
var element_status= null;
|
|
||||||
var parameter = Array();
|
|
||||||
parameter.push ({name: "page",
|
|
||||||
value: "include/ajax/visual_console_builder.ajax"});
|
|
||||||
parameter.push ({name: "get_element_status", value: "1"});
|
|
||||||
parameter.push ({name: "id_element", value: id_data});
|
|
||||||
parameter.push ({name: "id_visual_console",
|
|
||||||
value: id_visual_console});
|
|
||||||
|
|
||||||
if (is_metaconsole()) {
|
|
||||||
parameter.push ({name: "metaconsole", value: 1});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
parameter.push ({name: "metaconsole", value: 0});
|
|
||||||
}
|
|
||||||
|
|
||||||
jQuery.ajax ({
|
|
||||||
type: 'POST',
|
|
||||||
url: get_url_ajax(),
|
|
||||||
data: parameter,
|
|
||||||
async: false,
|
|
||||||
timeout: 10000,
|
|
||||||
success: function (data) {
|
|
||||||
element_status = data;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var img_src= null;
|
|
||||||
var parameter = Array();
|
|
||||||
parameter.push ({name: "page", value: "include/ajax/skins.ajax"});
|
|
||||||
parameter.push ({name: "get_image_path", value: "1"});
|
|
||||||
parameter.push ({name: "img_src", value: getImageElement(id_data)});
|
|
||||||
parameter.push ({name: "only_src", value: "1"});
|
|
||||||
parameter.push ({name: "id_visual_console",
|
|
||||||
value: id_visual_console});
|
|
||||||
|
|
||||||
jQuery.ajax ({
|
|
||||||
type: 'POST',
|
|
||||||
url: get_url_ajax(),
|
|
||||||
data: parameter,
|
|
||||||
async: false,
|
|
||||||
timeout: 10000,
|
|
||||||
success: function (data) {
|
|
||||||
img_src = data;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'group_item':
|
case 'group_item':
|
||||||
class_type = "group_item";
|
class_type = "group_item";
|
||||||
@ -1596,6 +1550,8 @@ function createItem(type, values, id_data) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img_src = "images/spinner.gif";
|
||||||
|
|
||||||
item = $('<div></div>')
|
item = $('<div></div>')
|
||||||
.attr('class', 'item ' + class_type)
|
.attr('class', 'item ' + class_type)
|
||||||
.css('text-align', 'center')
|
.css('text-align', 'center')
|
||||||
@ -1631,7 +1587,7 @@ function createItem(type, values, id_data) {
|
|||||||
var $input = $('<input></input>')
|
var $input = $('<input></input>')
|
||||||
.attr('id', 'hidden-status_' + id_data)
|
.attr('id', 'hidden-status_' + id_data)
|
||||||
.attr('type', 'hidden')
|
.attr('type', 'hidden')
|
||||||
.attr('value', element_status)
|
.attr('value', -1)
|
||||||
.attr('name', 'status_' + id_data);
|
.attr('name', 'status_' + id_data);
|
||||||
|
|
||||||
item
|
item
|
||||||
@ -1639,6 +1595,9 @@ function createItem(type, values, id_data) {
|
|||||||
.append($image)
|
.append($image)
|
||||||
.append($span)
|
.append($span)
|
||||||
.append($input);
|
.append($input);
|
||||||
|
|
||||||
|
set_static_graph_status(id_data, values['image']);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'percentile_bar':
|
case 'percentile_bar':
|
||||||
case 'percentile_item':
|
case 'percentile_item':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user