Add the "Reload" and "CSV" buttons
[proteocache.git] / webapp / view / reportIPstatistics.jsp
index 2a6c882..2214e5e 100644 (file)
        <div class="container">
                <jsp:include page="fragments/mainmenu.jsp" />
                <spring:url value="/admin/ip/results" var="ipquery" />
+               <spring:url value="/admin/ip/counts/results?JobCounter=${counter}" var="the_query"/>
+
+               <!-- reload and CSV buttons  -->
+               <ul class="nav navbar-nav navbar-right">
+                       <li>
+                       <a href="${the_query}" class="btn btn-default active">Reload</a>
+                       </li>
+                       <c:choose><c:when test="${csvfile != ''}">
+                       <li>
+                       <a id="forCSVfile" download="data.csv" href="data:application/csv;charset=utf-8,${csvfile}" class="btn btn-default active">CSV</a>
+                       </li>
+                       </c:when></c:choose>
+               </ul>
 
        <div class="panel panel-default">
        <div class="panel-heading">
-               <div style="font-weight:bold;">Jobs Statistics</div>
+               <p style="font-weight:bold;">IP Statistics</p>
        </div>
        <div class="panel-body">
 
@@ -26,7 +39,7 @@
                <c:otherwise>
                        <p>${njobs} IP with at least ${counter} jobs ever launched</p>
                        <div class="table-responsive">
-                       <table class="table table-striped table-hover table-bordered">
+                       <table class="table table-striped table-hover table-bordered" id="counts">
                        <thead>
                                <tr>
                                        <th style="text-align: centre">Number of jobs</th>