mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
Update installed charts number according to filter (#121)
This commit is contained in:
@@ -8,7 +8,6 @@ function loadChartsList() {
|
||||
reportError("Failed to get list of charts", xhr)
|
||||
}).done(function (data) {
|
||||
chartsCards.empty().hide()
|
||||
$("#installedList .header h2 span").text(data.length)
|
||||
const usedNS = {}
|
||||
data.forEach(function (elm) {
|
||||
let card = buildChartCard(elm);
|
||||
|
||||
@@ -328,11 +328,17 @@ function filterInstalledList(list) {
|
||||
let filterStr = $("#installedSearch").val().toLowerCase();
|
||||
let filteredNamespaces = getHashParam("filteredNamespace")
|
||||
let anyShown = false;
|
||||
let installedCount = 0;
|
||||
|
||||
list.each(function (ix, card) {
|
||||
anyShown |= showHideInstalledRelease($(card), filteredNamespaces, filterStr)
|
||||
anyShown = showHideInstalledRelease($(card), filteredNamespaces, filterStr)
|
||||
if (anyShown) {
|
||||
installedCount++;
|
||||
}
|
||||
})
|
||||
|
||||
if (list.length && !anyShown) {
|
||||
$("#installedList .header h2 span").text(installedCount)
|
||||
if (list.length && !installedCount) {
|
||||
warnMsg.show()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user