MGE-PortalWiki/DeveloperDocumentation: Difference between revisions

From BRF-Software
Jump to navigation Jump to search
imported>KoljaHenckel
No edit summary
m (10 revisions)
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:
= MGE-[[PortalWiki/DeveloperDocumentation]]: =
= MGE-[[PortalWiki/DeveloperDocumentation]]: =


* [[#Configs.pm|How / where to set global varialbes for the server]]
* [[#Configs.pm|How / where to set global variables for the server]]
* [[#portal.cgi|look and feel - Overview]]
* [[#portal.cgi|look and feel - Overview]]
* [[#project.cgi|Projects]]
* [[#project.cgi|Projects]]
Line 8: Line 8:


[[Anchor(Configs.pm)]]
[[Anchor(Configs.pm)]]
== How / where to set global varialbes for the server ==
== How / where to set global variables for the server ==


Global variables and settings have to be changed in the Configs.pm file in the cgi-bin directory.
Global variables and settings have to be changed in the Configs.pm file in the cgi-bin directory.

Latest revision as of 07:14, 26 October 2011

MGE-PortalWiki/DeveloperDocumentation:

Anchor(Configs.pm)

How / where to set global variables for the server

Global variables and settings have to be changed in the Configs.pm file in the cgi-bin directory.

Things like Directories of the server (template and cgi-bin directories) or special variables ($SAMS_LINK, or $SAMS_SESSION) are defined here. They are exported and have to be imported in scripts where they have to be used.

These variables have to be adjusted for interal and external use!!

e.g. the internal servers adresses are different to the external ones, also the internal Blaststorage path is different to the external.

Anchor(portal.cgi)

Look and feel - Overview

The html interface used for the portal is generated by the portal.cgi. This is where the menu bar on the left side is configured and which .pm files or subfunctions give back the desired information on the right side when selecting the menuvalues.

Anchor(project.cgi)

Projects

What does project.cgi do?

When logging in at the portal a session is initiallized and a gpms-applicationframe is set.

With this, the function $app_frm->get_available_projects() gives back alls available projects the user has access to. The Projecttypes indicate the different application. With this information project.cgi links to the applications with the special options needed. (see below)

How to be linked to a selected project

Project.cgi gets the projectname and the projecttype to give back the correct link and preferencences for the selected application. Hidden information (like the password and projectname) can be given by using the hidden imput type for forms. (some applications like GenDB-2.2 need to get the password and the username to create a new session, because the passwordfile of the application is a differnt one to the server).

The projecttype (e.g. SAMS) defines the variables for the links and the cookie name for the applications ($SAMS_LINK and $SAMS_SESSION) these varibles have to be defined in the Configs.pm, exported there and imported in the project.cgi

Normally the namedeclarations of the projecttypes (SAMS, MircoLIMS, PRODB, EMMAII, GenDB, GPMS.. work fine for that, but .. Probelm: GenDB-2.2_LINK is no correct perlvariable when using strict. !!! So in this case the linkname is converted to GenDB_2_2_LINK, session name is converted to GenDB_2_2_SESSION has to be changed sometime!

Anchor(portal.cgi)

How to implement new tools

The available tools are implemented in own .pm files.

These .pm files contain the subfunction get_content which gives back the complete code of an html page (if wanted with java script content). the page will be displayed in the right half of the browsing windows, on the left half the menu will stay.

To iplement a new tool, the portal.cgi has to be edited:

a new subfunction (e.g. _show_mowse) has to be defined to give back the html-content of the mowse_web.pm file.

Then the tool has to be added in the Tools-section in portal.cgi with the call of the new function (for examples have a look in the portal.cgi)