Skip to content
Snippets Groups Projects
Commit 44f2707f authored by Erik Reid's avatar Erik Reid
Browse files

added toggling for warning/error/pending rows

parent da6d3f2f
No related branches found
No related tags found
No related merge requests found
...@@ -33,9 +33,12 @@ ...@@ -33,9 +33,12 @@
<span class="grid-item" ng-show="errors.length"> <span class="grid-item" ng-show="errors.length">
<table class="table table-striped" summary="error messages"> <table class="table table-striped" summary="error messages">
<tr> <tr>
<th scope="col">errorss</th> <th>
<button ng-click="show_errors=!show_errors">{{show_errors ? "hide" : "show"}}</button>
</th>
<th scope="col">errors</th>
</tr> </tr>
<tr ng-repeat="description in errors"> <tr ng-if="show_errors" ng-repeat="description in errors">
<td>{{ description }}</td> <td>{{ description }}</td>
</tr> </tr>
</table> </table>
...@@ -44,9 +47,13 @@ ...@@ -44,9 +47,13 @@
<span class="grid-item" ng-show="warnings.length"> <span class="grid-item" ng-show="warnings.length">
<table class="table table-striped" summary="warning messages"> <table class="table table-striped" summary="warning messages">
<tr> <tr>
<th>
<button ng-click="show_warnings=!show_warnings">{{show_warnings ? "hide" : "show"}}</button>
</th>
<th scope="col">warnings</th> <th scope="col">warnings</th>
</tr> </tr>
<tr ng-repeat="description in warnings"> <tr ng-if="show_warnings" ng-repeat="description in warnings">
<td></td>
<td>{{ description }}</td> <td>{{ description }}</td>
</tr> </tr>
</table> </table>
...@@ -55,9 +62,12 @@ ...@@ -55,9 +62,12 @@
<span class="grid-item" ng-show="pending.length"> <span class="grid-item" ng-show="pending.length">
<table class="table table-striped" summary="pending tasks"> <table class="table table-striped" summary="pending tasks">
<tr> <tr>
<th>
<button ng-click="show_pending=!show_pending">{{show_pending ? "hide" : "show"}}</button>
</th>
<th scope="col">pending tasks</th> <th scope="col">pending tasks</th>
</tr> </tr>
<tr ng-repeat="description in pending"> <tr ng-if="show_pending" ng-repeat="description in pending">
<td>{{ description }}</td> <td>{{ description }}</td>
</tr> </tr>
</table> </table>
......
...@@ -14,6 +14,10 @@ myApp.controller('update', function($scope, $http, $timeout) { ...@@ -14,6 +14,10 @@ myApp.controller('update', function($scope, $http, $timeout) {
$scope.errors = []; $scope.errors = [];
$scope.warnings = []; $scope.warnings = [];
$scope.show_warnings = true;
$scope.show_errors = true;
$scope.show_pending = true;
$scope.check_status = function() { $scope.check_status = function() {
$http({ $http({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment