function aLinks_Extra($mode) { if ($mode != 'upd') { return array(); } $app = trim($this->row['application']); // KFD 2/4/08, part of SVN system. If this node has been set up // as a server that pulls from SVN, we do not offer the build // option on applications anymore, that is only for dev // workstation and old-fashioned non-svn servers. $retval = array(); if (OptionGet('DEV_STATION', 'Y') == 'Y' || $app == 'andro' || OptionGet('BUILD_ALL_APPS', 'N') == 'Y') { $retval[] = hLinkBuild($app, 'Build This Application'); $retval[] = hLinkPopup('', 'View Most Recent Log', array("gp_page" => "a_builder_log", "gp_out" => "info", 'x2' => 1, 'txt_application' => $app)); } // If no authoritative node is listed, we must be it, so list // an option. Otherwise allow code control options. $lnk1 = "?gp_page=appversions_p&gp_app=" . trim($this->row['application']); $lnk2 = "?gp_page=a_scontrol&gp_skey=" . $this->row['skey']; //hprint_r($this->row); if (isset($this->row['node'])) { if (trim($this->row['node']) == 'LOCAL' || trim($this->row['node']) == '' || is_null($this->row['node'])) { $retval[] = hLink('', "Publish Current Code", $lnk1); } else { $retval[] = hLink('', "Source Code Functions", $lnk2); } } return $retval; }
function main() { if (gp('gp_posted') == 1) { return $this->PullCode(); } if (gp('gp_posted') == 2) { return $this->PullAndro(); } sourceDeprecated(); ?> <h1>Upgrade Node Manager Only</h1> <p>This program below will download the latest available code for the node manager only. </p> <p style="color:red">Warning! This program will overwrite the live running code of the Node Manager. Any programs directly linked to the node manager will be instantly updated (this does not apply to instances). Remember to always keep production databases running as instances so that they are unaffected by this action. </p> <a href="javascript:Popup('?gp_page=a_pullcode&gp_posted=2')">Step 1: Get Code</a> <br/> <br/> <?php echo hLinkBuild('andro', 'Step 2: Rebuild Node Manager'); ?> <h1>Download Latest Software Updates</h1> <p>This program downloads the latest available version of each program listed in the table of applications. The code is pulled from the 'Authoritative Node' for that application (applications without an authoritative node are not reviewed). </p> <p>This program does not actually run updates to any running instances, each instance is upgraded manually at the discretion of the administrator. </p> <br> <p> <a href="javascript:Popup('?gp_page=a_pullcode&gp_posted=1')">Pull Now</a> <?php }
/** * KFD 2/23/08, Put frequently used links over on the left * all of the time * */ function appModuleLeft() { $retVal = ''; $hasContent = false; if (!LoggedIn()) { return false; } $retVal .= "<ul class=\"nav nav-list\">"; $retVal .= "<li class=\"nav-header\">Updates</li>"; $retVal .= '<li>'; $retVal .= '<a class="small" href="?gp_page=a_pullsvn">Pull Code From Subversion</a>'; $retVal .= '</li>'; // Display either applications or instances, depending upon // which we have here # KFD 4/15/08, make this unconditional #$ds =OptionGet('DEV_STATION','Y'); #$boa=OptionGet( 'BUILD_ALL_APPS','N'); #if($ds=='Y' || $boa == 'Y') { if (True) { $apps = SQL_AllRows("Select * from applications order by application"); if (!empty($apps)) { $hasContent = true; $retVal .= '<li class="nav-header">Applications</li>'; foreach ($apps as $app) { $retVal .= '<li>'; $retVal .= '<a class="pull-left" href="?gp_page=applications&gp_skey=' . $app['skey'] . '">'; $retVal .= $app['application']; $retVal .= '</a>'; $retVal .= ' '; $retVal .= hLinkBuild($app['application'], 'Build'); $retVal .= '</li>'; } } } $instances = SQL_ALLROWS("Select * from instances\n order by application,instance"); if (!empty($instances) > 0) { $hasContent = true; $retVal .= '<li class="nav-header">Instances</li>'; foreach ($instances as $i) { $retVal .= '<li>'; $retVal .= '<a class="pull-left" href="?gp_page=instances&bp_skey=' . $i['skey'] . '">'; $retVal .= $i['application'] . ' / ' . $i['instance']; $retVal .= '</a>'; $retVal .= '<a class=" pull-right small" href="?gp_page=instances_p&gp_app=' . trim($i['application']) . '&gp_inst=' . $i['instance'] . '">'; $retVal .= 'Build/Upgrade'; $retVal .= '</a>'; $retVal .= '</li>'; } } $retVal .= '</ul>'; $retVal .= '<div style="clear:both;"></div>'; return $hasContent !== false ? $retVal : false; }