mirror of
https://github.com/openfaas/faas.git
synced 2025-06-09 16:56:47 +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 = {
|
var options = {
|
||||||
url: "/function/" + $scope.selectedFunction.name,
|
url: "../function/" + $scope.selectedFunction.name,
|
||||||
data: $scope.invocation.request,
|
data: $scope.invocation.request,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: { "Content-Type": requestContentType },
|
headers: { "Content-Type": requestContentType },
|
||||||
@ -143,7 +143,7 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$timeout', '$md
|
|||||||
var previous = $scope.functions;
|
var previous = $scope.functions;
|
||||||
|
|
||||||
var cl = function(previousItems) {
|
var cl = function(previousItems) {
|
||||||
$http.get("/system/functions").then(function(response) {
|
$http.get("../system/functions").then(function(response) {
|
||||||
if (response && response.data) {
|
if (response && response.data) {
|
||||||
if (previousItems.length != response.data.length) {
|
if (previousItems.length != response.data.length) {
|
||||||
$scope.functions = response.data;
|
$scope.functions = response.data;
|
||||||
@ -164,7 +164,7 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$timeout', '$md
|
|||||||
}
|
}
|
||||||
|
|
||||||
var fetch = function() {
|
var fetch = function() {
|
||||||
$http.get("/system/functions").then(function(response) {
|
$http.get("../system/functions").then(function(response) {
|
||||||
$scope.functions = response.data;
|
$scope.functions = response.data;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -227,7 +227,7 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$timeout', '$md
|
|||||||
|
|
||||||
$scope.createFunc = function() {
|
$scope.createFunc = function() {
|
||||||
var options = {
|
var options = {
|
||||||
url: "/system/functions",
|
url: "../system/functions",
|
||||||
data: $scope.item,
|
data: $scope.item,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
@ -268,7 +268,7 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$timeout', '$md
|
|||||||
$mdDialog.show(confirm)
|
$mdDialog.show(confirm)
|
||||||
.then(function() {
|
.then(function() {
|
||||||
var options = {
|
var options = {
|
||||||
url: "/system/functions",
|
url: "../system/functions",
|
||||||
data: {
|
data: {
|
||||||
functionName: $scope.selectedFunction.name
|
functionName: $scope.selectedFunction.name
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user