Hello Chad Lynn I added a routine sget to leaf-cdb (cdb) to get an output like this leaf-cdb sget tree shorewall/rules action/0 source/0 dest/0 dport/0 'ACCEPT' ' net' ' fw' '22' reason see below
in addition to leaf-cdb get tree .... action_0='ACCEPT' source_0='net' The webpage is created by the following script ( excerpt) # pseudocode first part this is only partially functional yet if I_ansaving parse the vars do leaf-set with each row of variables if vars are changed send signal which templates has to be updated at commit endif # realcode now. # # the page is calling itself so the changes are visible now # htmlhead htmltable "$Mainmenu" "$shormenu" "Shorewall rules" writeform shorrule writetitle "delete" action source dest proto dport sport orgdest # # here is the logic # i=`/leaf/bin/leaf-cdb get shorewall/rules/action |wc -l` nr=0 while [ $nr -lt $i ] do writerow $nr $nr `/leaf/bin/leaf-cdb sget tree shorewall/rules action/$nr source/$nr dest/$nr proto/$nr dport/$nr sport/$nr odest/$nr` nr=`expr $nr + 1 ` done writerow "new" "add" writebutton writescriptbutton editscript file rules htmlend # # end of webpage the second part is common to all pages the only changes are the # writerow function that can be modular too. # I had problems with the setting leaf/bin/leaf-cdb get tree shorewall/rules action/$nr source/$nr .... >> /tmp/sourcefile and useing the . /tmp/sourcefile in the configuration setup to insert the vars . # The writeback part of the script is not completely functional yet , some detail problems , they allways take the most time ;( But I feal we are on the right way :) The size we loose with this system is partly recovered from the leaner config files. 2. Database The database must only be defined definitively for variablest that are used in different Packages. Otherwise someone calls the ehternet 0 ip address eth0_ip another eth0_ipaddr etc Specific settings that are used only to tune a certain package for example dial_nr in ppp0 can be defined by the package itself. in the way described before package contains its configuration-userinterface and templates in the pppd interface there is an inputfield to set the dial_nr after posting the form. the new var ppp0 _dial_nr or whatever is inserted in the db. We should have a rule that each maintainers informs a central documentation what vars he used. Those should be documented on the leaf page wth a comment what the var is for. This to prevent the use of the same name in different packages or versions for different purposes. A maintainer that want to use information from another packagecan easily select which var he has to use. > On Fri, 2003-02-14 at 23:13, Lynn Avants wrote: > > I apologize to both of you guy's, I just realized that the thread had gone > > off-list. I'm going to have to remember to hit 'reply to all' from now on. > > :-( > > > > I'm loading the db onto a Bering disk now and starting some testing. > > Can you update me on the progress that has been made and any > > packages that might be complete and/or a variable list, so I can stay > > consistant with your work. > > I am working furiously on a template parser in sh that will allow us to > unroll loops and other sorts of directives. I do not have much new > other than I have renamed the utilities to cdb, tmpl and trig (since > they will probably be in /leaf/bin and there is not a current namespace > collision). I have also packaged all three in the same project in cvs: > devel/ccarr/devel/leaf-tools (the small amount of doc is still in the > individual projects, but I will get it moved over and solidified) > > I imagine that if all goes well I will have something pretty good by the > end of this weekend. I will check it all in when I get done. b> > I have also laid out the following proposed cdb hierarchy (with a simple > web interface in mind; not completeness): database snipped Regards Eric Wolzak member of the Bering Crew ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ leaf-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-devel