Added the last change to load string modules

This commit is contained in:
Arturo Gonzalez 2017-11-13 09:35:24 +01:00
parent eb39d25c4b
commit 110945bccf
2 changed files with 19 additions and 5 deletions

View File

@ -2486,7 +2486,7 @@ function setDonutsGraph (id_data, values) {
else {
$("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/donut-graph.png');
if($('#text-width').val() == 0 || $('#text-height').val() == 0){
if($('#text-width_percentile').val() == 0){
// Image size
}
else{

View File

@ -180,7 +180,7 @@ switch ($action) {
}
$is_string = db_get_value_filter ('id_tipo_modulo', 'tagente_modulo',
array ('id_agente' => _string,
array ('id_agente' => $id_agent,
'id_agente_modulo' => $id_module));
if ($layoutData['id_metaconsole'] != 0) {
@ -613,7 +613,6 @@ switch ($action) {
$values['border_color'] = $resume_color;
$values['type'] = DONUT_GRAPH;
$values['id_agent'] = $id_agent_string;
break;
case 'box_item':
$values['border_width'] = $border_width;
@ -751,6 +750,7 @@ switch ($action) {
case 'donut_graph':
unset($values['border_color']);
unset($values['width']);
unset($values['id_agent']);
break;
case 'box_item':
unset($values['border_width']);
@ -895,6 +895,20 @@ switch ($action) {
case 'donut_graph':
$elementFields['width_percentile'] = $elementFields['width'];
$elementFields['resume_color'] = $elementFields['border_color'];
$elementFields['id_agent_string'] = $elementFields['id_agent'];
if (($elementFields['id_agent_string'] != 0)
&& ($elementFields['id_layout_linked'] == 0)) {
$modules = agents_get_modules(
$elementFields['id_agent'], false,
array('disabled' => 0,
'id_agente' => $elementFields['id_agent'],
'tagente_modulo.id_tipo_modulo IN' => "(17,23,3,10,33)"));
$elementFields['modules_html'] = '<option value="0">--</option>';
foreach ($modules as $id => $name) {
$elementFields['modules_html'] .= '<option value="' . $id . '">' . io_safe_output($name) . '</option>';
}
}
break;
case 'module_graph':
@ -1012,8 +1026,8 @@ switch ($action) {
break;
case 'donut_graph':
$values['type'] = DONUT_GRAPH;
$values['width'] = $width;
$values['height'] = $height;
$values['width'] = $width_percentile;
$values['height'] = $width_percentile;
$values['border_color'] = $resume_color;
$values['id_agent'] = $id_agent_string;
break;