diff --git a/docs.it4i/modules-matrix.md b/docs.it4i/modules-matrix.md index fd1c8b86f58262e7c21826dcf7e8d403a59a5682..199a589994287c192428c3694a1feeb4c7d21295 100644 --- a/docs.it4i/modules-matrix.md +++ b/docs.it4i/modules-matrix.md @@ -1,8 +1,8 @@ + !!! Hint "Cluster Acronyms" - \* A - Anselm - \* S - Salomon - \* U - uv1 at Salomon -| Module | Versions | Clusters | + A - Anselm • S - Salomon • U - uv1 at Salomon + +| Module </br><input id="searchInput" placeholder="🔍 Filter" style="width: 8rem; border-radius: 0.2rem; color: black; padding-left: .2rem;"> | Versions | Clusters | | ------ | -------- | -------- | | abinit | 7.10.1-gcc-openmpi</br>7.10.1-icc-impi</br>7.6.2 | `--A`</br>`--A`</br>`--A` | | ABINIT | 7.10.1-foss-2015b</br>7.10.1-intel-2015b | `US-`</br>`US-` | @@ -409,3 +409,5 @@ | xtrans | 1.3.5-foss-2016a</br>1.3.4-intel-2015b</br>1.3.5-intel-2015b</br>1.3.5-intel-2016a</br>1.3.5</br>1.3.4</br>1.3.5-foss-2015g | `-S-`</br>`-S-`</br>`-S-`</br>`-S-`</br>`-SA`</br>`--A`</br>`-S-` | | XZ | 5.2.2</br>5.2.2-intel-2016.01</br>5.2.2-intel-2017.00</br>5.2.2-foss-2016a | `-SA`</br>`-S-`</br>`USA`</br>`USA` | | zlib | 1.2.5</br>1.2.8-GCC-4.9.3</br>1.2.8-GCC-4.4.7-system | `--A`</br>`--A`</br>`U--` | + +---8<--- "modules_matrix_search.md" diff --git a/docs.it4i/snippets/modules_matrix_search.md b/docs.it4i/snippets/modules_matrix_search.md new file mode 100644 index 0000000000000000000000000000000000000000..4a7e2f5ccc9f12ee87873d50a2df8efd97fab80f --- /dev/null +++ b/docs.it4i/snippets/modules_matrix_search.md @@ -0,0 +1,35 @@ +<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.slim.min.js" integrity="sha256-/SIrNqv8h6QGKDuNoLGA4iret+kyesCkHGzVUUV0shc=" crossorigin="anonymous"></script> +<script> +$("#searchInput").keyup(function () { + //split the current value of searchInput + var data = this.value.split(" "); + //create a jquery object of the rows + var jo = $("tbody").find("tr"); + if (this.value == "") { + jo.show(); + return; + } + //hide all the rows + jo.hide(); + + //Recusively filter the jquery object to get results. + jo.filter(function (i, v) { + var $t = $(this); + for (var d = 0; d < data.length; ++d) { + if ($t.is(":contains('" + data[d] + "')")) { + return true; + } + } + return false; + }) + //show the rows that match. + .show(); +}).focus(function () { + this.value = ""; + $(this).css({ + "color": "black" + }); +}).css({ + "color": "#C0C0C0" +}); +</script> diff --git a/scripts/modules-matrix.py b/scripts/modules-matrix.py index 736f6a9b15f48e82b290e1dc2ff2034a72325a07..c9398977c1ec6f722d32d3a95808c91f4a41a888 100755 --- a/scripts/modules-matrix.py +++ b/scripts/modules-matrix.py @@ -42,7 +42,7 @@ print ' \* A - Anselm' print ' \* S - Salomon' print ' \* U - uv1 at Salomon' -print "| Module | Versions | Clusters |" +print '| Module </br><input id="searchInput" placeholder="🔍 Filter" style="width: 8rem; border-radius: 0.2rem; color: black; padding-left: .2rem;"> | Versions | Clusters |' print "| ------ | -------- | -------- |" software = dict() @@ -71,3 +71,5 @@ for m in sorted(software.items(), key=lambda i: i[0].lower()): #print '</br>'.join(m[1].keys()) #print '</br>'.join(m[1].values()) print "| %s | %s | %s |" % (software, '</br>'.join(m[1].keys()), '</br>'.join(m[1].values())) + print + print '---8<--- "modules_matrix_search.md"'