finishPortlet();
}
-function renderRow ($row_id = 0)
+function renderRow ($row_id)
{
- if ($row_id == 0)
- {
- showError ('Invalid row_id', __FUNCTION__);
- return;
- }
if (($rowInfo = getRackRowInfo ($row_id)) == NULL)
{
showError ('getRackRowInfo() failed', __FUNCTION__);
}
// This function renders rack as HTML table.
-function renderRack ($rack_id = 0, $hl_obj_id = 0)
+function renderRack ($rack_id, $hl_obj_id = 0)
{
- if ($rack_id == 0)
- {
- showError ('Invalid rack_id', __FUNCTION__);
- return;
- }
if (($rackData = getRackData ($rack_id)) == NULL)
{
showError ('getRackData() failed', __FUNCTION__);
// This is a universal editor of rack design/waste.
// FIXME: switch to using printOpFormIntro()
-function renderGridForm ($rack_id = 0, $filter, $header, $submit, $state1, $state2)
+function renderGridForm ($rack_id, $filter, $header, $submit, $state1, $state2)
{
- if ($rack_id == 0)
- {
- showError ('Invalid rack_id', __FUNCTION__);
- return;
- }
if (($rackData = getRackData ($rack_id)) == NULL)
{
showError ('getRackData() failed', __FUNCTION__);
renderGridForm ($rack_id, 'applyRackDesignMask', 'Rack design', 'Set rack design', 'A', 'F');
}
-function renderRackProblems ($rack_id = 0)
+function renderRackProblems ($rack_id)
{
renderGridForm ($rack_id, 'applyRackProblemMask', 'Rack problems', 'Mark unusable atoms', 'F', 'U');
}
echo "</div>\n";
}
-function renderRackObject ($object_id = 0)
+function renderRackObject ($object_id)
{
global $nextorder, $aac;
- if ($object_id <= 0)
- {
- showError ('Invalid object_id', __FUNCTION__);
- return;
- }
$info = getObjectInfo ($object_id);
if ($info == NULL)
{
}
// This function renders a form for port edition.
-function renderPortsForObject ($object_id = 0)
+function renderPortsForObject ($object_id)
{
function printNewItemTR ()
{
printImageHREF ('add', 'add a port', TRUE, 104);
echo "</td></tr></form>";
}
- if ($object_id <= 0)
- {
- showError ('Invalid object_id', __FUNCTION__);
- return;
- }
showMessageOrError();
startPortlet ('Ports and interfaces');
$ports = getObjectPortsAndLinks ($object_id);
finishPortlet();
}
-function renderIPv4ForObject ($object_id = 0)
+function renderIPv4ForObject ($object_id)
{
function printNewItemTR ()
{
echo "</td></tr></form>";
}
global $aat;
- if ($object_id <= 0)
- {
- showError ('Invalid object_id', __FUNCTION__);
- return;
- }
showMessageOrError();
startPortlet ('Allocations');
$alloclist = getObjectIPv4Allocations ($object_id);
*/
// We extensively use $_REQUEST in the function.
-function renderRackSpaceForObject ($object_id = 0)
+function renderRackSpaceForObject ($object_id)
{
- if ($object_id <= 0)
- {
- showError ('Invalid object_id', __FUNCTION__);
- return;
- }
$is_update = isset ($_REQUEST['rackmulti'][0]);
$info = getObjectInfo ($object_id);
if ($info == NULL)
echo "</table><br><br>";
}
-function renderNATv4ForObject ($object_id = 0)
+function renderNATv4ForObject ($object_id)
{
function printNewItemTR ($alloclist)
{
function renderRackPage ($rack_id)
{
- if ($rack_id == 0)
- {
- showError ('Invalid argument', __FUNCTION__);
- return;
- }
if (($rackData = getRackData ($rack_id)) == NULL)
{
showError ('getRackData() failed', __FUNCTION__);
// This function queries the gateway about current VLAN configuration and
// renders a form suitable for submit. Ah, and it does submit processing as well.
-function renderVLANMembership ($object_id = 0)
+function renderVLANMembership ($object_id)
{
showMessageOrError();
$data = getSwitchVLANs ($object_id);
echo '</td></tr></table>';
}
-function renderSNMPPortFinder ($object_id = 0)
+function renderSNMPPortFinder ($object_id)
{
showMessageOrError();
- if ($object_id <= 0)
- {
- showError ('Invalid argument', __FUNCTION__);
- return;
- }
printOpFormIntro ('querySNMPData');
if (!extension_loaded ('snmp'))
{
echo "</form>";
}
-function renderLVSConfig ($object_id = 0)
+function renderLVSConfig ($object_id)
{
showMessageOrError();
- if ($object_id <= 0)
- {
- showError ('Invalid argument', __FUNCTION__);
- return;
- }
echo '<br>';
printOpFormIntro ('submitSLBConfig');
echo "<center><input type=submit value='Submit for activation'></center>";
echo (empty ($theme) ? '' : "&theme=${theme}") . "'>";
}
-function renderRSPoolServerForm ($pool_id = 0)
+function renderRSPoolServerForm ($pool_id)
{
global $nextorder;
- if ($pool_id <= 0)
- {
- showError ('Invalid pool_id', __FUNCTION__);
- return;
- }
showMessageOrError();
$poolInfo = getRSPoolInfo ($pool_id);
finishPortlet();
}
-function renderRSPoolLBForm ($pool_id = 0)
+function renderRSPoolLBForm ($pool_id)
{
global $nextorder;
showMessageOrError();
finishPortlet();
}
-function renderVServiceLBForm ($vs_id = 0)
+function renderVServiceLBForm ($vs_id)
{
global $nextorder;
showMessageOrError();
finishPortlet();
}
-function renderRSPool ($pool_id = 0)
+function renderRSPool ($pool_id)
{
global $nextorder;
- if ($pool_id <= 0)
- {
- showError ('Invalid pool_id', __FUNCTION__);
- return;
- }
$poolInfo = getRSPoolInfo ($pool_id);
if ($poolInfo == NULL)
{
echo "</table>";
}
-function renderRSPoolRSInServiceForm ($pool_id = 0)
+function renderRSPoolRSInServiceForm ($pool_id)
{
- if ($pool_id <= 0)
- {
- showError ('Invalid pool_id', __FUNCTION__);
- return;
- }
showMessageOrError();
$poolInfo = getRSPoolInfo ($pool_id);
printOpFormIntro ('upd', array ('rscount' => count ($poolInfo['rslist'])));
echo "</td></tr></table>\n</form>";
}
-function renderLivePTR ($id = 0)
+function renderLivePTR ()
{
- if ($id == 0)
- {
- showError ("Invalid argument", __FUNCTION__);
- return;
- }
showMessageOrError();
if (isset($_REQUEST['pg']))
$page = $_REQUEST['pg'];
echo "</td></tr></table>\n";
}
-function renderAutoPortsForm ($object_id = 0)
+function renderAutoPortsForm ($object_id)
{
- if ($object_id <= 0)
- {
- showError ('Invalid object_id', __FUNCTION__);
- return;
- }
// If the below call has any data to display, the non-default redirection from the generator
// has failed. Don't ignore the message log anyway.
showMessageOrError();
$self ($inputname, $preselect, $kid, $level + 1);
}
-function renderEntityTags ($entity_id = 0)
+function renderEntityTags ($entity_id)
{
global $tagtree, $target_given_tags, $pageno, $page, $target_given_tags;
- if ($entity_id <= 0)
- {
- showError ('Invalid or missing arguments', __FUNCTION__);
- return;
- }
showMessageOrError();
$bypass_name = $page[$pageno]['bypass'];
startPortlet ('Tag list');
}
// File-related functions
-function renderFile ($file_id = 0)
+function renderFile ($file_id)
{
global $nextorder, $aac, $root;
- if ($file_id <= 0)
- {
- showError ('Invalid file_id', __FUNCTION__);
- return;
- }
$file = getFileInfo ($file_id);
if ($file == NULL)
{
finishPortlet();
}
-function renderFileProperties ($file_id = 0)
+function renderFileProperties ($file_id)
{
$file = getFileInfo ($file_id);
if ($file === NULL)
}
}
-function renderFilesForEntity ($entity_id = 0)
+function renderFilesForEntity ($entity_id)
{
global $page, $pageno, $etype_by_pageno;
- if ($entity_id <= 0)
- {
- showError ('Invalid entity info', __FUNCTION__);
- return;
- }
-
showMessageOrError();
// Now derive entity_type and bypass_name from pageno.
$entity_type = $etype_by_pageno[$pageno];