summaryrefslogtreecommitdiffstats
path: root/application/views/scripts/statistics/success.phtml
diff options
context:
space:
mode:
authorSebastian Wagner2011-10-07 17:44:10 +0200
committerSebastian Wagner2011-10-07 17:44:10 +0200
commitbd9b37b87cc771a4b72aa7a62811eac8850bffe1 (patch)
treeba9bc0ceaf96fd051c6164f18b59f4e5ecf14290 /application/views/scripts/statistics/success.phtml
parentminor (diff)
downloadpoolctrl-bd9b37b87cc771a4b72aa7a62811eac8850bffe1.tar.gz
poolctrl-bd9b37b87cc771a4b72aa7a62811eac8850bffe1.tar.xz
poolctrl-bd9b37b87cc771a4b72aa7a62811eac8850bffe1.zip
some changes
Diffstat (limited to 'application/views/scripts/statistics/success.phtml')
-rw-r--r--application/views/scripts/statistics/success.phtml55
1 files changed, 36 insertions, 19 deletions
diff --git a/application/views/scripts/statistics/success.phtml b/application/views/scripts/statistics/success.phtml
index 5d15c73..4e67698 100644
--- a/application/views/scripts/statistics/success.phtml
+++ b/application/views/scripts/statistics/success.phtml
@@ -1,14 +1,13 @@
<h1>Statistics</h1>
-<h2>How many events were successfully?</h2>
+<h2>How many events were successful?</h2>
-<link
- rel="stylesheet" type="text/css"
- href="/media/css/jquery.jqplot.min.css" />
+<link rel="stylesheet"
+ type="text/css" href="/media/css/jquery.jqplot.min.css" />
<select id="poolselectbox" name="PoolSelectbox"
- onclick="setPoolIDtmp();" onChange="fetchPoolEvents();">
- <option value="default">Please choose a Pool</option>
- <option value="all">All Pools</option>
+ onclick="setPoolIDtmp();" onChange="fetchPoolEvents();">
+ <option value="default">Please choose a Pool</option>
+ <option value="all">All Pools</option>
</select>
<script>
@@ -29,15 +28,17 @@ function plot() {
if(data.dataBar == '0,Successful,0,Failed' && poolID != 'default') {
$( "#noEventsDialog" ).dialog('open');
$('#plotBar').empty();
- $('#plotPie').empty();
+ $('#plotPieS').empty();
+ $('#plotPieT').empty();
} else if (poolID == 'default') {
$('#plotBar').empty();
- $('#plotPie').empty();
- } else refreshPlot(data.dataBar, data.dataPie, data.color);
+ $('#plotPieS').empty();
+ $('#plotPieT').empty();
+ } else refreshPlot(data.dataBar, data.dataPieS, data.dataPieT, data.color);
}, "json");
}
-function refreshPlot(dataBar, dataPie, color) {
+function refreshPlot(dataBar, dataPieS, dataPieT, color) {
$('#plotBar').empty();
$.jqplot('plotBar', dataBar, {
seriesDefaults: {
@@ -59,8 +60,8 @@ function refreshPlot(dataBar, dataPie, color) {
seriesColors: color,
highlighter: { show: false }
});
- $('#plotPie').empty();
- $.jqplot('plotPie', dataPie,
+ $('#plotPieS').empty();
+ $.jqplot('plotPieS', dataPieS,
{
seriesDefaults: {
// Make this a pie chart.
@@ -69,13 +70,30 @@ function refreshPlot(dataBar, dataPie, color) {
// Put data labels on the pie slices.
// By default, labels show the percentage of the slice.
showDataLabels: true,
- lineLabels: true,
varyBarColor : true
}
},
seriesColors: color
//legend: { show:true, location: 'e' }
});
+ $('#plotPieT').empty();
+ $.jqplot('plotPieT', dataPieT,
+ {
+ title: 'Chart with ErrorType Labels',
+ seriesDefaults: {
+ // Make this a pie chart.
+ renderer: jQuery.jqplot.PieRenderer,
+ rendererOptions: {
+ // Put data labels on the pie slices.
+ // By default, labels show the percentage of the slice.
+ showDataLabels: true,
+ varyBarColor : true,
+ dataLabels: 'label'
+ }
+ },
+ seriesColors: color
+ //legend: { show:true, location: 'ne' }
+ });
}
$(document).ready(function(){
@@ -109,13 +127,12 @@ $(function() {
</script>
<div>
-<div id="plotBar" class="spalte"
- style="height: 300px; width: 350px;"></div>
-<div id="plotPie" class="spalte"
- style="height: 300px; width: 350px;"></div>
+<div id="plotBar" class="spalte" style="height: 300px; width: 250px;"></div>
+<div id="plotPieS" class="spalte" style="height: 300px; width: 250px;"></div>
+<div id="plotPieT" class="spalte" style="height: 300px; width: 250px;"></div>
</div>
<!-- no events -->
<div id="noEventsDialog" style="display: none">
<p>There are no events in this pool to plot a statistic.</p>
-</div> \ No newline at end of file
+</div>