The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
<table class="table table-condensed table-striped">
  </tbody>
    <tr>
      <td>System Name</td>
      <td>[% d.name %]</td>
    </tr>
    <tr>
      <td>Location
      [% IF vars.user.port_control %]
      <i class="icon-edit nd_edit-icon nd_device-details-edit"></i>
      [% END %]
      </td>
      [% IF vars.user.port_control %]
      <td class="nd_editable-cell" contenteditable="true"
        data-field="location" data-for-device="[% d.ip %]">
          [% d.location | html_entity %]
      </td>
      [% ELSE %]
      <td>
        <a rel="tooltip" data-placement="top" data-offset="5" data-title="Find Similar Devices"
        href="[% search_device %]&location=[% d.location | uri %]">[% d.location | html_entity %]</a>
      </td>
      [% END %]
    </tr>
    <tr>
      <td>Contact
      [% IF vars.user.port_control %]
      <i class="icon-edit nd_edit-icon nd_device-details-edit"></i>
      [% END %]
      </td>
      [% IF vars.user.port_control %]
      <td class="nd_editable-cell" contenteditable="true"
        data-field="contact" data-for-device="[% d.ip | html_entity %]">
          [% d.contact | html_entity %]
      </td>
      [% ELSE %]
      <td>[% d.contact | html_entity %]</td>
      [% END %]
    </tr>
    <tr>
      <td>Vendor / Model</td>
      <td>
        <a rel="tooltip" data-placement="top" data-offset="5" data-title="Find Similar Devices"
        href="[% search_device %]&vendor=[% d.vendor | uri %]">[% d.vendor | html_entity %]</a>
        /
        <a rel="tooltip" data-placement="top" data-offset="5" data-title="Find Similar Devices"
        href="[% search_device %]&model=[% d.model | uri %]">[% d.model | html_entity %]</a>
      </td>
    </tr>
    <tr>
      <td>OS / Version</td>
      <td>[% d.os | html_entity %] /
        <a rel="tooltip" data-placement="top" data-offset="5"
          data-title="Find Similar Devices"
          href="[% search_device %]&os_ver=[% d.os_ver | uri %]">[% d.os_ver | html_entity %]</a>
      </td>
    </tr>
    <tr>
      <td>Serial Number</td>
      <td>[% d.serial | html_entity %]</td>
    </tr>
    <tr>
      <td>Description</td>
      <td>[% d.description | html_entity | html_line_break %]</td>
    </tr>
    <tr>
      <td>Uptime</td>
      <td>[% d.uptime_age | html_entity %]</td>
    </tr>
    <tr>
      <td>Last Discover</td>
      <td>[% d.last_discover_stamp | html_entity %]</td>
    </tr>
    <tr>
      <td>Last Arpnip</td>
      <td>[% d.last_arpnip_stamp | html_entity %]</td>
    </tr>
    <tr>
      <td>Last Macsuck</td>
      <td>[% d.last_macsuck_stamp | html_entity %]</td>
    </tr>
    <tr>
      <td>Hardware Status</td>
      <td>Fan: [% d.fan | html_entity %]
        <br/>PS1 [[% d.ps1_type | html_entity %]]: [% d.ps1_status | html_entity %]
        <br/>PS2 [[% d.ps2_type | html_entity %]]: [% d.ps2_status | html_entity %]</td>
    </tr>
    <tr>
      <td>MAC Address</td>
      <td>[% d.mac | html_entity %]</td>
    </tr>
    <tr>
      <td>VTP Domain</td>
      <td>[% d.vtp_domain | html_entity %]</td>
    </tr>
    [% IF vars.user.admin %]
    <tr>
      <td>Admin Tasks</td>
      <td>
        <form method="post" class="nd_inline-form" action="[% uri_for('/admin/discover') %]">
          <input type="hidden" value="[% d.ip %]" name="device" type="text"/>
          <button type="submit" class="btn btn-info btn-small">Discover</button>
        </form>
        <form method="post" class="nd_inline-form" action="[% uri_for('/admin/arpnip') %]">
          <input type="hidden" value="[% d.ip %]" name="device" type="text"/>
          <button type="submit" class="btn btn-info btn-small">Arpnip</button>
        </form>
        <form method="post" class="nd_inline-form" action="[% uri_for('/admin/macsuck') %]">
          <input type="hidden" value="[% d.ip %]" name="device" type="text"/>
          <button type="submit" class="btn btn-info btn-small">Macsuck</button>
        </form>
      </td>
    </tr>
    [% END %]
  </tbody>
</table>