function renderVS($vsid) { $vsinfo = spotEntity('ipvs', $vsid); amplifyCell($vsinfo); echo '<table border=0 class=objectview cellspacing=0 cellpadding=0>'; if (strlen($vsinfo['name'])) { echo "<tr><td colspan=2 align=center><h1>{$vsinfo['name']}</h1></td></tr>\n"; } echo '<tr>'; echo '<td class=pcleft>'; $summary = array(); $summary['Name'] = $vsinfo['name'] . getPopupSLBConfig($vsinfo); $summary['tags'] = ''; $ips = '<ul class="slb-checks">'; foreach ($vsinfo['vips'] as $vip) { $ips .= '<li>' . formatVSIP($vip) . getPopupSLBConfig($vip) . '</li>'; } $ips .= '</ul>'; $summary['IPs'] = $ips; $ports = '<ul class="slb-checks">'; foreach ($vsinfo['ports'] as $port) { $ports .= '<li>' . formatVSPort($port) . getPopupSLBConfig($port) . '</li>'; } $ports .= '</ul>'; $summary['Ports'] = $ports; renderEntitySummary($vsinfo, 'Summary', $summary); echo '</td>'; echo '<td class=pcright>'; renderSLBTriplets2($vsinfo); echo '</td></tr><tr><td colspan=2>'; renderFilesPortlet('ipvs', $vsid); echo '</tr><table>'; }
function renderUser($user_id) { $userinfo = spotEntity('user', $user_id); $summary = array(); $summary['Account name'] = $userinfo['user_name']; $summary['Real name'] = $userinfo['user_realname']; $summary['tags'] = ''; renderEntitySummary($userinfo, 'summary', $summary); renderFilesPortlet('user', $user_id); }
function renderVirtualService($vsid) { $vsinfo = spotEntity('ipv4vs', $vsid); echo '<table border=0 class=objectview cellspacing=0 cellpadding=0>'; if (strlen($vsinfo['name'])) { echo "<tr><td colspan=2 align=center><h1>{$vsinfo['name']}</h1></td></tr>\n"; } echo '<tr>'; echo '<td class=pcleft>'; $summary = array(); $summary['Name'] = $vsinfo['name']; $summary['Protocol'] = $vsinfo['proto']; $summary['Virtual IP address'] = mkA($vsinfo['vip'], 'ipaddress', $vsinfo['vip']); $summary['Virtual port'] = $vsinfo['vport']; $summary['tags'] = ''; $summary['VS configuration'] = '<div class="dashed slbconf">' . $vsinfo['vsconfig'] . '</div>'; $summary['RS configuration'] = '<div class="dashed slbconf">' . $vsinfo['rsconfig'] . '</div>'; renderEntitySummary($vsinfo, 'Summary', $summary); echo '</td>'; echo '<td class=pcright>'; renderSLBTriplets($vsinfo); echo '</td></tr><tr><td colspan=2>'; renderFilesPortlet('ipv4vs', $vsid); echo '</tr><table>'; }
function renderVST($vst_id) { $vst = spotEntity('vst', $vst_id); amplifyCell($vst); echo '<table border=0 class=objectview cellspacing=0 cellpadding=0>'; echo '<tr><td colspan=2 align=center><h1>' . niftyString($vst['description'], 0) . '</h1><h2>'; echo "<tr><td class=pcleft width='50%'>"; renderEntitySummary($vst, 'summary', array('tags' => '')); renderVSTRules($vst['rules']); echo '</td><td class=pcright>'; if (!count($vst['switches'])) { startPortlet('no orders'); } else { global $nextorder; startPortlet('orders (' . count($vst['switches']) . ')'); echo '<table cellspacing=0 cellpadding=5 align=center class=widetable>'; $order = 'odd'; foreach (array_keys($vst['switches']) as $object_id) { echo "<tr class=row_{$order}><td>"; renderCell(spotEntity('object', $object_id)); echo '</td></tr>'; $order = $nextorder[$order]; } echo '</table>'; } finishPortlet(); echo '</td></tr></table>'; }