Index: trunk/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApp/status/status.cshtml
===================================================================
--- trunk/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApp/status/status.cshtml	(revision 12428)
+++ trunk/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApp/status/status.cshtml	(revision 12435)
@@ -11,122 +11,233 @@
 
 <div class="default-view-container">
-    <div class="row">
-        <div class="col-lg-3 col-md-6">
-            <div class="panel panel-default">
-                <div class="panel-heading">
-                    <h3 class="panel-title">Cores</h3>
-                </div>
-                <div class="panel-body">
-                    <center>
-                        <knob knob-data="core.knobData" knob-options="knobOptions"></knob>
-                    </center>
-                    <p>Total Cores: {{status.CoreStatus.TotalCores}}</p>
-                    <p>Used Cores: {{status.CoreStatus.TotalCores - status.CoreStatus.FreeCores}}</p>
-                </div>
-            </div>
-        </div>
-
-        <div class="col-lg-3 col-md-6">
-            <div class="panel panel-default">
-                <div class="panel-heading">
-                    <h3 class="panel-title">CPU Utilization</h3>
-                </div>
-                <div class="panel-body">
-                    <center>
-                        <knob knob-data="cpu.knobData" knob-options="knobOptions"></knob>
-                    </center>
-                    <p>Total Utilization: {{status.CpuUtilizationStatus.TotalCpuUtilization}} %</p>
-                    <p>Used Utilization: {{status.CpuUtilizationStatus.UsedCpuUtilization}} %</p>
-                </div>
-            </div>
-        </div>
-
-        <div class="col-lg-3 col-md-6">
-            <div class="panel panel-default">
-                <div class="panel-heading">
-                    <h3 class="panel-title">Memory</h3>
-                </div>
-                <div class="panel-body">
-                    <center>
-                        <knob knob-data="memory.knobData" knob-options="knobOptions"></knob>
-                    </center>
-                    <p>TotalMemory: {{status.MemoryStatus.TotalMemory}} GB</p>
-                    <p>UsedMemory: {{status.MemoryStatus.TotalMemory - status.MemoryStatus.FreeMemory}} GB</p>
-                </div>
-            </div>
-        </div>
-
-        <div class="col-lg-3 col-md-6">
-            <div class="panel panel-default">
-                <div class="panel-heading">
-                    <h3 class="panel-title">Tasks</h3>
-                </div>
-                <div class="panel-body">
-                    <p>Total: {{tasks.WaitingTasks + tasks.CalculatingTasks}}</p>
-                    <p>Waiting: {{tasks.WaitingTasks}}</p>
-                    <p>Calculating: {{tasks.CalculatingTasks}}</p>
-                </div>
-            </div>
-        </div>
-    </div>
-
-    <div class="row">
-        <div class="col-lg-12">
-            <div class="panel panel-default">
-                <div class="panel-heading">
-                    <h3 class="panel-title">CPU Utilization Chart</h3>
-                </div>
-                <div class="panel-body">
-                    <flot dataset="cpu.series" options="chartOptions"></flot>
-                </div>
-            </div>
-        </div>
-    </div>
-
-    <div class="row">
-        <div class="col-lg-12">
-            <div class="panel panel-default">
-                <div class="panel-heading">
-                    <h3 class="panel-title">Core Chart</h3>
-                </div>
-                <div class="panel-body">
-                    <flot dataset="core.series" options="fillChartOptions"></flot>
-                </div>
-            </div>
-        </div>
-    </div>
-
-    <div class="row">
-        <div class="col-lg-12">
-            <div class="panel panel-default">
-                <div class="panel-heading">
-                    <h3 class="panel-title">Memory Chart</h3>
-                </div>
-                <div class="panel-body">
-                    <flot dataset="memory.series" options="fillChartOptions"></flot>
-                </div>
-            </div>
-        </div>
-    </div>
-
-    <div class="row">
-        <div class="col-lg-12">
-            <div class="panel panel-default">
-                <div class="panel-heading">
-                    <h3 class="panel-title">Tasks by User</h3>
-                </div>
+<div class="row">
+    <div class="col-lg-3 col-md-6">
+        <div class="panel panel-default">
+            <div class="panel-heading">
+                <h3 class="panel-title">Cores</h3>
+            </div>
+            <div class="panel-body">
+                <div class="text-center">
+                    <knob knob-data="core.knobData" knob-options="knobOptions"></knob>
+                </div>
+                <table class="table table-no-border table-condensed table-auto-width table-content">
+                    <tr data-toggle="tooltip" data-placement="bottom" title="All online slaves">
+                        <td class="text-left">
+                            Total:
+                        </td>
+                        <td class="text-right">{{status.CoreStatus.TotalCores | number}}</td>
+                    </tr>
+                    <tr data-toggle="tooltip" data-placement="bottom" title="All calculating and idle slaves that are allowed to calculate">
+                        <td class="text-left">Active:</td>
+                        <td class="text-right">{{status.CoreStatus.ActiveCores | number}}</td>
+                    </tr>
+                    <tr data-toggle="tooltip" data-placement="bottom" title="All calculating slaves that are allowed to calculate">
+                        <td class="text-left">Calculating:</td>
+                        <td class="text-right">{{status.CoreStatus.CalculatingCores | number}}</td>
+                    </tr>
+                </table>
+            </div>
+        </div>
+    </div>
+
+    <div class="col-lg-3 col-md-6">
+        <div class="panel panel-default">
+            <div class="panel-heading">
+                <h3 class="panel-title">CPU Utilization</h3>
+            </div>
+            <div class="panel-body">
+                <div class="text-center">
+                    <knob knob-data="cpu.knobData" knob-options="knobOptions"></knob>
+                </div>
+                <table class="table table-no-border table-condensed table-auto-width table-content">
+                    <tr data-toggle="tooltip" data-placement="bottom" title="All online slaves">
+                        <td class="text-left">Total:</td>
+                        <td class="text-right">{{status.CpuUtilizationStatus.TotalCpuUtilization | number: 2}} %</td>
+                    </tr>
+                    <tr data-toggle="tooltip" data-placement="bottom" title="All calculating and idle slaves that are allowed to calculate">
+                        <td class="text-left">Active:</td>
+                        <td class="text-right">{{status.CpuUtilizationStatus.ActiveCpuUtilization | number: 2}} %</td>
+                    </tr>
+                    <tr data-toggle="tooltip" data-placement="bottom" title="All calculating slaves that are allowed to calculate">
+                        <td class="text-left">Calculating:</td>
+                        <td class="text-right">{{status.CpuUtilizationStatus.CalculatingCpuUtilization | number: 2}} %</td>
+                    </tr>
+                </table>
+            </div>
+        </div>
+    </div>
+
+    <div class="col-lg-3 col-md-6">
+        <div class="panel panel-default">
+            <div class="panel-heading">
+                <h3 class="panel-title">Memory</h3>
+            </div>
+            <div class="panel-body">
+                <div class="text-center">
+                    <knob knob-data="memory.knobData" knob-options="knobOptions"></knob>
+                </div>
+                <table class="table table-no-border table-condensed table-auto-width table-content">
+                    <tr data-toggle="tooltip" data-placement="bottom" title="All online slaves">
+                        <td class="text-left">Total:</td>
+                        <td class="text-right">{{status.MemoryStatus.TotalMemory | number}} GB</td>
+                    </tr>
+                    <tr data-toggle="tooltip" data-placement="bottom" title="All calculating and idle slaves that are allowed to calculate">
+                        <td class="text-left">Active:</td>
+                        <td class="text-right">{{status.MemoryStatus.ActiveMemory | number}} GB</td>
+                    </tr>
+                    <tr data-toggle="tooltip" data-placement="bottom" title="All calculating slaves that are allowed to calculate">
+                        <td class="text-left">Calculating:</td>
+                        <td class="text-right">{{status.MemoryStatus.UsedMemory | number}} GB</td>
+                    </tr>
+                </table>
+            </div>
+        </div>
+    </div>
+
+    <div class="col-lg-3 col-md-6">
+        <div class="panel panel-default">
+            <div class="panel-heading">
+                <h3 class="panel-title">Tasks</h3>
+            </div>
+            <div class="panel-body">
+                <table class="table table-no-border table-condensed table-auto-width table-content">
+                    <tr>
+                        <td class="text-left">Total:</td>
+                        <td class="text-right">{{tasks.WaitingTasks + tasks.CalculatingTasks | number}}</td>
+                    </tr>
+                    <tr>
+                        <td class="text-left">Waiting:</td>
+                        <td class="text-right">{{tasks.WaitingTasks | number}}</td>
+                    </tr>
+                    <tr>
+                        <td class="text-left">Calculating:</td>
+                        <td class="text-right">{{tasks.CalculatingTasks | number}}</td>
+                    </tr>
+                </table>
+            </div>
+        </div>
+    </div>
+</div>
+
+<div class="row">
+    <div class="col-lg-12">
+        <div class="panel panel-default">
+            <div class="panel-heading">
+                <h3 class="panel-title">CPU Utilization Chart</h3>
+            </div>
+            <div class="panel-body">
+                <flot dataset="cpu.series" options="chartOptions"></flot>
+            </div>
+        </div>
+    </div>
+</div>
+
+<div class="row">
+    <div class="col-lg-12">
+        <div class="panel panel-default">
+            <div class="panel-heading">
+                <h3 class="panel-title">Core Chart</h3>
+            </div>
+            <div class="panel-body">
+                <flot dataset="core.series" options="fillChartOptions"></flot>
+            </div>
+        </div>
+    </div>
+</div>
+
+<div class="row">
+    <div class="col-lg-12">
+        <div class="panel panel-default">
+            <div class="panel-heading">
+                <h3 class="panel-title">Memory Chart</h3>
+            </div>
+            <div class="panel-body">
+                <flot dataset="memory.series" options="fillChartOptions"></flot>
+            </div>
+        </div>
+    </div>
+</div>
+
+<div class="row">
+    <div class="col-lg-12">
+        <div class="panel panel-default">
+            <div class="panel-heading">
+                <h3 class="panel-title">Tasks by User</h3>
+            </div>
+            <div class="panel-body">
+                <table class="table table-hover">
+                    <thead>
+                    <tr>
+                        <th>Username</th>
+                        <th>Calculating Tasks</th>
+                        <th>Waiting Tasks</th>
+                    </tr>
+                    </thead>
+                    <tr ng-repeat="task in status.TasksStatus">
+                        <td>{{task.User.Name}}</td>
+                        <td>{{task.CalculatingTasks | number}}</td>
+                        <td>{{task.WaitingTasks | number}}</td>
+                    </tr>
+                    <tr ng-hide="status.TasksStatus.length">
+                        <td colspan="3" class="text-center">
+                            There are no waiting or calculating tasks available!
+                        </td>
+                    </tr>
+                </table>
+            </div>
+        </div>
+    </div>
+</div>
+
+<div class="row">
+    <div class="col-lg-12">
+        <div class="panel panel-default">
+            <div class="panel-heading">
+                <h3 class="panel-title">
+                    <a data-toggle="collapse" data-target="#collapseActiveCalculatingSlaves"
+                       ng-href="#/status">
+                        Active Calculating Slaves
+                    </a>
+                </h3>
+            </div>
+            <div id="collapseActiveCalculatingSlaves"
+                 class="panel-collapse collapse in">
                 <div class="panel-body">
                     <table class="table table-hover">
                         <thead>
-                            <tr>
-                                <th>Username</th>
-                                <th>Calculating Tasks</th>
-                                <th>Waiting Tasks</th>
-                            </tr>
+                        <tr>
+                            <th ng-click="activeCalculatingSlavesOrderColumn='Slave.Name';
+                                                  activeCalculatingSlavesReverseSort=!activeCalculatingSlavesReverseSort">
+                                Slave
+                            </th>
+                            <th ng-click="activeCalculatingSlavesOrderColumn='CpuUtilization';
+                                                  activeCalculatingSlavesReverseSort=!activeCalculatingSlavesReverseSort">
+                                CPU Utilization
+                            </th>
+                            <th ng-click="activeCalculatingSlavesOrderColumn='Cores';
+                                                  activeCalculatingSlavesReverseSort=!activeCalculatingSlavesReverseSort">
+                                Cores
+                            </th>
+                            <th ng-click="activeCalculatingSlavesOrderColumn='Memory';
+                                                  activeCalculatingSlavesReverseSort=!activeCalculatingSlavesReverseSort">
+                                Memory
+                            </th>
+                        </tr>
                         </thead>
-                        <tr ng-repeat="task in status.TasksStatus">
-                            <td>{{task.User.Name}}</td>
-                            <td>{{task.CalculatingTasks}}</td>
-                            <td>{{task.WaitingTasks}}</td>
+                        <tr ng-repeat="slave in activeCalculatingSlaves = (status.SlavesStatus
+                                | filter: {
+                                    IsAllowedToCalculate: true,
+                                    State: 'Calculating'
+                                  }
+                                | orderBy: activeCalculatingSlavesOrderColumn:activeCalculatingSlavesReverseSort)">
+                            <td>{{slave.Slave.Name}}</td>
+                            <td>{{slave.CpuUtilization | number: 2}} %</td>
+                            <td>{{slave.Cores | number}}</td>
+                            <td>{{slave.Memory | number}} GB</td>
+                        </tr>
+                        <tr ng-hide="activeCalculatingSlaves.length">
+                            <td colspan="4" class="text-center">
+                                There are no active calculating slaves available!
+                            </td>
                         </tr>
                     </table>
@@ -135,22 +246,56 @@
         </div>
     </div>
-
-    <div class="row">
-        <div class="col-lg-12">
-            <div class="panel panel-default">
-                <div class="panel-heading">
-                    <h3 class="panel-title">CPU Utilization by Slave</h3>
-                </div>
+</div>
+
+<div class="row">
+    <div class="col-lg-12">
+        <div class="panel panel-default">
+            <div class="panel-heading">
+                <h3 class="panel-title">
+                    <a data-toggle="collapse" data-target="#collapseActiveIdleSlaves"
+                       ng-href="#/status" class="collapsed">
+                        Active Idle Slaves
+                    </a>
+                </h3>
+            </div>
+            <div id="collapseActiveIdleSlaves"
+                 class="panel-collapse collapse">
                 <div class="panel-body">
                     <table class="table table-hover">
                         <thead>
-                            <tr>
-                                <th>Slave</th>
-                                <th>CPU Utilization</th>
-                            </tr>
+                        <tr>
+                            <th ng-click="activeIdleSlavesOrderColumn='Slave.Name';
+                                                  activeIdleSlavesReverseSort=!activeIdleSlavesReverseSort">
+                                Slave
+                            </th>
+                            <th ng-click="activeIdleSlavesOrderColumn='CpuUtilization';
+                                                  activeIdleSlavesReverseSort=!activeIdleSlavesReverseSort">
+                                CPU Utilization
+                            </th>
+                            <th ng-click="activeIdleSlavesOrderColumn='Cores';
+                                                  activeIdleSlavesReverseSort=!activeIdleSlavesReverseSort">
+                                Cores
+                            </th>
+                            <th ng-click="activeIdleSlavesOrderColumn='Memory';
+                                                  activeIdleSlavesReverseSort=!activeIdleSlavesReverseSort">
+                                Memory
+                            </th>
+                        </tr>
                         </thead>
-                        <tr ng-repeat="slave in status.SlavesCpuStatus">
+                        <tr ng-repeat="slave in activeIdleSlaves = (status.SlavesStatus
+                                | filter: {
+                                    IsAllowedToCalculate: true,
+                                    State: 'Idle'
+                                  }
+                                | orderBy: activeIdleSlavesOrderColumn:activeIdleSlavesReverseSort)">
                             <td>{{slave.Slave.Name}}</td>
-                            <td>{{slave.CpuUtilization}} %</td>
+                            <td>{{slave.CpuUtilization | number: 2}} %</td>
+                            <td>{{slave.Cores | number}}</td>
+                            <td>{{slave.Memory | number}} GB</td>
+                        </tr>
+                        <tr ng-hide="activeIdleSlaves.length">
+                            <td colspan="4" class="text-center">
+                            There are no active idle slaves available!
+                            <td>
                         </tr>
                     </table>
@@ -160,2 +305,64 @@
     </div>
 </div>
+
+<div class="row">
+    <div class="col-lg-12">
+        <div class="panel panel-default">
+            <div class="panel-heading">
+                <h3 class="panel-title">
+                    <a data-toggle="collapse" data-target="#collapseInactiveSlaves"
+                       ng-href="#/status" class="collapsed">
+                        Inactive Slaves
+                    </a>
+                </h3>
+            </div>
+            <div id="collapseInactiveSlaves"
+                 class="panel-collapse collapse">
+                <div class="panel-body">
+                    <table class="table table-hover">
+                        <thead>
+                        <tr>
+                            <th ng-click="inactiveSlavesOrderColumn='Slave.Name';
+                                                  inactiveSlavesReverseSort=!inactiveSlavesReverseSort">
+                                Slave
+                            </th>
+                            <th ng-click="inactiveSlavesOrderColumn='CpuUtilization';
+                                                  inactiveSlavesReverseSort=!inactiveSlavesReverseSort">
+                                CPU Utilization
+                            </th>
+                            <th ng-click="inactiveSlavesOrderColumn='Cores';
+                                                  inactiveSlavesReverseSort=!inactiveSlavesReverseSort">
+                                Cores
+                            </th>
+                            <th ng-click="inactiveSlavesOrderColumn='Memory';
+                                                  inactiveSlavesReverseSort=!inactiveSlavesReverseSort">
+                                Memory
+                            </th>
+                        </tr>
+                        </thead>
+                        <tr ng-repeat="slave in inactiveSlaves = (status.SlavesStatus
+                                | filter: {
+                                    IsAllowedToCalculate: false
+                                  }
+                                | orderBy: inactiveSlavesOrderColumn:inactiveSlavesReverseSort)">
+                            <td>{{slave.Slave.Name}}</td>
+                            <td>{{slave.CpuUtilization | number: 2}} %</td>
+                            <td>{{slave.Cores | number}}</td>
+                            <td>{{slave.Memory | number}} GB</td>
+                        </tr>
+                        <tr ng-hide="inactiveSlaves.length">
+                            <td colspan="4" class="text-center">No inactive slaves available!</td>
+                        </tr>
+                    </table>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+</div>
+
+<script>
+    $(document).ready(function () {
+        $('[data-toggle="tooltip"]').tooltip();
+    });
+</script>
Index: trunk/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApp/status/statusCtrl.js
===================================================================
--- trunk/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApp/status/statusCtrl.js	(revision 12428)
+++ trunk/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApp/status/statusCtrl.js	(revision 12435)
@@ -53,4 +53,7 @@
                     mode: "time",
                     twelveHourClock: false
+                },
+                yaxis: {
+                    min: 0
                 }
             };
@@ -82,7 +85,23 @@
             };
 
+            $scope.activeIdleSlaveFilter = function (slave) {
+                return (slave.IsAllowedToCalculate == true) && (slave.State == 'Idle');
+            };
+
+            $scope.activeCalculatingSlavesReverseSort = false;
+            $scope.activeCalculatingSlavesOrderColumn = 'slave.Slave.Name';
+
+            $scope.activeIdleSlavesReverseSort = false;
+            $scope.activeIdleSlavesOrderColumn = 'slave.Slave.Name';
+
+            $scope.inactiveSlavesReverseSort = false;
+            $scope.inactiveSlavesOrderColumn = 'slave.Slave.Name';
+
+
             var updateStatus = function () {
                 // update status data
                 dataService.getStatus({}, function (status) {
+                    var oneDayInMs = 24 * 60 * 60 * 1000;
+                    var today = new Date().getTime() - oneDayInMs;
                     // raw status data
                     $scope.status = status;
@@ -96,29 +115,35 @@
                     }
                     // knobs
-                    $scope.cpu.knobData = Math.round(status.CpuUtilizationStatus.UsedCpuUtilization);
-                    var usedCores = status.CoreStatus.TotalCores - status.CoreStatus.FreeCores;
-                    $scope.core.knobData = Math.round(usedCores / status.CoreStatus.TotalCores * 100);
-                    var usedMemory = status.MemoryStatus.TotalMemory - status.MemoryStatus.FreeMemory;
-                    $scope.memory.knobData = Math.round(usedMemory / status.MemoryStatus.TotalMemory * 100);
+                    $scope.cpu.knobData = Math.round(status.CpuUtilizationStatus.ActiveCpuUtilization);
+                    $scope.core.knobData = Math.round(status.CoreStatus.CalculatingCores / status.CoreStatus.ActiveCores * 100);
+                    $scope.memory.knobData = Math.round(status.MemoryStatus.UsedMemory / status.MemoryStatus.ActiveMemory * 100);
                     // chart series
                     var cpuSeries = $scope.cpu.series[0].data.splice(0);
-                    if (cpuSeries.length > 2) {
-                        cpuSeries.splice(0, 1);
-                    }
                     var coreSeries = [$scope.core.series[0].data, $scope.core.series[1].data];
-                    if (coreSeries[0].length > 2) {
-                        coreSeries[0].splice(0, 1);
-                    }
-                    if (coreSeries[1].length > 2) {
-                        coreSeries[1].splice(0, 1);
-                    }
                     var memorySeries = [$scope.memory.series[0].data, $scope.memory.series[1].data];
-                    if (memorySeries[0].length > 2) {
-                        memorySeries[0].splice(0, 1);
-                    }
-                    if (memorySeries[1].length > 2) {
-                        memorySeries[1].splice(0, 1);
+                    if ($scope.status.Timestamp < today) {
+                        if (cpuSeries.length > 2) {
+                            cpuSeries.splice(0, 1);
+                        }
+                        if (coreSeries[0].length > 2) {
+                            coreSeries[0].splice(0, 1);
+                        }
+                        if (coreSeries[1].length > 2) {
+                            coreSeries[1].splice(0, 1);
+                        }
+                        if (memorySeries[0].length > 2) {
+                            memorySeries[0].splice(0, 1);
+                        }
+                        if (memorySeries[1].length > 2) {
+                            memorySeries[1].splice(0, 1);
+                        }
                     }
                     cpuSeries.push([$scope.status.Timestamp, $scope.cpu.knobData]);
+
+                    // charts are currently filled with old total/used data
+                    // start temporary
+                    var usedCores = status.CoreStatus.TotalCores - status.getCoreStatus.FreeCores;
+                    var usedMemory = status.MemoryStatus.TotalMemory - status.MemoryStatus.FreeMemory;
+                    // end temporary
                     coreSeries[0].push([$scope.status.Timestamp, status.CoreStatus.TotalCores]);
                     coreSeries[1].push([$scope.status.Timestamp, usedCores]);
@@ -149,12 +174,10 @@
                     for (var i = 0; i < noOfStatus; ++i) {
                         var curStatus = status[i];
-                        var cpuData = Math.round(curStatus.CpuUtilizationStatus.UsedCpuUtilization);
-                        var usedCores = curStatus.CoreStatus.TotalCores - curStatus.CoreStatus.FreeCores;
-                        var usedMemory = curStatus.MemoryStatus.TotalMemory - curStatus.MemoryStatus.FreeMemory;
+                        var cpuData = Math.round(curStatus.CpuUtilizationStatus.ActiveCpuUtilization);
                         cpuSeries.push([curStatus.Timestamp, cpuData]);
-                        coreSeries[0].push([curStatus.Timestamp, curStatus.CoreStatus.TotalCores]);
-                        coreSeries[1].push([curStatus.Timestamp, usedCores]);
-                        memorySeries[0].push([curStatus.Timestamp, curStatus.MemoryStatus.TotalMemory]);
-                        memorySeries[1].push([curStatus.Timestamp, usedMemory]);
+                        coreSeries[0].push([curStatus.Timestamp, curStatus.CoreStatus.ActiveCores]);
+                        coreSeries[1].push([curStatus.Timestamp, curStatus.CoreStatus.CalculatingCores]);
+                        memorySeries[0].push([curStatus.Timestamp, curStatus.MemoryStatus.ActiveMemory]);
+                        memorySeries[1].push([curStatus.Timestamp, curStatus.MemoryStatus.UsedMemory]);
                     }
                     $scope.cpu.series = [{ data: cpuSeries, label: "&nbsp;CPU Utilization", color: "#f7921d" }];
