Fixed problems with custom graphs. Ticket: #3413
This commit is contained in:
parent
a82966af5a
commit
a33c69d5cf
|
@ -156,7 +156,7 @@ echo "</td>";
|
|||
echo "</tr><tr>";
|
||||
echo "<td colspan='3' align='right'></td>";
|
||||
echo "</tr></table>";
|
||||
echo "<div style='width:100%'><input style='float:right;' type=submit name='store' class='sub add' value='".__('Add')."'></div></form>";
|
||||
echo "<div style='width:100%'><input style='float:right;' id='submit-add' type=submit name='store' class='sub add' value='".__('Add')."'></div></form>";
|
||||
|
||||
ui_require_jquery_file ('pandora.controls');
|
||||
ui_require_jquery_file ('ajaxqueue');
|
||||
|
@ -169,6 +169,19 @@ $(document).ready (function () {
|
|||
$(document).data('text_for_module', $("#none_text").html());
|
||||
|
||||
$("#id_agents").change(agent_changed_by_multiple_agents);
|
||||
|
||||
|
||||
$("#submit-add").click(function() {
|
||||
$('#module').map(function(){
|
||||
if ($(this).val() != "0" )
|
||||
$(this).prop('selected', true);
|
||||
});
|
||||
|
||||
if($('#module')[0].childElementCount == 1 && ($('#module')[0].value == "" || $('#module')[0].value == "0")) {
|
||||
alert('<?php echo __('Please, select a module'); ?>');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function filterByGroup(idGroup) {
|
||||
|
|
|
@ -1182,7 +1182,10 @@ function graphic_combined_module ($module_list, $weight_list, $period,
|
|||
}
|
||||
|
||||
if (!empty($name_list) && $names_number == $module_number && isset($name_list[$i])) {
|
||||
$module_name_list[$i] = $name_list[$i];
|
||||
if ($labels[$agent_module_id] != '')
|
||||
$module_name_list[$i] = $labels[$agent_module_id];
|
||||
else
|
||||
$module_name_list[$i] = $agent_name ." / ". $module_name;
|
||||
}
|
||||
else {
|
||||
//Get and process agent name
|
||||
|
@ -1198,7 +1201,10 @@ function graphic_combined_module ($module_list, $weight_list, $period,
|
|||
$module_name = sprintf(__("projection for %s"), $module_name);
|
||||
$module_name = ui_print_truncate_text($module_name, 'module_small', false, true, false, '...', false);
|
||||
|
||||
$module_name_list[$i] = $agent_name ." / ". $module_name;
|
||||
if ($labels[$agent_module_id] != '')
|
||||
$module_name_list[$i] = $labels[$agent_module_id];
|
||||
else
|
||||
$module_name_list[$i] = $agent_name ." / ". $module_name;
|
||||
}
|
||||
|
||||
// Data iterator
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue