Changeset 12015

Show
Ignore:
Timestamp:
04/18/11 15:01:54 (2 years ago)
Author:
mickecarlsson
Message:

Re #5075, really fix logic. Now, if FOPDISABLE = true, just print Disabled on dashboard otherwise check if FOPRUN is false, then just print warning on the dashboard, no need to check the port. If FOPRUN is true, check the port, display OK if port is OK otherwise print warn. This is to keep the port checking down to a minimum. One can have FOPDISABLE false and still have FOPRUN false, old code was checking port no matter what FOPRUN was set to.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.9/dashboard/page.index.php

    r12009 r12015  
    345345   
    346346  // fop 
    347   if($amp_conf['FOPDISABLE']) { 
     347  $warn = draw_status_box(_("Op Panel"), "warn", _('FOP Operator Panel Server is not running, you will not be able to use the operator panel, but the system will run fine without it.')); 
     348  if($amp_conf['FOPDISABLE']) { // FOP is disabled, display that on the dashboard 
    348349   $out .= draw_status_box(_("Op Panel"), "disabled", _('FOP Operator Panel is disabled in Advanced Settings')); 
    349350   } else { 
    350     if($amp_conf['FOPRUN']) { 
    351      if ($procinfo->check_fop_server()) { 
     351    if(!$amp_conf['FOPRUN']) {  
     352     $out .= $warn; // if FOPRUN is false, display warning on the dashboard 
     353     } elseif ($procinfo->check_fop_server()) { // if FOPRUN is true, then check the fop tcp port, if OK display that on dashboard 
    352354      $out .= draw_status_box(_("Op Panel"), "ok", _('FOP Operator Panel Server is running')); 
    353       }  
    354     } 
    355     $out .= draw_status_box(_("Op Panel"), "warn", _('FOP Operator Panel Server is not running, you will not be able to use the operator panel, but the system will run fine without it.'));      
    356  
    357    
     355      } else { // check_fop_server returned an error, display warning 
     356    $out .= $warn; 
     357    } 
     358 
     359 
    358360  // mysql 
    359361  if ($amp_conf['AMPDBENGINE'] == "mysql") {