[Bio] / SubsystemEditor / SubsysEditor.cgi Repository:
ViewVC logotype

Annotation of /SubsystemEditor/SubsysEditor.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (view) (download)

1 : parrello 1.1 use strict;
2 :     use warnings;
3 :    
4 : parrello 1.2 use FIG_Config;
5 :     use lib "$FIG_Config::fig_disk/dist/current/$FIG_Config::arch/lib/WebApplication";
6 :     use lib "$FIG_Config::common_runtime/lib/SubsystemEditor";
7 :    
8 : parrello 1.1 use DBMaster;
9 :     use WebApplication;
10 :     use WebMenu;
11 :     use WebLayout;
12 :     use Tracer;
13 : parrello 1.2 use FigSubsystemMaster;
14 : parrello 1.1
15 :     my $cgi = new CGI();
16 :     ETracing($cgi);
17 : parrello 1.2 eval {
18 :     my $dbmaster = DBMaster->new('WebServerBackend');
19 :     Trace("Setting up layout.") if T(3);
20 :     my $layout = WebLayout->new('./Html/SubsystemEditorLayout.tmpl');
21 :     $layout->add_css('./Html/SubsystemEditor.css');
22 :     Trace("Creating menu.") if T(3);
23 :     my $menu = WebMenu->new();
24 :     $menu->add_category('Home', 'SubsysEditor.cgi?page=SubsystemList');
25 :     Trace("Creating application object.") if T(3);
26 :     my $WebApp = WebApplication->new( { id => 'SubsystemEditor',
27 :     dbmaster => $dbmaster,
28 :     menu => $menu,
29 :     layout => $layout,
30 :     default => 'SubsystemList'
31 :     } );
32 :    
33 :     # For now, only use the FIG subsystem object. Later we may need to
34 :     # parameterize this somehow. In order to switch to a different
35 :     # database technology, you need to replace FigSubsystemMaster and
36 :     # FigSubsystem.
37 :     Trace("Connecting to subsystem object.") if T(3);
38 :     $WebApp->setAppData(SubsystemObject => FigSubsystemMaster->new());
39 :     Trace("Starting to run web app.") if T(3);
40 :     $WebApp->run();
41 :     };
42 :     if ($@) {
43 :     Confess("Unhandled exception: $@");
44 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3