Commit 53787d300e62ad50834c4a94b6a31fcf670fd7ea
1 parent
abfb02e2
Exists in
master
and in
1 other branch
Alert now inherit from request / PyrosUser is now the defualt AUTH_USER_MODEL
Showing
18 changed files
with
299 additions
and
442 deletions
Show diff stats
.idea/workspace.xml
... | ... | @@ -3,20 +3,23 @@ |
3 | 3 | <component name="ChangeListManager"> |
4 | 4 | <list default="true" id="a32987d6-1295-46a1-bf9a-f01b2781e22f" name="Default" comment=""> |
5 | 5 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> |
6 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" /> | |
6 | 7 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/alert_manager/tasks.py" afterPath="$PROJECT_DIR$/src/alert_manager/tasks.py" /> |
8 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/alert_manager/tests.py" afterPath="$PROJECT_DIR$/src/alert_manager/tests.py" /> | |
9 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/alert_manager/views.py" afterPath="$PROJECT_DIR$/src/alert_manager/views.py" /> | |
7 | 10 | <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 | 11 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/common/models.py" afterPath="$PROJECT_DIR$/src/common/models.py" /> |
10 | 12 | <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 | 13 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/misc/fixtures/initial_fixture.json" afterPath="$PROJECT_DIR$/src/misc/fixtures/initial_fixture.json" /> |
14 | 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 | 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 | 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 | 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" /> | |
18 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/routine_manager/views.py" afterPath="$PROJECT_DIR$/src/routine_manager/views.py" /> | |
19 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/scheduler/simulator.py" afterPath="$PROJECT_DIR$/src/scheduler/simulator.py" /> | |
20 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/scheduler/tests.py" afterPath="$PROJECT_DIR$/src/scheduler/tests.py" /> | |
21 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/user_manager/forms.py" afterPath="$PROJECT_DIR$/src/user_manager/forms.py" /> | |
22 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/user_manager/tests.py" afterPath="$PROJECT_DIR$/src/user_manager/tests.py" /> | |
20 | 23 | </list> |
21 | 24 | <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> |
22 | 25 | <option name="TRACKING_ENABLED" value="true" /> |
... | ... | @@ -487,12 +490,12 @@ |
487 | 490 | </favorites_list> |
488 | 491 | </component> |
489 | 492 | <component name="FileEditorManager"> |
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"> | |
493 | + <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> | |
494 | + <file leaf-file-name="tests.py" pinned="false" current-in-tab="false"> | |
495 | + <entry file="file://$PROJECT_DIR$/src/routine_manager/tests.py"> | |
493 | 496 | <provider selected="true" editor-type-id="text-editor"> |
494 | - <state relative-caret-position="170"> | |
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" /> | |
497 | + <state relative-caret-position="272"> | |
498 | + <caret line="16" column="9" lean-forward="false" selection-start-line="16" selection-start-column="0" selection-end-line="17" selection-end-column="0" /> | |
496 | 499 | <folding> |
497 | 500 | <element signature="e#0#32#0" expanded="true" /> |
498 | 501 | </folding> |
... | ... | @@ -500,37 +503,33 @@ |
500 | 503 | </provider> |
501 | 504 | </entry> |
502 | 505 | </file> |
503 | - <file leaf-file-name="tasks.py" pinned="false" current-in-tab="false"> | |
504 | - <entry file="file://$PROJECT_DIR$/src/majordome/tasks.py"> | |
506 | + <file leaf-file-name="urls.py" pinned="false" current-in-tab="false"> | |
507 | + <entry file="file://$PROJECT_DIR$/src/routine_manager/urls.py"> | |
505 | 508 | <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> | |
509 | + <state relative-caret-position="0"> | |
510 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
511 | + <folding /> | |
511 | 512 | </state> |
512 | 513 | </provider> |
513 | 514 | </entry> |
514 | 515 | </file> |
515 | - <file leaf-file-name="urls.py" pinned="false" current-in-tab="true"> | |
516 | - <entry file="file://$PROJECT_DIR$/src/dashboard/urls.py"> | |
516 | + <file leaf-file-name="views.py" pinned="false" current-in-tab="true"> | |
517 | + <entry file="file://$PROJECT_DIR$/src/routine_manager/views.py"> | |
517 | 518 | <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> | |
519 | + <state relative-caret-position="354"> | |
520 | + <caret line="43" column="0" lean-forward="true" selection-start-line="43" selection-start-column="0" selection-end-line="43" selection-end-column="0" /> | |
521 | + <folding /> | |
523 | 522 | </state> |
524 | 523 | </provider> |
525 | 524 | </entry> |
526 | 525 | </file> |
527 | - <file leaf-file-name="views.py" pinned="false" current-in-tab="false"> | |
528 | - <entry file="file://$PROJECT_DIR$/src/dashboard/views.py"> | |
526 | + <file leaf-file-name="tasks.py" pinned="false" current-in-tab="false"> | |
527 | + <entry file="file://$PROJECT_DIR$/src/alert_manager/tasks.py"> | |
529 | 528 | <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" /> | |
529 | + <state relative-caret-position="337"> | |
530 | + <caret line="98" column="56" lean-forward="true" selection-start-line="98" selection-start-column="56" selection-end-line="98" selection-end-column="56" /> | |
532 | 531 | <folding> |
533 | - <element signature="e#0#45#0" expanded="true" /> | |
532 | + <element signature="e#0#38#0" expanded="true" /> | |
534 | 533 | </folding> |
535 | 534 | </state> |
536 | 535 | </provider> |
... | ... | @@ -562,6 +561,17 @@ |
562 | 561 | <find>tasks</find> |
563 | 562 | <find>Device</find> |
564 | 563 | <find>device</find> |
564 | + <find>Alert</find> | |
565 | + <find>alert</find> | |
566 | + <find>Requ</find> | |
567 | + <find>Request</find> | |
568 | + <find>AUTH_USER</find> | |
569 | + <find>Read in DB</find> | |
570 | + <find>user</find> | |
571 | + <find>PyrosUser</find> | |
572 | + <find>import</find> | |
573 | + <find>User</find> | |
574 | + <find>.pyros_user</find> | |
565 | 575 | </findStrings> |
566 | 576 | </component> |
567 | 577 | <component name="Git.Settings"> |
... | ... | @@ -575,24 +585,31 @@ |
575 | 585 | <option value="$PROJECT_DIR$/simulators/plc/PLC.py" /> |
576 | 586 | <option value="$PROJECT_DIR$/simulators/plc/PLCsomulato.py" /> |
577 | 587 | <option value="$PROJECT_DIR$/simulators/plc/PLCsimulator.py" /> |
578 | - <option value="$PROJECT_DIR$/src/alert_manager/tests.py" /> | |
579 | 588 | <option value="$PROJECT_DIR$/simulators/user/USERsimulator.py" /> |
580 | 589 | <option value="$PROJECT_DIR$/simulators/config/user/conf.json" /> |
581 | 590 | <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 | 591 | <option value="$PROJECT_DIR$/src/routine_manager/RequestSerializer.py" /> |
590 | 592 | <option value="$PROJECT_DIR$/src/scheduler/tasks.py" /> |
591 | 593 | <option value="$PROJECT_DIR$/src/common/admin.py" /> |
592 | 594 | <option value="$PROJECT_DIR$/src/majordome/tasks.py" /> |
593 | - <option value="$PROJECT_DIR$/src/alert_manager/tasks.py" /> | |
594 | 595 | <option value="$PROJECT_DIR$/src/dashboard/views.py" /> |
595 | 596 | <option value="$PROJECT_DIR$/src/dashboard/urls.py" /> |
597 | + <option value="$PROJECT_DIR$/src/alert_manager/tests.py" /> | |
598 | + <option value="$PROJECT_DIR$/src/alert_manager/views.py" /> | |
599 | + <option value="$PROJECT_DIR$/src/pyros/settings.py" /> | |
600 | + <option value="$PROJECT_DIR$/src/misc/fixtures/initial_fixture.json" /> | |
601 | + <option value="$PROJECT_DIR$/src/scheduler/simulator.py" /> | |
602 | + <option value="$PROJECT_DIR$/src/user_manager/forms.py" /> | |
603 | + <option value="$PROJECT_DIR$/src/user_manager/tests.py" /> | |
604 | + <option value="$PROJECT_DIR$/src/common/RequestBuilder.py" /> | |
605 | + <option value="$PROJECT_DIR$/src/common/tests.py" /> | |
606 | + <option value="$PROJECT_DIR$/src/misc/fixtures/tests/alert_mgr_test.json" /> | |
607 | + <option value="$PROJECT_DIR$/src/misc/fixtures/tests/common_test.json" /> | |
608 | + <option value="$PROJECT_DIR$/src/misc/fixtures/tests/routine_mgr_test.json" /> | |
609 | + <option value="$PROJECT_DIR$/src/common/models.py" /> | |
610 | + <option value="$PROJECT_DIR$/src/scheduler/tests.py" /> | |
611 | + <option value="$PROJECT_DIR$/src/alert_manager/tasks.py" /> | |
612 | + <option value="$PROJECT_DIR$/src/routine_manager/views.py" /> | |
596 | 613 | </list> |
597 | 614 | </option> |
598 | 615 | </component> |
... | ... | @@ -625,6 +642,7 @@ |
625 | 642 | <foldersAlwaysOnTop value="true" /> |
626 | 643 | </navigator> |
627 | 644 | <panes> |
645 | + <pane id="Scratches" /> | |
628 | 646 | <pane id="ProjectPane"> |
629 | 647 | <subPane> |
630 | 648 | <PATH> |
... | ... | @@ -665,24 +683,6 @@ |
665 | 683 | <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> |
666 | 684 | </PATH_ELEMENT> |
667 | 685 | <PATH_ELEMENT> |
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 | 686 | <option name="myItemId" value="routine_manager" /> |
687 | 687 | <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> |
688 | 688 | </PATH_ELEMENT> |
... | ... | @@ -701,43 +701,7 @@ |
701 | 701 | <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> |
702 | 702 | </PATH_ELEMENT> |
703 | 703 | <PATH_ELEMENT> |
704 | - <option name="myItemId" value="pyros" /> | |
705 | - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> | |
706 | - </PATH_ELEMENT> | |
707 | - </PATH> | |
708 | - <PATH> | |
709 | - <PATH_ELEMENT> | |
710 | - <option name="myItemId" value="PYROS" /> | |
711 | - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> | |
712 | - </PATH_ELEMENT> | |
713 | - <PATH_ELEMENT> | |
714 | - <option name="myItemId" value="PYROS" /> | |
715 | - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> | |
716 | - </PATH_ELEMENT> | |
717 | - <PATH_ELEMENT> | |
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" /> | |
704 | + <option name="myItemId" value="common" /> | |
741 | 705 | <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> |
742 | 706 | </PATH_ELEMENT> |
743 | 707 | </PATH> |
... | ... | @@ -762,7 +726,6 @@ |
762 | 726 | </subPane> |
763 | 727 | </pane> |
764 | 728 | <pane id="Scope" /> |
765 | - <pane id="Scratches" /> | |
766 | 729 | </panes> |
767 | 730 | </component> |
768 | 731 | <component name="PropertiesComponent"> |
... | ... | @@ -1161,55 +1124,42 @@ |
1161 | 1124 | <watches-manager /> |
1162 | 1125 | </component> |
1163 | 1126 | <component name="editorHistoryManager"> |
1164 | - <entry file="file://$PROJECT_DIR$/src/majordome/__init__.py"> | |
1127 | + <entry file="file://$PROJECT_DIR$/src/analyzer/tests.py"> | |
1165 | 1128 | <provider selected="true" editor-type-id="text-editor"> |
1166 | 1129 | <state relative-caret-position="0"> |
1167 | 1130 | <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 | 1131 | </state> |
1178 | 1132 | </provider> |
1179 | 1133 | </entry> |
1180 | - <entry file="file://$PROJECT_DIR$/src/alert_manager/__init__.py"> | |
1134 | + <entry file="file://$PROJECT_DIR$/src/analyzer/views.py"> | |
1181 | 1135 | <provider selected="true" editor-type-id="text-editor"> |
1182 | 1136 | <state relative-caret-position="0"> |
1183 | 1137 | <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 /> | |
1185 | 1138 | </state> |
1186 | 1139 | </provider> |
1187 | 1140 | </entry> |
1188 | - <entry file="file://$PROJECT_DIR$/src/alert_manager/admin.py"> | |
1141 | + <entry file="file://$PROJECT_DIR$/src/common/apps.py"> | |
1189 | 1142 | <provider selected="true" editor-type-id="text-editor"> |
1190 | 1143 | <state relative-caret-position="0"> |
1191 | 1144 | <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 | 1145 | </state> |
1194 | 1146 | </provider> |
1195 | 1147 | </entry> |
1196 | - <entry file="file://$PROJECT_DIR$/src/alert_manager/apps.py"> | |
1148 | + <entry file="file://$PROJECT_DIR$/src/common/views.py"> | |
1197 | 1149 | <provider selected="true" editor-type-id="text-editor"> |
1198 | 1150 | <state relative-caret-position="0"> |
1199 | 1151 | <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 | 1152 | </state> |
1202 | 1153 | </provider> |
1203 | 1154 | </entry> |
1204 | - <entry file="file://$PROJECT_DIR$/src/alert_manager/comet_commands.txt"> | |
1155 | + <entry file="file://$PROJECT_DIR$/src/dashboard/admin.py"> | |
1205 | 1156 | <provider selected="true" editor-type-id="text-editor"> |
1206 | 1157 | <state relative-caret-position="0"> |
1207 | 1158 | <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 | 1159 | </state> |
1210 | 1160 | </provider> |
1211 | 1161 | </entry> |
1212 | - <entry file="file://$PROJECT_DIR$/src/alert_manager/models.py"> | |
1162 | + <entry file="file://$PROJECT_DIR$/src/dashboard/apps.py"> | |
1213 | 1163 | <provider selected="true" editor-type-id="text-editor"> |
1214 | 1164 | <state relative-caret-position="0"> |
1215 | 1165 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
... | ... | @@ -1217,115 +1167,91 @@ |
1217 | 1167 | </state> |
1218 | 1168 | </provider> |
1219 | 1169 | </entry> |
1220 | - <entry file="file://$PROJECT_DIR$/src/alert_manager/simulation_sequences"> | |
1170 | + <entry file="file://$PROJECT_DIR$/src/dashboard/models.py"> | |
1221 | 1171 | <provider selected="true" editor-type-id="text-editor"> |
1222 | 1172 | <state relative-caret-position="0"> |
1223 | 1173 | <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 | 1174 | </state> |
1226 | 1175 | </provider> |
1227 | 1176 | </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" /> | |
1232 | - <folding> | |
1233 | - <element signature="e#0#48#0" expanded="true" /> | |
1234 | - </folding> | |
1235 | - </state> | |
1236 | - </provider> | |
1237 | - </entry> | |
1238 | - <entry file="file://$PROJECT_DIR$/src/analyzer/admin.py"> | |
1177 | + <entry file="file://$PROJECT_DIR$/src/dashboard/tests.py"> | |
1239 | 1178 | <provider selected="true" editor-type-id="text-editor"> |
1240 | 1179 | <state relative-caret-position="0"> |
1241 | 1180 | <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 | 1181 | </state> |
1244 | 1182 | </provider> |
1245 | 1183 | </entry> |
1246 | - <entry file="file://$PROJECT_DIR$/src/analyzer/apps.py"> | |
1184 | + <entry file="file://$PROJECT_DIR$/src/devices/admin.py"> | |
1247 | 1185 | <provider selected="true" editor-type-id="text-editor"> |
1248 | 1186 | <state relative-caret-position="0"> |
1249 | 1187 | <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 /> | |
1251 | 1188 | </state> |
1252 | 1189 | </provider> |
1253 | 1190 | </entry> |
1254 | - <entry file="file://$PROJECT_DIR$/src/analyzer/models.py"> | |
1191 | + <entry file="file://$PROJECT_DIR$/src/devices/apps.py"> | |
1255 | 1192 | <provider selected="true" editor-type-id="text-editor"> |
1256 | 1193 | <state relative-caret-position="0"> |
1257 | 1194 | <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 /> | |
1259 | 1195 | </state> |
1260 | 1196 | </provider> |
1261 | 1197 | </entry> |
1262 | - <entry file="file://$PROJECT_DIR$/src/analyzer/tasks.py"> | |
1198 | + <entry file="file://$PROJECT_DIR$/src/devices/CameraNIR.py"> | |
1263 | 1199 | <provider selected="true" editor-type-id="text-editor"> |
1264 | 1200 | <state relative-caret-position="0"> |
1265 | 1201 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
1266 | - <folding> | |
1267 | - <element signature="e#0#38#0" expanded="true" /> | |
1268 | - </folding> | |
1269 | 1202 | </state> |
1270 | 1203 | </provider> |
1271 | 1204 | </entry> |
1272 | - <entry file="file://$PROJECT_DIR$/src/analyzer/tests.py"> | |
1205 | + <entry file="file://$PROJECT_DIR$/src/devices/CameraVIS.py"> | |
1273 | 1206 | <provider selected="true" editor-type-id="text-editor"> |
1274 | 1207 | <state relative-caret-position="0"> |
1275 | 1208 | <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 | 1209 | </state> |
1278 | 1210 | </provider> |
1279 | 1211 | </entry> |
1280 | - <entry file="file://$PROJECT_DIR$/src/analyzer/views.py"> | |
1212 | + <entry file="file://$PROJECT_DIR$/src/devices/Device.py"> | |
1281 | 1213 | <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 /> | |
1214 | + <state relative-caret-position="337"> | |
1215 | + <caret line="84" column="44" lean-forward="false" selection-start-line="84" selection-start-column="38" selection-end-line="84" selection-end-column="44" /> | |
1285 | 1216 | </state> |
1286 | 1217 | </provider> |
1287 | 1218 | </entry> |
1288 | - <entry file="file://$PROJECT_DIR$/src/common/admin.py"> | |
1219 | + <entry file="file://$PROJECT_DIR$/src/devices/models.py"> | |
1289 | 1220 | <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 /> | |
1221 | + <state relative-caret-position="0"> | |
1222 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1293 | 1223 | </state> |
1294 | 1224 | </provider> |
1295 | 1225 | </entry> |
1296 | - <entry file="file://$PROJECT_DIR$/src/common/apps.py"> | |
1226 | + <entry file="file://$PROJECT_DIR$/src/devices/PLC.py"> | |
1297 | 1227 | <provider selected="true" editor-type-id="text-editor"> |
1298 | 1228 | <state relative-caret-position="0"> |
1299 | 1229 | <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 | 1230 | </state> |
1302 | 1231 | </provider> |
1303 | 1232 | </entry> |
1304 | - <entry file="file://$PROJECT_DIR$/src/common/models.py"> | |
1233 | + <entry file="file://$PROJECT_DIR$/src/devices/Telescope.py"> | |
1305 | 1234 | <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 /> | |
1235 | + <state relative-caret-position="0"> | |
1236 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1309 | 1237 | </state> |
1310 | 1238 | </provider> |
1311 | 1239 | </entry> |
1312 | - <entry file="file://$PROJECT_DIR$/src/common/RequestBuilder.py"> | |
1240 | + <entry file="file://$PROJECT_DIR$/src/devices/tests.py"> | |
1313 | 1241 | <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 /> | |
1242 | + <state relative-caret-position="0"> | |
1243 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1317 | 1244 | </state> |
1318 | 1245 | </provider> |
1319 | 1246 | </entry> |
1320 | - <entry file="file://$PROJECT_DIR$/src/common/tests.py"> | |
1247 | + <entry file="file://$PROJECT_DIR$/src/majordome/admin.py"> | |
1321 | 1248 | <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 /> | |
1249 | + <state relative-caret-position="0"> | |
1250 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1325 | 1251 | </state> |
1326 | 1252 | </provider> |
1327 | 1253 | </entry> |
1328 | - <entry file="file://$PROJECT_DIR$/src/common/views.py"> | |
1254 | + <entry file="file://$PROJECT_DIR$/src/majordome/apps.py"> | |
1329 | 1255 | <provider selected="true" editor-type-id="text-editor"> |
1330 | 1256 | <state relative-caret-position="0"> |
1331 | 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" /> |
... | ... | @@ -1333,270 +1259,268 @@ |
1333 | 1259 | </state> |
1334 | 1260 | </provider> |
1335 | 1261 | </entry> |
1336 | - <entry file="file://$PROJECT_DIR$/src/dashboard/admin.py"> | |
1262 | + <entry file="file://$PROJECT_DIR$/src/majordome/models.py"> | |
1337 | 1263 | <provider selected="true" editor-type-id="text-editor"> |
1338 | 1264 | <state relative-caret-position="0"> |
1339 | 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" /> |
1340 | - <folding /> | |
1341 | 1266 | </state> |
1342 | 1267 | </provider> |
1343 | 1268 | </entry> |
1344 | - <entry file="file://$PROJECT_DIR$/src/dashboard/apps.py"> | |
1269 | + <entry file="file://$PROJECT_DIR$/src/majordome/TaskManager.py"> | |
1345 | 1270 | <provider selected="true" editor-type-id="text-editor"> |
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 /> | |
1271 | + <state relative-caret-position="68"> | |
1272 | + <caret line="4" column="11" lean-forward="false" selection-start-line="4" selection-start-column="5" selection-end-line="4" selection-end-column="11" /> | |
1349 | 1273 | </state> |
1350 | 1274 | </provider> |
1351 | 1275 | </entry> |
1352 | - <entry file="file://$PROJECT_DIR$/src/dashboard/models.py"> | |
1276 | + <entry file="file://$PROJECT_DIR$/src/pyros/urls.py"> | |
1353 | 1277 | <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 /> | |
1278 | + <state relative-caret-position="493"> | |
1279 | + <caret line="35" column="53" lean-forward="true" selection-start-line="35" selection-start-column="53" selection-end-line="35" selection-end-column="53" /> | |
1357 | 1280 | </state> |
1358 | 1281 | </provider> |
1359 | 1282 | </entry> |
1360 | - <entry file="file://$PROJECT_DIR$/src/dashboard/tests.py"> | |
1283 | + <entry file="file://$PROJECT_DIR$/src/devices/views.py"> | |
1361 | 1284 | <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 /> | |
1285 | + <state relative-caret-position="51"> | |
1286 | + <caret line="3" column="0" lean-forward="true" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" /> | |
1365 | 1287 | </state> |
1366 | 1288 | </provider> |
1367 | 1289 | </entry> |
1368 | - <entry file="file://$PROJECT_DIR$/src/devices/admin.py"> | |
1290 | + <entry file="file://$PROJECT_DIR$/src/pyros/celery.py"> | |
1369 | 1291 | <provider selected="true" editor-type-id="text-editor"> |
1370 | 1292 | <state relative-caret-position="0"> |
1371 | 1293 | <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 | 1294 | </state> |
1374 | 1295 | </provider> |
1375 | 1296 | </entry> |
1376 | - <entry file="file://$PROJECT_DIR$/src/devices/apps.py"> | |
1297 | + <entry file="file://$PROJECT_DIR$/src/alert_manager/urls.py"> | |
1377 | 1298 | <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 /> | |
1299 | + <state relative-caret-position="170"> | |
1300 | + <caret line="10" column="0" lean-forward="false" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" /> | |
1381 | 1301 | </state> |
1382 | 1302 | </provider> |
1383 | 1303 | </entry> |
1384 | - <entry file="file://$PROJECT_DIR$/src/devices/CameraNIR.py"> | |
1304 | + <entry file="file://$PROJECT_DIR$/src/majordome/tasks.py"> | |
1385 | 1305 | <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" /> | |
1388 | - <folding> | |
1389 | - <element signature="e#0#27#0" expanded="true" /> | |
1390 | - </folding> | |
1306 | + <state relative-caret-position="917"> | |
1307 | + <caret line="106" column="0" lean-forward="false" selection-start-line="106" selection-start-column="0" selection-end-line="106" selection-end-column="0" /> | |
1391 | 1308 | </state> |
1392 | 1309 | </provider> |
1393 | 1310 | </entry> |
1394 | - <entry file="file://$PROJECT_DIR$/src/devices/CameraVIS.py"> | |
1311 | + <entry file="file://$PROJECT_DIR$/src/dashboard/urls.py"> | |
1395 | 1312 | <provider selected="true" editor-type-id="text-editor"> |
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" /> | |
1398 | - <folding> | |
1399 | - <element signature="e#0#27#0" expanded="true" /> | |
1400 | - </folding> | |
1313 | + <state relative-caret-position="136"> | |
1314 | + <caret line="8" column="53" lean-forward="false" selection-start-line="8" selection-start-column="53" selection-end-line="8" selection-end-column="53" /> | |
1401 | 1315 | </state> |
1402 | 1316 | </provider> |
1403 | 1317 | </entry> |
1404 | - <entry file="file://$PROJECT_DIR$/src/devices/Device.py"> | |
1318 | + <entry file="file://$PROJECT_DIR$/src/dashboard/views.py"> | |
1405 | 1319 | <provider selected="true" editor-type-id="text-editor"> |
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" /> | |
1408 | - <folding> | |
1409 | - <element signature="e#0#27#0" expanded="true" /> | |
1410 | - </folding> | |
1320 | + <state relative-caret-position="493"> | |
1321 | + <caret line="35" column="0" lean-forward="false" selection-start-line="35" selection-start-column="0" selection-end-line="35" selection-end-column="0" /> | |
1411 | 1322 | </state> |
1412 | 1323 | </provider> |
1413 | 1324 | </entry> |
1414 | - <entry file="file://$PROJECT_DIR$/src/devices/models.py"> | |
1325 | + <entry file="file://$PROJECT_DIR$/src/alert_manager/views.py"> | |
1415 | 1326 | <provider selected="true" editor-type-id="text-editor"> |
1416 | - <state relative-caret-position="0"> | |
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" /> | |
1418 | - <folding /> | |
1327 | + <state relative-caret-position="2414"> | |
1328 | + <caret line="150" column="20" lean-forward="false" selection-start-line="150" selection-start-column="20" selection-end-line="150" selection-end-column="20" /> | |
1419 | 1329 | </state> |
1420 | 1330 | </provider> |
1421 | 1331 | </entry> |
1422 | - <entry file="file://$PROJECT_DIR$/src/devices/PLC.py"> | |
1332 | + <entry file="file://$PROJECT_DIR$/src/alert_manager/StrategyBuilder.py"> | |
1423 | 1333 | <provider selected="true" editor-type-id="text-editor"> |
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" /> | |
1426 | - <folding> | |
1427 | - <element signature="e#0#27#0" expanded="true" /> | |
1428 | - </folding> | |
1334 | + <state relative-caret-position="526"> | |
1335 | + <caret line="40" column="30" lean-forward="false" selection-start-line="40" selection-start-column="30" selection-end-line="40" selection-end-column="30" /> | |
1429 | 1336 | </state> |
1430 | 1337 | </provider> |
1431 | 1338 | </entry> |
1432 | - <entry file="file://$PROJECT_DIR$/src/devices/Telescope.py"> | |
1339 | + <entry file="file://$PROJECT_DIR$/src/alert_manager/tests.py"> | |
1433 | 1340 | <provider selected="true" editor-type-id="text-editor"> |
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> | |
1341 | + <state relative-caret-position="714"> | |
1342 | + <caret line="56" column="82" lean-forward="false" selection-start-line="56" selection-start-column="82" selection-end-line="56" selection-end-column="82" /> | |
1439 | 1343 | </state> |
1440 | 1344 | </provider> |
1441 | 1345 | </entry> |
1442 | - <entry file="file://$PROJECT_DIR$/src/devices/tests.py"> | |
1346 | + <entry file="file://$PROJECT_DIR$/src/misc/fixtures/initial_fixture.json"> | |
1443 | 1347 | <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" /> | |
1348 | + <state relative-caret-position="680"> | |
1349 | + <caret line="457" column="29" lean-forward="true" selection-start-line="457" selection-start-column="29" selection-end-line="457" selection-end-column="29" /> | |
1446 | 1350 | <folding /> |
1447 | 1351 | </state> |
1448 | 1352 | </provider> |
1449 | 1353 | </entry> |
1450 | - <entry file="file://$PROJECT_DIR$/src/majordome/admin.py"> | |
1354 | + <entry file="file://$PROJECT_DIR$/src/pyros/settings.py"> | |
1451 | 1355 | <provider selected="true" editor-type-id="text-editor"> |
1452 | - <state relative-caret-position="0"> | |
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" /> | |
1356 | + <state relative-caret-position="269"> | |
1357 | + <caret line="151" column="36" lean-forward="false" selection-start-line="151" selection-start-column="36" selection-end-line="151" selection-end-column="36" /> | |
1454 | 1358 | <folding /> |
1455 | 1359 | </state> |
1456 | 1360 | </provider> |
1457 | 1361 | </entry> |
1458 | - <entry file="file://$PROJECT_DIR$/src/majordome/apps.py"> | |
1362 | + <entry file="file://$PROJECT_DIR$/src/scheduler/simulator.py"> | |
1459 | 1363 | <provider selected="true" editor-type-id="text-editor"> |
1460 | - <state relative-caret-position="0"> | |
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" /> | |
1462 | - <folding /> | |
1364 | + <state relative-caret-position="473"> | |
1365 | + <caret line="71" column="15" lean-forward="true" selection-start-line="71" selection-start-column="15" selection-end-line="71" selection-end-column="15" /> | |
1366 | + <folding> | |
1367 | + <element signature="e#0#41#0" expanded="true" /> | |
1368 | + </folding> | |
1463 | 1369 | </state> |
1464 | 1370 | </provider> |
1465 | 1371 | </entry> |
1466 | - <entry file="file://$PROJECT_DIR$/src/majordome/models.py"> | |
1372 | + <entry file="file://$PROJECT_DIR$/src/scheduler/Scheduler.py"> | |
1467 | 1373 | <provider selected="true" editor-type-id="text-editor"> |
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" /> | |
1470 | - <folding /> | |
1374 | + <state relative-caret-position="354"> | |
1375 | + <caret line="363" column="0" lean-forward="true" selection-start-line="363" selection-start-column="0" selection-end-line="363" selection-end-column="0" /> | |
1376 | + <folding> | |
1377 | + <element signature="e#0#28#0" expanded="true" /> | |
1378 | + </folding> | |
1471 | 1379 | </state> |
1472 | 1380 | </provider> |
1473 | 1381 | </entry> |
1474 | - <entry file="file://$PROJECT_DIR$/src/majordome/TaskManager.py"> | |
1382 | + <entry file="file://$PROJECT_DIR$/src/user_manager/forms.py"> | |
1475 | 1383 | <provider selected="true" editor-type-id="text-editor"> |
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" /> | |
1478 | - <folding /> | |
1384 | + <state relative-caret-position="187"> | |
1385 | + <caret line="11" column="0" lean-forward="true" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" /> | |
1386 | + <folding> | |
1387 | + <element signature="e#0#24#0" expanded="true" /> | |
1388 | + </folding> | |
1479 | 1389 | </state> |
1480 | 1390 | </provider> |
1481 | 1391 | </entry> |
1482 | - <entry file="file://$PROJECT_DIR$/src/alert_manager/tasks.py"> | |
1392 | + <entry file="file://$PROJECT_DIR$/src/user_manager/apps.py"> | |
1483 | 1393 | <provider selected="true" editor-type-id="text-editor"> |
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" /> | |
1394 | + <state relative-caret-position="0"> | |
1395 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1486 | 1396 | <folding /> |
1487 | 1397 | </state> |
1488 | 1398 | </provider> |
1489 | 1399 | </entry> |
1490 | - <entry file="file://$PROJECT_DIR$/src/alert_manager/tests.py"> | |
1400 | + <entry file="file://$PROJECT_DIR$/src/user_manager/tests.py"> | |
1491 | 1401 | <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 /> | |
1402 | + <state relative-caret-position="662"> | |
1403 | + <caret line="53" column="91" lean-forward="false" selection-start-line="53" selection-start-column="91" selection-end-line="53" selection-end-column="91" /> | |
1404 | + <folding> | |
1405 | + <element signature="e#0#32#0" expanded="true" /> | |
1406 | + </folding> | |
1495 | 1407 | </state> |
1496 | 1408 | </provider> |
1497 | 1409 | </entry> |
1498 | - <entry file="file://$PROJECT_DIR$/src/alert_manager/views.py"> | |
1410 | + <entry file="file://$PROJECT_DIR$/src/common/RequestBuilder.py"> | |
1499 | 1411 | <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" /> | |
1412 | + <state relative-caret-position="323"> | |
1413 | + <caret line="19" column="24" lean-forward="true" selection-start-line="19" selection-start-column="24" selection-end-line="19" selection-end-column="24" /> | |
1502 | 1414 | <folding> |
1503 | - <element signature="e#0#35#0" expanded="true" /> | |
1415 | + <element signature="e#0#27#0" expanded="true" /> | |
1504 | 1416 | </folding> |
1505 | 1417 | </state> |
1506 | 1418 | </provider> |
1507 | 1419 | </entry> |
1508 | - <entry file="file://$PROJECT_DIR$/src/routine_manager/views.py"> | |
1420 | + <entry file="file://$PROJECT_DIR$/src/common/admin.py"> | |
1509 | 1421 | <provider selected="true" editor-type-id="text-editor"> |
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" /> | |
1422 | + <state relative-caret-position="764"> | |
1423 | + <caret line="254" column="29" lean-forward="false" selection-start-line="254" selection-start-column="25" selection-end-line="254" selection-end-column="29" /> | |
1512 | 1424 | <folding /> |
1513 | 1425 | </state> |
1514 | 1426 | </provider> |
1515 | 1427 | </entry> |
1516 | - <entry file="file://$PROJECT_DIR$/src/pyros/urls.py"> | |
1428 | + <entry file="file://$PROJECT_DIR$/src/misc/fixtures/tests/alert_mgr_test.json"> | |
1517 | 1429 | <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" /> | |
1430 | + <state relative-caret-position="483"> | |
1431 | + <caret line="247" column="22" lean-forward="true" selection-start-line="247" selection-start-column="22" selection-end-line="247" selection-end-column="22" /> | |
1520 | 1432 | <folding /> |
1521 | 1433 | </state> |
1522 | 1434 | </provider> |
1523 | 1435 | </entry> |
1524 | - <entry file="file://$PROJECT_DIR$/src/pyros/settings.py"> | |
1436 | + <entry file="file://$PROJECT_DIR$/src/misc/fixtures/tests/common_test.json"> | |
1525 | 1437 | <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" /> | |
1438 | + <state relative-caret-position="721"> | |
1439 | + <caret line="262" column="27" lean-forward="true" selection-start-line="262" selection-start-column="27" selection-end-line="262" selection-end-column="27" /> | |
1528 | 1440 | <folding /> |
1529 | 1441 | </state> |
1530 | 1442 | </provider> |
1531 | 1443 | </entry> |
1532 | - <entry file="file://$PROJECT_DIR$/src/devices/views.py"> | |
1444 | + <entry file="file://$PROJECT_DIR$/src/misc/fixtures/tests/routine_mgr_test.json"> | |
1533 | 1445 | <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" /> | |
1446 | + <state relative-caret-position="516"> | |
1447 | + <caret line="232" column="15" lean-forward="true" selection-start-line="232" selection-start-column="15" selection-end-line="232" selection-end-column="15" /> | |
1536 | 1448 | <folding /> |
1537 | 1449 | </state> |
1538 | 1450 | </provider> |
1539 | 1451 | </entry> |
1540 | - <entry file="file://$PROJECT_DIR$/src/pyros/celery.py"> | |
1452 | + <entry file="file://$PROJECT_DIR$/src/common/models_ORIG.py"> | |
1541 | 1453 | <provider selected="true" editor-type-id="text-editor"> |
1542 | 1454 | <state relative-caret-position="0"> |
1543 | 1455 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
1544 | - <folding> | |
1545 | - <element signature="e#0#38#0" expanded="true" /> | |
1546 | - </folding> | |
1456 | + <folding /> | |
1547 | 1457 | </state> |
1548 | 1458 | </provider> |
1549 | 1459 | </entry> |
1550 | - <entry file="file://$PROJECT_DIR$/src/routine_manager/urls.py"> | |
1460 | + <entry file="file://$PROJECT_DIR$/src/scheduler/tests.py"> | |
1551 | 1461 | <provider selected="true" editor-type-id="text-editor"> |
1552 | - <state relative-caret-position="0"> | |
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" /> | |
1462 | + <state relative-caret-position="493"> | |
1463 | + <caret line="29" column="81" lean-forward="false" selection-start-line="29" selection-start-column="81" selection-end-line="29" selection-end-column="81" /> | |
1554 | 1464 | <folding> |
1555 | 1465 | <element signature="e#0#32#0" expanded="true" /> |
1556 | 1466 | </folding> |
1557 | 1467 | </state> |
1558 | 1468 | </provider> |
1559 | 1469 | </entry> |
1560 | - <entry file="file://$PROJECT_DIR$/src/alert_manager/urls.py"> | |
1470 | + <entry file="file://$PROJECT_DIR$/src/common/models.py"> | |
1561 | 1471 | <provider selected="true" editor-type-id="text-editor"> |
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" /> | |
1472 | + <state relative-caret-position="609"> | |
1473 | + <caret line="248" column="28" lean-forward="true" selection-start-line="248" selection-start-column="28" selection-end-line="248" selection-end-column="28" /> | |
1564 | 1474 | <folding> |
1565 | - <element signature="e#0#32#0" expanded="true" /> | |
1475 | + <element signature="e#470#509#0" expanded="true" /> | |
1566 | 1476 | </folding> |
1567 | 1477 | </state> |
1568 | 1478 | </provider> |
1569 | 1479 | </entry> |
1570 | - <entry file="file://$PROJECT_DIR$/src/majordome/tasks.py"> | |
1480 | + <entry file="file://$PROJECT_DIR$/src/common/tests.py"> | |
1571 | 1481 | <provider selected="true" editor-type-id="text-editor"> |
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> | |
1482 | + <state relative-caret-position="405"> | |
1483 | + <caret line="97" column="17" lean-forward="false" selection-start-line="97" selection-start-column="17" selection-end-line="97" selection-end-column="17" /> | |
1484 | + <folding /> | |
1577 | 1485 | </state> |
1578 | 1486 | </provider> |
1579 | 1487 | </entry> |
1580 | - <entry file="file://$PROJECT_DIR$/src/dashboard/views.py"> | |
1488 | + <entry file="file://$PROJECT_DIR$/src/routine_manager/tests.py"> | |
1581 | 1489 | <provider selected="true" editor-type-id="text-editor"> |
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" /> | |
1490 | + <state relative-caret-position="272"> | |
1491 | + <caret line="16" column="9" lean-forward="false" selection-start-line="16" selection-start-column="0" selection-end-line="17" selection-end-column="0" /> | |
1584 | 1492 | <folding> |
1585 | - <element signature="e#0#45#0" expanded="true" /> | |
1493 | + <element signature="e#0#32#0" expanded="true" /> | |
1586 | 1494 | </folding> |
1587 | 1495 | </state> |
1588 | 1496 | </provider> |
1589 | 1497 | </entry> |
1590 | - <entry file="file://$PROJECT_DIR$/src/dashboard/urls.py"> | |
1498 | + <entry file="file://$PROJECT_DIR$/src/routine_manager/urls.py"> | |
1591 | 1499 | <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" /> | |
1500 | + <state relative-caret-position="0"> | |
1501 | + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | |
1502 | + <folding /> | |
1503 | + </state> | |
1504 | + </provider> | |
1505 | + </entry> | |
1506 | + <entry file="file://$PROJECT_DIR$/src/alert_manager/tasks.py"> | |
1507 | + <provider selected="true" editor-type-id="text-editor"> | |
1508 | + <state relative-caret-position="337"> | |
1509 | + <caret line="98" column="56" lean-forward="true" selection-start-line="98" selection-start-column="56" selection-end-line="98" selection-end-column="56" /> | |
1594 | 1510 | <folding> |
1595 | - <element signature="e#0#32#0" expanded="true" /> | |
1511 | + <element signature="e#0#38#0" expanded="true" /> | |
1596 | 1512 | </folding> |
1597 | 1513 | </state> |
1598 | 1514 | </provider> |
1599 | 1515 | </entry> |
1516 | + <entry file="file://$PROJECT_DIR$/src/routine_manager/views.py"> | |
1517 | + <provider selected="true" editor-type-id="text-editor"> | |
1518 | + <state relative-caret-position="354"> | |
1519 | + <caret line="43" column="0" lean-forward="true" selection-start-line="43" selection-start-column="0" selection-end-line="43" selection-end-column="0" /> | |
1520 | + <folding /> | |
1521 | + </state> | |
1522 | + </provider> | |
1523 | + </entry> | |
1600 | 1524 | </component> |
1601 | 1525 | <component name="masterDetails"> |
1602 | 1526 | <states> | ... | ... |
README.md
... | ... | @@ -80,6 +80,8 @@ MAIN CHANGES (MILESTONES): |
80 | 80 | |
81 | 81 | Full list of commits: https://gitlab.irap.omp.eu/epallier/pyros/commits/master |
82 | 82 | |
83 | +15/12/16 Version 0. | |
84 | + | |
83 | 85 | 02/08/16 Version 0.12.4 - Final version 0.12 |
84 | 86 | Simulators first versions |
85 | 87 | https://projects.irap.omp.eu/versions/129 | ... | ... |
src/alert_manager/tasks.py
... | ... | @@ -82,7 +82,7 @@ class alert_listener(Task): |
82 | 82 | :returns : The request |
83 | 83 | ''' |
84 | 84 | |
85 | - pyros_user = PyrosUser.objects.get(user__username="pyros") | |
85 | + pyros_user = PyrosUser.objects.get(username="pyros") | |
86 | 86 | scientific_program = ScientificProgram.objects.get(name="GRB") |
87 | 87 | |
88 | 88 | alert = self.get_alert_attributes(voevent, event_file) |
... | ... | @@ -102,7 +102,8 @@ class alert_listener(Task): |
102 | 102 | seq.ra = alert.burst_ra |
103 | 103 | seq.dec = alert.burst_dec |
104 | 104 | seq.save() |
105 | - alert.request = req | |
105 | + alert.request_id = req | |
106 | + alert.__dict__.update(req.__dict__) | |
106 | 107 | alert.save() |
107 | 108 | Log.objects.create(agent="Alert manager", message="Alert created.") |
108 | 109 | ... | ... |
src/alert_manager/tests.py
... | ... | @@ -8,6 +8,9 @@ from django.conf import settings |
8 | 8 | |
9 | 9 | from common.models import * |
10 | 10 | |
11 | +from logger.config import * | |
12 | +log = setupLogger("test", "test") | |
13 | + | |
11 | 14 | TEST_FILE = "unittest_voevent.xml" |
12 | 15 | |
13 | 16 | TEST_FILE_PATH = os.path.join(alert_manager.tasks.VOEVENTS_PATH, TEST_FILE) |
... | ... | @@ -32,6 +35,7 @@ class TestStrategyChange(TestCase): |
32 | 35 | |
33 | 36 | def test_change_inexistant_strat(self): |
34 | 37 | self.client.login(username="test@test.test", password="test") |
38 | + | |
35 | 39 | path = "/alert_manager/change_obs_strategy_validate/" + str(self.alert.id) |
36 | 40 | response = self.client.post(path, {"strategy_choice": 42}) |
37 | 41 | self.assertTrue("error" in response.context.keys(), "There should be an error of non existant strategy") | ... | ... |
src/alert_manager/views.py
... | ... | @@ -146,7 +146,8 @@ def change_obs_strategy_validate(request, alert_id): |
146 | 146 | req = sb.validate() |
147 | 147 | alert.pk = None |
148 | 148 | alert.strategyobs = strategy |
149 | - alert.request = req | |
149 | + alert.request_id = req | |
150 | + alert.__dict__.update(req.__dict__) | |
150 | 151 | alert.save() |
151 | 152 | strategies = StrategyObs.objects.exclude(id=alert.strategyobs.id) |
152 | 153 | ... | ... |
src/common/RequestBuilder.py
src/common/models.py
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | # field names. |
9 | 9 | from __future__ import unicode_literals |
10 | 10 | |
11 | -from django.contrib.auth.models import User | |
11 | +from django.contrib.auth.models import AbstractUser | |
12 | 12 | from django.db import models |
13 | 13 | |
14 | 14 | class Album(models.Model): |
... | ... | @@ -30,37 +30,6 @@ class Album(models.Model): |
30 | 30 | return (str(self.name)) |
31 | 31 | |
32 | 32 | |
33 | -class Alert(models.Model): | |
34 | - request = models.OneToOneField('Request', on_delete=models.CASCADE, blank=True, null=True) | |
35 | - strategyobs = models.ForeignKey( | |
36 | - 'StrategyObs', models.DO_NOTHING, related_name="alerts", blank=True, null=True) | |
37 | - voevent_file = models.CharField(max_length=45, blank=True, null=True) | |
38 | - author = models.CharField(max_length=45, blank=True, null=True) | |
39 | - burst_jd = models.DecimalField(max_digits=15, decimal_places=8, blank=True, null=True) | |
40 | - burst_ra = models.FloatField(max_length=45, blank=True, null=True) | |
41 | - burst_dec = models.FloatField(max_length=45, blank=True, null=True) | |
42 | - astro_coord_system = models.CharField(max_length=45, blank=True, null=True) | |
43 | - jd_send = models.DecimalField(max_digits=15, decimal_places=8, blank=True, null=True) | |
44 | - jd_received = models.DecimalField(max_digits=15, decimal_places=8, blank=True, null=True) | |
45 | - trig_id = models.IntegerField(blank=True, null=True) | |
46 | - error_radius = models.FloatField(max_length=45, blank=True, null=True) | |
47 | - defly_not_grb = models.BooleanField(default=False) | |
48 | - editor = models.CharField(max_length=45, blank=True, null=True) | |
49 | - soln_status = models.CharField(max_length=45, blank=True, null=True) | |
50 | - pkt_ser_num = models.IntegerField(blank=True, null=True) | |
51 | - | |
52 | - class Meta: | |
53 | - managed = True | |
54 | - db_table = 'alert' | |
55 | - | |
56 | - def __str__(self): | |
57 | - return str(self.trig_id) | |
58 | - | |
59 | - def request_name(self): | |
60 | - return self.__str__() | |
61 | - request_name.short_description = "Name" | |
62 | - | |
63 | - | |
64 | 33 | class Country(models.Model): |
65 | 34 | name = models.CharField(max_length=45, blank=True, null=True) |
66 | 35 | desc = models.TextField(blank=True, null=True) |
... | ... | @@ -246,8 +215,7 @@ class Plan(models.Model): |
246 | 215 | return (str(self.name)) |
247 | 216 | |
248 | 217 | |
249 | -class PyrosUser(models.Model): | |
250 | - user = models.OneToOneField(User, on_delete=models.CASCADE, related_name="pyros_user") | |
218 | +class PyrosUser(AbstractUser): | |
251 | 219 | country = models.ForeignKey( |
252 | 220 | Country, on_delete=models.DO_NOTHING, related_name="pyros_users") |
253 | 221 | user_level = models.ForeignKey( |
... | ... | @@ -276,7 +244,7 @@ class PyrosUser(models.Model): |
276 | 244 | db_table = 'pyros_user' |
277 | 245 | |
278 | 246 | def __str__(self): |
279 | - return (str(self.user.get_username())) | |
247 | + return (str(self.get_username())) | |
280 | 248 | |
281 | 249 | def user_username(self): |
282 | 250 | return self.__str__() |
... | ... | @@ -308,6 +276,36 @@ class Request(models.Model): |
308 | 276 | def __str__(self): |
309 | 277 | return (str(self.name)) |
310 | 278 | |
279 | +class Alert(Request): | |
280 | + request = models.OneToOneField('Request', on_delete=models.CASCADE, default='') | |
281 | + strategyobs = models.ForeignKey( | |
282 | + 'StrategyObs', models.DO_NOTHING, related_name="alerts", blank=True, null=True) | |
283 | + voevent_file = models.CharField(max_length=45, blank=True, null=True) | |
284 | + author = models.CharField(max_length=45, blank=True, null=True) | |
285 | + burst_jd = models.DecimalField(max_digits=15, decimal_places=8, blank=True, null=True) | |
286 | + burst_ra = models.FloatField(max_length=45, blank=True, null=True) | |
287 | + burst_dec = models.FloatField(max_length=45, blank=True, null=True) | |
288 | + astro_coord_system = models.CharField(max_length=45, blank=True, null=True) | |
289 | + jd_send = models.DecimalField(max_digits=15, decimal_places=8, blank=True, null=True) | |
290 | + jd_received = models.DecimalField(max_digits=15, decimal_places=8, blank=True, null=True) | |
291 | + trig_id = models.IntegerField(blank=True, null=True) | |
292 | + error_radius = models.FloatField(max_length=45, blank=True, null=True) | |
293 | + defly_not_grb = models.BooleanField(default=False) | |
294 | + editor = models.CharField(max_length=45, blank=True, null=True) | |
295 | + soln_status = models.CharField(max_length=45, blank=True, null=True) | |
296 | + pkt_ser_num = models.IntegerField(blank=True, null=True) | |
297 | + | |
298 | + class Meta: | |
299 | + managed = True | |
300 | + db_table = 'alert' | |
301 | + | |
302 | + def __str__(self): | |
303 | + return str(self.trig_id) | |
304 | + | |
305 | + def request_name(self): | |
306 | + return self.__str__() | |
307 | + | |
308 | + request_name.short_description = "Name" | |
311 | 309 | |
312 | 310 | # class Schedule(models.Model): |
313 | 311 | # created = models.DateTimeField(blank=True, null=True, auto_now_add=True) | ... | ... |
src/common/tests.py
... | ... | @@ -4,6 +4,9 @@ from common.models import * |
4 | 4 | from django.contrib.auth.models import User |
5 | 5 | from django.utils import timezone |
6 | 6 | |
7 | +from logger.config import * | |
8 | +log = setupLogger("common", "common") | |
9 | + | |
7 | 10 | class RequestBuilderTests(TestCase): |
8 | 11 | |
9 | 12 | fixtures = ['tests/common_test.json'] |
... | ... | @@ -15,8 +18,7 @@ class RequestBuilderTests(TestCase): |
15 | 18 | |
16 | 19 | country = Country.objects.create(name="France") |
17 | 20 | usr_lvl = UserLevel.objects.create(name="default") |
18 | - usr = User.objects.create(username="toto") | |
19 | - self.pyusr = PyrosUser.objects.create(country=country, user=usr, user_level=usr_lvl, quota=1111) | |
21 | + self.pyusr = PyrosUser.objects.create(username="toto", country=country, user_level=usr_lvl, quota=1111) | |
20 | 22 | self.sp = ScientificProgram.objects.create(name="default") |
21 | 23 | |
22 | 24 | def test_full_creation(self): |
... | ... | @@ -85,13 +87,15 @@ class RequestTests(TestCase): |
85 | 87 | strat1 = StrategyObs.objects.create(name="strat1") |
86 | 88 | france = Country.objects.create(name="France") |
87 | 89 | admin = UserLevel.objects.create(name="Admin") |
88 | - usr1 = User.objects.create(username="Haribo") | |
89 | - haribo = PyrosUser.objects.create( | |
90 | - user=usr1, country=france, user_level=admin) | |
90 | + haribo = PyrosUser.objects.create(username="Haribo", | |
91 | + country=france, user_level=admin) | |
91 | 92 | sp1 = ScientificProgram.objects.create(name="sp1") |
92 | 93 | req1 = Request.objects.create( |
93 | 94 | name="req1", pyros_user=haribo, scientific_program=sp1) |
94 | - Alert.objects.create(strategyobs=strat1, request=req1) | |
95 | + alert = Alert(strategyobs=strat1, request_id=req1) | |
96 | + alert.__dict__.update(req1.__dict__) | |
97 | + alert.save() | |
98 | + log.info(alert.__dict__) | |
95 | 99 | |
96 | 100 | sched = Schedule.objects.create() |
97 | 101 | seq1 = Sequence.objects.create( |
... | ... | @@ -122,13 +126,13 @@ class RequestTests(TestCase): |
122 | 126 | # j'ai refait un get de mon alert, donc c'est mis ร jour |
123 | 127 | self.assertEqual(alert.request.name, "reqtiti") |
124 | 128 | |
125 | - alert.request.name = "reqtoto" | |
129 | + alert.name = "reqtoto" | |
126 | 130 | alert.save() |
127 | 131 | self.assertEqual(req1.name, "reqtiti") |
128 | 132 | self.assertEqual(alert.request.name, "reqtoto") |
129 | 133 | |
130 | 134 | req1 = Request.objects.get() |
131 | - self.assertEqual(req1.name, "reqtiti") | |
135 | + self.assertEqual(req1.name, "reqtoto") | |
132 | 136 | |
133 | 137 | alert.request.save() |
134 | 138 | req1 = Request.objects.get() | ... | ... |
src/misc/fixtures/initial_fixture.json
... | ... | @@ -430,8 +430,8 @@ |
430 | 430 | } |
431 | 431 | }, |
432 | 432 | { |
433 | - "model": "auth.user", | |
434 | - "pk": 9, | |
433 | + "model": "common.pyrosuser", | |
434 | + "pk": 5, | |
435 | 435 | "fields": { |
436 | 436 | "password": "pbkdf2_sha256$24000$HRial3QUfrlz$bVuEzQaXthOd9GZVXd2449LDEF8EMQure69nA/Hu7qQ=", |
437 | 437 | "last_login": "2016-08-10T15:16:42.327Z", |
... | ... | @@ -444,14 +444,7 @@ |
444 | 444 | "is_active": true, |
445 | 445 | "date_joined": "2016-08-10T15:15:58.481Z", |
446 | 446 | "groups": [], |
447 | - "user_permissions": [] | |
448 | - } | |
449 | -}, | |
450 | -{ | |
451 | - "model": "common.pyrosuser", | |
452 | - "pk": 5, | |
453 | - "fields": { | |
454 | - "user": 9, | |
447 | + "user_permissions": [], | |
455 | 448 | "country": 1, |
456 | 449 | "user_level": 1, |
457 | 450 | "desc": "", | ... | ... |
src/misc/fixtures/tests/alert_mgr_test.json
... | ... | @@ -228,28 +228,9 @@ |
228 | 228 | } |
229 | 229 | }, |
230 | 230 | { |
231 | - "model": "auth.user", | |
232 | - "pk": 8, | |
233 | - "fields": { | |
234 | - "password": "pbkdf2_sha256$24000$bKJO902RCk0w$zxUz9uiSYG85ymuvl5rNLLqT/LZwrLwpVj5WfwwSyKE=", | |
235 | - "last_login": "2016-06-21T13:07:34.383Z", | |
236 | - "is_superuser": false, | |
237 | - "username": "test@test.test", | |
238 | - "first_name": "test", | |
239 | - "last_name": "test", | |
240 | - "email": "test@test.test", | |
241 | - "is_staff": false, | |
242 | - "is_active": true, | |
243 | - "date_joined": "2016-06-21T13:07:19.609Z", | |
244 | - "groups": [], | |
245 | - "user_permissions": [] | |
246 | - } | |
247 | -}, | |
248 | -{ | |
249 | 231 | "model": "common.pyrosuser", |
250 | 232 | "pk": 3, |
251 | 233 | "fields": { |
252 | - "user": 8, | |
253 | 234 | "country": 1, |
254 | 235 | "user_level": 1, |
255 | 236 | "desc": null, |
... | ... | @@ -269,7 +250,19 @@ |
269 | 250 | "u_priority": null, |
270 | 251 | "p_priority": null, |
271 | 252 | "dir_level": null, |
272 | - "can_del_void_req": false | |
253 | + "can_del_void_req": false, | |
254 | + "password": "pbkdf2_sha256$24000$bKJO902RCk0w$zxUz9uiSYG85ymuvl5rNLLqT/LZwrLwpVj5WfwwSyKE=", | |
255 | + "last_login": "2016-06-21T13:07:34.383Z", | |
256 | + "is_superuser": false, | |
257 | + "username": "test@test.test", | |
258 | + "first_name": "test", | |
259 | + "last_name": "test", | |
260 | + "email": "test@test.test", | |
261 | + "is_staff": false, | |
262 | + "is_active": true, | |
263 | + "date_joined": "2016-06-21T13:07:19.609Z", | |
264 | + "groups": [], | |
265 | + "user_permissions": [] | |
273 | 266 | } |
274 | 267 | },{ |
275 | 268 | "model": "common.alert", | ... | ... |
src/misc/fixtures/tests/common_test.json
... | ... | @@ -228,44 +228,8 @@ |
228 | 228 | } |
229 | 229 | }, |
230 | 230 | { |
231 | - "model": "auth.user", | |
232 | - "pk": 3, | |
233 | - "fields": { | |
234 | - "password": "pbkdf2_sha256$24000$okuSDTx60Vgu$awy4V1udsOOFh4PhGvMWbZLbgcHdbMHEvGsmlx08n5w=", | |
235 | - "last_login": "2016-04-04T10:05:28.863Z", | |
236 | - "is_superuser": true, | |
237 | - "username": "admin", | |
238 | - "first_name": "", | |
239 | - "last_name": "", | |
240 | - "email": "admin@example.com", | |
241 | - "is_staff": true, | |
242 | - "is_active": true, | |
243 | - "date_joined": "2016-04-04T10:04:19.313Z", | |
244 | - "groups": [], | |
245 | - "user_permissions": [] | |
246 | - } | |
247 | -}, | |
248 | -{ | |
249 | - "model": "auth.user", | |
250 | - "pk": 6, | |
251 | - "fields": { | |
252 | - "password": "pbkdf2_sha256$24000$INnv1PBisCaS$2YY/3Nws6EqMJAnaozZQaryERI0W5dTiQRUs9S0RBoc=", | |
253 | - "last_login": "2016-05-02T13:59:10.629Z", | |
254 | - "is_superuser": true, | |
255 | - "username": "pyros", | |
256 | - "first_name": "", | |
257 | - "last_name": "", | |
258 | - "email": "admin@example.com", | |
259 | - "is_staff": true, | |
260 | - "is_active": true, | |
261 | - "date_joined": "2016-04-04T10:46:29.552Z", | |
262 | - "groups": [], | |
263 | - "user_permissions": [] | |
264 | - } | |
265 | -}, | |
266 | -{ | |
267 | - "model": "auth.user", | |
268 | - "pk": 7, | |
231 | + "model": "common.pyrosuser", | |
232 | + "pk": 1, | |
269 | 233 | "fields": { |
270 | 234 | "password": "pbkdf2_sha256$24000$NC9UO4LPGvDN$+pkRcZUbmV3HEtbrhBdDCSPnAsDVValrbwLt7cXqrJE=", |
271 | 235 | "last_login": "2016-06-03T09:27:53.245Z", |
... | ... | @@ -278,14 +242,7 @@ |
278 | 242 | "is_active": true, |
279 | 243 | "date_joined": "2016-05-02T14:02:36.495Z", |
280 | 244 | "groups": [], |
281 | - "user_permissions": [] | |
282 | - } | |
283 | -}, | |
284 | -{ | |
285 | - "model": "common.pyrosuser", | |
286 | - "pk": 1, | |
287 | - "fields": { | |
288 | - "user": 7, | |
245 | + "user_permissions": [], | |
289 | 246 | "country": 1, |
290 | 247 | "user_level": 1, |
291 | 248 | "desc": "", | ... | ... |
src/misc/fixtures/tests/routine_mgr_test.json
... | ... | @@ -228,8 +228,8 @@ |
228 | 228 | } |
229 | 229 | }, |
230 | 230 | { |
231 | - "model": "auth.user", | |
232 | - "pk": 8, | |
231 | + "model": "common.pyrosuser", | |
232 | + "pk": 3, | |
233 | 233 | "fields": { |
234 | 234 | "password": "pbkdf2_sha256$24000$bKJO902RCk0w$zxUz9uiSYG85ymuvl5rNLLqT/LZwrLwpVj5WfwwSyKE=", |
235 | 235 | "last_login": "2016-06-21T13:07:34.383Z", |
... | ... | @@ -242,14 +242,7 @@ |
242 | 242 | "is_active": true, |
243 | 243 | "date_joined": "2016-06-21T13:07:19.609Z", |
244 | 244 | "groups": [], |
245 | - "user_permissions": [] | |
246 | - } | |
247 | -}, | |
248 | -{ | |
249 | - "model": "common.pyrosuser", | |
250 | - "pk": 3, | |
251 | - "fields": { | |
252 | - "user": 8, | |
245 | + "user_permissions": [], | |
253 | 246 | "country": 1, |
254 | 247 | "user_level": 1, |
255 | 248 | "desc": null, | ... | ... |
src/pyros/settings.py
src/routine_manager/views.py
... | ... | @@ -40,9 +40,9 @@ def requests_list(request, status=0, message=""): |
40 | 40 | success = True |
41 | 41 | |
42 | 42 | # TODO: uncomment for alert filter |
43 | -# requests_objs = Request.objects.filter(pyros_user=request.user.pyros_user).filter(is_alert=False).order_by("-updated") | |
43 | +# requests_objs = Request.objects.filter(pyros_user=request.user).filter(is_alert=False).order_by("-updated") | |
44 | 44 | |
45 | - requests_objs = Request.objects.filter(pyros_user=request.user.pyros_user).order_by("-updated") | |
45 | + requests_objs = Request.objects.filter(pyros_user=request.user).order_by("-updated") | |
46 | 46 | |
47 | 47 | requests = [] |
48 | 48 | |
... | ... | @@ -373,7 +373,7 @@ def create_request(request): |
373 | 373 | Create a new request and redirects to the editing action on it |
374 | 374 | """ |
375 | 375 | |
376 | - req = Request.objects.create(pyros_user=request.user.pyros_user, name="New request", is_alert=False, autodeposit=False, complete=False, submitted=False) | |
376 | + req = Request.objects.create(pyros_user=request.user, name="New request", is_alert=False, autodeposit=False, complete=False, submitted=False) | |
377 | 377 | return redirect(action_request, req.id, "edit") |
378 | 378 | |
379 | 379 | @login_required |
... | ... | @@ -524,7 +524,7 @@ def import_request(request): |
524 | 524 | message = "File is too big (more than 1 000 000 bytes)" |
525 | 525 | else: |
526 | 526 | rs = RequestSerializer() |
527 | - message = rs.unserialize(file.read(), request.user.pyros_user) | |
527 | + message = rs.unserialize(file.read(), request.user) | |
528 | 528 | if message != "": |
529 | 529 | status = -1 |
530 | 530 | else: | ... | ... |
src/scheduler/simulator.py
1 | 1 | from scheduler.Scheduler import Scheduler |
2 | 2 | from common.models import * |
3 | -from django.contrib.auth.models import User | |
4 | 3 | import urllib.request as urllib2 |
5 | 4 | from html.parser import HTMLParser |
6 | 5 | import math |
... | ... | @@ -63,9 +62,7 @@ class Simulator(): |
63 | 62 | sp = ScientificProgram() |
64 | 63 | country = Country() |
65 | 64 | usr_lvl = UserLevel() |
66 | - usr = User(username="toto") | |
67 | - py_usr = PyrosUser( | |
68 | - user=usr, country=country, user_level=usr_lvl, quota=1000) | |
65 | + py_usr = PyrosUser(username="toto", country=country, user_level=usr_lvl, quota=1000) | |
69 | 66 | req = Request(scientific_program=sp, pyros_user=py_usr) |
70 | 67 | |
71 | 68 | scheduler = Scheduler() | ... | ... |
src/scheduler/tests.py
... | ... | @@ -25,15 +25,9 @@ class SchedulerTest(TestCase): |
25 | 25 | country = Country.objects.create() |
26 | 26 | user_level = UserLevel.objects.create() |
27 | 27 | |
28 | - user1 = User.objects.create(username="toto") | |
29 | - user2 = User.objects.create(username="titi") | |
30 | - user3 = User.objects.create(username="tata") | |
31 | - self.usr1 = PyrosUser.objects.create( | |
32 | - country=country, user_level=user_level, quota=100, user=user1) | |
33 | - self.usr2 = PyrosUser.objects.create( | |
34 | - country=country, user_level=user_level, quota=100, user=user2) | |
35 | - self.usr3 = PyrosUser.objects.create( | |
36 | - country=country, user_level=user_level, quota=100, user=user3) | |
28 | + self.usr1 = PyrosUser.objects.create(username="toto", country=country, user_level=user_level, quota=100) | |
29 | + self.usr2 = PyrosUser.objects.create(username="titi", country=country, user_level=user_level, quota=100) | |
30 | + self.usr3 = PyrosUser.objects.create(username="tata", country=country, user_level=user_level, quota=100) | |
37 | 31 | |
38 | 32 | self.req1 = Request.objects.create( |
39 | 33 | pyros_user=self.usr1, scientific_program=scipro) | ... | ... |
src/user_manager/forms.py
1 | 1 | from django import forms |
2 | 2 | from common.models import PyrosUser, Country, UserLevel, ScientificProgram |
3 | -from django.contrib.auth.models import User | |
4 | 3 | |
5 | 4 | class PyrosUserCreationForm(forms.ModelForm): |
6 | 5 | ''' |
... | ... | @@ -45,7 +44,7 @@ class PyrosUserCreationForm(forms.ModelForm): |
45 | 44 | Checks if the email already exists in DB |
46 | 45 | ''' |
47 | 46 | email = self.cleaned_data.get("email") |
48 | - if User.objects.filter(email=email).exists(): | |
47 | + if PyrosUser.objects.filter(email=email).exists(): | |
49 | 48 | raise forms.ValidationError("Email address already taken") |
50 | 49 | return email |
51 | 50 | |
... | ... | @@ -53,16 +52,13 @@ class PyrosUserCreationForm(forms.ModelForm): |
53 | 52 | ''' |
54 | 53 | Creates a User and a PyrosUser in DB |
55 | 54 | ''' |
56 | - user = User.objects.create_user(username=self.cleaned_data['email']) | |
57 | - user.email = self.cleaned_data['email'] | |
58 | - user.set_password(self.cleaned_data['password']) | |
59 | - user.first_name = self.cleaned_data['first_name'] | |
60 | - user.last_name = self.cleaned_data['last_name'] | |
61 | - user.save() | |
62 | - | |
63 | - # Default values for country and user level | |
64 | - pyros_user = PyrosUser.objects.create(user=user, country=Country.objects.all()[0], | |
55 | + pyros_user = PyrosUser.objects.create(username=self.cleaned_data['email'], email=self.cleaned_data['email'], country=Country.objects.all()[0], | |
65 | 56 | user_level=UserLevel.objects.all()[0], |
66 | 57 | tel=self.cleaned_data['tel'], laboratory=self.cleaned_data['laboratory'], |
67 | 58 | address=self.cleaned_data['address']) |
59 | + pyros_user.set_password(self.cleaned_data['password']) | |
60 | + pyros_user.first_name = self.cleaned_data['first_name'] | |
61 | + pyros_user.last_name = self.cleaned_data['last_name'] | |
62 | + pyros_user.save() | |
63 | + | |
68 | 64 | return pyros_user | ... | ... |
src/user_manager/tests.py
... | ... | @@ -16,7 +16,7 @@ class UserManagerTests(TestCase): |
16 | 16 | "first_name": "toto", "last_name": "titi", "tel": "0123456789", |
17 | 17 | "laboratory": "IRAP", "address": "ici"}) |
18 | 18 | self.assertTrue("success" in response.context.keys(), "There should be a success") |
19 | - self.assertEqual(User.objects.count(), 1, "There should be one User") | |
19 | + self.assertEqual(PyrosUser.objects.count(), 1, "There should be one User") | |
20 | 20 | self.assertEqual(PyrosUser.objects.count(), 1, "There should be one PyrosUser") |
21 | 21 | |
22 | 22 | def test_login(self): | ... | ... |