diff --git a/inventory_provider/static/update.html b/inventory_provider/static/update.html index c460d14740a8be22049c335c8f397569eea0abf6..eb6267c1748f7c46f263c6938bf6b3e7965a2b37 100644 --- a/inventory_provider/static/update.html +++ b/inventory_provider/static/update.html @@ -33,9 +33,12 @@ <span class="grid-item" ng-show="errors.length"> <table class="table table-striped" summary="error messages"> <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 ng-repeat="description in errors"> + <tr ng-if="show_errors" ng-repeat="description in errors"> <td>{{ description }}</td> </tr> </table> @@ -44,9 +47,13 @@ <span class="grid-item" ng-show="warnings.length"> <table class="table table-striped" summary="warning messages"> <tr> + <th> + <button ng-click="show_warnings=!show_warnings">{{show_warnings ? "hide" : "show"}}</button> + </th> <th scope="col">warnings</th> </tr> - <tr ng-repeat="description in warnings"> + <tr ng-if="show_warnings" ng-repeat="description in warnings"> + <td></td> <td>{{ description }}</td> </tr> </table> @@ -55,9 +62,12 @@ <span class="grid-item" ng-show="pending.length"> <table class="table table-striped" summary="pending tasks"> <tr> + <th> + <button ng-click="show_pending=!show_pending">{{show_pending ? "hide" : "show"}}</button> + </th> <th scope="col">pending tasks</th> </tr> - <tr ng-repeat="description in pending"> + <tr ng-if="show_pending" ng-repeat="description in pending"> <td>{{ description }}</td> </tr> </table> diff --git a/inventory_provider/static/update.js b/inventory_provider/static/update.js index 11d7004c08ef260a5238bc9883c74090476ff2c0..15f2f647eccf70c90d5044046b33f2e9e3fb6b50 100644 --- a/inventory_provider/static/update.js +++ b/inventory_provider/static/update.js @@ -14,6 +14,10 @@ myApp.controller('update', function($scope, $http, $timeout) { $scope.errors = []; $scope.warnings = []; + $scope.show_warnings = true; + $scope.show_errors = true; + $scope.show_pending = true; + $scope.check_status = function() { $http({