diff --git a/CHANGELOG b/CHANGELOG index befadca..e929caf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ - Change config folders & files to new organisation - Remove celme - Add option to run a specific function test & module of pyros + - Add collapsible components in device config view 21-06-2023 (AKo): V0.6.26.0 - Restructuration du projet diff --git a/src/core/pyros_django/obs_config/templates/obs_config/device_details.html b/src/core/pyros_django/obs_config/templates/obs_config/device_details.html index d25bb84..9fa5fa5 100644 --- a/src/core/pyros_django/obs_config/templates/obs_config/device_details.html +++ b/src/core/pyros_django/obs_config/templates/obs_config/device_details.html @@ -1,8 +1,10 @@ {% extends "base.html" %} {% load tags %} - +{% load static %} +{% block head %} + +{% endblock %} {% block content %} - {# #} {% comment %}
{{ device_detail }}
@@ -82,78 +84,80 @@ th,td{ {% endfor %} {% endcomment %} - -
  • Component : {{capability.component}}


    - attributes : - {% endfor %} @@ -212,6 +216,21 @@ $(document).ready(function() { $('#rawFileModal').modal('show'); }) }); + + var coll = document.getElementsByClassName("collapsible"); + var i; + + for (i = 0; i < coll.length; i++) { + coll[i].addEventListener("click", function() { + this.classList.toggle("active"); + var content = this.nextElementSibling; + if (content.style.maxHeight){ + content.style.maxHeight = null; + } else { + content.style.maxHeight = "max-content" + } + }); + } }) {% endblock %} \ No newline at end of file diff --git a/src/core/pyros_django/obs_config/templates/obs_config/obs_agents_config.html b/src/core/pyros_django/obs_config/templates/obs_config/obs_agents_config.html index c36c82f..c90bd57 100644 --- a/src/core/pyros_django/obs_config/templates/obs_config/obs_agents_config.html +++ b/src/core/pyros_django/obs_config/templates/obs_config/obs_agents_config.html @@ -2,7 +2,7 @@ {% load tags %} {% load static %} {% block content %} - +

    Agents configuration

    diff --git a/src/core/pyros_django/obs_config/templates/obs_config/obs_astronomer_config.html b/src/core/pyros_django/obs_config/templates/obs_config/obs_astronomer_config.html index 65ad358..d1e69c3 100644 --- a/src/core/pyros_django/obs_config/templates/obs_config/obs_astronomer_config.html +++ b/src/core/pyros_django/obs_config/templates/obs_config/obs_astronomer_config.html @@ -2,7 +2,7 @@ {% load tags %} {% load static %} {% block content %} - + diff --git a/src/core/pyros_django/obs_config/templates/obs_config/obs_hardware_configuration.html b/src/core/pyros_django/obs_config/templates/obs_config/obs_hardware_configuration.html index f297644..ca9dfbc 100644 --- a/src/core/pyros_django/obs_config/templates/obs_config/obs_hardware_configuration.html +++ b/src/core/pyros_django/obs_config/templates/obs_config/obs_hardware_configuration.html @@ -3,8 +3,9 @@ {% block content %}

    Hardware configuration

    +
    -

    Devices

    +

    Devices

    @@ -49,7 +50,7 @@
    -

    Computers

    +

    Computers

    diff --git a/src/core/pyros_django/obs_config/views.py b/src/core/pyros_django/obs_config/views.py index 3c10a36..e95659b 100644 --- a/src/core/pyros_django/obs_config/views.py +++ b/src/core/pyros_django/obs_config/views.py @@ -369,7 +369,7 @@ def view_raw_component_config_file(request): @ csrf_exempt def view_raw_generic_device_config_file(request): GENERIC_DEVICES_PATH = os.path.join( - os.environ["DJANGO_PATH"], "../../../config/devices/") + os.environ["DJANGO_PATH"], "../../../config/observatory/general/devices/") if request.POST: yaml_file = open(GENERIC_DEVICES_PATH+request.POST["yaml_file"]) content = yaml_file.readlines() -- libgit2 0.21.2