From 2557e6b73dc60029534bfea1f386b9492d439e15 Mon Sep 17 00:00:00 2001 From: Andrei Pohilko Date: Thu, 24 Nov 2022 15:15:20 +0000 Subject: [PATCH] Don't complain if repo is not found for chart Fixes #116 --- pkg/dashboard/static/list-view.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/dashboard/static/list-view.js b/pkg/dashboard/static/list-view.js index 28d9832..6db45b9 100644 --- a/pkg/dashboard/static/list-view.js +++ b/pkg/dashboard/static/list-view.js @@ -48,11 +48,12 @@ function buildChartCard(elm) { const chartNameRegex = 'v?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?' const chartName = elm.chart.substring(0, elm.chart.match(chartNameRegex).index - 1) $.getJSON("/api/helm/repo/search?name=" + chartName).fail(function (xhr) { - reportError("Failed to get repo name for charts", xhr) + // we're ok if we can't show icon and description + console.log("Failed to get repo name for charts", xhr) }).done(function (data) { if (data.length > 0) { $.getJSON("/api/helm/charts/show?name=" + data[0].name).fail(function (xhr) { - reportError("Failed to get list of charts", xhr) + console.log("Failed to get chart", xhr) }).done(function (data) { if (data) { const res = data[0];