Modified snmp browser to work with wizard
Former-commit-id: c8d37e06967ed43867320ae89fd3dc2bede7b0ce
This commit is contained in:
parent
819910923f
commit
55af128cd5
|
@ -485,7 +485,7 @@ class Wizard
|
|||
|
||||
try {
|
||||
if (isset($cb_function) === true) {
|
||||
call_user_func(
|
||||
call_user_func_array(
|
||||
$cb_function,
|
||||
(isset($cb_args) === true) ? $cb_args : []
|
||||
);
|
||||
|
|
|
@ -27,7 +27,7 @@ $nfdump_date_format = 'Y/m/d.H:i:s';
|
|||
* @param id string Level ID. Do not set, used for recursion.
|
||||
* @param depth string Branch depth. Do not set, used for recursion.
|
||||
*/
|
||||
function snmp_browser_print_tree($tree, $id=0, $depth=0, $last=0, $last_array=[])
|
||||
function snmp_browser_print_tree($tree, $id=0, $depth=0, $last=0, $last_array=[], $sufix=false)
|
||||
{
|
||||
static $url = false;
|
||||
|
||||
|
@ -106,7 +106,9 @@ function snmp_browser_print_tree($tree, $id=0, $depth=0, $last=0, $last_array=[]
|
|||
echo '</a>';
|
||||
}
|
||||
|
||||
echo html_print_checkbox("create_$sub_id", 0, false, true, false, '').' <span>'.$level.'</span>';
|
||||
$checkbox_name_sufix = ($sufix) ? '' : '_'.$level;
|
||||
$checkbox_name = 'create_'.$sub_id.$checkbox_name_sufix;
|
||||
echo html_print_checkbox($checkbox_name, 0, false, true, false, '').' <span>'.$level.'</span>';
|
||||
if (isset($sub_level['__VALUE__'])) {
|
||||
echo '<span class="value" style="display: none;"> = '.$sub_level['__VALUE__'].'</span>';
|
||||
}
|
||||
|
@ -114,7 +116,7 @@ function snmp_browser_print_tree($tree, $id=0, $depth=0, $last=0, $last_array=[]
|
|||
echo '</li>';
|
||||
|
||||
// Recursively print sub levels
|
||||
snmp_browser_print_tree($sub_level, $sub_id, ($depth + 1), ($count == $total ? 1 : 0), $last_array);
|
||||
snmp_browser_print_tree($sub_level, $sub_id, ($depth + 1), ($count == $total ? 1 : 0), $last_array, $sufix);
|
||||
|
||||
$count++;
|
||||
}
|
||||
|
@ -838,7 +840,7 @@ function snmp_browser_print_container($return=false, $width='100%', $height='500
|
|||
if ($(this).is(':checked') ) {
|
||||
$('input[name*=create_network_component]').show();
|
||||
var id_input = $(this).attr("id");
|
||||
id_input = id_input.split("checkbox-create_");
|
||||
id_input = id_input.match("checkbox-create_([0-9]+)");
|
||||
var checks = $('#ul_'+id_input[1]).find('input').map(function(){
|
||||
if(this.id.indexOf('checkbox-create_')!=-1){
|
||||
return this.id;
|
||||
|
@ -851,7 +853,7 @@ function snmp_browser_print_container($return=false, $width='100%', $height='500
|
|||
} else {
|
||||
var id_input = $(this).attr("id");
|
||||
|
||||
id_input = id_input.split("checkbox-create_");
|
||||
id_input = id_input.match("checkbox-create_([0-9]+)");
|
||||
var checks = $('#ul_'+id_input[1]).find('input').map(function(){
|
||||
if(this.id.indexOf('checkbox-create_')!=-1){
|
||||
return this.id;
|
||||
|
|
Loading…
Reference in New Issue