1 | <html> |
---|
2 | <head> |
---|
3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
4 | <meta name="layout" content="main"/> |
---|
5 | <title>Visualization</title> |
---|
6 | |
---|
7 | <!--[if lt IE 9]><g:javascript src="jqplot/excanvas.js" /><![endif]--> |
---|
8 | <g:javascript src="jqplot/jquery.jqplot.min.js" /> |
---|
9 | <link rel="stylesheet" type="text/css" href="<g:resource dir='css' file='jquery.jqplot.min.css' />" /> |
---|
10 | |
---|
11 | <!-- jqPlot plugins --> |
---|
12 | <g:javascript src="jqplot/plugins/jqplot.barRenderer.min.js" /> |
---|
13 | <g:javascript src="jqplot/plugins/jqplot.categoryAxisRenderer.min.js" /> |
---|
14 | <g:javascript src="jqplot/plugins/jqplot.pointLabels.min.js" /> |
---|
15 | <g:javascript src="jqplot/plugins/jqplot.canvasTextRenderer.min.js" /> |
---|
16 | <g:javascript src="jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js" /> |
---|
17 | <g:javascript src="jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js" /> |
---|
18 | <g:javascript src="jqplot/plugins/jqplot.ohlcRenderer.min.js" /> |
---|
19 | <g:javascript src="jqplot/plugins/jqplot.highlighter.min.js" /> |
---|
20 | |
---|
21 | <g:javascript src="visualization.js" /> |
---|
22 | <link rel="stylesheet" type="text/css" href="<g:resource dir='css' file='visualization.css' />" /> |
---|
23 | <style type="text/css"> |
---|
24 | /** NEEDED FOR RESOURCES PLUGIN **/ |
---|
25 | .menu_seperator {background-image: url(${resource(dir: 'images/visualization', file: 'seperator.gif')}); } |
---|
26 | .message_error { background: #ffe0e0 url(${fam.icon( name: 'exclamation' )}) 10px 5px no-repeat; } |
---|
27 | .message_warning { background: #eee url(${fam.icon( name: 'information' )}) 10px 5px no-repeat; } |
---|
28 | </style> |
---|
29 | |
---|
30 | <script type="text/javascript"> |
---|
31 | // We store urls here because they depend on the grails configuration. |
---|
32 | // This way, the URLs are always correct |
---|
33 | var visualizationUrls = { |
---|
34 | "getStudies": "<g:createLink action="getStudies" />", |
---|
35 | "getFields": "<g:createLink action="getFields" />", |
---|
36 | "getVisualizationTypes": "<g:createLink action="getVisualizationTypes" />", |
---|
37 | "getData": "<g:createLink action="getData" />" |
---|
38 | }; |
---|
39 | </script> |
---|
40 | </head> |
---|
41 | <body> |
---|
42 | |
---|
43 | <div id="data"> |
---|
44 | <form id="visualizationForm"> |
---|
45 | <div id="top_container"> |
---|
46 | |
---|
47 | <span class="menu_seperator"> </span> |
---|
48 | |
---|
49 | <span class="topmenu_item" id="menu_study"> |
---|
50 | <div class="topmenu_item_label"><img src="${fam.icon( name: 'report' )}" style="vertical-align: text-bottom; display: inline-block;"/> Study<img src="${resource(dir: 'images', file: 'spinner.gif')}" class="spinner" />:</div> |
---|
51 | <div class="topmenu_item_info">no study selected</div> |
---|
52 | <img src="${fam.icon( name: 'bullet_arrow_down' )}" style="vertical-align: text-bottom; display: inline-block;"/> |
---|
53 | <div class="formulier"> |
---|
54 | <p class="info">Select a study from the list below.</p> |
---|
55 | <p style="margin-bottom: 0px;"> |
---|
56 | <g:select from="${studies}" size="10" optionKey="id" optionValue="title" name="study" onChange="changeStudy();"/> |
---|
57 | <div class="block_search"> |
---|
58 | <img src="${fam.icon( name: 'magnifier' )}" alt="search"/>: |
---|
59 | <input type="text" onKeyUp="doSearch('menu_study');" /> |
---|
60 | <img src="${fam.icon( name: 'cancel' )}" class="imgbutton" onClick="clearSearch('menu_study');" alt="clear search"/> |
---|
61 | </div> |
---|
62 | </p> |
---|
63 | </div> |
---|
64 | </span> |
---|
65 | |
---|
66 | <span class="menu_seperator"> </span> |
---|
67 | |
---|
68 | <span class="topmenu_item" id="menu_aggregation"> |
---|
69 | <span class="topmenu_item_label"><img src="${fam.icon( name: 'server_chart' )}" style="vertical-align: text-bottom; display: inline-block;"/> Aggregation:</span> |
---|
70 | <span class="topmenu_item_info">AVERAGE</span> |
---|
71 | <img src="${fam.icon( name: 'bullet_arrow_down' )}" style="vertical-align: text-bottom; display: inline-block;"/> |
---|
72 | <div class="formulier"> |
---|
73 | <p class="info">Select a way to aggregate the data.</p> |
---|
74 | <p> |
---|
75 | <select name="aggregation" size="5" onchange="$('#menu_aggregation').children('.topmenu_item_info').html($(this).val().toUpperCase()); changeVis();"> |
---|
76 | <option value="average" SELECTED>Average</option> |
---|
77 | <option value="count">Count</option> |
---|
78 | <option value="median">Median</option> |
---|
79 | <option value="none" disabled>No aggregation</option> |
---|
80 | <option value="sum">Sum</option> |
---|
81 | </select> |
---|
82 | </p> |
---|
83 | </div> |
---|
84 | </span> |
---|
85 | |
---|
86 | <span class="menu_seperator"> </span> |
---|
87 | |
---|
88 | <span class="topmenu_item" id="menu_advanced"> |
---|
89 | <span class="topmenu_item_label"><img src="${fam.icon( name: 'cog' )}" style="vertical-align: text-bottom; display: inline-block;"/> Advanced settings</span> |
---|
90 | <img src="${fam.icon( name: 'bullet_arrow_down' )}" style="vertical-align: text-bottom; display: inline-block;"/> |
---|
91 | <div class="formulier"> |
---|
92 | <table> |
---|
93 | <tr> |
---|
94 | <td><label for="autovis">Visualize the data as soon as enough parameters are known.</label></td> |
---|
95 | <td><input type="checkbox" name="autovis" id="autovis" CHECKED/></td> |
---|
96 | </tr> |
---|
97 | <tr> |
---|
98 | <td><label for="showvalues">Always show values in the graph.<br />(if this box is unchecked, value's are only shown when you hover over a datapoint. Note that hover on a barchart with value 0 isn't possible)</label></td> |
---|
99 | <td><input type="checkbox" name="showvalues" id="showvalues" CHECKED onClick="changeVis();"/></td> |
---|
100 | </tr> |
---|
101 | <tr> |
---|
102 | <td><label for="anglelabels">Angle labels on the x-axis.<br />(if this box is checked, labels are shown at a 45° angle)</label></td> |
---|
103 | <td><input type="checkbox" name="anglelabels" id="anglelabels" CHECKED onClick="changeVis();"/></td> |
---|
104 | </tr> |
---|
105 | </table> |
---|
106 | </div> |
---|
107 | </span> |
---|
108 | |
---|
109 | <span class="menu_seperator"> </span> |
---|
110 | |
---|
111 | <span class="topmenu_item" id="message_counter" onClick="; return false;"> |
---|
112 | <span class="topmenu_item_label"><img src="${fam.icon( name: 'email_error' )}" style="vertical-align: text-bottom; display: inline-block;"/> Messages:</span> |
---|
113 | <span class="topmenu_item_info">0</span> |
---|
114 | <img src="${fam.icon( name: 'bullet_arrow_down' )}" style="vertical-align: text-bottom; display: inline-block;"/> |
---|
115 | <div class="formulier"> |
---|
116 | <p class="info">Messages:</p> |
---|
117 | <div id="message_container"> |
---|
118 | <g:if test="${flash.error}"> |
---|
119 | <div class="message_box message_error"> |
---|
120 | ${flash.error.toString().encodeAsHTML()} |
---|
121 | </div> |
---|
122 | </g:if> |
---|
123 | <g:if test="${flash.message}"> |
---|
124 | <div class="message_box message_warning"> |
---|
125 | ${flash.message.toString().encodeAsHTML()} |
---|
126 | </div> |
---|
127 | </g:if> |
---|
128 | </div> |
---|
129 | </div> |
---|
130 | </span> |
---|
131 | |
---|
132 | <span class="menu_seperator"> </span> |
---|
133 | |
---|
134 | </div> |
---|
135 | |
---|
136 | <div id="bottom_container"> |
---|
137 | |
---|
138 | <div id="menu_container"> |
---|
139 | <div class="menu_item" id="menu_column"> |
---|
140 | <div class="menu_item_label">X-Axis <img src="${resource(dir: 'images', file: 'spinner.gif')}" class="spinner" /></div> |
---|
141 | <p class="info">Select a field for the X-Axis from the list below. This field will be visible as columns in the table visualization.</p> |
---|
142 | <p> |
---|
143 | <select id="columns" name="columns" size="6" onChange="changeFields('menu_column');"></select> |
---|
144 | <div class="block_search"> |
---|
145 | <img src="${fam.icon( name: 'magnifier' )}" alt="search"/>: |
---|
146 | <input type="text" onKeyUp="doSearch('menu_column');" /> |
---|
147 | <img src="${fam.icon( name: 'cancel' )}" class="imgbutton" onClick="clearSearch('menu_column');" alt="clear search"/> |
---|
148 | </div> |
---|
149 | </p> |
---|
150 | </div> |
---|
151 | <div class="menu_item" id="menu_row"> |
---|
152 | <div class="menu_item_label">Y-Axis <img src="${resource(dir: 'images', file: 'spinner.gif')}" class="spinner" /></div> |
---|
153 | <p class="info">Select a field for the Y-Axis from the list below. This field will be visible as rows in the table visualization.</p> |
---|
154 | <p> |
---|
155 | <select id="rows" name="rows" size="6" onChange="changeFields('menu_row');"></select> |
---|
156 | <div class="block_search"> |
---|
157 | <img src="${fam.icon( name: 'magnifier' )}" alt="search"/>: |
---|
158 | <input type="text" onKeyUp="doSearch('menu_row');" /> |
---|
159 | <img src="${fam.icon( name: 'cancel' )}" class="imgbutton" onClick="clearSearch('menu_row');" alt="clear search"/> |
---|
160 | </div> |
---|
161 | </p> |
---|
162 | </div> |
---|
163 | <div class="menu_item" id="menu_vis"> |
---|
164 | <div class="menu_item_label">Type <img src="${resource(dir: 'images', file: 'spinner.gif')}" class="spinner" /></div> |
---|
165 | <p class="info">Select visualization type.</p> |
---|
166 | <p> |
---|
167 | <select id="types" name="types" size="3" onChange="changeVis();"></select> |
---|
168 | </p> |
---|
169 | </div> |
---|
170 | <div class="menu_item" id="menu_go"> |
---|
171 | <button id="button_visualize" onClick="visualize(); return false;" > |
---|
172 | VISUALIZE |
---|
173 | </button> |
---|
174 | </div> |
---|
175 | </div> |
---|
176 | |
---|
177 | <div id="visualization_container"> |
---|
178 | <div id="visualization"><div style="padding: 30px">Select a study to start.</div> |
---|
179 | </div> |
---|
180 | </div> |
---|
181 | |
---|
182 | <br clear="all"/> |
---|
183 | |
---|
184 | </div> |
---|
185 | </form> |
---|
186 | </div> |
---|
187 | </body> |
---|
188 | </html> |
---|
189 | |
---|
190 | |
---|
191 | |
---|