@@ -1,6 +1,6 | |||||
1 | {% extends "dev_conf_edit.html" %} |
|
1 | {% extends "dev_conf_edit.html" %} | |
2 |
|
2 | |||
3 |
{% load bootstrap |
|
3 | {% load django_bootstrap5 %} | |
4 | {% load static %} |
|
4 | {% load static %} | |
5 | {% load main_tags %} |
|
5 | {% load main_tags %} | |
6 |
|
6 |
@@ -1,5 +1,5 | |||||
1 | {% load static %} |
|
1 | {% load static %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load main_tags %} |
|
3 | {% load main_tags %} | |
4 |
|
4 | |||
5 | {% block content %} |
|
5 | {% block content %} |
@@ -1,4 +1,4 | |||||
1 |
{% load bootstrap |
|
1 | {% load django_bootstrap5 %} | |
2 |
|
2 | |||
3 | {% if abs_beams %} |
|
3 | {% if abs_beams %} | |
4 |
|
4 |
@@ -1,4 +1,4 | |||||
1 |
{% extends "dev_conf.html" %} {% load static %} {% load bootstrap |
|
1 | {% extends "dev_conf.html" %} {% load static %} {% load django_bootstrap5 %} {% load main_tags %} | |
2 | {% block extra-head %} |
|
2 | {% block extra-head %} | |
3 | <style> |
|
3 | <style> | |
4 | .abs { |
|
4 | .abs { |
@@ -1,5 +1,5 | |||||
1 | {% extends "dev_conf_edit.html" %} |
|
1 | {% extends "dev_conf_edit.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 |
|
4 | |||
5 | {% block extra-head %} |
|
5 | {% block extra-head %} |
@@ -1,5 +1,5 | |||||
1 | {% load static %} |
|
1 | {% load static %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load main_tags %} |
|
3 | {% load main_tags %} | |
4 |
|
4 | |||
5 | {% block content %} |
|
5 | {% block content %} |
@@ -1,6 +1,6 | |||||
1 | {% extends "dev_conf_edit.html" %} |
|
1 | {% extends "dev_conf_edit.html" %} | |
2 |
|
2 | |||
3 |
{% load bootstrap |
|
3 | {% load django_bootstrap5 %} | |
4 | {% load static %} |
|
4 | {% load static %} | |
5 | {% load main_tags %} |
|
5 | {% load main_tags %} | |
6 |
|
6 |
@@ -1,5 +1,5 | |||||
1 | {% load static %} |
|
1 | {% load static %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load main_tags %} |
|
3 | {% load main_tags %} | |
4 |
|
4 | |||
5 | {% block content %} |
|
5 | {% block content %} |
@@ -1,6 +1,6 | |||||
1 | {% extends "dev_conf.html" %} |
|
1 | {% extends "dev_conf.html" %} | |
2 | {% load static %} |
|
2 | {% load static %} | |
3 |
{% load bootstrap |
|
3 | {% load django_bootstrap5 %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 | |||
6 | {% block content %} |
|
6 | {% block content %} |
@@ -1,5 +1,5 | |||||
1 | {% load static %} |
|
1 | {% load static %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load main_tags %} |
|
3 | {% load main_tags %} | |
4 |
|
4 | |||
5 | {% block content %} |
|
5 | {% block content %} |
@@ -1,4 +1,4 | |||||
1 |
from django.shortcuts import render |
|
1 | from django.shortcuts import render | |
2 | from django.template import RequestContext |
|
2 | from django.template import RequestContext | |
3 | from django.shortcuts import redirect, render, get_object_or_404 |
|
3 | from django.shortcuts import redirect, render, get_object_or_404 | |
4 | from django.contrib import messages |
|
4 | from django.contrib import messages |
@@ -1,5 +1,5 | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% block mainactive %}active{% endblock %} |
|
3 | {% block mainactive %}active{% endblock %} | |
4 |
|
4 | |||
5 | {% block content-title %}SIR{% endblock %} |
|
5 | {% block content-title %}SIR{% endblock %} | |
@@ -11,9 +11,7 | |||||
11 | {% csrf_token %} |
|
11 | {% csrf_token %} | |
12 | {% bootstrap_form form %} |
|
12 | {% bootstrap_form form %} | |
13 | <input type="hidden" name="next" value="{{ next }}" /> |
|
13 | <input type="hidden" name="next" value="{{ next }}" /> | |
14 | {% buttons %} |
|
14 | {% bootstrap_button "Login" button_type="submit" button_class="btn-primary" %} | |
15 | <button type="submit" class="btn btn-primary">Login</button> |
|
|||
16 | {% endbuttons %} |
|
|||
17 | </form> |
|
15 | </form> | |
18 | </div> |
|
16 | </div> | |
19 | {% endblock %} |
|
17 | {% endblock %} |
@@ -1,4 +1,4 | |||||
1 |
from django.shortcuts import render |
|
1 | from django.shortcuts import render | |
2 | from django.template import RequestContext |
|
2 | from django.template import RequestContext | |
3 |
|
3 | |||
4 | # Create your views here. |
|
4 | # Create your views here. |
@@ -1,5 +1,5 | |||||
1 | {% extends "dev_conf_edit.html" %} |
|
1 | {% extends "dev_conf_edit.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 |
@@ -1,5 +1,5 | |||||
1 | {% extends "dev_conf_edit.html" %} |
|
1 | {% extends "dev_conf_edit.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 |
@@ -1,5 +1,5 | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% block mainactive %}active{% endblock %} |
|
3 | {% block mainactive %}active{% endblock %} | |
4 |
|
4 | |||
5 | {% block content-title %}DEVICE CGS{% endblock %} |
|
5 | {% block content-title %}DEVICE CGS{% endblock %} |
@@ -1,5 +1,5 | |||||
1 | {% extends "dev_conf_edit.html" %} |
|
1 | {% extends "dev_conf_edit.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 |
@@ -1,5 +1,5 | |||||
1 | {% extends "dev_conf_edit.html" %} |
|
1 | {% extends "dev_conf_edit.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 |
@@ -1,5 +1,5 | |||||
1 | {% extends "dev_conf_edit.html" %} |
|
1 | {% extends "dev_conf_edit.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 |
@@ -1,5 +1,5 | |||||
1 | {% extends "dev_conf_edit.html" %} |
|
1 | {% extends "dev_conf_edit.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 |
@@ -1,5 +1,5 | |||||
1 | {% extends "dev_conf_edit.html" %} |
|
1 | {% extends "dev_conf_edit.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 |
@@ -1,5 +1,5 | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% block mainactive %}active{% endblock %} |
|
3 | {% block mainactive %}active{% endblock %} | |
4 |
|
4 | |||
5 | {% block content-title %}Acquisition System{% endblock %} |
|
5 | {% block content-title %}Acquisition System{% endblock %} |
@@ -1,6 +1,6 | |||||
1 | {% extends "dev_conf.html" %} |
|
1 | {% extends "dev_conf.html" %} | |
2 | {% load static %} |
|
2 | {% load static %} | |
3 |
{% load bootstrap |
|
3 | {% load django_bootstrap5 %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 | |||
6 | {% block extra-menu-actions %} |
|
6 | {% block extra-menu-actions %} |
@@ -1,5 +1,5 | |||||
1 | {% extends "dev_conf_edit.html" %} |
|
1 | {% extends "dev_conf_edit.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 |
@@ -1,4 +1,4 | |||||
1 |
from django.shortcuts import render |
|
1 | from django.shortcuts import render | |
2 | from django.template import RequestContext |
|
2 | from django.template import RequestContext | |
3 | from django.shortcuts import redirect, render, get_object_or_404 |
|
3 | from django.shortcuts import redirect, render, get_object_or_404 | |
4 | from django.contrib import messages |
|
4 | from django.contrib import messages |
@@ -1,6 +1,6 | |||||
1 | <!DOCTYPE html> |
|
1 | <!DOCTYPE html> | |
2 | {% load static %} |
|
2 | {% load static %} | |
3 |
{% load bootstrap |
|
3 | {% load django_bootstrap5 %} | |
4 | <html lang="en"> |
|
4 | <html lang="en"> | |
5 | <head> |
|
5 | <head> | |
6 | <meta charset="utf-8"> |
|
6 | <meta charset="utf-8"> |
@@ -1,6 +1,6 | |||||
1 | <!DOCTYPE html> |
|
1 | <!DOCTYPE html> | |
2 | {% load static %} |
|
2 | {% load static %} | |
3 |
{% load bootstrap |
|
3 | {% load django_bootstrap5 %} | |
4 | <html lang="en"> |
|
4 | <html lang="en"> | |
5 | <head> |
|
5 | <head> | |
6 | <meta charset="utf-8"> |
|
6 | <meta charset="utf-8"> |
@@ -1,5 +1,5 | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 |
@@ -1,5 +1,5 | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 | |||
@@ -14,7 +14,7 | |||||
14 | {% block content-filter %} |
|
14 | {% block content-filter %} | |
15 | {% if form %} |
|
15 | {% if form %} | |
16 | <form class="form" method="get"> |
|
16 | <form class="form" method="get"> | |
17 |
{% bootstrap_form form layout='horizontal' size='m |
|
17 | {% bootstrap_form form layout='horizontal' size='md' %} | |
18 | <div class="pull-right"> |
|
18 | <div class="pull-right"> | |
19 | <br> |
|
19 | <br> | |
20 | <button type="button" class="btn btn-primary btn-sm" onclick="window.location.replace('?');"><span class="fas fa-sync-alt" aria-hidden="true"></span></button> |
|
20 | <button type="button" class="btn btn-primary btn-sm" onclick="window.location.replace('?');"><span class="fas fa-sync-alt" aria-hidden="true"></span></button> |
@@ -1,5 +1,5 | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 | {% block extra-head %} |
|
5 | {% block extra-head %} |
@@ -1,5 +1,5 | |||||
1 | {% extends "base_edit.html" %} |
|
1 | {% extends "base_edit.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 |
@@ -1,5 +1,5 | |||||
1 | {% extends 'base.html' %} |
|
1 | {% extends 'base.html' %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 |
|
3 | |||
4 | {% block content-title %}{{title}}{% endblock %} |
|
4 | {% block content-title %}{{title}}{% endblock %} | |
5 | {% block content-suptitle %}{{suptitle}}{% endblock %} |
|
5 | {% block content-suptitle %}{{suptitle}}{% endblock %} |
@@ -1,5 +1,5 | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 | {% block content-title %}{{title}}{% endblock %} |
|
5 | {% block content-title %}{{title}}{% endblock %} |
@@ -1,5 +1,5 | |||||
1 | {% extends "base_edit.html" %} |
|
1 | {% extends "base_edit.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 |
@@ -1,5 +1,5 | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 | {% block content-title %}{{title}}{% endblock %} |
|
5 | {% block content-title %}{{title}}{% endblock %} |
@@ -1,5 +1,5 | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 | {% block extra-head %} |
|
5 | {% block extra-head %} |
@@ -1,5 +1,5 | |||||
1 | {% extends "base_edit.html" %} |
|
1 | {% extends "base_edit.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 | {% block extra-head %} |
|
5 | {% block extra-head %} |
@@ -1,5 +1,5 | |||||
1 | {% extends "base_edit.html" %} |
|
1 | {% extends "base_edit.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 | {% block extra-head %} |
|
5 | {% block extra-head %} |
@@ -1,5 +1,5 | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 | {% block extra-head %} |
|
5 | {% block extra-head %} |
@@ -1,5 +1,5 | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 | {% block extra-head %} |
|
5 | {% block extra-head %} |
@@ -1,4 +1,4 | |||||
1 |
{% load static %} {% load bootstrap |
|
1 | {% load static %} {% load django_bootstrap5 %} | |
2 | <footer> |
|
2 | <footer> | |
3 | <div class="container"> |
|
3 | <div class="container"> | |
4 | <ul class="footer-contact"> |
|
4 | <ul class="footer-contact"> |
@@ -1,4 +1,4 | |||||
1 |
{% load static %} {% load bootstrap |
|
1 | {% load static %} {% load django_bootstrap5 %} | |
2 |
|
2 | |||
3 | <div id="igp-top"> |
|
3 | <div id="igp-top"> | |
4 | <div class="container"> |
|
4 | <div class="container"> |
@@ -1,5 +1,5 | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% block content-title %}Integrated Radar System{% endblock %} |
|
3 | {% block content-title %}Integrated Radar System{% endblock %} | |
4 | {% block content-suptitle %}at JRO{% endblock %} |
|
4 | {% block content-suptitle %}at JRO{% endblock %} | |
5 |
|
5 |
@@ -1,5 +1,5 | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 |
@@ -1,5 +1,5 | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 | {% block extra-head %} |
|
5 | {% block extra-head %} |
@@ -62,8 +62,8 urlpatterns = ( | |||||
62 |
|
62 | |||
63 | path('operation/', views.operation, name='url_operation'), |
|
63 | path('operation/', views.operation, name='url_operation'), | |
64 | path('operation/<int:id_camp>/', views.operation, name='url_operation'), |
|
64 | path('operation/<int:id_camp>/', views.operation, name='url_operation'), | |
65 | path('operation/<int:id_camp>/revoke', views.revoke_tasks, name='url_operation_revoke'), |
|
65 | #path('operation/<int:id_camp>/revoke', views.revoke_tasks, name='url_operation_revoke'), | |
66 | path('operation/<int:id_camp>/show', views.show_tasks, name='url_operation_show'), |
|
66 | #path('operation/<int:id_camp>/show', views.show_tasks, name='url_operation_show'), | |
67 | path('operation/<int:id_camp>/radar/<int:id_radar>/start/', views.radar_start, name='url_radar_start'), |
|
67 | path('operation/<int:id_camp>/radar/<int:id_radar>/start/', views.radar_start, name='url_radar_start'), | |
68 | path('operation/<int:id_camp>/radar/<int:id_radar>/stop/', views.radar_stop, name='url_radar_stop'), |
|
68 | path('operation/<int:id_camp>/radar/<int:id_radar>/stop/', views.radar_stop, name='url_radar_stop'), | |
69 | path('operation/<int:id_camp>/radar/<int:id_radar>/refresh/', views.radar_refresh, name='url_radar_refresh'), |
|
69 | path('operation/<int:id_camp>/radar/<int:id_radar>/refresh/', views.radar_refresh, name='url_radar_refresh'), |
@@ -41,7 +41,7 from apps.rc.models import RCConfiguration, RCLine, RCLineType, RCClock | |||||
41 | from apps.dds.models import DDSConfiguration |
|
41 | from apps.dds.models import DDSConfiguration | |
42 | from apps.dds_rest.models import DDSRestConfiguration |
|
42 | from apps.dds_rest.models import DDSRestConfiguration | |
43 |
|
43 | |||
44 | from .tasks import task_start |
|
44 | #from .tasks import task_start | |
45 | from radarsys.celery import app |
|
45 | from radarsys.celery import app | |
46 |
|
46 | |||
47 | #comentario test |
|
47 | #comentario test | |
@@ -1843,9 +1843,9 def radar_start(request, id_camp, id_radar): | |||||
1843 |
|
1843 | |||
1844 | # ------------------------------------------- |
|
1844 | # ------------------------------------------- | |
1845 |
|
1845 | |||
1846 | task = task_start.delay(exp.id) |
|
1846 | # task = task_start.delay(exp.id) | |
1847 | exp.task = task.id |
|
1847 | # exp.task = task.id | |
1848 | exp.status = task.get() |
|
1848 | # exp.status = task.get() | |
1849 | # ------------------------------------------- |
|
1849 | # ------------------------------------------- | |
1850 |
|
1850 | |||
1851 | #exp.status = task.wait() |
|
1851 | #exp.status = task.wait() | |
@@ -1857,9 +1857,9 def radar_start(request, id_camp, id_radar): | |||||
1857 | elif now < start: |
|
1857 | elif now < start: | |
1858 | print("Caso now <= start -- (2)",exp.pk) |
|
1858 | print("Caso now <= start -- (2)",exp.pk) | |
1859 | #task = task_start.apply_async((exp.pk, ), eta=start)#start+timedelta(hours=5)) |
|
1859 | #task = task_start.apply_async((exp.pk, ), eta=start)#start+timedelta(hours=5)) | |
1860 | task = task_start.apply_async((exp.pk, ), eta=start+timedelta(hours=5))#) |
|
1860 | # task = task_start.apply_async((exp.pk, ), eta=start+timedelta(hours=5))#) | |
1861 | exp.task = task.id |
|
1861 | # exp.task = task.id | |
1862 | exp.status = 3 |
|
1862 | # exp.status = 3 | |
1863 | messages.success(request, 'Experiment {} programmed to start at {}'.format(exp, start)) |
|
1863 | messages.success(request, 'Experiment {} programmed to start at {}'.format(exp, start)) | |
1864 | else: |
|
1864 | else: | |
1865 | print("Caso now > end -- (3)") |
|
1865 | print("Caso now > end -- (3)") | |
@@ -1878,21 +1878,21 def radar_stop(request, id_camp, id_radar): | |||||
1878 | campaign = get_object_or_404(Campaign, pk=id_camp) |
|
1878 | campaign = get_object_or_404(Campaign, pk=id_camp) | |
1879 | experiments = campaign.get_experiments_by_radar(id_radar)[0]['experiments'] |
|
1879 | experiments = campaign.get_experiments_by_radar(id_radar)[0]['experiments'] | |
1880 | print("Ingreso en stop radar_stop") |
|
1880 | print("Ingreso en stop radar_stop") | |
1881 | for exp in experiments: |
|
1881 | #for exp in experiments: | |
1882 |
|
1882 | |||
1883 | if exp.task: |
|
1883 | # if exp.task: | |
1884 | print("Ingreso antes de revoke stop") |
|
1884 | # print("Ingreso antes de revoke stop") | |
1885 | app.control.revoke(exp.task) |
|
1885 | # app.control.revoke(exp.task) | |
1886 |
|
1886 | |||
1887 |
|
1887 | |||
1888 | if exp.status == 2: #status 2 es started |
|
1888 | # if exp.status == 2: #status 2 es started | |
1889 | print("llama a exp.stop") |
|
1889 | # print("llama a exp.stop") | |
1890 | exp.stop() |
|
1890 | # exp.stop() | |
1891 | messages.warning(request, 'Experiment {} stopped'.format(exp)) |
|
1891 | # messages.warning(request, 'Experiment {} stopped'.format(exp)) | |
1892 | exp.status = 1 |
|
1892 | # exp.status = 1 | |
1893 | exp.save() |
|
1893 | # exp.save() | |
1894 |
|
1894 | |||
1895 | return HttpResponseRedirect(reverse('url_operation', args=[id_camp])) |
|
1895 | #return HttpResponseRedirect(reverse('url_operation', args=[id_camp])) | |
1896 |
|
1896 | |||
1897 |
|
1897 | |||
1898 | @login_required |
|
1898 | @login_required | |
@@ -1908,52 +1908,52 def radar_refresh(request, id_camp, id_radar): | |||||
1908 | scheduled = list(i.scheduled().values())[0] |
|
1908 | scheduled = list(i.scheduled().values())[0] | |
1909 | revoked = list(i.revoked().values())[0] |
|
1909 | revoked = list(i.revoked().values())[0] | |
1910 |
|
1910 | |||
1911 | for exp in experiments: |
|
1911 | # for exp in experiments: | |
1912 | if exp.task in revoked: |
|
1912 | # if exp.task in revoked: | |
1913 | exp.status = 1 |
|
1913 | # exp.status = 1 | |
1914 | elif exp.task in [t['request']['id'] for t in scheduled if 'task_stop' in t['request']['name']]: |
|
1914 | # elif exp.task in [t['request']['id'] for t in scheduled if 'task_stop' in t['request']['name']]: | |
1915 | exp.status = 2 |
|
1915 | # exp.status = 2 | |
1916 | elif exp.task in [t['request']['id'] for t in scheduled if 'task_start' in t['request']['name']]: |
|
1916 | # elif exp.task in [t['request']['id'] for t in scheduled if 'task_start' in t['request']['name']]: | |
1917 | exp.status = 3 |
|
1917 | # exp.status = 3 | |
1918 | else: |
|
1918 | # else: | |
1919 | exp.status = 4 |
|
1919 | # exp.status = 4 | |
1920 | exp.save() |
|
1920 | # exp.save() | |
1921 | return HttpResponseRedirect(reverse('url_operation', args=[id_camp])) |
|
1921 | # return HttpResponseRedirect(reverse('url_operation', args=[id_camp])) | |
1922 |
|
1922 | |||
1923 | @login_required |
|
1923 | #@login_required | |
1924 | def revoke_tasks(request, id_camp): |
|
1924 | # def revoke_tasks(request, id_camp): | |
1925 |
|
1925 | |||
1926 | i = app.control.inspect() |
|
1926 | # i = app.control.inspect() | |
1927 | scheduled = list(i.scheduled().values())[0] |
|
1927 | # scheduled = list(i.scheduled().values())[0] | |
1928 | revoked = list(i.revoked().values())[0] |
|
1928 | # revoked = list(i.revoked().values())[0] | |
1929 |
|
1929 | |||
1930 | for t in scheduled: |
|
1930 | # for t in scheduled: | |
1931 | if t['request']['id'] in revoked: |
|
1931 | # if t['request']['id'] in revoked: | |
1932 | continue |
|
1932 | # continue | |
1933 | app.control.revoke(t['request']['id']) |
|
1933 | # app.control.revoke(t['request']['id']) | |
1934 | exp = Experiment.objects.get(pk=eval(str(t['request']['args']))[0]) |
|
1934 | # exp = Experiment.objects.get(pk=eval(str(t['request']['args']))[0]) | |
1935 | eta = t['eta'] |
|
1935 | # eta = t['eta'] | |
1936 | task = t['request']['name'].split('.')[-1] |
|
1936 | # #task = t['request']['name'].split('.')[-1] | |
1937 | messages.warning(request, 'Scheduled {} at {} for experiment {} revoked'.format(task, eta, exp.name)) |
|
1937 | # messages.warning(request, 'Scheduled {} at {} for experiment {} revoked'.format(task, eta, exp.name)) | |
1938 |
|
1938 | |||
1939 | return HttpResponseRedirect(reverse('url_operation', args=[id_camp])) |
|
1939 | # return HttpResponseRedirect(reverse('url_operation', args=[id_camp])) | |
1940 |
|
1940 | |||
1941 | @login_required |
|
1941 | # @login_required | |
1942 | def show_tasks(request, id_camp): |
|
1942 | # def show_tasks(request, id_camp): | |
1943 |
|
1943 | |||
1944 | i = app.control.inspect() |
|
1944 | # i = app.control.inspect() | |
1945 | scheduled = list(i.scheduled().values())[0] |
|
1945 | # scheduled = list(i.scheduled().values())[0] | |
1946 | revoked = list(i.revoked().values())[0] |
|
1946 | # revoked = list(i.revoked().values())[0] | |
1947 |
|
1947 | |||
1948 | for t in scheduled: |
|
1948 | # for t in scheduled: | |
1949 | if t['request']['id'] in revoked: |
|
1949 | # if t['request']['id'] in revoked: | |
1950 | continue |
|
1950 | # continue | |
1951 | exp = Experiment.objects.get(pk=eval(str(t['request']['args']))[0]) |
|
1951 | # exp = Experiment.objects.get(pk=eval(str(t['request']['args']))[0]) | |
1952 | eta = t['eta'] |
|
1952 | # eta = t['eta'] | |
1953 | task = t['request']['name'].split('.')[-1] |
|
1953 | # #task = t['request']['name'].split('.')[-1] | |
1954 | messages.success(request, 'Task {} scheduled at {} for experiment {}'.format(task, eta, exp.name)) |
|
1954 | # #messages.success(request, 'Task {} scheduled at {} for experiment {}'.format(task, eta, exp.name)) | |
1955 |
|
1955 | |||
1956 | return HttpResponseRedirect(reverse('url_operation', args=[id_camp])) |
|
1956 | # return HttpResponseRedirect(reverse('url_operation', args=[id_camp])) | |
1957 |
|
1957 | |||
1958 | def real_time(request): |
|
1958 | def real_time(request): | |
1959 |
|
1959 |
@@ -1,6 +1,6 | |||||
1 | {% extends "dev_conf.html" %} |
|
1 | {% extends "dev_conf.html" %} | |
2 | {% load static %} |
|
2 | {% load static %} | |
3 |
{% load bootstrap |
|
3 | {% load django_bootstrap5 %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 | |||
6 | {% block extra-menu-actions %} |
|
6 | {% block extra-menu-actions %} |
@@ -1,5 +1,5 | |||||
1 | {% extends "dev_conf_edit.html" %} |
|
1 | {% extends "dev_conf_edit.html" %} | |
2 |
{% load bootstrap |
|
2 | {% load django_bootstrap5 %} | |
3 | {% load static %} |
|
3 | {% load static %} | |
4 |
|
4 | |||
5 | {% block extra-head %} |
|
5 | {% block extra-head %} |
@@ -1,4 +1,4 | |||||
1 |
{% load bootstrap |
|
1 | {% load django_bootstrap5 %} | |
2 | <div class="pull-right"><button id="bt_toggle" type="button" class="btn btn-default btn-xs" > |
|
2 | <div class="pull-right"><button id="bt_toggle" type="button" class="btn btn-default btn-xs" > | |
3 | Expand/Collapse |
|
3 | Expand/Collapse | |
4 | </button></div><br><br> |
|
4 | </button></div><br><br> |
@@ -1,6 +1,6 | |||||
1 | {% extends "dev_conf.html" %} |
|
1 | {% extends "dev_conf.html" %} | |
2 | {% load static %} |
|
2 | {% load static %} | |
3 |
{% load bootstrap |
|
3 | {% load django_bootstrap5 %} | |
4 | {% load main_tags %} |
|
4 | {% load main_tags %} | |
5 |
|
5 | |||
6 | {% block extra-head %} |
|
6 | {% block extra-head %} |
@@ -35,7 +35,8 INSTALLED_APPS = [ | |||||
35 | 'django.contrib.sessions', |
|
35 | 'django.contrib.sessions', | |
36 | 'django.contrib.messages', |
|
36 | 'django.contrib.messages', | |
37 | 'django.contrib.staticfiles', |
|
37 | 'django.contrib.staticfiles', | |
38 |
|
|
38 | 'django_bootstrap5', | |
|
39 | 'graphene_django', | |||
39 | 'polymorphic', |
|
40 | 'polymorphic', | |
40 | 'apps.accounts', |
|
41 | 'apps.accounts', | |
41 | 'apps.main', |
|
42 | 'apps.main', | |
@@ -47,7 +48,6 INSTALLED_APPS = [ | |||||
47 | 'apps.abs', |
|
48 | 'apps.abs', | |
48 | 'apps.cgs', |
|
49 | 'apps.cgs', | |
49 | 'apps.dds_rest', |
|
50 | 'apps.dds_rest', | |
50 | 'graphene_django', |
|
|||
51 | ] |
|
51 | ] | |
52 |
|
52 | |||
53 | MIDDLEWARE = [ |
|
53 | MIDDLEWARE = [ |
General Comments 0
You need to be logged in to leave comments.
Login now