Changeset 229

Show
Ignore:
Timestamp:
07/31/08 08:46:10
Author:
dan
Message:

Changes: Added code to break out the url in the sensor data column, if there is one, and form an HREF. Opens a new tab/browser when the link is clicked.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • obskml/trunk/QAQC/GenPlatformUptimeWebpage.pl

    r199 r229  
    1313############################################################################################################################## 
    1414#Revisions 
     15#Rev: 1.3.0.0 
     16# Changes: Added code to break out the url in the sensor data column, if there is one, and form an HREF. Opens a new tab/browser 
     17# when the link is clicked. 
     18# 
    1519#Rev: 1.2.0.0 
    1620#Author: DWR  
     
    131135        { 
    132136          my $strColumn = shift(@Columns); 
     137       
    133138            #my $rgbColor = RGB_DEFAULT;             
    134139      my $strBGColorID = "RGB_DEFAULT"; 
    135140          if( $iCnt >= 3 ) 
    136141          { 
    137             if( $strColumn >= 90.0 ) 
     142        #DWR v1.3.0.0 
     143        #Break out the url, if there is one, for the sensor query 
     144        my @ColData = split(/;/,$strColumn); 
     145        my $strVal = @ColData[0]; 
     146        my $strURL = @ColData[1]; 
     147        #Now format an HREF 
     148        $strColumn = "<A HREF=\"$strURL\" target=\"new\">$strVal</A>";                                 
     149         
     150        if( $strVal >= 90.0 ) 
     151            #if( $strColumn >= 90.0 ) 
    138152            { 
    139153             #$rgbColor = RGB_90THPERCENTILE; 
    140154         $strBGColorID = "RGB_90THPERCENTILE"; 
    141155            } 
    142             elsif( $strColumn >= 70.0 ) 
     156        elsif( $strVal >= 70.0 ) 
     157            #elsif( $strColumn >= 70.0 ) 
    143158            { 
    144159             #$rgbColor = RGB_70THPERCENTILE;          
     
    150165          $strBGColorID = "RGB_UNDER70TH"; 
    151166            } 
     167         
    152168          } 
    153169          # First 3 columns are platform, url, and date.