.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Lemonldap::NG::Manager::Build 3pm" .TH Lemonldap::NG::Manager::Build 3pm "2023-05-13" "perl v5.32.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Lemonldap::NG::Manager::Build \- Static files generator of Lemonldap::NG Web\-SSO system. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Lemonldap::NG::Manager::Build; \& \& Lemonldap::NG::Manager::Build\->run( \& structFile => "site/htdocs/static/struct.json", \& confTreeFile => "site/htdocs/static/js/conftree.js", \& managerConstantsFile => "lib/Lemonldap/NG/Common/Conf/ReConstants.pm", \& managerAttributesFile => \*(Aqlib/Lemonldap/NG/Manager/Attributes.pm\*(Aq, \& defaultValuesFile => "lib/Lemonldap/NG/Common/Conf/DefaultValues.pm", \& firstLmConfFile => "_example/conf/lmConf\-1.json", \& reverseTreeFile => "site/htdocs/static/reverseTree.json", \& ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Lemonldap::NG::Manager::Build is only used to build javascript files and Lemonldap::NG constants Perl files. It must be launched after each change. .SS "\s-1DEVELOPER CORNER\s0" .IX Subsection "DEVELOPER CORNER" To add a new parameter, you have to: .IP "declare it in Manager/Build/Attributes.pm;" 4 .IX Item "declare it in Manager/Build/Attributes.pm;" .PD 0 .IP "declare its position in the tree in Manager/Build/Tree.pm (or Manager/Build/CTrees.pm for complex nodes);" 4 .IX Item "declare its position in the tree in Manager/Build/Tree.pm (or Manager/Build/CTrees.pm for complex nodes);" .IP "refresh files by using this (or launch any build makefile target at the root of the Lemonldap::NG project sources)." 4 .IX Item "refresh files by using this (or launch any build makefile target at the root of the Lemonldap::NG project sources)." .PD .PP See below for details. .PP \fIFiles generated\fR .IX Subsection "Files generated" .PP `scripts/jsongenerator.pl` file uses Lemonldap::NG::Manager::Build::Attributes, Lemonldap::NG::Manager::Build::Tree and Lemonldap::NG::Manager::Build::CTrees to generate .IP "`site/htdocs/static/struct.json`:" 4 .IX Item "`site/htdocs/static/struct.json`:" Main file containing the tree view; .IP "`site/htdocs/static/js/conftree.js`:" 4 .IX Item "`site/htdocs/static/js/conftree.js`:" generates Virtualhosts, \s-1SAML\s0 and OpenID-Connect partners sub-trees; .IP "`site/htdocs/static/reverseTree.json`:" 4 .IX Item "`site/htdocs/static/reverseTree.json`:" map used by manager diff to find attribute position in the tree; .IP "`Lemonldap::NG::Manager::Constants`:" 4 .IX Item "`Lemonldap::NG::Manager::Constants`:" constants used by all Perl manager components; .IP "`Lemonldap::NG::Common::Conf::DefaultValues`:" 4 .IX Item "`Lemonldap::NG::Common::Conf::DefaultValues`:" constants used to read configuration; .IP "`Lemonldap::NG::Manager::Attributes`:" 4 .IX Item "`Lemonldap::NG::Manager::Attributes`:" parameters attributes used by the manager during configuration upload; .IP "lmConf\-1.json:" 4 .IX Item "lmConf-1.json:" first configuration in file format; .PP \fIAttribute declaration\fR .IX Subsection "Attribute declaration" .PP set your new attribute as a key of \fBattributes()\fR function that points to a hash ref containing: .IP "type (required):" 4 .IX Item "type (required):" content type must be declared in sub \fBtypes()\fR in the same file (except if attribute embeds its own tests) and must match to a form stored in static/forms/ directory; .IP "help (optional):" 4 .IX Item "help (optional):" Relative \s-1HTML\s0 path to help page (relative to /doc/pages/documentation//); .IP "default (recommended):" 4 .IX Item "default (recommended):" default value to set if not defined; .IP "select (optional):" 4 .IX Item "select (optional):" required only if type is `select`. In this case, it must contain an array of { k => , v => } hashref .IP "documentation (recommended):" 4 .IX Item "documentation (recommended):" some words for other developers .IP "test (optional):" 4 .IX Item "test (optional):" if test is not defined for this type or if test must be more restrictive, set here a regular expression or a subroutine. Arguments passed to subroutine are (keyValue, newConf, currentKey). It returns 2 arguments: a boolean result and a message (if non empty message will be displayed as warning or error depending of result); .IP "msgFail (optional):" 4 .IX Item "msgFail (optional):" for regexp based tests, message to display in case of error. Words to translate have to be written as so: _\|_toTranslate_\|_; .IP "keyTest (optional):" 4 .IX Item "keyTest (optional):" for keys/values attributes, test to be applied on key; .IP "keyMsgFail (optional):" 4 .IX Item "keyMsgFail (optional):" for regexp based key tests, same as msgFail for keys test; .PP If you want to declare a new type, you have to declare following properties: .IP "test, msgFail, keyTest, keyMsgFail as shown above," 4 .IX Item "test, msgFail, keyTest, keyMsgFail as shown above," .PD 0 .IP "form: form to use if it doesn't have the same name." 4 .IX Item "form: form to use if it doesn't have the same name." .PD .PP \fITree location\fR .IX Subsection "Tree location" .PP The tree is now very simple: it contains nodes and leaves. Leaves are designed only by their attribute name. All description must be done in the file described above. Nodes are array member designed as this: .PP .Vb 8 \& { \& title => \*(AqtitleToTranslate\*(Aq, \& help => \*(AqhelpUrl\*(Aq, \& form => \*(AqrelativeUrl\*(Aq, \& nodes => [ \& ... nodes or leaf ... \& ] \& } .Ve .PP Explanations: .IP "title (required):" 4 .IX Item "title (required):" it must contain an entry of static/languages/lang.json .IP "help (recommended):" 4 .IX Item "help (recommended):" as above, the relative \s-1HTML\s0 path to the help page (relative to /doc/pages/documentation//); .IP "form (optional):" 4 .IX Item "form (optional):" the name of a static/forms/.html file .IP "nodes:" 4 .IX Item "nodes:" array of sub nodes and leaf attached to this node .IP "group:" 4 .IX Item "group:" must never be used in conjunction with nodes. Array of leaves only to be displayed in the same form .IP "nodes_cond:" 4 .IX Item "nodes_cond:" array of sub nodes that will be displayed with a filter. Not yet documented here, see the source code of site/htdocs/static/js/filterFunctions.js. .IP "nodes_filter:" 4 .IX Item "nodes_filter:" filter entry in site/htdocs/static/js/filterFunctions.js for the same feature. .SH "SEE ALSO" .IX Header "SEE ALSO" .SH "AUTHORS" .IX Header "AUTHORS" .IP "LemonLDAP::NG team " 4 .IX Item "LemonLDAP::NG team " .SH "BUG REPORT" .IX Header "BUG REPORT" Use \s-1OW2\s0 system to report bug or ask for features: .PP Note that if you want to post a ticket for a conf upload problem, please see Lemonldap::NG::Manager::Conf::Parser before. .SH "DOWNLOAD" .IX Header "DOWNLOAD" Lemonldap::NG is available at .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" See \s-1COPYING\s0 file for details. .PP This library is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \&\s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \&\s-1GNU\s0 General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with this program. If not, see .