Commit abfb02e272f1507aa6a44d67ba02347a80bcc329
1 parent
e5b19293
Exists in
master
and in
1 other branch
Device Model is now an abstract
Showing
15 changed files
with
746 additions
and
633 deletions
Show diff stats
.idea/workspace.xml
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <project version="4"> |
3 | 3 | <component name="ChangeListManager"> |
4 | - <list default="true" id="a32987d6-1295-46a1-bf9a-f01b2781e22f" name="Default" comment="" /> | |
4 | + <list default="true" id="a32987d6-1295-46a1-bf9a-f01b2781e22f" name="Default" comment=""> | |
5 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> | |
6 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/alert_manager/tasks.py" afterPath="$PROJECT_DIR$/src/alert_manager/tasks.py" /> | |
7 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/common/RequestBuilder.py" afterPath="$PROJECT_DIR$/src/common/RequestBuilder.py" /> | |
8 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/common/admin.py" afterPath="$PROJECT_DIR$/src/common/admin.py" /> | |
9 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/common/models.py" afterPath="$PROJECT_DIR$/src/common/models.py" /> | |
10 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/common/tests.py" afterPath="$PROJECT_DIR$/src/common/tests.py" /> | |
11 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/dashboard/views.py" afterPath="$PROJECT_DIR$/src/dashboard/views.py" /> | |
12 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/majordome/tasks.py" afterPath="$PROJECT_DIR$/src/majordome/tasks.py" /> | |
13 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/misc/fixtures/initial_fixture.json" afterPath="$PROJECT_DIR$/src/misc/fixtures/initial_fixture.json" /> | |
14 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/misc/fixtures/tests/alert_mgr_test.json" afterPath="$PROJECT_DIR$/src/misc/fixtures/tests/alert_mgr_test.json" /> | |
15 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/misc/fixtures/tests/common_test.json" afterPath="$PROJECT_DIR$/src/misc/fixtures/tests/common_test.json" /> | |
16 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/misc/fixtures/tests/routine_mgr_test.json" afterPath="$PROJECT_DIR$/src/misc/fixtures/tests/routine_mgr_test.json" /> | |
17 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/pyros/settings.py" afterPath="$PROJECT_DIR$/src/pyros/settings.py" /> | |
18 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/routine_manager/RequestSerializer.py" afterPath="$PROJECT_DIR$/src/routine_manager/RequestSerializer.py" /> | |
19 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/scheduler/tasks.py" afterPath="$PROJECT_DIR$/src/scheduler/tasks.py" /> | |
20 | + </list> | |
5 | 21 | <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> |
6 | 22 | <option name="TRACKING_ENABLED" value="true" /> |
7 | 23 | <option name="SHOW_DIALOG" value="false" /> |
... | ... | @@ -471,14 +487,50 @@ |
471 | 487 | </favorites_list> |
472 | 488 | </component> |
473 | 489 | <component name="FileEditorManager"> |
474 | - <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> | |
475 | - <file leaf-file-name="ALERTsimulator.py" pinned="false" current-in-tab="true"> | |
476 | - <entry file="file://$PROJECT_DIR$/simulators/alert/ALERTsimulator.py"> | |
490 | + <leaf> | |
491 | + <file leaf-file-name="urls.py" pinned="false" current-in-tab="false"> | |
492 | + <entry file="file://$PROJECT_DIR$/src/alert_manager/urls.py"> | |
477 | 493 | <provider selected="true" editor-type-id="text-editor"> |
478 | 494 | <state relative-caret-position="170"> |
479 | - <caret line="10" column="33" lean-forward="true" selection-start-line="10" selection-start-column="33" selection-end-line="10" selection-end-column="33" /> | |
495 | + <caret line="10" column="0" lean-forward="true" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" /> | |
480 | 496 | <folding> |
481 | - <element signature="e#0#9#0" expanded="true" /> | |
497 | + <element signature="e#0#32#0" expanded="true" /> | |
498 | + </folding> | |
499 | + </state> | |
500 | + </provider> | |
501 | + </entry> | |
502 | + </file> | |
503 | + <file leaf-file-name="tasks.py" pinned="false" current-in-tab="false"> | |
504 | + <entry file="file://$PROJECT_DIR$/src/majordome/tasks.py"> | |
505 | + <provider selected="true" editor-type-id="text-editor"> | |
506 | + <state relative-caret-position="1802"> | |
507 | + <caret line="106" column="0" lean-forward="true" selection-start-line="106" selection-start-column="0" selection-end-line="106" selection-end-column="0" /> | |
508 | + <folding> | |
509 | + <element signature="e#0#38#0" expanded="true" /> | |
510 | + </folding> | |
511 | + </state> | |
512 | + </provider> | |
513 | + </entry> | |
514 | + </file> | |
515 | + <file leaf-file-name="urls.py" pinned="false" current-in-tab="true"> | |
516 | + <entry file="file://$PROJECT_DIR$/src/dashboard/urls.py"> | |
517 | + <provider selected="true" editor-type-id="text-editor"> | |
518 | + <state relative-caret-position="136"> | |
519 | + <caret line="8" column="53" lean-forward="true" selection-start-line="8" selection-start-column="53" selection-end-line="8" selection-end-column="53" /> | |
520 | + <folding> | |
521 | + <element signature="e#0#32#0" expanded="true" /> | |
522 | + </folding> | |
523 | + </state> | |
524 | + </provider> | |
525 | + </entry> | |
526 | + </file> | |
527 | + <file leaf-file-name="views.py" pinned="false" current-in-tab="false"> | |
528 | + <entry file="file://$PROJECT_DIR$/src/dashboard/views.py"> | |
529 | + <provider selected="true" editor-type-id="text-editor"> | |
530 | + <state relative-caret-position="493"> | |
531 | + <caret line="35" column="0" lean-forward="true" selection-start-line="35" selection-start-column="0" selection-end-line="35" selection-end-column="0" /> | |
532 | + <folding> | |
533 | + <element signature="e#0#45#0" expanded="true" /> | |
482 | 534 | </folding> |
483 | 535 | </state> |
484 | 536 | </provider> |
... | ... | @@ -493,6 +545,25 @@ |
493 | 545 | </list> |
494 | 546 | </option> |
495 | 547 | </component> |
548 | + <component name="FindInProjectRecents"> | |
549 | + <findStrings> | |
550 | + <find>Detector</find> | |
551 | + <find>"device": 9</find> | |
552 | + <find>"device": 1</find> | |
553 | + <find>"device": 2</find> | |
554 | + <find>"device": 3</find> | |
555 | + <find>"device": 4</find> | |
556 | + <find>"device": 5</find> | |
557 | + <find>"device": 6</find> | |
558 | + <find>"device": 7</find> | |
559 | + <find>"device": 8</find> | |
560 | + <find>Filter</find> | |
561 | + <find>Telesc</find> | |
562 | + <find>tasks</find> | |
563 | + <find>Device</find> | |
564 | + <find>device</find> | |
565 | + </findStrings> | |
566 | + </component> | |
496 | 567 | <component name="Git.Settings"> |
497 | 568 | <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> |
498 | 569 | </component> |
... | ... | @@ -500,7 +571,6 @@ |
500 | 571 | <option name="CHANGED_PATHS"> |
501 | 572 | <list> |
502 | 573 | <option value="$PROJECT_DIR$/src/pyros/celery.py" /> |
503 | - <option value="$PROJECT_DIR$/src/routine_manager/RequestSerializer.py" /> | |
504 | 574 | <option value="$PROJECT_DIR$/simulators/device/Device.py" /> |
505 | 575 | <option value="$PROJECT_DIR$/simulators/plc/PLC.py" /> |
506 | 576 | <option value="$PROJECT_DIR$/simulators/plc/PLCsomulato.py" /> |
... | ... | @@ -509,6 +579,20 @@ |
509 | 579 | <option value="$PROJECT_DIR$/simulators/user/USERsimulator.py" /> |
510 | 580 | <option value="$PROJECT_DIR$/simulators/config/user/conf.json" /> |
511 | 581 | <option value="$PROJECT_DIR$/simulators/alert/ALERTsimulator.py" /> |
582 | + <option value="$PROJECT_DIR$/src/misc/fixtures/initial_fixture.json" /> | |
583 | + <option value="$PROJECT_DIR$/src/misc/fixtures/tests/common_test.json" /> | |
584 | + <option value="$PROJECT_DIR$/src/misc/fixtures/tests/alert_mgr_test.json" /> | |
585 | + <option value="$PROJECT_DIR$/src/misc/fixtures/tests/routine_mgr_test.json" /> | |
586 | + <option value="$PROJECT_DIR$/src/common/models.py" /> | |
587 | + <option value="$PROJECT_DIR$/src/common/tests.py" /> | |
588 | + <option value="$PROJECT_DIR$/src/common/RequestBuilder.py" /> | |
589 | + <option value="$PROJECT_DIR$/src/routine_manager/RequestSerializer.py" /> | |
590 | + <option value="$PROJECT_DIR$/src/scheduler/tasks.py" /> | |
591 | + <option value="$PROJECT_DIR$/src/common/admin.py" /> | |
592 | + <option value="$PROJECT_DIR$/src/majordome/tasks.py" /> | |
593 | + <option value="$PROJECT_DIR$/src/alert_manager/tasks.py" /> | |
594 | + <option value="$PROJECT_DIR$/src/dashboard/views.py" /> | |
595 | + <option value="$PROJECT_DIR$/src/dashboard/urls.py" /> | |
512 | 596 | </list> |
513 | 597 | </option> |
514 | 598 | </component> |
... | ... | @@ -581,7 +665,43 @@ |
581 | 665 | <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> |
582 | 666 | </PATH_ELEMENT> |
583 | 667 | <PATH_ELEMENT> |
584 | - <option name="myItemId" value="scripts" /> | |
668 | + <option name="myItemId" value="scheduler" /> | |
669 | + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> | |
670 | + </PATH_ELEMENT> | |
671 | + </PATH> | |
672 | + <PATH> | |
673 | + <PATH_ELEMENT> | |
674 | + <option name="myItemId" value="PYROS" /> | |
675 | + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> | |
676 | + </PATH_ELEMENT> | |
677 | + <PATH_ELEMENT> | |
678 | + <option name="myItemId" value="PYROS" /> | |
679 | + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> | |
680 | + </PATH_ELEMENT> | |
681 | + <PATH_ELEMENT> | |
682 | + <option name="myItemId" value="src" /> | |
683 | + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> | |
684 | + </PATH_ELEMENT> | |
685 | + <PATH_ELEMENT> | |
686 | + <option name="myItemId" value="routine_manager" /> | |
687 | + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> | |
688 | + </PATH_ELEMENT> | |
689 | + </PATH> | |
690 | + <PATH> | |
691 | + <PATH_ELEMENT> | |
692 | + <option name="myItemId" value="PYROS" /> | |
693 | + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> | |
694 | + </PATH_ELEMENT> | |
695 | + <PATH_ELEMENT> | |
696 | + <option name="myItemId" value="PYROS" /> | |
697 | + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> | |
698 | + </PATH_ELEMENT> | |
699 | + <PATH_ELEMENT> | |
700 | + <option name="myItemId" value="src" /> | |
701 | + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> | |
702 | + </PATH_ELEMENT> | |
703 | + <PATH_ELEMENT> | |
704 | + <option name="myItemId" value="pyros" /> | |
585 | 705 | <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> |
586 | 706 | </PATH_ELEMENT> |
587 | 707 | </PATH> |
... | ... | @@ -595,7 +715,47 @@ |
595 | 715 | <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> |
596 | 716 | </PATH_ELEMENT> |
597 | 717 | <PATH_ELEMENT> |
598 | - <option name="myItemId" value="simulators" /> | |
718 | + <option name="myItemId" value="src" /> | |
719 | + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> | |
720 | + </PATH_ELEMENT> | |
721 | + <PATH_ELEMENT> | |
722 | + <option name="myItemId" value="devices" /> | |
723 | + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> | |
724 | + </PATH_ELEMENT> | |
725 | + </PATH> | |
726 | + <PATH> | |
727 | + <PATH_ELEMENT> | |
728 | + <option name="myItemId" value="PYROS" /> | |
729 | + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> | |
730 | + </PATH_ELEMENT> | |
731 | + <PATH_ELEMENT> | |
732 | + <option name="myItemId" value="PYROS" /> | |
733 | + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> | |
734 | + </PATH_ELEMENT> | |
735 | + <PATH_ELEMENT> | |
736 | + <option name="myItemId" value="src" /> | |
737 | + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> | |
738 | + </PATH_ELEMENT> | |
739 | + <PATH_ELEMENT> | |
740 | + <option name="myItemId" value="dashboard" /> | |
741 | + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> | |
742 | + </PATH_ELEMENT> | |
743 | + </PATH> | |
744 | + <PATH> | |
745 | + <PATH_ELEMENT> | |
746 | + <option name="myItemId" value="PYROS" /> | |
747 | + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> | |
748 | + </PATH_ELEMENT> | |
749 | + <PATH_ELEMENT> | |
750 | + <option name="myItemId" value="PYROS" /> | |
751 | + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> | |
752 | + </PATH_ELEMENT> | |
753 | + <PATH_ELEMENT> | |
754 | + <option name="myItemId" value="src" /> | |
755 | + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> | |
756 | + </PATH_ELEMENT> | |
757 | + <PATH_ELEMENT> | |
758 | + <option name="myItemId" value="alert_manager" /> | |
599 | 759 | <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> |
600 | 760 | </PATH_ELEMENT> |
601 | 761 | </PATH> |
... | ... | @@ -608,7 +768,7 @@ |
608 | 768 | <component name="PropertiesComponent"> |
609 | 769 | <property name="WebServerToolWindowFactoryState" value="false" /> |
610 | 770 | <property name="last_opened_file_path" value="$PROJECT_DIR$/simulators/alert/ALERTsimulator.py" /> |
611 | - <property name="settings.editor.selected.configurable" value="fileTemplates" /> | |
771 | + <property name="settings.editor.selected.configurable" value="com.jetbrains.django.DjangoModulesConfigurable" /> | |
612 | 772 | <property name="nodejs_interpreter_path" value="/usr/bin/node" /> |
613 | 773 | <property name="js.eslint.eslintPackage" value="" /> |
614 | 774 | <property name="js-jscs-nodeInterpreter" value="/usr/bin/node" /> |
... | ... | @@ -618,7 +778,7 @@ |
618 | 778 | <recent name="$PROJECT_DIR$/simulators/plc" /> |
619 | 779 | </key> |
620 | 780 | </component> |
621 | - <component name="RunManager" selected="Python.alertSimulator"> | |
781 | + <component name="RunManager" selected="Django server.runserver"> | |
622 | 782 | <configuration default="true" type="CompoundRunConfigurationType" factoryName="Compound Run Configuration"> |
623 | 783 | <method /> |
624 | 784 | </configuration> |
... | ... | @@ -863,8 +1023,8 @@ |
863 | 1023 | <option name="INTERPRETER_OPTIONS" value="" /> |
864 | 1024 | <option name="PARENT_ENVS" value="true" /> |
865 | 1025 | <envs> |
866 | - <env name="DJANGO_SETTINGS_MODULE" value="pyros.settings" /> | |
867 | 1026 | <env name="PYTHONUNBUFFERED" value="1" /> |
1027 | + <env name="DJANGO_SETTINGS_MODULE" value="pyros.settings" /> | |
868 | 1028 | </envs> |
869 | 1029 | <option name="SDK_HOME" value="$PROJECT_DIR$/private/venv_py3_pyros/bin/python3.5" /> |
870 | 1030 | <option name="WORKING_DIRECTORY" value="" /> |
... | ... | @@ -968,26 +1128,26 @@ |
968 | 1128 | </component> |
969 | 1129 | <component name="ToolWindowManager"> |
970 | 1130 | <frame x="0" y="24" width="1920" height="1056" extended-state="6" /> |
971 | - <editor active="false" /> | |
1131 | + <editor active="true" /> | |
972 | 1132 | <layout> |
973 | - <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.15729167" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> | |
1133 | + <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.15729167" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> | |
974 | 1134 | <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> |
975 | 1135 | <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> |
976 | 1136 | <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> |
977 | - <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32925585" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> | |
978 | 1137 | <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> |
979 | 1138 | <window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> |
980 | - <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.15800203" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> | |
981 | 1139 | <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> |
982 | 1140 | <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> |
983 | 1141 | <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" /> |
984 | - <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> | |
985 | 1142 | <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> |
986 | 1143 | <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> |
987 | 1144 | <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> |
988 | 1145 | <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> |
1146 | + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.083588175" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> | |
989 | 1147 | <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> |
1148 | + <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32925585" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> | |
990 | 1149 | <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> |
1150 | + <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> | |
991 | 1151 | </layout> |
992 | 1152 | </component> |
993 | 1153 | <component name="TypeScriptGeneratedFilesManager"> |
... | ... | @@ -1001,96 +1161,257 @@ |
1001 | 1161 | <watches-manager /> |
1002 | 1162 | </component> |
1003 | 1163 | <component name="editorHistoryManager"> |
1004 | - <entry file="file://$PROJECT_DIR$/simulators/plc/PLC.py"> | |
1164 | + <entry file="file://$PROJECT_DIR$/src/majordome/__init__.py"> | |
1005 | 1165 | <provider selected="true" editor-type-id="text-editor"> |
1006 | - <state relative-caret-position="136"> | |
1007 | - <caret line="11" column="18" lean-forward="false" selection-start-line="11" selection-start-column="18" selection-end-line="11" selection-end-column="18" /> | |
1008 | - <folding> | |
1009 | - <element signature="e#0#13#0" expanded="false" /> | |
1010 | - </folding> | |
1166 | + <state relative-caret-position="0"> | |
1167 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1168 | + <folding /> | |
1169 | + </state> | |
1170 | + </provider> | |
1171 | + </entry> | |
1172 | + <entry file="file://$PROJECT_DIR$/src/scheduler/tasks.py"> | |
1173 | + <provider selected="true" editor-type-id="text-editor"> | |
1174 | + <state relative-caret-position="-69"> | |
1175 | + <caret line="9" column="11" lean-forward="true" selection-start-line="9" selection-start-column="11" selection-end-line="9" selection-end-column="11" /> | |
1176 | + <folding /> | |
1177 | + </state> | |
1178 | + </provider> | |
1179 | + </entry> | |
1180 | + <entry file="file://$PROJECT_DIR$/src/alert_manager/__init__.py"> | |
1181 | + <provider selected="true" editor-type-id="text-editor"> | |
1182 | + <state relative-caret-position="0"> | |
1183 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1184 | + <folding /> | |
1011 | 1185 | </state> |
1012 | 1186 | </provider> |
1013 | 1187 | </entry> |
1014 | - <entry file="file://$PROJECT_DIR$/simulators/device/Device.py"> | |
1188 | + <entry file="file://$PROJECT_DIR$/src/alert_manager/admin.py"> | |
1015 | 1189 | <provider selected="true" editor-type-id="text-editor"> |
1016 | 1190 | <state relative-caret-position="0"> |
1017 | 1191 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
1192 | + <folding /> | |
1193 | + </state> | |
1194 | + </provider> | |
1195 | + </entry> | |
1196 | + <entry file="file://$PROJECT_DIR$/src/alert_manager/apps.py"> | |
1197 | + <provider selected="true" editor-type-id="text-editor"> | |
1198 | + <state relative-caret-position="0"> | |
1199 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1200 | + <folding /> | |
1201 | + </state> | |
1202 | + </provider> | |
1203 | + </entry> | |
1204 | + <entry file="file://$PROJECT_DIR$/src/alert_manager/comet_commands.txt"> | |
1205 | + <provider selected="true" editor-type-id="text-editor"> | |
1206 | + <state relative-caret-position="0"> | |
1207 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1208 | + <folding /> | |
1209 | + </state> | |
1210 | + </provider> | |
1211 | + </entry> | |
1212 | + <entry file="file://$PROJECT_DIR$/src/alert_manager/models.py"> | |
1213 | + <provider selected="true" editor-type-id="text-editor"> | |
1214 | + <state relative-caret-position="0"> | |
1215 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1216 | + <folding /> | |
1217 | + </state> | |
1218 | + </provider> | |
1219 | + </entry> | |
1220 | + <entry file="file://$PROJECT_DIR$/src/alert_manager/simulation_sequences"> | |
1221 | + <provider selected="true" editor-type-id="text-editor"> | |
1222 | + <state relative-caret-position="0"> | |
1223 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1224 | + <folding /> | |
1225 | + </state> | |
1226 | + </provider> | |
1227 | + </entry> | |
1228 | + <entry file="file://$PROJECT_DIR$/src/alert_manager/StrategyBuilder.py"> | |
1229 | + <provider selected="true" editor-type-id="text-editor"> | |
1230 | + <state relative-caret-position="557"> | |
1231 | + <caret line="40" column="30" lean-forward="true" selection-start-line="40" selection-start-column="30" selection-end-line="40" selection-end-column="30" /> | |
1018 | 1232 | <folding> |
1019 | - <element signature="e#0#19#0" expanded="false" /> | |
1233 | + <element signature="e#0#48#0" expanded="true" /> | |
1020 | 1234 | </folding> |
1021 | 1235 | </state> |
1022 | 1236 | </provider> |
1023 | 1237 | </entry> |
1024 | - <entry file="file://$PROJECT_DIR$/src/pyros/celery.py"> | |
1238 | + <entry file="file://$PROJECT_DIR$/src/analyzer/admin.py"> | |
1239 | + <provider selected="true" editor-type-id="text-editor"> | |
1240 | + <state relative-caret-position="0"> | |
1241 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1242 | + <folding /> | |
1243 | + </state> | |
1244 | + </provider> | |
1245 | + </entry> | |
1246 | + <entry file="file://$PROJECT_DIR$/src/analyzer/apps.py"> | |
1025 | 1247 | <provider selected="true" editor-type-id="text-editor"> |
1026 | 1248 | <state relative-caret-position="0"> |
1027 | - <caret line="16" column="0" lean-forward="false" selection-start-line="16" selection-start-column="0" selection-end-line="16" selection-end-column="0" /> | |
1249 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1250 | + <folding /> | |
1028 | 1251 | </state> |
1029 | 1252 | </provider> |
1030 | 1253 | </entry> |
1031 | - <entry file="file://$PROJECT_DIR$/.gitignore"> | |
1254 | + <entry file="file://$PROJECT_DIR$/src/analyzer/models.py"> | |
1032 | 1255 | <provider selected="true" editor-type-id="text-editor"> |
1033 | 1256 | <state relative-caret-position="0"> |
1034 | 1257 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
1258 | + <folding /> | |
1035 | 1259 | </state> |
1036 | 1260 | </provider> |
1037 | 1261 | </entry> |
1038 | - <entry file="file://$PROJECT_DIR$/src/routine_manager/RequestSerializer.py"> | |
1262 | + <entry file="file://$PROJECT_DIR$/src/analyzer/tasks.py"> | |
1039 | 1263 | <provider selected="true" editor-type-id="text-editor"> |
1040 | - <state relative-caret-position="-323"> | |
1041 | - <caret line="26" column="0" lean-forward="false" selection-start-line="26" selection-start-column="0" selection-end-line="26" selection-end-column="0" /> | |
1264 | + <state relative-caret-position="0"> | |
1265 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1042 | 1266 | <folding> |
1043 | - <element signature="e#0#32#0" expanded="false" /> | |
1267 | + <element signature="e#0#38#0" expanded="true" /> | |
1044 | 1268 | </folding> |
1045 | 1269 | </state> |
1046 | 1270 | </provider> |
1047 | 1271 | </entry> |
1048 | - <entry file="file://$PROJECT_DIR$/simulators/scripts/run_all.sh"> | |
1272 | + <entry file="file://$PROJECT_DIR$/src/analyzer/tests.py"> | |
1273 | + <provider selected="true" editor-type-id="text-editor"> | |
1274 | + <state relative-caret-position="0"> | |
1275 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1276 | + <folding /> | |
1277 | + </state> | |
1278 | + </provider> | |
1279 | + </entry> | |
1280 | + <entry file="file://$PROJECT_DIR$/src/analyzer/views.py"> | |
1281 | + <provider selected="true" editor-type-id="text-editor"> | |
1282 | + <state relative-caret-position="0"> | |
1283 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1284 | + <folding /> | |
1285 | + </state> | |
1286 | + </provider> | |
1287 | + </entry> | |
1288 | + <entry file="file://$PROJECT_DIR$/src/common/admin.py"> | |
1289 | + <provider selected="true" editor-type-id="text-editor"> | |
1290 | + <state relative-caret-position="538"> | |
1291 | + <caret line="238" column="0" lean-forward="false" selection-start-line="238" selection-start-column="0" selection-end-line="238" selection-end-column="0" /> | |
1292 | + <folding /> | |
1293 | + </state> | |
1294 | + </provider> | |
1295 | + </entry> | |
1296 | + <entry file="file://$PROJECT_DIR$/src/common/apps.py"> | |
1297 | + <provider selected="true" editor-type-id="text-editor"> | |
1298 | + <state relative-caret-position="0"> | |
1299 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1300 | + <folding /> | |
1301 | + </state> | |
1302 | + </provider> | |
1303 | + </entry> | |
1304 | + <entry file="file://$PROJECT_DIR$/src/common/models.py"> | |
1305 | + <provider selected="true" editor-type-id="text-editor"> | |
1306 | + <state relative-caret-position="337"> | |
1307 | + <caret line="141" column="31" lean-forward="false" selection-start-line="141" selection-start-column="25" selection-end-line="141" selection-end-column="31" /> | |
1308 | + <folding /> | |
1309 | + </state> | |
1310 | + </provider> | |
1311 | + </entry> | |
1312 | + <entry file="file://$PROJECT_DIR$/src/common/RequestBuilder.py"> | |
1313 | + <provider selected="true" editor-type-id="text-editor"> | |
1314 | + <state relative-caret-position="917"> | |
1315 | + <caret line="75" column="23" lean-forward="true" selection-start-line="75" selection-start-column="23" selection-end-line="75" selection-end-column="23" /> | |
1316 | + <folding /> | |
1317 | + </state> | |
1318 | + </provider> | |
1319 | + </entry> | |
1320 | + <entry file="file://$PROJECT_DIR$/src/common/tests.py"> | |
1321 | + <provider selected="true" editor-type-id="text-editor"> | |
1322 | + <state relative-caret-position="337"> | |
1323 | + <caret line="74" column="12" lean-forward="false" selection-start-line="74" selection-start-column="6" selection-end-line="74" selection-end-column="12" /> | |
1324 | + <folding /> | |
1325 | + </state> | |
1326 | + </provider> | |
1327 | + </entry> | |
1328 | + <entry file="file://$PROJECT_DIR$/src/common/views.py"> | |
1049 | 1329 | <provider selected="true" editor-type-id="text-editor"> |
1050 | 1330 | <state relative-caret-position="0"> |
1051 | 1331 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
1332 | + <folding /> | |
1052 | 1333 | </state> |
1053 | 1334 | </provider> |
1054 | 1335 | </entry> |
1055 | - <entry file="file://$PROJECT_DIR$/simulators/plc/Device.py"> | |
1336 | + <entry file="file://$PROJECT_DIR$/src/dashboard/admin.py"> | |
1056 | 1337 | <provider selected="true" editor-type-id="text-editor"> |
1057 | - <state relative-caret-position="272"> | |
1058 | - <caret line="19" column="0" lean-forward="true" selection-start-line="19" selection-start-column="0" selection-end-line="19" selection-end-column="0" /> | |
1338 | + <state relative-caret-position="0"> | |
1339 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1059 | 1340 | <folding /> |
1060 | 1341 | </state> |
1061 | 1342 | </provider> |
1062 | 1343 | </entry> |
1063 | - <entry file="file://$PROJECT_DIR$/simulators/device/Device.py"> | |
1344 | + <entry file="file://$PROJECT_DIR$/src/dashboard/apps.py"> | |
1064 | 1345 | <provider selected="true" editor-type-id="text-editor"> |
1065 | - <state relative-caret-position="306"> | |
1066 | - <caret line="30" column="0" lean-forward="false" selection-start-line="30" selection-start-column="0" selection-end-line="30" selection-end-column="0" /> | |
1346 | + <state relative-caret-position="0"> | |
1347 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1348 | + <folding /> | |
1349 | + </state> | |
1350 | + </provider> | |
1351 | + </entry> | |
1352 | + <entry file="file://$PROJECT_DIR$/src/dashboard/models.py"> | |
1353 | + <provider selected="true" editor-type-id="text-editor"> | |
1354 | + <state relative-caret-position="0"> | |
1355 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1356 | + <folding /> | |
1357 | + </state> | |
1358 | + </provider> | |
1359 | + </entry> | |
1360 | + <entry file="file://$PROJECT_DIR$/src/dashboard/tests.py"> | |
1361 | + <provider selected="true" editor-type-id="text-editor"> | |
1362 | + <state relative-caret-position="0"> | |
1363 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1364 | + <folding /> | |
1365 | + </state> | |
1366 | + </provider> | |
1367 | + </entry> | |
1368 | + <entry file="file://$PROJECT_DIR$/src/devices/admin.py"> | |
1369 | + <provider selected="true" editor-type-id="text-editor"> | |
1370 | + <state relative-caret-position="0"> | |
1371 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1372 | + <folding /> | |
1373 | + </state> | |
1374 | + </provider> | |
1375 | + </entry> | |
1376 | + <entry file="file://$PROJECT_DIR$/src/devices/apps.py"> | |
1377 | + <provider selected="true" editor-type-id="text-editor"> | |
1378 | + <state relative-caret-position="0"> | |
1379 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1380 | + <folding /> | |
1381 | + </state> | |
1382 | + </provider> | |
1383 | + </entry> | |
1384 | + <entry file="file://$PROJECT_DIR$/src/devices/CameraNIR.py"> | |
1385 | + <provider selected="true" editor-type-id="text-editor"> | |
1386 | + <state relative-caret-position="0"> | |
1387 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1067 | 1388 | <folding> |
1068 | - <element signature="e#0#19#0" expanded="false" /> | |
1389 | + <element signature="e#0#27#0" expanded="true" /> | |
1069 | 1390 | </folding> |
1070 | 1391 | </state> |
1071 | 1392 | </provider> |
1072 | 1393 | </entry> |
1073 | - <entry file="file://$PROJECT_DIR$/src/monitoring/tasks.py"> | |
1394 | + <entry file="file://$PROJECT_DIR$/src/devices/CameraVIS.py"> | |
1074 | 1395 | <provider selected="true" editor-type-id="text-editor"> |
1075 | - <state relative-caret-position="716"> | |
1076 | - <caret line="150" column="77" lean-forward="true" selection-start-line="150" selection-start-column="77" selection-end-line="150" selection-end-column="77" /> | |
1396 | + <state relative-caret-position="0"> | |
1397 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1077 | 1398 | <folding> |
1078 | - <element signature="e#0#38#0" expanded="false" /> | |
1399 | + <element signature="e#0#27#0" expanded="true" /> | |
1079 | 1400 | </folding> |
1080 | 1401 | </state> |
1081 | 1402 | </provider> |
1082 | 1403 | </entry> |
1083 | 1404 | <entry file="file://$PROJECT_DIR$/src/devices/Device.py"> |
1084 | 1405 | <provider selected="true" editor-type-id="text-editor"> |
1085 | - <state relative-caret-position="-1632"> | |
1086 | - <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1406 | + <state relative-caret-position="337"> | |
1407 | + <caret line="84" column="44" lean-forward="false" selection-start-line="84" selection-start-column="38" selection-end-line="84" selection-end-column="44" /> | |
1087 | 1408 | <folding> |
1088 | - <element signature="e#0#27#0" expanded="false" /> | |
1409 | + <element signature="e#0#27#0" expanded="true" /> | |
1089 | 1410 | </folding> |
1090 | 1411 | </state> |
1091 | 1412 | </provider> |
1092 | 1413 | </entry> |
1093 | - <entry file="file://$PROJECT_DIR$/simulators/plc/PLCsomulato.py"> | |
1414 | + <entry file="file://$PROJECT_DIR$/src/devices/models.py"> | |
1094 | 1415 | <provider selected="true" editor-type-id="text-editor"> |
1095 | 1416 | <state relative-caret-position="0"> |
1096 | 1417 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
... | ... | @@ -1098,33 +1419,43 @@ |
1098 | 1419 | </state> |
1099 | 1420 | </provider> |
1100 | 1421 | </entry> |
1101 | - <entry file="file://$PROJECT_DIR$/simulators/plc/PLC.py"> | |
1422 | + <entry file="file://$PROJECT_DIR$/src/devices/PLC.py"> | |
1102 | 1423 | <provider selected="true" editor-type-id="text-editor"> |
1103 | - <state relative-caret-position="663"> | |
1104 | - <caret line="39" column="37" lean-forward="true" selection-start-line="39" selection-start-column="37" selection-end-line="39" selection-end-column="37" /> | |
1424 | + <state relative-caret-position="0"> | |
1425 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1105 | 1426 | <folding> |
1106 | - <element signature="e#0#13#0" expanded="false" /> | |
1427 | + <element signature="e#0#27#0" expanded="true" /> | |
1107 | 1428 | </folding> |
1108 | 1429 | </state> |
1109 | 1430 | </provider> |
1110 | 1431 | </entry> |
1111 | - <entry file="file://$PROJECT_DIR$/src/devices/PLC.py"> | |
1432 | + <entry file="file://$PROJECT_DIR$/src/devices/Telescope.py"> | |
1112 | 1433 | <provider selected="true" editor-type-id="text-editor"> |
1113 | - <state relative-caret-position="17"> | |
1114 | - <caret line="1" column="0" lean-forward="false" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" /> | |
1434 | + <state relative-caret-position="0"> | |
1435 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1436 | + <folding> | |
1437 | + <element signature="e#0#27#0" expanded="true" /> | |
1438 | + </folding> | |
1439 | + </state> | |
1440 | + </provider> | |
1441 | + </entry> | |
1442 | + <entry file="file://$PROJECT_DIR$/src/devices/tests.py"> | |
1443 | + <provider selected="true" editor-type-id="text-editor"> | |
1444 | + <state relative-caret-position="0"> | |
1445 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1115 | 1446 | <folding /> |
1116 | 1447 | </state> |
1117 | 1448 | </provider> |
1118 | 1449 | </entry> |
1119 | - <entry file="file://$PROJECT_DIR$/pyrosrun.sh"> | |
1450 | + <entry file="file://$PROJECT_DIR$/src/majordome/admin.py"> | |
1120 | 1451 | <provider selected="true" editor-type-id="text-editor"> |
1121 | - <state relative-caret-position="-830"> | |
1452 | + <state relative-caret-position="0"> | |
1122 | 1453 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
1123 | 1454 | <folding /> |
1124 | 1455 | </state> |
1125 | 1456 | </provider> |
1126 | 1457 | </entry> |
1127 | - <entry file="file://$PROJECT_DIR$/src/scripts/celery_test.sh"> | |
1458 | + <entry file="file://$PROJECT_DIR$/src/majordome/apps.py"> | |
1128 | 1459 | <provider selected="true" editor-type-id="text-editor"> |
1129 | 1460 | <state relative-caret-position="0"> |
1130 | 1461 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
... | ... | @@ -1132,74 +1463,136 @@ |
1132 | 1463 | </state> |
1133 | 1464 | </provider> |
1134 | 1465 | </entry> |
1135 | - <entry file="file://$PROJECT_DIR$/src/alert_manager/events_to_send/BAT_GRB_Test_Pos_2016-05-08T15_38_32.00-123.xml"> | |
1466 | + <entry file="file://$PROJECT_DIR$/src/majordome/models.py"> | |
1136 | 1467 | <provider selected="true" editor-type-id="text-editor"> |
1137 | - <state relative-caret-position="2448"> | |
1138 | - <caret line="144" column="16" lean-forward="true" selection-start-line="144" selection-start-column="16" selection-end-line="144" selection-end-column="16" /> | |
1468 | + <state relative-caret-position="0"> | |
1469 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1139 | 1470 | <folding /> |
1140 | 1471 | </state> |
1141 | 1472 | </provider> |
1142 | 1473 | </entry> |
1143 | - <entry file="file://$PROJECT_DIR$/simulators/user/USERsimulator.py"> | |
1474 | + <entry file="file://$PROJECT_DIR$/src/majordome/TaskManager.py"> | |
1144 | 1475 | <provider selected="true" editor-type-id="text-editor"> |
1145 | - <state relative-caret-position="172"> | |
1146 | - <caret line="35" column="42" lean-forward="false" selection-start-line="35" selection-start-column="42" selection-end-line="35" selection-end-column="42" /> | |
1476 | + <state relative-caret-position="68"> | |
1477 | + <caret line="4" column="11" lean-forward="false" selection-start-line="4" selection-start-column="5" selection-end-line="4" selection-end-column="11" /> | |
1147 | 1478 | <folding /> |
1148 | 1479 | </state> |
1149 | 1480 | </provider> |
1150 | 1481 | </entry> |
1151 | 1482 | <entry file="file://$PROJECT_DIR$/src/alert_manager/tasks.py"> |
1152 | 1483 | <provider selected="true" editor-type-id="text-editor"> |
1153 | - <state relative-caret-position="2278"> | |
1154 | - <caret line="149" column="0" lean-forward="true" selection-start-line="149" selection-start-column="0" selection-end-line="149" selection-end-column="0" /> | |
1484 | + <state relative-caret-position="-953"> | |
1485 | + <caret line="10" column="19" lean-forward="true" selection-start-line="10" selection-start-column="19" selection-end-line="10" selection-end-column="19" /> | |
1486 | + <folding /> | |
1487 | + </state> | |
1488 | + </provider> | |
1489 | + </entry> | |
1490 | + <entry file="file://$PROJECT_DIR$/src/alert_manager/tests.py"> | |
1491 | + <provider selected="true" editor-type-id="text-editor"> | |
1492 | + <state relative-caret-position="628"> | |
1493 | + <caret line="48" column="0" lean-forward="false" selection-start-line="48" selection-start-column="0" selection-end-line="48" selection-end-column="0" /> | |
1494 | + <folding /> | |
1495 | + </state> | |
1496 | + </provider> | |
1497 | + </entry> | |
1498 | + <entry file="file://$PROJECT_DIR$/src/alert_manager/views.py"> | |
1499 | + <provider selected="true" editor-type-id="text-editor"> | |
1500 | + <state relative-caret-position="425"> | |
1501 | + <caret line="88" column="14" lean-forward="false" selection-start-line="88" selection-start-column="0" selection-end-line="89" selection-end-column="0" /> | |
1155 | 1502 | <folding> |
1156 | - <element signature="e#0#38#0" expanded="true" /> | |
1503 | + <element signature="e#0#35#0" expanded="true" /> | |
1157 | 1504 | </folding> |
1158 | 1505 | </state> |
1159 | 1506 | </provider> |
1160 | 1507 | </entry> |
1161 | - <entry file="file://$PROJECT_DIR$/src/alert_manager/tests.py"> | |
1508 | + <entry file="file://$PROJECT_DIR$/src/routine_manager/views.py"> | |
1162 | 1509 | <provider selected="true" editor-type-id="text-editor"> |
1163 | - <state relative-caret-position="187"> | |
1164 | - <caret line="65" column="0" lean-forward="true" selection-start-line="65" selection-start-column="0" selection-end-line="65" selection-end-column="0" /> | |
1510 | + <state relative-caret-position="476"> | |
1511 | + <caret line="88" column="20" lean-forward="true" selection-start-line="88" selection-start-column="0" selection-end-line="89" selection-end-column="0" /> | |
1512 | + <folding /> | |
1513 | + </state> | |
1514 | + </provider> | |
1515 | + </entry> | |
1516 | + <entry file="file://$PROJECT_DIR$/src/pyros/urls.py"> | |
1517 | + <provider selected="true" editor-type-id="text-editor"> | |
1518 | + <state relative-caret-position="493"> | |
1519 | + <caret line="35" column="53" lean-forward="true" selection-start-line="35" selection-start-column="53" selection-end-line="35" selection-end-column="53" /> | |
1520 | + <folding /> | |
1521 | + </state> | |
1522 | + </provider> | |
1523 | + </entry> | |
1524 | + <entry file="file://$PROJECT_DIR$/src/pyros/settings.py"> | |
1525 | + <provider selected="true" editor-type-id="text-editor"> | |
1526 | + <state relative-caret-position="592"> | |
1527 | + <caret line="76" column="11" lean-forward="false" selection-start-line="76" selection-start-column="5" selection-end-line="76" selection-end-column="11" /> | |
1528 | + <folding /> | |
1529 | + </state> | |
1530 | + </provider> | |
1531 | + </entry> | |
1532 | + <entry file="file://$PROJECT_DIR$/src/devices/views.py"> | |
1533 | + <provider selected="true" editor-type-id="text-editor"> | |
1534 | + <state relative-caret-position="51"> | |
1535 | + <caret line="3" column="0" lean-forward="true" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" /> | |
1536 | + <folding /> | |
1537 | + </state> | |
1538 | + </provider> | |
1539 | + </entry> | |
1540 | + <entry file="file://$PROJECT_DIR$/src/pyros/celery.py"> | |
1541 | + <provider selected="true" editor-type-id="text-editor"> | |
1542 | + <state relative-caret-position="0"> | |
1543 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1165 | 1544 | <folding> |
1166 | - <element signature="e#0#32#0" expanded="true" /> | |
1545 | + <element signature="e#0#38#0" expanded="true" /> | |
1167 | 1546 | </folding> |
1168 | 1547 | </state> |
1169 | 1548 | </provider> |
1170 | 1549 | </entry> |
1171 | - <entry file="file://$PROJECT_DIR$/simulators/resources/voevent_alert_04.xml"> | |
1550 | + <entry file="file://$PROJECT_DIR$/src/routine_manager/urls.py"> | |
1172 | 1551 | <provider selected="true" editor-type-id="text-editor"> |
1173 | 1552 | <state relative-caret-position="0"> |
1174 | 1553 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
1175 | - <folding /> | |
1554 | + <folding> | |
1555 | + <element signature="e#0#32#0" expanded="true" /> | |
1556 | + </folding> | |
1176 | 1557 | </state> |
1177 | 1558 | </provider> |
1178 | 1559 | </entry> |
1179 | - <entry file="file://$PROJECT_DIR$/simulators/plc/PLCsimulator.py"> | |
1560 | + <entry file="file://$PROJECT_DIR$/src/alert_manager/urls.py"> | |
1180 | 1561 | <provider selected="true" editor-type-id="text-editor"> |
1181 | - <state relative-caret-position="663"> | |
1182 | - <caret line="96" column="0" lean-forward="false" selection-start-line="96" selection-start-column="0" selection-end-line="96" selection-end-column="0" /> | |
1562 | + <state relative-caret-position="170"> | |
1563 | + <caret line="10" column="0" lean-forward="true" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" /> | |
1183 | 1564 | <folding> |
1184 | - <element signature="e#0#13#0" expanded="true" /> | |
1565 | + <element signature="e#0#32#0" expanded="true" /> | |
1185 | 1566 | </folding> |
1186 | 1567 | </state> |
1187 | 1568 | </provider> |
1188 | 1569 | </entry> |
1189 | - <entry file="file://$PROJECT_DIR$/simulators/config/user/conf.json"> | |
1570 | + <entry file="file://$PROJECT_DIR$/src/majordome/tasks.py"> | |
1190 | 1571 | <provider selected="true" editor-type-id="text-editor"> |
1191 | - <state relative-caret-position="442"> | |
1192 | - <caret line="26" column="16" lean-forward="true" selection-start-line="26" selection-start-column="16" selection-end-line="26" selection-end-column="16" /> | |
1193 | - <folding /> | |
1572 | + <state relative-caret-position="1802"> | |
1573 | + <caret line="106" column="0" lean-forward="true" selection-start-line="106" selection-start-column="0" selection-end-line="106" selection-end-column="0" /> | |
1574 | + <folding> | |
1575 | + <element signature="e#0#38#0" expanded="true" /> | |
1576 | + </folding> | |
1194 | 1577 | </state> |
1195 | 1578 | </provider> |
1196 | 1579 | </entry> |
1197 | - <entry file="file://$PROJECT_DIR$/simulators/alert/ALERTsimulator.py"> | |
1580 | + <entry file="file://$PROJECT_DIR$/src/dashboard/views.py"> | |
1198 | 1581 | <provider selected="true" editor-type-id="text-editor"> |
1199 | - <state relative-caret-position="170"> | |
1200 | - <caret line="10" column="33" lean-forward="true" selection-start-line="10" selection-start-column="33" selection-end-line="10" selection-end-column="33" /> | |
1582 | + <state relative-caret-position="493"> | |
1583 | + <caret line="35" column="0" lean-forward="true" selection-start-line="35" selection-start-column="0" selection-end-line="35" selection-end-column="0" /> | |
1584 | + <folding> | |
1585 | + <element signature="e#0#45#0" expanded="true" /> | |
1586 | + </folding> | |
1587 | + </state> | |
1588 | + </provider> | |
1589 | + </entry> | |
1590 | + <entry file="file://$PROJECT_DIR$/src/dashboard/urls.py"> | |
1591 | + <provider selected="true" editor-type-id="text-editor"> | |
1592 | + <state relative-caret-position="136"> | |
1593 | + <caret line="8" column="53" lean-forward="true" selection-start-line="8" selection-start-column="53" selection-end-line="8" selection-end-column="53" /> | |
1201 | 1594 | <folding> |
1202 | - <element signature="e#0#9#0" expanded="true" /> | |
1595 | + <element signature="e#0#32#0" expanded="true" /> | |
1203 | 1596 | </folding> |
1204 | 1597 | </state> |
1205 | 1598 | </provider> | ... | ... |
src/alert_manager/tasks.py
1 | 1 | from __future__ import absolute_import |
2 | - | |
3 | -from celery.task import Task | |
4 | 2 | from common.RequestBuilder import RequestBuilder |
3 | +from celery.task import Task | |
5 | 4 | from alert_manager.StrategyBuilder import StrategyBuilder |
6 | - | |
5 | +from common.models import * | |
7 | 6 | from django.conf import settings |
8 | 7 | from django.templatetags.static import static |
9 | -import socket | |
10 | -from common.models import * | |
11 | - | |
8 | +import observation_manager | |
9 | +import majordome.TaskManager | |
12 | 10 | import time |
13 | 11 | import voeventparse |
14 | - | |
15 | 12 | import os |
16 | 13 | from os.path import isfile, join |
17 | -import observation_manager | |
18 | -import majordome.TaskManager | |
19 | 14 | from decimal import Decimal |
20 | 15 | |
21 | 16 | ... | ... |
src/common/RequestBuilder.py
... | ... | @@ -51,12 +51,12 @@ class RequestBuilder(): |
51 | 51 | :returns : The local ID of the new album |
52 | 52 | ''' |
53 | 53 | |
54 | - if not Detector.objects.filter(device__name=detector_name).exists(): | |
54 | + if not Detector.objects.filter(name=detector_name).exists(): | |
55 | 55 | raise RuntimeError("Detector %s doesn't exist" % (detector_name,)) |
56 | 56 | if seq_id not in self.sequences.keys(): |
57 | 57 | raise RuntimeError("The sequence %d doesn't exist" % (seq_id,)) |
58 | 58 | |
59 | - detector = Detector.objects.get(device__name=detector_name) | |
59 | + detector = Detector.objects.get(name=detector_name) | |
60 | 60 | |
61 | 61 | album = Album(name=name, detector=detector) |
62 | 62 | self.albums[self.album_id] = (album, seq_id) |
... | ... | @@ -76,12 +76,12 @@ class RequestBuilder(): |
76 | 76 | :returns : The local ID of the new plan |
77 | 77 | ''' |
78 | 78 | |
79 | - if not Filter.objects.filter(device__name=filter_name).exists(): | |
79 | + if not Filter.objects.filter(name=filter_name).exists(): | |
80 | 80 | raise RuntimeError("Filer %s doesn't exist" % (filter_name,)) |
81 | 81 | if album_id not in self.albums.keys(): |
82 | 82 | raise RuntimeError("The album %d doesn't exist" % (album_id,)) |
83 | 83 | |
84 | - filter_ = Filter.objects.get(device__name=filter_name) | |
84 | + filter_ = Filter.objects.get(name=filter_name) | |
85 | 85 | |
86 | 86 | duration = Decimal(float(duration) / 86400.0) |
87 | 87 | plan = Plan(name=name, filter=filter_, | ... | ... |
src/common/admin.py
... | ... | @@ -236,7 +236,6 @@ admin.site.register(Album, AlbumAdmin) |
236 | 236 | admin.site.register(Alert) |
237 | 237 | admin.site.register(Country, CountryAdmin) |
238 | 238 | admin.site.register(Detector, DetectorAdmin) |
239 | -admin.site.register(Device) | |
240 | 239 | admin.site.register(Filter, FilterAdmin) |
241 | 240 | admin.site.register(FilterWheel, FilterWheelAdmin) |
242 | 241 | admin.site.register(Image) | ... | ... |
src/common/models.py
... | ... | @@ -74,12 +74,28 @@ class Country(models.Model): |
74 | 74 | def __str__(self): |
75 | 75 | return (str(self.name)) |
76 | 76 | |
77 | +class Device(models.Model): | |
78 | + name = models.CharField(max_length=45, blank=True, null=True) | |
79 | + desc = models.TextField(blank=True, null=True) | |
80 | + created = models.DateTimeField(blank=True, null=True, auto_now_add=True) | |
81 | + updated = models.DateTimeField(blank=True, null=True, auto_now=True) | |
82 | + is_online = models.BooleanField(default=False) | |
83 | + status = models.CharField(max_length=11, blank=True, null=True) | |
84 | + maintenance_date = models.DateTimeField(blank=True, null=True) | |
85 | + | |
86 | + class Meta: | |
87 | + abstract = True | |
88 | + | |
89 | + def __str__(self): | |
90 | + return (str(self.name)) | |
91 | + | |
92 | + | |
93 | +class Detector(Device): | |
94 | + VIS = "Visible camera" | |
95 | + NIR = "Cagire" | |
77 | 96 | |
78 | -class Detector(models.Model): | |
79 | - device = models.OneToOneField('Device', on_delete=models.CASCADE) | |
80 | 97 | telescope = models.ForeignKey( |
81 | 98 | 'Telescope', models.DO_NOTHING, related_name="detectors") |
82 | - status = models.CharField(max_length=7, blank=True, null=True) | |
83 | 99 | nb_photo_x = models.IntegerField(blank=True, null=True) |
84 | 100 | nb_photo_y = models.IntegerField(blank=True, null=True) |
85 | 101 | photo_size_x = models.IntegerField(blank=True, null=True) |
... | ... | @@ -106,34 +122,12 @@ class Detector(models.Model): |
106 | 122 | device_name.short_description = "Name" |
107 | 123 | |
108 | 124 | |
109 | -class Device(models.Model): | |
110 | - | |
111 | - TELESCOPE = "Telescope" | |
112 | - VIS = "Visible camera" | |
113 | - NIR = "Cagire" | |
125 | +class Filter(Device): | |
114 | 126 | VIS_FILTER_1 = "First visible filter" |
115 | 127 | VIS_FILTER_2 = "Second visible filter" |
116 | 128 | NIR_FILTER_1 = "First infrared filter" |
117 | 129 | NIR_FILTER_2 = "Second infrared filter" |
118 | 130 | |
119 | - name = models.CharField(max_length=45, blank=True, null=True) | |
120 | - desc = models.TextField(blank=True, null=True) | |
121 | - created = models.DateTimeField(blank=True, null=True, auto_now_add=True) | |
122 | - updated = models.DateTimeField(blank=True, null=True, auto_now=True) | |
123 | - is_online = models.BooleanField(default=False) | |
124 | - status = models.CharField(max_length=11, blank=True, null=True) | |
125 | - maintenance_date = models.DateTimeField(blank=True, null=True) | |
126 | - | |
127 | - class Meta: | |
128 | - managed = True | |
129 | - db_table = 'device' | |
130 | - | |
131 | - def __str__(self): | |
132 | - return (str(self.name)) | |
133 | - | |
134 | - | |
135 | -class Filter(models.Model): | |
136 | - device = models.OneToOneField(Device, on_delete=models.CASCADE) | |
137 | 131 | filter_wheel = models.ForeignKey( |
138 | 132 | "FilterWheel", models.DO_NOTHING, related_name="filters", blank=True, null=True) |
139 | 133 | category = models.CharField(max_length=1, blank=True, null=True) |
... | ... | @@ -152,8 +146,7 @@ class Filter(models.Model): |
152 | 146 | device_name.short_description = "Name" |
153 | 147 | |
154 | 148 | |
155 | -class FilterWheel(models.Model): | |
156 | - device = models.OneToOneField(Device, on_delete=models.CASCADE) | |
149 | +class FilterWheel(Device): | |
157 | 150 | detector = models.OneToOneField(Detector, on_delete=models.CASCADE, related_name="filter_wheel", blank=True, null=True) |
158 | 151 | |
159 | 152 | class Meta: |
... | ... | @@ -513,11 +506,11 @@ class TaskId(models.Model): |
513 | 506 | return (str(self.task) + " - " + str(self.task_id)) |
514 | 507 | |
515 | 508 | |
516 | -class Telescope(models.Model): | |
517 | - device = models.OneToOneField(Device, models.CASCADE) | |
509 | +class Telescope(Device): | |
510 | + TELESCOPE = "Telescope" | |
511 | + | |
518 | 512 | mount_type = models.CharField(max_length=9, blank=True, null=True) |
519 | 513 | diameter = models.FloatField(blank=True, null=True) |
520 | - status = models.CharField(max_length=45, blank=True, null=True) | |
521 | 514 | latitude = models.FloatField(blank=True, null=True) |
522 | 515 | longitude = models.FloatField(blank=True, null=True) |
523 | 516 | sens = models.CharField(max_length=1, blank=True, null=True) | ... | ... |
src/common/tests.py
... | ... | @@ -27,16 +27,16 @@ class RequestBuilderTests(TestCase): |
27 | 27 | request_builder.start_new_request(self.pyusr, self.sp, False) |
28 | 28 | |
29 | 29 | seq1 = request_builder.add_sequence(1, 0, 10, name="seq1") |
30 | - alb11 = request_builder.add_album(seq1, Device.NIR, name="alb11") | |
30 | + alb11 = request_builder.add_album(seq1, Detector.NIR, name="alb11") | |
31 | 31 | request_builder.add_plan( |
32 | - alb11, Device.NIR_FILTER_1, 120, 5, name="plan111") | |
33 | - alb12 = request_builder.add_album(seq1, Device.VIS, name="alb12") | |
32 | + alb11, Filter.NIR_FILTER_1, 120, 5, name="plan111") | |
33 | + alb12 = request_builder.add_album(seq1, Detector.VIS, name="alb12") | |
34 | 34 | request_builder.add_plan( |
35 | - alb12, Device.VIS_FILTER_1, 180, 1, name="plan121") | |
35 | + alb12, Filter.VIS_FILTER_1, 180, 1, name="plan121") | |
36 | 36 | seq2 = request_builder.add_sequence(1, 0, 10, name="seq2") |
37 | - alb21 = request_builder.add_album(seq2, Device.NIR, name="alb21") | |
37 | + alb21 = request_builder.add_album(seq2, Detector.NIR, name="alb21") | |
38 | 38 | request_builder.add_plan( |
39 | - alb21, Device.NIR_FILTER_2, 60, 3, name="plan211") | |
39 | + alb21, Filter.NIR_FILTER_2, 60, 3, name="plan211") | |
40 | 40 | request_builder.validate_request() |
41 | 41 | |
42 | 42 | req = Request.objects.get() |
... | ... | @@ -75,7 +75,6 @@ class CountryTests(TestCase): |
75 | 75 | class DeviceTests(TestCase): |
76 | 76 | |
77 | 77 | def test_creation(self): |
78 | - device = Device.objects.create() | |
79 | 78 | countries = Country.objects.all() |
80 | 79 | self.assertEqual(countries.count(), 0, "perdu !") |
81 | 80 | |
... | ... | @@ -98,17 +97,13 @@ class RequestTests(TestCase): |
98 | 97 | seq1 = Sequence.objects.create( |
99 | 98 | name="seq1", request=req1) |
100 | 99 | |
101 | - dev_tel = Device.objects.create(name="telescope") | |
102 | - dev_det = Device.objects.create(name="detector") | |
103 | - tel = Telescope.objects.create(device=dev_tel) | |
104 | - det = Detector.objects.create(device=dev_det, telescope=tel) | |
100 | + tel = Telescope.objects.create(name="telescope") | |
101 | + det = Detector.objects.create(name="detector", telescope=tel) | |
105 | 102 | alb1 = Album.objects.create(name="alb1", sequence=seq1, detector=det) |
106 | 103 | |
107 | - dev_fw = Device.objects.create(name="fw") | |
108 | - fw = FilterWheel.objects.create(device=dev_fw) | |
104 | + fw = FilterWheel.objects.create(name="fw") | |
109 | 105 | |
110 | - dev_fil = Device.objects.create(name="filter") | |
111 | - fil = Filter.objects.create(device=dev_fil, filter_wheel=fw) | |
106 | + fil = Filter.objects.create(name="filter", filter_wheel=fw) | |
112 | 107 | plan1 = Plan.objects.create(name="plan1", album=alb1, filter=fil) |
113 | 108 | img1 = Image.objects.create(name="img1", plan=plan1) |
114 | 109 | img2 = Image.objects.create(name="img2", plan=plan1) | ... | ... |
src/dashboard/views.py
src/majordome/tasks.py
... | ... | @@ -2,12 +2,14 @@ from __future__ import absolute_import |
2 | 2 | |
3 | 3 | from celery.task import Task |
4 | 4 | import observation_manager |
5 | +import observation_manager.tasks | |
5 | 6 | from common.models import * |
6 | 7 | |
7 | 8 | from devices import Telescope as Tel |
8 | 9 | |
9 | 10 | import time |
10 | 11 | import scheduler |
12 | +import scheduler.tasks | |
11 | 13 | |
12 | 14 | from decimal import Decimal |
13 | 15 | |
... | ... | @@ -64,14 +66,14 @@ class execute_sequence(Task): |
64 | 66 | |
65 | 67 | plans_results = [] |
66 | 68 | |
67 | - if sequence.albums.filter(detector__device__name="Cagire").exists(): | |
68 | - for plan in sequence.albums.get(detector__device__name="Cagire").plans.all(): | |
69 | + if sequence.albums.filter(detector__name="Cagire").exists(): | |
70 | + for plan in sequence.albums.get(detector__name="Cagire").plans.all(): | |
69 | 71 | res = observation_manager.tasks.execute_plan_nir.apply_async((plan.id, countdown)) |
70 | 72 | TaskId.objects.create(task_id=res.id, task="execute_plan") |
71 | 73 | plans_results.append(res) |
72 | 74 | |
73 | - if sequence.albums.filter(detector__device__name="Visible camera").exists(): | |
74 | - for plan in sequence.albums.get(detector__device__name="Visible camera").plans.all(): | |
75 | + if sequence.albums.filter(detector__name="Visible camera").exists(): | |
76 | + for plan in sequence.albums.get(detector__name="Visible camera").plans.all(): | |
75 | 77 | res = observation_manager.tasks.execute_plan_vis.apply_async((plan.id, countdown)) |
76 | 78 | TaskId.objects.create(task_id=res.id, task="execute_plan") |
77 | 79 | plans_results.append(res) | ... | ... |
src/misc/fixtures/initial_fixture.json
... | ... | @@ -12,7 +12,6 @@ |
12 | 12 | "model": "common.detector", |
13 | 13 | "pk": 1, |
14 | 14 | "fields": { |
15 | - "device": 1, | |
16 | 15 | "telescope": 1, |
17 | 16 | "status": "", |
18 | 17 | "nb_photo_x": null, |
... | ... | @@ -27,16 +26,20 @@ |
27 | 26 | "gain": null, |
28 | 27 | "readout_noise": null, |
29 | 28 | "readout_time": null, |
30 | - "idcam_readout_mode": null | |
29 | + "idcam_readout_mode": null, | |
30 | + "name": "Cagire", | |
31 | + "desc": "", | |
32 | + "created": "2016-05-13T11:49:49Z", | |
33 | + "updated": "2016-05-13T11:49:49Z", | |
34 | + "is_online": false, | |
35 | + "maintenance_date": null | |
31 | 36 | } |
32 | 37 | }, |
33 | 38 | { |
34 | 39 | "model": "common.detector", |
35 | 40 | "pk": 2, |
36 | 41 | "fields": { |
37 | - "device": 7, | |
38 | 42 | "telescope": 1, |
39 | - "status": "", | |
40 | 43 | "nb_photo_x": null, |
41 | 44 | "nb_photo_y": null, |
42 | 45 | "photo_size_x": null, |
... | ... | @@ -49,26 +52,23 @@ |
49 | 52 | "gain": null, |
50 | 53 | "readout_noise": null, |
51 | 54 | "readout_time": null, |
52 | - "idcam_readout_mode": null | |
53 | - } | |
54 | -}, | |
55 | -{ | |
56 | - "model": "common.device", | |
57 | - "pk": 1, | |
58 | - "fields": { | |
59 | - "name": "Cagire", | |
55 | + "idcam_readout_mode": null, | |
56 | + "name": "Visible camera", | |
60 | 57 | "desc": "", |
61 | - "created": "2016-05-13T11:49:49Z", | |
62 | - "updated": "2016-05-13T11:49:49Z", | |
58 | + "created": "2016-05-13T11:50:17Z", | |
59 | + "updated": "2016-05-13T11:50:17Z", | |
63 | 60 | "is_online": false, |
64 | 61 | "status": "", |
65 | 62 | "maintenance_date": null |
66 | 63 | } |
67 | 64 | }, |
68 | 65 | { |
69 | - "model": "common.device", | |
70 | - "pk": 2, | |
66 | + "model": "common.filter", | |
67 | + "pk": 1, | |
71 | 68 | "fields": { |
69 | + "filter_wheel": 2, | |
70 | + "category": "", | |
71 | + "transmission_curve_doc": "", | |
72 | 72 | "name": "First infrared filter", |
73 | 73 | "desc": "", |
74 | 74 | "created": "2016-05-13T11:49:56Z", |
... | ... | @@ -79,22 +79,12 @@ |
79 | 79 | } |
80 | 80 | }, |
81 | 81 | { |
82 | - "model": "common.device", | |
83 | - "pk": 3, | |
84 | - "fields": { | |
85 | - "name": "First visible filter", | |
86 | - "desc": "", | |
87 | - "created": "2016-05-13T11:50:02Z", | |
88 | - "updated": "2016-05-13T11:50:02Z", | |
89 | - "is_online": false, | |
90 | - "status": "", | |
91 | - "maintenance_date": null | |
92 | - } | |
93 | -}, | |
94 | -{ | |
95 | - "model": "common.device", | |
96 | - "pk": 4, | |
82 | + "model": "common.filter", | |
83 | + "pk": 2, | |
97 | 84 | "fields": { |
85 | + "filter_wheel": 2, | |
86 | + "category": "", | |
87 | + "transmission_curve_doc": "", | |
98 | 88 | "name": "Second infrared filter", |
99 | 89 | "desc": "", |
100 | 90 | "created": "2016-05-13T11:50:07Z", |
... | ... | @@ -105,48 +95,42 @@ |
105 | 95 | } |
106 | 96 | }, |
107 | 97 | { |
108 | - "model": "common.device", | |
109 | - "pk": 5, | |
110 | - "fields": { | |
111 | - "name": "Second visible filter", | |
112 | - "desc": "", | |
113 | - "created": "2016-05-13T11:50:11Z", | |
114 | - "updated": "2016-05-13T11:50:11Z", | |
115 | - "is_online": false, | |
116 | - "status": "", | |
117 | - "maintenance_date": null | |
118 | - } | |
119 | -}, | |
120 | -{ | |
121 | - "model": "common.device", | |
122 | - "pk": 6, | |
98 | + "model": "common.filter", | |
99 | + "pk": 3, | |
123 | 100 | "fields": { |
124 | - "name": "Telescope", | |
101 | + "filter_wheel": 2, | |
102 | + "category": "", | |
103 | + "transmission_curve_doc": "", | |
104 | + "name": "First visible filter", | |
125 | 105 | "desc": "", |
126 | - "created": "2016-05-13T11:50:14Z", | |
127 | - "updated": "2016-05-13T11:50:14Z", | |
106 | + "created": "2016-05-13T11:50:02Z", | |
107 | + "updated": "2016-05-13T11:50:02Z", | |
128 | 108 | "is_online": false, |
129 | 109 | "status": "", |
130 | 110 | "maintenance_date": null |
131 | 111 | } |
132 | 112 | }, |
133 | 113 | { |
134 | - "model": "common.device", | |
135 | - "pk": 7, | |
114 | + "model": "common.filter", | |
115 | + "pk": 4, | |
136 | 116 | "fields": { |
137 | - "name": "Visible camera", | |
117 | + "filter_wheel": 2, | |
118 | + "category": "", | |
119 | + "transmission_curve_doc": "", | |
120 | + "name": "Second visible filter", | |
138 | 121 | "desc": "", |
139 | - "created": "2016-05-13T11:50:17Z", | |
140 | - "updated": "2016-05-13T11:50:17Z", | |
122 | + "created": "2016-05-13T11:50:11Z", | |
123 | + "updated": "2016-05-13T11:50:11Z", | |
141 | 124 | "is_online": false, |
142 | 125 | "status": "", |
143 | 126 | "maintenance_date": null |
144 | 127 | } |
145 | 128 | }, |
146 | 129 | { |
147 | - "model": "common.device", | |
148 | - "pk": 8, | |
130 | + "model": "common.filterwheel", | |
131 | + "pk": 1, | |
149 | 132 | "fields": { |
133 | + "detector": 1, | |
150 | 134 | "name": "Cagire FW", |
151 | 135 | "desc": "", |
152 | 136 | "created": "2016-06-28T13:28:28Z", |
... | ... | @@ -157,9 +141,10 @@ |
157 | 141 | } |
158 | 142 | }, |
159 | 143 | { |
160 | - "model": "common.device", | |
161 | - "pk": 9, | |
144 | + "model": "common.filterwheel", | |
145 | + "pk": 2, | |
162 | 146 | "fields": { |
147 | + "detector": 2, | |
163 | 148 | "name": "Visible Camera FW", |
164 | 149 | "desc": "", |
165 | 150 | "created": "2016-06-28T13:28:46Z", |
... | ... | @@ -170,62 +155,6 @@ |
170 | 155 | } |
171 | 156 | }, |
172 | 157 | { |
173 | - "model": "common.filter", | |
174 | - "pk": 1, | |
175 | - "fields": { | |
176 | - "device": 2, | |
177 | - "filter_wheel": 2, | |
178 | - "category": "", | |
179 | - "transmission_curve_doc": "" | |
180 | - } | |
181 | -}, | |
182 | -{ | |
183 | - "model": "common.filter", | |
184 | - "pk": 2, | |
185 | - "fields": { | |
186 | - "device": 4, | |
187 | - "filter_wheel": 2, | |
188 | - "category": "", | |
189 | - "transmission_curve_doc": "" | |
190 | - } | |
191 | -}, | |
192 | -{ | |
193 | - "model": "common.filter", | |
194 | - "pk": 3, | |
195 | - "fields": { | |
196 | - "device": 3, | |
197 | - "filter_wheel": 2, | |
198 | - "category": "", | |
199 | - "transmission_curve_doc": "" | |
200 | - } | |
201 | -}, | |
202 | -{ | |
203 | - "model": "common.filter", | |
204 | - "pk": 4, | |
205 | - "fields": { | |
206 | - "device": 5, | |
207 | - "filter_wheel": 2, | |
208 | - "category": "", | |
209 | - "transmission_curve_doc": "" | |
210 | - } | |
211 | -}, | |
212 | -{ | |
213 | - "model": "common.filterwheel", | |
214 | - "pk": 1, | |
215 | - "fields": { | |
216 | - "device": 8, | |
217 | - "detector": 1 | |
218 | - } | |
219 | -}, | |
220 | -{ | |
221 | - "model": "common.filterwheel", | |
222 | - "pk": 2, | |
223 | - "fields": { | |
224 | - "device": 9, | |
225 | - "detector": 2 | |
226 | - } | |
227 | -}, | |
228 | -{ | |
229 | 158 | "model": "common.scientificprogram", |
230 | 159 | "pk": 1, |
231 | 160 | "fields": { |
... | ... | @@ -272,7 +201,6 @@ |
272 | 201 | "model": "common.telescope", |
273 | 202 | "pk": 1, |
274 | 203 | "fields": { |
275 | - "device": 6, | |
276 | 204 | "mount_type": "", |
277 | 205 | "diameter": null, |
278 | 206 | "status": "", |
... | ... | @@ -292,7 +220,13 @@ |
292 | 220 | "lim_ha_set": null, |
293 | 221 | "address": "", |
294 | 222 | "night_elev_sun": null, |
295 | - "mpc_code": "" | |
223 | + "mpc_code": "", | |
224 | + "name": "Telescope", | |
225 | + "desc": "", | |
226 | + "created": "2016-05-13T11:50:14Z", | |
227 | + "updated": "2016-05-13T11:50:14Z", | |
228 | + "is_online": false, | |
229 | + "maintenance_date": null | |
296 | 230 | } |
297 | 231 | }, |
298 | 232 | { | ... | ... |
src/misc/fixtures/tests/alert_mgr_test.json
... | ... | @@ -12,9 +12,7 @@ |
12 | 12 | "model": "common.detector", |
13 | 13 | "pk": 1, |
14 | 14 | "fields": { |
15 | - "device": 1, | |
16 | 15 | "telescope": 1, |
17 | - "status": "", | |
18 | 16 | "nb_photo_x": null, |
19 | 17 | "nb_photo_y": null, |
20 | 18 | "photo_size_x": null, |
... | ... | @@ -27,16 +25,21 @@ |
27 | 25 | "gain": null, |
28 | 26 | "readout_noise": null, |
29 | 27 | "readout_time": null, |
30 | - "idcam_readout_mode": null | |
28 | + "idcam_readout_mode": null, | |
29 | + "name": "Cagire", | |
30 | + "desc": "", | |
31 | + "created": "2016-05-13T11:49:49.663Z", | |
32 | + "updated": "2016-05-13T11:49:49.664Z", | |
33 | + "is_online": false, | |
34 | + "status": "", | |
35 | + "maintenance_date": null | |
31 | 36 | } |
32 | 37 | }, |
33 | 38 | { |
34 | 39 | "model": "common.detector", |
35 | 40 | "pk": 2, |
36 | 41 | "fields": { |
37 | - "device": 7, | |
38 | 42 | "telescope": 1, |
39 | - "status": "", | |
40 | 43 | "nb_photo_x": null, |
41 | 44 | "nb_photo_y": null, |
42 | 45 | "photo_size_x": null, |
... | ... | @@ -49,91 +52,7 @@ |
49 | 52 | "gain": null, |
50 | 53 | "readout_noise": null, |
51 | 54 | "readout_time": null, |
52 | - "idcam_readout_mode": null | |
53 | - } | |
54 | -}, | |
55 | -{ | |
56 | - "model": "common.device", | |
57 | - "pk": 1, | |
58 | - "fields": { | |
59 | - "name": "Cagire", | |
60 | - "desc": "", | |
61 | - "created": "2016-05-13T11:49:49.663Z", | |
62 | - "updated": "2016-05-13T11:49:49.664Z", | |
63 | - "is_online": false, | |
64 | - "status": "", | |
65 | - "maintenance_date": null | |
66 | - } | |
67 | -}, | |
68 | -{ | |
69 | - "model": "common.device", | |
70 | - "pk": 2, | |
71 | - "fields": { | |
72 | - "name": "First infrared filter", | |
73 | - "desc": "", | |
74 | - "created": "2016-05-13T11:49:56.579Z", | |
75 | - "updated": "2016-05-13T11:49:56.579Z", | |
76 | - "is_online": false, | |
77 | - "status": "", | |
78 | - "maintenance_date": null | |
79 | - } | |
80 | -}, | |
81 | -{ | |
82 | - "model": "common.device", | |
83 | - "pk": 3, | |
84 | - "fields": { | |
85 | - "name": "First visible filter", | |
86 | - "desc": "", | |
87 | - "created": "2016-05-13T11:50:02.012Z", | |
88 | - "updated": "2016-05-13T11:50:02.013Z", | |
89 | - "is_online": false, | |
90 | - "status": "", | |
91 | - "maintenance_date": null | |
92 | - } | |
93 | -}, | |
94 | -{ | |
95 | - "model": "common.device", | |
96 | - "pk": 4, | |
97 | - "fields": { | |
98 | - "name": "Second infrared filter", | |
99 | - "desc": "", | |
100 | - "created": "2016-05-13T11:50:07.592Z", | |
101 | - "updated": "2016-05-13T11:50:07.592Z", | |
102 | - "is_online": false, | |
103 | - "status": "", | |
104 | - "maintenance_date": null | |
105 | - } | |
106 | -}, | |
107 | -{ | |
108 | - "model": "common.device", | |
109 | - "pk": 5, | |
110 | - "fields": { | |
111 | - "name": "Second visible filter", | |
112 | - "desc": "", | |
113 | - "created": "2016-05-13T11:50:11.226Z", | |
114 | - "updated": "2016-05-13T11:50:11.226Z", | |
115 | - "is_online": false, | |
116 | - "status": "", | |
117 | - "maintenance_date": null | |
118 | - } | |
119 | -}, | |
120 | -{ | |
121 | - "model": "common.device", | |
122 | - "pk": 6, | |
123 | - "fields": { | |
124 | - "name": "Telescope", | |
125 | - "desc": "", | |
126 | - "created": "2016-05-13T11:50:14.326Z", | |
127 | - "updated": "2016-05-13T11:50:14.326Z", | |
128 | - "is_online": false, | |
129 | - "status": "", | |
130 | - "maintenance_date": null | |
131 | - } | |
132 | -}, | |
133 | -{ | |
134 | - "model": "common.device", | |
135 | - "pk": 7, | |
136 | - "fields": { | |
55 | + "idcam_readout_mode": null, | |
137 | 56 | "name": "Visible camera", |
138 | 57 | "desc": "", |
139 | 58 | "created": "2016-05-13T11:50:17.644Z", |
... | ... | @@ -141,12 +60,13 @@ |
141 | 60 | "is_online": false, |
142 | 61 | "status": "", |
143 | 62 | "maintenance_date": null |
144 | - } | |
63 | + } | |
145 | 64 | }, |
146 | 65 | { |
147 | - "model": "common.device", | |
148 | - "pk": 8, | |
66 | + "model": "common.filterwheel", | |
67 | + "pk": 1, | |
149 | 68 | "fields": { |
69 | + "detector": 1, | |
150 | 70 | "name": "Cagire FW", |
151 | 71 | "desc": "", |
152 | 72 | "created": "2016-06-28T13:28:28.298Z", |
... | ... | @@ -157,9 +77,10 @@ |
157 | 77 | } |
158 | 78 | }, |
159 | 79 | { |
160 | - "model": "common.device", | |
161 | - "pk": 9, | |
80 | + "model": "common.filterwheel", | |
81 | + "pk": 2, | |
162 | 82 | "fields": { |
83 | + "detector": 2, | |
163 | 84 | "name": "Visible Camera FW", |
164 | 85 | "desc": "", |
165 | 86 | "created": "2016-06-28T13:28:46.887Z", |
... | ... | @@ -170,59 +91,67 @@ |
170 | 91 | } |
171 | 92 | }, |
172 | 93 | { |
173 | - "model": "common.filterwheel", | |
174 | - "pk": 1, | |
175 | - "fields": { | |
176 | - "device": 8, | |
177 | - "detector": 1 | |
178 | - } | |
179 | -}, | |
180 | -{ | |
181 | - "model": "common.filterwheel", | |
182 | - "pk": 2, | |
183 | - "fields": { | |
184 | - "device": 9, | |
185 | - "detector": 2 | |
186 | - } | |
187 | -}, | |
188 | -{ | |
189 | 94 | "model": "common.filter", |
190 | 95 | "pk": 1, |
191 | 96 | "fields": { |
192 | - "device": 2, | |
193 | 97 | "filter_wheel": 1, |
194 | 98 | "category": "", |
195 | - "transmission_curve_doc": "" | |
99 | + "transmission_curve_doc": "", | |
100 | + "name": "First infrared filter", | |
101 | + "desc": "", | |
102 | + "created": "2016-05-13T11:49:56.579Z", | |
103 | + "updated": "2016-05-13T11:49:56.579Z", | |
104 | + "is_online": false, | |
105 | + "status": "", | |
106 | + "maintenance_date": null | |
196 | 107 | } |
197 | 108 | }, |
198 | 109 | { |
199 | 110 | "model": "common.filter", |
200 | 111 | "pk": 2, |
201 | 112 | "fields": { |
202 | - "device": 4, | |
203 | 113 | "filter_wheel": 1, |
204 | 114 | "category": "", |
205 | - "transmission_curve_doc": "" | |
115 | + "transmission_curve_doc": "", | |
116 | + "name": "Second infrared filter", | |
117 | + "desc": "", | |
118 | + "created": "2016-05-13T11:50:07.592Z", | |
119 | + "updated": "2016-05-13T11:50:07.592Z", | |
120 | + "is_online": false, | |
121 | + "status": "", | |
122 | + "maintenance_date": null | |
206 | 123 | } |
207 | 124 | }, |
208 | 125 | { |
209 | 126 | "model": "common.filter", |
210 | 127 | "pk": 3, |
211 | 128 | "fields": { |
212 | - "device": 3, | |
213 | 129 | "filter_wheel": 2, |
214 | 130 | "category": "", |
215 | - "transmission_curve_doc": "" | |
131 | + "transmission_curve_doc": "", | |
132 | + "name": "First visible filter", | |
133 | + "desc": "", | |
134 | + "created": "2016-05-13T11:50:02.012Z", | |
135 | + "updated": "2016-05-13T11:50:02.013Z", | |
136 | + "is_online": false, | |
137 | + "status": "", | |
138 | + "maintenance_date": null | |
216 | 139 | } |
217 | 140 | }, |
218 | 141 | { |
219 | 142 | "model": "common.filter", |
220 | 143 | "pk": 4, |
221 | 144 | "fields": { |
222 | - "device": 5, | |
223 | 145 | "filter_wheel": 2, |
224 | 146 | "category": "", |
225 | - "transmission_curve_doc": "" | |
147 | + "transmission_curve_doc": "", | |
148 | + "name": "Second visible filter", | |
149 | + "desc": "", | |
150 | + "created": "2016-05-13T11:50:11.226Z", | |
151 | + "updated": "2016-05-13T11:50:11.226Z", | |
152 | + "is_online": false, | |
153 | + "status": "", | |
154 | + "maintenance_date": null | |
226 | 155 | } |
227 | 156 | }, |
228 | 157 | { |
... | ... | @@ -260,7 +189,6 @@ |
260 | 189 | "model": "common.telescope", |
261 | 190 | "pk": 1, |
262 | 191 | "fields": { |
263 | - "device": 6, | |
264 | 192 | "mount_type": "", |
265 | 193 | "diameter": null, |
266 | 194 | "status": "", |
... | ... | @@ -280,7 +208,13 @@ |
280 | 208 | "lim_ha_set": null, |
281 | 209 | "address": "", |
282 | 210 | "night_elev_sun": null, |
283 | - "mpc_code": "" | |
211 | + "mpc_code": "", | |
212 | + "name": "Telescope", | |
213 | + "desc": "", | |
214 | + "created": "2016-05-13T11:50:14.326Z", | |
215 | + "updated": "2016-05-13T11:50:14.326Z", | |
216 | + "is_online": false, | |
217 | + "maintenance_date": null | |
284 | 218 | } |
285 | 219 | }, |
286 | 220 | { | ... | ... |
src/misc/fixtures/tests/common_test.json
... | ... | @@ -12,7 +12,6 @@ |
12 | 12 | "model": "common.detector", |
13 | 13 | "pk": 1, |
14 | 14 | "fields": { |
15 | - "device": 1, | |
16 | 15 | "telescope": 1, |
17 | 16 | "status": "", |
18 | 17 | "nb_photo_x": null, |
... | ... | @@ -27,16 +26,20 @@ |
27 | 26 | "gain": null, |
28 | 27 | "readout_noise": null, |
29 | 28 | "readout_time": null, |
30 | - "idcam_readout_mode": null | |
29 | + "idcam_readout_mode": null, | |
30 | + "name": "Cagire", | |
31 | + "desc": "", | |
32 | + "created": "2016-05-13T11:49:49.663Z", | |
33 | + "updated": "2016-05-13T11:49:49.664Z", | |
34 | + "is_online": false, | |
35 | + "maintenance_date": null | |
31 | 36 | } |
32 | 37 | }, |
33 | 38 | { |
34 | 39 | "model": "common.detector", |
35 | 40 | "pk": 2, |
36 | 41 | "fields": { |
37 | - "device": 7, | |
38 | 42 | "telescope": 1, |
39 | - "status": "", | |
40 | 43 | "nb_photo_x": null, |
41 | 44 | "nb_photo_y": null, |
42 | 45 | "photo_size_x": null, |
... | ... | @@ -49,91 +52,7 @@ |
49 | 52 | "gain": null, |
50 | 53 | "readout_noise": null, |
51 | 54 | "readout_time": null, |
52 | - "idcam_readout_mode": null | |
53 | - } | |
54 | -}, | |
55 | -{ | |
56 | - "model": "common.device", | |
57 | - "pk": 1, | |
58 | - "fields": { | |
59 | - "name": "Cagire", | |
60 | - "desc": "", | |
61 | - "created": "2016-05-13T11:49:49.663Z", | |
62 | - "updated": "2016-05-13T11:49:49.664Z", | |
63 | - "is_online": false, | |
64 | - "status": "", | |
65 | - "maintenance_date": null | |
66 | - } | |
67 | -}, | |
68 | -{ | |
69 | - "model": "common.device", | |
70 | - "pk": 2, | |
71 | - "fields": { | |
72 | - "name": "First infrared filter", | |
73 | - "desc": "", | |
74 | - "created": "2016-05-13T11:49:56.579Z", | |
75 | - "updated": "2016-05-13T11:49:56.579Z", | |
76 | - "is_online": false, | |
77 | - "status": "", | |
78 | - "maintenance_date": null | |
79 | - } | |
80 | -}, | |
81 | -{ | |
82 | - "model": "common.device", | |
83 | - "pk": 3, | |
84 | - "fields": { | |
85 | - "name": "First visible filter", | |
86 | - "desc": "", | |
87 | - "created": "2016-05-13T11:50:02.012Z", | |
88 | - "updated": "2016-05-13T11:50:02.013Z", | |
89 | - "is_online": false, | |
90 | - "status": "", | |
91 | - "maintenance_date": null | |
92 | - } | |
93 | -}, | |
94 | -{ | |
95 | - "model": "common.device", | |
96 | - "pk": 4, | |
97 | - "fields": { | |
98 | - "name": "Second infrared filter", | |
99 | - "desc": "", | |
100 | - "created": "2016-05-13T11:50:07.592Z", | |
101 | - "updated": "2016-05-13T11:50:07.592Z", | |
102 | - "is_online": false, | |
103 | - "status": "", | |
104 | - "maintenance_date": null | |
105 | - } | |
106 | -}, | |
107 | -{ | |
108 | - "model": "common.device", | |
109 | - "pk": 5, | |
110 | - "fields": { | |
111 | - "name": "Second visible filter", | |
112 | - "desc": "", | |
113 | - "created": "2016-05-13T11:50:11.226Z", | |
114 | - "updated": "2016-05-13T11:50:11.226Z", | |
115 | - "is_online": false, | |
116 | - "status": "", | |
117 | - "maintenance_date": null | |
118 | - } | |
119 | -}, | |
120 | -{ | |
121 | - "model": "common.device", | |
122 | - "pk": 6, | |
123 | - "fields": { | |
124 | - "name": "Telescope", | |
125 | - "desc": "", | |
126 | - "created": "2016-05-13T11:50:14.326Z", | |
127 | - "updated": "2016-05-13T11:50:14.326Z", | |
128 | - "is_online": false, | |
129 | - "status": "", | |
130 | - "maintenance_date": null | |
131 | - } | |
132 | -}, | |
133 | -{ | |
134 | - "model": "common.device", | |
135 | - "pk": 7, | |
136 | - "fields": { | |
55 | + "idcam_readout_mode": null, | |
137 | 56 | "name": "Visible camera", |
138 | 57 | "desc": "", |
139 | 58 | "created": "2016-05-13T11:50:17.644Z", |
... | ... | @@ -144,8 +63,8 @@ |
144 | 63 | } |
145 | 64 | }, |
146 | 65 | { |
147 | - "model": "common.device", | |
148 | - "pk": 8, | |
66 | + "model": "common.filterwheel", | |
67 | + "pk": 1, | |
149 | 68 | "fields": { |
150 | 69 | "name": "Cagire FW", |
151 | 70 | "desc": "", |
... | ... | @@ -153,13 +72,15 @@ |
153 | 72 | "updated": "2016-06-28T13:28:28.298Z", |
154 | 73 | "is_online": false, |
155 | 74 | "status": "", |
156 | - "maintenance_date": null | |
75 | + "maintenance_date": null, | |
76 | + "detector": 1 | |
157 | 77 | } |
158 | 78 | }, |
159 | 79 | { |
160 | - "model": "common.device", | |
161 | - "pk": 9, | |
80 | + "model": "common.filterwheel", | |
81 | + "pk": 2, | |
162 | 82 | "fields": { |
83 | + "detector": 2, | |
163 | 84 | "name": "Visible Camera FW", |
164 | 85 | "desc": "", |
165 | 86 | "created": "2016-06-28T13:28:46.887Z", |
... | ... | @@ -170,59 +91,67 @@ |
170 | 91 | } |
171 | 92 | }, |
172 | 93 | { |
173 | - "model": "common.filterwheel", | |
174 | - "pk": 1, | |
175 | - "fields": { | |
176 | - "device": 8, | |
177 | - "detector": 1 | |
178 | - } | |
179 | -}, | |
180 | -{ | |
181 | - "model": "common.filterwheel", | |
182 | - "pk": 2, | |
183 | - "fields": { | |
184 | - "device": 9, | |
185 | - "detector": 2 | |
186 | - } | |
187 | -}, | |
188 | -{ | |
189 | 94 | "model": "common.filter", |
190 | 95 | "pk": 1, |
191 | 96 | "fields": { |
192 | - "device": 2, | |
193 | 97 | "filter_wheel": 1, |
194 | 98 | "category": "", |
195 | - "transmission_curve_doc": "" | |
99 | + "transmission_curve_doc": "", | |
100 | + "name": "First infrared filter", | |
101 | + "desc": "", | |
102 | + "created": "2016-05-13T11:49:56.579Z", | |
103 | + "updated": "2016-05-13T11:49:56.579Z", | |
104 | + "is_online": false, | |
105 | + "status": "", | |
106 | + "maintenance_date": null | |
196 | 107 | } |
197 | 108 | }, |
198 | 109 | { |
199 | 110 | "model": "common.filter", |
200 | 111 | "pk": 2, |
201 | 112 | "fields": { |
202 | - "device": 4, | |
203 | 113 | "filter_wheel": 1, |
204 | 114 | "category": "", |
205 | - "transmission_curve_doc": "" | |
115 | + "transmission_curve_doc": "", | |
116 | + "name": "Second infrared filter", | |
117 | + "desc": "", | |
118 | + "created": "2016-05-13T11:50:07.592Z", | |
119 | + "updated": "2016-05-13T11:50:07.592Z", | |
120 | + "is_online": false, | |
121 | + "status": "", | |
122 | + "maintenance_date": null | |
206 | 123 | } |
207 | 124 | }, |
208 | 125 | { |
209 | 126 | "model": "common.filter", |
210 | 127 | "pk": 3, |
211 | 128 | "fields": { |
212 | - "device": 3, | |
213 | 129 | "filter_wheel": 2, |
214 | 130 | "category": "", |
215 | - "transmission_curve_doc": "" | |
131 | + "transmission_curve_doc": "", | |
132 | + "name": "First visible filter", | |
133 | + "desc": "", | |
134 | + "created": "2016-05-13T11:50:02.012Z", | |
135 | + "updated": "2016-05-13T11:50:02.013Z", | |
136 | + "is_online": false, | |
137 | + "status": "", | |
138 | + "maintenance_date": null | |
216 | 139 | } |
217 | 140 | }, |
218 | 141 | { |
219 | 142 | "model": "common.filter", |
220 | 143 | "pk": 4, |
221 | 144 | "fields": { |
222 | - "device": 5, | |
223 | 145 | "filter_wheel": 2, |
224 | 146 | "category": "", |
225 | - "transmission_curve_doc": "" | |
147 | + "transmission_curve_doc": "", | |
148 | + "name": "Second visible filter", | |
149 | + "desc": "", | |
150 | + "created": "2016-05-13T11:50:11.226Z", | |
151 | + "updated": "2016-05-13T11:50:11.226Z", | |
152 | + "is_online": false, | |
153 | + "status": "", | |
154 | + "maintenance_date": null | |
226 | 155 | } |
227 | 156 | }, |
228 | 157 | { |
... | ... | @@ -260,7 +189,6 @@ |
260 | 189 | "model": "common.telescope", |
261 | 190 | "pk": 1, |
262 | 191 | "fields": { |
263 | - "device": 6, | |
264 | 192 | "mount_type": "", |
265 | 193 | "diameter": null, |
266 | 194 | "status": "", |
... | ... | @@ -280,7 +208,13 @@ |
280 | 208 | "lim_ha_set": null, |
281 | 209 | "address": "", |
282 | 210 | "night_elev_sun": null, |
283 | - "mpc_code": "" | |
211 | + "mpc_code": "", | |
212 | + "name": "Telescope", | |
213 | + "desc": "", | |
214 | + "created": "2016-05-13T11:50:14.326Z", | |
215 | + "updated": "2016-05-13T11:50:14.326Z", | |
216 | + "is_online": false, | |
217 | + "maintenance_date": null | |
284 | 218 | } |
285 | 219 | }, |
286 | 220 | { | ... | ... |
src/misc/fixtures/tests/routine_mgr_test.json
... | ... | @@ -12,7 +12,12 @@ |
12 | 12 | "model": "common.detector", |
13 | 13 | "pk": 1, |
14 | 14 | "fields": { |
15 | - "device": 1, | |
15 | + "name": "Cagire", | |
16 | + "desc": "", | |
17 | + "created": "2016-05-13T11:49:49.663Z", | |
18 | + "updated": "2016-05-13T11:49:49.664Z", | |
19 | + "is_online": false, | |
20 | + "maintenance_date": null, | |
16 | 21 | "telescope": 1, |
17 | 22 | "status": "", |
18 | 23 | "nb_photo_x": null, |
... | ... | @@ -34,7 +39,12 @@ |
34 | 39 | "model": "common.detector", |
35 | 40 | "pk": 2, |
36 | 41 | "fields": { |
37 | - "device": 7, | |
42 | + "name": "Visible camera", | |
43 | + "desc": "", | |
44 | + "created": "2016-05-13T11:50:17.644Z", | |
45 | + "updated": "2016-05-13T11:50:17.644Z", | |
46 | + "is_online": false, | |
47 | + "maintenance_date": null, | |
38 | 48 | "telescope": 1, |
39 | 49 | "status": "", |
40 | 50 | "nb_photo_x": null, |
... | ... | @@ -53,112 +63,22 @@ |
53 | 63 | } |
54 | 64 | }, |
55 | 65 | { |
56 | - "model": "common.device", | |
66 | + "model": "common.filterwheel", | |
57 | 67 | "pk": 1, |
58 | 68 | "fields": { |
59 | - "name": "Cagire", | |
60 | - "desc": "", | |
61 | - "created": "2016-05-13T11:49:49.663Z", | |
62 | - "updated": "2016-05-13T11:49:49.664Z", | |
63 | - "is_online": false, | |
64 | - "status": "", | |
65 | - "maintenance_date": null | |
66 | - } | |
67 | -}, | |
68 | -{ | |
69 | - "model": "common.device", | |
70 | - "pk": 2, | |
71 | - "fields": { | |
72 | - "name": "First infrared filter", | |
73 | - "desc": "", | |
74 | - "created": "2016-05-13T11:49:56.579Z", | |
75 | - "updated": "2016-05-13T11:49:56.579Z", | |
76 | - "is_online": false, | |
77 | - "status": "", | |
78 | - "maintenance_date": null | |
79 | - } | |
80 | -}, | |
81 | -{ | |
82 | - "model": "common.device", | |
83 | - "pk": 3, | |
84 | - "fields": { | |
85 | - "name": "First visible filter", | |
86 | - "desc": "", | |
87 | - "created": "2016-05-13T11:50:02.012Z", | |
88 | - "updated": "2016-05-13T11:50:02.013Z", | |
89 | - "is_online": false, | |
90 | - "status": "", | |
91 | - "maintenance_date": null | |
92 | - } | |
93 | -}, | |
94 | -{ | |
95 | - "model": "common.device", | |
96 | - "pk": 4, | |
97 | - "fields": { | |
98 | - "name": "Second infrared filter", | |
99 | - "desc": "", | |
100 | - "created": "2016-05-13T11:50:07.592Z", | |
101 | - "updated": "2016-05-13T11:50:07.592Z", | |
102 | - "is_online": false, | |
103 | - "status": "", | |
104 | - "maintenance_date": null | |
105 | - } | |
106 | -}, | |
107 | -{ | |
108 | - "model": "common.device", | |
109 | - "pk": 5, | |
110 | - "fields": { | |
111 | - "name": "Second visible filter", | |
112 | - "desc": "", | |
113 | - "created": "2016-05-13T11:50:11.226Z", | |
114 | - "updated": "2016-05-13T11:50:11.226Z", | |
115 | - "is_online": false, | |
116 | - "status": "", | |
117 | - "maintenance_date": null | |
118 | - } | |
119 | -}, | |
120 | -{ | |
121 | - "model": "common.device", | |
122 | - "pk": 6, | |
123 | - "fields": { | |
124 | - "name": "Telescope", | |
125 | - "desc": "", | |
126 | - "created": "2016-05-13T11:50:14.326Z", | |
127 | - "updated": "2016-05-13T11:50:14.326Z", | |
128 | - "is_online": false, | |
129 | - "status": "", | |
130 | - "maintenance_date": null | |
131 | - } | |
132 | -}, | |
133 | -{ | |
134 | - "model": "common.device", | |
135 | - "pk": 7, | |
136 | - "fields": { | |
137 | - "name": "Visible camera", | |
138 | - "desc": "", | |
139 | - "created": "2016-05-13T11:50:17.644Z", | |
140 | - "updated": "2016-05-13T11:50:17.644Z", | |
141 | - "is_online": false, | |
142 | - "status": "", | |
143 | - "maintenance_date": null | |
144 | - } | |
145 | -}, | |
146 | -{ | |
147 | - "model": "common.device", | |
148 | - "pk": 8, | |
149 | - "fields": { | |
150 | 69 | "name": "Cagire FW", |
151 | 70 | "desc": "", |
152 | 71 | "created": "2016-06-28T13:28:28.298Z", |
153 | 72 | "updated": "2016-06-28T13:28:28.298Z", |
154 | 73 | "is_online": false, |
155 | 74 | "status": "", |
156 | - "maintenance_date": null | |
75 | + "maintenance_date": null, | |
76 | + "detector": 1 | |
157 | 77 | } |
158 | 78 | }, |
159 | 79 | { |
160 | - "model": "common.device", | |
161 | - "pk": 9, | |
80 | + "model": "common.filterwheel", | |
81 | + "pk": 2, | |
162 | 82 | "fields": { |
163 | 83 | "name": "Visible Camera FW", |
164 | 84 | "desc": "", |
... | ... | @@ -166,22 +86,7 @@ |
166 | 86 | "updated": "2016-06-28T13:28:46.887Z", |
167 | 87 | "is_online": false, |
168 | 88 | "status": "", |
169 | - "maintenance_date": null | |
170 | - } | |
171 | -}, | |
172 | -{ | |
173 | - "model": "common.filterwheel", | |
174 | - "pk": 1, | |
175 | - "fields": { | |
176 | - "device": 8, | |
177 | - "detector": 1 | |
178 | - } | |
179 | -}, | |
180 | -{ | |
181 | - "model": "common.filterwheel", | |
182 | - "pk": 2, | |
183 | - "fields": { | |
184 | - "device": 9, | |
89 | + "maintenance_date": null, | |
185 | 90 | "detector": 2 |
186 | 91 | } |
187 | 92 | }, |
... | ... | @@ -189,7 +94,13 @@ |
189 | 94 | "model": "common.filter", |
190 | 95 | "pk": 1, |
191 | 96 | "fields": { |
192 | - "device": 2, | |
97 | + "name": "First infrared filter", | |
98 | + "desc": "", | |
99 | + "created": "2016-05-13T11:49:56.579Z", | |
100 | + "updated": "2016-05-13T11:49:56.579Z", | |
101 | + "is_online": false, | |
102 | + "status": "", | |
103 | + "maintenance_date": null, | |
193 | 104 | "filter_wheel": 1, |
194 | 105 | "category": "", |
195 | 106 | "transmission_curve_doc": "" |
... | ... | @@ -199,30 +110,48 @@ |
199 | 110 | "model": "common.filter", |
200 | 111 | "pk": 2, |
201 | 112 | "fields": { |
202 | - "device": 4, | |
203 | 113 | "filter_wheel": 1, |
204 | 114 | "category": "", |
205 | - "transmission_curve_doc": "" | |
115 | + "transmission_curve_doc": "", | |
116 | + "name": "Second infrared filter", | |
117 | + "desc": "", | |
118 | + "created": "2016-05-13T11:50:07.592Z", | |
119 | + "updated": "2016-05-13T11:50:07.592Z", | |
120 | + "is_online": false, | |
121 | + "status": "", | |
122 | + "maintenance_date": null | |
206 | 123 | } |
207 | 124 | }, |
208 | 125 | { |
209 | 126 | "model": "common.filter", |
210 | 127 | "pk": 3, |
211 | 128 | "fields": { |
212 | - "device": 3, | |
213 | 129 | "filter_wheel": 2, |
214 | 130 | "category": "", |
215 | - "transmission_curve_doc": "" | |
131 | + "transmission_curve_doc": "", | |
132 | + "name": "First visible filter", | |
133 | + "desc": "", | |
134 | + "created": "2016-05-13T11:50:02.012Z", | |
135 | + "updated": "2016-05-13T11:50:02.013Z", | |
136 | + "is_online": false, | |
137 | + "status": "", | |
138 | + "maintenance_date": null | |
216 | 139 | } |
217 | 140 | }, |
218 | 141 | { |
219 | 142 | "model": "common.filter", |
220 | 143 | "pk": 4, |
221 | 144 | "fields": { |
222 | - "device": 5, | |
223 | 145 | "filter_wheel": 2, |
224 | 146 | "category": "", |
225 | - "transmission_curve_doc": "" | |
147 | + "transmission_curve_doc": "", | |
148 | + "name": "Second visible filter", | |
149 | + "desc": "", | |
150 | + "created": "2016-05-13T11:50:11.226Z", | |
151 | + "updated": "2016-05-13T11:50:11.226Z", | |
152 | + "is_online": false, | |
153 | + "status": "", | |
154 | + "maintenance_date": null | |
226 | 155 | } |
227 | 156 | }, |
228 | 157 | { |
... | ... | @@ -260,7 +189,12 @@ |
260 | 189 | "model": "common.telescope", |
261 | 190 | "pk": 1, |
262 | 191 | "fields": { |
263 | - "device": 6, | |
192 | + "name": "Telescope", | |
193 | + "desc": "", | |
194 | + "created": "2016-05-13T11:50:14.326Z", | |
195 | + "updated": "2016-05-13T11:50:14.326Z", | |
196 | + "is_online": false, | |
197 | + "maintenance_date": null, | |
264 | 198 | "mount_type": "", |
265 | 199 | "diameter": null, |
266 | 200 | "status": "", | ... | ... |
src/pyros/__init__.pyc
No preview for this file type
src/routine_manager/RequestSerializer.py
... | ... | @@ -44,9 +44,9 @@ class RequestSerializer(): |
44 | 44 | jd1=str(seq.jd1), jd2=str(seq.jd2)) |
45 | 45 | sequence.set("duration", str(seq.duration * 86400)) |
46 | 46 | for alb in seq.albums.all(): |
47 | - album = ET.SubElement(sequence, "album", name=alb.name, detector=alb.detector.device.name) | |
47 | + album = ET.SubElement(sequence, "album", name=alb.name, detector=alb.detector.name) | |
48 | 48 | for plan in alb.plans.all(): |
49 | - pl = ET.SubElement(album, "plan", name=plan.name, filter=plan.filter.device.name, nb_images=str(plan.nb_images)) | |
49 | + pl = ET.SubElement(album, "plan", name=plan.name, filter=plan.filter.name, nb_images=str(plan.nb_images)) | |
50 | 50 | pl.set("duration", str(plan.duration * 86400)) |
51 | 51 | |
52 | 52 | with open(file_name, "w") as file: |
... | ... | @@ -185,7 +185,7 @@ class RequestSerializer(): |
185 | 185 | return "Unknown attribute %s in album" % (name,) |
186 | 186 | if name == "detector": |
187 | 187 | try: |
188 | - detector = Detector.objects.get(device__name=value) | |
188 | + detector = Detector.objects.get(name=value) | |
189 | 189 | alb.detector = detector |
190 | 190 | except Exception as E: |
191 | 191 | print(str(E)) |
... | ... | @@ -214,7 +214,7 @@ class RequestSerializer(): |
214 | 214 | return "Unknown attribute %s in plan" % (name,) |
215 | 215 | if name == "filter": |
216 | 216 | try: |
217 | - filter = Filter.objects.get(device__name=value) | |
217 | + filter = Filter.objects.get(name=value) | |
218 | 218 | pl.filter = filter |
219 | 219 | except Exception as E: |
220 | 220 | return "Invalid filter %s" % (value,) | ... | ... |
src/scheduler/tasks.py