-Total PCUs : <?= $total ?>
-<table border=1>
- <tr>
- <th>Count</th>
- <th><?= get_category_link("pcu_id", "PCU ID") ?></th>
- <th><?= get_category_link("hostname", "Hostname") ?></th>
- <th><?= get_category_link("complete_entry", "Incomplete Fields") ?></th>
- <th><?= get_category_link("dnsmatch", "DNS Status") ?></th>
- <th><?= get_category_link("portstatus", "Port Status") ?></th>
- <th><?= get_category_link("reboot", "Dry Run Results") ?></th>
- <th><?= get_category_link("model", "Model") ?></th>
- <th><?= get_category_link("node_ids", "Nodes") ?></th>
+<?php if ( $id == "all" ): ?>
+ Total PCUs : <?= $total ?>
+ <table border=1>
+ <tr>
+ <th>Count</th>
+ <th><?= get_category_link("pcu_id", "PCU ID") ?></th>
+ <th><?= get_category_link("login_base", "Site") ?></th>
+ <th><?= get_category_link("hostname", "PCU Name") ?></th>
+ <th><?= get_category_link("complete_entry", "Incomplete Fields") ?></th>
+ <th><?= get_category_link("dnsmatch", "DNS Status") ?></th>
+ <th><?= get_category_link("portstatus", "Port Status") ?></th>
+ <th><?= get_category_link("reboot", "Test Results") ?></th>
+ <th><?= get_category_link("model", "Model") ?></th>
+ <th><?= get_category_link("node_ids", "Nodes") ?></th>
+ </tr>
+ <?php $count = 0; ?>
+ <?php $reachable_nodes = 0; ?>
+ <?php foreach ( $pculist as $pcu ): ?>
+ <tr>
+ <td><?= $count ?></td>
+ <td id='id<?= $pcu['pcu_id'] ?>'><a href='<?= pcu_link($pcu) ?>'><?= $pcu['pcu_id'] ?></a></td>
+ <td><a href='<?= plc_site_link(pcu_site($pcu)) ?>'><?= pcu_site($pcu) ?></a></td>
+ <td><?= pcu_name($pcu) ?></td>
+ <td><?= pcu_entry($pcu) ?></td>
+ <td bgcolor='<?= DNS_to_color($pcu['dnsmatch']) ?>'><?= $pcu['dnsmatch'] ?></td>
+ <td><?= format_ports($pcu) ?></td>
+ <td bgcolor='<?= reboot_to_color($pcu['reboot']) ?>'><?= reboot_to_str($pcu['reboot']) ?></td>
+ <td nowrap><?= $pcu['model'] ?></td>
+ <td><?= count( $pcu['node_ids'] ) ?></td>
+ </tr>
+
+ <?php if ( $pcu['reboot'] == "0" ) $reachable_nodes+=count($pcu['node_ids']); ?>
+ <?php $count += 1; ?>
+ <?php endforeach; ?>
+ </table>
+ <b>Reachable Nodes:</b> <?= $reachable_nodes ?>
+<?php else: ?>
+ <table align=center border=1>
+ <tr>
+ <th><?= get_category_link("pcu_id", "PCU ID") ?></th>
+ <th><?= get_category_link("login_base", "Site") ?></th>
+ <th><?= get_category_link("hostname", "PCU Name") ?></th>
+ <th><?= get_category_link("complete_entry", "Incomplete Fields") ?></th>
+ <th><?= get_category_link("dnsmatch", "DNS Status") ?></th>
+ <th><?= get_category_link("portstatus", "Port Status") ?></th>
+ <th><?= get_category_link("reboot", "Test Results") ?></th>
+ <th><?= get_category_link("model", "Model") ?></th>
+ <th><?= get_category_link("node_ids", "Nodes") ?></th>
+ </tr>
+ <?php $count = 0; ?>
+ <?php $reachable_nodes = 0; ?>
+ <?php foreach ( $pculist as $pcu ): ?>
+ <?php if ( $pcu['pcu_id'] == $id ): ?>
+ <tr>
+ <td id='id<?= $pcu['pcu_id'] ?>'><a href='<?= pcu_link($pcu) ?>'><?= $pcu['pcu_id'] ?></a></td>
+ <td><a href='<?= plc_site_link(pcu_site($pcu)) ?>'><?= pcu_site($pcu) ?></a></td>
+ <td><?= pcu_name($pcu) ?></td>
+ <td><?= pcu_entry($pcu) ?></td>
+ <td bgcolor='<?= DNS_to_color($pcu['dnsmatch']) ?>'><?= $pcu['dnsmatch'] ?></td>
+ <td><?= format_ports($pcu) ?></td>
+ <td bgcolor='<?= reboot_to_color($pcu['reboot']) ?>'><?= reboot_to_str($pcu['reboot']) ?></td>
+ <td nowrap><?= $pcu['model'] ?></td>
+ <td><?= count( $pcu['node_ids'] ) ?></td>
+ </tr>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ </table>
+ <br>
+ <table border=1 align=center>
+ <tr><th colspan=2>Legend for 'DNS Status'</th></tr>
+
+ <tr><td bgcolor=lightgreen>DNS-OK</td>
+ <td>This indicates that the DNS name and registered IP address match.</td>