add stats and change heap (#108)

* add stats and change heap

* improve analytics

* revert main changes

* add repo
This commit is contained in:
Itiel shwartz
2022-11-24 12:35:45 +02:00
committed by GitHub
parent f7d4dcbff4
commit 0b06036a39
6 changed files with 23 additions and 11 deletions

View File

@@ -40,13 +40,14 @@ function fillClusters(limNS) {
})
$.getJSON("/api/kube/contexts").fail(function (xhr) {
sendStats('contexts', {'status': 'fail'});
reportError("Failed to get list of clusters", xhr)
}).done(function (data) {
$("body").data("contexts", data)
const context = getHashParam("context")
data.sort((a, b) => (getCleanClusterName(a.Name) > getCleanClusterName(b.Name)) - (getCleanClusterName(a.Name) < getCleanClusterName(b.Name)))
fillClusterList(data, context);
sendStats('contexts', {'status': 'success', length:data.length});
$.getJSON("/api/kube/namespaces").fail(function (xhr) {
reportError("Failed to get namespaces", xhr)
}).done(function (res) {