/[projects]/dao/DaoAdresseService/src/main/webapp/admin.jsp
ViewVC logotype

Contents of /dao/DaoAdresseService/src/main/webapp/admin.jsp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2637 - (show annotations) (download)
Thu Jul 23 07:42:50 2015 UTC (8 years, 9 months ago) by torben
File size: 5816 byte(s)
remove deprecated iframe attribute
1 <%@page contentType="text/html" pageEncoding="UTF-8"%>
2
3 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
4
5 <%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
6
7 <%@ page import="dk.daoas.daoadresseservice.*" %>
8 <%@ page import="dk.daoas.daoadresseservice.beans.*" %>
9
10
11 <t:genericpage>
12
13 <jsp:body>
14
15 <script>
16
17 function refreshLoaderStatus() {
18 $.get("admin?isrunning=1", function(data) {
19 if (data == "true") {
20 $("#reloadData").text("Running")
21 .removeClass("btn-success")
22 .addClass("btn-danger")
23 .attr("disabled","disabled");
24 } else {
25 $("#reloadData").text("Not running")
26 .removeClass("btn-danger")
27 .addClass("btn-success")
28 .removeAttr("disabled");
29 }
30 });
31 }
32
33 $(document).ready( function() {
34 $("#reloadData").click(function() {
35 $.get("admin?reload=1");
36
37 $(this).text("Running")
38 .removeClass("btn-success")
39 .addClass("btn-danger")
40 .attr("disabled","disabled");
41 });
42
43 $("#dbConnectionProbe").click(function() {
44 $("#dbProbeContent").load("DbConnectionProbe");
45 });
46
47 var options = {
48 //Boolean - Whether we should show a stroke on each segment
49 segmentShowStroke : true,
50
51 //String - The colour of each segment stroke
52 segmentStrokeColor : "#fff",
53
54 //Number - The width of each segment stroke
55 segmentStrokeWidth : 2,
56
57 //Number - The percentage of the chart that we cut out of the middle
58 percentageInnerCutout : 50, // This is 0 for Pie charts
59
60 //Number - Amount of animation steps
61 animationSteps : 10,
62
63 //String - Animation easing effect
64 animationEasing : "easeOutBounce",
65
66 //Boolean - Whether we animate the rotation of the Doughnut
67 animateRotate : true,
68
69 //Boolean - Whether we animate scaling the Doughnut from the centre
70 animateScale : false,
71
72 };
73
74
75 if ( "<c:out value="${stats.direkteCount}"></c:out>" != "") {
76 var data = [
77 {
78 value: <c:out value="${stats.direkteCount}"></c:out>,
79 color: "#46BFBD", //grøn
80 highlight: "#5AD3D1",
81
82 label: "Direkte"
83 },
84 {
85 value: <c:out value="${stats.extendedCount}"></c:out>,
86 color: "#FDB45C", //gul
87 highlight: "#FFC870",
88 label: "Udvidet"
89 },
90 {
91 value: <c:out value="${stats.hundredePctCount}"></c:out>,
92 color: "#949FB1", //grey
93 highlight: "#A8B3C5",
94 label: "100%"
95 }
96 ,
97 {
98 value: <c:out value="${stats.ikkeDaekketCount}"></c:out>,
99 color:"#F7464A", //rød
100 highlight: "#FF5A5E",
101 label: "Ikke dækket"
102 }
103 ]
104
105 // Get context with jQuery - using jQuery's .get() method.
106 var ctx = $("#myChart").get(0).getContext("2d");
107 // This will get the first returned node in the jQuery collection.
108 var myNewChart = new Chart(ctx).Pie(data,options);
109
110 }
111
112
113
114
115 refreshLoaderStatus();
116 setInterval(refreshLoaderStatus, 3000 );
117
118 });
119
120
121
122 </script>
123
124
125 <div class="row">
126 <div class="col-sm-4">
127 <h3>Dækning</h3>
128
129 <c:choose>
130 <c:when test="${hasSearch}">
131 <table>
132 <tr>
133 <td>Direkte: </td>
134 <td align="right"><c:out value="${stats.direkteCount}"></c:out></td>
135 </tr>
136 <tr>
137 <td>Udvidet: </td>
138 <td align="right"><c:out value="${stats.extendedCount}"></c:out></td>
139 </tr>
140 <tr>
141 <td>100%: </td>
142 <td align="right"><c:out value="${stats.hundredePctCount}"></c:out></td>
143 </tr>
144 <tr>
145 <td>Ikke dækket: </td>
146 <td align="right">
147 <a href='CsvUdtraek?type=ikkedaekket' target='_blank'><c:out value="${stats.ikkeDaekketCount}"></c:out></a>
148 </td>
149 </tr>
150 <tr>
151 <td>Total: </td>
152 <td align="right"><c:out value="${stats.totalCount}"></c:out></td>
153 </tr>
154 </table>
155
156 <canvas id="myChart" width="150" height="150"></canvas>
157
158 </c:when>
159 <c:otherwise>
160 Data ikke læst endnu
161 </c:otherwise>
162 </c:choose>
163
164 <h3>Data</h3>
165
166 <c:choose>
167 <c:when test="${hasSearch}">
168 <table>
169 <tr>
170 <td>Indlæst: </td>
171 <td align="right"><c:out value="${stats.buildTime}"></c:out></td>
172 </tr>
173 <tr>
174 <td>Forbrugt (ms): </td>
175 <td align="right"><c:out value="${stats.elapsed}"></c:out></td>
176 </tr>
177 </table>
178
179 </c:when>
180 <c:otherwise>
181 Data ikke læst endnu
182 </c:otherwise>
183 </c:choose>
184
185 <h3>Dataloader</h3>
186 <button type="button" class="btn" id="reloadData"> awaiting status</button>
187
188 <h3>DB Connection</h3>
189 <button type="button" class="btn" id="dbConnectionProbe">Test Connection</button><br>
190 <span id="dbProbeContent"></span>
191
192 <h3>Pages</h3>
193 <ul>
194 <li><a href='CsvUdtraek'>CSV Udtr&aelig;k</a></li>
195 <li><a href='inspectData.jsp'>Inspect Data</a></li>
196 </ul>
197
198 <h3>Software</h3>
199 <table>
200 <tr>
201 <td>SVN version: </td>
202 <td align="right"><c:out value="${scmrevision}"></c:out></td>
203 </tr>
204 <tr>
205 <td>Build Time: </td>
206 <td align="right"><c:out value="${buildtime}"></c:out></td>
207 </tr>
208 </table>
209
210
211
212
213
214 </div>
215 <!-- ------------------------------------------ -->
216
217 <div class="col-sm-8">
218 <h3>Runtime options</h3>
219 <iframe src="ConfigServlet" width="100%" height="250" style="border-width: 0px;">
220 </iframe>
221
222
223 <iframe src="CircuitBreakerServlet" width="100%" height="450" style="border-width: 0px;">
224 </iframe>
225
226 </div>
227
228 </div>
229
230
231 </jsp:body>
232 </t:genericpage>

  ViewVC Help
Powered by ViewVC 1.1.20