1 line
1.2 KiB
JavaScript
1 line
1.2 KiB
JavaScript
![]() |
var filterFunctions={authParams:function(b,a,c){var d=[];c.nodes.forEach(function(e){d.push(b.getKey(e))});a.all(d).then(function(){var g=false;var e=[];var h=function(j){var i=j.toLowerCase();if(i=="ad"){i="ldap"}if(i=="openidconnect"){i="oidc"}e.push(i+"Params")};if(c.nodes[0].data.match(/^(Choice|Multi)/)){for(var f=1;f<3;f++){c.nodes[f].data=c.nodes[0].data}if(c.nodes[0].data.match(/^Multi/)){c.nodes[2].data="Null"}}c.nodes.forEach(function(i){h(i.data)});c.nodes_cond.forEach(function(m){if(c.nodes[0].data=="Choice"&&m.id=="choiceParams"){var l=m._nodes?m._nodes:m.nodes;if(!l[1].cnodes){l=l[1]._nodes?l[1]._nodes:l[1].nodes;l.forEach(function(n){n.data.forEach(function(o){h(o)})})}else{b.waiting=true;b.download({"$modelValue":l[1]}).then(function(){filterFunctions.authParams(b,a,c)});return}}else{if(c.nodes[0].data=="Multi"&&m.id=="multiParams"){var l=m._nodes?m._nodes:m.nodes;if(!("data" in l[0])){a.all([b.getKey(l[0]),b.getKey(l[1])]).then(function(){filterFunctions.authParams(b,a,c)});return}var i=";";var k=new RegExp(i+"\\s*(\\w+)","g");var j=""+(l[0].data?i+l[0].data:"")+(l[1].data?i+l[1].data:"");while((result=k.exec(j))!==null){h(result[1])}}}});c.nodes_cond.forEach(function(i){if(!g&&e.indexOf(i.id)==-1){i.show=false}else{i.show=true}})})}};
|