css audit

This commit is contained in:
Oliver Gorwits
2013-05-11 11:57:19 +01:00
parent 201470275d
commit e9349f325d
26 changed files with 489 additions and 494 deletions

View File

@@ -1,16 +1,16 @@
<table class="table table-bordered table-condensed table-striped">
<thead>
<tr>
<th class="center_cell">Entered</th>
<th class="center_cell">Action</th>
<th class="center_cell">Status</th>
<th class="center_cell">Device</th>
<th class="center_cell">Port</th>
<th class="center_cell">Param</th>
<th class="center_cell">User</th>
<th class="center_cell">Started</th>
<th class="center_cell">Finished</th>
<th class="center_cell">Action</th>
<th class="nd_center-cell">Entered</th>
<th class="nd_center-cell">Action</th>
<th class="nd_center-cell">Status</th>
<th class="nd_center-cell">Device</th>
<th class="nd_center-cell">Port</th>
<th class="nd_center-cell">Param</th>
<th class="nd_center-cell">User</th>
<th class="nd_center-cell">Started</th>
<th class="nd_center-cell">Finished</th>
<th class="nd_center-cell">Action</th>
</tr>
</thead>
</tbody>
@@ -20,26 +20,26 @@
[% ' class="error"' IF row.status == 'error' %]
[% ' class="info"' IF row.status.search('^queued-') %]
>
<td class="center_cell">[% row.entered_stamp | html_entity %]</td>
<td class="center_cell">
<td class="nd_center-cell">[% row.entered_stamp | html_entity %]</td>
<td class="nd_center-cell">
[% FOREACH word IN row.action.split('_') %]
[% word.ucfirst | html_entity %]&nbsp;
[% END %]
</td>
[% IF row.status.search('^queued-') %]
<td class="center_cell">Running on &quot;[% row.status.remove('^queued-') | html_entity %]&quot;</td>
<td class="nd_center-cell">Running on &quot;[% row.status.remove('^queued-') | html_entity %]&quot;</td>
[% ELSE %]
<td class="center_cell">[% row.status.ucfirst | html_entity %]</td>
<td class="nd_center-cell">[% row.status.ucfirst | html_entity %]</td>
[% END %]
<td class="center_cell"><a class="nd_linkcell"
<td class="nd_center-cell"><a class="nd_linkcell"
href="[% device_ports %]&q=[% row.device | uri %]">[% row.device | html_entity %]</a></td>
<td class="center_cell">[% row.port | html_entity %]</td>
<td class="center_cell">[% row.subaction | html_entity %]</td>
<td class="center_cell">[% row.username | html_entity %]</td>
<td class="center_cell">[% row.started_stamp | html_entity %]</td>
<td class="center_cell">[% row.finished_stamp | html_entity %]</td>
<td class="center_cell">
<form name="del" class="nd_inline_form">
<td class="nd_center-cell">[% row.port | html_entity %]</td>
<td class="nd_center-cell">[% row.subaction | html_entity %]</td>
<td class="nd_center-cell">[% row.username | html_entity %]</td>
<td class="nd_center-cell">[% row.started_stamp | html_entity %]</td>
<td class="nd_center-cell">[% row.finished_stamp | html_entity %]</td>
<td class="nd_center-cell">
<form name="del" class="nd_inline-form">
<input name="job" type="hidden" value="[% row.job | html_entity %]">
<button class="btn" name="del" type="submit"><i class="icon-trash text-error"></i></button>
</form>

View File

@@ -1,19 +1,19 @@
<table class="table-bordered table-condensed table-striped">
<thead>
<tr>
<th class="center_cell">Device Name</th>
<th class="center_cell">Device IP</th>
<th class="center_cell">Number of Ports</th>
<th class="center_cell">Action</th>
<th class="nd_center-cell">Device Name</th>
<th class="nd_center-cell">Device IP</th>
<th class="nd_center-cell">Number of Ports</th>
<th class="nd_center-cell">Action</th>
</tr>
</thead>
</tbody>
<tr>
<form name="add">
<td class="center_cell"><input name="dns" type="text"></td>
<td class="center_cell"><input name="ip" type="text"></td>
<td class="center_cell"><input name="ports" type="number"></td>
<td class="center_cell">
<td class="nd_center-cell"><input name="dns" type="text"></td>
<td class="nd_center-cell"><input name="ip" type="text"></td>
<td class="nd_center-cell"><input name="ports" type="number"></td>
<td class="nd_center-cell">
<button class="btn btn-small" name="add" type="submit"><i class="icon-plus-sign"></i> Add</button>
</td>
</form>
@@ -21,16 +21,16 @@
[% WHILE (row = results.next) %]
<tr>
<form name="update">
<td class="center_cell"><a class="nd_linkcell"
<td class="nd_center-cell"><a class="nd_linkcell"
href="[% device_ports %]&q=[% row.dns | uri %]">[% row.dns | html_entity %]</a></td>
<td class="center_cell">[% row.ip | html_entity %]</td>
<td class="center_cell"><input name="ports" type="number" value="[% row.port_count | html_entity %]"></td>
<td class="center_cell">
<td class="nd_center-cell">[% row.ip | html_entity %]</td>
<td class="nd_center-cell"><input name="ports" type="number" value="[% row.port_count | html_entity %]"></td>
<td class="nd_center-cell">
<input name="dns" type="hidden" value="[% row.dns | html_entity %]">
<input name="ip" type="hidden" value="[% row.ip | html_entity %]">
<button class="btn" name="update" type="submit"><i class="icon-save text-warning"></i></button>
</form>
<form name="del" class="nd_inline_form">
<form name="del" class="nd_inline-form">
<input name="dns" type="hidden" value="[% row.dns | html_entity %]">
<input name="ip" type="hidden" value="[% row.ip | html_entity %]">
<input name="ports" type="hidden" value="[% row.port_count | html_entity %]">

View File

@@ -1,41 +1,41 @@
<table class="table-bordered table-condensed table-striped">
<thead>
<tr>
<th class="center_cell">Left Device</th>
<th class="center_cell">Left Port</th>
<th class="center_cell">Right Device</th>
<th class="center_cell">Right Port</th>
<th class="center_cell">Action</th>
<th class="nd_center-cell">Left Device</th>
<th class="nd_center-cell">Left Port</th>
<th class="nd_center-cell">Right Device</th>
<th class="nd_center-cell">Right Port</th>
<th class="nd_center-cell">Action</th>
</tr>
</thead>
</tbody>
<tr>
<form name="add">
<td class="center_cell">
<td class="nd_center-cell">
<div class="input-append">
<input class="nd_topo_dev nd_topo_dev1" name="dev1" type="text">
<span class="add-on nd_topo_dev_caret"><i class="icon-caret-down icon-large"></i></span>
</div>
</td>
<td class="center_cell">
<td class="nd_center-cell">
<div class="input-append">
<input class="nd_topo_port nd_topo_dev1" name="port1" type="text">
<span class="add-on nd_topo_port_caret"><i class="icon-caret-down icon-large"></i></span>
</div>
</td>
<td class="center_cell">
<td class="nd_center-cell">
<div class="input-append">
<input class="nd_topo_dev nd_topo_dev2" name="dev2" type="text">
<span class="add-on nd_topo_dev_caret"><i class="icon-caret-down icon-large"></i></span>
</div>
</td>
<td class="center_cell">
<td class="nd_center-cell">
<div class="input-append">
<input class="nd_topo_port nd_topo_dev2" name="port2" type="text">
<span class="add-on nd_topo_port_caret"><i class="icon-caret-down icon-large"></i></span>
</div>
</td>
<td class="center_cell">
<td class="nd_center-cell">
<button class="btn btn-small" name="add" type="submit"><i class="icon-plus-sign"></i> Add</button>
</td>
</form>
@@ -43,13 +43,13 @@
[% WHILE (row = results.next) %]
<tr>
<form name="del">
<td class="center_cell"><a class="nd_linkcell"
<td class="nd_center-cell"><a class="nd_linkcell"
href="[% device_ports %]&q=[% row.dev1 | uri %]">[% row.dev1 | html_entity %]</a></td>
<td class="center_cell">[% row.port1 | html_entity %]</td>
<td class="center_cell"><a class="nd_linkcell"
<td class="nd_center-cell">[% row.port1 | html_entity %]</td>
<td class="nd_center-cell"><a class="nd_linkcell"
href="[% device_ports %]&q=[% row.dev2 | uri %]">[% row.dev2 | html_entity %]</a></td>
<td class="center_cell">[% row.port2 | html_entity %]</td>
<td class="center_cell">
<td class="nd_center-cell">[% row.port2 | html_entity %]</td>
<td class="nd_center-cell">
<input name="dev1" type="hidden" value="[% row.dev1 | html_entity %]">
<input name="port1" type="hidden" value="[% row.port1 | html_entity %]">
<input name="dev2" type="hidden" value="[% row.dev2 | html_entity %]">

View File

@@ -3,7 +3,7 @@
<tr>
<th>Address</th>
<th>DNS</th>
<th class="center_cell">Interface</th>
<th class="nd_center-cell">Interface</th>
<th>Description</th>
<th>Prefix</th>
</tr>
@@ -13,7 +13,7 @@
<tr>
<td>[% row.alias | html_entity %]</a>
<td>[% row.dns | html_entity %]</a>
<td class="center_cell"><a class="nd_linkcell"
<td class="nd_center-cell"><a class="nd_linkcell"
href="[% device_ports %]&q=[% params.q | uri %]&f=[% row.port | uri %]">[% row.port | html_entity %]</a></td>
<td>[% row.device_port.name | html_entity %]</td>
<td><a class="nd_linkcell"

View File

@@ -7,11 +7,11 @@
<tr>
<td>Location
[% IF vars.user.port_control %]
<i class="icon-edit nd_edit_icon nd_device_details_edit"></i>
<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"
<td class="nd_editable-cell" contenteditable="true"
data-field="location" data-for-device="[% d.ip %]">
[% d.location | html_entity %]
</td>
@@ -25,11 +25,11 @@
<tr>
<td>Contact
[% IF vars.user.port_control %]
<i class="icon-edit nd_edit_icon nd_device_details_edit"></i>
<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"
<td class="nd_editable-cell" contenteditable="true"
data-field="contact" data-for-device="[% d.ip | html_entity %]">
[% d.contact | html_entity %]
</td>

View File

@@ -6,7 +6,7 @@
[% NEXT IF item.name == 'c_admin' %]
[% NEXT IF item.name == 'c_nodes' AND params.c_nodes AND params.c_neighbors %]
[% NEXT UNLESS params.${item.name} %]
<th[% ' class="center_cell"' IF NOT loop.first %]>[% item.label | html_entity %]</th>
<th[% ' class="nd_center-cell"' IF NOT loop.first %]>[% item.label | html_entity %]</th>
[% END %]
</tr>
</thead>
@@ -28,37 +28,37 @@
[% IF params.c_port %]
[% IF vars.user.port_control AND params.c_admin %]
[% IF row.up_admin == 'up' %]
<td nowrap class="nd_editable_cell" data-action="down"
<td nowrap class="nd_editable-cell" data-action="down"
data-field="c_port" data-for-device="[% device | html_entity %]" data-for-port="[% row.port | html_entity %]">
<i class="icon-hand-down nd_hand_icon"
<i class="icon-hand-down nd_hand-icon"
rel="tooltip" data-placement="top" data-offset="3"
data-animation="" data-title="Click to Disable"></i>
[% ELSE %]
<td nowrap class="nd_editable_cell" data-action="up"
<td nowrap class="nd_editable-cell" data-action="up"
data-field="c_port" data-for-device="[% device | html_entity %]" data-for-port="[% row.port | html_entity %]">
<i class="icon-hand-up nd_hand_icon"
<i class="icon-hand-up nd_hand-icon"
rel="tooltip" data-placement="top" data-offset="3"
data-animation="" data-title="Click to Enable"></i>
[% END %]
[% ELSE %]
<td nowrap>
[% END %]
<a class="nd_linkcell nd_this_port_only" href="[% uri_for('/device',
<a class="nd_linkcell nd_this-port-only" href="[% uri_for('/device',
self_options) %]&q=[% params.q | uri %]&f=[% row.port | uri %]">
[% row.port | html_entity %]
</a></td>
[% END %]
[% IF params.c_descr %]
<td nowrap class="center_cell">[% row.descr | html_entity %]</td>
<td nowrap class="nd_center-cell">[% row.descr | html_entity %]</td>
[% END %]
[% IF params.c_type %]
<td class="center_cell">[% row.type | html_entity %]</td>
<td class="nd_center-cell">[% row.type | html_entity %]</td>
[% END %]
[% IF params.c_duplex %]
<td class="center_cell">
<td class="nd_center-cell">
[% IF row.up == 'up' AND row.duplex %]
[% row.duplex_admin | html_entity %] / [% row.duplex | html_entity %]
[% END %]
@@ -66,46 +66,46 @@
[% END %]
[% IF params.c_lastchange %]
<td class="center_cell">[% row.lastchange_stamp | html_entity %]</td>
<td class="nd_center-cell">[% row.lastchange_stamp | html_entity %]</td>
[% END %]
[% IF params.c_name %]
[% IF vars.user.port_control AND params.c_admin %]
<td nowrap class="center_cell nd_editable_cell" contenteditable="true"
<td nowrap class="nd_center-cell nd_editable-cell" contenteditable="true"
data-field="c_name" data-for-device="[% device | html_entity %]" data-for-port="[% row.port | html_entity %]">
<i class="icon-edit nd_edit_icon"></i>
<i class="icon-edit nd_edit-icon"></i>
[% ELSE %]
<td nowrap class="center_cell">
<td nowrap class="nd_center-cell">
[% END %]
<div class="nd_editable_cell_content">
<div class="nd_editable-cell-content">
[% row.name | html_entity %]
</div>
</td>
[% END %]
[% IF params.c_speed %]
<td class="center_cell">[% row.speed | html_entity %]</td>
<td class="nd_center-cell">[% row.speed | html_entity %]</td>
[% END %]
[% IF params.c_mac %]
<td class="center_cell">[% row.mac | html_entity %]</td>
<td class="nd_center-cell">[% row.mac | html_entity %]</td>
[% END %]
[% IF params.c_mtu %]
<td class="center_cell">[% row.mtu | html_entity %]</td>
<td class="nd_center-cell">[% row.mtu | html_entity %]</td>
[% END %]
[% IF params.c_vlan %]
[% IF vars.user.port_control AND params.c_admin %]
<td class="center_cell nd_editable_cell" contenteditable="true"
<td class="nd_center-cell nd_editable-cell" contenteditable="true"
data-field="c_vlan" data-for-device="[% device | html_entity %]" data-for-port="[% row.port | html_entity %]">
<i class="icon-edit nd_edit_icon"></i>
<div class="nd_editable_cell_content">
<i class="icon-edit nd_edit-icon"></i>
<div class="nd_editable-cell-content">
[% IF row.vlan %][% row.vlan | html_entity %][% END %]
</div>
</td>
[% ELSE %]
<td class="center_cell">
<td class="nd_center-cell">
<a class="nd_linkcell"
href="[% uri_for('/search') %]?tab=vlan&q=[% row.vlan | uri %]">
[% row.vlan | html_entity %]</a>
@@ -123,11 +123,10 @@
[% SET output = output _ ', ' IF NOT loop.last %]
[% END %]
[% IF row.tagged_vlans_count > 10 %] [%# TODO make this a settable variable %]
[% SET output = '<div class="vlan_total">(' _ row.tagged_vlans_count
_ ')</div><span class="nd_linkcell nd_collapse_vlans">
<i class="cell-arrow-up-down icon-chevron-up icon-large">
</i>Show VLANs</span>
<div class="nd_collapsing nd_collapse_pre_hidden">' _ output %]
[% SET output = '<div class="nd_vlan-total">(' _ row.tagged_vlans_count
_ ')</div><span class="nd_linkcell nd_collapse-vlans">
<div class="nd_arrow-up-down-left icon-chevron-up icon-large"></div>Show VLANs</span>
<div class="nd_collapsing nd_collapse-pre-hidden">' _ output %]
[% SET output = output _ '</div>' %]
[% END %]
[% output %]
@@ -143,12 +142,12 @@
data-field="c_power" data-for-device="[% device | html_entity %]"
data-for-port="[% row.port | html_entity %]">
<i class="icon-off nd_power_icon nd_power_on"
<i class="icon-off nd_power-icon nd_power-on"
rel="tooltip" data-placement="top" data-offset="3"
data-animation="" data-title="Click to Disable"></i>
[% ELSE %]
<td nowrap>
<i class="icon-off nd_power_on"></i>
<i class="icon-off nd_power-on"></i>
[% END %]
<span>
[% IF row.power.power > 0 %]
@@ -163,7 +162,7 @@
data-field="c_power" data-for-device="[% device | html_entity %]"
data-for-port="[% row.port | html_entity %]">
<i class="icon-off nd_power_icon"
<i class="icon-off nd_power-icon"
rel="tooltip" data-placement="top" data-offset="3"
data-animation="" data-title="Click to Enable"></i>
[% ELSE %]
@@ -216,11 +215,11 @@
[% END %]
[% IF params.c_stp %]
<td class="center_cell">[% row.stp | html_entity %]</td>
<td class="nd_center-cell">[% row.stp | html_entity %]</td>
[% END %]
[% IF params.c_up %]
<td class="center_cell">
<td class="nd_center-cell">
[% row.up_admin | html_entity %] / [% row.up | html_entity %]
</td>
[% END %]

View File

@@ -1,28 +1,28 @@
<table class="table-bordered table-condensed table-striped">
<thead>
<tr>
<th class="center_cell">Left Device</th>
<th class="center_cell">Interface</th>
<th class="center_cell">Duplex</th>
<th class="center_cell">Right Device</th>
<th class="center_cell">Interface</th>
<th class="center_cell">Duplex</th>
<th class="nd_center-cell">Left Device</th>
<th class="nd_center-cell">Interface</th>
<th class="nd_center-cell">Duplex</th>
<th class="nd_center-cell">Right Device</th>
<th class="nd_center-cell">Interface</th>
<th class="nd_center-cell">Duplex</th>
</tr>
</thead>
</tbody>
[% WHILE (row = results.next) %]
<tr>
<td class="center_cell">[% row.left_dns || row.left_ip | html_entity %]</a>
<td class="center_cell"><a class="nd_linkcell"
<td class="nd_center-cell">[% row.left_dns || row.left_ip | html_entity %]</a>
<td class="nd_center-cell"><a class="nd_linkcell"
href="[% device_ports %]&q=[% row.left_dns || row.left_ip | uri %]&f=[% row.left_port | uri %]&c_duplex=on">
[% row.left_port | html_entity %]</a></td>
<td class="center_cell">[% row.left_duplex.ucfirst | html_entity %]</td>
<td class="nd_center-cell">[% row.left_duplex.ucfirst | html_entity %]</td>
<td class="center_cell">[% row.right_dns || row.right_ip | html_entity %]</a>
<td class="center_cell"><a class="nd_linkcell"
<td class="nd_center-cell">[% row.right_dns || row.right_ip | html_entity %]</a>
<td class="nd_center-cell"><a class="nd_linkcell"
href="[% device_ports %]&q=[% row.right_dns || row.right_ip | uri %]&f=[% row.right_port | uri %]&c_duplex=on">
[% row.right_port | html_entity %]</a></td>
<td class="center_cell">[% row.right_duplex.ucfirst | html_entity %]</td>
<td class="nd_center-cell">[% row.right_duplex.ucfirst | html_entity %]</td>
</tr>
[% END %]
</tbody>

View File

@@ -12,17 +12,17 @@
</tbody>
[% WHILE (row = results.next) %]
<tr>
<td><a class="nd_linkcell nd_stealthlink"
<td><a class="nd_linkcell nd_stealth-link"
href="[% device_ports %]&q=[% row.dns || row.ip | uri %]&f=[% row.vlan.vlan | uri %]">[% row.vlan.vlan | html_entity %]</a></td>
<td><a class="nd_linkcell"
href="[% device_ports %]&q=[% row.dns || row.ip | uri %]&f=[% row.vlan.vlan | uri %]">[% row.dns || row.ip | html_entity %]</a></td>
<td><a class="nd_linkcell nd_stealthlink"
<td><a class="nd_linkcell nd_stealth-link"
href="[% device_ports %]&q=[% row.dns || row.ip | uri %]&f=[% row.vlan.vlan | uri %]">[% row.vlan.description | html_entity %]</a></td>
<td><a class="nd_linkcell nd_stealthlink"
<td><a class="nd_linkcell nd_stealth-link"
href="[% device_ports %]&q=[% row.dns || row.ip | uri %]&f=[% row.vlan.vlan | uri %]">[% row.model | html_entity %]</a></td>
<td><a class="nd_linkcell nd_stealthlink"
<td><a class="nd_linkcell nd_stealth-link"
href="[% device_ports %]&q=[% row.dns || row.ip | uri %]&f=[% row.vlan.vlan | uri %]">[% row.os | html_entity %]</a></td>
<td><a class="nd_linkcell nd_stealthlink"
<td><a class="nd_linkcell nd_stealth-link"
href="[% device_ports %]&q=[% row.dns || row.ip | uri %]&f=[% row.vlan.vlan | uri %]">[% row.vendor | html_entity %]</a></td>
</tr>
[% END %]