Commit 7329e19b authored by Leonardo Menezes's avatar Leonardo Menezes
Browse files

load request history on load or request execution

parent 316c2e09
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1124,6 +1124,7 @@ angular.module('cerebro').controller('RestController', ['$scope', '$http',

    var success = function(response) {
      $scope.response = $sce.trustAsHtml(JSONTree.create(response));
      $scope.loadHistory();
    };

    var failure = function(response) {
@@ -1149,6 +1150,7 @@ angular.module('cerebro').controller('RestController', ['$scope', '$http',
          AlertService.error('Error while loading cluster mappings', error);
        }
      );
      $scope.loadHistory();
    };

    $scope.loadRequest = function(request) {
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@
    </div>
    <div class="row">
      <div class="col-xs-12">
        <a data-toggle="collapse" data-parent="#restAccordion" target="_self" href="#restHistory" ng-click="loadHistory()">
        <a data-toggle="collapse" data-parent="#restAccordion" target="_self" href="#restHistory">
          <i class="fa fa-history"></i> previous requests
        </a>
      </div>
+2 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ angular.module('cerebro').controller('RestController', ['$scope', '$http',

    var success = function(response) {
      $scope.response = $sce.trustAsHtml(JSONTree.create(response));
      $scope.loadHistory();
    };

    var failure = function(response) {
@@ -40,6 +41,7 @@ angular.module('cerebro').controller('RestController', ['$scope', '$http',
          AlertService.error('Error while loading cluster mappings', error);
        }
      );
      $scope.loadHistory();
    };

    $scope.loadRequest = function(request) {