mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
Allow filtering on repository charts list (#61)
Fixes #46 Co-authored-by: Harshit Mehta <harshitm@nvidia.com>
This commit is contained in:
@@ -337,4 +337,18 @@ $("#btnRollback").click(function () {
|
|||||||
$("#btnAddRepository").click(function () {
|
$("#btnAddRepository").click(function () {
|
||||||
setHashParam("section", "repository")
|
setHashParam("section", "repository")
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
|
})
|
||||||
|
|
||||||
|
$("#inputSearch").keyup(function() {
|
||||||
|
var val = $(this).val().toLowerCase();
|
||||||
|
|
||||||
|
$(".charts li").hide()
|
||||||
|
|
||||||
|
$(".charts li").each(function(){
|
||||||
|
var chartNameElem = this.firstElementChild
|
||||||
|
var chartName = $(chartNameElem).text().toLowerCase()
|
||||||
|
if(chartName.indexOf(val) != -1) {
|
||||||
|
$(this).show()
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
@@ -96,12 +96,9 @@
|
|||||||
<div class="mb-5">
|
<div class="mb-5">
|
||||||
<span class="rounded rounded-1 me-2 p-1 px-2 bg-tag text-dark">URL: <span class="url fw-bold">http://somerepo/somepath</span></span>
|
<span class="rounded rounded-1 me-2 p-1 px-2 bg-tag text-dark">URL: <span class="url fw-bold">http://somerepo/somepath</span></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row py-2 mb-3">
|
||||||
<!-- TODO
|
<input class="form-control" type="text" placeholder="Search..." id="inputSearch">
|
||||||
<div class="float-end">
|
|
||||||
<input class="form-control form-control-sm" type="text" placeholder="Filter...">
|
|
||||||
</div>
|
</div>
|
||||||
-->
|
|
||||||
<div class="row bg-secondary rounded px-3 py-2 mb-3 fw-bold small"
|
<div class="row bg-secondary rounded px-3 py-2 mb-3 fw-bold small"
|
||||||
style="text-transform: uppercase">
|
style="text-transform: uppercase">
|
||||||
<div class="col-3">Chart Name</div>
|
<div class="col-3">Chart Name</div>
|
||||||
@@ -109,7 +106,7 @@
|
|||||||
<div class="col-1">Version</div>
|
<div class="col-1">Version</div>
|
||||||
<div class="col-1"></div>
|
<div class="col-1"></div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="list-unstyled mt-4"></ul>
|
<ul class="list-unstyled mt-4 charts"></ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ function loadRepoView() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
items.find("input").click(function () {
|
items.find("input").click(function () {
|
||||||
|
$("#inputSearch").val('')
|
||||||
const self = $(this)
|
const self = $(this)
|
||||||
const elm = self.data("item");
|
const elm = self.data("item");
|
||||||
setHashParam("repo", elm.name)
|
setHashParam("repo", elm.name)
|
||||||
|
|||||||
Reference in New Issue
Block a user