Manage-site-configurations

From PTAGISWiki

Jump to: navigation, search


Overview

PTAGIS maintains diagrams of major sites. These diagrams show coil locations and identifiers.

The URL to view these diagrams is Data > Sites > View Data > Site Configuration

That page is generated by this jsp: ptagis-1.0./web/ptagis/sites/siteConfig.jsp

It uses this java bean to do the heavy lifting: ptagis-1.0/src/sites/SiteConfig.java

The java code pulls the configuration info from these Ingres tables:

  • site_cnfg_hist
  • site_diagram

Based upon the requested site code, date, and configuration sequence number, the java code looks for a corresponding image to display. If one isn't found, then it returns a tabular report.

It looks for the image file by

getting the most recent entry for the site in site_cnfg_hist
looking for a matching entry in site_diagram where matching means
From date matches (if the dates don't match down to the second, no image is displayed)
configuration sequence number matches
if successful, this returns an image file name like "pro_110"
the image file name is used as a pattern to look in the directory
ptagis-1.0/web/ptagis/sites/data
this directory should then contain pro_110.pdf and pro_110.jpg
if it does, they are displayed on the web page

If an image is unavailable, a tabular report is constructed from the data in site_cnfg_hist

Adding a new configuration

1. Naming Convention:

xxx_yyy.zzz (e.g., gra_140.pdf)

Where:

xxx is the lower case, thee letter site code (e.g., gra)
yyy is the configuration sequence number (e.g., 140)
zzz is the extension: jpg and pdf

2. Source files:

Production source files are stored on blueback://pittag/doc/Site_Map/PRODUCTION

3. Installation to ptagis.org web site:

Place the files on the web server under the $PTAGIS_ROOT area into the directory identified in the siteconfig.properties file:

sites.siteconfig.configdata_basedir=/ptagis/sites/data/

E.g., /dsk2/ptagis-1.0/web/ptagis/sites/data (development)
E.g., /global/ds1/pitweb/ptagis-1.0/web/ptagis/sites/data (production)

4. Database Entries:

Add an entry into the "site_diagram" table for this site configuration (update the data for existing sites with new configuration sequence numbers, -- this table does not support multiple site configurations {need bug fix / enhancement}).

Assure that the FROM_DATE in the SITE_DIAGRAM tables matches the FROM_DATE in the SITE_CNFG_HIST table, otherwise, the diagram won't display in the site configuration on ptagis.org.

New configuration, but diagram not done yet

  • In the case where a new configuration is in effect, but we have not created a pdf or jpg diagram for it yet, the FROM_DATE for the entry in SITE_DIAGRAM should be given a non-matching timestamp of 01:02:03 to force the display of the tabular configuration data instead of a broken image file. When the diagram becomes available, the timestamp should be changed to match the SITE_CNFG_HIST entry so the diagram can be displayed.
Personal tools