Squashed commit of the following: commite44f203f47Author: Oliver Gorwits <oliver@cpan.org> Date: Fri Sep 20 20:00:46 2013 +0100 also set filename on csv download link commit26b47d1296Author: Oliver Gorwits <oliver@cpan.org> Date: Fri Sep 20 19:56:38 2013 +0100 conditionally show csv icon for device and search tabs commit119d2c672dAuthor: Oliver Gorwits <oliver@cpan.org> Date: Fri Sep 20 19:48:24 2013 +0100 tweak look of csv icon commit89816892beAuthor: Oliver Gorwits <oliver@cpan.org> Date: Fri Sep 20 19:38:31 2013 +0100 enable csv icon link rewrite for all pages commitac29769402Author: Oliver Gorwits <oliver@cpan.org> Date: Fri Sep 20 19:28:49 2013 +0100 use single route handler for ajax and csv response commit4b6f89635dAuthor: Oliver Gorwits <oliver@cpan.org> Date: Fri Sep 20 18:59:08 2013 +0100 no need for separate csv link template commit1021329e1cAuthor: Oliver Gorwits <oliver@cpan.org> Date: Fri Sep 20 18:57:20 2013 +0100 display download as csv icon conditionally commitce57cdba69Author: Oliver Gorwits <oliver@cpan.org> Date: Fri Sep 20 09:23:57 2013 +0100 Based on jeneric's CSV download templates; - try to reduce code duplication by using same route handler for ajax and csv, using request->is_ajax to switch the template, and set content-type - use new HTML5 "download" attribute on links so content-disposition header is no longer necessary - download CSV icon is placed on all tables (per report/device/serach section) - update download CSV link using javascript just before table content is fetched - this is necessary to make sure updated sidebar query params are included The idea here is to allow us to support CSV download in the pages which display tables by only doing the following: - (existing routes:) replace "ajax" with "get" route handler - add logic to switch template in handler, based on request->is_ajax - write _csv.tt version of the template, to spit out CSV file content This makes it much easier for new devs to write reports supporting CSV, I think? commitd3553d2623Author: Eric A. Miller <emiller@cpan.org> Date: Thu Sep 19 22:30:27 2013 -0400 add csv download to duplex mismatch, half duplex, and port utilization reports commit5d4df72a24Author: Eric A. Miller <emiller@cpan.org> Date: Wed Sep 18 23:50:27 2013 -0400 add csv download to ap channel distribution report commit0824d7936aAuthor: Eric A. Miller <emiller@cpan.org> Date: Wed Sep 18 23:42:53 2013 -0400 need Template::Plugin::CSV for csv output commitbb1f842d92Author: Eric A. Miller <emiller@cpan.org> Date: Wed Sep 18 23:35:28 2013 -0400 add csv download option to device addresses commit99ada1132cAuthor: Eric A. Miller <emiller@cpan.org> Date: Wed Sep 18 23:32:57 2013 -0400 add csv download option to device, port, and vlan search pages
65 lines
2.9 KiB
Plaintext
65 lines
2.9 KiB
Plaintext
<i class="nd_sidebar-toggle icon-wrench icon-large" id="nd_sidebar-toggle-img-out"
|
|
rel="tooltip" data-placement="left" data-offset="5" data-title="Show Sidebar"></i>
|
|
<i class="icon-question-sign icon-large" id="nd_netmap-help" rel="popover"
|
|
data-title="Neighbor Map Controls"
|
|
data-html="true"
|
|
data-content="
|
|
<ul>
|
|
<li>Click and drag to pan</li>
|
|
<li>Mouse-wheel scroll to zoom</li>
|
|
<li>Hover to hightlight neighbors</li>
|
|
<li>Click to view device's map</li>
|
|
</ul>"
|
|
data-placement='left' data-trigger='click'></i>
|
|
<div class="container-fluid">
|
|
<div class="nd_sidebar nd_sidebar-pinned">
|
|
<div class="well">
|
|
<i class="nd_sidebar-toggle icon-signout" id="nd_sidebar-toggle-img-in"
|
|
rel="tooltip" data-placement="left" data-offset="5" data-title="Hide Sidebar"></i>
|
|
<i class="nd_sidebar-pin icon-pushpin nd_sidebar-pin-clicked"
|
|
rel="tooltip" data-placement="left" data-offset="5" data-title="Unpin Sidebar"></i>
|
|
<div class="tab-content">
|
|
[% FOREACH tab IN settings._device_tabs %]
|
|
<div id="[% tab.tag %]_search" class="tab-pane [% 'active' IF params.tab == tab.tag %]">
|
|
<form id="[% tab.tag %]_form" class="nd_sidebar-form form-stacked"
|
|
method="get" action="[% uri_for('/device') %]">
|
|
<input name="tab" value="[% tab.tag %]" type="hidden"/>
|
|
[% TRY %]
|
|
[% INCLUDE "sidebar/device/${tab.tag}.tt" %]
|
|
<script type="text/javascript">has_sidebar["[% tab.tag %]"] = 1;</script>
|
|
[% CATCH %]
|
|
<!-- no "[% tab.tag %]" search options -->
|
|
<input name="q" value="[% params.q | html_entity %]" type="hidden"/>
|
|
<input name="f" value="[% params.f | html_entity %]" type="hidden"/>
|
|
<script type="text/javascript">has_sidebar["[% tab.tag %]"] = 0;</script>
|
|
[% END %]
|
|
</form>
|
|
</div> <!-- /tab-pane -->
|
|
[% END %]
|
|
</div> <!-- /tab-content -->
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<ul id="nd_search-results" class="nav nav-tabs">
|
|
[% FOREACH tab IN settings._device_tabs %]
|
|
<li[% ' class="active"' IF params.tab == tab.tag %]><a id="[% tab.tag %]_link" href="#[% tab.tag %]_pane">[% tab.label %]</a></li>
|
|
[% END %]
|
|
<span id="nd_device-name">
|
|
[% d.dns || d.name | html_entity %]
|
|
<a id="nd_csv-download" href="#" download="netdisco.csv">
|
|
<i id="nd_csv-download-icon" class="text-info icon-file-text-alt icon-large"
|
|
rel="tooltip" data-placement="left" data-offset="5" data-title="Download as CSV"></i></a>
|
|
</span>
|
|
</ul>
|
|
<div class="tab-content">
|
|
[% FOREACH tab IN settings._device_tabs %]
|
|
<div class="tab-pane[% ' active' IF params.tab == tab.tag %]" id="[% tab.tag %]_pane"></div>
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
[%+ INCLUDE 'js/device.js' -%]
|
|
</script>
|