Skip to content
Snippets Groups Projects
Select Git revision
  • d1abf4dee13e87930d28701439953a2da3f956bc
  • consistent_config default protected
2 results

cycled_exp.py

Blame
  • main.html 835 B
    {% extends "base.html" %}
    
    {% block announce %}
    <label for="version">Version</label>
    <select style="margin-left:8px;" id="version" name="version" onchange="switchVersion(this.options[this.selectedIndex].value)">
        <option value="1.4.0">1.4.0</option>
        <option value="1.3.9">1.3.9</option>
        <option value="latest">latest</option>
    </select>
    <script>
        function getVersion() {
            const segments = location.pathname.split('/')
            if (segments.length >= 4) {
                return segments[3]
            } else {
                return '$TAG'
            }
        }
        function switchVersion(value) {
            if (!value) { return }
            this.location.href = location.protocol + '//' + location.host + '/infrastructures/dbrepo/' + value + '/'
        }
        document.getElementById("version").value = getVersion()
    </script>
    {% endblock %}