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

Diff of /SubsystemEditor/SubsysEditor.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Mon May 14 21:05:57 2007 UTC revision 1.2, Mon Jul 16 20:07:16 2007 UTC
# Line 1  Line 1 
1  use strict;  use strict;
2  use warnings;  use warnings;
3    
4    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  use DBMaster;  use DBMaster;
9  use WebApplication;  use WebApplication;
10  use WebMenu;  use WebMenu;
11  use WebLayout;  use WebLayout;
12  use Tracer;  use Tracer;
13    use FigSubsystemMaster;
14    
15  my $cgi = new CGI();  my $cgi = new CGI();
16  ETracing($cgi);  ETracing($cgi);
17    eval {
18  my $dbmaster = DBMaster->new('WebServerBackend');  my $dbmaster = DBMaster->new('WebServerBackend');
19        Trace("Setting up layout.") if T(3);
20  my $layout = WebLayout->new('./Html/SubsystemEditorLayout.tmpl');  my $layout = WebLayout->new('./Html/SubsystemEditorLayout.tmpl');
21  $layout->add_css('./Html/SubsystemEditor.css');  $layout->add_css('./Html/SubsystemEditor.css');
22        Trace("Creating menu.") if T(3);
23  my $menu = WebMenu->new();  my $menu = WebMenu->new();
24  $menu->add_category('Home', 'SubsysEditor.cgi?page=SubsystemList');  $menu->add_category('Home', 'SubsysEditor.cgi?page=SubsystemList');
25        Trace("Creating application object.") if T(3);
26  my $WebApp = WebApplication->new( { id       => 'SubsystemEditor',  my $WebApp = WebApplication->new( { id       => 'SubsystemEditor',
27                                      dbmaster => $dbmaster,                                      dbmaster => $dbmaster,
28                                      menu     => $menu,                                      menu     => $menu,
29                                      layout   => $layout,                                      layout   => $layout,
30                                      default  => 'SubsystemList',                                          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();  $WebApp->run();
41    };
42    if ($@) {
43        Confess("Unhandled exception: $@");
44    }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3