summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorsebastian wagner2011-10-05 23:54:20 +0200
committersebastian wagner2011-10-05 23:54:20 +0200
commit978f0e4c707113ecd450cf02691c7dab42fdeb97 (patch)
tree691eb95e8fa3560f9f9f53fcbfd4689effd61070 /application
parentcategory color, getCategoryColor(), some db changes (diff)
downloadpoolctrl-978f0e4c707113ecd450cf02691c7dab42fdeb97.tar.gz
poolctrl-978f0e4c707113ecd450cf02691c7dab42fdeb97.tar.xz
poolctrl-978f0e4c707113ecd450cf02691c7dab42fdeb97.zip
some statistic changes
Diffstat (limited to 'application')
-rw-r--r--application/controllers/StatisticController.php8
-rw-r--r--application/views/scripts/statistic/index.phtml109
2 files changed, 16 insertions, 101 deletions
diff --git a/application/controllers/StatisticController.php b/application/controllers/StatisticController.php
index 92ba4bf..330e104 100644
--- a/application/controllers/StatisticController.php
+++ b/application/controllers/StatisticController.php
@@ -86,4 +86,12 @@ class StatisticController extends Zend_Controller_Action
}
+ public function categoryAction() {
+
+ }
+
+ public function runningAction() {
+
+ }
+
} \ No newline at end of file
diff --git a/application/views/scripts/statistic/index.phtml b/application/views/scripts/statistic/index.phtml
index 511c364..2585c35 100644
--- a/application/views/scripts/statistic/index.phtml
+++ b/application/views/scripts/statistic/index.phtml
@@ -1,105 +1,12 @@
-<h1>Category - Statistic</h1>
+<h1>Statistic</h1>
-<link
- rel="stylesheet" type="text/css"
- href="/media/css/jquery.jqplot.min.css" />
+<body>
-<select id="poolselectbox" name="PoolSelectbox"
- onclick="setPoolIDtmp();" onChange="fetchPoolEvents();">
- <option value="default">Please choose a Pool</option>
-</select>
+<p>Choose a statistic Type:</p>
-<script>
+<ul>
+ <li><a href='/statistic/category'>Category</a></li>
+ <li><a href='/statistic/running'>Running</a></li>
+</ul>
-var lecture = 0;
-var boot = 0;
-var shutdown = 0;
-var maintenance = 0;
-var foo;
-
-//fetch all poolevents of the selected #poolselectbox value
-function fetchPoolEvents() {
- poolID = $("#poolselectbox option:selected").val();
- plot();
-}
-
-function setPoolIDtmp() {
- poolIDtmp = $("#poolselectbox option:selected").val();
- }
-
-function plot() {
- poolID = $("#poolselectbox option:selected").val();
- $.get("/statistic/categorylist/poolID/" + poolID, function(data) {
- $.get("/statistic/colorlist/poolID/" + poolID, function(color) {
- if(data == '') {
- $( "#noEventsDialog" ).dialog('open');
- $('#plot').empty();
- } else refreshPlot(data);
- }, "json");
- }, "json");
-}
-
-function refreshPlot(data, color) {
- $('#plot').empty();
- $.jqplot('plot', data, {
- seriesDefaults: {
- //renderer: $.jqplot.PieRenderer,
- renderer: $.jqplot.BarRenderer,
- pointLabels: { show: true, edgeTolerance: -15 },
- shadowAngle: 135,
- rendererOptions: {
- //showDataLabels: true,
- barDirection: 'horizontal',
- varyBarColor : true
- }
- },
- axes: {
- yaxis: {
- renderer: $.jqplot.CategoryAxisRenderer
- },
- xaxis: {
- renderer: $.jqplot.CategoryAxisRenderer
- }
- },
- seriesColors: [ "green", "blue", "red", "yellow" ], //color,
- highlighter: { show: false }
- });
-}
-
-$(document).ready(function(){
-
- //fetch poollist from pbs database
- $.get("/event/getpoollist/", function(getpoollistresult){
- $("#poolselectbox").append(getpoollistresult);
- poolIDtmp = $("#poolselectbox option:selected").val();
- fetchPoolEvents();
- });
-});
-
-$(function() {
- $( "#noEventsDialog" ).dialog({
- autoOpen: false,
- width: 600,
- modal: true,
- title: "No Events",
- buttons: {
- "OK": function() {
- $(this).dialog("close");
- }
- },
- open: function () {
- $(".ui-dialog-titlebar-close").hide();
- //$(this).parents(".ui-dialog:first").find(".ui-dialog-titlebar").addClass("ui-state-error");
- }
- });
- });
-
-</script>
-
-<div id="plot"
- style="height: 400px; width: 700px;"></div>
-
-<!-- no events -->
-<div id="noEventsDialog" style="display: none">
-<p>There are no events in this pool to plot the statistic</p>
-</div>
+</body> \ No newline at end of file