App-Netdisco

 view release on metacpan or  search on metacpan

share/views/ajax/device/details.tt  view on Meta::CPAN

      <td>[% IF d.pae_is_enabled %] <i class="fas fa-circle-check text-success"></i> Enabled [% END %]</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>
    [% IF p.size %]
    <tr>
      <td>PoE Status</td>
      <td>
      [% FOREACH m IN p %]
        [% UNLESS m.module == 1 %]
          <br/>
        [% END %]
        Module [% m.module | html_entity %]: [% m.status | html_entity %], [% m.poe_capable_ports | html_entity %] power-capable ports, [% m.poe_powered_ports | html_entity %] powered ([% m.poe_disabled_ports | html_entity %] admin disabled, [% m.poe...
      [% END %]
      </td>
    </tr>
    [% END %]
    <tr>
      <td>MAC Address</td>
      <td>[% d.mac | html_entity %]</td>
    </tr>
    <tr>
      <td>VTP Status</td>
      <td>Mode: [% d.vtp_mode.ucfirst || 'n/a' | html_entity %]<br />Domain: [% d.vtp_domain || 'n/a' | html_entity %]</td>
    </tr>
    [% IF user_has_role('admin') %]
    <tr data-for-device="[% d.ip | html_entity %]">
      <td>Admin Tasks</td>
      <td>
        [% IF d.is_discoverable %]
        <input type="hidden" data-form="discover" value="[% d.ip | html_entity %]" name="device"/>
        <button class="btn btn-info btn-sm nd_adminbutton" name="discover">Discover</button>
        [% ELSE %]
        <button class="btn btn-secondary btn-sm disabled">Discover</button>
        [% END %]

        [% IF d.is_arpnipable %]
        <input type="hidden" data-form="arpnip" value="[% d.ip | html_entity %]" name="device"/>
        <button class="btn btn-info btn-sm nd_adminbutton" name="arpnip">Arpnip</button>
        [% ELSE %]
        <button class="btn btn-secondary btn-sm disabled">Arpnip</button>
        [% END %]

        [% IF d.is_macsuckable %]
        <input type="hidden" data-form="macsuck" value="[% d.ip | html_entity %]" name="device"/>
        <button class="btn btn-info btn-sm nd_adminbutton" name="macsuck">Macsuck</button>

        <input type="hidden" data-form="nbtstat" value="[% d.ip | html_entity %]" name="device"/>
        <button class="btn btn-info btn-sm nd_adminbutton" name="nbtstat">NBTstat</button>
        [% ELSE %]
        <button class="btn btn-secondary btn-sm disabled">Macsuck</button>

        <button class="btn btn-secondary btn-sm disabled">NBTstat</button>
        [% END %]

        <span class="dropdown">
          <button class="nd_snap_btn btn [% has_snapshot ? 'btn-success' : 'btn-info' %] btn-sm dropdown-toggle" type="button" id="snapshotmenu" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
            Snapshot
          </button>
          <ul class="dropdown-menu" aria-labelledby="snapshotmenu">
            [% IF NOT d.is_pseudo %]
            <input type="hidden" data-form="snapshot_req" value="[% d.ip | html_entity %]" name="device"/>
            <li><a href="#" class="dropdown-item nd_adminbutton" name="snapshot_req"><i class="far fa-pen-to-square"></i> Create</a></li>
            [% END %]

            <li class='nd_snap_func [% 'disabled' UNLESS has_snapshot %]'><a class="dropdown-item" href="[% uri_for('/ajax/content/admin/snapshot_get') | none %]?device=[% d.ip | uri %]"><i class="fas fa-download"></i> Download</a></li>

            [% IF NOT d.is_pseudo %]
            <input type="hidden" data-form="snapshot_del" value="[% d.ip | html_entity %]" name="device"/>
            <li class='nd_snap_func [% 'disabled' UNLESS has_snapshot %]'><a href="#" class="dropdown-item nd_adminbutton" name="snapshot_del"><i class="fas fa-trash-can"></i> Delete</a></li>
            [% END %]
          </ul>
        </span>

        <button class="btn btn-danger btn-sm float-end"
          data-bs-toggle="modal" data-bs-target="#nd_devdel" type="button">Delete</button>

        <button class="btn btn-danger btn-sm float-end nd_pull-right-admin-button"
          data-bs-toggle="modal" data-bs-target="#nd_devrenumber" type="button">Change IP</button>


        <div id="nd_devdel" class="nd_modal nd_deep-horizon modal fade" tabindex="-1"
          role="dialog" aria-labelledby="nd_devdel-label" aria-hidden="true">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <h3 id="nd_devdel-label">Confirm Delete: [% d.dns || d.ip | html_entity %]</h3>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
              </div>
              <div class="modal-body">
                <blockquote>
                  <ul>
                    <li><p>A job will be queued to delete the device</p></li>
                    <li><p>All associated Nodes may be removed from the database</p></li>
                  </ul>
                </blockquote>
                <textarea id="nd_devdel-log" class="form-control" rows="2" data-form="delete"
                  placeholder="Enter a log message" name="extra"></textarea>
                <label class="form-check">
                  <input id="nd_devdel-archive" type="checkbox" data-form="delete" name="port">
                  <h4 class="nd_unbolden">Archive Nodes</h4>
                </label>
                <input type="hidden" data-form="delete" value="[% d.ip | html_entity %]" name="device"/>
              </div>
              <div class="modal-footer">
                <button class="btn btn-success" data-bs-dismiss="modal" aria-hidden="true">Cancel</button>
                <button class="btn btn-danger nd_adminbutton" name="delete" data-bs-dismiss="modal">Confirm</button>
              </div>
            </div>
          </div>
        </div>

        <div id="nd_devrenumber" class="nd_modal nd_deep-horizon modal fade" tabindex="-1"
          role="dialog" aria-labelledby="nd_devrenumber-label" aria-hidden="true">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">



( run in 0.762 second using v1.01-cache-2.11-cpan-364913b4093 )