From 7329e19b48aa23373d231c091ef6e378d724f6d7 Mon Sep 17 00:00:00 2001 From: Leonardo Menezes Date: Mon, 27 Feb 2017 10:05:51 +0100 Subject: [PATCH] load request history on load or request execution --- public/js/app.js | 2 ++ public/rest/index.html | 2 +- src/app/components/rest/controller.js | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/public/js/app.js b/public/js/app.js index 6781f222..d513c378 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -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) { diff --git a/public/rest/index.html b/public/rest/index.html index 43e355e2..7519838f 100644 --- a/public/rest/index.html +++ b/public/rest/index.html @@ -42,7 +42,7 @@
diff --git a/src/app/components/rest/controller.js b/src/app/components/rest/controller.js index 03332ad9..ada811e6 100644 --- a/src/app/components/rest/controller.js +++ b/src/app/components/rest/controller.js @@ -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) {