mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
Co-authored-by: Harshit Mehta <harshitm@nvidia.com>
This commit is contained in:
@@ -31,7 +31,9 @@ function buildChartCard(elm) {
|
||||
<div class="col-1 rel-date text-nowrap"><span>today</span><div>Updated</div></div>
|
||||
</div>`)
|
||||
|
||||
const chartName = elm.chart.substring(0, elm.chart.lastIndexOf("-"))
|
||||
// semver2 regex , add optional v prefix
|
||||
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)
|
||||
}).done(function (data) {
|
||||
|
||||
Reference in New Issue
Block a user