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="icon-ok-sign 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-small nd_adminbutton" name="discover">Discover</button>
[% ELSE %]
<button class="btn btn-default btn-small 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-small nd_adminbutton" name="arpnip">Arpnip</button>
[% ELSE %]
<button class="btn btn-default btn-small 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-small 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-small nd_adminbutton" name="nbtstat">NBTstat</button>
[% ELSE %]
<button class="btn btn-default btn-small disabled">Macsuck</button>
<button class="btn btn-default btn-small disabled">NBTstat</button>
[% END %]
<span class="dropdown">
<button class="nd_snap_btn btn [% has_snapshot ? 'btn-success' : 'btn-info' %] btn-small dropdown-toggle" type="button" id="snapshotmenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
Snapshot
<span class="caret"></span>
</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="nd_adminbutton" name="snapshot_req"><i class="icon-edit"></i> Create</a></li>
[% END %]
<li class='nd_snap_func [% 'disabled' UNLESS has_snapshot %]'><a href="[% uri_for('/ajax/content/admin/snapshot_get') | none %]?device=[% d.ip | uri %]"><i class="icon-download-alt"></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="nd_adminbutton" name="snapshot_del"><i class="icon-trash"></i> Delete</a></li>
[% END %]
</ul>
</span>
<button class="btn btn-danger btn-small pull-right"
data-toggle="modal" data-target="#nd_devdel" type="button">Delete</button>
<button class="btn btn-danger btn-small pull-right nd_pull-right-admin-button"
data-toggle="modal" data-target="#nd_devrenumber" type="button">Change IP</button>
<div id="nd_devdel" class="nd_modal nd_deep-horizon modal hide fade" tabindex="-1"
role="dialog" aria-labelledby="nd_devdel-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h3 id="nd_devdel-label">Confirm Delete: [% d.dns || d.ip | html_entity %]</h3>
</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="input-block-level" rows="2" data-form="delete"
placeholder="Enter a log message" name="extra"></textarea>
<label class="checkbox">
<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-dismiss="modal" aria-hidden="true">Cancel</button>
<button class="btn btn-danger nd_adminbutton" name="delete" data-dismiss="modal">Confirm</button>
</div>
</div>
<div id="nd_devrenumber" class="nd_modal nd_deep-horizon modal hide fade" tabindex="-1"
role="dialog" aria-labelledby="nd_devrenumber-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h3 id="nd_devrenumber-label">Confirm Renumber: [% d.dns || d.ip | html_entity %]</h3>
</div>
<div class="modal-body">
<blockquote>
( run in 0.839 second using v1.01-cache-2.11-cpan-5b529ec07f3 )