summaryrefslogtreecommitdiffstats
path: root/ogcp/static/js
diff options
context:
space:
mode:
authorJavier Hernandez <jhernandez@soleta.eu>2023-12-14 12:30:16 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2023-12-14 12:35:01 +0100
commit24aab951a8373642b36e1063789a20bb05965586 (patch)
tree8aa57425e643dd19f4ce1cf3c7ee54bded966768 /ogcp/static/js
parentaa6061dad7e90ef9761d2d64940cf38eed51c990 (diff)
Group images by repos
Make the sidebar from the images menu display the list of repos grouped by repos
Diffstat (limited to 'ogcp/static/js')
-rw-r--r--ogcp/static/js/ogcp.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/ogcp/static/js/ogcp.js b/ogcp/static/js/ogcp.js
index 5259ea1..964e68d 100644
--- a/ogcp/static/js/ogcp.js
+++ b/ogcp/static/js/ogcp.js
@@ -137,6 +137,25 @@ function keepSelectedClients() {
});
}
+function keepImagesTreeState() {
+ const images_tree = $('#servers .collapse')
+ console.log(images_tree)
+ images_tree.on('hidden.bs.collapse', function (event) {
+ event.stopPropagation();
+ localStorage.removeItem(this.id);
+ });
+ images_tree.on('shown.bs.collapse', function (event) {
+ event.stopPropagation();
+ localStorage.setItem(this.id, 'show');
+ });
+
+ images_tree.each(function () {
+ if (localStorage.getItem(this.id) == 'show') {
+ $(this).collapse('show');
+ }
+ });
+}
+
function keepReposTreeState() {
const repos_tree = $('#repos-list .collapse')