Few UI Enhancements (#79)

- Add Install/Upgrade keywork dynamically on popup
- Sort Repo list alphabetically
- Sort CLuster list alphabetically

Co-authored-by: Harshit Mehta <harshitm@nvidia.com>
This commit is contained in:
Harshit Mehta
2022-11-08 19:58:13 +05:30
committed by GitHub
parent 2454fcf47c
commit 74c2a3d6e7
4 changed files with 6 additions and 2 deletions

View File

@@ -6,7 +6,8 @@ function loadRepoView() {
reportError("Failed to get list of repositories", xhr)
}).done(function (data) {
const items = $("#sectionRepo .repo-list ul").empty()
data.sort((a, b) => (a.name > b.name) - (a.name < b.name))
data.forEach(function (elm) {
let opt = $('<li class="mb-2"><label><input type="radio" name="cluster" class="me-2"/><span></span></label></li>');
opt.attr('title', elm.url)