summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Wagner2011-11-14 15:26:53 +0100
committerSebastian Wagner2011-11-14 15:26:53 +0100
commit3519d87e69137c7d7a33295371e0715bae61cbe3 (patch)
treee13a07c25c72606c2cd4a0e27a1aa68d05b63c2f
parentdelete some unused js files (diff)
downloadpoolctrl-3519d87e69137c7d7a33295371e0715bae61cbe3.tar.gz
poolctrl-3519d87e69137c7d7a33295371e0715bae61cbe3.tar.xz
poolctrl-3519d87e69137c7d7a33295371e0715bae61cbe3.zip
some clean up
-rwxr-xr-xapplication/controllers/StatisticsController.php1
-rwxr-xr-xapplication/models/EventreportMapper.php39
-rwxr-xr-xapplication/views/scripts/statistics/category.phtml3
-rwxr-xr-xapplication/views/scripts/statistics/running.phtml14
-rwxr-xr-xapplication/views/scripts/statistics/success.phtml38
-rwxr-xr-xapplication/views/scripts/statistics/type.phtml14
6 files changed, 15 insertions, 94 deletions
diff --git a/application/controllers/StatisticsController.php b/application/controllers/StatisticsController.php
index 7416ec5..1a38423 100755
--- a/application/controllers/StatisticsController.php
+++ b/application/controllers/StatisticsController.php
@@ -104,7 +104,6 @@ class StatisticsController extends Zend_Controller_Action
$ret['dataBar'] = $this->eventreportMapper->getSuccessBarCount($poolID);
$ret['dataPieS'] = $this->eventreportMapper->getSuccessPieCount($poolID);
- $ret['dataPieT'] = $this->eventreportMapper->getSuccessTypePieCount($poolID);
echo json_encode($ret);
diff --git a/application/models/EventreportMapper.php b/application/models/EventreportMapper.php
index 11dacbc..da37e66 100755
--- a/application/models/EventreportMapper.php
+++ b/application/models/EventreportMapper.php
@@ -235,43 +235,6 @@ class Application_Model_EventreportMapper
return $return;
}
-
- public function getSuccessTypePieCount($poolID) {
-
- $db = Zend_Db_Table::getDefaultAdapter();
- if($poolID != 'all'){
- $select = $this->getDbTable()->select()
- ->setIntegrityCheck(false)
- ->from(array('pcr' => 'poolctrl_eventreport'),
- array('errortype' => 'pcr.errors', 'count' => 'COUNT(*)'))
- ->join(array('pce' => 'poolctrl_event'),
- 'pce.eventID = pcr.eventID',
- array())
- ->where('pce.pbs_poolID = ?', $poolID)
- ->group('pcr.errors')
- ->order('pce.category ASC');}
- else {
- $select = $this->getDbTable()->select()
- ->setIntegrityCheck(false)
- ->from(array('pcr' => 'poolctrl_eventreport'),
- array('errortype' => 'pcr.errors', 'count' => 'COUNT(*)'))
- ->join(array('pce' => 'poolctrl_event'),
- 'pce.eventID = pcr.eventID',
- array())
- ->group('pcr.errors')
- ->order('pce.category ASC');
- }
-
- $stmt = $db->query($select);
- $result = $stmt->fetchAll(PDO::FETCH_NUM);
- $ret = null;
-
- foreach ($result as $r) {
- $ret[] = array($r[0], (int)$r[1]);
- }
-
- return array($ret);
- }
-
+
}
diff --git a/application/views/scripts/statistics/category.phtml b/application/views/scripts/statistics/category.phtml
index 5d62170..8319d20 100755
--- a/application/views/scripts/statistics/category.phtml
+++ b/application/views/scripts/statistics/category.phtml
@@ -41,12 +41,10 @@ function refreshPlot(dataBar, dataPie, color) {
$('#plotBar').empty();
$.jqplot('plotBar', dataBar, {
seriesDefaults: {
- //renderer: $.jqplot.PieRenderer,
renderer:$.jqplot.BarRenderer,
pointLabels: { show: true, location: 'e', edgeTolerance: -15 },
shadowAngle: 135,
rendererOptions: {
- //showDataLabels: true,
barDirection: 'horizontal',
varyBarColor : true
}
@@ -73,7 +71,6 @@ function refreshPlot(dataBar, dataPie, color) {
}
},
seriesColors: color
- //legend: { show:true, location: 'e' }
});
}
diff --git a/application/views/scripts/statistics/running.phtml b/application/views/scripts/statistics/running.phtml
index 44a07aa..7bf27b8 100755
--- a/application/views/scripts/statistics/running.phtml
+++ b/application/views/scripts/statistics/running.phtml
@@ -33,20 +33,18 @@ function plot() {
} else if (poolID == 'default') {
$('#plotBar').empty();
$('#plotPie').empty();
- } else refreshPlot(data.dataBar, data.dataPie, data.color);
+ } else refreshPlot(data.dataBar, data.dataPie);
}, "json");
}
-function refreshPlot(dataBar, dataPie, color) {
+function refreshPlot(dataBar, dataPie) {
$('#plotBar').empty();
$.jqplot('plotBar', dataBar, {
seriesDefaults: {
- //renderer: $.jqplot.PieRenderer,
renderer:$.jqplot.BarRenderer,
pointLabels: { show: true, location: 'e', edgeTolerance: -15 },
shadowAngle: 135,
rendererOptions: {
- //showDataLabels: true,
barDirection: 'horizontal',
varyBarColor : true
}
@@ -55,9 +53,7 @@ function refreshPlot(dataBar, dataPie, color) {
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer
}
- },
- seriesColors: color,
- highlighter: { show: false }
+ }
});
$('#plotPie').empty();
$.jqplot('plotPie', dataPie,
@@ -72,9 +68,7 @@ function refreshPlot(dataBar, dataPie, color) {
lineLabels: true,
varyBarColor : true
}
- },
- seriesColors: color
- //legend: { show:true, location: 'e' }
+ }
});
}
diff --git a/application/views/scripts/statistics/success.phtml b/application/views/scripts/statistics/success.phtml
index 8911033..e00a01d 100755
--- a/application/views/scripts/statistics/success.phtml
+++ b/application/views/scripts/statistics/success.phtml
@@ -29,16 +29,14 @@ function plot() {
$( "#noEventsDialog" ).dialog('open');
$('#plotBar').empty();
$('#plotPieS').empty();
- $('#plotPieT').empty();
} else if (poolID == 'default') {
$('#plotBar').empty();
$('#plotPieS').empty();
- $('#plotPieT').empty();
- } else refreshPlot(data.dataBar, data.dataPieS, data.dataPieT, data.color);
+ } else refreshPlot(data.dataBar, data.dataPieS, data.dataPieT);
}, "json");
}
-function refreshPlot(dataBar, dataPieS, dataPieT, color) {
+function refreshPlot(dataBar, dataPieS, dataPieT) {
$('#plotBar').empty();
$.jqplot('plotBar', dataBar, {
seriesDefaults: {
@@ -47,7 +45,6 @@ function refreshPlot(dataBar, dataPieS, dataPieT, color) {
pointLabels: { show: true, location: 'e', edgeTolerance: -15 },
shadowAngle: 135,
rendererOptions: {
- //showDataLabels: true,
barDirection: 'horizontal',
varyBarColor : true
}
@@ -56,9 +53,7 @@ function refreshPlot(dataBar, dataPieS, dataPieT, color) {
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer
}
- },
- seriesColors: color,
- highlighter: { show: false }
+ }
});
$('#plotPieS').empty();
$.jqplot('plotPieS', dataPieS,
@@ -72,28 +67,8 @@ function refreshPlot(dataBar, dataPieS, dataPieT, color) {
showDataLabels: 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: 'percent'
- }
- },
- seriesColors: color
- //legend: { show:true, location: 'ne' }
- });*/
}
$(document).ready(function(){
@@ -127,9 +102,8 @@ $(function() {
</script>
<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 id="plotBar" class="spalte" style="height: 300px; width: 350px;"></div>
+<div id="plotPieS" class="spalte" style="height: 300px; width: 350px;"></div>
</div>
<!-- no events -->
diff --git a/application/views/scripts/statistics/type.phtml b/application/views/scripts/statistics/type.phtml
index 2677f4e..a34eb2b 100755
--- a/application/views/scripts/statistics/type.phtml
+++ b/application/views/scripts/statistics/type.phtml
@@ -33,20 +33,18 @@ function plot() {
} else if (poolID == 'default') {
$('#plotBar').empty();
$('#plotPie').empty();
- } else refreshPlot(data.dataBar, data.dataPie, data.color);
+ } else refreshPlot(data.dataBar, data.dataPie);
}, "json");
}
-function refreshPlot(dataBar, dataPie, color) {
+function refreshPlot(dataBar, dataPie) {
$('#plotBar').empty();
$.jqplot('plotBar', dataBar, {
seriesDefaults: {
- //renderer: $.jqplot.PieRenderer,
renderer:$.jqplot.BarRenderer,
pointLabels: { show: true, location: 'e', edgeTolerance: -15 },
shadowAngle: 135,
rendererOptions: {
- //showDataLabels: true,
barDirection: 'horizontal',
varyBarColor : true
}
@@ -55,9 +53,7 @@ function refreshPlot(dataBar, dataPie, color) {
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer
}
- },
- seriesColors: color,
- highlighter: { show: false }
+ }
});
$('#plotPie').empty();
$.jqplot('plotPie', dataPie,
@@ -72,9 +68,7 @@ function refreshPlot(dataBar, dataPie, color) {
lineLabels: true,
varyBarColor : true
}
- },
- seriesColors: color
- //legend: { show:true, location: 'e' }
+ }
});
}