You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sirona.apache.org by rm...@apache.org on 2013/11/06 15:42:58 UTC
svn commit: r1539352 - in /incubator/sirona/trunk/server/reporting/src/main:
java/org/apache/sirona/reporting/web/ resources/resources/css/
resources/resources/images/ resources/templates/ resources/templates/report/
Author: rmannibucau
Date: Wed Nov 6 14:42:58 2013
New Revision: 1539352
URL: http://svn.apache.org/r1539352
Log:
fixing css for report table
Added:
incubator/sirona/trunk/server/reporting/src/main/resources/resources/css/tablesorter.bootstrap.css
incubator/sirona/trunk/server/reporting/src/main/resources/resources/images/asc.gif (with props)
incubator/sirona/trunk/server/reporting/src/main/resources/resources/images/desc.gif (with props)
Modified:
incubator/sirona/trunk/server/reporting/src/main/java/org/apache/sirona/reporting/web/MonitoringController.java
incubator/sirona/trunk/server/reporting/src/main/resources/resources/css/sirona.css
incubator/sirona/trunk/server/reporting/src/main/resources/templates/page.vm
incubator/sirona/trunk/server/reporting/src/main/resources/templates/report/report.vm
Modified: incubator/sirona/trunk/server/reporting/src/main/java/org/apache/sirona/reporting/web/MonitoringController.java
URL: http://svn.apache.org/viewvc/incubator/sirona/trunk/server/reporting/src/main/java/org/apache/sirona/reporting/web/MonitoringController.java?rev=1539352&r1=1539351&r2=1539352&view=diff
==============================================================================
--- incubator/sirona/trunk/server/reporting/src/main/java/org/apache/sirona/reporting/web/MonitoringController.java (original)
+++ incubator/sirona/trunk/server/reporting/src/main/java/org/apache/sirona/reporting/web/MonitoringController.java Wed Nov 6 14:42:58 2013
@@ -140,16 +140,20 @@ public class MonitoringController implem
}
// handle Content-Type, we could use a map but this is more efficient ATM and can still be overriden
+ boolean image = false;
if (requestURI.endsWith(".css")) {
httpResponse.setHeader("Content-Type", "text/css");
} else if (requestURI.endsWith(".js")) {
httpResponse.setHeader("Content-Type", "application/javascript");
} else if (requestURI.endsWith(".png")) {
httpResponse.setHeader("Content-Type", "image/png");
+ image = true;
} else if (requestURI.endsWith(".gif")) {
httpResponse.setHeader("Content-Type", "image/gif");
+ image = true;
} else if (requestURI.endsWith(".jpg")) {
httpResponse.setHeader("Content-Type", "image/jpeg");
+ image = true;
}
// resource, they are in the classloader and not in the webapp to ease the embedded case
@@ -157,7 +161,7 @@ public class MonitoringController implem
byte[] bytes = cachedResources.get(pathWithoutParams);
if (bytes == null) {
final InputStream is;
- if (invoker != defaultInvoker) { // resource is filtered so filtering it before caching it
+ if (!image && invoker != defaultInvoker) { // resource is filtered so filtering it before caching it
final StringWriter writer = new StringWriter();
final PrintWriter printWriter = new PrintWriter(writer);
invoker.invoke(httpRequest, HttpServletResponse.class.cast(Proxy.newProxyInstance(classloader, new Class<?>[]{HttpServletResponse.class}, new InvocationHandler() {
Modified: incubator/sirona/trunk/server/reporting/src/main/resources/resources/css/sirona.css
URL: http://svn.apache.org/viewvc/incubator/sirona/trunk/server/reporting/src/main/resources/resources/css/sirona.css?rev=1539352&r1=1539351&r2=1539352&view=diff
==============================================================================
--- incubator/sirona/trunk/server/reporting/src/main/resources/resources/css/sirona.css (original)
+++ incubator/sirona/trunk/server/reporting/src/main/resources/resources/css/sirona.css Wed Nov 6 14:42:58 2013
@@ -60,4 +60,4 @@ a.nodeText:hover {
min-width: 100px;
height: 100%;
min-height: 300px
-}
\ No newline at end of file
+}
Added: incubator/sirona/trunk/server/reporting/src/main/resources/resources/css/tablesorter.bootstrap.css
URL: http://svn.apache.org/viewvc/incubator/sirona/trunk/server/reporting/src/main/resources/resources/css/tablesorter.bootstrap.css?rev=1539352&view=auto
==============================================================================
--- incubator/sirona/trunk/server/reporting/src/main/resources/resources/css/tablesorter.bootstrap.css (added)
+++ incubator/sirona/trunk/server/reporting/src/main/resources/resources/css/tablesorter.bootstrap.css Wed Nov 6 14:42:58 2013
@@ -0,0 +1,131 @@
+/*************
+ Bootstrap theme
+ *************/
+/* jQuery Bootstrap Theme */
+.tablesorter-bootstrap {
+ width: 100%;
+}
+.tablesorter-bootstrap .tablesorter-header,
+.tablesorter-bootstrap tfoot th,
+.tablesorter-bootstrap tfoot td {
+ font: bold 14px/20px Arial, Sans-serif;
+ padding: 4px;
+ margin: 0 0 18px;
+ background-color: #eee;
+}
+
+.tablesorter-bootstrap .tablesorter-header {
+ cursor: pointer;
+}
+
+.tablesorter-bootstrap .tablesorter-header-inner {
+ position: relative;
+ padding: 4px 18px 4px 4px;
+}
+
+/* bootstrap uses <i> for icons */
+.tablesorter-bootstrap .tablesorter-header i {
+ font-size: 11px;
+ position: absolute;
+ right: 2px;
+ top: 50%;
+ margin-top: -7px; /* half the icon height; older IE doesn't like this */
+ width: 14px;
+ height: 14px;
+ background-repeat: no-repeat;
+ line-height: 14px;
+ display: inline-block;
+}
+.tablesorter-bootstrap .bootstrap-icon-unsorted {
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAOCAYAAAD5YeaVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAWVJREFUeNqUUL9Lw2AUTGP8mqGlpBQkNeCSRcckEBcHq1jImMElToKuDvpHFMGhU0BQcHBwLji6CE1B4uB/INQsDi4d2jQ/fPeZxo764OV6915f7lLJ81xot9tCURXqdVEUr7IsO6ffH9Q5BlEUCaLwWxWqTcbYnaIoh0Dw4gAvcWlxq1qt9hqNxg6hUGAP+uIPUrGs0qXLer2+v/pTX6QpxLtkc2U2m53ACb8sSdIDXerSEms2m6+DweAICA4d89KGbduf9MpEVdXQ9/2LVqv1CASHjjn3iq/x1xKFfxQPqGnada1W86bT6SiO42OS3qk3KPStLMvbk8nkfjwen/LLuq6blFymMB0KdUPSGhAcOualjX6/f0bCiC7NaWGPQr0BwaFjzn0gYJqmLAiCA8/zni3LmhuGkQPBoWPOPwQeaPIqD4fDruu6L6Zp5kBw6IudchmdJAkLw3DXcZwnIPjy/FuAAQCiqqWWCAFKcwAAAABJRU5ErkJggg==);
+}
+
+/* since bootstrap (table-striped) uses nth-child(), we just use this to add a zebra stripe color */
+.tablesorter-bootstrap tr.odd td {
+ background-color: #f9f9f9;
+}
+.tablesorter-bootstrap tbody > .odd:hover > td,
+.tablesorter-bootstrap tbody > .even:hover > td {
+ background-color: #f5f5f5;
+}
+.tablesorter-bootstrap tr.even td {
+ background-color: #fff;
+}
+
+/* processing icon */
+.tablesorter-bootstrap .tablesorter-processing {
+ background-image: url('data:image/gif;base64,R0lGODlhFAAUAKEAAO7u7lpaWgAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgACACwAAAAAFAAUAAACQZRvoIDtu1wLQUAlqKTVxqwhXIiBnDg6Y4eyx4lKW5XK7wrLeK3vbq8J2W4T4e1nMhpWrZCTt3xKZ8kgsggdJmUFACH5BAEKAAIALAcAAAALAAcAAAIUVB6ii7jajgCAuUmtovxtXnmdUAAAIfkEAQoAAgAsDQACAAcACwAAAhRUIpmHy/3gUVQAQO9NetuugCFWAAAh+QQBCgACACwNAAcABwALAAACE5QVcZjKbVo6ck2AF95m5/6BSwEAIfkEAQoAAgAsBwANAAsABwAAAhOUH3kr6QaAcSrGWe1VQl+mMUIBACH5BAEKAAIALAIADQALAAcAAAIUlICmh7ncTAgqijkruDiv7n2YUAAAIfkEAQoAAgAsAAAHAAcACwAAAhQUIGmHyedehIoqFXLKfPOAaZdWAAAh+QQFCgACACwAAAIABwALAAACFJQFcJiXb15zLYRl7cla8OtlGGgUADs=');
+ position: absolute;
+ z-index: 1000;
+}
+
+/* caption */
+caption {
+ background: #fff;
+}
+
+/* filter widget */
+.tablesorter-bootstrap .tablesorter-filter-row .tablesorter-filter {
+ width: 98%;
+ height: auto;
+ margin: 0 auto;
+ padding: 4px 6px;
+ background-color: #fff;
+ color: #333;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ -webkit-transition: height 0.1s ease;
+ -moz-transition: height 0.1s ease;
+ -o-transition: height 0.1s ease;
+ transition: height 0.1s ease;
+}
+.tablesorter-bootstrap .tablesorter-filter-row .tablesorter-filter.disabled {
+ background: #eee;
+ cursor: not-allowed;
+}
+.tablesorter-bootstrap .tablesorter-filter-row td {
+ background: #efefef;
+ line-height: normal;
+ text-align: center;
+ padding: 4px 6px;
+ vertical-align: middle;
+ -webkit-transition: line-height 0.1s ease;
+ -moz-transition: line-height 0.1s ease;
+ -o-transition: line-height 0.1s ease;
+ transition: line-height 0.1s ease;
+}
+/* hidden filter row */
+.tablesorter-bootstrap .tablesorter-filter-row.hideme td {
+ padding: 2px; /* change this to modify the thickness of the closed border row */
+ margin: 0;
+ line-height: 0;
+}
+.tablesorter-bootstrap .tablesorter-filter-row.hideme .tablesorter-filter {
+ height: 1px;
+ min-height: 0;
+ border: 0;
+ padding: 0;
+ margin: 0;
+ /* don't use visibility: hidden because it disables tabbing */
+ opacity: 0;
+ filter: alpha(opacity=0);
+}
+
+/* pager plugin */
+.tablesorter-bootstrap .tablesorter-pager select {
+ padding: 4px 6px;
+}
+.tablesorter-bootstrap .tablesorter-pager .pagedisplay {
+ border: 0;
+}
+/* tfoot i for pager controls */
+.tablesorter-bootstrap tfoot i {
+ font-size: 11px;
+}
+
+/* ajax error row */
+.tablesorter .tablesorter-errorRow td {
+ cursor: pointer;
+ background-color: #e6bf99;
+}
Added: incubator/sirona/trunk/server/reporting/src/main/resources/resources/images/asc.gif
URL: http://svn.apache.org/viewvc/incubator/sirona/trunk/server/reporting/src/main/resources/resources/images/asc.gif?rev=1539352&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/sirona/trunk/server/reporting/src/main/resources/resources/images/asc.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/sirona/trunk/server/reporting/src/main/resources/resources/images/desc.gif
URL: http://svn.apache.org/viewvc/incubator/sirona/trunk/server/reporting/src/main/resources/resources/images/desc.gif?rev=1539352&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/sirona/trunk/server/reporting/src/main/resources/resources/images/desc.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: incubator/sirona/trunk/server/reporting/src/main/resources/templates/page.vm
URL: http://svn.apache.org/viewvc/incubator/sirona/trunk/server/reporting/src/main/resources/templates/page.vm?rev=1539352&r1=1539351&r2=1539352&view=diff
==============================================================================
--- incubator/sirona/trunk/server/reporting/src/main/resources/templates/page.vm (original)
+++ incubator/sirona/trunk/server/reporting/src/main/resources/templates/page.vm Wed Nov 6 14:42:58 2013
@@ -26,8 +26,9 @@
<link href="$mapping/resources/css/bootstrap.css" rel="stylesheet">
<link href="$mapping/resources/css/sb-admin.css" rel="stylesheet">
- <link rel="stylesheet" href="$mapping/resources/font-awesome/css/font-awesome.min.css">
- <link rel="stylesheet" href="$mapping/resources/css/sirona.css">
+ <link href="$mapping/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet" >
+ <link href="$mapping/resources/css/tablesorter.bootstrap.css" rel="stylesheet" >
+ <link href="$mapping/resources/css/sirona.css" rel="stylesheet" >
#* js shared accross pages so we need to put it in <head /> if content pages uses it in $()) *#
<script src="$mapping/resources/js/jquery.min.js"></script>
Modified: incubator/sirona/trunk/server/reporting/src/main/resources/templates/report/report.vm
URL: http://svn.apache.org/viewvc/incubator/sirona/trunk/server/reporting/src/main/resources/templates/report/report.vm?rev=1539352&r1=1539351&r2=1539352&view=diff
==============================================================================
--- incubator/sirona/trunk/server/reporting/src/main/resources/templates/report/report.vm (original)
+++ incubator/sirona/trunk/server/reporting/src/main/resources/templates/report/report.vm Wed Nov 6 14:42:58 2013
@@ -43,25 +43,25 @@
<table id="report-table" class="table table-bordered table-hover table-striped tablesorter">
<thead>
- <tr>
- #foreach( $header in $headers )
- <th>$header <i class="icon-sort"></i></th>
- #end
- </tr>
+ <tr>
+ #foreach( $header in $headers )
+ <th>$header</th>
+ #end
+ </tr>
</thead>
<tbody>
#foreach( $line in $data.entrySet() )
- <tr>
- #foreach( $item in $line.getValue() )
- <td>
- #if ($foreach.isFirst())
- <a href="$mapping/report/counter/$line.getKey()">$item</a>
- #else
- $item
- #end
- </td>
- #end
- </tr>
+ <tr>
+ #foreach( $item in $line.getValue() )
+ <td>
+ #if ($foreach.isFirst())
+ <a href="$mapping/report/counter/$line.getKey()">$item</a>
+ #else
+ $item
+ #end
+ </td>
+ #end
+ </tr>
#end
</tbody>
</table>
@@ -69,29 +69,11 @@
<script type="text/javascript" src="$mapping/resources/js/jquery.tablesorter.js"></script>
<script type="text/javascript" src="$mapping/resources/js/jquery.tablesorter.widgets.js"></script>
<script type="text/javascript">
- $(function() {
+ $(function () {
$("table#report-table").tablesorter({
- widthFixed : false,
- widgets: [ "filter" ],
- widgetOptions : {
- filter_childRows : false,
- filter_columnFilters : true,
- filter_cssFilter : 'tablesorter-filter',
- filter_filteredRow : 'filtered',
- filter_formatter : null,
- filter_functions : null,
- filter_hideFilters : false,
- filter_ignoreCase : true,
- filter_liveSearch : true,
- filter_reset : 'button.reset',
- filter_searchDelay : 300,
- filter_serversideFiltering: false,
- filter_startsWith : false,
- filter_useParsedData : false,
- cssAsc: 'headerSortUp',
- cssDesc: 'headerSortDown',
- sortList: [[4, 1]] // sort by mean in descending order
- }
+ theme : 'bootstrap',
+ headerTemplate: '{content} {icon}',
+ widgets : [ 'uitheme', 'filter' ]
});
// input search box shouldn't force the width of columns