Line 151: |
Line 151: |
| ==The Controller File (dhcpman.pm)== | | ==The Controller File (dhcpman.pm)== |
| | | |
− | === The Menu Position and entry === | + | === Navigation Menu and Routing Tables === |
| + | Here is the heading for "untested" skeleton for the controller file.:<syntaxhighlight lang="perl"> |
| + | #!/usr/bin/perl -wU |
| | | |
− | === Routing table ===
| + | #---------------------------------------------------------------------- |
| + | # heading : Configuration |
| + | # description : DHCP manager |
| + | # navigation : 2000 2500 |
| + | # |
| + | # name : dhcpman, method : post, url : /dhcpman, ctlact : Dhcpman#main |
| + | # name : dhcpman1, method : get, url : /dhcpman1, ctlact : Dhcpman#do_leases |
| + | # name : dhcpman2, method : get, url : /dhcpman2, ctlact : Dhcpman#do_winpopup |
| + | # name : dhcpman3, method : get, url : /dhcpman3, ctlact : Dhcpman#do_scan |
| + | # name : dhcpman4, method : get, url : /dhcpman4, ctlact : Dhcpman#do_del_lease |
| + | # name : dhcpman5, method : get, url : /dhcpman5, ctlact : Dhcpman#update_config |
| + | # |
| + | # routes : end |
| + | # |
| + | # |
| | | |
− | === Perl Main and sub-routines=== | + | </syntaxhighlight>The Server Manager 2 system extracts these "comments" from the header of the controller file and builds the navigation menu and the routing tables accordingly. |
| + | |
| + | === Perl Main and sub-routines === |
| | | |
| ==The Template Files (dhcpman.html.ep and partials)== | | ==The Template Files (dhcpman.html.ep and partials)== |