From ead18a30599df31b0edc9bbe75fce885ee04a410 Mon Sep 17 00:00:00 2001 From: Ken Fukuyama Date: Thu, 22 Feb 2018 20:04:14 +0900 Subject: [PATCH] Fixed UI to use relative paths for ajax requests in order to work with `kube proxy`. This fixes issue #519. Signed-off-by: Ken Fukuyama --- gateway/assets/script/bootstrap.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gateway/assets/script/bootstrap.js b/gateway/assets/script/bootstrap.js index 6aff664c..13bca079 100644 --- a/gateway/assets/script/bootstrap.js +++ b/gateway/assets/script/bootstrap.js @@ -53,7 +53,7 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$timeout', '$md } var options = { - url: "/function/" + $scope.selectedFunction.name, + url: "../function/" + $scope.selectedFunction.name, data: $scope.invocation.request, method: "POST", headers: { "Content-Type": requestContentType }, @@ -143,7 +143,7 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$timeout', '$md var previous = $scope.functions; var cl = function(previousItems) { - $http.get("/system/functions").then(function(response) { + $http.get("../system/functions").then(function(response) { if (response && response.data) { if (previousItems.length != response.data.length) { $scope.functions = response.data; @@ -164,7 +164,7 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$timeout', '$md } var fetch = function() { - $http.get("/system/functions").then(function(response) { + $http.get("../system/functions").then(function(response) { $scope.functions = response.data; }); }; @@ -227,7 +227,7 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$timeout', '$md $scope.createFunc = function() { var options = { - url: "/system/functions", + url: "../system/functions", data: $scope.item, method: "POST", headers: { "Content-Type": "application/json" }, @@ -268,7 +268,7 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$timeout', '$md $mdDialog.show(confirm) .then(function() { var options = { - url: "/system/functions", + url: "../system/functions", data: { functionName: $scope.selectedFunction.name },