mirror of
https://github.com/openfaas/faas.git
synced 2025-06-22 23:03:24 +00:00
Fix Invocation count wrong for multiple namespace
Fixes https://github.com/openfaas/faas/issues/1413 Fixes https://github.com/openfaas/faas-netes/issues/707 This fixes the Gateway UI not updating the invocation count automatically without a page reload. Tested by deploying on a local cluster and making sure invocations go up with and without namespace suffix Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
This commit is contained in:
10
gateway/assets/script/bootstrap.js
vendored
10
gateway/assets/script/bootstrap.js
vendored
@ -222,6 +222,16 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$interval', '$f
|
||||
$scope.selectedFunction = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
if ($scope.selectedFunction) {
|
||||
response.data.some(function(entry) {
|
||||
if (entry.name === $scope.selectedFunction.name) {
|
||||
$scope.selectedFunction.invocationCount = entry.invocationCount
|
||||
return true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user