mirror of
https://github.com/openfaas/faas.git
synced 2025-06-18 03:56:37 +00:00
Edited unnecessary fields and $scope
s.
Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
This commit is contained in:
15
gateway/assets/script/bootstrap.js
vendored
15
gateway/assets/script/bootstrap.js
vendored
@ -36,24 +36,23 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$timeout', '$md
|
|||||||
}
|
}
|
||||||
|
|
||||||
$scope.invocation.request = "";
|
$scope.invocation.request = "";
|
||||||
$scope.isFunctionReady = "Querying";
|
var fetchFunctionsDelay = 3500;
|
||||||
$scope.fetchFunctionsDelay = 3500;
|
var queryFunctionDelay = 2500;
|
||||||
$scope.queryFunctionDelay = 2500;
|
|
||||||
|
|
||||||
$scope.fetchFunctionsInterval = setInterval(function() {
|
var fetchFunctionsInterval = setInterval(function() {
|
||||||
refreshData();
|
refreshData();
|
||||||
}, $scope.fetchFunctionsDelay);
|
}, fetchFunctionsDelay);
|
||||||
|
|
||||||
$scope.queryFunctionInterval = setInterval(function() {
|
var queryFunctionInterval = setInterval(function() {
|
||||||
if($scope.selectedFunction && $scope.selectedFunction.name) {
|
if($scope.selectedFunction && $scope.selectedFunction.name) {
|
||||||
refreshFunction($scope.selectedFunction);
|
refreshFunction($scope.selectedFunction);
|
||||||
}
|
}
|
||||||
}, $scope.queryFunctionDelay);
|
}, queryFunctionDelay);
|
||||||
|
|
||||||
var refreshFunction = function(functionInstance) {
|
var refreshFunction = function(functionInstance) {
|
||||||
$http.get("../system/function/" + functionInstance.name)
|
$http.get("../system/function/" + functionInstance.name)
|
||||||
.then(function(response) {
|
.then(function(response) {
|
||||||
functionInstance.ready = (response.data && response.data.availableReplicas && response.data.availableReplicas >0);
|
functionInstance.ready = (response.data && response.data.availableReplicas && response.data.availableReplicas > 0);
|
||||||
})
|
})
|
||||||
.catch(function(err) {
|
.catch(function(err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
Reference in New Issue
Block a user