mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
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 {
|
try {
|
||||||
if (isset($cb_function) === true) {
|
if (isset($cb_function) === true) {
|
||||||
call_user_func(
|
call_user_func_array(
|
||||||
$cb_function,
|
$cb_function,
|
||||||
(isset($cb_args) === true) ? $cb_args : []
|
(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 id string Level ID. Do not set, used for recursion.
|
||||||
* @param depth string Branch depth. 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;
|
static $url = false;
|
||||||
|
|
||||||
@ -106,7 +106,9 @@ function snmp_browser_print_tree($tree, $id=0, $depth=0, $last=0, $last_array=[]
|
|||||||
echo '</a>';
|
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__'])) {
|
if (isset($sub_level['__VALUE__'])) {
|
||||||
echo '<span class="value" style="display: none;"> = '.$sub_level['__VALUE__'].'</span>';
|
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>';
|
echo '</li>';
|
||||||
|
|
||||||
// Recursively print sub levels
|
// 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++;
|
$count++;
|
||||||
}
|
}
|
||||||
@ -838,7 +840,7 @@ function snmp_browser_print_container($return=false, $width='100%', $height='500
|
|||||||
if ($(this).is(':checked') ) {
|
if ($(this).is(':checked') ) {
|
||||||
$('input[name*=create_network_component]').show();
|
$('input[name*=create_network_component]').show();
|
||||||
var id_input = $(this).attr("id");
|
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(){
|
var checks = $('#ul_'+id_input[1]).find('input').map(function(){
|
||||||
if(this.id.indexOf('checkbox-create_')!=-1){
|
if(this.id.indexOf('checkbox-create_')!=-1){
|
||||||
return this.id;
|
return this.id;
|
||||||
@ -851,7 +853,7 @@ function snmp_browser_print_container($return=false, $width='100%', $height='500
|
|||||||
} else {
|
} else {
|
||||||
var id_input = $(this).attr("id");
|
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(){
|
var checks = $('#ul_'+id_input[1]).find('input').map(function(){
|
||||||
if(this.id.indexOf('checkbox-create_')!=-1){
|
if(this.id.indexOf('checkbox-create_')!=-1){
|
||||||
return this.id;
|
return this.id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user