Add comments
This commit is contained in:
parent
baa2be3d78
commit
12a5b71f35
|
@ -1,4 +1,4 @@
|
||||||
# This file is generated by scripts/jsongenerator.pl. Don't modify it by hand
|
# This file is generated by ./scripts/jsongenerator.pl. Don't modify it by hand
|
||||||
package Lemonldap::NG::Common::Conf::DefaultValues;
|
package Lemonldap::NG::Common::Conf::DefaultValues;
|
||||||
|
|
||||||
our $VERSION = '2.0.0';
|
our $VERSION = '2.0.0';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# This file is generated by scripts/jsongenerator.pl. Don't modify it by hand
|
# This file is generated by ./scripts/jsongenerator.pl. Don't modify it by hand
|
||||||
package Lemonldap::NG::Manager::Constants;
|
package Lemonldap::NG::Manager::Constants;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
|
11
lemonldap-ng-manager/scripts/jsongenerator.pl
Normal file → Executable file
11
lemonldap-ng-manager/scripts/jsongenerator.pl
Normal file → Executable file
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env perl -w
|
#!/usr/bin/env perl -Ilib/ -w
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@ $jsonEnc->canonical(1);
|
||||||
# 1. confTree.js
|
# 1. confTree.js
|
||||||
unless ( $opts{f} ) {
|
unless ( $opts{f} ) {
|
||||||
$mainTree = Lemonldap::NG::Manager::CTrees::cTrees();
|
$mainTree = Lemonldap::NG::Manager::CTrees::cTrees();
|
||||||
|
|
||||||
my $script =
|
my $script =
|
||||||
'function templates(tpl,key){'
|
'function templates(tpl,key){'
|
||||||
. 'var ind;'
|
. 'var ind;'
|
||||||
|
@ -69,6 +70,9 @@ unless ( $opts{f} ) {
|
||||||
. '"title":r,'
|
. '"title":r,'
|
||||||
. '"get":tpl+"s/"+key+"/"+r' . '};' . '};'
|
. '"get":tpl+"s/"+key+"/"+r' . '};' . '};'
|
||||||
. 'switch(tpl){';
|
. 'switch(tpl){';
|
||||||
|
|
||||||
|
# To build confTree.js, each special node is scanned from
|
||||||
|
# Lemonldap::NG::Manager::CTrees
|
||||||
foreach my $node ( sort keys $mainTree ) {
|
foreach my $node ( sort keys $mainTree ) {
|
||||||
@cnodesKeys = ();
|
@cnodesKeys = ();
|
||||||
my $jsonTree = [];
|
my $jsonTree = [];
|
||||||
|
@ -78,14 +82,17 @@ unless ( $opts{f} ) {
|
||||||
$tmp =~ s/"(true|false)"/$1/sg;
|
$tmp =~ s/"(true|false)"/$1/sg;
|
||||||
$tmp =~ s/:\s*"(\d+)"\s*(["\}])/:$1$2/sg;
|
$tmp =~ s/:\s*"(\d+)"\s*(["\}])/:$1$2/sg;
|
||||||
$script .= "case'$node':return$tmp;";
|
$script .= "case'$node':return$tmp;";
|
||||||
|
|
||||||
|
# Second step, Manager/Constants.pm file will contain datas issued from
|
||||||
|
# this scan
|
||||||
my $ra = Regexp::Assemble->new;
|
my $ra = Regexp::Assemble->new;
|
||||||
|
|
||||||
|
# Build $oidcOPMetaDataNodeKeys, $samlSPMetaDataNodeKeys,...
|
||||||
foreach my $r (@cnodesKeys) {
|
foreach my $r (@cnodesKeys) {
|
||||||
$ra->add($r);
|
$ra->add($r);
|
||||||
}
|
}
|
||||||
$cnodesRe{$node} = $ra->as_string;
|
$cnodesRe{$node} = $ra->as_string;
|
||||||
|
|
||||||
#print Dumper( $jsonTree);
|
|
||||||
push @ignoreKeys, $node;
|
push @ignoreKeys, $node;
|
||||||
}
|
}
|
||||||
$script .= 'default:return [];}}';
|
$script .= 'default:return [];}}';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user