diff --git a/pyros.py b/pyros.py index f9ea13a..1845632 100755 --- a/pyros.py +++ b/pyros.py @@ -727,7 +727,7 @@ def test(module, function): # apps = ['obs_config','scp_mgmt','common', 'scheduling', 'seq_submit', 'user_mgmt', 'alert_mgmt.tests.TestStrategyChange'] # Removing alert_mgmt, scheduler from tests apps = ['obs_config', "scp_mgmt", - 'common', 'user_mgmt', 'seq_submit','api'] + 'dashboard', 'user_mgmt', 'seq_submit','api'] else: os.environ["PATH_TO_OBSCONF_FILE"] = os.path.join(os.path.abspath( PYROS_DJANGO_BASE_DIR), "obs_config/fixtures/observatory_configuration_ok_simple.yml") diff --git a/src/core/pyros_django/alert_mgmt/urls.py b/src/core/pyros_django/alert_mgmt/urls.py index 49ffcf4..ecb54fd 100644 --- a/src/core/pyros_django/alert_mgmt/urls.py +++ b/src/core/pyros_django/alert_mgmt/urls.py @@ -2,9 +2,9 @@ from django.urls import include, path # For django versions from 2.0 and up from . import views urlpatterns = [ - path('start_simulation', views.start_simulation, name="start_simulation"), - path('change_obs_strategy/', views.change_obs_strategy, name="change_obs_strategy"), - path('change_obs_strategy_validate/', views.change_obs_strategy_validate, name="change_obs_strategy_validate"), - path('alerts', views.alerts_list, name='alerts_list'), - path('change_default_strategy/', views.change_default_strategy, name='change_default_strategy'), + # path('start_simulation', views.start_simulation, name="start_simulation"), + # path('change_obs_strategy/', views.change_obs_strategy, name="change_obs_strategy"), + # path('change_obs_strategy_validate/', views.change_obs_strategy_validate, name="change_obs_strategy_validate"), + # path('alerts', views.alerts_list, name='alerts_list'), + # path('change_default_strategy/', views.change_default_strategy, name='change_default_strategy'), ] diff --git a/src/core/pyros_django/alert_mgmt/views.py b/src/core/pyros_django/alert_mgmt/views.py index ad2cb77..8db1892 100644 --- a/src/core/pyros_django/alert_mgmt/views.py +++ b/src/core/pyros_django/alert_mgmt/views.py @@ -1,172 +1,172 @@ -from django.shortcuts import render -from common.models import * -from alert_mgmt.StrategyBuilder import StrategyBuilder -import socket -import majordome -from django.contrib.auth.decorators import login_required -import alert_mgmt.tasks - -import os, time, shutil - -TEST_FILE = "unittest_voevent.xml" - -TEST_FILE_PATH = os.path.join(alert_mgmt.tasks.VOEVENTS_PATH, TEST_FILE) - -VOEVENTS_TO_SEND_PATH = "alert_mgmt/events_to_send" - - -@login_required -def start_simulation(request): - ''' - Called when the alert simulation button is pressed - Deletes then copies the test voevent file from the events_received folder - ''' - - if os.path.isfile(TEST_FILE_PATH): - os.remove(TEST_FILE_PATH) - print("================== DELETE FILE ==================") - time.sleep(3) - - print("================== COPY FILE ==================") - shutil.copyfile(os.path.join(VOEVENTS_TO_SEND_PATH, TEST_FILE), - TEST_FILE_PATH) - alerts = Alert.objects.order_by("-request__created") - if StrategyObs.objects.filter(is_default=True).exists(): - current_default = StrategyObs.objects.filter(is_default=True)[0].name - btn_type = "btn-primary" - else: - current_default = "Warning: please choose a default strategy" - btn_type = "btn-danger" - strat_list = StrategyObs.objects.all() - - success = True - message = "Simulation started successfully" - return render(request, "alert_mgmt/alerts.html", locals()) - -def alerts_list(request): - ''' - Display the list of all alerts - ''' - - alerts = Alert.objects.order_by("-request__created") - if StrategyObs.objects.filter(is_default=True).exists(): - current_default = StrategyObs.objects.filter(is_default=True)[0].name - btn_type = "btn-primary" - else: - current_default = "Warning: please choose a default strategy" - btn_type = "btn-danger" - strat_list = StrategyObs.objects.all() - #if request.user.is_authenticated: - base_template = "base.html" - return render(request, "alert_mgmt/alerts.html", locals()) - -@login_required -def change_default_strategy(request, strat_id): - ''' - Changes the strategy to be used when an alert is received - ''' - - strategies = StrategyObs.objects.all() - if strategies.filter(id=strat_id).exists(): - for strat in strategies: - strat.is_default = False - strat.save() - strat = strategies.get(id=strat_id) - strat.is_default = True - strat.save() - - success = True - message = "Default strategy successfully changed" - else: - error = True - message = "Could not find this strategy" - - alerts = Alert.objects.order_by("-request__created") - if StrategyObs.objects.filter(is_default=True).exists(): - current_default = StrategyObs.objects.filter(is_default=True)[0].name - btn_type = "btn-primary" - else: - current_default = "Warning: please choose a default strategy" - btn_type = "btn-danger" - strat_list = StrategyObs.objects.all() - - return render(request, "alert_mgmt/alerts.html", locals()) - - -@login_required -def change_obs_strategy(request, alert_id): - ''' - Open a page for a given alert, listing all the other strategies - ''' - - alert = Alert.objects.get(id=alert_id) - if alert.strategyobs is not None: - strategies = StrategyObs.objects.exclude(id=alert.strategyobs.id) - else: - strategies = StrategyObs.objects.all() - return render(request, "alert_mgmt/strategy_change.html", locals()) - - -@login_required -def change_obs_strategy_validate(request, alert_id): - ''' - Creates a new request with the strategy given for the selected alert - ''' - - try: - alert = Alert.objects.get(id=alert_id) - except Exception: - alerts = Alert.objects.all() - error = True - message = "This alert doesn't exist" - return render(request, "alert_mgmt/alerts.html", locals()) - - # All strategies except the current one - strategies = StrategyObs.objects.exclude(id=alert.strategyobs.id) - - if request.method == "POST": - - strategy_id = request.POST["strategy_choice"] - try: - strategy = StrategyObs.objects.get(id=strategy_id) - except Exception: - error = True - message = "This strategy doesn't exist" - return render(request, "alert_mgmt/strategy_change.html", locals()) - - if str(alert.strategyobs.id) == strategy_id: - error = True - message = "This is already the current strategy for this alert" - return render(request, "alert_mgmt/strategy_change.html", locals()) - - sb = StrategyBuilder() - file = strategy.xml_file - # (EP) Inutile, il y a plus rapide (Alert herite de Request) - #pyros_user = alert.request.pyros_user - pyros_user = alert.pyros_user - print("pyros user is", pyros_user) - # meme remarque - #scientific_program = alert.request.scientific_program - scientific_program = alert.scientific_program - print("SP is", scientific_program) - # meme remarque - #name = alert.request.name - name = alert.name - print("alert request name is", name) - sb.create_request_from_strategy(file, pyros_user, scientific_program, name) - print("New alert request created is", sb.rb.request) - req = sb.validate() - print("New alert request created is", req) - # Attention : Alert n'a pas de pk !!! c'est le pk de Request !!! - alert.pk = None - alert.strategyobs = strategy - alert.request_id = req - # C'est quoi ce beans de geek ??? !!! - alert.__dict__.update(req.__dict__) - alert.save() - strategies = StrategyObs.objects.exclude(id=alert.strategyobs.id) - - success = True - message = "Strategy successfully changed. A new request was created." - - return render(request, "alert_mgmt/strategy_change.html", locals()) +# from django.shortcuts import render +# from common.models import * +# from alert_mgmt.StrategyBuilder import StrategyBuilder +# import socket +# import majordome +# from django.contrib.auth.decorators import login_required +# import alert_mgmt.tasks + +# import os, time, shutil + +# TEST_FILE = "unittest_voevent.xml" + +# TEST_FILE_PATH = os.path.join(alert_mgmt.tasks.VOEVENTS_PATH, TEST_FILE) + +# VOEVENTS_TO_SEND_PATH = "alert_mgmt/events_to_send" + + +# @login_required +# def start_simulation(request): +# ''' +# Called when the alert simulation button is pressed +# Deletes then copies the test voevent file from the events_received folder +# ''' + +# if os.path.isfile(TEST_FILE_PATH): +# os.remove(TEST_FILE_PATH) +# print("================== DELETE FILE ==================") +# time.sleep(3) + +# print("================== COPY FILE ==================") +# shutil.copyfile(os.path.join(VOEVENTS_TO_SEND_PATH, TEST_FILE), +# TEST_FILE_PATH) +# alerts = Alert.objects.order_by("-request__created") +# if StrategyObs.objects.filter(is_default=True).exists(): +# current_default = StrategyObs.objects.filter(is_default=True)[0].name +# btn_type = "btn-primary" +# else: +# current_default = "Warning: please choose a default strategy" +# btn_type = "btn-danger" +# strat_list = StrategyObs.objects.all() + +# success = True +# message = "Simulation started successfully" +# return render(request, "alert_mgmt/alerts.html", locals()) + +# def alerts_list(request): +# ''' +# Display the list of all alerts +# ''' + +# alerts = Alert.objects.order_by("-request__created") +# if StrategyObs.objects.filter(is_default=True).exists(): +# current_default = StrategyObs.objects.filter(is_default=True)[0].name +# btn_type = "btn-primary" +# else: +# current_default = "Warning: please choose a default strategy" +# btn_type = "btn-danger" +# strat_list = StrategyObs.objects.all() +# #if request.user.is_authenticated: +# base_template = "base.html" +# return render(request, "alert_mgmt/alerts.html", locals()) + +# @login_required +# def change_default_strategy(request, strat_id): +# ''' +# Changes the strategy to be used when an alert is received +# ''' + +# strategies = StrategyObs.objects.all() +# if strategies.filter(id=strat_id).exists(): +# for strat in strategies: +# strat.is_default = False +# strat.save() +# strat = strategies.get(id=strat_id) +# strat.is_default = True +# strat.save() + +# success = True +# message = "Default strategy successfully changed" +# else: +# error = True +# message = "Could not find this strategy" + +# alerts = Alert.objects.order_by("-request__created") +# if StrategyObs.objects.filter(is_default=True).exists(): +# current_default = StrategyObs.objects.filter(is_default=True)[0].name +# btn_type = "btn-primary" +# else: +# current_default = "Warning: please choose a default strategy" +# btn_type = "btn-danger" +# strat_list = StrategyObs.objects.all() + +# return render(request, "alert_mgmt/alerts.html", locals()) + + +# @login_required +# def change_obs_strategy(request, alert_id): +# ''' +# Open a page for a given alert, listing all the other strategies +# ''' + +# alert = Alert.objects.get(id=alert_id) +# if alert.strategyobs is not None: +# strategies = StrategyObs.objects.exclude(id=alert.strategyobs.id) +# else: +# strategies = StrategyObs.objects.all() +# return render(request, "alert_mgmt/strategy_change.html", locals()) + + +# @login_required +# def change_obs_strategy_validate(request, alert_id): +# ''' +# Creates a new request with the strategy given for the selected alert +# ''' + +# try: +# alert = Alert.objects.get(id=alert_id) +# except Exception: +# alerts = Alert.objects.all() +# error = True +# message = "This alert doesn't exist" +# return render(request, "alert_mgmt/alerts.html", locals()) + +# # All strategies except the current one +# strategies = StrategyObs.objects.exclude(id=alert.strategyobs.id) + +# if request.method == "POST": + +# strategy_id = request.POST["strategy_choice"] +# try: +# strategy = StrategyObs.objects.get(id=strategy_id) +# except Exception: +# error = True +# message = "This strategy doesn't exist" +# return render(request, "alert_mgmt/strategy_change.html", locals()) + +# if str(alert.strategyobs.id) == strategy_id: +# error = True +# message = "This is already the current strategy for this alert" +# return render(request, "alert_mgmt/strategy_change.html", locals()) + +# sb = StrategyBuilder() +# file = strategy.xml_file +# # (EP) Inutile, il y a plus rapide (Alert herite de Request) +# #pyros_user = alert.request.pyros_user +# pyros_user = alert.pyros_user +# print("pyros user is", pyros_user) +# # meme remarque +# #scientific_program = alert.request.scientific_program +# scientific_program = alert.scientific_program +# print("SP is", scientific_program) +# # meme remarque +# #name = alert.request.name +# name = alert.name +# print("alert request name is", name) +# sb.create_request_from_strategy(file, pyros_user, scientific_program, name) +# print("New alert request created is", sb.rb.request) +# req = sb.validate() +# print("New alert request created is", req) +# # Attention : Alert n'a pas de pk !!! c'est le pk de Request !!! +# alert.pk = None +# alert.strategyobs = strategy +# alert.request_id = req +# # C'est quoi ce beans de geek ??? !!! +# alert.__dict__.update(req.__dict__) +# alert.save() +# strategies = StrategyObs.objects.exclude(id=alert.strategyobs.id) + +# success = True +# message = "Strategy successfully changed. A new request was created." + +# return render(request, "alert_mgmt/strategy_change.html", locals()) diff --git a/src/core/pyros_django/common/admin.py b/src/core/pyros_django/common/admin.py index 3b7fc12..2b57ca3 100644 --- a/src/core/pyros_django/common/admin.py +++ b/src/core/pyros_django/common/admin.py @@ -15,282 +15,283 @@ from devices.models import Detector, Filter, AgentDeviceStatus, FilterWheel, Tel from seq_submit.models import Image, Schedule, Sequence, Album, Plan, ScheduleHasSequences #, StrategyObs, NrtAnalysis #from seq_submit.models import Image, StrategyObs, Schedule, Request, Alert, Sequence, Album, Plan, NrtAnalysis, ScheduleHasSequences +# MOVED TO DASHBOARD # EP added -class ReadOnlyModelAdmin(admin.ModelAdmin): - """ModelAdmin class that prevents modifications through the admin. - The changelist and the detail view work, but a 403 is returned - if one actually tries to edit an object. - Source: https://gist.github.com/aaugustin/1388243 - """ +# class ReadOnlyModelAdmin(admin.ModelAdmin): +# """ModelAdmin class that prevents modifications through the admin. +# The changelist and the detail view work, but a 403 is returned +# if one actually tries to edit an object. +# Source: https://gist.github.com/aaugustin/1388243 +# """ - actions = None +# actions = None - def get_readonly_fields(self, request, obj=None): - return self.fields or [f.name for f in self.model._meta.fields] +# def get_readonly_fields(self, request, obj=None): +# return self.fields or [f.name for f in self.model._meta.fields] - def has_add_permission(self, request): - return False +# def has_add_permission(self, request): +# return False - # Allow viewing objects but not actually changing them - def has_change_permission(self, request, obj=None): - if request.method not in ('GET', 'HEAD'): - return False - return super(ReadOnlyModelAdmin, self).has_change_permission(request, obj) +# # Allow viewing objects but not actually changing them +# def has_change_permission(self, request, obj=None): +# if request.method not in ('GET', 'HEAD'): +# return False +# return super(ReadOnlyModelAdmin, self).has_change_permission(request, obj) - def has_delete_permission(self, request, obj=None): - return False +# def has_delete_permission(self, request, obj=None): +# return False -# EP added +# # EP added + +# # Edit mode +# # DEBUG = False +# # View only mode +# # DEBUG = True -# Edit mode -# DEBUG = False -# View only mode -# DEBUG = True +# ''' Uncomment for production ''' -''' Uncomment for production ''' +# # if settings.DEBUG: +# # class PyrosModelAdmin(ReadOnlyModelAdmin): +# # pass +# # else: +# # class PyrosModelAdmin(admin.ModelAdmin): +# # pass -# if settings.DEBUG: -# class PyrosModelAdmin(ReadOnlyModelAdmin): + +# class PyrosModelAdmin(admin.ModelAdmin): # pass -# else: -# class PyrosModelAdmin(admin.ModelAdmin): -# pass +# # Many To Many interface adapter -class PyrosModelAdmin(admin.ModelAdmin): - pass -# Many To Many interface adapter +# class PyrosUserAndSPInline(admin.TabularInline): +# #model = ScientificProgram.pyros_users.through +# pass -class PyrosUserAndSPInline(admin.TabularInline): - #model = ScientificProgram.pyros_users.through - pass +# class SequenceAndScheduleInline(admin.TabularInline): +# model = Schedule.sequences.through +# class PyrosUserAndUserLevelInline(admin.TabularInline): +# # add admin representation for m2m relation between PyrosUser and UserLevel +# model = UserLevel.pyros_users.through -class SequenceAndScheduleInline(admin.TabularInline): - model = Schedule.sequences.through +# class ScheduleAdmin(admin.ModelAdmin): +# inlines = [ +# SequenceAndScheduleInline, +# ] +# exclude = ('sequences',) -class PyrosUserAndUserLevelInline(admin.TabularInline): - # add admin representation for m2m relation between PyrosUser and UserLevel - model = UserLevel.pyros_users.through -class ScheduleAdmin(admin.ModelAdmin): - inlines = [ - SequenceAndScheduleInline, - ] - exclude = ('sequences',) +# # One To Many interface adapters +# class SequenceInline(admin.TabularInline): +# model = Sequence +# readonly_fields = ("name",) +# fields = ("name",) +# show_change_link = True -# One To Many interface adapters -class SequenceInline(admin.TabularInline): - model = Sequence - readonly_fields = ("name",) - fields = ("name",) - show_change_link = True +# # class RequestInline(admin.TabularInline): +# # model = Request +# # readonly_fields = ("name",) +# # fields = ("name",) +# # show_change_link = True -# class RequestInline(admin.TabularInline): -# model = Request +# class AlbumInline(admin.TabularInline): +# model = Album # readonly_fields = ("name",) # fields = ("name",) # show_change_link = True -class AlbumInline(admin.TabularInline): - model = Album - readonly_fields = ("name",) - fields = ("name",) - show_change_link = True +# class PlanInline(admin.TabularInline): +# model = Plan +# #readonly_fields = ("name",) +# #fields = ("name",) +# show_change_link = True -class PlanInline(admin.TabularInline): - model = Plan - #readonly_fields = ("name",) - #fields = ("name",) - show_change_link = True +# class ImageInline(admin.TabularInline): +# model = Image +# readonly_fields = ("name",) +# fields = ("name",) +# show_change_link = True -class ImageInline(admin.TabularInline): - model = Image - readonly_fields = ("name",) - fields = ("name",) - show_change_link = True +# class DetectorInline(admin.TabularInline): +# model = Detector +# readonly_fields = ("device_name",) +# fields = ("device_name",) +# show_change_link = True -class DetectorInline(admin.TabularInline): - model = Detector - readonly_fields = ("device_name",) - fields = ("device_name",) - show_change_link = True +# class PyrosUserInline(admin.TabularInline): +# model = PyrosUser +# readonly_fields = ("user_username",) +# fields = ("user_username",) +# show_change_link = True -class PyrosUserInline(admin.TabularInline): - model = PyrosUser - readonly_fields = ("user_username",) - fields = ("user_username",) - show_change_link = True +# class FilterInline(admin.TabularInline): +# model = Filter +# readonly_fields = ("device_name",) +# fields = ("device_name",) +# show_change_link = True -class FilterInline(admin.TabularInline): - model = Filter - readonly_fields = ("device_name",) - fields = ("device_name",) - show_change_link = True +# # class AlertInline(admin.TabularInline): +# # model = Alert +# # readonly_fields = ("request_name",) +# # fields = ("request_name",) +# # show_change_link = True -# class AlertInline(admin.TabularInline): -# model = Alert -# readonly_fields = ("request_name",) -# fields = ("request_name",) -# show_change_link = True +# # Admin model classes + +# # class RequestAdmin(PyrosModelAdmin): +# # pass +# # inlines = [ +# # SequenceInline, +# # ] + + +# class SequenceAdmin(PyrosModelAdmin): +# inlines = [ +# AlbumInline, +# SequenceAndScheduleInline, # for M2M interface +# ] -# Admin model classes +# class PyrosUserAdmin(PyrosModelAdmin): +# list_display = ("user_username","is_active","laboratory") +# list_filter = ("is_active",) +# list_editable = ("is_active",) +# inlines = [ +# #RequestInline, +# # A user has many SPs +# # PyrosUserAndSPInline, # for M2M interface +# ] -# class RequestAdmin(PyrosModelAdmin): -# pass - # inlines = [ - # SequenceInline, - # ] +# ''' +# class StrategyObsAdmin(PyrosModelAdmin): +# inlines = [ +# #AlertInline, +# ] +# ''' -class SequenceAdmin(PyrosModelAdmin): - inlines = [ - AlbumInline, - SequenceAndScheduleInline, # for M2M interface - ] +# class ScientificProgramAdmin(PyrosModelAdmin): +# inlines = [ +# #RequestInline, +# # A SP has many users: +# # PyrosUserAndSPInline, # for M2M interface +# ] +# exclude = ('pyros_users',) # for M2M interface -class PyrosUserAdmin(PyrosModelAdmin): - list_display = ("user_username","is_active","laboratory") - list_filter = ("is_active",) - list_editable = ("is_active",) - inlines = [ - #RequestInline, - # A user has many SPs -# PyrosUserAndSPInline, # for M2M interface - ] +# class CountryAdmin(PyrosModelAdmin): +# inlines = [ +# PyrosUserInline, +# ] -''' -class StrategyObsAdmin(PyrosModelAdmin): - inlines = [ - #AlertInline, - ] -''' +# class UserLevelAdmin(PyrosModelAdmin): +# inlines = [ +# #PyrosUserInline, +# PyrosUserAndUserLevelInline, +# ] +# list_display = ("name","priority",) +# # we need to exclude pyros_users which represents the m2m relation between UserLevel and PyrosUser +# exclude = ("pyros_users",) + + +# class FilterAdmin(PyrosModelAdmin): +# # inlines = [ +# # PlanInline, +# # ] +# pass -class ScientificProgramAdmin(PyrosModelAdmin): - inlines = [ - #RequestInline, - # A SP has many users: - # PyrosUserAndSPInline, # for M2M interface - ] - exclude = ('pyros_users',) # for M2M interface - - -class CountryAdmin(PyrosModelAdmin): - inlines = [ - PyrosUserInline, - ] - - -class UserLevelAdmin(PyrosModelAdmin): - inlines = [ - #PyrosUserInline, - PyrosUserAndUserLevelInline, - ] - list_display = ("name","priority",) - # we need to exclude pyros_users which represents the m2m relation between UserLevel and PyrosUser - exclude = ("pyros_users",) - - -class FilterAdmin(PyrosModelAdmin): - # inlines = [ - # PlanInline, - # ] - pass - - -class FilterWheelAdmin(PyrosModelAdmin): - inlines = [ - FilterInline, - ] - - -''' -class NrtAnalysisAdmin(PyrosModelAdmin): - inlines = [ - ImageInline, - ] -''' - - -class DetectorAdmin(PyrosModelAdmin): - pass - # inlines = [ - # AlbumInline, - # ] - - -class TelescopeAdmin(PyrosModelAdmin): - inlines = [ - DetectorInline, - ] - - -class PlanAdmin(PyrosModelAdmin): - inlines = [ - ImageInline, - ] - - -# class AlbumAdmin(admin.ModelAdmin): -class AlbumAdmin(PyrosModelAdmin): - inlines = [ - PlanInline, - ] - - -# Link the models to the admin interface - -# (EP added 10/7/19) -admin.site.register(AgentCmd) -admin.site.register(AgentLogs) -admin.site.register(AgentSurvey) -admin.site.register(AgentDeviceStatus) - - -admin.site.register(Album, AlbumAdmin) -#admin.site.register(Alert) -admin.site.register(Country, CountryAdmin) -admin.site.register(Detector, DetectorAdmin) -admin.site.register(Filter, FilterAdmin) -admin.site.register(FilterWheel, FilterWheelAdmin) -admin.site.register(Image) -admin.site.register(Log) -#admin.site.register(NrtAnalysis, NrtAnalysisAdmin) -admin.site.register(Plan, PlanAdmin) -#admin.site.register(Request, RequestAdmin) -admin.site.register(Schedule, ScheduleAdmin) -admin.site.register(ScheduleHasSequences) -admin.site.register(ScientificProgram, ScientificProgramAdmin) -admin.site.register(Sequence, SequenceAdmin) -admin.site.register(SiteWatch) -admin.site.register(SiteWatchHistory) -#admin.site.register(StrategyObs, StrategyObsAdmin) -##admin.site.register(TaskId) -admin.site.register(Telescope, TelescopeAdmin) -admin.site.register(PyrosUser, PyrosUserAdmin) -admin.site.register(UserLevel, UserLevelAdmin) -admin.site.register(Version) -admin.site.register(WeatherWatch) -admin.site.register(WeatherWatchHistory) -admin.site.register(PlcDeviceStatus) -admin.site.register(PlcDevice) -admin.site.register(Config) -admin.site.register(Institute) \ No newline at end of file + +# class FilterWheelAdmin(PyrosModelAdmin): +# inlines = [ +# FilterInline, +# ] + + +# ''' +# class NrtAnalysisAdmin(PyrosModelAdmin): +# inlines = [ +# ImageInline, +# ] +# ''' + + +# class DetectorAdmin(PyrosModelAdmin): +# pass +# # inlines = [ +# # AlbumInline, +# # ] + + +# class TelescopeAdmin(PyrosModelAdmin): +# inlines = [ +# DetectorInline, +# ] + + +# class PlanAdmin(PyrosModelAdmin): +# inlines = [ +# ImageInline, +# ] + + +# # class AlbumAdmin(admin.ModelAdmin): +# class AlbumAdmin(PyrosModelAdmin): +# inlines = [ +# PlanInline, +# ] + + +# # Link the models to the admin interface + +# # (EP added 10/7/19) +# admin.site.register(AgentCmd) +# admin.site.register(AgentLogs) +# admin.site.register(AgentSurvey) +# admin.site.register(AgentDeviceStatus) + + +# admin.site.register(Album, AlbumAdmin) +# #admin.site.register(Alert) +# admin.site.register(Country, CountryAdmin) +# admin.site.register(Detector, DetectorAdmin) +# admin.site.register(Filter, FilterAdmin) +# admin.site.register(FilterWheel, FilterWheelAdmin) +# admin.site.register(Image) +# admin.site.register(Log) +# #admin.site.register(NrtAnalysis, NrtAnalysisAdmin) +# admin.site.register(Plan, PlanAdmin) +# #admin.site.register(Request, RequestAdmin) +# admin.site.register(Schedule, ScheduleAdmin) +# admin.site.register(ScheduleHasSequences) +# admin.site.register(ScientificProgram, ScientificProgramAdmin) +# admin.site.register(Sequence, SequenceAdmin) +# admin.site.register(SiteWatch) +# admin.site.register(SiteWatchHistory) +# #admin.site.register(StrategyObs, StrategyObsAdmin) +# ##admin.site.register(TaskId) +# admin.site.register(Telescope, TelescopeAdmin) +# admin.site.register(PyrosUser, PyrosUserAdmin) +# admin.site.register(UserLevel, UserLevelAdmin) +# admin.site.register(Version) +# admin.site.register(WeatherWatch) +# admin.site.register(WeatherWatchHistory) +# admin.site.register(PlcDeviceStatus) +# admin.site.register(PlcDevice) +# admin.site.register(Config) +# admin.site.register(Institute) \ No newline at end of file diff --git a/src/core/pyros_django/common/models.py b/src/core/pyros_django/common/models.py index 6ebbd8a..7f84411 100644 --- a/src/core/pyros_django/common/models.py +++ b/src/core/pyros_django/common/models.py @@ -197,136 +197,138 @@ def get_or_create_unique_row_from_model(model: models.Model): ------------------------ OTHER MODEL CLASSES ------------------------ -""" - - -# TODO: OLD Config : à virer (mais utilisé dans dashboard/templatetags/tags.py) -class Config(models.Model): - PYROS_STATE = ["Starting", "Passive", "Standby", - "Remote", "Startup", "Scheduler", "Closing"] - - id = models.IntegerField(default='1', primary_key=True) - #latitude = models.FloatField(default=1) - latitude = models.DecimalField( - max_digits=4, decimal_places=2, - default=1, - validators=[ - MaxValueValidator(90), - MinValueValidator(-90) - ] - ) - local_time_zone = models.FloatField(default=1) - #longitude = models.FloatField(default=1) - longitude = models.DecimalField( - max_digits=5, decimal_places=2, - default=1, - validators=[ - MaxValueValidator(360), - MinValueValidator(-360) - ] - ) - altitude = models.FloatField(default=1) - horizon_line = models.FloatField(default=1) - row_data_save_frequency = models.IntegerField(default='300') - request_frequency = models.IntegerField(default='300') - analysed_data_save = models.IntegerField(default='300') - telescope_ip_address = models.CharField(max_length=45, default="127.0.0.1") - camera_ip_address = models.CharField(max_length=45, default="127.0.0.1") - plc_ip_address = models.CharField(max_length=45, default="127.0.0.1") - - # TODO: changer ça, c'est pas clair du tout... - # True = mode Scheduler-standby, False = mode Remote !!!! - global_mode = models.BooleanField(default='True') - - ack = models.BooleanField(default='False') - bypass = models.BooleanField(default='True') - lock = models.BooleanField(default='False') - pyros_state = models.CharField(max_length=25, default=PYROS_STATE[0]) - force_passive_mode = models.BooleanField(default='False') - plc_timeout_seconds = models.PositiveIntegerField(default=60) - majordome_state = models.CharField(max_length=25, default="") - ntc = models.BooleanField(default='False') - majordome_restarted = models.BooleanField(default='False') - - class Meta: - managed = True - db_table = 'config' - verbose_name_plural = "Config" - - def __str__(self): - return (str(self.__dict__)) - - - -class Log(models.Model): - agent = models.CharField(max_length=45, blank=True, null=True) - created = models.DateTimeField(blank=True, null=True, auto_now_add=True) - message = models.TextField(blank=True, null=True) - - class Meta: - managed = True - db_table = 'log' - - def __str__(self): - return (str(self.agent)) +""" -# TODO: à virer car utilisé pour Celery (ou bien à utiliser pour les agents) -''' -class TaskId(models.Model): - task = models.CharField(max_length=45, blank=True, null=True) - created = models.DateTimeField(blank=True, null=True, auto_now_add=True) - task_id = models.CharField(max_length=45, blank=True, null=True) - - class Meta: - managed = True - db_table = 'task_id' - - def __str__(self): - return (str(self.task) + " - " + str(self.task_id)) -''' - - -class Version(models.Model): - module_name = models.CharField(max_length=45, blank=True, null=True) - version = models.CharField(max_length=15, blank=True, null=True) - created = models.DateTimeField(blank=True, null=True, auto_now_add=True) - updated = models.DateTimeField(blank=True, null=True, auto_now=True) - - class Meta: - managed = True - db_table = 'version' - - def __str__(self): - return (str(self.module_name) + " - " + str(self.version)) +# MOVED TO DASHBOARD MODELS + +# # TODO: OLD Config : à virer (mais utilisé dans dashboard/templatetags/tags.py) +# class Config(models.Model): +# PYROS_STATE = ["Starting", "Passive", "Standby", +# "Remote", "Startup", "Scheduler", "Closing"] + +# id = models.IntegerField(default='1', primary_key=True) +# #latitude = models.FloatField(default=1) +# latitude = models.DecimalField( +# max_digits=4, decimal_places=2, +# default=1, +# validators=[ +# MaxValueValidator(90), +# MinValueValidator(-90) +# ] +# ) +# local_time_zone = models.FloatField(default=1) +# #longitude = models.FloatField(default=1) +# longitude = models.DecimalField( +# max_digits=5, decimal_places=2, +# default=1, +# validators=[ +# MaxValueValidator(360), +# MinValueValidator(-360) +# ] +# ) +# altitude = models.FloatField(default=1) +# horizon_line = models.FloatField(default=1) +# row_data_save_frequency = models.IntegerField(default='300') +# request_frequency = models.IntegerField(default='300') +# analysed_data_save = models.IntegerField(default='300') +# telescope_ip_address = models.CharField(max_length=45, default="127.0.0.1") +# camera_ip_address = models.CharField(max_length=45, default="127.0.0.1") +# plc_ip_address = models.CharField(max_length=45, default="127.0.0.1") + +# # TODO: changer ça, c'est pas clair du tout... +# # True = mode Scheduler-standby, False = mode Remote !!!! +# global_mode = models.BooleanField(default='True') + +# ack = models.BooleanField(default='False') +# bypass = models.BooleanField(default='True') +# lock = models.BooleanField(default='False') +# pyros_state = models.CharField(max_length=25, default=PYROS_STATE[0]) +# force_passive_mode = models.BooleanField(default='False') +# plc_timeout_seconds = models.PositiveIntegerField(default=60) +# majordome_state = models.CharField(max_length=25, default="") +# ntc = models.BooleanField(default='False') +# majordome_restarted = models.BooleanField(default='False') + +# class Meta: +# managed = True +# db_table = 'config' +# verbose_name_plural = "Config" + +# def __str__(self): +# return (str(self.__dict__)) + + + +# class Log(models.Model): +# agent = models.CharField(max_length=45, blank=True, null=True) +# created = models.DateTimeField(blank=True, null=True, auto_now_add=True) +# message = models.TextField(blank=True, null=True) + +# class Meta: +# managed = True +# db_table = 'log' + +# def __str__(self): +# return (str(self.agent)) + + +# # TODO: à virer car utilisé pour Celery (ou bien à utiliser pour les agents) +# ''' +# class TaskId(models.Model): +# task = models.CharField(max_length=45, blank=True, null=True) +# created = models.DateTimeField(blank=True, null=True, auto_now_add=True) +# task_id = models.CharField(max_length=45, blank=True, null=True) + +# class Meta: +# managed = True +# db_table = 'task_id' + +# def __str__(self): +# return (str(self.task) + " - " + str(self.task_id)) +# ''' + + +# class Version(models.Model): +# module_name = models.CharField(max_length=45, blank=True, null=True) +# version = models.CharField(max_length=15, blank=True, null=True) +# created = models.DateTimeField(blank=True, null=True, auto_now_add=True) +# updated = models.DateTimeField(blank=True, null=True, auto_now=True) + +# class Meta: +# managed = True +# db_table = 'version' + +# def __str__(self): +# return (str(self.module_name) + " - " + str(self.version)) -class Tickets(models.Model): - created = models.DateTimeField(blank=True, null=True, auto_now_add=True) - updated = models.DateTimeField(blank=True, null=True, auto_now=True) - end = models.DateTimeField(blank=True, null=True) - title = models.TextField(blank=True, null=True) - description = models.TextField(blank=True, null=True) - resolution = models.TextField(blank=True, null=True) - pyros_user = models.ForeignKey(PyrosUser, on_delete=models.DO_NOTHING, related_name="tickets", blank=True, null=True) - last_modified_by = models.ForeignKey(PyrosUser, on_delete=models.DO_NOTHING, related_name="tickets_modified_by", blank=True, null=True) - LEVEL_ONE = "ONE" - LEVEL_TWO = "TWO" - LEVEL_THREE = "THREE" - LEVEL_FOUR = "FOUR" - LEVEL_FIVE = "FIVE" - SECURITY_LEVEL_CHOICES = ( - (LEVEL_ONE,"Warning non compromising for the operation of the system"), - (LEVEL_TWO,"Known issue which can be solved by operating the software remotely"), - (LEVEL_THREE,"Known issue which can be solved by an human remotely"), - (LEVEL_FOUR,"Known issue without immediate solution"), - (LEVEL_FIVE,"Issue not categorized until it happened") - ) - security_level = models.TextField(choices=SECURITY_LEVEL_CHOICES, default=LEVEL_ONE) - - class Meta: - managed = True - db_table = 'tickets' - verbose_name_plural = "tickets" +# class Tickets(models.Model): +# created = models.DateTimeField(blank=True, null=True, auto_now_add=True) +# updated = models.DateTimeField(blank=True, null=True, auto_now=True) +# end = models.DateTimeField(blank=True, null=True) +# title = models.TextField(blank=True, null=True) +# description = models.TextField(blank=True, null=True) +# resolution = models.TextField(blank=True, null=True) +# pyros_user = models.ForeignKey(PyrosUser, on_delete=models.DO_NOTHING, related_name="tickets", blank=True, null=True) +# last_modified_by = models.ForeignKey(PyrosUser, on_delete=models.DO_NOTHING, related_name="tickets_modified_by", blank=True, null=True) +# LEVEL_ONE = "ONE" +# LEVEL_TWO = "TWO" +# LEVEL_THREE = "THREE" +# LEVEL_FOUR = "FOUR" +# LEVEL_FIVE = "FIVE" +# SECURITY_LEVEL_CHOICES = ( +# (LEVEL_ONE,"Warning non compromising for the operation of the system"), +# (LEVEL_TWO,"Known issue which can be solved by operating the software remotely"), +# (LEVEL_THREE,"Known issue which can be solved by an human remotely"), +# (LEVEL_FOUR,"Known issue without immediate solution"), +# (LEVEL_FIVE,"Issue not categorized until it happened") +# ) +# security_level = models.TextField(choices=SECURITY_LEVEL_CHOICES, default=LEVEL_ONE) + +# class Meta: +# managed = True +# db_table = 'tickets' +# verbose_name_plural = "tickets" diff --git a/src/core/pyros_django/common/tests.py b/src/core/pyros_django/common/tests.py index f9966fe..23aacfb 100644 --- a/src/core/pyros_django/common/tests.py +++ b/src/core/pyros_django/common/tests.py @@ -9,7 +9,7 @@ from django.utils import timezone # Project imports from user_mgmt.models import Country from common.models import * -from common.RequestBuilder import RequestBuilder +# from common.RequestBuilder import RequestBuilder #log = setupLogger("common", "common") diff --git a/src/core/pyros_django/dashboard/forms.py b/src/core/pyros_django/dashboard/forms.py index 9930b48..ac283c5 100644 --- a/src/core/pyros_django/dashboard/forms.py +++ b/src/core/pyros_django/dashboard/forms.py @@ -3,37 +3,37 @@ from django import forms # Project imports from user_mgmt.models import PyrosUser #, UserLevel -from common.models import Config +#from common.models import Config from majordome.models import Majordome -class ConfigForm(forms.ModelForm): - class Meta: - model = Config - fields = ('latitude', - 'local_time_zone', - 'longitude', - 'altitude', - 'horizon_line', - 'row_data_save_frequency', - 'request_frequency', - 'analysed_data_save', - 'telescope_ip_address', - 'camera_ip_address', - 'plc_ip_address',) - labels = { - 'latitude': ('Latitude :'), - 'local_time_zone': ('Local Time Zone :'), - 'longitude': ('Longitude :'), - 'altitude': ('Altitude :'), - 'horizon_line': ('Horizon Line :'), - 'row_data_save_frequency': ('Row Data Save Frequency :'), - 'request_frequency': ('Request Frequency :'), - 'analysed_data_save': ('Analysed Data Save :'), - 'telescope_ip_address': ('Ip Address :'), - 'camera_ip_address': ('Ip Address :'), - 'plc_ip_address': ('Ip Address :'), - } +# class ConfigForm(forms.ModelForm): +# class Meta: +# model = Config +# fields = ('latitude', +# 'local_time_zone', +# 'longitude', +# 'altitude', +# 'horizon_line', +# 'row_data_save_frequency', +# 'request_frequency', +# 'analysed_data_save', +# 'telescope_ip_address', +# 'camera_ip_address', +# 'plc_ip_address',) +# labels = { +# 'latitude': ('Latitude :'), +# 'local_time_zone': ('Local Time Zone :'), +# 'longitude': ('Longitude :'), +# 'altitude': ('Altitude :'), +# 'horizon_line': ('Horizon Line :'), +# 'row_data_save_frequency': ('Row Data Save Frequency :'), +# 'request_frequency': ('Request Frequency :'), +# 'analysed_data_save': ('Analysed Data Save :'), +# 'telescope_ip_address': ('Ip Address :'), +# 'camera_ip_address': ('Ip Address :'), +# 'plc_ip_address': ('Ip Address :'), +# } class MajordomeForm(forms.ModelForm): class Meta: diff --git a/src/core/pyros_django/dashboard/templatetags/tags.py b/src/core/pyros_django/dashboard/templatetags/tags.py index 28d5204..2fe39e5 100644 --- a/src/core/pyros_django/dashboard/templatetags/tags.py +++ b/src/core/pyros_django/dashboard/templatetags/tags.py @@ -9,7 +9,7 @@ from django.conf import settings # Project imports #from common.models import Config, PyrosUser, PyrosState from user_mgmt.models import PyrosUser, UserLevel -from common.models import Config +from dashboard.models import Config from majordome.models import Majordome register = template.Library() diff --git a/src/core/pyros_django/dashboard/urls.py b/src/core/pyros_django/dashboard/urls.py index 23125dd..0453154 100644 --- a/src/core/pyros_django/dashboard/urls.py +++ b/src/core/pyros_django/dashboard/urls.py @@ -6,7 +6,6 @@ from . import views urlpatterns = [ path('index', views.index, name='index'), - path('configuration', views.configUpdate, name='configuration'), path('status', views.change_globalMode, name='change_globalMode'), path('bypass', views.change_bypass, name='change_bypass'), path('lock', views.change_lock, name='change_lock'), diff --git a/src/core/pyros_django/dashboard/views.py b/src/core/pyros_django/dashboard/views.py index 98cfaac..0fddbe0 100644 --- a/src/core/pyros_django/dashboard/views.py +++ b/src/core/pyros_django/dashboard/views.py @@ -32,13 +32,12 @@ from django.utils.http import urlencode # Project imports from env_monitor.models import WeatherWatch, SiteWatch, WeatherWatchHistory, Env_data, Env_data_hist from majordome.models import Majordome, AgentSurvey, AgentCmd -from common.models import Log, Config #from user_mgmt.models import PyrosUser, UserLevel from user_mgmt.models import ScientificProgram, SP_Period_Guest #from scp_mgmt.models import ScientificProgram, SP_Period_Guest from devices.models import PlcDeviceStatus, TelescopeCommand #, Telescope -from dashboard.forms import ConfigForm, MajordomeForm #, UserForm +from dashboard.forms import MajordomeForm #, UserForm from dashboard.decorator import level_required from devices.Telescope import TelescopeController from devices.TelescopeRemoteControlDefault import TelescopeRemoteControlDefault @@ -798,15 +797,15 @@ def proposal(request): return render(request, 'dashboard/proposal.html', {'proposal_info' : proposal_info, 'nb_info_proposal' : nb_info_proposal}) -@login_required -#@level_required(5) -def configUpdate(request): - instance = get_object_or_404(Config, id=1) - form = ConfigForm(request.POST or None, instance=instance) - if form.is_valid(): - form.save() - return reverse('settings') - return render(request, 'dashboard/configuration.html', {'form': form}) +# @login_required +# #@level_required(5) +# def configUpdate(request): +# instance = get_object_or_404(Config, id=1) +# form = ConfigForm(request.POST or None, instance=instance) +# if form.is_valid(): +# form.save() +# return reverse('settings') +# return render(request, 'dashboard/configuration.html', {'form': form}) @login_required diff --git a/src/core/pyros_django/devices/Device.py b/src/core/pyros_django/devices/Device.py index 55450dd..e207f0a 100644 --- a/src/core/pyros_django/devices/Device.py +++ b/src/core/pyros_django/devices/Device.py @@ -7,7 +7,7 @@ import select #import utils.Logger as L import time import os -from common.models import Log +from dashboard.models import Log DEBUG_FILE = True RECONNECT_TIMEOUT_SECONDS = 20 diff --git a/src/core/pyros_django/devices/TelescopeRemoteControlAbstract.py b/src/core/pyros_django/devices/TelescopeRemoteControlAbstract.py index f2cc0d5..0133f0a 100644 --- a/src/core/pyros_django/devices/TelescopeRemoteControlAbstract.py +++ b/src/core/pyros_django/devices/TelescopeRemoteControlAbstract.py @@ -1,5 +1,5 @@ from django.conf import settings -from common.models import Log +from dashboard.models import Log from devices.Telescope import TelescopeController diff --git a/src/core/pyros_django/devices/TelescopeRemoteControlDefault.py b/src/core/pyros_django/devices/TelescopeRemoteControlDefault.py index 157b68a..093557a 100644 --- a/src/core/pyros_django/devices/TelescopeRemoteControlDefault.py +++ b/src/core/pyros_django/devices/TelescopeRemoteControlDefault.py @@ -1,5 +1,5 @@ from django.conf import settings -from common.models import Log +from dashboard.models import Log from devices.TelescopeRemoteControlAbstract import TelescopeRemoteControlAbstract from devices.Telescope import TelescopeController import os diff --git a/src/core/pyros_django/devices/views.py b/src/core/pyros_django/devices/views.py index 21d88c7..c57703c 100644 --- a/src/core/pyros_django/devices/views.py +++ b/src/core/pyros_django/devices/views.py @@ -1,5 +1,5 @@ from django.shortcuts import render, get_object_or_404 -from common.models import Log, Config +from dashboard.models import Log, Config from django.http import HttpResponse from django.core import serializers from django.contrib.auth.decorators import login_required diff --git a/src/core/pyros_django/majordome/agent/A_SST.py b/src/core/pyros_django/majordome/agent/A_SST.py index 9575086..81af787 100644 --- a/src/core/pyros_django/majordome/agent/A_SST.py +++ b/src/core/pyros_django/majordome/agent/A_SST.py @@ -108,7 +108,6 @@ class A_SST(Agent): self._no_restart = False wildcard = "../../*/A*_*" self._general_agents = glob.glob(wildcard, recursive=True) - print(self._general_agents) #log.info(f"PC hostname is {self.computer}") # @Override diff --git a/src/core/pyros_django/majordome/majordome_test.py b/src/core/pyros_django/majordome/majordome_test.py index eb89a7d..f5ddacc 100755 --- a/src/core/pyros_django/majordome/majordome_test.py +++ b/src/core/pyros_django/majordome/majordome_test.py @@ -173,7 +173,7 @@ assert djangosettings.DATABASES["default"]["NAME"] == "pyros_test" i += 1 print_step_message(i, "Get config") # Needs sys.path.append('..') -from common.models import Config, PlcDeviceStatus +from dashboard.models import Config, PlcDeviceStatus config = get_object_or_404(Config, id=1) print("config id is", config.id) diff --git a/src/core/pyros_django/misc/fixtures/initial_fixture.json b/src/core/pyros_django/misc/fixtures/initial_fixture.json index 818d622..57a858e 100644 --- a/src/core/pyros_django/misc/fixtures/initial_fixture.json +++ b/src/core/pyros_django/misc/fixtures/initial_fixture.json @@ -564,28 +564,6 @@ "dir_level": null, "can_del_void_req": false } -}, - -{ - "model": "common.config", - "pk": 1, - "fields": { - "id": 1, - "latitude": 1, - "local_time_zone": 1, - "longitude": 1, - "altitude": 1, - "horizon_line": 1, - "row_data_save_frequency": 300, - "request_frequency": 300, - "analysed_data_save": 300, - "telescope_ip_address": "127.0.0.1", - "camera_ip_address": "127.0.0.1", - "plc_ip_address": "127.0.0.1", - "global_mode": true, - "ack": true, - "bypass": false, - "plc_timeout_seconds": 10 - } } + ] diff --git a/src/core/pyros_django/misc/fixtures/initial_fixture_TZ.json b/src/core/pyros_django/misc/fixtures/initial_fixture_TZ.json index 421edfa..2b83d63 100644 --- a/src/core/pyros_django/misc/fixtures/initial_fixture_TZ.json +++ b/src/core/pyros_django/misc/fixtures/initial_fixture_TZ.json @@ -1,49 +1,41 @@ -[{ - "model": "common.country", - "pk": 1, - "fields": { - "name": "France", - "desc": "", - "quota": null - } - }, +[ { - "model": "common.ScienceTheme", + "model": "user_mgmt.ScienceTheme", "pk": 1, "fields": { "name": "Solar System" } }, { - "model": "common.ScienceTheme", + "model": "user_mgmt.ScienceTheme", "pk": 2, "fields": { "name": "Galatic" } }, { - "model": "common.ScienceTheme", + "model": "user_mgmt.ScienceTheme", "pk": 3, "fields": { "name": "Extra Galatic" } }, { - "model": "common.Period", + "model": "user_mgmt.Period", "pk": 1, "fields": { } }, { - "model": "common.Period", + "model": "user_mgmt.Period", "pk": 2, "fields": { "exploitation_duration": 3650 } }, { - "model": "common.scientificprogram", + "model": "user_mgmt.scientificprogram", "pk": 1, "fields": { "name": "Sky-observation", @@ -56,7 +48,7 @@ } }, { - "model": "common.SP_Period", + "model": "user_mgmt.SP_Period", "pk": 1, "fields": { "period": 1, @@ -67,83 +59,7 @@ } }, { - "model": "common.strategyobs", - "pk": 1, - "fields": { - "name": "strat1", - "desc": "", - "xml_file": "strat1.xml", - "is_default": false - } - }, - { - "model": "common.strategyobs", - "pk": 2, - "fields": { - "name": "strat2", - "desc": "", - "xml_file": "strat2.xml", - "is_default": false - } - }, - { - "model": "common.strategyobs", - "pk": 3, - "fields": { - "name": "strat_unittest", - "desc": "", - "xml_file": "strat_unittest.xml", - "is_default": true - } - }, - { - "model": "common.telescope", - "pk": 1, - "fields": { - "mount_type": "", - "diameter": null, - "status": "", - "latitude": null, - "longitude": null, - "sens": "", - "altitude": null, - "readout_time": null, - "slew_time": null, - "slew_dead": null, - "slew_rate_max": null, - "horizon_type": "", - "horizon_def": null, - "lim_dec_max": null, - "lim_dec_min": null, - "lim_ha_rise": null, - "lim_ha_set": null, - "address": "", - "night_elev_sun": null, - "mpc_code": "", - "name": "Telescope", - "desc": "", - "created": "2016-05-13T11:50:14Z", - "updated": "2016-05-13T11:50:14Z", - "is_online": false, - "maintenance_date": null - } - }, - { - "model": "common.dome", - "pk": 1, - "fields": { - "name": "Dome", - "desc": "dome", - "created": "2016-05-13T11:50:14Z", - "updated": "2016-05-13T11:50:14Z", - "is_online": false, - "status": "", - "maintenance_date": null, - "open": false - } - }, - { - "model": "common.userlevel", + "model": "user_mgmt.userlevel", "pk": 1, "fields": { "name": "Admin", @@ -153,7 +69,7 @@ } }, { - "model": "common.userlevel", + "model": "user_mgmt.userlevel", "pk": 2, "fields": { "name": "Observer", @@ -163,7 +79,7 @@ } }, { - "model": "common.userlevel", + "model": "user_mgmt.userlevel", "pk": 3, "fields": { "name": "TAC", @@ -173,7 +89,7 @@ } }, { - "model": "common.userlevel", + "model": "user_mgmt.userlevel", "pk": 4, "fields": { "name": "Management board member", @@ -183,7 +99,7 @@ } }, { - "model": "common.userlevel", + "model": "user_mgmt.userlevel", "pk": 5, "fields": { "name": "Operator", @@ -193,7 +109,7 @@ } }, { - "model": "common.userlevel", + "model": "user_mgmt.userlevel", "pk": 6, "fields": { "name": "Unit-PI", @@ -203,7 +119,7 @@ } }, { - "model": "common.userlevel", + "model": "user_mgmt.userlevel", "pk": 7, "fields": { "name": "Unit-board", @@ -213,7 +129,7 @@ } }, { - "model": "common.userlevel", + "model": "user_mgmt.userlevel", "pk": 8, "fields": { "name": "Visitor", @@ -223,197 +139,7 @@ } }, { - "model": "common.version", - "pk": 1, - "fields": { - "module_name": "Scheduler", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 2, - "fields": { - "module_name": "Dashboard", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 3, - "fields": { - "module_name": "Observation Manager", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 4, - "fields": { - "module_name": "Routine Manager", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 5, - "fields": { - "module_name": "Alert Manager", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 6, - "fields": { - "module_name": "Monitoring", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 7, - "fields": { - "module_name": "User Manager", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 8, - "fields": { - "module_name": "Analyzer", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 9, - "fields": { - "module_name": "Majordome", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 10, - "fields": { - "module_name": "Majordome", - "version": "0.2", - "created": "2016-06-28T10:50:32Z", - "updated": "2016-06-28T10:50:32Z" - } - }, - { - "model": "common.version", - "pk": 11, - "fields": { - "module_name": "Majordome", - "version": "0.1.4", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { - "model": "common.version", - "pk": 12, - "fields": { - "module_name": "Alert Manager", - "version": "0.2.3", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { - "model": "common.version", - "pk": 13, - "fields": { - "module_name": "Dashboard", - "version": "0.1.1", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { - "model": "common.version", - "pk": 14, - "fields": { - "module_name": "Observation Manager", - "version": "0.1.3", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { - "model": "common.version", - "pk": 15, - "fields": { - "module_name": "Routine Manager", - "version": "0.1.2", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { - "model": "common.version", - "pk": 16, - "fields": { - "module_name": "Monitoring", - "version": "0.1.3", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { - "model": "common.version", - "pk": 17, - "fields": { - "module_name": "Scheduler", - "version": "0.1.2", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { - "model": "common.version", - "pk": 18, - "fields": { - "module_name": "User Manager", - "version": "0.1.1", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { - "model": "common.version", - "pk": 19, - "fields": { - "module_name": "Analyzer", - "version": "0.1.2", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { - "model": "common.institute", + "model": "user_mgmt.institute", "pk": 1, "fields": { "name": "My Observatory", @@ -421,7 +147,7 @@ } }, { - "model": "common.pyrosuser", + "model": "user_mgmt.pyrosuser", "pk": 1, "fields": { "password": "pbkdf2_sha256$24000$HRial3QUfrlz$bVuEzQaXthOd9GZVXd2449LDEF8EMQure69nA/Hu7qQ=", @@ -447,27 +173,5 @@ "institute": 2 } - }, - { - "model": "common.config", - "pk": 1, - "fields": { - "id": 1, - "latitude": 1, - "local_time_zone": 1, - "longitude": 1, - "altitude": 1, - "horizon_line": 1, - "row_data_save_frequency": 300, - "request_frequency": 300, - "analysed_data_save": 300, - "telescope_ip_address": "127.0.0.1", - "camera_ip_address": "127.0.0.1", - "plc_ip_address": "127.0.0.1", - "global_mode": true, - "ack": true, - "bypass": false, - "plc_timeout_seconds": 10 - } } ] \ No newline at end of file diff --git a/src/core/pyros_django/misc/fixtures/initial_fixture_dev_TZ.json b/src/core/pyros_django/misc/fixtures/initial_fixture_dev_TZ.json index 2f488c9..f34bbc4 100644 --- a/src/core/pyros_django/misc/fixtures/initial_fixture_dev_TZ.json +++ b/src/core/pyros_django/misc/fixtures/initial_fixture_dev_TZ.json @@ -362,196 +362,6 @@ } }, { - "model": "common.version", - "pk": 1, - "fields": { - "module_name": "Scheduler", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 2, - "fields": { - "module_name": "Dashboard", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 3, - "fields": { - "module_name": "Observation Manager", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 4, - "fields": { - "module_name": "Routine Manager", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 5, - "fields": { - "module_name": "Alert Manager", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 6, - "fields": { - "module_name": "Monitoring", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 7, - "fields": { - "module_name": "User Manager", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 8, - "fields": { - "module_name": "Analyzer", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 9, - "fields": { - "module_name": "Majordome", - "version": "0.1", - "created": "2016-06-23T14:04:48Z", - "updated": "2016-06-23T14:04:48Z" - } - }, - { - "model": "common.version", - "pk": 10, - "fields": { - "module_name": "Majordome", - "version": "0.2", - "created": "2016-06-28T10:50:32Z", - "updated": "2016-06-28T10:50:32Z" - } - }, - { - "model": "common.version", - "pk": 11, - "fields": { - "module_name": "Majordome", - "version": "0.1.4", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { - "model": "common.version", - "pk": 12, - "fields": { - "module_name": "Alert Manager", - "version": "0.2.3", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { - "model": "common.version", - "pk": 13, - "fields": { - "module_name": "Dashboard", - "version": "0.1.1", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { - "model": "common.version", - "pk": 14, - "fields": { - "module_name": "Observation Manager", - "version": "0.1.3", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { - "model": "common.version", - "pk": 15, - "fields": { - "module_name": "Routine Manager", - "version": "0.1.2", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { - "model": "common.version", - "pk": 16, - "fields": { - "module_name": "Monitoring", - "version": "0.1.3", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { - "model": "common.version", - "pk": 17, - "fields": { - "module_name": "Scheduler", - "version": "0.1.2", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { - "model": "common.version", - "pk": 18, - "fields": { - "module_name": "User Manager", - "version": "0.1.1", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { - "model": "common.version", - "pk": 19, - "fields": { - "module_name": "Analyzer", - "version": "0.1.2", - "created": "2016-07-20T13:44:29Z", - "updated": "2016-07-20T13:44:29Z" - } - }, - { "model": "user_mgmt.institute", "pk": 2, "fields": { @@ -1064,28 +874,6 @@ } }, { - "model": "common.config", - "pk": 1, - "fields": { - "id": 1, - "latitude": 1, - "local_time_zone": 1, - "longitude": 1, - "altitude": 1, - "horizon_line": 1, - "row_data_save_frequency": 300, - "request_frequency": 300, - "analysed_data_save": 300, - "telescope_ip_address": "127.0.0.1", - "camera_ip_address": "127.0.0.1", - "plc_ip_address": "127.0.0.1", - "global_mode": true, - "ack": true, - "bypass": false, - "plc_timeout_seconds": 10 - } - }, - { "model": "seq_submit.sequence", "pk": 1, "fields": { diff --git a/src/core/pyros_django/misc/fixtures/tests/complete_fixture.json b/src/core/pyros_django/misc/fixtures/tests/complete_fixture.json index ff09e7e..86264f4 100644 --- a/src/core/pyros_django/misc/fixtures/tests/complete_fixture.json +++ b/src/core/pyros_django/misc/fixtures/tests/complete_fixture.json @@ -1 +1 @@ -[{"model": "auth.permission", "pk": 1, "fields": {"name": "Can add log entry", "content_type": 1, "codename": "add_logentry"}}, {"model": "auth.permission", "pk": 2, "fields": {"name": "Can change log entry", "content_type": 1, "codename": "change_logentry"}}, {"model": "auth.permission", "pk": 3, "fields": {"name": "Can delete log entry", "content_type": 1, "codename": "delete_logentry"}}, {"model": "auth.permission", "pk": 4, "fields": {"name": "Can view log entry", "content_type": 1, "codename": "view_logentry"}}, {"model": "auth.permission", "pk": 5, "fields": {"name": "Can add permission", "content_type": 2, "codename": "add_permission"}}, {"model": "auth.permission", "pk": 6, "fields": {"name": "Can change permission", "content_type": 2, "codename": "change_permission"}}, {"model": "auth.permission", "pk": 7, "fields": {"name": "Can delete permission", "content_type": 2, "codename": "delete_permission"}}, {"model": "auth.permission", "pk": 8, "fields": {"name": "Can view permission", "content_type": 2, "codename": "view_permission"}}, {"model": "auth.permission", "pk": 9, "fields": {"name": "Can add group", "content_type": 3, "codename": "add_group"}}, {"model": "auth.permission", "pk": 10, "fields": {"name": "Can change group", "content_type": 3, "codename": "change_group"}}, {"model": "auth.permission", "pk": 11, "fields": {"name": "Can delete group", "content_type": 3, "codename": "delete_group"}}, {"model": "auth.permission", "pk": 12, "fields": {"name": "Can view group", "content_type": 3, "codename": "view_group"}}, {"model": "auth.permission", "pk": 13, "fields": {"name": "Can add content type", "content_type": 4, "codename": "add_contenttype"}}, {"model": "auth.permission", "pk": 14, "fields": {"name": "Can change content type", "content_type": 4, "codename": "change_contenttype"}}, {"model": "auth.permission", "pk": 15, "fields": {"name": "Can delete content type", "content_type": 4, "codename": "delete_contenttype"}}, {"model": "auth.permission", "pk": 16, "fields": {"name": "Can view content type", "content_type": 4, "codename": "view_contenttype"}}, {"model": "auth.permission", "pk": 17, "fields": {"name": "Can add session", "content_type": 5, "codename": "add_session"}}, {"model": "auth.permission", "pk": 18, "fields": {"name": "Can change session", "content_type": 5, "codename": "change_session"}}, {"model": "auth.permission", "pk": 19, "fields": {"name": "Can delete session", "content_type": 5, "codename": "delete_session"}}, {"model": "auth.permission", "pk": 20, "fields": {"name": "Can view session", "content_type": 5, "codename": "view_session"}}, {"model": "auth.permission", "pk": 21, "fields": {"name": "Can add Token", "content_type": 6, "codename": "add_token"}}, {"model": "auth.permission", "pk": 22, "fields": {"name": "Can change Token", "content_type": 6, "codename": "change_token"}}, {"model": "auth.permission", "pk": 23, "fields": {"name": "Can delete Token", "content_type": 6, "codename": "delete_token"}}, {"model": "auth.permission", "pk": 24, "fields": {"name": "Can view Token", "content_type": 6, "codename": "view_token"}}, {"model": "auth.permission", "pk": 25, "fields": {"name": "Can add token", "content_type": 7, "codename": "add_tokenproxy"}}, {"model": "auth.permission", "pk": 26, "fields": {"name": "Can change token", "content_type": 7, "codename": "change_tokenproxy"}}, {"model": "auth.permission", "pk": 27, "fields": {"name": "Can delete token", "content_type": 7, "codename": "delete_tokenproxy"}}, {"model": "auth.permission", "pk": 28, "fields": {"name": "Can view token", "content_type": 7, "codename": "view_tokenproxy"}}, {"model": "auth.permission", "pk": 29, "fields": {"name": "Can add pyros user", "content_type": 8, "codename": "add_pyrosuser"}}, {"model": "auth.permission", "pk": 30, "fields": {"name": "Can change pyros user", "content_type": 8, "codename": "change_pyrosuser"}}, {"model": "auth.permission", "pk": 31, "fields": {"name": "Can delete pyros user", "content_type": 8, "codename": "delete_pyrosuser"}}, {"model": "auth.permission", "pk": 32, "fields": {"name": "Can view pyros user", "content_type": 8, "codename": "view_pyrosuser"}}, {"model": "auth.permission", "pk": 33, "fields": {"name": "Can add country", "content_type": 9, "codename": "add_country"}}, {"model": "auth.permission", "pk": 34, "fields": {"name": "Can change country", "content_type": 9, "codename": "change_country"}}, {"model": "auth.permission", "pk": 35, "fields": {"name": "Can delete country", "content_type": 9, "codename": "delete_country"}}, {"model": "auth.permission", "pk": 36, "fields": {"name": "Can view country", "content_type": 9, "codename": "view_country"}}, {"model": "auth.permission", "pk": 37, "fields": {"name": "Can add institute", "content_type": 10, "codename": "add_institute"}}, {"model": "auth.permission", "pk": 38, "fields": {"name": "Can change institute", "content_type": 10, "codename": "change_institute"}}, {"model": "auth.permission", "pk": 39, "fields": {"name": "Can delete institute", "content_type": 10, "codename": "delete_institute"}}, {"model": "auth.permission", "pk": 40, "fields": {"name": "Can view institute", "content_type": 10, "codename": "view_institute"}}, {"model": "auth.permission", "pk": 41, "fields": {"name": "Can add period", "content_type": 11, "codename": "add_period"}}, {"model": "auth.permission", "pk": 42, "fields": {"name": "Can change period", "content_type": 11, "codename": "change_period"}}, {"model": "auth.permission", "pk": 43, "fields": {"name": "Can delete period", "content_type": 11, "codename": "delete_period"}}, {"model": "auth.permission", "pk": 44, "fields": {"name": "Can view period", "content_type": 11, "codename": "view_period"}}, {"model": "auth.permission", "pk": 45, "fields": {"name": "Can add science theme", "content_type": 12, "codename": "add_sciencetheme"}}, {"model": "auth.permission", "pk": 46, "fields": {"name": "Can change science theme", "content_type": 12, "codename": "change_sciencetheme"}}, {"model": "auth.permission", "pk": 47, "fields": {"name": "Can delete science theme", "content_type": 12, "codename": "delete_sciencetheme"}}, {"model": "auth.permission", "pk": 48, "fields": {"name": "Can view science theme", "content_type": 12, "codename": "view_sciencetheme"}}, {"model": "auth.permission", "pk": 49, "fields": {"name": "Can add scientific program", "content_type": 13, "codename": "add_scientificprogram"}}, {"model": "auth.permission", "pk": 50, "fields": {"name": "Can change scientific program", "content_type": 13, "codename": "change_scientificprogram"}}, {"model": "auth.permission", "pk": 51, "fields": {"name": "Can delete scientific program", "content_type": 13, "codename": "delete_scientificprogram"}}, {"model": "auth.permission", "pk": 52, "fields": {"name": "Can view scientific program", "content_type": 13, "codename": "view_scientificprogram"}}, {"model": "auth.permission", "pk": 53, "fields": {"name": "Can add s p_ period", "content_type": 14, "codename": "add_sp_period"}}, {"model": "auth.permission", "pk": 54, "fields": {"name": "Can change s p_ period", "content_type": 14, "codename": "change_sp_period"}}, {"model": "auth.permission", "pk": 55, "fields": {"name": "Can delete s p_ period", "content_type": 14, "codename": "delete_sp_period"}}, {"model": "auth.permission", "pk": 56, "fields": {"name": "Can view s p_ period", "content_type": 14, "codename": "view_sp_period"}}, {"model": "auth.permission", "pk": 57, "fields": {"name": "Can add user level", "content_type": 15, "codename": "add_userlevel"}}, {"model": "auth.permission", "pk": 58, "fields": {"name": "Can change user level", "content_type": 15, "codename": "change_userlevel"}}, {"model": "auth.permission", "pk": 59, "fields": {"name": "Can delete user level", "content_type": 15, "codename": "delete_userlevel"}}, {"model": "auth.permission", "pk": 60, "fields": {"name": "Can view user level", "content_type": 15, "codename": "view_userlevel"}}, {"model": "auth.permission", "pk": 61, "fields": {"name": "Can add s p_ period workflow", "content_type": 16, "codename": "add_sp_periodworkflow"}}, {"model": "auth.permission", "pk": 62, "fields": {"name": "Can change s p_ period workflow", "content_type": 16, "codename": "change_sp_periodworkflow"}}, {"model": "auth.permission", "pk": 63, "fields": {"name": "Can delete s p_ period workflow", "content_type": 16, "codename": "delete_sp_periodworkflow"}}, {"model": "auth.permission", "pk": 64, "fields": {"name": "Can view s p_ period workflow", "content_type": 16, "codename": "view_sp_periodworkflow"}}, {"model": "auth.permission", "pk": 65, "fields": {"name": "Can add s p_ period_ guest", "content_type": 17, "codename": "add_sp_period_guest"}}, {"model": "auth.permission", "pk": 66, "fields": {"name": "Can change s p_ period_ guest", "content_type": 17, "codename": "change_sp_period_guest"}}, {"model": "auth.permission", "pk": 67, "fields": {"name": "Can delete s p_ period_ guest", "content_type": 17, "codename": "delete_sp_period_guest"}}, {"model": "auth.permission", "pk": 68, "fields": {"name": "Can view s p_ period_ guest", "content_type": 17, "codename": "view_sp_period_guest"}}, {"model": "auth.permission", "pk": 69, "fields": {"name": "Can add s p_ period_ user", "content_type": 18, "codename": "add_sp_period_user"}}, {"model": "auth.permission", "pk": 70, "fields": {"name": "Can change s p_ period_ user", "content_type": 18, "codename": "change_sp_period_user"}}, {"model": "auth.permission", "pk": 71, "fields": {"name": "Can delete s p_ period_ user", "content_type": 18, "codename": "delete_sp_period_user"}}, {"model": "auth.permission", "pk": 72, "fields": {"name": "Can view s p_ period_ user", "content_type": 18, "codename": "view_sp_period_user"}}, {"model": "auth.permission", "pk": 73, "fields": {"name": "Can add agent cmd", "content_type": 19, "codename": "add_agentcmd"}}, {"model": "auth.permission", "pk": 74, "fields": {"name": "Can change agent cmd", "content_type": 19, "codename": "change_agentcmd"}}, {"model": "auth.permission", "pk": 75, "fields": {"name": "Can delete agent cmd", "content_type": 19, "codename": "delete_agentcmd"}}, {"model": "auth.permission", "pk": 76, "fields": {"name": "Can view agent cmd", "content_type": 19, "codename": "view_agentcmd"}}, {"model": "auth.permission", "pk": 77, "fields": {"name": "Can add agent logs", "content_type": 20, "codename": "add_agentlogs"}}, {"model": "auth.permission", "pk": 78, "fields": {"name": "Can change agent logs", "content_type": 20, "codename": "change_agentlogs"}}, {"model": "auth.permission", "pk": 79, "fields": {"name": "Can delete agent logs", "content_type": 20, "codename": "delete_agentlogs"}}, {"model": "auth.permission", "pk": 80, "fields": {"name": "Can view agent logs", "content_type": 20, "codename": "view_agentlogs"}}, {"model": "auth.permission", "pk": 81, "fields": {"name": "Can add agent survey", "content_type": 21, "codename": "add_agentsurvey"}}, {"model": "auth.permission", "pk": 82, "fields": {"name": "Can change agent survey", "content_type": 21, "codename": "change_agentsurvey"}}, {"model": "auth.permission", "pk": 83, "fields": {"name": "Can delete agent survey", "content_type": 21, "codename": "delete_agentsurvey"}}, {"model": "auth.permission", "pk": 84, "fields": {"name": "Can view agent survey", "content_type": 21, "codename": "view_agentsurvey"}}, {"model": "auth.permission", "pk": 85, "fields": {"name": "Can add config", "content_type": 22, "codename": "add_config"}}, {"model": "auth.permission", "pk": 86, "fields": {"name": "Can change config", "content_type": 22, "codename": "change_config"}}, {"model": "auth.permission", "pk": 87, "fields": {"name": "Can delete config", "content_type": 22, "codename": "delete_config"}}, {"model": "auth.permission", "pk": 88, "fields": {"name": "Can view config", "content_type": 22, "codename": "view_config"}}, {"model": "auth.permission", "pk": 89, "fields": {"name": "Can add env_data", "content_type": 23, "codename": "add_env_data"}}, {"model": "auth.permission", "pk": 90, "fields": {"name": "Can change env_data", "content_type": 23, "codename": "change_env_data"}}, {"model": "auth.permission", "pk": 91, "fields": {"name": "Can delete env_data", "content_type": 23, "codename": "delete_env_data"}}, {"model": "auth.permission", "pk": 92, "fields": {"name": "Can view env_data", "content_type": 23, "codename": "view_env_data"}}, {"model": "auth.permission", "pk": 93, "fields": {"name": "Can add env_data_hist", "content_type": 24, "codename": "add_env_data_hist"}}, {"model": "auth.permission", "pk": 94, "fields": {"name": "Can change env_data_hist", "content_type": 24, "codename": "change_env_data_hist"}}, {"model": "auth.permission", "pk": 95, "fields": {"name": "Can delete env_data_hist", "content_type": 24, "codename": "delete_env_data_hist"}}, {"model": "auth.permission", "pk": 96, "fields": {"name": "Can view env_data_hist", "content_type": 24, "codename": "view_env_data_hist"}}, {"model": "auth.permission", "pk": 97, "fields": {"name": "Can add log", "content_type": 25, "codename": "add_log"}}, {"model": "auth.permission", "pk": 98, "fields": {"name": "Can change log", "content_type": 25, "codename": "change_log"}}, {"model": "auth.permission", "pk": 99, "fields": {"name": "Can delete log", "content_type": 25, "codename": "delete_log"}}, {"model": "auth.permission", "pk": 100, "fields": {"name": "Can view log", "content_type": 25, "codename": "view_log"}}, {"model": "auth.permission", "pk": 101, "fields": {"name": "Can add majordome", "content_type": 26, "codename": "add_majordome"}}, {"model": "auth.permission", "pk": 102, "fields": {"name": "Can change majordome", "content_type": 26, "codename": "change_majordome"}}, {"model": "auth.permission", "pk": 103, "fields": {"name": "Can delete majordome", "content_type": 26, "codename": "delete_majordome"}}, {"model": "auth.permission", "pk": 104, "fields": {"name": "Can view majordome", "content_type": 26, "codename": "view_majordome"}}, {"model": "auth.permission", "pk": 105, "fields": {"name": "Can add sensors_data", "content_type": 27, "codename": "add_sensors_data"}}, {"model": "auth.permission", "pk": 106, "fields": {"name": "Can change sensors_data", "content_type": 27, "codename": "change_sensors_data"}}, {"model": "auth.permission", "pk": 107, "fields": {"name": "Can delete sensors_data", "content_type": 27, "codename": "delete_sensors_data"}}, {"model": "auth.permission", "pk": 108, "fields": {"name": "Can view sensors_data", "content_type": 27, "codename": "view_sensors_data"}}, {"model": "auth.permission", "pk": 109, "fields": {"name": "Can add sensors_data_last_value", "content_type": 28, "codename": "add_sensors_data_last_value"}}, {"model": "auth.permission", "pk": 110, "fields": {"name": "Can change sensors_data_last_value", "content_type": 28, "codename": "change_sensors_data_last_value"}}, {"model": "auth.permission", "pk": 111, "fields": {"name": "Can delete sensors_data_last_value", "content_type": 28, "codename": "delete_sensors_data_last_value"}}, {"model": "auth.permission", "pk": 112, "fields": {"name": "Can view sensors_data_last_value", "content_type": 28, "codename": "view_sensors_data_last_value"}}, {"model": "auth.permission", "pk": 113, "fields": {"name": "Can add site watch", "content_type": 29, "codename": "add_sitewatch"}}, {"model": "auth.permission", "pk": 114, "fields": {"name": "Can change site watch", "content_type": 29, "codename": "change_sitewatch"}}, {"model": "auth.permission", "pk": 115, "fields": {"name": "Can delete site watch", "content_type": 29, "codename": "delete_sitewatch"}}, {"model": "auth.permission", "pk": 116, "fields": {"name": "Can view site watch", "content_type": 29, "codename": "view_sitewatch"}}, {"model": "auth.permission", "pk": 117, "fields": {"name": "Can add site watch history", "content_type": 30, "codename": "add_sitewatchhistory"}}, {"model": "auth.permission", "pk": 118, "fields": {"name": "Can change site watch history", "content_type": 30, "codename": "change_sitewatchhistory"}}, {"model": "auth.permission", "pk": 119, "fields": {"name": "Can delete site watch history", "content_type": 30, "codename": "delete_sitewatchhistory"}}, {"model": "auth.permission", "pk": 120, "fields": {"name": "Can view site watch history", "content_type": 30, "codename": "view_sitewatchhistory"}}, {"model": "auth.permission", "pk": 121, "fields": {"name": "Can add tickets", "content_type": 31, "codename": "add_tickets"}}, {"model": "auth.permission", "pk": 122, "fields": {"name": "Can change tickets", "content_type": 31, "codename": "change_tickets"}}, {"model": "auth.permission", "pk": 123, "fields": {"name": "Can delete tickets", "content_type": 31, "codename": "delete_tickets"}}, {"model": "auth.permission", "pk": 124, "fields": {"name": "Can view tickets", "content_type": 31, "codename": "view_tickets"}}, {"model": "auth.permission", "pk": 125, "fields": {"name": "Can add version", "content_type": 32, "codename": "add_version"}}, {"model": "auth.permission", "pk": 126, "fields": {"name": "Can change version", "content_type": 32, "codename": "change_version"}}, {"model": "auth.permission", "pk": 127, "fields": {"name": "Can delete version", "content_type": 32, "codename": "delete_version"}}, {"model": "auth.permission", "pk": 128, "fields": {"name": "Can view version", "content_type": 32, "codename": "view_version"}}, {"model": "auth.permission", "pk": 129, "fields": {"name": "Can add weather watch", "content_type": 33, "codename": "add_weatherwatch"}}, {"model": "auth.permission", "pk": 130, "fields": {"name": "Can change weather watch", "content_type": 33, "codename": "change_weatherwatch"}}, {"model": "auth.permission", "pk": 131, "fields": {"name": "Can delete weather watch", "content_type": 33, "codename": "delete_weatherwatch"}}, {"model": "auth.permission", "pk": 132, "fields": {"name": "Can view weather watch", "content_type": 33, "codename": "view_weatherwatch"}}, {"model": "auth.permission", "pk": 133, "fields": {"name": "Can add weather watch history", "content_type": 34, "codename": "add_weatherwatchhistory"}}, {"model": "auth.permission", "pk": 134, "fields": {"name": "Can change weather watch history", "content_type": 34, "codename": "change_weatherwatchhistory"}}, {"model": "auth.permission", "pk": 135, "fields": {"name": "Can delete weather watch history", "content_type": 34, "codename": "delete_weatherwatchhistory"}}, {"model": "auth.permission", "pk": 136, "fields": {"name": "Can view weather watch history", "content_type": 34, "codename": "view_weatherwatchhistory"}}, {"model": "auth.permission", "pk": 137, "fields": {"name": "Can add album", "content_type": 35, "codename": "add_album"}}, {"model": "auth.permission", "pk": 138, "fields": {"name": "Can change album", "content_type": 35, "codename": "change_album"}}, {"model": "auth.permission", "pk": 139, "fields": {"name": "Can delete album", "content_type": 35, "codename": "delete_album"}}, {"model": "auth.permission", "pk": 140, "fields": {"name": "Can view album", "content_type": 35, "codename": "view_album"}}, {"model": "auth.permission", "pk": 141, "fields": {"name": "Can add image", "content_type": 36, "codename": "add_image"}}, {"model": "auth.permission", "pk": 142, "fields": {"name": "Can change image", "content_type": 36, "codename": "change_image"}}, {"model": "auth.permission", "pk": 143, "fields": {"name": "Can delete image", "content_type": 36, "codename": "delete_image"}}, {"model": "auth.permission", "pk": 144, "fields": {"name": "Can view image", "content_type": 36, "codename": "view_image"}}, {"model": "auth.permission", "pk": 145, "fields": {"name": "Can add plan", "content_type": 37, "codename": "add_plan"}}, {"model": "auth.permission", "pk": 146, "fields": {"name": "Can change plan", "content_type": 37, "codename": "change_plan"}}, {"model": "auth.permission", "pk": 147, "fields": {"name": "Can delete plan", "content_type": 37, "codename": "delete_plan"}}, {"model": "auth.permission", "pk": 148, "fields": {"name": "Can view plan", "content_type": 37, "codename": "view_plan"}}, {"model": "auth.permission", "pk": 149, "fields": {"name": "Can add schedule", "content_type": 38, "codename": "add_schedule"}}, {"model": "auth.permission", "pk": 150, "fields": {"name": "Can change schedule", "content_type": 38, "codename": "change_schedule"}}, {"model": "auth.permission", "pk": 151, "fields": {"name": "Can delete schedule", "content_type": 38, "codename": "delete_schedule"}}, {"model": "auth.permission", "pk": 152, "fields": {"name": "Can view schedule", "content_type": 38, "codename": "view_schedule"}}, {"model": "auth.permission", "pk": 153, "fields": {"name": "Can add schedule has sequences", "content_type": 39, "codename": "add_schedulehassequences"}}, {"model": "auth.permission", "pk": 154, "fields": {"name": "Can change schedule has sequences", "content_type": 39, "codename": "change_schedulehassequences"}}, {"model": "auth.permission", "pk": 155, "fields": {"name": "Can delete schedule has sequences", "content_type": 39, "codename": "delete_schedulehassequences"}}, {"model": "auth.permission", "pk": 156, "fields": {"name": "Can view schedule has sequences", "content_type": 39, "codename": "view_schedulehassequences"}}, {"model": "auth.permission", "pk": 157, "fields": {"name": "Can add sequence", "content_type": 40, "codename": "add_sequence"}}, {"model": "auth.permission", "pk": 158, "fields": {"name": "Can change sequence", "content_type": 40, "codename": "change_sequence"}}, {"model": "auth.permission", "pk": 159, "fields": {"name": "Can delete sequence", "content_type": 40, "codename": "delete_sequence"}}, {"model": "auth.permission", "pk": 160, "fields": {"name": "Can view sequence", "content_type": 40, "codename": "view_sequence"}}, {"model": "auth.permission", "pk": 161, "fields": {"name": "Can add agent device status", "content_type": 41, "codename": "add_agentdevicestatus"}}, {"model": "auth.permission", "pk": 162, "fields": {"name": "Can change agent device status", "content_type": 41, "codename": "change_agentdevicestatus"}}, {"model": "auth.permission", "pk": 163, "fields": {"name": "Can delete agent device status", "content_type": 41, "codename": "delete_agentdevicestatus"}}, {"model": "auth.permission", "pk": 164, "fields": {"name": "Can view agent device status", "content_type": 41, "codename": "view_agentdevicestatus"}}, {"model": "auth.permission", "pk": 165, "fields": {"name": "Can add agent device telescope status", "content_type": 42, "codename": "add_agentdevicetelescopestatus"}}, {"model": "auth.permission", "pk": 166, "fields": {"name": "Can change agent device telescope status", "content_type": 42, "codename": "change_agentdevicetelescopestatus"}}, {"model": "auth.permission", "pk": 167, "fields": {"name": "Can delete agent device telescope status", "content_type": 42, "codename": "delete_agentdevicetelescopestatus"}}, {"model": "auth.permission", "pk": 168, "fields": {"name": "Can view agent device telescope status", "content_type": 42, "codename": "view_agentdevicetelescopestatus"}}, {"model": "auth.permission", "pk": 169, "fields": {"name": "Can add detector", "content_type": 43, "codename": "add_detector"}}, {"model": "auth.permission", "pk": 170, "fields": {"name": "Can change detector", "content_type": 43, "codename": "change_detector"}}, {"model": "auth.permission", "pk": 171, "fields": {"name": "Can delete detector", "content_type": 43, "codename": "delete_detector"}}, {"model": "auth.permission", "pk": 172, "fields": {"name": "Can view detector", "content_type": 43, "codename": "view_detector"}}, {"model": "auth.permission", "pk": 173, "fields": {"name": "Can add dome", "content_type": 44, "codename": "add_dome"}}, {"model": "auth.permission", "pk": 174, "fields": {"name": "Can change dome", "content_type": 44, "codename": "change_dome"}}, {"model": "auth.permission", "pk": 175, "fields": {"name": "Can delete dome", "content_type": 44, "codename": "delete_dome"}}, {"model": "auth.permission", "pk": 176, "fields": {"name": "Can view dome", "content_type": 44, "codename": "view_dome"}}, {"model": "auth.permission", "pk": 177, "fields": {"name": "Can add plc device", "content_type": 45, "codename": "add_plcdevice"}}, {"model": "auth.permission", "pk": 178, "fields": {"name": "Can change plc device", "content_type": 45, "codename": "change_plcdevice"}}, {"model": "auth.permission", "pk": 179, "fields": {"name": "Can delete plc device", "content_type": 45, "codename": "delete_plcdevice"}}, {"model": "auth.permission", "pk": 180, "fields": {"name": "Can view plc device", "content_type": 45, "codename": "view_plcdevice"}}, {"model": "auth.permission", "pk": 181, "fields": {"name": "Can add telescope", "content_type": 46, "codename": "add_telescope"}}, {"model": "auth.permission", "pk": 182, "fields": {"name": "Can change telescope", "content_type": 46, "codename": "change_telescope"}}, {"model": "auth.permission", "pk": 183, "fields": {"name": "Can delete telescope", "content_type": 46, "codename": "delete_telescope"}}, {"model": "auth.permission", "pk": 184, "fields": {"name": "Can view telescope", "content_type": 46, "codename": "view_telescope"}}, {"model": "auth.permission", "pk": 185, "fields": {"name": "Can add telescope command", "content_type": 47, "codename": "add_telescopecommand"}}, {"model": "auth.permission", "pk": 186, "fields": {"name": "Can change telescope command", "content_type": 47, "codename": "change_telescopecommand"}}, {"model": "auth.permission", "pk": 187, "fields": {"name": "Can delete telescope command", "content_type": 47, "codename": "delete_telescopecommand"}}, {"model": "auth.permission", "pk": 188, "fields": {"name": "Can view telescope command", "content_type": 47, "codename": "view_telescopecommand"}}, {"model": "auth.permission", "pk": 189, "fields": {"name": "Can add plc device status", "content_type": 48, "codename": "add_plcdevicestatus"}}, {"model": "auth.permission", "pk": 190, "fields": {"name": "Can change plc device status", "content_type": 48, "codename": "change_plcdevicestatus"}}, {"model": "auth.permission", "pk": 191, "fields": {"name": "Can delete plc device status", "content_type": 48, "codename": "delete_plcdevicestatus"}}, {"model": "auth.permission", "pk": 192, "fields": {"name": "Can view plc device status", "content_type": 48, "codename": "view_plcdevicestatus"}}, {"model": "auth.permission", "pk": 193, "fields": {"name": "Can add filter wheel", "content_type": 49, "codename": "add_filterwheel"}}, {"model": "auth.permission", "pk": 194, "fields": {"name": "Can change filter wheel", "content_type": 49, "codename": "change_filterwheel"}}, {"model": "auth.permission", "pk": 195, "fields": {"name": "Can delete filter wheel", "content_type": 49, "codename": "delete_filterwheel"}}, {"model": "auth.permission", "pk": 196, "fields": {"name": "Can view filter wheel", "content_type": 49, "codename": "view_filterwheel"}}, {"model": "auth.permission", "pk": 197, "fields": {"name": "Can add filter", "content_type": 50, "codename": "add_filter"}}, {"model": "auth.permission", "pk": 198, "fields": {"name": "Can change filter", "content_type": 50, "codename": "change_filter"}}, {"model": "auth.permission", "pk": 199, "fields": {"name": "Can delete filter", "content_type": 50, "codename": "delete_filter"}}, {"model": "auth.permission", "pk": 200, "fields": {"name": "Can view filter", "content_type": 50, "codename": "view_filter"}}, {"model": "contenttypes.contenttype", "pk": 1, "fields": {"app_label": "admin", "model": "logentry"}}, {"model": "contenttypes.contenttype", "pk": 2, "fields": {"app_label": "auth", "model": "permission"}}, {"model": "contenttypes.contenttype", "pk": 3, "fields": {"app_label": "auth", "model": "group"}}, {"model": "contenttypes.contenttype", "pk": 4, "fields": {"app_label": "contenttypes", "model": "contenttype"}}, {"model": "contenttypes.contenttype", "pk": 5, "fields": {"app_label": "sessions", "model": "session"}}, {"model": "contenttypes.contenttype", "pk": 6, "fields": {"app_label": "authtoken", "model": "token"}}, {"model": "contenttypes.contenttype", "pk": 7, "fields": {"app_label": "authtoken", "model": "tokenproxy"}}, {"model": "contenttypes.contenttype", "pk": 8, "fields": {"app_label": "user_mgmt", "model": "pyrosuser"}}, {"model": "contenttypes.contenttype", "pk": 9, "fields": {"app_label": "user_mgmt", "model": "country"}}, {"model": "contenttypes.contenttype", "pk": 10, "fields": {"app_label": "user_mgmt", "model": "institute"}}, {"model": "contenttypes.contenttype", "pk": 11, "fields": {"app_label": "user_mgmt", "model": "period"}}, {"model": "contenttypes.contenttype", "pk": 12, "fields": {"app_label": "user_mgmt", "model": "sciencetheme"}}, {"model": "contenttypes.contenttype", "pk": 13, "fields": {"app_label": "user_mgmt", "model": "scientificprogram"}}, {"model": "contenttypes.contenttype", "pk": 14, "fields": {"app_label": "user_mgmt", "model": "sp_period"}}, {"model": "contenttypes.contenttype", "pk": 15, "fields": {"app_label": "user_mgmt", "model": "userlevel"}}, {"model": "contenttypes.contenttype", "pk": 16, "fields": {"app_label": "user_mgmt", "model": "sp_periodworkflow"}}, {"model": "contenttypes.contenttype", "pk": 17, "fields": {"app_label": "user_mgmt", "model": "sp_period_guest"}}, {"model": "contenttypes.contenttype", "pk": 18, "fields": {"app_label": "user_mgmt", "model": "sp_period_user"}}, {"model": "contenttypes.contenttype", "pk": 19, "fields": {"app_label": "common", "model": "agentcmd"}}, {"model": "contenttypes.contenttype", "pk": 20, "fields": {"app_label": "common", "model": "agentlogs"}}, {"model": "contenttypes.contenttype", "pk": 21, "fields": {"app_label": "common", "model": "agentsurvey"}}, {"model": "contenttypes.contenttype", "pk": 22, "fields": {"app_label": "common", "model": "config"}}, {"model": "contenttypes.contenttype", "pk": 23, "fields": {"app_label": "common", "model": "env_data"}}, {"model": "contenttypes.contenttype", "pk": 24, "fields": {"app_label": "common", "model": "env_data_hist"}}, {"model": "contenttypes.contenttype", "pk": 25, "fields": {"app_label": "common", "model": "log"}}, {"model": "contenttypes.contenttype", "pk": 26, "fields": {"app_label": "common", "model": "majordome"}}, {"model": "contenttypes.contenttype", "pk": 27, "fields": {"app_label": "common", "model": "sensors_data"}}, {"model": "contenttypes.contenttype", "pk": 28, "fields": {"app_label": "common", "model": "sensors_data_last_value"}}, {"model": "contenttypes.contenttype", "pk": 29, "fields": {"app_label": "common", "model": "sitewatch"}}, {"model": "contenttypes.contenttype", "pk": 30, "fields": {"app_label": "common", "model": "sitewatchhistory"}}, {"model": "contenttypes.contenttype", "pk": 31, "fields": {"app_label": "common", "model": "tickets"}}, {"model": "contenttypes.contenttype", "pk": 32, "fields": {"app_label": "common", "model": "version"}}, {"model": "contenttypes.contenttype", "pk": 33, "fields": {"app_label": "common", "model": "weatherwatch"}}, {"model": "contenttypes.contenttype", "pk": 34, "fields": {"app_label": "common", "model": "weatherwatchhistory"}}, {"model": "contenttypes.contenttype", "pk": 35, "fields": {"app_label": "seq_submit", "model": "album"}}, {"model": "contenttypes.contenttype", "pk": 36, "fields": {"app_label": "seq_submit", "model": "image"}}, {"model": "contenttypes.contenttype", "pk": 37, "fields": {"app_label": "seq_submit", "model": "plan"}}, {"model": "contenttypes.contenttype", "pk": 38, "fields": {"app_label": "seq_submit", "model": "schedule"}}, {"model": "contenttypes.contenttype", "pk": 39, "fields": {"app_label": "seq_submit", "model": "schedulehassequences"}}, {"model": "contenttypes.contenttype", "pk": 40, "fields": {"app_label": "seq_submit", "model": "sequence"}}, {"model": "contenttypes.contenttype", "pk": 41, "fields": {"app_label": "devices", "model": "agentdevicestatus"}}, {"model": "contenttypes.contenttype", "pk": 42, "fields": {"app_label": "devices", "model": "agentdevicetelescopestatus"}}, {"model": "contenttypes.contenttype", "pk": 43, "fields": {"app_label": "devices", "model": "detector"}}, {"model": "contenttypes.contenttype", "pk": 44, "fields": {"app_label": "devices", "model": "dome"}}, {"model": "contenttypes.contenttype", "pk": 45, "fields": {"app_label": "devices", "model": "plcdevice"}}, {"model": "contenttypes.contenttype", "pk": 46, "fields": {"app_label": "devices", "model": "telescope"}}, {"model": "contenttypes.contenttype", "pk": 47, "fields": {"app_label": "devices", "model": "telescopecommand"}}, {"model": "contenttypes.contenttype", "pk": 48, "fields": {"app_label": "devices", "model": "plcdevicestatus"}}, {"model": "contenttypes.contenttype", "pk": 49, "fields": {"app_label": "devices", "model": "filterwheel"}}, {"model": "contenttypes.contenttype", "pk": 50, "fields": {"app_label": "devices", "model": "filter"}}, {"model": "user_mgmt.userlevel", "pk": 1, "fields": {"name": "Admin", "desc": "", "priority": 8, "quota": 9999.0}}, {"model": "user_mgmt.userlevel", "pk": 2, "fields": {"name": "Observer", "desc": "", "priority": 2, "quota": 9999.0}}, {"model": "user_mgmt.userlevel", "pk": 3, "fields": {"name": "TAC", "desc": "", "priority": 1, "quota": 9999.0}}, {"model": "user_mgmt.userlevel", "pk": 4, "fields": {"name": "Management board member", "desc": "", "priority": 3, "quota": 9999.0}}, {"model": "user_mgmt.userlevel", "pk": 5, "fields": {"name": "Operator", "desc": "", "priority": 4, "quota": 9999.0}}, {"model": "user_mgmt.userlevel", "pk": 6, "fields": {"name": "Unit-PI", "desc": "", "priority": 7, "quota": 9999.0}}, {"model": "user_mgmt.userlevel", "pk": 7, "fields": {"name": "Unit-board", "desc": "", "priority": 6, "quota": 9999.0}}, {"model": "user_mgmt.userlevel", "pk": 8, "fields": {"name": "Visitor", "desc": "Account without any privilege", "priority": 0, "quota": 0.0}}, {"model": "user_mgmt.country", "pk": 1, "fields": {"name": "France", "desc": "", "quota": null}}, {"model": "user_mgmt.institute", "pk": 1, "fields": {"name": "CNES", "quota": 80}}, {"model": "user_mgmt.institute", "pk": 2, "fields": {"name": "CNRS", "quota": 20}}, {"model": "user_mgmt.sciencetheme", "pk": 1, "fields": {"name": "Solar System"}}, {"model": "user_mgmt.sciencetheme", "pk": 2, "fields": {"name": "Galatic"}}, {"model": "user_mgmt.sciencetheme", "pk": 3, "fields": {"name": "Extra Galatic"}}, {"model": "user_mgmt.pyrosuser", "pk": 1, "fields": {"password": "pbkdf2_sha256$24000$HRial3QUfrlz$bVuEzQaXthOd9GZVXd2449LDEF8EMQure69nA/Hu7qQ=", "last_login": "2016-08-10T15:16:42.327Z", "is_superuser": true, "first_name": "pyros", "last_name": "", "email": "admin@example.com", "is_staff": true, "date_joined": "2016-08-10T15:15:58.481Z", "username": "pyros", "is_active": true, "first_time": false, "country": 1, "desc": "", "created": "2016-08-11T07:54:05.627Z", "updated": "2016-08-11T07:54:05.627Z", "tel": "", "address": "", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": null, "groups": [], "user_permissions": [], "user_level": [1], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 2, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Pascal", "last_name": "Richard", "email": "Pascal.Richard@cnes.fr", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Pascal.Richard@cnes.fr", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "18 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "CNES", "institute": 1, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [2], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 3, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Mégane", "last_name": "Diet", "email": "Megane.Diet@cnes.fr", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Megane.Diet@cnes.fr", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "18 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "CNES", "institute": 1, "is_institute_representative": true, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [2, 4], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 4, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Valentin", "last_name": "Baral", "email": "Valentin.Baral@cnes.fr", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Valentin.Baral@cnes.fr", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "18 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "CNES", "institute": 1, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [2], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 5, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Alain", "last_name": "Klotz", "email": "aklotz@irap.omp.eu", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "aklotz@irap.omp.eu", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": true, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [2, 4, 6], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 6, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Loic", "last_name": "Eymar", "email": "loic.eymar@oca.eu", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "loic.eymar@oca.eu", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "96 Boulevard de l'Observatoire, 06300 Nice", "laboratory": "OCA", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [2, 5], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 7, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": true, "first_name": "Etienne", "last_name": "Pallier", "email": "etienne.pallier@irap.omp.eu", "is_staff": true, "date_joined": "2021-05-20T09:03:37.108Z", "username": "etienne.pallier@irap.omp.eu", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [1], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 8, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": true, "first_name": "Alexis", "last_name": "Koralewski", "email": "akoralewski@irap.omp.eu", "is_staff": true, "date_joined": "2021-05-20T09:03:37.108Z", "username": "akoralewski@irap.omp.eu", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [1], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 9, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Observer", "last_name": "Observer", "email": "observer@example.com", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "observer@example.com", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [2], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 10, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": true, "first_name": "Admin", "last_name": "Admin", "email": "Admin@example.com", "is_staff": true, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Admin@example.com", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [1], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 11, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Operator", "last_name": "Operator", "email": "Operator@example.com", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Operator@example.com", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [5], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 12, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Management", "last_name": "Board", "email": "Management_board@example.com", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Management_board@example.com", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [4], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 13, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": true, "first_name": "Unit", "last_name": "PI", "email": "Unit-PI@example.com", "is_staff": true, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Unit-PI@example.com", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [6], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 14, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "TAC", "last_name": "TAC", "email": "TAC@example.com", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "TAC@example.com", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [3], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 15, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Visitor", "last_name": "Visitor", "email": "Visitor@example.com", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Visitor@example.com", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [8], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 16, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": true, "first_name": "Unit", "last_name": "Board", "email": "Unit-board@example.com", "is_staff": true, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Unit-board@example.com", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [7], "referee_themes": []}}, {"model": "user_mgmt.period", "pk": 1, "fields": {"start_date": "2023-06-20", "exploitation_duration": 182, "submission_duration": 136, "evaluation_duration": 31, "validation_duration": 5, "notification_duration": 10, "property_of_data_duration": 365, "data_accessibility_duration": 3650}}, {"model": "user_mgmt.scientificprogram", "pk": 1, "fields": {"created": null, "updated": null, "name": "debris", "description_short": "", "description_long": "", "institute": 1, "sp_pi": 2, "science_theme": 1, "is_auto_validated": true}}, {"model": "user_mgmt.sp_period", "pk": 1, "fields": {"period": 1, "scientific_program": 1, "public_visibility": "Name", "referee1": null, "vote_referee1": "A: Accepted", "reason_referee1": "", "referee2": null, "vote_referee2": "A: Accepted", "reason_referee2": "", "is_valid": "Accepted", "status": "Accepted", "quota_minimal": 0, "quota_nominal": 0, "quota_allocated": 0, "quota_remaining": 0, "over_quota_duration": 0, "over_quota_duration_allocated": 0, "over_quota_duration_remaining": 0, "token": 0, "token_allocated": 0, "token_remaining": 0, "priority": 0}}, {"model": "user_mgmt.sp_period_user", "pk": 2, "fields": {"SP_Period": 1, "user": 3}}, {"model": "user_mgmt.sp_period_user", "pk": 3, "fields": {"SP_Period": 1, "user": 4}}, {"model": "common.config", "pk": 1, "fields": {"latitude": "1.00", "local_time_zone": 1.0, "longitude": "1.00", "altitude": 1.0, "horizon_line": 1.0, "row_data_save_frequency": 300, "request_frequency": 300, "analysed_data_save": 300, "telescope_ip_address": "127.0.0.1", "camera_ip_address": "127.0.0.1", "plc_ip_address": "127.0.0.1", "global_mode": true, "ack": true, "bypass": false, "lock": false, "pyros_state": "Starting", "force_passive_mode": false, "plc_timeout_seconds": 10, "majordome_state": "", "ntc": false, "majordome_restarted": false}}, {"model": "common.version", "pk": 1, "fields": {"module_name": "Scheduler", "version": "0.1", "created": "2016-06-23T14:04:48Z", "updated": "2016-06-23T14:04:48Z"}}, {"model": "common.version", "pk": 2, "fields": {"module_name": "Dashboard", "version": "0.1", "created": "2016-06-23T14:04:48Z", "updated": "2016-06-23T14:04:48Z"}}, {"model": "common.version", "pk": 3, "fields": {"module_name": "Observation Manager", "version": "0.1", "created": "2016-06-23T14:04:48Z", "updated": "2016-06-23T14:04:48Z"}}, {"model": "common.version", "pk": 4, "fields": {"module_name": "Routine Manager", "version": "0.1", "created": "2016-06-23T14:04:48Z", "updated": "2016-06-23T14:04:48Z"}}, {"model": "common.version", "pk": 5, "fields": {"module_name": "Alert Manager", "version": "0.1", "created": "2016-06-23T14:04:48Z", "updated": "2016-06-23T14:04:48Z"}}, {"model": "common.version", "pk": 6, "fields": {"module_name": "Monitoring", "version": "0.1", "created": "2016-06-23T14:04:48Z", "updated": "2016-06-23T14:04:48Z"}}, {"model": "common.version", "pk": 7, "fields": {"module_name": "User Manager", "version": "0.1", "created": "2016-06-23T14:04:48Z", "updated": "2016-06-23T14:04:48Z"}}, {"model": "common.version", "pk": 8, "fields": {"module_name": "Analyzer", "version": "0.1", "created": "2016-06-23T14:04:48Z", "updated": "2016-06-23T14:04:48Z"}}, {"model": "common.version", "pk": 9, "fields": {"module_name": "Majordome", "version": "0.1", "created": "2016-06-23T14:04:48Z", "updated": "2016-06-23T14:04:48Z"}}, {"model": "common.version", "pk": 10, "fields": {"module_name": "Majordome", "version": "0.2", "created": "2016-06-28T10:50:32Z", "updated": "2016-06-28T10:50:32Z"}}, {"model": "common.version", "pk": 11, "fields": {"module_name": "Majordome", "version": "0.1.4", "created": "2016-07-20T13:44:29Z", "updated": "2016-07-20T13:44:29Z"}}, {"model": "common.version", "pk": 12, "fields": {"module_name": "Alert Manager", "version": "0.2.3", "created": "2016-07-20T13:44:29Z", "updated": "2016-07-20T13:44:29Z"}}, {"model": "common.version", "pk": 13, "fields": {"module_name": "Dashboard", "version": "0.1.1", "created": "2016-07-20T13:44:29Z", "updated": "2016-07-20T13:44:29Z"}}, {"model": "common.version", "pk": 14, "fields": {"module_name": "Observation Manager", "version": "0.1.3", "created": "2016-07-20T13:44:29Z", "updated": "2016-07-20T13:44:29Z"}}, {"model": "common.version", "pk": 15, "fields": {"module_name": "Routine Manager", "version": "0.1.2", "created": "2016-07-20T13:44:29Z", "updated": "2016-07-20T13:44:29Z"}}, {"model": "common.version", "pk": 16, "fields": {"module_name": "Monitoring", "version": "0.1.3", "created": "2016-07-20T13:44:29Z", "updated": "2016-07-20T13:44:29Z"}}, {"model": "common.version", "pk": 17, "fields": {"module_name": "Scheduler", "version": "0.1.2", "created": "2016-07-20T13:44:29Z", "updated": "2016-07-20T13:44:29Z"}}, {"model": "common.version", "pk": 18, "fields": {"module_name": "User Manager", "version": "0.1.1", "created": "2016-07-20T13:44:29Z", "updated": "2016-07-20T13:44:29Z"}}, {"model": "common.version", "pk": 19, "fields": {"module_name": "Analyzer", "version": "0.1.2", "created": "2016-07-20T13:44:29Z", "updated": "2016-07-20T13:44:29Z"}}, {"model": "seq_submit.sequence", "pk": 1, "fields": {"start_expo_pref": "IMMEDIATE", "pyros_user": 2, "scientific_program": 1, "name": "seq_20220218T158246", "desc": null, "created": "2022-02-18T15:07:36.334Z", "updated": "2022-02-21T12:40:50.275Z", "last_modified_by": null, "is_alert": false, "status": "DRAFT", "with_drift": false, "priority": null, "analysis_method": null, "moon_min": null, "alt_min": null, "type": null, "img_current": null, "img_total": null, "not_obs": false, "obsolete": false, "processing": false, "flag": null, "period": 1, "start_date": "2022-02-18T15:07:36Z", "end_date": "2022-02-18T15:07:36.333Z", "jd1": "0E-8", "jd2": "0E-8", "tolerance_before": "1s", "tolerance_after": "1min", "duration": "-1.00000000", "overhead": "0E-8", "submitted": false, "config_attributes": {"layout": "OpticalChannel", "target": "RADEC 0H10M -15D", "conformation": "WIDE", "tolerance_after": "1min", "tolerance_before": "1s"}, "ra": null, "dec": null, "complete": true, "night_id": null}}, {"model": "seq_submit.sequence", "pk": 2, "fields": {"start_expo_pref": "IMMEDIATE", "pyros_user": 2, "scientific_program": 1, "name": "seq_20220218T150731", "desc": null, "created": "2022-02-21T12:43:05.768Z", "updated": "2022-02-21T12:43:06.872Z", "last_modified_by": null, "is_alert": false, "status": "TBP", "with_drift": false, "priority": null, "analysis_method": null, "moon_min": null, "alt_min": null, "type": null, "img_current": null, "img_total": null, "not_obs": false, "obsolete": false, "processing": false, "flag": null, "period": 1, "start_date": "2022-02-21T20:07:36Z", "end_date": "2022-02-21T12:43:05.767Z", "jd1": "0E-8", "jd2": "0E-8", "tolerance_before": "1s", "tolerance_after": "1min", "duration": "-1.00000000", "overhead": "0E-8", "submitted": false, "config_attributes": {"layout": "OpticalChannel", "target": "RADEC 0H10M -15D", "conformation": "WIDE"}, "ra": null, "dec": null, "complete": true, "night_id": null}}, {"model": "seq_submit.sequence", "pk": 3, "fields": {"start_expo_pref": "IMMEDIATE", "pyros_user": 2, "scientific_program": 1, "name": "seq_20220218T150732", "desc": null, "created": "2022-02-21T12:44:28.423Z", "updated": "2022-02-21T12:44:29.556Z", "last_modified_by": null, "is_alert": false, "status": "TBP", "with_drift": false, "priority": null, "analysis_method": null, "moon_min": null, "alt_min": null, "type": null, "img_current": null, "img_total": null, "not_obs": false, "obsolete": false, "processing": false, "flag": null, "period": 1, "start_date": "2022-02-21T20:07:36Z", "end_date": "2022-02-21T12:44:28.422Z", "jd1": "0E-8", "jd2": "0E-8", "tolerance_before": "1s", "tolerance_after": "1min", "duration": "-1.00000000", "overhead": "0E-8", "submitted": false, "config_attributes": {"layout": "OpticalChannel", "target": "RADEC 0H10M -15D", "conformation": "WIDE"}, "ra": null, "dec": null, "complete": true, "night_id": null}}, {"model": "seq_submit.album", "pk": 1, "fields": {"sequence": 1, "name": "OpticalChannel", "desc": "Album with one channel", "created": "2022-02-18T15:07:43.164Z", "updated": "2022-02-21T12:40:50.149Z", "complete": true}}, {"model": "seq_submit.album", "pk": 2, "fields": {"sequence": 2, "name": "OpticalChannel", "desc": null, "created": "2022-02-21T12:43:06.477Z", "updated": "2022-02-21T12:43:06.477Z", "complete": true}}, {"model": "seq_submit.album", "pk": 3, "fields": {"sequence": 3, "name": "OpticalChannel", "desc": null, "created": "2022-02-21T12:44:29.265Z", "updated": "2022-02-21T12:44:29.265Z", "complete": true}}, {"model": "seq_submit.plan", "pk": 1, "fields": {"album": 1, "created": "2022-02-18T15:07:51.078Z", "updated": "2022-02-21T12:40:49.978Z", "duration": 0.0, "nb_images": 1, "config_attributes": {"binnings": {"binxy": [1, 1], "readouttime": 6}, "exposuretime": 1.0}, "complete": true}}, {"model": "seq_submit.plan", "pk": 2, "fields": {"album": 2, "created": "2022-02-21T12:43:06.670Z", "updated": "2022-02-21T12:43:06.794Z", "duration": 0.0, "nb_images": 1, "config_attributes": {"binnings": {"binxy": [1, 1], "readouttime": 6}, "exposuretime": 1.0}, "complete": true}}, {"model": "seq_submit.plan", "pk": 3, "fields": {"album": 3, "created": "2022-02-21T12:44:29.361Z", "updated": "2022-02-21T12:44:29.468Z", "duration": 0.0, "nb_images": 1, "config_attributes": {"binnings": {"binxy": [1, 1], "readouttime": 6}, "exposuretime": 1.0}, "complete": true}}, {"model": "devices.plcdevice", "pk": 1, "fields": {"is_online": false, "status": null, "maintenance_date": null, "name": "Plc", "desc": "", "created": "2018-06-18T14:32:00Z", "updated": "2018-06-18T14:32:00Z"}}, {"model": "devices.detector", "pk": 1, "fields": {"name": "Cagire", "desc": "", "created": "2016-05-13T11:49:49Z", "updated": "2016-05-13T11:49:49Z", "is_online": false, "status": "", "maintenance_date": null, "telescope": 1, "nb_photo_x": null, "nb_photo_y": null, "photo_size_x": null, "photo_size_y": null, "has_shutter": false, "equivalent_foc_len": "", "acq_start": null, "acq_stop": null, "check_temp": null, "gain": null, "readout_noise": null, "readout_time": null, "idcam_readout_mode": null}}, {"model": "devices.detector", "pk": 2, "fields": {"name": "Visible camera", "desc": "", "created": "2016-05-13T11:50:17Z", "updated": "2016-05-13T11:50:17Z", "is_online": false, "status": "", "maintenance_date": null, "telescope": 1, "nb_photo_x": null, "nb_photo_y": null, "photo_size_x": null, "photo_size_y": null, "has_shutter": false, "equivalent_foc_len": "", "acq_start": null, "acq_stop": null, "check_temp": null, "gain": null, "readout_noise": null, "readout_time": null, "idcam_readout_mode": null}}, {"model": "devices.dome", "pk": 1, "fields": {"name": "Dome", "desc": "dome", "created": "2016-05-13T11:50:14Z", "updated": "2016-05-13T11:50:14Z", "is_online": false, "status": "", "maintenance_date": null, "open": false}}, {"model": "devices.filter", "pk": 1, "fields": {"name": "First infrared filter", "desc": "", "created": "2016-05-13T11:49:56Z", "updated": "2016-05-13T11:49:56Z", "is_online": false, "status": "", "maintenance_date": null, "filter_wheel": 2, "category": "", "transmission_curve_doc": ""}}, {"model": "devices.filter", "pk": 2, "fields": {"name": "Second infrared filter", "desc": "", "created": "2016-05-13T11:50:07Z", "updated": "2016-05-13T11:50:07Z", "is_online": false, "status": "", "maintenance_date": null, "filter_wheel": 2, "category": "", "transmission_curve_doc": ""}}, {"model": "devices.filter", "pk": 3, "fields": {"name": "First visible filter", "desc": "", "created": "2016-05-13T11:50:02Z", "updated": "2016-05-13T11:50:02Z", "is_online": false, "status": "", "maintenance_date": null, "filter_wheel": 2, "category": "", "transmission_curve_doc": ""}}, {"model": "devices.filter", "pk": 4, "fields": {"name": "Second visible filter", "desc": "", "created": "2016-05-13T11:50:11Z", "updated": "2016-05-13T11:50:11Z", "is_online": false, "status": "", "maintenance_date": null, "filter_wheel": 2, "category": "", "transmission_curve_doc": ""}}, {"model": "devices.filterwheel", "pk": 1, "fields": {"name": "Cagire FW", "desc": "", "created": "2016-06-28T13:28:28Z", "updated": "2016-06-28T13:28:28Z", "is_online": false, "status": "", "maintenance_date": null, "detector": 1}}, {"model": "devices.filterwheel", "pk": 2, "fields": {"name": "Visible Camera FW", "desc": "", "created": "2016-06-28T13:28:46Z", "updated": "2016-06-28T13:28:46Z", "is_online": false, "status": "", "maintenance_date": null, "detector": 2}}, {"model": "devices.telescope", "pk": 1, "fields": {"name": "Telescope", "desc": "", "created": "2016-05-13T11:50:14Z", "updated": "2016-05-13T11:50:14Z", "is_online": false, "status": "", "maintenance_date": null, "mount_type": "", "diameter": null, "latitude": null, "longitude": null, "sens": "", "altitude": null, "readout_time": null, "slew_time": null, "slew_dead": null, "slew_rate_max": null, "horizon_type": "", "horizon_def": null, "lim_dec_max": null, "lim_dec_min": null, "lim_ha_rise": null, "lim_ha_set": null, "address": "", "night_elev_sun": null, "mpc_code": ""}}] \ No newline at end of file +[{"model": "auth.permission", "pk": 1, "fields": {"name": "Can add log entry", "content_type": 1, "codename": "add_logentry"}}, {"model": "auth.permission", "pk": 2, "fields": {"name": "Can change log entry", "content_type": 1, "codename": "change_logentry"}}, {"model": "auth.permission", "pk": 3, "fields": {"name": "Can delete log entry", "content_type": 1, "codename": "delete_logentry"}}, {"model": "auth.permission", "pk": 4, "fields": {"name": "Can view log entry", "content_type": 1, "codename": "view_logentry"}}, {"model": "auth.permission", "pk": 5, "fields": {"name": "Can add permission", "content_type": 2, "codename": "add_permission"}}, {"model": "auth.permission", "pk": 6, "fields": {"name": "Can change permission", "content_type": 2, "codename": "change_permission"}}, {"model": "auth.permission", "pk": 7, "fields": {"name": "Can delete permission", "content_type": 2, "codename": "delete_permission"}}, {"model": "auth.permission", "pk": 8, "fields": {"name": "Can view permission", "content_type": 2, "codename": "view_permission"}}, {"model": "auth.permission", "pk": 9, "fields": {"name": "Can add group", "content_type": 3, "codename": "add_group"}}, {"model": "auth.permission", "pk": 10, "fields": {"name": "Can change group", "content_type": 3, "codename": "change_group"}}, {"model": "auth.permission", "pk": 11, "fields": {"name": "Can delete group", "content_type": 3, "codename": "delete_group"}}, {"model": "auth.permission", "pk": 12, "fields": {"name": "Can view group", "content_type": 3, "codename": "view_group"}}, {"model": "auth.permission", "pk": 13, "fields": {"name": "Can add content type", "content_type": 4, "codename": "add_contenttype"}}, {"model": "auth.permission", "pk": 14, "fields": {"name": "Can change content type", "content_type": 4, "codename": "change_contenttype"}}, {"model": "auth.permission", "pk": 15, "fields": {"name": "Can delete content type", "content_type": 4, "codename": "delete_contenttype"}}, {"model": "auth.permission", "pk": 16, "fields": {"name": "Can view content type", "content_type": 4, "codename": "view_contenttype"}}, {"model": "auth.permission", "pk": 17, "fields": {"name": "Can add session", "content_type": 5, "codename": "add_session"}}, {"model": "auth.permission", "pk": 18, "fields": {"name": "Can change session", "content_type": 5, "codename": "change_session"}}, {"model": "auth.permission", "pk": 19, "fields": {"name": "Can delete session", "content_type": 5, "codename": "delete_session"}}, {"model": "auth.permission", "pk": 20, "fields": {"name": "Can view session", "content_type": 5, "codename": "view_session"}}, {"model": "auth.permission", "pk": 21, "fields": {"name": "Can add Token", "content_type": 6, "codename": "add_token"}}, {"model": "auth.permission", "pk": 22, "fields": {"name": "Can change Token", "content_type": 6, "codename": "change_token"}}, {"model": "auth.permission", "pk": 23, "fields": {"name": "Can delete Token", "content_type": 6, "codename": "delete_token"}}, {"model": "auth.permission", "pk": 24, "fields": {"name": "Can view Token", "content_type": 6, "codename": "view_token"}}, {"model": "auth.permission", "pk": 25, "fields": {"name": "Can add token", "content_type": 7, "codename": "add_tokenproxy"}}, {"model": "auth.permission", "pk": 26, "fields": {"name": "Can change token", "content_type": 7, "codename": "change_tokenproxy"}}, {"model": "auth.permission", "pk": 27, "fields": {"name": "Can delete token", "content_type": 7, "codename": "delete_tokenproxy"}}, {"model": "auth.permission", "pk": 28, "fields": {"name": "Can view token", "content_type": 7, "codename": "view_tokenproxy"}}, {"model": "auth.permission", "pk": 29, "fields": {"name": "Can add pyros user", "content_type": 8, "codename": "add_pyrosuser"}}, {"model": "auth.permission", "pk": 30, "fields": {"name": "Can change pyros user", "content_type": 8, "codename": "change_pyrosuser"}}, {"model": "auth.permission", "pk": 31, "fields": {"name": "Can delete pyros user", "content_type": 8, "codename": "delete_pyrosuser"}}, {"model": "auth.permission", "pk": 32, "fields": {"name": "Can view pyros user", "content_type": 8, "codename": "view_pyrosuser"}}, {"model": "auth.permission", "pk": 33, "fields": {"name": "Can add country", "content_type": 9, "codename": "add_country"}}, {"model": "auth.permission", "pk": 34, "fields": {"name": "Can change country", "content_type": 9, "codename": "change_country"}}, {"model": "auth.permission", "pk": 35, "fields": {"name": "Can delete country", "content_type": 9, "codename": "delete_country"}}, {"model": "auth.permission", "pk": 36, "fields": {"name": "Can view country", "content_type": 9, "codename": "view_country"}}, {"model": "auth.permission", "pk": 37, "fields": {"name": "Can add institute", "content_type": 10, "codename": "add_institute"}}, {"model": "auth.permission", "pk": 38, "fields": {"name": "Can change institute", "content_type": 10, "codename": "change_institute"}}, {"model": "auth.permission", "pk": 39, "fields": {"name": "Can delete institute", "content_type": 10, "codename": "delete_institute"}}, {"model": "auth.permission", "pk": 40, "fields": {"name": "Can view institute", "content_type": 10, "codename": "view_institute"}}, {"model": "auth.permission", "pk": 41, "fields": {"name": "Can add period", "content_type": 11, "codename": "add_period"}}, {"model": "auth.permission", "pk": 42, "fields": {"name": "Can change period", "content_type": 11, "codename": "change_period"}}, {"model": "auth.permission", "pk": 43, "fields": {"name": "Can delete period", "content_type": 11, "codename": "delete_period"}}, {"model": "auth.permission", "pk": 44, "fields": {"name": "Can view period", "content_type": 11, "codename": "view_period"}}, {"model": "auth.permission", "pk": 45, "fields": {"name": "Can add science theme", "content_type": 12, "codename": "add_sciencetheme"}}, {"model": "auth.permission", "pk": 46, "fields": {"name": "Can change science theme", "content_type": 12, "codename": "change_sciencetheme"}}, {"model": "auth.permission", "pk": 47, "fields": {"name": "Can delete science theme", "content_type": 12, "codename": "delete_sciencetheme"}}, {"model": "auth.permission", "pk": 48, "fields": {"name": "Can view science theme", "content_type": 12, "codename": "view_sciencetheme"}}, {"model": "auth.permission", "pk": 49, "fields": {"name": "Can add scientific program", "content_type": 13, "codename": "add_scientificprogram"}}, {"model": "auth.permission", "pk": 50, "fields": {"name": "Can change scientific program", "content_type": 13, "codename": "change_scientificprogram"}}, {"model": "auth.permission", "pk": 51, "fields": {"name": "Can delete scientific program", "content_type": 13, "codename": "delete_scientificprogram"}}, {"model": "auth.permission", "pk": 52, "fields": {"name": "Can view scientific program", "content_type": 13, "codename": "view_scientificprogram"}}, {"model": "auth.permission", "pk": 53, "fields": {"name": "Can add s p_ period", "content_type": 14, "codename": "add_sp_period"}}, {"model": "auth.permission", "pk": 54, "fields": {"name": "Can change s p_ period", "content_type": 14, "codename": "change_sp_period"}}, {"model": "auth.permission", "pk": 55, "fields": {"name": "Can delete s p_ period", "content_type": 14, "codename": "delete_sp_period"}}, {"model": "auth.permission", "pk": 56, "fields": {"name": "Can view s p_ period", "content_type": 14, "codename": "view_sp_period"}}, {"model": "auth.permission", "pk": 57, "fields": {"name": "Can add user level", "content_type": 15, "codename": "add_userlevel"}}, {"model": "auth.permission", "pk": 58, "fields": {"name": "Can change user level", "content_type": 15, "codename": "change_userlevel"}}, {"model": "auth.permission", "pk": 59, "fields": {"name": "Can delete user level", "content_type": 15, "codename": "delete_userlevel"}}, {"model": "auth.permission", "pk": 60, "fields": {"name": "Can view user level", "content_type": 15, "codename": "view_userlevel"}}, {"model": "auth.permission", "pk": 61, "fields": {"name": "Can add s p_ period workflow", "content_type": 16, "codename": "add_sp_periodworkflow"}}, {"model": "auth.permission", "pk": 62, "fields": {"name": "Can change s p_ period workflow", "content_type": 16, "codename": "change_sp_periodworkflow"}}, {"model": "auth.permission", "pk": 63, "fields": {"name": "Can delete s p_ period workflow", "content_type": 16, "codename": "delete_sp_periodworkflow"}}, {"model": "auth.permission", "pk": 64, "fields": {"name": "Can view s p_ period workflow", "content_type": 16, "codename": "view_sp_periodworkflow"}}, {"model": "auth.permission", "pk": 65, "fields": {"name": "Can add s p_ period_ guest", "content_type": 17, "codename": "add_sp_period_guest"}}, {"model": "auth.permission", "pk": 66, "fields": {"name": "Can change s p_ period_ guest", "content_type": 17, "codename": "change_sp_period_guest"}}, {"model": "auth.permission", "pk": 67, "fields": {"name": "Can delete s p_ period_ guest", "content_type": 17, "codename": "delete_sp_period_guest"}}, {"model": "auth.permission", "pk": 68, "fields": {"name": "Can view s p_ period_ guest", "content_type": 17, "codename": "view_sp_period_guest"}}, {"model": "auth.permission", "pk": 69, "fields": {"name": "Can add s p_ period_ user", "content_type": 18, "codename": "add_sp_period_user"}}, {"model": "auth.permission", "pk": 70, "fields": {"name": "Can change s p_ period_ user", "content_type": 18, "codename": "change_sp_period_user"}}, {"model": "auth.permission", "pk": 71, "fields": {"name": "Can delete s p_ period_ user", "content_type": 18, "codename": "delete_sp_period_user"}}, {"model": "auth.permission", "pk": 72, "fields": {"name": "Can view s p_ period_ user", "content_type": 18, "codename": "view_sp_period_user"}}, {"model": "auth.permission", "pk": 73, "fields": {"name": "Can add agent cmd", "content_type": 19, "codename": "add_agentcmd"}}, {"model": "auth.permission", "pk": 74, "fields": {"name": "Can change agent cmd", "content_type": 19, "codename": "change_agentcmd"}}, {"model": "auth.permission", "pk": 75, "fields": {"name": "Can delete agent cmd", "content_type": 19, "codename": "delete_agentcmd"}}, {"model": "auth.permission", "pk": 76, "fields": {"name": "Can view agent cmd", "content_type": 19, "codename": "view_agentcmd"}}, {"model": "auth.permission", "pk": 77, "fields": {"name": "Can add agent logs", "content_type": 20, "codename": "add_agentlogs"}}, {"model": "auth.permission", "pk": 78, "fields": {"name": "Can change agent logs", "content_type": 20, "codename": "change_agentlogs"}}, {"model": "auth.permission", "pk": 79, "fields": {"name": "Can delete agent logs", "content_type": 20, "codename": "delete_agentlogs"}}, {"model": "auth.permission", "pk": 80, "fields": {"name": "Can view agent logs", "content_type": 20, "codename": "view_agentlogs"}}, {"model": "auth.permission", "pk": 81, "fields": {"name": "Can add agent survey", "content_type": 21, "codename": "add_agentsurvey"}}, {"model": "auth.permission", "pk": 82, "fields": {"name": "Can change agent survey", "content_type": 21, "codename": "change_agentsurvey"}}, {"model": "auth.permission", "pk": 83, "fields": {"name": "Can delete agent survey", "content_type": 21, "codename": "delete_agentsurvey"}}, {"model": "auth.permission", "pk": 84, "fields": {"name": "Can view agent survey", "content_type": 21, "codename": "view_agentsurvey"}}, {"model": "auth.permission", "pk": 85, "fields": {"name": "Can add config", "content_type": 22, "codename": "add_config"}}, {"model": "auth.permission", "pk": 86, "fields": {"name": "Can change config", "content_type": 22, "codename": "change_config"}}, {"model": "auth.permission", "pk": 87, "fields": {"name": "Can delete config", "content_type": 22, "codename": "delete_config"}}, {"model": "auth.permission", "pk": 88, "fields": {"name": "Can view config", "content_type": 22, "codename": "view_config"}}, {"model": "auth.permission", "pk": 89, "fields": {"name": "Can add env_data", "content_type": 23, "codename": "add_env_data"}}, {"model": "auth.permission", "pk": 90, "fields": {"name": "Can change env_data", "content_type": 23, "codename": "change_env_data"}}, {"model": "auth.permission", "pk": 91, "fields": {"name": "Can delete env_data", "content_type": 23, "codename": "delete_env_data"}}, {"model": "auth.permission", "pk": 92, "fields": {"name": "Can view env_data", "content_type": 23, "codename": "view_env_data"}}, {"model": "auth.permission", "pk": 93, "fields": {"name": "Can add env_data_hist", "content_type": 24, "codename": "add_env_data_hist"}}, {"model": "auth.permission", "pk": 94, "fields": {"name": "Can change env_data_hist", "content_type": 24, "codename": "change_env_data_hist"}}, {"model": "auth.permission", "pk": 95, "fields": {"name": "Can delete env_data_hist", "content_type": 24, "codename": "delete_env_data_hist"}}, {"model": "auth.permission", "pk": 96, "fields": {"name": "Can view env_data_hist", "content_type": 24, "codename": "view_env_data_hist"}}, {"model": "auth.permission", "pk": 97, "fields": {"name": "Can add log", "content_type": 25, "codename": "add_log"}}, {"model": "auth.permission", "pk": 98, "fields": {"name": "Can change log", "content_type": 25, "codename": "change_log"}}, {"model": "auth.permission", "pk": 99, "fields": {"name": "Can delete log", "content_type": 25, "codename": "delete_log"}}, {"model": "auth.permission", "pk": 100, "fields": {"name": "Can view log", "content_type": 25, "codename": "view_log"}}, {"model": "auth.permission", "pk": 101, "fields": {"name": "Can add majordome", "content_type": 26, "codename": "add_majordome"}}, {"model": "auth.permission", "pk": 102, "fields": {"name": "Can change majordome", "content_type": 26, "codename": "change_majordome"}}, {"model": "auth.permission", "pk": 103, "fields": {"name": "Can delete majordome", "content_type": 26, "codename": "delete_majordome"}}, {"model": "auth.permission", "pk": 104, "fields": {"name": "Can view majordome", "content_type": 26, "codename": "view_majordome"}}, {"model": "auth.permission", "pk": 105, "fields": {"name": "Can add sensors_data", "content_type": 27, "codename": "add_sensors_data"}}, {"model": "auth.permission", "pk": 106, "fields": {"name": "Can change sensors_data", "content_type": 27, "codename": "change_sensors_data"}}, {"model": "auth.permission", "pk": 107, "fields": {"name": "Can delete sensors_data", "content_type": 27, "codename": "delete_sensors_data"}}, {"model": "auth.permission", "pk": 108, "fields": {"name": "Can view sensors_data", "content_type": 27, "codename": "view_sensors_data"}}, {"model": "auth.permission", "pk": 109, "fields": {"name": "Can add sensors_data_last_value", "content_type": 28, "codename": "add_sensors_data_last_value"}}, {"model": "auth.permission", "pk": 110, "fields": {"name": "Can change sensors_data_last_value", "content_type": 28, "codename": "change_sensors_data_last_value"}}, {"model": "auth.permission", "pk": 111, "fields": {"name": "Can delete sensors_data_last_value", "content_type": 28, "codename": "delete_sensors_data_last_value"}}, {"model": "auth.permission", "pk": 112, "fields": {"name": "Can view sensors_data_last_value", "content_type": 28, "codename": "view_sensors_data_last_value"}}, {"model": "auth.permission", "pk": 113, "fields": {"name": "Can add site watch", "content_type": 29, "codename": "add_sitewatch"}}, {"model": "auth.permission", "pk": 114, "fields": {"name": "Can change site watch", "content_type": 29, "codename": "change_sitewatch"}}, {"model": "auth.permission", "pk": 115, "fields": {"name": "Can delete site watch", "content_type": 29, "codename": "delete_sitewatch"}}, {"model": "auth.permission", "pk": 116, "fields": {"name": "Can view site watch", "content_type": 29, "codename": "view_sitewatch"}}, {"model": "auth.permission", "pk": 117, "fields": {"name": "Can add site watch history", "content_type": 30, "codename": "add_sitewatchhistory"}}, {"model": "auth.permission", "pk": 118, "fields": {"name": "Can change site watch history", "content_type": 30, "codename": "change_sitewatchhistory"}}, {"model": "auth.permission", "pk": 119, "fields": {"name": "Can delete site watch history", "content_type": 30, "codename": "delete_sitewatchhistory"}}, {"model": "auth.permission", "pk": 120, "fields": {"name": "Can view site watch history", "content_type": 30, "codename": "view_sitewatchhistory"}}, {"model": "auth.permission", "pk": 121, "fields": {"name": "Can add tickets", "content_type": 31, "codename": "add_tickets"}}, {"model": "auth.permission", "pk": 122, "fields": {"name": "Can change tickets", "content_type": 31, "codename": "change_tickets"}}, {"model": "auth.permission", "pk": 123, "fields": {"name": "Can delete tickets", "content_type": 31, "codename": "delete_tickets"}}, {"model": "auth.permission", "pk": 124, "fields": {"name": "Can view tickets", "content_type": 31, "codename": "view_tickets"}}, {"model": "auth.permission", "pk": 125, "fields": {"name": "Can add version", "content_type": 32, "codename": "add_version"}}, {"model": "auth.permission", "pk": 126, "fields": {"name": "Can change version", "content_type": 32, "codename": "change_version"}}, {"model": "auth.permission", "pk": 127, "fields": {"name": "Can delete version", "content_type": 32, "codename": "delete_version"}}, {"model": "auth.permission", "pk": 128, "fields": {"name": "Can view version", "content_type": 32, "codename": "view_version"}}, {"model": "auth.permission", "pk": 129, "fields": {"name": "Can add weather watch", "content_type": 33, "codename": "add_weatherwatch"}}, {"model": "auth.permission", "pk": 130, "fields": {"name": "Can change weather watch", "content_type": 33, "codename": "change_weatherwatch"}}, {"model": "auth.permission", "pk": 131, "fields": {"name": "Can delete weather watch", "content_type": 33, "codename": "delete_weatherwatch"}}, {"model": "auth.permission", "pk": 132, "fields": {"name": "Can view weather watch", "content_type": 33, "codename": "view_weatherwatch"}}, {"model": "auth.permission", "pk": 133, "fields": {"name": "Can add weather watch history", "content_type": 34, "codename": "add_weatherwatchhistory"}}, {"model": "auth.permission", "pk": 134, "fields": {"name": "Can change weather watch history", "content_type": 34, "codename": "change_weatherwatchhistory"}}, {"model": "auth.permission", "pk": 135, "fields": {"name": "Can delete weather watch history", "content_type": 34, "codename": "delete_weatherwatchhistory"}}, {"model": "auth.permission", "pk": 136, "fields": {"name": "Can view weather watch history", "content_type": 34, "codename": "view_weatherwatchhistory"}}, {"model": "auth.permission", "pk": 137, "fields": {"name": "Can add album", "content_type": 35, "codename": "add_album"}}, {"model": "auth.permission", "pk": 138, "fields": {"name": "Can change album", "content_type": 35, "codename": "change_album"}}, {"model": "auth.permission", "pk": 139, "fields": {"name": "Can delete album", "content_type": 35, "codename": "delete_album"}}, {"model": "auth.permission", "pk": 140, "fields": {"name": "Can view album", "content_type": 35, "codename": "view_album"}}, {"model": "auth.permission", "pk": 141, "fields": {"name": "Can add image", "content_type": 36, "codename": "add_image"}}, {"model": "auth.permission", "pk": 142, "fields": {"name": "Can change image", "content_type": 36, "codename": "change_image"}}, {"model": "auth.permission", "pk": 143, "fields": {"name": "Can delete image", "content_type": 36, "codename": "delete_image"}}, {"model": "auth.permission", "pk": 144, "fields": {"name": "Can view image", "content_type": 36, "codename": "view_image"}}, {"model": "auth.permission", "pk": 145, "fields": {"name": "Can add plan", "content_type": 37, "codename": "add_plan"}}, {"model": "auth.permission", "pk": 146, "fields": {"name": "Can change plan", "content_type": 37, "codename": "change_plan"}}, {"model": "auth.permission", "pk": 147, "fields": {"name": "Can delete plan", "content_type": 37, "codename": "delete_plan"}}, {"model": "auth.permission", "pk": 148, "fields": {"name": "Can view plan", "content_type": 37, "codename": "view_plan"}}, {"model": "auth.permission", "pk": 149, "fields": {"name": "Can add schedule", "content_type": 38, "codename": "add_schedule"}}, {"model": "auth.permission", "pk": 150, "fields": {"name": "Can change schedule", "content_type": 38, "codename": "change_schedule"}}, {"model": "auth.permission", "pk": 151, "fields": {"name": "Can delete schedule", "content_type": 38, "codename": "delete_schedule"}}, {"model": "auth.permission", "pk": 152, "fields": {"name": "Can view schedule", "content_type": 38, "codename": "view_schedule"}}, {"model": "auth.permission", "pk": 153, "fields": {"name": "Can add schedule has sequences", "content_type": 39, "codename": "add_schedulehassequences"}}, {"model": "auth.permission", "pk": 154, "fields": {"name": "Can change schedule has sequences", "content_type": 39, "codename": "change_schedulehassequences"}}, {"model": "auth.permission", "pk": 155, "fields": {"name": "Can delete schedule has sequences", "content_type": 39, "codename": "delete_schedulehassequences"}}, {"model": "auth.permission", "pk": 156, "fields": {"name": "Can view schedule has sequences", "content_type": 39, "codename": "view_schedulehassequences"}}, {"model": "auth.permission", "pk": 157, "fields": {"name": "Can add sequence", "content_type": 40, "codename": "add_sequence"}}, {"model": "auth.permission", "pk": 158, "fields": {"name": "Can change sequence", "content_type": 40, "codename": "change_sequence"}}, {"model": "auth.permission", "pk": 159, "fields": {"name": "Can delete sequence", "content_type": 40, "codename": "delete_sequence"}}, {"model": "auth.permission", "pk": 160, "fields": {"name": "Can view sequence", "content_type": 40, "codename": "view_sequence"}}, {"model": "auth.permission", "pk": 161, "fields": {"name": "Can add agent device status", "content_type": 41, "codename": "add_agentdevicestatus"}}, {"model": "auth.permission", "pk": 162, "fields": {"name": "Can change agent device status", "content_type": 41, "codename": "change_agentdevicestatus"}}, {"model": "auth.permission", "pk": 163, "fields": {"name": "Can delete agent device status", "content_type": 41, "codename": "delete_agentdevicestatus"}}, {"model": "auth.permission", "pk": 164, "fields": {"name": "Can view agent device status", "content_type": 41, "codename": "view_agentdevicestatus"}}, {"model": "auth.permission", "pk": 165, "fields": {"name": "Can add agent device telescope status", "content_type": 42, "codename": "add_agentdevicetelescopestatus"}}, {"model": "auth.permission", "pk": 166, "fields": {"name": "Can change agent device telescope status", "content_type": 42, "codename": "change_agentdevicetelescopestatus"}}, {"model": "auth.permission", "pk": 167, "fields": {"name": "Can delete agent device telescope status", "content_type": 42, "codename": "delete_agentdevicetelescopestatus"}}, {"model": "auth.permission", "pk": 168, "fields": {"name": "Can view agent device telescope status", "content_type": 42, "codename": "view_agentdevicetelescopestatus"}}, {"model": "auth.permission", "pk": 169, "fields": {"name": "Can add detector", "content_type": 43, "codename": "add_detector"}}, {"model": "auth.permission", "pk": 170, "fields": {"name": "Can change detector", "content_type": 43, "codename": "change_detector"}}, {"model": "auth.permission", "pk": 171, "fields": {"name": "Can delete detector", "content_type": 43, "codename": "delete_detector"}}, {"model": "auth.permission", "pk": 172, "fields": {"name": "Can view detector", "content_type": 43, "codename": "view_detector"}}, {"model": "auth.permission", "pk": 173, "fields": {"name": "Can add dome", "content_type": 44, "codename": "add_dome"}}, {"model": "auth.permission", "pk": 174, "fields": {"name": "Can change dome", "content_type": 44, "codename": "change_dome"}}, {"model": "auth.permission", "pk": 175, "fields": {"name": "Can delete dome", "content_type": 44, "codename": "delete_dome"}}, {"model": "auth.permission", "pk": 176, "fields": {"name": "Can view dome", "content_type": 44, "codename": "view_dome"}}, {"model": "auth.permission", "pk": 177, "fields": {"name": "Can add plc device", "content_type": 45, "codename": "add_plcdevice"}}, {"model": "auth.permission", "pk": 178, "fields": {"name": "Can change plc device", "content_type": 45, "codename": "change_plcdevice"}}, {"model": "auth.permission", "pk": 179, "fields": {"name": "Can delete plc device", "content_type": 45, "codename": "delete_plcdevice"}}, {"model": "auth.permission", "pk": 180, "fields": {"name": "Can view plc device", "content_type": 45, "codename": "view_plcdevice"}}, {"model": "auth.permission", "pk": 181, "fields": {"name": "Can add telescope", "content_type": 46, "codename": "add_telescope"}}, {"model": "auth.permission", "pk": 182, "fields": {"name": "Can change telescope", "content_type": 46, "codename": "change_telescope"}}, {"model": "auth.permission", "pk": 183, "fields": {"name": "Can delete telescope", "content_type": 46, "codename": "delete_telescope"}}, {"model": "auth.permission", "pk": 184, "fields": {"name": "Can view telescope", "content_type": 46, "codename": "view_telescope"}}, {"model": "auth.permission", "pk": 185, "fields": {"name": "Can add telescope command", "content_type": 47, "codename": "add_telescopecommand"}}, {"model": "auth.permission", "pk": 186, "fields": {"name": "Can change telescope command", "content_type": 47, "codename": "change_telescopecommand"}}, {"model": "auth.permission", "pk": 187, "fields": {"name": "Can delete telescope command", "content_type": 47, "codename": "delete_telescopecommand"}}, {"model": "auth.permission", "pk": 188, "fields": {"name": "Can view telescope command", "content_type": 47, "codename": "view_telescopecommand"}}, {"model": "auth.permission", "pk": 189, "fields": {"name": "Can add plc device status", "content_type": 48, "codename": "add_plcdevicestatus"}}, {"model": "auth.permission", "pk": 190, "fields": {"name": "Can change plc device status", "content_type": 48, "codename": "change_plcdevicestatus"}}, {"model": "auth.permission", "pk": 191, "fields": {"name": "Can delete plc device status", "content_type": 48, "codename": "delete_plcdevicestatus"}}, {"model": "auth.permission", "pk": 192, "fields": {"name": "Can view plc device status", "content_type": 48, "codename": "view_plcdevicestatus"}}, {"model": "auth.permission", "pk": 193, "fields": {"name": "Can add filter wheel", "content_type": 49, "codename": "add_filterwheel"}}, {"model": "auth.permission", "pk": 194, "fields": {"name": "Can change filter wheel", "content_type": 49, "codename": "change_filterwheel"}}, {"model": "auth.permission", "pk": 195, "fields": {"name": "Can delete filter wheel", "content_type": 49, "codename": "delete_filterwheel"}}, {"model": "auth.permission", "pk": 196, "fields": {"name": "Can view filter wheel", "content_type": 49, "codename": "view_filterwheel"}}, {"model": "auth.permission", "pk": 197, "fields": {"name": "Can add filter", "content_type": 50, "codename": "add_filter"}}, {"model": "auth.permission", "pk": 198, "fields": {"name": "Can change filter", "content_type": 50, "codename": "change_filter"}}, {"model": "auth.permission", "pk": 199, "fields": {"name": "Can delete filter", "content_type": 50, "codename": "delete_filter"}}, {"model": "auth.permission", "pk": 200, "fields": {"name": "Can view filter", "content_type": 50, "codename": "view_filter"}}, {"model": "contenttypes.contenttype", "pk": 1, "fields": {"app_label": "admin", "model": "logentry"}}, {"model": "contenttypes.contenttype", "pk": 2, "fields": {"app_label": "auth", "model": "permission"}}, {"model": "contenttypes.contenttype", "pk": 3, "fields": {"app_label": "auth", "model": "group"}}, {"model": "contenttypes.contenttype", "pk": 4, "fields": {"app_label": "contenttypes", "model": "contenttype"}}, {"model": "contenttypes.contenttype", "pk": 5, "fields": {"app_label": "sessions", "model": "session"}}, {"model": "contenttypes.contenttype", "pk": 6, "fields": {"app_label": "authtoken", "model": "token"}}, {"model": "contenttypes.contenttype", "pk": 7, "fields": {"app_label": "authtoken", "model": "tokenproxy"}}, {"model": "contenttypes.contenttype", "pk": 8, "fields": {"app_label": "user_mgmt", "model": "pyrosuser"}}, {"model": "contenttypes.contenttype", "pk": 9, "fields": {"app_label": "user_mgmt", "model": "country"}}, {"model": "contenttypes.contenttype", "pk": 10, "fields": {"app_label": "user_mgmt", "model": "institute"}}, {"model": "contenttypes.contenttype", "pk": 11, "fields": {"app_label": "user_mgmt", "model": "period"}}, {"model": "contenttypes.contenttype", "pk": 12, "fields": {"app_label": "user_mgmt", "model": "sciencetheme"}}, {"model": "contenttypes.contenttype", "pk": 13, "fields": {"app_label": "user_mgmt", "model": "scientificprogram"}}, {"model": "contenttypes.contenttype", "pk": 14, "fields": {"app_label": "user_mgmt", "model": "sp_period"}}, {"model": "contenttypes.contenttype", "pk": 15, "fields": {"app_label": "user_mgmt", "model": "userlevel"}}, {"model": "contenttypes.contenttype", "pk": 16, "fields": {"app_label": "user_mgmt", "model": "sp_periodworkflow"}}, {"model": "contenttypes.contenttype", "pk": 17, "fields": {"app_label": "user_mgmt", "model": "sp_period_guest"}}, {"model": "contenttypes.contenttype", "pk": 18, "fields": {"app_label": "user_mgmt", "model": "sp_period_user"}}, {"model": "contenttypes.contenttype", "pk": 19, "fields": {"app_label": "common", "model": "agentcmd"}}, {"model": "contenttypes.contenttype", "pk": 20, "fields": {"app_label": "common", "model": "agentlogs"}}, {"model": "contenttypes.contenttype", "pk": 21, "fields": {"app_label": "common", "model": "agentsurvey"}}, {"model": "contenttypes.contenttype", "pk": 22, "fields": {"app_label": "common", "model": "config"}}, {"model": "contenttypes.contenttype", "pk": 23, "fields": {"app_label": "common", "model": "env_data"}}, {"model": "contenttypes.contenttype", "pk": 24, "fields": {"app_label": "common", "model": "env_data_hist"}}, {"model": "contenttypes.contenttype", "pk": 25, "fields": {"app_label": "common", "model": "log"}}, {"model": "contenttypes.contenttype", "pk": 26, "fields": {"app_label": "common", "model": "majordome"}}, {"model": "contenttypes.contenttype", "pk": 27, "fields": {"app_label": "common", "model": "sensors_data"}}, {"model": "contenttypes.contenttype", "pk": 28, "fields": {"app_label": "common", "model": "sensors_data_last_value"}}, {"model": "contenttypes.contenttype", "pk": 29, "fields": {"app_label": "common", "model": "sitewatch"}}, {"model": "contenttypes.contenttype", "pk": 30, "fields": {"app_label": "common", "model": "sitewatchhistory"}}, {"model": "contenttypes.contenttype", "pk": 31, "fields": {"app_label": "common", "model": "tickets"}}, {"model": "contenttypes.contenttype", "pk": 32, "fields": {"app_label": "common", "model": "version"}}, {"model": "contenttypes.contenttype", "pk": 33, "fields": {"app_label": "common", "model": "weatherwatch"}}, {"model": "contenttypes.contenttype", "pk": 34, "fields": {"app_label": "common", "model": "weatherwatchhistory"}}, {"model": "contenttypes.contenttype", "pk": 35, "fields": {"app_label": "seq_submit", "model": "album"}}, {"model": "contenttypes.contenttype", "pk": 36, "fields": {"app_label": "seq_submit", "model": "image"}}, {"model": "contenttypes.contenttype", "pk": 37, "fields": {"app_label": "seq_submit", "model": "plan"}}, {"model": "contenttypes.contenttype", "pk": 38, "fields": {"app_label": "seq_submit", "model": "schedule"}}, {"model": "contenttypes.contenttype", "pk": 39, "fields": {"app_label": "seq_submit", "model": "schedulehassequences"}}, {"model": "contenttypes.contenttype", "pk": 40, "fields": {"app_label": "seq_submit", "model": "sequence"}}, {"model": "contenttypes.contenttype", "pk": 41, "fields": {"app_label": "devices", "model": "agentdevicestatus"}}, {"model": "contenttypes.contenttype", "pk": 42, "fields": {"app_label": "devices", "model": "agentdevicetelescopestatus"}}, {"model": "contenttypes.contenttype", "pk": 43, "fields": {"app_label": "devices", "model": "detector"}}, {"model": "contenttypes.contenttype", "pk": 44, "fields": {"app_label": "devices", "model": "dome"}}, {"model": "contenttypes.contenttype", "pk": 45, "fields": {"app_label": "devices", "model": "plcdevice"}}, {"model": "contenttypes.contenttype", "pk": 46, "fields": {"app_label": "devices", "model": "telescope"}}, {"model": "contenttypes.contenttype", "pk": 47, "fields": {"app_label": "devices", "model": "telescopecommand"}}, {"model": "contenttypes.contenttype", "pk": 48, "fields": {"app_label": "devices", "model": "plcdevicestatus"}}, {"model": "contenttypes.contenttype", "pk": 49, "fields": {"app_label": "devices", "model": "filterwheel"}}, {"model": "contenttypes.contenttype", "pk": 50, "fields": {"app_label": "devices", "model": "filter"}}, {"model": "user_mgmt.userlevel", "pk": 1, "fields": {"name": "Admin", "desc": "", "priority": 8, "quota": 9999.0}}, {"model": "user_mgmt.userlevel", "pk": 2, "fields": {"name": "Observer", "desc": "", "priority": 2, "quota": 9999.0}}, {"model": "user_mgmt.userlevel", "pk": 3, "fields": {"name": "TAC", "desc": "", "priority": 1, "quota": 9999.0}}, {"model": "user_mgmt.userlevel", "pk": 4, "fields": {"name": "Management board member", "desc": "", "priority": 3, "quota": 9999.0}}, {"model": "user_mgmt.userlevel", "pk": 5, "fields": {"name": "Operator", "desc": "", "priority": 4, "quota": 9999.0}}, {"model": "user_mgmt.userlevel", "pk": 6, "fields": {"name": "Unit-PI", "desc": "", "priority": 7, "quota": 9999.0}}, {"model": "user_mgmt.userlevel", "pk": 7, "fields": {"name": "Unit-board", "desc": "", "priority": 6, "quota": 9999.0}}, {"model": "user_mgmt.userlevel", "pk": 8, "fields": {"name": "Visitor", "desc": "Account without any privilege", "priority": 0, "quota": 0.0}}, {"model": "user_mgmt.country", "pk": 1, "fields": {"name": "France", "desc": "", "quota": null}}, {"model": "user_mgmt.institute", "pk": 1, "fields": {"name": "CNES", "quota": 80}}, {"model": "user_mgmt.institute", "pk": 2, "fields": {"name": "CNRS", "quota": 20}}, {"model": "user_mgmt.sciencetheme", "pk": 1, "fields": {"name": "Solar System"}}, {"model": "user_mgmt.sciencetheme", "pk": 2, "fields": {"name": "Galatic"}}, {"model": "user_mgmt.sciencetheme", "pk": 3, "fields": {"name": "Extra Galatic"}}, {"model": "user_mgmt.pyrosuser", "pk": 1, "fields": {"password": "pbkdf2_sha256$24000$HRial3QUfrlz$bVuEzQaXthOd9GZVXd2449LDEF8EMQure69nA/Hu7qQ=", "last_login": "2016-08-10T15:16:42.327Z", "is_superuser": true, "first_name": "pyros", "last_name": "", "email": "admin@example.com", "is_staff": true, "date_joined": "2016-08-10T15:15:58.481Z", "username": "pyros", "is_active": true, "first_time": false, "country": 1, "desc": "", "created": "2016-08-11T07:54:05.627Z", "updated": "2016-08-11T07:54:05.627Z", "tel": "", "address": "", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": null, "groups": [], "user_permissions": [], "user_level": [1], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 2, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Pascal", "last_name": "Richard", "email": "Pascal.Richard@cnes.fr", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Pascal.Richard@cnes.fr", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "18 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "CNES", "institute": 1, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [2], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 3, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Mégane", "last_name": "Diet", "email": "Megane.Diet@cnes.fr", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Megane.Diet@cnes.fr", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "18 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "CNES", "institute": 1, "is_institute_representative": true, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [2, 4], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 4, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Valentin", "last_name": "Baral", "email": "Valentin.Baral@cnes.fr", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Valentin.Baral@cnes.fr", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "18 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "CNES", "institute": 1, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [2], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 5, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Alain", "last_name": "Klotz", "email": "aklotz@irap.omp.eu", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "aklotz@irap.omp.eu", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": true, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [2, 4, 6], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 6, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Loic", "last_name": "Eymar", "email": "loic.eymar@oca.eu", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "loic.eymar@oca.eu", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "96 Boulevard de l'Observatoire, 06300 Nice", "laboratory": "OCA", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [2, 5], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 7, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": true, "first_name": "Etienne", "last_name": "Pallier", "email": "etienne.pallier@irap.omp.eu", "is_staff": true, "date_joined": "2021-05-20T09:03:37.108Z", "username": "etienne.pallier@irap.omp.eu", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [1], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 8, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": true, "first_name": "Alexis", "last_name": "Koralewski", "email": "akoralewski@irap.omp.eu", "is_staff": true, "date_joined": "2021-05-20T09:03:37.108Z", "username": "akoralewski@irap.omp.eu", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [1], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 9, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Observer", "last_name": "Observer", "email": "observer@example.com", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "observer@example.com", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [2], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 10, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": true, "first_name": "Admin", "last_name": "Admin", "email": "Admin@example.com", "is_staff": true, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Admin@example.com", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [1], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 11, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Operator", "last_name": "Operator", "email": "Operator@example.com", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Operator@example.com", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [5], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 12, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Management", "last_name": "Board", "email": "Management_board@example.com", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Management_board@example.com", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [4], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 13, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": true, "first_name": "Unit", "last_name": "PI", "email": "Unit-PI@example.com", "is_staff": true, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Unit-PI@example.com", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [6], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 14, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "TAC", "last_name": "TAC", "email": "TAC@example.com", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "TAC@example.com", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [3], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 15, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": false, "first_name": "Visitor", "last_name": "Visitor", "email": "Visitor@example.com", "is_staff": false, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Visitor@example.com", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [8], "referee_themes": []}}, {"model": "user_mgmt.pyrosuser", "pk": 16, "fields": {"password": "pbkdf2_sha256$100000$LdWOwxlQqzYU$n5YIpgps3de5U8bAx3sVmhFhwXCHgczKszJG8SuVyjs=", "last_login": null, "is_superuser": true, "first_name": "Unit", "last_name": "Board", "email": "Unit-board@example.com", "is_staff": true, "date_joined": "2021-05-20T09:03:37.108Z", "username": "Unit-board@example.com", "is_active": true, "first_time": false, "country": 1, "desc": null, "created": "2021-05-20T09:03:37.108Z", "updated": "2021-05-20T09:03:37.138Z", "tel": null, "address": "14 Avenue Edouard Belin, 31400 Toulouse", "laboratory": "IRAP", "institute": 2, "is_institute_representative": false, "motive_of_registration": "", "validator": 1, "groups": [], "user_permissions": [], "user_level": [7], "referee_themes": []}}, {"model": "user_mgmt.period", "pk": 1, "fields": {"start_date": "2023-06-20", "exploitation_duration": 182, "submission_duration": 136, "evaluation_duration": 31, "validation_duration": 5, "notification_duration": 10, "property_of_data_duration": 365, "data_accessibility_duration": 3650}}, {"model": "user_mgmt.scientificprogram", "pk": 1, "fields": {"created": null, "updated": null, "name": "debris", "description_short": "", "description_long": "", "institute": 1, "sp_pi": 2, "science_theme": 1, "is_auto_validated": true}}, {"model": "user_mgmt.sp_period", "pk": 1, "fields": {"period": 1, "scientific_program": 1, "public_visibility": "Name", "referee1": null, "vote_referee1": "A: Accepted", "reason_referee1": "", "referee2": null, "vote_referee2": "A: Accepted", "reason_referee2": "", "is_valid": "Accepted", "status": "Accepted", "quota_minimal": 0, "quota_nominal": 0, "quota_allocated": 0, "quota_remaining": 0, "over_quota_duration": 0, "over_quota_duration_allocated": 0, "over_quota_duration_remaining": 0, "token": 0, "token_allocated": 0, "token_remaining": 0, "priority": 0}}, {"model": "user_mgmt.sp_period_user", "pk": 2, "fields": {"SP_Period": 1, "user": 3}}, {"model": "user_mgmt.sp_period_user", "pk": 3, "fields": {"SP_Period": 1, "user": 4}}, {"model": "seq_submit.sequence", "pk": 1, "fields": {"start_expo_pref": "IMMEDIATE", "pyros_user": 2, "scientific_program": 1, "name": "seq_20220218T158246", "desc": null, "created": "2022-02-18T15:07:36.334Z", "updated": "2022-02-21T12:40:50.275Z", "last_modified_by": null, "is_alert": false, "status": "DRAFT", "with_drift": false, "priority": null, "analysis_method": null, "moon_min": null, "alt_min": null, "type": null, "img_current": null, "img_total": null, "not_obs": false, "obsolete": false, "processing": false, "flag": null, "period": 1, "start_date": "2022-02-18T15:07:36Z", "end_date": "2022-02-18T15:07:36.333Z", "jd1": "0E-8", "jd2": "0E-8", "tolerance_before": "1s", "tolerance_after": "1min", "duration": "-1.00000000", "overhead": "0E-8", "submitted": false, "config_attributes": {"layout": "OpticalChannel", "target": "RADEC 0H10M -15D", "conformation": "WIDE", "tolerance_after": "1min", "tolerance_before": "1s"}, "ra": null, "dec": null, "complete": true, "night_id": null}}, {"model": "seq_submit.sequence", "pk": 2, "fields": {"start_expo_pref": "IMMEDIATE", "pyros_user": 2, "scientific_program": 1, "name": "seq_20220218T150731", "desc": null, "created": "2022-02-21T12:43:05.768Z", "updated": "2022-02-21T12:43:06.872Z", "last_modified_by": null, "is_alert": false, "status": "TBP", "with_drift": false, "priority": null, "analysis_method": null, "moon_min": null, "alt_min": null, "type": null, "img_current": null, "img_total": null, "not_obs": false, "obsolete": false, "processing": false, "flag": null, "period": 1, "start_date": "2022-02-21T20:07:36Z", "end_date": "2022-02-21T12:43:05.767Z", "jd1": "0E-8", "jd2": "0E-8", "tolerance_before": "1s", "tolerance_after": "1min", "duration": "-1.00000000", "overhead": "0E-8", "submitted": false, "config_attributes": {"layout": "OpticalChannel", "target": "RADEC 0H10M -15D", "conformation": "WIDE"}, "ra": null, "dec": null, "complete": true, "night_id": null}}, {"model": "seq_submit.sequence", "pk": 3, "fields": {"start_expo_pref": "IMMEDIATE", "pyros_user": 2, "scientific_program": 1, "name": "seq_20220218T150732", "desc": null, "created": "2022-02-21T12:44:28.423Z", "updated": "2022-02-21T12:44:29.556Z", "last_modified_by": null, "is_alert": false, "status": "TBP", "with_drift": false, "priority": null, "analysis_method": null, "moon_min": null, "alt_min": null, "type": null, "img_current": null, "img_total": null, "not_obs": false, "obsolete": false, "processing": false, "flag": null, "period": 1, "start_date": "2022-02-21T20:07:36Z", "end_date": "2022-02-21T12:44:28.422Z", "jd1": "0E-8", "jd2": "0E-8", "tolerance_before": "1s", "tolerance_after": "1min", "duration": "-1.00000000", "overhead": "0E-8", "submitted": false, "config_attributes": {"layout": "OpticalChannel", "target": "RADEC 0H10M -15D", "conformation": "WIDE"}, "ra": null, "dec": null, "complete": true, "night_id": null}}, {"model": "seq_submit.album", "pk": 1, "fields": {"sequence": 1, "name": "OpticalChannel", "desc": "Album with one channel", "created": "2022-02-18T15:07:43.164Z", "updated": "2022-02-21T12:40:50.149Z", "complete": true}}, {"model": "seq_submit.album", "pk": 2, "fields": {"sequence": 2, "name": "OpticalChannel", "desc": null, "created": "2022-02-21T12:43:06.477Z", "updated": "2022-02-21T12:43:06.477Z", "complete": true}}, {"model": "seq_submit.album", "pk": 3, "fields": {"sequence": 3, "name": "OpticalChannel", "desc": null, "created": "2022-02-21T12:44:29.265Z", "updated": "2022-02-21T12:44:29.265Z", "complete": true}}, {"model": "seq_submit.plan", "pk": 1, "fields": {"album": 1, "created": "2022-02-18T15:07:51.078Z", "updated": "2022-02-21T12:40:49.978Z", "duration": 0.0, "nb_images": 1, "config_attributes": {"binnings": {"binxy": [1, 1], "readouttime": 6}, "exposuretime": 1.0}, "complete": true}}, {"model": "seq_submit.plan", "pk": 2, "fields": {"album": 2, "created": "2022-02-21T12:43:06.670Z", "updated": "2022-02-21T12:43:06.794Z", "duration": 0.0, "nb_images": 1, "config_attributes": {"binnings": {"binxy": [1, 1], "readouttime": 6}, "exposuretime": 1.0}, "complete": true}}, {"model": "seq_submit.plan", "pk": 3, "fields": {"album": 3, "created": "2022-02-21T12:44:29.361Z", "updated": "2022-02-21T12:44:29.468Z", "duration": 0.0, "nb_images": 1, "config_attributes": {"binnings": {"binxy": [1, 1], "readouttime": 6}, "exposuretime": 1.0}, "complete": true}}, {"model": "devices.plcdevice", "pk": 1, "fields": {"is_online": false, "status": null, "maintenance_date": null, "name": "Plc", "desc": "", "created": "2018-06-18T14:32:00Z", "updated": "2018-06-18T14:32:00Z"}}, {"model": "devices.detector", "pk": 1, "fields": {"name": "Cagire", "desc": "", "created": "2016-05-13T11:49:49Z", "updated": "2016-05-13T11:49:49Z", "is_online": false, "status": "", "maintenance_date": null, "telescope": 1, "nb_photo_x": null, "nb_photo_y": null, "photo_size_x": null, "photo_size_y": null, "has_shutter": false, "equivalent_foc_len": "", "acq_start": null, "acq_stop": null, "check_temp": null, "gain": null, "readout_noise": null, "readout_time": null, "idcam_readout_mode": null}}, {"model": "devices.detector", "pk": 2, "fields": {"name": "Visible camera", "desc": "", "created": "2016-05-13T11:50:17Z", "updated": "2016-05-13T11:50:17Z", "is_online": false, "status": "", "maintenance_date": null, "telescope": 1, "nb_photo_x": null, "nb_photo_y": null, "photo_size_x": null, "photo_size_y": null, "has_shutter": false, "equivalent_foc_len": "", "acq_start": null, "acq_stop": null, "check_temp": null, "gain": null, "readout_noise": null, "readout_time": null, "idcam_readout_mode": null}}, {"model": "devices.dome", "pk": 1, "fields": {"name": "Dome", "desc": "dome", "created": "2016-05-13T11:50:14Z", "updated": "2016-05-13T11:50:14Z", "is_online": false, "status": "", "maintenance_date": null, "open": false}}, {"model": "devices.filter", "pk": 1, "fields": {"name": "First infrared filter", "desc": "", "created": "2016-05-13T11:49:56Z", "updated": "2016-05-13T11:49:56Z", "is_online": false, "status": "", "maintenance_date": null, "filter_wheel": 2, "category": "", "transmission_curve_doc": ""}}, {"model": "devices.filter", "pk": 2, "fields": {"name": "Second infrared filter", "desc": "", "created": "2016-05-13T11:50:07Z", "updated": "2016-05-13T11:50:07Z", "is_online": false, "status": "", "maintenance_date": null, "filter_wheel": 2, "category": "", "transmission_curve_doc": ""}}, {"model": "devices.filter", "pk": 3, "fields": {"name": "First visible filter", "desc": "", "created": "2016-05-13T11:50:02Z", "updated": "2016-05-13T11:50:02Z", "is_online": false, "status": "", "maintenance_date": null, "filter_wheel": 2, "category": "", "transmission_curve_doc": ""}}, {"model": "devices.filter", "pk": 4, "fields": {"name": "Second visible filter", "desc": "", "created": "2016-05-13T11:50:11Z", "updated": "2016-05-13T11:50:11Z", "is_online": false, "status": "", "maintenance_date": null, "filter_wheel": 2, "category": "", "transmission_curve_doc": ""}}, {"model": "devices.filterwheel", "pk": 1, "fields": {"name": "Cagire FW", "desc": "", "created": "2016-06-28T13:28:28Z", "updated": "2016-06-28T13:28:28Z", "is_online": false, "status": "", "maintenance_date": null, "detector": 1}}, {"model": "devices.filterwheel", "pk": 2, "fields": {"name": "Visible Camera FW", "desc": "", "created": "2016-06-28T13:28:46Z", "updated": "2016-06-28T13:28:46Z", "is_online": false, "status": "", "maintenance_date": null, "detector": 2}}, {"model": "devices.telescope", "pk": 1, "fields": {"name": "Telescope", "desc": "", "created": "2016-05-13T11:50:14Z", "updated": "2016-05-13T11:50:14Z", "is_online": false, "status": "", "maintenance_date": null, "mount_type": "", "diameter": null, "latitude": null, "longitude": null, "sens": "", "altitude": null, "readout_time": null, "slew_time": null, "slew_dead": null, "slew_rate_max": null, "horizon_type": "", "horizon_def": null, "lim_dec_max": null, "lim_dec_min": null, "lim_ha_rise": null, "lim_ha_set": null, "address": "", "night_elev_sun": null, "mpc_code": ""}}] \ No newline at end of file diff --git a/src/core/pyros_django/misc/fixtures/tests/majordome_test.json b/src/core/pyros_django/misc/fixtures/tests/majordome_test.json index 7ee4b54..e69de29 100644 --- a/src/core/pyros_django/misc/fixtures/tests/majordome_test.json +++ b/src/core/pyros_django/misc/fixtures/tests/majordome_test.json @@ -1,50 +0,0 @@ -[ - -{ - "model": "common.plcdevice", - "pk": 1, - "fields": { - "name": "Plc", - "desc": "", - "created": "2018-06-18 14:32:00", - "updated": "2018-06-18 14:32:00", - "is_online": false, - "maintenance_date": null - } -}, - -{ - "model": "common.config", - "pk": 1, - "fields": { - "id": 1, - "latitude": 10, - "local_time_zone": 1, - "longitude": 1, - "altitude": 1, - "horizon_line": 1, - "row_data_save_frequency": 400, - "request_frequency": 300, - "analysed_data_save": 300, - "telescope_ip_address": "127.0.0.1", - "camera_ip_address": "127.0.0.1", - "plc_ip_address": "127.0.0.1", - "global_mode": true, - "ack": true, - "bypass": false, - "plc_timeout_seconds": 60 - } -}, - -{ - "model": "common.plcdevicestatus", - "pk": 1, - "fields": { - "id": 1, - "device_id": 1, - "created": "2018-07-18 11:49:49", - "plc_mode": "MANU" - } -} - -] diff --git a/src/core/pyros_django/misc/fixtures/tests/majordome_test_TZ.json b/src/core/pyros_django/misc/fixtures/tests/majordome_test_TZ.json index 5db2af5..e69de29 100644 --- a/src/core/pyros_django/misc/fixtures/tests/majordome_test_TZ.json +++ b/src/core/pyros_django/misc/fixtures/tests/majordome_test_TZ.json @@ -1,50 +0,0 @@ -[ - -{ - "model": "common.plcdevice", - "pk": 1, - "fields": { - "name": "Plc", - "desc": "", - "created": "2018-06-18T14:32:00Z", - "updated": "2018-06-18T14:32:00Z", - "is_online": false, - "maintenance_date": null - } -}, - -{ - "model": "common.config", - "pk": 1, - "fields": { - "id": 1, - "latitude": 10, - "local_time_zone": 1, - "longitude": 1, - "altitude": 1, - "horizon_line": 1, - "row_data_save_frequency": 400, - "request_frequency": 300, - "analysed_data_save": 300, - "telescope_ip_address": "127.0.0.1", - "camera_ip_address": "127.0.0.1", - "plc_ip_address": "127.0.0.1", - "global_mode": true, - "ack": true, - "bypass": false, - "plc_timeout_seconds": 60 - } -}, - -{ - "model": "common.plcdevicestatus", - "pk": 1, - "fields": { - "id": 1, - "device_id": 1, - "created": "2018-07-18T11:49:49Z", - "plc_mode": "MANU" - } -} - -] diff --git a/src/core/pyros_django/misc/fixtures/tests/sequences_test_TZ.json b/src/core/pyros_django/misc/fixtures/tests/sequences_test_TZ.json index 701c582..f5aa89b 100644 --- a/src/core/pyros_django/misc/fixtures/tests/sequences_test_TZ.json +++ b/src/core/pyros_django/misc/fixtures/tests/sequences_test_TZ.json @@ -60,33 +60,6 @@ } }, { - "model": "common.config", - "pk": 1, - "fields": { - "latitude": "1.00", - "local_time_zone": 1.0, - "longitude": "1.00", - "altitude": 1.0, - "horizon_line": 1.0, - "row_data_save_frequency": 300, - "request_frequency": 300, - "analysed_data_save": 300, - "telescope_ip_address": "127.0.0.1", - "camera_ip_address": "127.0.0.1", - "plc_ip_address": "127.0.0.1", - "global_mode": true, - "ack": true, - "bypass": false, - "lock": false, - "pyros_state": "Starting", - "force_passive_mode": false, - "plc_timeout_seconds": 10, - "majordome_state": "", - "ntc": false, - "majordome_restarted": false - } - }, - { "model": "user_mgmt.country", "pk": 1, "fields": { diff --git a/src/core/pyros_django/obs_config/fixtures/observatory_configuration_ko.yml b/src/core/pyros_django/obs_config/fixtures/observatory_configuration_ko.yml index 6ea5466..ddccd05 100644 --- a/src/core/pyros_django/obs_config/fixtures/observatory_configuration_ko.yml +++ b/src/core/pyros_django/obs_config/fixtures/observatory_configuration_ko.yml @@ -97,7 +97,7 @@ OBSERVATORY: is_real: False - AGENT: - name: AgentMajordome + name: A_Majordome computer: MainComputer path: ~ @@ -107,7 +107,7 @@ OBSERVATORY: path: ~ - AGENT: - name: AgentScheduler + name: A_Scheduler computer: MainComputer path: ~ diff --git a/src/core/pyros_django/obs_config/fixtures/observatory_configuration_ok_complex.yml b/src/core/pyros_django/obs_config/fixtures/observatory_configuration_ok_complex.yml index 2d7ba54..1488edf 100644 --- a/src/core/pyros_django/obs_config/fixtures/observatory_configuration_ok_complex.yml +++ b/src/core/pyros_django/obs_config/fixtures/observatory_configuration_ok_complex.yml @@ -100,7 +100,7 @@ OBSERVATORY: is_real: False - AGENT: - name: AgentMajordome + name: A_Majordome computer: MainComputer path: ~ @@ -110,7 +110,7 @@ OBSERVATORY: path: ~ - AGENT: - name: AgentScheduler + name: A_Scheduler computer: MainComputer path: ~ diff --git a/src/core/pyros_django/obs_config/fixtures/observatory_configuration_ok_simple.yml b/src/core/pyros_django/obs_config/fixtures/observatory_configuration_ok_simple.yml index 2c4660c..442477d 100644 --- a/src/core/pyros_django/obs_config/fixtures/observatory_configuration_ok_simple.yml +++ b/src/core/pyros_django/obs_config/fixtures/observatory_configuration_ok_simple.yml @@ -97,7 +97,7 @@ OBSERVATORY: is_real: False - AGENT: - name: AgentMajordome + name: A_Majordome computer: MainComputer path: ~ @@ -107,7 +107,7 @@ OBSERVATORY: path: ~ - AGENT: - name: AgentScheduler + name: A_Scheduler computer: MainComputer path: ~ diff --git a/src/core/pyros_django/pyros/urls.py b/src/core/pyros_django/pyros/urls.py index fc66a29..04604cc 100644 --- a/src/core/pyros_django/pyros/urls.py +++ b/src/core/pyros_django/pyros/urls.py @@ -39,7 +39,7 @@ urlpatterns = [ path('devices/', include('devices.urls')), path('scheduling/', include('scheduling.urls')), path('alert_mgmt/', include('alert_mgmt.urls')), - path('analyzer/', include('analyzer.urls')), + # path('analyzer/', include('analyzer.urls')), path('majordome/', include('majordome.urls')), path('env_monitor/', include('env_monitor.urls')), path('observation_manager/', include('observation_manager.urls')), diff --git a/src/core/pyros_django/scheduling/Scheduler.py b/src/core/pyros_django/scheduling/Scheduler.py deleted file mode 100644 index 7da5e15..0000000 --- a/src/core/pyros_django/scheduling/Scheduler.py +++ /dev/null @@ -1,387 +0,0 @@ -from operator import attrgetter - -from scheduling.templatetags.jdconverter import jdtodate -from .UserManager import UserQuotaManager -from .Interval import * -from django.db.models import Q - -from seq_submit.models import Sequence, Schedule - -SIMULATION = False -DEBUG_FILE = False - -class Scheduler(IntervalManagement): - REJECTED_ROOM = "Insufficient room for this sequence" - - def __init__(self): - super().__init__("Scheduler", "Scheduler") - self.schedule = Schedule.objects.create() - self.sequences = [] - - def log(self, message: str): - self.logger.info(message) - - def getNightLimits(self) -> tuple: - start = getNightStart() - end = getNightEnd() - return (start, end) - - def setNightLimits(self, plan_start: float, plan_end: float) -> int: - self.schedule.plan_start = Decimal(plan_start) - self.schedule.plan_end = Decimal(plan_end) - return 0 - - #TODO: - def isFirstSchedule(self) -> bool: - return False - - def determinePlanStart(self, previous_sched): - start = secondsToPreciseJulianDate(getPreciseCurrentTime()) - if start > previous_sched.plan_start + self.max_overhead: - return start + self.max_overhead - return previous_sched.plan_start - - ''' - Copy information from current night previous schedule - ''' - def copyFromPrevious(self) -> int: - if len(Schedule.objects.all()) == 1: - print("only 1 schedule available") - self.schedule.plan_night_start = self.schedule.plan_start - if DEBUG_FILE: - self.log("No schedule found") - return 1 - try: - previous_sched = Schedule.objects.order_by('-created')[1] - previous_exc_seq = previous_sched.sequences.filter(Q(status=Sequence.EXECUTED) | - Q(status=Sequence.EXECUTING)) - except: - self.schedule.plan_night_start = self.schedule.plan_start - if DEBUG_FILE: - self.debug("Scheduler could not get information from previous schedule") - return 1 - for seq in previous_exc_seq: - shs = seq.shs.latest("schedule__created") - shs.pk = None - shs.schedule = self.schedule - shs.save() - adder = 0 - try: - executing = Sequence.objects.filter(status=Sequence.EXECUTING).get() - if executing: - s = executing.shs.latest("schedule__created") - adder = s.tep - secondsToPreciseJulianDate(getPreciseCurrentTime()) - except Exception as e: - self.log("No executing sequence found " + str(e)) - self.schedule.plan_night_start = previous_sched.plan_night_start - self.schedule.plan_end = previous_sched.plan_end - self.schedule.plan_start = self.determinePlanStart(previous_sched) + adder - return 0 - - ''' - used for tests (entry point) - ''' - def simulateSchedule(self, sequences) -> tuple: - global SIMULATION - SIMULATION = True - - self.schedule.plan_night_start = self.schedule.plan_start - self.sequences = list(sequences) - shs_list = [] - for sequence in self.sequences: - shs_list.append(ScheduleHasSequences(sequence=sequence, schedule=self.schedule)) - self.sequences = [(sequence, shs_list[index]) for index, sequence in enumerate(self.sequences)] - self.computeSchedule() - return (self.schedule, self.sequences) - - def computeSchedule(self) -> int: - #print("In computeSchedule") - interval = Interval(self.schedule.plan_start, self.schedule.plan_end) - self.intervals.append(interval) - if DEBUG_FILE: - self.log("Interval created : " + str(interval.__dict__)) - self.removeInvalidSequences() - self.determinePriorities() - print("Sequences bef removeNonEligible are:", len(self.sequences)) - # EP le pb est ici !!! - #TODO: bugfix time computation EP a virer (remettre) - self.removeNonEligible() - print("Sequences aft removeNonEligible are:", len(self.sequences)) - self.sortSequences() - self.placeSequences() - return 0 - - ''' - Default entry point (called from scheduler/tasks.py/scheduling/run()) - ''' - def makeSchedule(self) -> Schedule: - print("In makeSchedule()") - global SIMULATION - # WHY ??? - SIMULATION = False - - if self.isFirstSchedule(): - #print("It is the first schedule") - self.schedule.plan_night_start = self.schedule.plan_start - else: - #print("It is not the first schedule") - self.copyFromPrevious() #TODO trycatch a faire - self.schedule.plan_night_start = self.schedule.plan_start - print("night start is", self.schedule.plan_night_start) - - #EP: avirer (add 2 hours) - #self.schedule.plan_night_start += float( (1/24)*2 ) - #self.schedule.plan_start += float( (1/24)*2 ) - - # Get all sequences which are PLANNED, TOBEPLANNED, or PENDING - self.sequences = list(Sequence.objects.filter(Q(status=Sequence.PLANNED) | Q(status=Sequence.TOBEPLANNED) - | Q(status=Sequence.PENDING))) - print("**** nb of sequences already available for scheduling", len(self.sequences)) - - # List of tuples (sequence, ScheduleHasSequences) for each sequence above and for current schedule - self.sequences = [ - ( - sequence, - ScheduleHasSequences(sequence=sequence, schedule=self.schedule) - ) - for sequence in self.sequences - ] - print("Sequences BEFORE are:", len(self.sequences)) - if DEBUG_FILE: - self.log(str(len(self.sequences)) + " sequences found") - self.computeSchedule() - print("Sequences AFTER are:", len(self.sequences)) - self.saveSchedule() - if DEBUG_FILE: - self.log("Saving schedule with " + str(len(self.schedule.sequences.all())) + " sequences") - return self.schedule - - def saveSchedule(self) -> int: - self.schedule.save() - for sequence, shs in self.sequences: - sequence.status = Sequence.PLANNED - shs.schedule = self.schedule - sequence.save() - shs.save() - if DEBUG_FILE: - self.logSchedule() - return 0 - - - ''' - JB: Using : list(self.sequences) makes a copy. - ''' - def removeNonEligible(self) -> int: - for sequence, shs in list(self.sequences): - overlap = Decimal(min(self.schedule.plan_end, sequence.jd2)) - Decimal(max(self.schedule.plan_start, sequence.jd1)) - self.max_overhead - print() - print("- sequence: ", sequence) - print("plan start - plan end:", jdtodate(self.schedule.plan_start), "-", jdtodate(self.schedule.plan_end)) - print("jd1-jd2:", jdtodate(sequence.jd1), "-", jdtodate(sequence.jd2)) - print("overlap < duration ?:", overlap, sequence.duration) - #print("- sequence: ", sequence, "plan start, end, jd1, jd2, overlap", self.schedule.plan_start, self.schedule.plan_end, sequence.jd1, sequence.jd2, overlap) - #print("- sequence: ", sequence, "plan start", jdtodate(self.schedule.plan_start)) - print() - if overlap < sequence.duration: - if sequence.jd1 < self.schedule.plan_start: - sequence.status = Sequence.UNPLANNABLE - if not SIMULATION: - sequence.save() - self.sequences.remove((sequence, shs)) - if DEBUG_FILE: - self.log("Removing non eligible sequence") - return 0 - - def removeInvalidSequences(self): - for sequence,shs in list(self.sequences): - if (sequence.jd1 < 0 or sequence.jd2 < 0 or - is_nearby_less_or_equal(sequence.duration, Decimal(0)) or - sequence.jd2 - sequence.jd1 < sequence.duration): - if DEBUG_FILE: - self.log("Removing sequence in removeInvalidSequences") - self.sequences.remove((sequence, shs)) - sequence.status = Sequence.INVALID - if not SIMULATION: - sequence.save() - return 0 - - def updateOtherDeltas(self, sequence: Sequence, shs: ScheduleHasSequences, interval: Interval) -> int: - seq_before, shs_b_i = self.findSequenceBefore(interval) - seq_after, shs_a_i = self.findSequenceAfter(interval) - - if seq_before and shs_b_i: - shs_b_i.deltaTR = min(shs.tsp - self.max_overhead, seq_before.jd2) - shs_b_i.tep - if seq_after and shs_a_i: - shs_a_i.deltaTL = shs_a_i.tsp - self.max_overhead - max(shs.tep, seq_after.jd1) - return 0 - - ''' - Function who place all the sequences in intervals - ''' - def placeSequences(self) -> int: - #print("In placeSequences()") - #print("sequences are", self.sequences) - for sequence, shs in list(self.sequences): - #print("placeSequences() sequence is", sequence) - quota = UserQuotaManager.determineQuota(sequence) - #print("quota is", quota) - if not UserQuotaManager.isSufficient(quota, sequence): - shs.status = Sequence.REJECTED - shs.desc = UserQuotaManager.REJECTED - continue - matching_intervals = self.getMatchingIntervals(sequence) - if len(matching_intervals) > 0: - inter = self.placeSequence(sequence, shs, matching_intervals) - if inter: - self.updateOtherDeltas(sequence, shs, inter) - sequence_placed = True - else: - sequence_placed = self.tryShiftingSequences(sequence, shs) - if sequence_placed: - shs.status = Sequence.PLANNED - self.decreaseQuota(sequence, sequence.duration) - else: - if DEBUG_FILE: - self.log("Removing sequence in place_sequences") - shs.status = Sequence.REJECTED - shs.desc = self.REJECTED_ROOM - return 0 - - def findSequenceBefore(self, interval: Interval): - for seq, s in self.sequences: - if s.status == Sequence.PLANNED: - if is_nearby_equal(s.tep, interval.start): - return (seq, s) - return (None, None) - - def findSequenceAfter(self, interval: Interval): - for seq, s in self.sequences: - if s.status == Sequence.PLANNED: - if is_nearby_equal(s.tsp - self.max_overhead, interval.end): - return (seq, s) - return (None, None) - - ''' - pm(l/r) = Possible Move (Left / Right) - shs_(b/a)_i = shs (before/after) interval - ''' - def tryShiftingSequences(self, sequence: Sequence, shs: ScheduleHasSequences) -> bool: - potential = self.getPotentialIntervals(sequence) - potential.sort(key=attrgetter("duration"), reverse=True) #sort the list by decreasing duration - pml = Decimal(0) - pmr = Decimal(0) - - for interval in potential: - seq_before, shs_b_i = self.findSequenceBefore(interval) - seq_after, shs_a_i = self.findSequenceAfter(interval) - - available = min(interval.end, sequence.jd2) - max(interval.start, sequence.jd1) - missing = sequence.duration - available + self.max_overhead - if seq_before and shs_b_i: - pml = min(shs_b_i.deltaTL, interval.start - sequence.jd1) - if seq_after and shs_a_i: - pmr = min(shs_a_i.deltaTR, sequence.jd2 - interval.end) - - if is_nearby_sup_or_equal(pml, missing): - self.moveSequence(seq_before, shs_b_i, missing, "LEFT") - elif is_nearby_sup_or_equal(pmr, missing): - self.moveSequence(seq_after, shs_a_i, missing, "RIGHT") - elif is_nearby_sup_or_equal(pml + pmr, missing): - self.moveSequence(seq_before, shs_b_i, pml, "LEFT") - self.moveSequence(seq_after, shs_a_i, missing - pml, "RIGHT") - else: - continue - matching = self.getMatchingIntervals(sequence) - if len(matching) != 1: - raise ValueError("There should be one and only one matching interval after shifting") - inter = self.placeSequence(sequence, shs, matching) - if inter: - self.updateOtherDeltas(sequence, shs, inter) - return True - return False - - ''' - Move the sequence tsp (time start planned) and tep (time end planned) left or right - ''' - def moveSequence(self, sequence: Sequence, shs: ScheduleHasSequences, time_shift: Decimal, direction: str) -> int: - interval_before = None - interval_after = None - - if direction not in ["LEFT", "RIGHT"]: - return 1 - if time_shift > (shs.deltaTL if direction == "LEFT" else shs.deltaTR): - return 1 - for interval in self.intervals: - if is_nearby_equal(interval.end, shs.tsp - self.max_overhead): - interval_before = interval - elif is_nearby_equal(interval.start, shs.tep): - interval_after = interval - if direction == "LEFT": - interval_before.end -= time_shift - if interval_after: - interval_after.start -= time_shift - shs.tsp -= time_shift - shs.tep -= time_shift - shs.deltaTL -= time_shift - shs.deltaTR += time_shift - else: - if interval_before: - interval_before.end += time_shift - interval_after.start += time_shift - shs.tsp += time_shift - shs.tep += time_shift - shs.deltaTL += time_shift - shs.deltaTR -= time_shift - if interval_after: - if is_nearby_less_or_equal(interval_after.duration, self.max_overhead): - self.intervals.remove(interval_after) - if interval_before: - if is_nearby_less_or_equal(interval_before.duration, self.max_overhead): - self.intervals.remove(interval_before) - return 0 - - ''' - Sort by jd2 and priority -> (main sorting value) - ''' - def sortSequences(self) -> int: - self.sequences.sort(key=lambda x: x[0].jd2) - self.sequences.sort(key=lambda x: x[0].priority if x[0].priority else 0) - return 0 - - def determinePriorities(self) -> int: #TODO - return 0 - - def decreaseQuota(self, sequence: Sequence, quota: float) -> int: - user = UserQuotaManager(sequence.request.pyros_user) - if SIMULATION: - return 0 - return user.decreaseQuota(Decimal(quota)) - - def isEmptySchedule(self) -> bool: - if len(self.sequences) == 0: - return True - return False - - ''' - DEBUG FUNCTIONS - ''' - def logSequence(self, sequence): - self.log("Logging sequence : ") - s = sequence.shs.latest("schedule__created") - if s.schedule == self.schedule: - self.log("--> name: %r, start: %f, end: %f, duration: %f, deltaTL: %f, deltaTR: %f" - % (sequence.name, s.tsp, s.tep, sequence.duration, s.deltaTL, s.deltaTR)) - self.log("------ end ------") - return 0 - - def logSchedule(self) -> int: - sequences = Sequence.objects.filter(shs__status=Sequence.PLANNED).order_by('shs__tsp').distinct() - self.log("There are %d sequence(s) planned" % len(sequences)) - for sequence in sequences: - s = sequence.shs.latest("schedule__created") - self.log("--> Pk: %d name: %r, shs PK: %d, start: %f, end: %f, duration: %f, deltaTL: %f, deltaTR: %f" - % (sequence.pk, sequence.name, s.pk, s.tsp, s.tep, sequence.duration, s.deltaTL, s.deltaTR)) - self.log("There are %d free intervals" % len(self.intervals)) - for interval in self.intervals: - self.log("--> start: %f, end: %f" % (interval.start, interval.end)) - return 0 diff --git a/src/core/pyros_django/scheduling/UserManager.py b/src/core/pyros_django/scheduling/UserManager.py deleted file mode 100644 index eeb85d6..0000000 --- a/src/core/pyros_django/scheduling/UserManager.py +++ /dev/null @@ -1,36 +0,0 @@ -from common.models import * -from seq_submit.models import Sequence - -from utils.Logger import * -from decimal import * - -class UserQuotaManager(Logger): - REJECTED = "Insufficient quota" - - def __init__(self, user: PyrosUser): - super().__init__("UserManager", "UserManager") - self.user = user - - @classmethod - def determineQuota(cls, sequence: Sequence) -> float: - #TODO : change return value (quota isn't associated with PyrosUser) - return 100 - return sequence.request.pyros_user.quota - - @classmethod - def isSufficient(cls, quota: float, sequence: Sequence) -> bool: - #print("seq is", sequence.duration) - #print("quota is", quota) - if quota < sequence.duration: - return False - return True - - @classmethod - def determinePriority(cls, sequence: Sequence) -> float: - return 0 - - def decreaseQuota(self, value: Decimal) -> int: - #TODO : update this method according to new models - #self.user.quota -= float(value) - #self.user.save() - return 0 diff --git a/src/core/pyros_django/scheduling/simulator.py b/src/core/pyros_django/scheduling/simulator.py deleted file mode 100644 index a06ca69..0000000 --- a/src/core/pyros_django/scheduling/simulator.py +++ /dev/null @@ -1,141 +0,0 @@ -from scheduling.Scheduler import Scheduler -from common.models import * -import urllib.request as urllib2 -from html.parser import HTMLParser -import math -from decimal import Decimal -import time - - -class MyHTMLParser(HTMLParser): - ''' - Subclassing HTMLParser to access the data properly - ''' - - def __init__(self): - HTMLParser.__init__(self) - self.data = [] - - def handle_data(self, data): - self.data.append(data) - - def handle_comment(self, data): - pass - - -class Simulator(): - ''' - Simulates the creation of a planning thanks to an HTML file - ''' - - def __init__(self): - pass - - def simulate(self, sequences_file): - ''' - ENTRY POINT - - Parse the file with sequences, then call the Scheduler simulation function and give the result to the view - - :param sequences_file : HTML file containing sequences description - :returns : a tuple (Schedule, list of sequences) after the scheduling process - ''' - - file = urllib2.urlopen(sequences_file) - data = str(file.read()) - parser = MyHTMLParser() - parser.feed(data) - - """filter unwanted \n and other data""" - filtered_list = list(map(lambda s: s.strip(), parser.data)) - page_text = "".join(filtered_list[11:]) - - raw_sequences = page_text.split("\\n") - del raw_sequences[0] - del raw_sequences[len(raw_sequences) - 1] - raw_sequences = [ - sequence for sequence in raw_sequences if len(sequence) > 10] - - """Create the default models linked to the sequences""" - sp = ScientificProgram() - country = Country() - # (AKo) : usr_lvl isn't really needed for this simulator, as we're using the real db, we cannot associate a "dummy" user to a real user_level - #usr_lvl = UserLevel() - institute = Institute.objects.create(name="test",quota=50.0) - py_usr = PyrosUser(username="toto", country=country,institute=institute) - req = Request(scientific_program=sp, pyros_user=py_usr) - - scheduler = Scheduler() - - """Create the sequences""" - sequences = [] - for raw_sequence in raw_sequences: - sequence_array = raw_sequence.split(" ") - id_seq = sequence_array[0] - priority = int(sequence_array[2]) - ''' transforms the duration (seconds) in days (86,400s in a day)''' - duration = Decimal(float(sequence_array[4]) / 86400.0) - jd1 = Decimal("%.8f" % float(sequence_array[5])) - jd2 = Decimal("%.8f" % float(sequence_array[6])) - - sequence = Sequence(request=req, status=Sequence.PLANNED, - name="sequence", id=id_seq, priority=priority, duration=duration, jd1=jd1, jd2=jd2, t_prefered=-1) - sequences.append(sequence) - - # 1) trouver le nombre qu'on retrouve le plus souvent en troncature de - # jd1 (faire un dico) - days = {} - for sequence in sequences: - truncated = math.floor(float(sequence.jd1)) - if truncated in days.keys(): - days[truncated] += 1 - else: - days[truncated] = 1 - maximum_truncated = max(days.keys(), key=(lambda key: days[key])) - - # 2) virer toutes les séquences qui n'ont pas ce jd1 en troncature - sequences = [sequence for sequence in sequences if math.floor( - float(sequence.jd1)) == maximum_truncated] - - # 3) set le plan_start et le plan_end en fonction du plus petit jd1 et - # du plus grand jd2 - scheduler.schedule.plan_start = -1 - scheduler.schedule.plan_end = -1 - for sequence in sequences: - if scheduler.schedule.plan_start == -1 or sequence.jd1 < scheduler.schedule.plan_start: - scheduler.schedule.plan_start = sequence.jd1 - if scheduler.schedule.plan_end == -1 or sequence.jd2 > scheduler.schedule.plan_end: - scheduler.schedule.plan_end = sequence.jd2 - - start = time.time() - - schedule, sequences = scheduler.simulateSchedule(sequences) - - end = time.time() - - print("Duration : ", end - start) - - self.test_sequences_validity(schedule, sequences) - - return (schedule, sequences) - - def test_sequences_validity(self, schedule, sequences): - ''' - For PLANNED sequences, tests if : - - all the sequences are in the schedule - - there is no overlap between sequences - - [tsp - tep] is in [jd1 - jd2] - - tep < tsp - ''' - sequences.sort(key=lambda x: x[1].tsp) - - for index, (sequence, shs) in enumerate(sequences): - if shs.status == Sequence.PENDING: - if shs.tsp > shs.tep: - raise ValueError("tep < tsp ...") - if shs.tsp < schedule.plan_start or schedule.plan_end < shs.tep: - raise ValueError("[tsp;tep] not in [plan_start;plan_end]") - if shs.tsp < sequence.jd1 or sequence.jd2 < shs.tep: - raise ValueError("[tsp;tep] not in [jd1;jd2]") - if index > 0 and shs.tsp < sequences[index - 1][1].tep: - raise ValueError("There is a sequence overlap") diff --git a/src/core/pyros_django/scheduling/tasks.py b/src/core/pyros_django/scheduling/tasks.py deleted file mode 100644 index d1d4b4e..0000000 --- a/src/core/pyros_django/scheduling/tasks.py +++ /dev/null @@ -1,25 +0,0 @@ -from __future__ import absolute_import -from scheduling.Scheduler import Scheduler -from common.models import * -from utils.JDManipulator import * -from utils.Logger import setupLogger - -log = setupLogger("TaskSched", "TaskSched") - -#class scheduling(Task): -class scheduling(): - - #TODO Remove first parameter (useless) -> maybe both ? - def run(self, first_schedule=False, alert=False): - print("In scheduling.run()") - # AttributeError: 'scheduling' object has no attribute 'request' - ##task = TaskId.objects.create(task_id=self.request.id, task="scheduling") - Log.objects.create(agent='Scheduler', message='Start schedule : ' + str(datetime.datetime.now())) - # This creates a Scheduler (in memory) which creates a Schedule (in DB) - self.scheduler = Scheduler() - self.scheduler.setNightLimits(secondsToJulianDate(getNightStart()), secondsToJulianDate(getNightEnd())) - print("****sched-task: NEW SCHEDULE", self.scheduler.schedule, "*****") - self.scheduler.makeSchedule() - print("****sched-task: NEW SCHEDULE", self.scheduler.schedule, "*****") - Log.objects.create(agent='Scheduler', message='Scheduling finished : ' + str(datetime.datetime.now())) - ##task.delete() \ No newline at end of file diff --git a/src/core/pyros_django/scheduling/urls.py b/src/core/pyros_django/scheduling/urls.py index 06b3e7e..da4088e 100644 --- a/src/core/pyros_django/scheduling/urls.py +++ b/src/core/pyros_django/scheduling/urls.py @@ -5,7 +5,7 @@ from django.conf import settings from django.conf.urls.static import static urlpatterns = [ - path('', views.current_schedule, name="current_schedule"), - path('retrieve_schedule', views.retrieve_schedule, name="retrieve_schedule"), - path('simulation', views.schedule_simulation, name="schedule_simulation"), + # path('', views.current_schedule, name="current_schedule"), + # path('retrieve_schedule', views.retrieve_schedule, name="retrieve_schedule"), + # path('simulation', views.schedule_simulation, name="schedule_simulation"), ] \ No newline at end of file diff --git a/src/core/pyros_django/scheduling/views.py b/src/core/pyros_django/scheduling/views.py index 99e755e..60ccead 100644 --- a/src/core/pyros_django/scheduling/views.py +++ b/src/core/pyros_django/scheduling/views.py @@ -1,46 +1,46 @@ -from django.shortcuts import render -#from common.models import Sequence, Schedule -from seq_submit.models import Sequence, Schedule - -from django.contrib.auth.decorators import login_required -from scheduling.simulator import Simulator -from operator import attrgetter - -SIMULATION_FILE = 'file:./scheduling/sequences_cador.html' - -def retrieve_schedule(request): - if (len(Schedule.objects.all()) > 0): # checking if the schedule is empty - schedule = Schedule.objects.order_by("-created")[0] # Sorting Schedule - shs_list = schedule.shs.order_by("tsp") # getting all the schedule has sequences references - sequences = [(shs.sequence, shs) for shs in shs_list] # getting all sequences - - nb_scheduled_sequences = len(shs_list) - executed_sequences = len([shs for shs in shs_list if shs.status == Sequence.EXECUTED]) - else: # if empty set everything to 0 / None (variables are checked in src/templates/scheduler/current_schedule.html) - schedule = None - sequences = None - shs_list = None - nb_scheduled_sequences = 0 - executed_sequences = 0 - if request.user.is_authenticated: - return render(request, 'scheduling/retrieve_schedule.html', {'sequences' : sequences, 'schedule' : schedule, 'nb_scheduled_sequences' : nb_scheduled_sequences, 'executed_sequences' : executed_sequences, 'base_template' : "base.html"}) - return render(request, 'scheduling/retrieve_schedule.html', {'sequences' : sequences, 'schedule' : schedule, 'nb_scheduled_sequences' : nb_scheduled_sequences, 'executed_sequences' : executed_sequences, 'base_template' : "base.html"}) - - -def current_schedule(request): - if request.user.is_authenticated: - return render(request, 'scheduling/current_schedule.html', {'base_template' : "base.html"}) - return render(request, 'scheduling/current_schedule.html', {'base_template' : "base.html"}) - -def schedule_simulation(request): - simulator = Simulator() - schedule, sequences = simulator.simulate(SIMULATION_FILE) - - nb_scheduled_sequences = len([sequence for sequence in sequences if sequence[1].status != Sequence.PLANNED]) - executed_sequences = len([sequence for sequence in sequences if sequence[1].status == Sequence.EXECUTED]) - - - sequences.sort(key=lambda seq: seq[1].tsp) - if request.user.is_authenticated: - return render(request, 'scheduling/current_schedule.html', {'sequences' : sequences, 'schedule' : schedule, 'nb_scheduled_sequences' : nb_scheduled_sequences, 'executed_sequences' : executed_sequences, 'base_template' : "base.html"}) - return render(request, 'scheduling/current_schedule.html', {'sequences' : sequences, 'schedule' : schedule, 'nb_scheduled_sequences' : nb_scheduled_sequences, 'executed_sequences' : executed_sequences, 'base_template' : "base.html"}) +# from django.shortcuts import render +# #from common.models import Sequence, Schedule +# from seq_submit.models import Sequence, Schedule + +# from django.contrib.auth.decorators import login_required +# from scheduling.simulator import Simulator +# from operator import attrgetter + +# SIMULATION_FILE = 'file:./scheduling/sequences_cador.html' + +# def retrieve_schedule(request): +# if (len(Schedule.objects.all()) > 0): # checking if the schedule is empty +# schedule = Schedule.objects.order_by("-created")[0] # Sorting Schedule +# shs_list = schedule.shs.order_by("tsp") # getting all the schedule has sequences references +# sequences = [(shs.sequence, shs) for shs in shs_list] # getting all sequences + +# nb_scheduled_sequences = len(shs_list) +# executed_sequences = len([shs for shs in shs_list if shs.status == Sequence.EXECUTED]) +# else: # if empty set everything to 0 / None (variables are checked in src/templates/scheduler/current_schedule.html) +# schedule = None +# sequences = None +# shs_list = None +# nb_scheduled_sequences = 0 +# executed_sequences = 0 +# if request.user.is_authenticated: +# return render(request, 'scheduling/retrieve_schedule.html', {'sequences' : sequences, 'schedule' : schedule, 'nb_scheduled_sequences' : nb_scheduled_sequences, 'executed_sequences' : executed_sequences, 'base_template' : "base.html"}) +# return render(request, 'scheduling/retrieve_schedule.html', {'sequences' : sequences, 'schedule' : schedule, 'nb_scheduled_sequences' : nb_scheduled_sequences, 'executed_sequences' : executed_sequences, 'base_template' : "base.html"}) + + +# def current_schedule(request): +# if request.user.is_authenticated: +# return render(request, 'scheduling/current_schedule.html', {'base_template' : "base.html"}) +# return render(request, 'scheduling/current_schedule.html', {'base_template' : "base.html"}) + +# def schedule_simulation(request): +# simulator = Simulator() +# schedule, sequences = simulator.simulate(SIMULATION_FILE) + +# nb_scheduled_sequences = len([sequence for sequence in sequences if sequence[1].status != Sequence.PLANNED]) +# executed_sequences = len([sequence for sequence in sequences if sequence[1].status == Sequence.EXECUTED]) + + +# sequences.sort(key=lambda seq: seq[1].tsp) +# if request.user.is_authenticated: +# return render(request, 'scheduling/current_schedule.html', {'sequences' : sequences, 'schedule' : schedule, 'nb_scheduled_sequences' : nb_scheduled_sequences, 'executed_sequences' : executed_sequences, 'base_template' : "base.html"}) +# return render(request, 'scheduling/current_schedule.html', {'sequences' : sequences, 'schedule' : schedule, 'nb_scheduled_sequences' : nb_scheduled_sequences, 'executed_sequences' : executed_sequences, 'base_template' : "base.html"}) diff --git a/src/core/pyros_django/seq_submit/tests.py b/src/core/pyros_django/seq_submit/tests.py index 753ccfa..0e000b2 100644 --- a/src/core/pyros_django/seq_submit/tests.py +++ b/src/core/pyros_django/seq_submit/tests.py @@ -72,8 +72,14 @@ class SequencesTests(TestCase): def setUp(self) -> None: password = "password123" + # Make sure period never exists 3 digits, we'll use only ids 1, 2 and 3 for tests + # Delete old period created by running previous tests + try: + Period.objects.filter(id__gte=2).delete() + except: + pass # create a new period for the tests that will be the explotation period - self.period1 = Period.objects.create() + self.period1 = Period.objects.create(id=2) # replace for sp_period and sequence their attached period so we don't use the fix period in the fixture for sp_period in SP_Period.objects.all(): sp_period.period = self.period1 @@ -82,9 +88,9 @@ class SequencesTests(TestCase): sequence.period = self.period1 sequence.save() Period.objects.get(id=1).delete() - self.period2 = Period.objects.create( + self.period2 = Period.objects.create(id=3, start_date=Period.objects.all().first().end_date) - self.period3 = Period.objects.create( + self.period3 = Period.objects.create(id=4, start_date=self.period2.end_date, submission_duration=550) self.usr1 = PyrosUser.objects.get(username="observer") self.usr2 = PyrosUser.objects.get(username="unit_pi") diff --git a/src/core/pyros_django/seq_submit/urls.py b/src/core/pyros_django/seq_submit/urls.py index 1a27960..e5243ca 100644 --- a/src/core/pyros_django/seq_submit/urls.py +++ b/src/core/pyros_django/seq_submit/urls.py @@ -10,10 +10,7 @@ urlpatterns = [ re_path(r'^(?P-?\d)/(?P.+)$', views.sequences_list, name="sequences_list"), - re_path(r'^action_request/(?P\d+)/(?P[a-z_]{1,20})$', - views.action_request, name="action_request"), - re_path(r'^action_request/(?P\d+)/(?P[a-z_]{1,20})/(?P-?\d)/(?P.+)$', - views.action_request, name="action_request_message"), + re_path(r'^action_sequence/(?P\d+)/(?P[a-z_]{1,20})$', views.action_sequence, name="action_sequence"), @@ -32,8 +29,6 @@ urlpatterns = [ re_path(r'^action_plan/(?P\d+)/(?P[a-z_]{1,20})/(?P-?\d)/(?P.+)$', views.action_plan, name="action_plan_message"), - re_path(r'^request_validate/(?P\d+)$', - views.request_validate, name="request_validate"), re_path(r'^sequence_validate/(?P\d+)$', views.sequence_validate, name="sequence_validate"), re_path(r'^album_validate/(?P\d+)$', @@ -41,21 +36,12 @@ urlpatterns = [ re_path(r'^plan_validate/(?P\d+)$', views.plan_validate, name="plan_validate"), - re_path(r'^create_request$', views.create_request, name="create_request"), #re_path(r'^create_sequence/(?P\d+)$', views.create_sequence, name="create_sequence"), re_path(r'^create_sequence/', views.create_sequence, name="create_sequence"), re_path(r'^create_album/(?P\d+)$', views.create_album, name="create_album"), re_path(r'^create_plan/(?P\d+)$', views.create_plan, name="create_plan"), - re_path(r'^submit_request/(?P\d+)/(?P[a-z_]{1,20})$', - views.submit_request, name="submit_request"), - re_path(r'^unsubmit_request/(?P\d+)$', - views.unsubmit_request, name="unsubmit_request"), - - re_path(r'^export_request/(?P\d+)$', - views.export_request, name="export_request"), - re_path(r'^import_request$', views.import_request, name="import_request"), # path("test_create_plan",views.test_create_plan,name="test_create_plan"), path("edit_plan/", views.edit_plan, name="edit_plan"), path("delete_albums/", views.delete_albums, name="delete_albums"), diff --git a/src/core/pyros_django/seq_submit/views.py b/src/core/pyros_django/seq_submit/views.py index e0ca804..d17347f 100644 --- a/src/core/pyros_django/seq_submit/views.py +++ b/src/core/pyros_django/seq_submit/views.py @@ -36,7 +36,6 @@ from .forms import SequenceForm, AlbumForm, PlanForm, uneditablePlanForm #from .forms import RequestForm, SequenceForm, AlbumForm, PlanForm, uneditablePlanForm from .validators import check_plan_validity, check_album_validity, check_sequence_validity, check_request_validity from .functions import check_sequence_file_validity_and_save, create_sequence_pickle -from .RequestSerializer import RequestSerializer import scheduling import numpy @@ -758,73 +757,6 @@ def unsubmit_request(request, req_id): return redirect(action_request, req_id=req_id, action="edit", status=1, message=message) -@login_required -def export_request(request, req_id): - """ - Create an XML file with the given request, and send a download request to the user - """ - - if (settings.DEBUG): - #log.info("From export_request") - pass - - req = Request.objects.get(id=req_id) - if req.complete == False: - message = "Request must be completely valid to be serialized" - return redirect(action_request, req_id=req_id, action="view", status=-1, message=message) - - file_name = SAVED_REQUESTS_FOLDER + "request" + str(req.id) + ".xml" - rs = RequestSerializer() - rs.serialize(req, file_name) - - wrapper = FileWrapper(open(file_name, "r")) - content_type = mimetypes.guess_type(file_name)[0] - - response = HttpResponse(wrapper, content_type=content_type) - response['Content-Length'] = os.path.getsize(file_name) - response['Content-Disposition'] = 'attachment; filename=%s' % smart_str( - os.path.basename(file_name)) - - return response - - -@login_required -@csrf_exempt -def import_request(request): - """ - Ask for a XML file, parse it and create a request in DB - Don't do anything if there is a single error into the file - """ - - if (settings.DEBUG): - pass - #log.info("From import_request") - - log.info(request) - - if request.method == "POST": - file = request.FILES.get("request_file") - if file is None: - status = -1 - message = "File does not exist" - elif file.size > 1000000: - status = -1 - message = "File is too big (more than 1 000 000 bytes)" - else: - rs = RequestSerializer() - message = rs.unserialize(file.read(), request.user) - if message != "": - status = -1 - else: - status = 1 - message = "Request imported successfully. Please check it before submitting for scheduling." - print("message is", message) - else: - status = -1 - message = "Internal error" - - # Now, display the list of requests (updated with this new request) - return redirect(sequences_list, status=status, message=message) # @login_required # def test_create_plan(request): -- libgit2 0.21.2