aa-structures 2.12.0__tar.gz → 2.14.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. {aa_structures-2.12.0 → aa_structures-2.14.0}/PKG-INFO +1 -1
  2. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/__init__.py +1 -1
  3. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/admin.py +1 -1
  4. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/app_settings.py +4 -0
  5. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/constants.py +1 -0
  6. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/core/notification_embeds/main.py +58 -31
  7. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/core/notification_embeds/orbital_embeds.py +1 -1
  8. aa_structures-2.14.0/structures/core/notification_embeds/skyhook_embeds.py +89 -0
  9. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/core/notification_embeds/structures_embeds.py +23 -12
  10. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/core/notification_embeds/tower_embeds.py +1 -1
  11. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/core/notification_timers.py +53 -6
  12. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/core/notification_types.py +58 -36
  13. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/managers.py +22 -8
  14. aa_structures-2.14.0/structures/migrations/0007_add_notificationtypes_skyhook_metenox.py +149 -0
  15. aa_structures-2.14.0/structures/migrations/0008_add_notificationtypes_skyhook_metenox.py +149 -0
  16. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/models/owners.py +68 -8
  17. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/models/structures_1.py +5 -0
  18. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/public.html +2 -2
  19. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/structures.html +3 -3
  20. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/core/test_notification_types.py +16 -0
  21. aa_structures-2.12.0/structures/tests/core/test_notifications_timerboard.py → aa_structures-2.14.0/structures/tests/core/test_notifications_timers.py +6 -1
  22. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/integration/test_tasks.py +102 -1
  23. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/integration/test_views.py +1 -1
  24. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/models/test_owners_5.py +135 -1
  25. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/models/test_structures.py +49 -42
  26. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/test_managers_1.py +11 -1
  27. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/testdata/create_eveuniverse.py +6 -1
  28. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/testdata/entities.json +71 -1
  29. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/testdata/eveuniverse.json +6306 -5145
  30. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/testdata/factories.py +21 -0
  31. aa_structures-2.14.0/structures/tests/testdata/generate_notifications.py +164 -0
  32. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/testdata/helpers.py +6 -0
  33. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/views/test_structures.py +12 -4
  34. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/views/structures.py +6 -6
  35. aa_structures-2.12.0/structures/tests/testdata/generate_notifications.py +0 -179
  36. {aa_structures-2.12.0 → aa_structures-2.14.0}/LICENSE +0 -0
  37. {aa_structures-2.12.0 → aa_structures-2.14.0}/README.md +0 -0
  38. {aa_structures-2.12.0 → aa_structures-2.14.0}/pyproject.toml +0 -0
  39. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/apps.py +0 -0
  40. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/auth_hooks.py +0 -0
  41. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/core/__init__.py +0 -0
  42. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/core/notification_embeds/__init__.py +0 -0
  43. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/core/notification_embeds/billing_embeds.py +0 -0
  44. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/core/notification_embeds/corporate_embeds.py +0 -0
  45. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/core/notification_embeds/helpers.py +0 -0
  46. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/core/notification_embeds/moonmining_embeds.py +0 -0
  47. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/core/notification_embeds/sov_embeds.py +0 -0
  48. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/core/notification_embeds/war_embeds.py +0 -0
  49. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/core/serializers.py +0 -0
  50. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/core/sovereignty.py +0 -0
  51. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/core/starbases.py +0 -0
  52. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/forms.py +0 -0
  53. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/helpers.py +0 -0
  54. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/de/LC_MESSAGES/django.mo +0 -0
  55. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/de/LC_MESSAGES/django.po +0 -0
  56. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/django.pot +0 -0
  57. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/en/LC_MESSAGES/django.mo +0 -0
  58. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/en/LC_MESSAGES/django.po +0 -0
  59. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/es/LC_MESSAGES/django.mo +0 -0
  60. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/es/LC_MESSAGES/django.po +0 -0
  61. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/fr_FR/LC_MESSAGES/django.mo +0 -0
  62. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/fr_FR/LC_MESSAGES/django.po +0 -0
  63. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/it_IT/LC_MESSAGES/django.mo +0 -0
  64. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/it_IT/LC_MESSAGES/django.po +0 -0
  65. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/ja/LC_MESSAGES/django.mo +0 -0
  66. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/ja/LC_MESSAGES/django.po +0 -0
  67. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/ko_KR/LC_MESSAGES/django.mo +0 -0
  68. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/ko_KR/LC_MESSAGES/django.po +0 -0
  69. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/ru/LC_MESSAGES/django.mo +0 -0
  70. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/ru/LC_MESSAGES/django.po +0 -0
  71. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/uk/LC_MESSAGES/django.mo +0 -0
  72. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/uk/LC_MESSAGES/django.po +0 -0
  73. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  74. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/locale/zh_Hans/LC_MESSAGES/django.po +0 -0
  75. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/management/commands/__init__.py +0 -0
  76. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/management/commands/structures_load_eve.py +0 -0
  77. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/management/commands/structures_preload_eveuniverse.py +0 -0
  78. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/management/commands/structures_update_poco_planets.py +0 -0
  79. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/migrations/0001_initial_new.py +0 -0
  80. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/migrations/0002_remove_eveuniverse_relation_names.py +0 -0
  81. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/migrations/0003_add_localization_and_unique_key.py +0 -0
  82. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/migrations/0004_improve_localization.py +0 -0
  83. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/migrations/0005_add_notification_types.py +0 -0
  84. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/migrations/0006_add_ownercharacter_disabled.py +0 -0
  85. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/migrations/__init__.py +0 -0
  86. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/models/__init__.py +0 -0
  87. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/models/eveuniverse.py +0 -0
  88. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/models/notifications.py +0 -0
  89. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/models/structures_2.py +0 -0
  90. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/providers.py +0 -0
  91. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/css/global.css +0 -0
  92. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/css/main.css +0 -0
  93. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/css/public.css +0 -0
  94. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/css/statistics.css +0 -0
  95. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/css/structures.css +0 -0
  96. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/bars-rotate-fade-black-36.svg +0 -0
  97. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/bars-rotate-fade-white-36.svg +0 -0
  98. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/eve_symbol_128.png +0 -0
  99. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/0h.png +0 -0
  100. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/0l.png +0 -0
  101. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/0m.png +0 -0
  102. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/0r.png +0 -0
  103. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/0s.png +0 -0
  104. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/1h.png +0 -0
  105. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/1l.png +0 -0
  106. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/1m.png +0 -0
  107. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/1r.png +0 -0
  108. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/2h.png +0 -0
  109. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/2l.png +0 -0
  110. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/2m.png +0 -0
  111. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/2r.png +0 -0
  112. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/3h.png +0 -0
  113. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/3l.png +0 -0
  114. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/3m.png +0 -0
  115. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/3r.png +0 -0
  116. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/4h.png +0 -0
  117. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/4l.png +0 -0
  118. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/4m.png +0 -0
  119. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/4s.png +0 -0
  120. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/5h.png +0 -0
  121. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/5l.png +0 -0
  122. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/5m.png +0 -0
  123. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/5s.png +0 -0
  124. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/6h.png +0 -0
  125. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/6l.png +0 -0
  126. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/6m.png +0 -0
  127. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/7h.png +0 -0
  128. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/7l.png +0 -0
  129. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/7m.png +0 -0
  130. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/8h.png +0 -0
  131. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/8l.png +0 -0
  132. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/8m.png +0 -0
  133. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/blank.png +0 -0
  134. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/circle.png +0 -0
  135. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/dustwheel.png +0 -0
  136. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/h.png +0 -0
  137. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/l.png +0 -0
  138. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/m.png +0 -0
  139. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/noship.png +0 -0
  140. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/r.png +0 -0
  141. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/tyrannis.png +0 -0
  142. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/tyrannis_blue.png +0 -0
  143. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/tyrannis_darkred.png +0 -0
  144. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/tyrannis_default.png +0 -0
  145. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/panel/tyrannis_revelations.png +0 -0
  146. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/img/structures_logo.png +0 -0
  147. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/js/global.js +0 -0
  148. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/js/public.js +0 -0
  149. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/js/statistics.js +0 -0
  150. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/js/structures.js +0 -0
  151. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/vendor/datatables/plugins/dataTables.rowGroup.min.js +0 -0
  152. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/vendor/datatables/plugins/datetime.js +0 -0
  153. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/vendor/datatables/plugins/filterDropDown.min.js +0 -0
  154. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/vendor/datatables/plugins/rowGroup.bootstrap.min.css +0 -0
  155. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/static/structures/vendor/datatables/plugins/rowGroup.dataTables.min.css +0 -0
  156. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tasks.py +0 -0
  157. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/base.html +0 -0
  158. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/modals/fitting_assets.html +0 -0
  159. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/modals/fitting_gfx.html +0 -0
  160. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/modals/poco_details.html +0 -0
  161. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/modals/starbase_detail.html +0 -0
  162. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/modals/structure_details.html +0 -0
  163. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/modals/tab_general_detail.html +0 -0
  164. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/modals/tab_services_detail.html +0 -0
  165. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/partials/menu.html +0 -0
  166. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/partials/public/poco_list.html +0 -0
  167. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/partials/statistics/structure_summary.html +0 -0
  168. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/partials/structures/active_tags.html +0 -0
  169. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/partials/structures/jump_gates_list.html +0 -0
  170. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/partials/structures/poco_list.html +0 -0
  171. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/partials/structures/starbase_list.html +0 -0
  172. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/partials/structures/structure_list.html +0 -0
  173. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/statistics.html +0 -0
  174. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/templatetags/detail_title.html +0 -0
  175. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/templatetags/list_asset.html +0 -0
  176. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/templatetags/list_item.html +0 -0
  177. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/templatetags/list_tax_item.html +0 -0
  178. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templates/structures/templatetags/list_title.html +0 -0
  179. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templatetags/__init__.py +0 -0
  180. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/templatetags/structures.py +0 -0
  181. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/__init__.py +0 -0
  182. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/core/__init__.py +0 -0
  183. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/core/notification_embeds/__init__.py +0 -0
  184. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/core/notification_embeds/test_helpers.py +0 -0
  185. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/core/notification_embeds/test_main.py +0 -0
  186. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/core/test_notification_structuretimers.py +0 -0
  187. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/core/test_serializers.py +0 -0
  188. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/core/test_sovereignty.py +0 -0
  189. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/core/test_starbases.py +0 -0
  190. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/integration/__init__.py +0 -0
  191. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/models/__init__.py +0 -0
  192. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/models/test_eveuniverse.py +0 -0
  193. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/models/test_notifications_1.py +0 -0
  194. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/models/test_notifications_2.py +0 -0
  195. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/models/test_notifications_3.py +0 -0
  196. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/models/test_notifications_discord.py +0 -0
  197. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/models/test_owners_1.py +0 -0
  198. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/models/test_owners_2.py +0 -0
  199. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/models/test_owners_3.py +0 -0
  200. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/models/test_owners_4.py +0 -0
  201. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/models/test_owners_6.py +0 -0
  202. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/test_admin.py +0 -0
  203. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/test_helpers.py +0 -0
  204. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/test_managers_2.py +0 -0
  205. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/test_tasks.py +0 -0
  206. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/testdata/__init__.py +0 -0
  207. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/testdata/esi_data.json +0 -0
  208. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/testdata/generate_notifications_2.py +0 -0
  209. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/testdata/generate_structures.py +0 -0
  210. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/testdata/load_eveuniverse.py +0 -0
  211. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/testdata/tasks_loadtest.py +0 -0
  212. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/testdata/test_generate_structures.py +0 -0
  213. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/views/__init__.py +0 -0
  214. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/views/test_public.py +0 -0
  215. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/views/test_service_status.py +0 -0
  216. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/views/test_statistics.py +0 -0
  217. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/tests/views/utils.py +0 -0
  218. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/urls.py +0 -0
  219. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/views/__init__.py +0 -0
  220. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/views/common.py +0 -0
  221. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/views/public.py +0 -0
  222. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/views/statistics.py +0 -0
  223. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/views/status.py +0 -0
  224. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/webhooks/__init__.py +0 -0
  225. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/webhooks/core.py +0 -0
  226. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/webhooks/managers.py +0 -0
  227. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/webhooks/models.py +0 -0
  228. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/webhooks/tests/__init__.py +0 -0
  229. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/webhooks/tests/test_core.py +0 -0
  230. {aa_structures-2.12.0 → aa_structures-2.14.0}/structures/webhooks/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aa-structures
3
- Version: 2.12.0
3
+ Version: 2.14.0
4
4
  Summary: App for managing Eve Online structures with Alliance Auth.
5
5
  Author-email: Erik Kalkoken <kalkoken87@gmail.com>
6
6
  Requires-Python: >=3.8
@@ -3,5 +3,5 @@
3
3
  # pylint: disable = invalid-name
4
4
  default_app_config = "structures.apps.StructuresConfig"
5
5
 
6
- __version__ = "2.12.0"
6
+ __version__ = "2.14.0"
7
7
  __title__ = "Structures"
@@ -324,7 +324,7 @@ class NotificationBaseAdmin(admin.ModelAdmin):
324
324
  message = format_lazy("{first} {second}", first=first, second=second)
325
325
  else:
326
326
  message = first
327
- message = format_lazy({first})
327
+ message = format_lazy(first)
328
328
  self.message_user(request, message)
329
329
 
330
330
 
@@ -49,6 +49,10 @@ STRUCTURES_FEATURE_REFUELED_NOTIFICATIONS = clean_setting(
49
49
  )
50
50
  """Enable / disable refueled notifications feature."""
51
51
 
52
+ STRUCTURES_FEATURE_SKYHOOKS = clean_setting("STRUCTURES_FEATURE_SKYHOOKS", False)
53
+ """Show skyhooks in structures list."""
54
+
55
+
52
56
  STRUCTURES_FEATURE_STARBASES = clean_setting("STRUCTURES_FEATURE_STARBASES", True)
53
57
  """Enable / disable starbases feature."""
54
58
 
@@ -42,6 +42,7 @@ class EveTypeId(IntEnum):
42
42
  IHUB = 32458
43
43
  JUMP_GATE = 35841
44
44
  LIQUID_OZONE = 16273
45
+ ORBITAL_SKYHOOK = 81080
45
46
  NITROGEN_FUEL_BLOCK = 4051
46
47
  STRONTIUM = 16275
47
48
  TCU = 32226
@@ -19,7 +19,7 @@ from structures.core.notification_types import NotificationType
19
19
  from structures.helpers import get_or_create_eve_entity, is_absolute_url
20
20
  from structures.models.notifications import Notification, NotificationBase, Webhook
21
21
 
22
- from .helpers import target_datetime_formatted
22
+ from .helpers import gen_alliance_link, gen_corporation_link, target_datetime_formatted
23
23
 
24
24
  logger = LoggerAddTag(get_extension_logger(__name__), __title__)
25
25
 
@@ -77,9 +77,9 @@ class NotificationBaseEmbed:
77
77
  damage_text = " | ".join(damage_parts)
78
78
  return damage_text
79
79
 
80
- def get_aggressor_link(self) -> str:
80
+ def gen_aggressor_link(self) -> str:
81
81
  """Returns the aggressor link from a parsed_text for POS and POCOs only."""
82
- if self._data.get("aggressorAllianceID"):
82
+ if key := self._data.get("aggressorAllianceID"):
83
83
  key = "aggressorAllianceID"
84
84
  elif self._data.get("aggressorCorpID"):
85
85
  key = "aggressorCorpID"
@@ -90,6 +90,16 @@ class NotificationBaseEmbed:
90
90
  entity = get_or_create_eve_entity(id=self._data[key])
91
91
  return Webhook.create_link(entity.name, entity.profile_url)
92
92
 
93
+ def gen_attacker_link(self) -> str:
94
+ """Returns the attacker link from a parsed_text for Upwell structures only."""
95
+ if name := self._data.get("allianceName"):
96
+ return gen_alliance_link(name)
97
+
98
+ if name := self._data.get("corpName"):
99
+ return gen_corporation_link(name)
100
+
101
+ return _("(unknown)")
102
+
93
103
  def fuel_expires_target_date(self) -> str:
94
104
  """Return calculated target date when fuel expires. Returns '?' when no data."""
95
105
  if self._structure and self._structure.fuel_expires_at:
@@ -200,6 +210,13 @@ class NotificationBaseEmbed:
200
210
  NotificationOrbitalAttacked,
201
211
  NotificationOrbitalReinforced,
202
212
  )
213
+ from .skyhook_embeds import (
214
+ NotificationSkyhookDeployed,
215
+ NotificationSkyhookDestroyed,
216
+ NotificationSkyhookLostShield,
217
+ NotificationSkyhookOnline,
218
+ NotificationSkyhookUnderAttack,
219
+ )
203
220
  from .sov_embeds import (
204
221
  NotificationSovAllAnchoringMsg,
205
222
  NotificationSovAllClaimAcquiredMsg,
@@ -216,6 +233,8 @@ class NotificationBaseEmbed:
216
233
  NotificationStructureJumpFuelAlert,
217
234
  NotificationStructureLostArmor,
218
235
  NotificationStructureLostShield,
236
+ NotificationStructureLowReagentsAlert,
237
+ NotificationStructureNoReagentsAlert,
219
238
  NotificationStructureOnline,
220
239
  NotificationStructureOwnershipTransferred,
221
240
  NotificationStructureRefueledExtra,
@@ -260,76 +279,84 @@ class NotificationBaseEmbed:
260
279
  NT = NotificationType
261
280
  notif_type_2_class = {
262
281
  # Billing
263
- NT.BILLING_CORP_ALL_BILL_MSG: NotificationCorpAllBillMsg,
264
282
  NT.BILLING_BILL_OUT_OF_MONEY_MSG: NotificationBillingBillOutOfMoneyMsg,
283
+ NT.BILLING_CORP_ALL_BILL_MSG: NotificationCorpAllBillMsg,
265
284
  NT.BILLING_I_HUB_BILL_ABOUT_TO_EXPIRE: NotificationBillingIHubBillAboutToExpire,
266
285
  NT.BILLING_I_HUB_DESTROYED_BY_BILL_FAILURE: NotificationBillingIHubDestroyedByBillFailure,
267
286
  # character
268
- NT.CORP_APP_NEW_MSG: NotificationCorpAppNewMsg,
287
+ NT.CHAR_APP_ACCEPT_MSG: NotificationCharAppAcceptMsg,
288
+ NT.CHAR_APP_WITHDRAW_MSG: NotificationCharAppWithdrawMsg,
289
+ NT.CHAR_LEFT_CORP_MSG: NotificationCharLeftCorpMsg,
269
290
  NT.CORP_APP_INVITED_MSG: NotificationCorpAppInvitedMsg,
291
+ NT.CORP_APP_NEW_MSG: NotificationCorpAppNewMsg,
270
292
  NT.CORP_APP_REJECT_CUSTOM_MSG: NotificationCorpAppRejectCustomMsg,
271
293
  NT.CORP_APP_REJECT_MSG: NotificationCharAppRejectMsg,
272
- NT.CHAR_APP_WITHDRAW_MSG: NotificationCharAppWithdrawMsg,
273
- NT.CHAR_APP_ACCEPT_MSG: NotificationCharAppAcceptMsg,
274
- NT.CHAR_LEFT_CORP_MSG: NotificationCharLeftCorpMsg,
275
294
  # moonmining
276
- NT.MOONMINING_EXTRACTION_STARTED: NotificationMoonminningExtractionStarted,
277
- NT.MOONMINING_EXTRACTION_FINISHED: NotificationMoonminningExtractionFinished,
278
295
  NT.MOONMINING_AUTOMATIC_FRACTURE: NotificationMoonminningAutomaticFracture,
279
296
  NT.MOONMINING_EXTRACTION_CANCELLED: NotificationMoonminningExtractionCanceled,
297
+ NT.MOONMINING_EXTRACTION_FINISHED: NotificationMoonminningExtractionFinished,
298
+ NT.MOONMINING_EXTRACTION_STARTED: NotificationMoonminningExtractionStarted,
280
299
  NT.MOONMINING_LASER_FIRED: NotificationMoonminningLaserFired,
281
300
  # Orbitals
282
301
  NT.ORBITAL_ATTACKED: NotificationOrbitalAttacked,
283
302
  NT.ORBITAL_REINFORCED: NotificationOrbitalReinforced,
284
303
  # Sov
285
- NT.SOV_ENTOSIS_CAPTURE_STARTED: NotificationSovEntosisCaptureStarted,
286
- NT.SOV_COMMAND_NODE_EVENT_STARTED: NotificationSovCommandNodeEventStarted,
304
+ NT.SOV_ALL_ANCHORING_MSG: NotificationSovAllAnchoringMsg,
287
305
  NT.SOV_ALL_CLAIM_ACQUIRED_MSG: NotificationSovAllClaimAcquiredMsg,
288
306
  NT.SOV_ALL_CLAIM_LOST_MSG: NotificationSovAllClaimLostMsg,
289
- NT.SOV_STRUCTURE_REINFORCED: NotificationSovStructureReinforced,
307
+ NT.SOV_COMMAND_NODE_EVENT_STARTED: NotificationSovCommandNodeEventStarted,
308
+ NT.SOV_ENTOSIS_CAPTURE_STARTED: NotificationSovEntosisCaptureStarted,
290
309
  NT.SOV_STRUCTURE_DESTROYED: NotificationSovStructureDestroyed,
291
- NT.SOV_ALL_ANCHORING_MSG: NotificationSovAllAnchoringMsg,
310
+ NT.SOV_STRUCTURE_REINFORCED: NotificationSovStructureReinforced,
292
311
  # Towers
293
312
  NT.TOWER_ALERT_MSG: NotificationTowerAlertMsg,
294
- NT.TOWER_RESOURCE_ALERT_MSG: NotificationTowerResourceAlertMsg,
295
313
  NT.TOWER_REFUELED_EXTRA: NotificationTowerRefueledExtra,
296
314
  NT.TOWER_REINFORCED_EXTRA: NotificationTowerReinforcedExtra,
315
+ NT.TOWER_RESOURCE_ALERT_MSG: NotificationTowerResourceAlertMsg,
316
+ # Skyhooks
317
+ NT.SKYHOOK_DEPLOYED: NotificationSkyhookDeployed,
318
+ NT.SKYHOOK_DESTROYED: NotificationSkyhookDestroyed,
319
+ NT.SKYHOOK_LOST_SHIELDS: NotificationSkyhookLostShield,
320
+ NT.SKYHOOK_ONLINE: NotificationSkyhookOnline,
321
+ NT.SKYHOOK_UNDER_ATTACK: NotificationSkyhookUnderAttack,
297
322
  # Upwell structures
298
- NT.STRUCTURE_ONLINE: NotificationStructureOnline,
323
+ NT.OWNERSHIP_TRANSFERRED: NotificationStructureOwnershipTransferred,
324
+ NT.STRUCTURE_ANCHORING: NotificationStructureAnchoring,
325
+ NT.STRUCTURE_DESTROYED: NotificationStructureDestroyed,
299
326
  NT.STRUCTURE_FUEL_ALERT: NotificationStructureFuelAlert,
300
327
  NT.STRUCTURE_JUMP_FUEL_ALERT: NotificationStructureJumpFuelAlert,
328
+ NT.STRUCTURE_LOST_ARMOR: NotificationStructureLostArmor,
329
+ NT.STRUCTURE_LOST_SHIELD: NotificationStructureLostShield,
330
+ NT.STRUCTURE_LOW_REAGENTS_ALERT: NotificationStructureLowReagentsAlert,
331
+ NT.STRUCTURE_NO_REAGENTS_ALERT: NotificationStructureNoReagentsAlert,
332
+ NT.STRUCTURE_ONLINE: NotificationStructureOnline,
301
333
  NT.STRUCTURE_REFUELED_EXTRA: NotificationStructureRefueledExtra,
334
+ NT.STRUCTURE_REINFORCEMENT_CHANGED: NotificationStructureReinforceChange,
302
335
  NT.STRUCTURE_SERVICES_OFFLINE: NotificationStructureServicesOffline,
303
- NT.STRUCTURE_WENT_LOW_POWER: NotificationStructureWentLowPower,
304
- NT.STRUCTURE_WENT_HIGH_POWER: NotificationStructureWentHighPower,
305
336
  NT.STRUCTURE_UNANCHORING: NotificationStructureUnanchoring,
306
337
  NT.STRUCTURE_UNDER_ATTACK: NotificationStructureUnderAttack,
307
- NT.STRUCTURE_LOST_SHIELD: NotificationStructureLostShield,
308
- NT.STRUCTURE_LOST_ARMOR: NotificationStructureLostArmor,
309
- NT.STRUCTURE_DESTROYED: NotificationStructureDestroyed,
310
- NT.OWNERSHIP_TRANSFERRED: NotificationStructureOwnershipTransferred,
311
- NT.STRUCTURE_ANCHORING: NotificationStructureAnchoring,
312
- NT.STRUCTURE_REINFORCEMENT_CHANGED: NotificationStructureReinforceChange,
338
+ NT.STRUCTURE_WENT_HIGH_POWER: NotificationStructureWentHighPower,
339
+ NT.STRUCTURE_WENT_LOW_POWER: NotificationStructureWentLowPower,
313
340
  # War
314
341
  NT.WAR_ACCEPTED_ALLY: NotificationAcceptedAlly,
342
+ NT.WAR_ALL_WAR_CORP_JOINED_ALLIANCE_MSG: NotificationAllWarCorpJoinedAllianceMsg,
343
+ NT.WAR_ALL_WAR_SURRENDER_MSG: NotificationAllWarSurrenderMsg,
315
344
  NT.WAR_ALLY_JOINED_WAR_AGGRESSOR_MSG: NotificationAllyJoinedWarMsg,
316
345
  NT.WAR_ALLY_JOINED_WAR_ALLY_MSG: NotificationAllyJoinedWarMsg,
317
346
  NT.WAR_ALLY_JOINED_WAR_DEFENDER_MSG: NotificationAllyJoinedWarMsg,
318
- NT.WAR_ALL_WAR_CORP_JOINED_ALLIANCE_MSG: NotificationAllWarCorpJoinedAllianceMsg,
319
- NT.WAR_ALL_WAR_SURRENDER_MSG: NotificationAllWarSurrenderMsg,
347
+ NT.WAR_CORP_WAR_SURRENDER_MSG: NotificationCorpWarSurrenderMsg,
320
348
  NT.WAR_CORPORATION_BECAME_ELIGIBLE: NotificationWarCorporationBecameEligible,
321
349
  NT.WAR_CORPORATION_NO_LONGER_ELIGIBLE: NotificationWarCorporationNoLongerEligible,
322
350
  NT.WAR_DECLARE_WAR: NotificationDeclareWar,
323
- NT.WAR_MERC_OFFERED_NEGOTIATION_MSG: NotificationMercOfferedNegotiationMsg,
324
- NT.WAR_MERC_OFFER_RETRACTED_MSG: NotificationMercOfferRetractedMsg,
325
- NT.WAR_CORP_WAR_SURRENDER_MSG: NotificationCorpWarSurrenderMsg,
326
351
  NT.WAR_HQ_REMOVED_FROM_SPACE: NotificationWarHQRemovedFromSpace,
327
- NT.WAR_OFFERED_TO_ALLY: NotificationOfferedToAlly,
352
+ NT.WAR_INVALID: NotificationWarInvalid,
353
+ NT.WAR_MERC_OFFER_RETRACTED_MSG: NotificationMercOfferRetractedMsg,
354
+ NT.WAR_MERC_OFFERED_NEGOTIATION_MSG: NotificationMercOfferedNegotiationMsg,
328
355
  NT.WAR_OFFERED_SURRENDER: NotificationOfferedSurrender,
356
+ NT.WAR_OFFERED_TO_ALLY: NotificationOfferedToAlly,
329
357
  NT.WAR_WAR_ADOPTED: NotificationWarAdopted,
330
358
  NT.WAR_WAR_DECLARED: NotificationWarDeclared,
331
359
  NT.WAR_WAR_INHERITED: NotificationWarInherited,
332
- NT.WAR_INVALID: NotificationWarInvalid,
333
360
  NT.WAR_WAR_RETRACTED_BY_CONCORD: NotificationWarRetractedByConcord,
334
361
  NT.WAR_WAR_SURRENDER_OFFER_MSG: NotificationWarSurrenderOfferMsg,
335
362
  }
@@ -31,7 +31,7 @@ class NotificationOrbitalEmbed(NotificationBaseEmbed):
31
31
  self._notification.eve_solar_system()
32
32
  )
33
33
  self._owner_link = gen_corporation_link(str(notification.owner))
34
- self._aggressor_link = self.get_aggressor_link()
34
+ self._aggressor_link = self.gen_aggressor_link()
35
35
  self._thumbnail = dhooks_lite.Thumbnail(
36
36
  self._structure_type.icon_url(size=self.ICON_DEFAULT_SIZE)
37
37
  )
@@ -0,0 +1,89 @@
1
+ """Skyhook embeds."""
2
+
3
+ # pylint: disable=missing-class-docstring
4
+
5
+ import dhooks_lite
6
+
7
+ from django.utils.translation import gettext as _
8
+
9
+ from app_utils.datetime import ldap_time_2_datetime
10
+
11
+ from structures.models import Notification, Webhook
12
+
13
+ from .helpers import (
14
+ gen_corporation_link,
15
+ gen_solar_system_text,
16
+ target_datetime_formatted,
17
+ )
18
+ from .main import NotificationBaseEmbed
19
+
20
+
21
+ class NotificationSkyhookEmbed(NotificationBaseEmbed):
22
+ """Base class for most structure related notification embeds."""
23
+
24
+ def __init__(self, n: Notification) -> None:
25
+ super().__init__(n)
26
+ type_ = n.eve_structure_type("typeID")
27
+ solar_system = n.eve_solar_system("solarsystemID")
28
+ self._description = _(
29
+ "The %(structure_type)s at **%(planet)s** "
30
+ "in %(solar_system)s belonging to %(owner_link)s "
31
+ ) % {
32
+ "structure_type": type_,
33
+ "planet": n.eve_planet(),
34
+ "solar_system": gen_solar_system_text(solar_system),
35
+ "owner_link": gen_corporation_link(str(n.owner)),
36
+ }
37
+ self._thumbnail = dhooks_lite.Thumbnail(
38
+ type_.icon_url(size=self.ICON_DEFAULT_SIZE)
39
+ )
40
+
41
+
42
+ class NotificationSkyhookDeployed(NotificationSkyhookEmbed):
43
+ def __init__(self, n: Notification) -> None:
44
+ super().__init__(n)
45
+ self._title = _("Skyhook has started onlining")
46
+ self._description += _("has started onlining.")
47
+ self._color = Webhook.Color.INFO
48
+
49
+
50
+ class NotificationSkyhookDestroyed(NotificationSkyhookEmbed):
51
+ def __init__(self, n: Notification) -> None:
52
+ super().__init__(n)
53
+ self._title = _("Skyhook destroyed")
54
+ self._description += _("has been destroyed.")
55
+ self._color = Webhook.Color.DANGER
56
+
57
+
58
+ class NotificationSkyhookLostShield(NotificationSkyhookEmbed):
59
+ def __init__(self, n: Notification) -> None:
60
+ super().__init__(n)
61
+ self._title = _("Skyhook lost shield")
62
+ timer_ends_at = ldap_time_2_datetime(self._data["timestamp"])
63
+ self._description += _(
64
+ "has lost its shields and is now in reinforcement state until : %s"
65
+ ) % target_datetime_formatted(timer_ends_at)
66
+ self._color = Webhook.Color.DANGER
67
+
68
+
69
+ class NotificationSkyhookOnline(NotificationSkyhookEmbed):
70
+ def __init__(self, n: Notification) -> None:
71
+ super().__init__(n)
72
+ self._title = _("Skyhook online")
73
+ self._description += _("is now online.")
74
+ self._color = Webhook.Color.SUCCESS
75
+
76
+
77
+ class NotificationSkyhookUnderAttack(NotificationSkyhookEmbed):
78
+ def __init__(self, n: Notification) -> None:
79
+ super().__init__(n)
80
+ self._title = _("Skyhook under attack")
81
+ self._description += _(
82
+ "is under attack by %(attacker)s.\n"
83
+ "%(damage_text)s"
84
+ % {
85
+ "attacker": self.gen_attacker_link(),
86
+ "damage_text": self.compile_damage_text("Percentage"),
87
+ }
88
+ )
89
+ self._color = Webhook.Color.DANGER
@@ -14,7 +14,6 @@ from structures.helpers import get_or_create_eve_entity, get_or_create_eve_type
14
14
  from structures.models import Notification, Structure, Webhook
15
15
 
16
16
  from .helpers import (
17
- gen_alliance_link,
18
17
  gen_corporation_link,
19
18
  gen_solar_system_text,
20
19
  target_datetime_formatted,
@@ -165,21 +164,11 @@ class NotificationStructureUnderAttack(NotificationStructureEmbed):
165
164
  super().__init__(notification)
166
165
  self._title = _("Structure under attack")
167
166
  self._description += _("is under attack by %(attacker)s.\n%(damage_text)s") % {
168
- "attacker": self._get_attacker_link(),
167
+ "attacker": self.gen_attacker_link(),
169
168
  "damage_text": self.compile_damage_text("Percentage"),
170
169
  }
171
170
  self._color = Webhook.Color.DANGER
172
171
 
173
- def _get_attacker_link(self) -> str:
174
- """Returns the attacker link from a parsed_text for Upwell structures only."""
175
- if self._data.get("allianceName"):
176
- return gen_alliance_link(self._data["allianceName"])
177
-
178
- if self._data.get("corpName"):
179
- return gen_corporation_link(self._data["corpName"])
180
-
181
- return _("(unknown)")
182
-
183
172
 
184
173
  class NotificationStructureLostShield(NotificationStructureEmbed):
185
174
  def __init__(self, notification: Notification) -> None:
@@ -324,3 +313,25 @@ class NotificationStructureReinforceChange(NotificationBaseEmbed):
324
313
  _("\n\nChange becomes effective at %s.")
325
314
  ) % target_datetime_formatted(change_effective)
326
315
  self._color = Webhook.Color.INFO
316
+
317
+
318
+ class NotificationStructureLowReagentsAlert(NotificationStructureEmbed):
319
+ def __init__(self, notification: Notification) -> None:
320
+ super().__init__(notification)
321
+ self._title = _("Structure low on reagents")
322
+ self._description += _(
323
+ "has insufficient reagents present to support "
324
+ "one full day of moon drill activity."
325
+ )
326
+ self._color = Webhook.Color.WARNING
327
+
328
+
329
+ class NotificationStructureNoReagentsAlert(NotificationStructureEmbed):
330
+ def __init__(self, notification: Notification) -> None:
331
+ super().__init__(notification)
332
+ self._title = _("Structure out of reagents")
333
+ self._description += _(
334
+ "has run out of reagents, "
335
+ "which is preventing further moon material production."
336
+ )
337
+ self._color = Webhook.Color.DANGER
@@ -56,7 +56,7 @@ class NotificationTowerEmbed(NotificationBaseEmbed):
56
56
  class NotificationTowerAlertMsg(NotificationTowerEmbed):
57
57
  def __init__(self, notification: Notification) -> None:
58
58
  super().__init__(notification)
59
- aggressor_link = self.get_aggressor_link()
59
+ aggressor_link = self.gen_aggressor_link()
60
60
  damage_text = self.compile_damage_text("Value", 100)
61
61
  self._title = _("Starbase under attack")
62
62
  self._description += _("is under attack by %(aggressor)s.\n%(damage_text)s") % {
@@ -53,7 +53,9 @@ def add_or_remove_timer(notif: Notification) -> bool:
53
53
  elif notif.notif_type == NotificationType.SOV_STRUCTURE_REINFORCED:
54
54
  timer_processed = _gen_timer_sov_reinforcements(notif)
55
55
  elif notif.notif_type == NotificationType.ORBITAL_REINFORCED:
56
- timer_processed = _gen_timer_orbital_reinforcements(notif)
56
+ timer_processed = _gen_timer_customs_office_reinforcements(notif)
57
+ elif notif.notif_type == NotificationType.SKYHOOK_LOST_SHIELDS:
58
+ timer_processed = _gen_timer_skyhook_reinforcements(notif)
57
59
  elif notif.notif_type in [
58
60
  NotificationType.MOONMINING_EXTRACTION_STARTED,
59
61
  NotificationType.MOONMINING_EXTRACTION_CANCELLED,
@@ -65,9 +67,7 @@ def add_or_remove_timer(notif: Notification) -> bool:
65
67
  elif notif.notif_type == NotificationType.TOWER_REINFORCED_EXTRA:
66
68
  timer_processed = _gen_timer_tower_reinforcements(notif)
67
69
  else:
68
- raise NotImplementedError(
69
- f"Unsupported notification type for timers: {notif.notif_type}"
70
- )
70
+ raise NotImplementedError(notif.notif_type)
71
71
  if timer_processed:
72
72
  logger.info("%s: Created timer for notification", notif.notification_id)
73
73
  notif.is_timer_added = True
@@ -181,8 +181,8 @@ def _gen_timer_sov_reinforcements(notif: Notification) -> bool:
181
181
  return timer_processed
182
182
 
183
183
 
184
- def _gen_timer_orbital_reinforcements(notif: Notification) -> bool:
185
- """Generate timer for orbital reinforcements."""
184
+ def _gen_timer_customs_office_reinforcements(notif: Notification) -> bool:
185
+ """Generate timer for customs office reinforcements."""
186
186
 
187
187
  solar_system = notif.eve_solar_system()
188
188
  planet = notif.eve_planet()
@@ -231,6 +231,53 @@ def _gen_timer_orbital_reinforcements(notif: Notification) -> bool:
231
231
  return timer_processed
232
232
 
233
233
 
234
+ def _gen_timer_skyhook_reinforcements(notif: Notification) -> bool:
235
+ """Generate timer for skyhook reinforcements."""
236
+
237
+ solar_system = notif.eve_solar_system("solarsystemID")
238
+ structure_type = notif.eve_structure_type("typeID")
239
+ planet = notif.eve_planet()
240
+ eve_time = ldap_time_2_datetime(notif.parsed_text()["timestamp"])
241
+ timer_processed = False
242
+
243
+ if AuthTimer:
244
+ AuthTimer.objects.create(
245
+ details=gettext("Final timer"),
246
+ system=solar_system.name,
247
+ planet_moon=planet.name,
248
+ structure="POCO", # Auth timer does not support the Skyhook type yet
249
+ objective="Friendly",
250
+ eve_time=eve_time,
251
+ eve_corp=notif.owner.corporation,
252
+ corp_timer=STRUCTURES_TIMERS_ARE_CORP_RESTRICTED,
253
+ )
254
+ timer_processed = True
255
+
256
+ if Timer:
257
+ visibility = (
258
+ Timer.Visibility.CORPORATION
259
+ if STRUCTURES_TIMERS_ARE_CORP_RESTRICTED
260
+ else Timer.Visibility.UNRESTRICTED
261
+ )
262
+ Timer.objects.create(
263
+ eve_solar_system=solar_system,
264
+ structure_type=structure_type,
265
+ timer_type=Timer.Type.FINAL,
266
+ objective=Timer.Objective.FRIENDLY,
267
+ date=eve_time,
268
+ location_details=planet.name,
269
+ eve_corporation=notif.owner.corporation,
270
+ eve_alliance=notif.owner.corporation.alliance,
271
+ visibility=visibility,
272
+ structure_name=structure_type.name,
273
+ owner_name=notif.owner.corporation.corporation_name,
274
+ details_notes=_timer_details_notes(notif),
275
+ )
276
+ timer_processed = True
277
+
278
+ return timer_processed
279
+
280
+
234
281
  def _gen_timer_moon_extraction(notif: Notification) -> bool:
235
282
  """Generate timer for moon mining extractions."""
236
283
  solar_system = notif.eve_solar_system()
@@ -23,6 +23,12 @@ class NotificationType(models.TextChoices):
23
23
  )
24
24
  STRUCTURE_LOST_ARMOR = "StructureLostArmor", _("Upwell structure lost armor")
25
25
  STRUCTURE_LOST_SHIELD = "StructureLostShields", _("Upwell structure lost shields")
26
+ STRUCTURE_LOW_REAGENTS_ALERT = "StructureLowReagentsAlert", _(
27
+ "Structure low reagents alert"
28
+ )
29
+ STRUCTURE_NO_REAGENTS_ALERT = "StructureNoReagentsAlert", _(
30
+ "Structure no reagents alert"
31
+ )
26
32
  STRUCTURE_ONLINE = "StructureOnline", _("Upwell structure went online")
27
33
  STRUCTURE_REFUELED_EXTRA = "StructureRefueledExtra", _("Upwell structure refueled")
28
34
  STRUCTURE_REINFORCEMENT_CHANGED = "StructuresReinforcementChanged", _(
@@ -42,15 +48,22 @@ class NotificationType(models.TextChoices):
42
48
  "Upwell structure went low power"
43
49
  )
44
50
 
51
+ # Skyhook structures
52
+ SKYHOOK_DEPLOYED = "SkyhookDeployed", _("Skyhook deployed")
53
+ SKYHOOK_DESTROYED = "SkyhookDestroyed", _("Skyhook destroyed")
54
+ SKYHOOK_LOST_SHIELDS = "SkyhookLostShields", _("Skyhook lost shields")
55
+ SKYHOOK_ONLINE = "SkyhookOnline", _("Skyhook online")
56
+ SKYHOOK_UNDER_ATTACK = "SkyhookUnderAttack", _("Skyhook under attack")
57
+
45
58
  # customs offices
46
59
  ORBITAL_ATTACKED = "OrbitalAttacked", _("Customs office attacked")
47
60
  ORBITAL_REINFORCED = "OrbitalReinforced", _("Customs office reinforced")
48
61
 
49
62
  # starbases
50
63
  TOWER_ALERT_MSG = "TowerAlertMsg", _("Starbase attacked")
51
- TOWER_RESOURCE_ALERT_MSG = "TowerResourceAlertMsg", _("Starbase fuel alert")
52
64
  TOWER_REFUELED_EXTRA = "TowerRefueledExtra", _("Starbase refueled (BETA)")
53
65
  TOWER_REINFORCED_EXTRA = "TowerReinforcedExtra", _("Starbase reinforced (BETA)")
66
+ TOWER_RESOURCE_ALERT_MSG = "TowerResourceAlertMsg", _("Starbase fuel alert")
54
67
 
55
68
  # moon mining
56
69
  MOONMINING_AUTOMATIC_FRACTURE = "MoonminingAutomaticFracture", _(
@@ -121,7 +134,7 @@ class NotificationType(models.TextChoices):
121
134
  )
122
135
  WAR_OFFERED_SURRENDER = "OfferedSurrender", _("War offered surrender")
123
136
  WAR_OFFERED_TO_ALLY = "OfferedToAlly", _("War offered to become ally")
124
- WAR_WAR_ADOPTED = "WarAdopted", _("War adopted")
137
+ WAR_WAR_ADOPTED = "WarAdopted", _("War adopted") # FIXME: Should be "WarAdopted "
125
138
  WAR_WAR_DECLARED = "WarDeclared", _("War declared")
126
139
  WAR_WAR_INHERITED = "WarInherited", _("War inherited")
127
140
  WAR_WAR_RETRACTED_BY_CONCORD = "WarRetractedByConcord", _(
@@ -143,8 +156,8 @@ class NotificationType(models.TextChoices):
143
156
  CHAR_LEFT_CORP_MSG = "CharLeftCorpMsg", _("Character leaves corporation")
144
157
 
145
158
  # billing
146
- BILLING_CORP_ALL_BILL_MSG = "CorpAllBillMsg", _("Corp alliance billing message")
147
159
  BILLING_BILL_OUT_OF_MONEY_MSG = "BillOutOfMoneyMsg", _("Bill out of money")
160
+ BILLING_CORP_ALL_BILL_MSG = "CorpAllBillMsg", _("Corp alliance billing message")
148
161
  BILLING_I_HUB_BILL_ABOUT_TO_EXPIRE = (
149
162
  "InfrastructureHubBillAboutToExpire",
150
163
  _("I-HUB bill about to expire"),
@@ -173,35 +186,42 @@ class NotificationType(models.TextChoices):
173
186
  def webhook_defaults(cls) -> List["NotificationType"]:
174
187
  """List of default notifications for new webhooks."""
175
188
  return [
189
+ cls.ORBITAL_ATTACKED,
190
+ cls.ORBITAL_REINFORCED,
191
+ cls.SKYHOOK_DESTROYED,
192
+ cls.SKYHOOK_LOST_SHIELDS,
193
+ cls.SKYHOOK_ONLINE,
194
+ cls.SKYHOOK_UNDER_ATTACK,
195
+ cls.SOV_STRUCTURE_DESTROYED,
196
+ cls.SOV_STRUCTURE_REINFORCED,
176
197
  cls.STRUCTURE_ANCHORING,
177
198
  cls.STRUCTURE_DESTROYED,
178
199
  cls.STRUCTURE_FUEL_ALERT,
179
200
  cls.STRUCTURE_LOST_ARMOR,
180
201
  cls.STRUCTURE_LOST_SHIELD,
202
+ cls.STRUCTURE_LOW_REAGENTS_ALERT,
203
+ cls.STRUCTURE_NO_REAGENTS_ALERT,
181
204
  cls.STRUCTURE_ONLINE,
182
205
  cls.STRUCTURE_SERVICES_OFFLINE,
183
206
  cls.STRUCTURE_UNDER_ATTACK,
184
207
  cls.STRUCTURE_WENT_HIGH_POWER,
185
208
  cls.STRUCTURE_WENT_LOW_POWER,
186
- cls.ORBITAL_ATTACKED,
187
- cls.ORBITAL_REINFORCED,
188
209
  cls.TOWER_ALERT_MSG,
189
210
  cls.TOWER_RESOURCE_ALERT_MSG,
190
- cls.SOV_STRUCTURE_REINFORCED,
191
- cls.SOV_STRUCTURE_DESTROYED,
192
211
  ]
193
212
 
194
213
  @classmethod
195
214
  def relevant_for_timerboard(cls) -> Set["NotificationType"]:
196
215
  """Notification types that can create timers."""
197
216
  return {
198
- cls.STRUCTURE_LOST_SHIELD,
199
- cls.STRUCTURE_LOST_ARMOR,
200
- cls.ORBITAL_REINFORCED,
201
- cls.MOONMINING_EXTRACTION_STARTED,
202
217
  cls.MOONMINING_EXTRACTION_CANCELLED,
218
+ cls.MOONMINING_EXTRACTION_STARTED,
219
+ cls.ORBITAL_REINFORCED,
203
220
  cls.SOV_STRUCTURE_REINFORCED,
221
+ cls.STRUCTURE_LOST_ARMOR,
222
+ cls.STRUCTURE_LOST_SHIELD,
204
223
  cls.TOWER_REINFORCED_EXTRA,
224
+ cls.SKYHOOK_LOST_SHIELDS,
205
225
  }
206
226
 
207
227
  @classmethod
@@ -210,15 +230,15 @@ class NotificationType(models.TextChoices):
210
230
  return {
211
231
  # billing
212
232
  cls.BILLING_BILL_OUT_OF_MONEY_MSG,
213
- cls.BILLING_I_HUB_DESTROYED_BY_BILL_FAILURE,
214
233
  cls.BILLING_I_HUB_BILL_ABOUT_TO_EXPIRE,
234
+ cls.BILLING_I_HUB_DESTROYED_BY_BILL_FAILURE,
215
235
  # sov
216
- cls.SOV_ENTOSIS_CAPTURE_STARTED,
217
- cls.SOV_COMMAND_NODE_EVENT_STARTED,
218
236
  cls.SOV_ALL_CLAIM_ACQUIRED_MSG,
219
- cls.SOV_STRUCTURE_REINFORCED,
220
- cls.SOV_STRUCTURE_DESTROYED,
221
237
  cls.SOV_ALL_CLAIM_LOST_MSG,
238
+ cls.SOV_COMMAND_NODE_EVENT_STARTED,
239
+ cls.SOV_ENTOSIS_CAPTURE_STARTED,
240
+ cls.SOV_STRUCTURE_DESTROYED,
241
+ cls.SOV_STRUCTURE_REINFORCED,
222
242
  # cls.SOV_ALL_ANCHORING_MSG, # This notif is not broadcasted to all corporations
223
243
  # wars
224
244
  cls.WAR_ALLY_JOINED_WAR_AGGRESSOR_MSG,
@@ -238,43 +258,45 @@ class NotificationType(models.TextChoices):
238
258
  def relevant_for_moonmining(cls) -> Set["NotificationType"]:
239
259
  """Notification types about moon mining."""
240
260
  return {
241
- cls.MOONMINING_EXTRACTION_STARTED,
261
+ cls.MOONMINING_AUTOMATIC_FRACTURE,
242
262
  cls.MOONMINING_EXTRACTION_CANCELLED,
243
- cls.MOONMINING_LASER_FIRED,
244
263
  cls.MOONMINING_EXTRACTION_FINISHED,
245
- cls.MOONMINING_AUTOMATIC_FRACTURE,
264
+ cls.MOONMINING_EXTRACTION_STARTED,
265
+ cls.MOONMINING_LASER_FIRED,
246
266
  }
247
267
 
248
268
  @classmethod
249
269
  def structure_related(cls) -> Set["NotificationType"]:
250
270
  """Notification types that are related to a structure."""
251
271
  return {
252
- cls.STRUCTURE_ONLINE,
272
+ cls.MOONMINING_AUTOMATIC_FRACTURE,
273
+ cls.MOONMINING_EXTRACTION_CANCELLED,
274
+ cls.MOONMINING_EXTRACTION_FINISHED,
275
+ cls.MOONMINING_EXTRACTION_STARTED,
276
+ cls.MOONMINING_LASER_FIRED,
277
+ cls.ORBITAL_ATTACKED,
278
+ cls.ORBITAL_REINFORCED,
279
+ cls.OWNERSHIP_TRANSFERRED,
280
+ cls.STRUCTURE_ANCHORING,
281
+ cls.STRUCTURE_DESTROYED,
253
282
  cls.STRUCTURE_FUEL_ALERT,
254
283
  cls.STRUCTURE_JUMP_FUEL_ALERT,
284
+ cls.STRUCTURE_LOST_ARMOR,
285
+ cls.STRUCTURE_LOST_SHIELD,
286
+ cls.STRUCTURE_LOW_REAGENTS_ALERT,
287
+ cls.STRUCTURE_NO_REAGENTS_ALERT,
288
+ cls.STRUCTURE_ONLINE,
255
289
  cls.STRUCTURE_REFUELED_EXTRA,
290
+ cls.STRUCTURE_REINFORCEMENT_CHANGED,
256
291
  cls.STRUCTURE_SERVICES_OFFLINE,
257
- cls.STRUCTURE_WENT_LOW_POWER,
258
- cls.STRUCTURE_WENT_HIGH_POWER,
259
292
  cls.STRUCTURE_UNANCHORING,
260
293
  cls.STRUCTURE_UNDER_ATTACK,
261
- cls.STRUCTURE_LOST_SHIELD,
262
- cls.STRUCTURE_LOST_ARMOR,
263
- cls.STRUCTURE_DESTROYED,
264
- cls.OWNERSHIP_TRANSFERRED,
265
- cls.STRUCTURE_ANCHORING,
266
- cls.MOONMINING_EXTRACTION_STARTED,
267
- cls.MOONMINING_EXTRACTION_FINISHED,
268
- cls.MOONMINING_AUTOMATIC_FRACTURE,
269
- cls.MOONMINING_EXTRACTION_CANCELLED,
270
- cls.MOONMINING_LASER_FIRED,
271
- cls.STRUCTURE_REINFORCEMENT_CHANGED,
272
- cls.ORBITAL_ATTACKED,
273
- cls.ORBITAL_REINFORCED,
294
+ cls.STRUCTURE_WENT_HIGH_POWER,
295
+ cls.STRUCTURE_WENT_LOW_POWER,
274
296
  cls.TOWER_ALERT_MSG,
275
- cls.TOWER_RESOURCE_ALERT_MSG,
276
297
  cls.TOWER_REFUELED_EXTRA,
277
298
  cls.TOWER_REINFORCED_EXTRA,
299
+ cls.TOWER_RESOURCE_ALERT_MSG,
278
300
  }
279
301
 
280
302
  @classmethod