mirror of
https://github.com/openfaas/faas.git
synced 2025-06-09 08:46:48 +00:00
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 <fukuyama@supersoftware.co.jp>
This commit is contained in:
parent
bcc74f5dc6
commit
ead18a3059
10
gateway/assets/script/bootstrap.js
vendored
10
gateway/assets/script/bootstrap.js
vendored
@ -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
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user