aa-structures 2.12.0__tar.gz → 2.13.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.
- {aa_structures-2.12.0 → aa_structures-2.13.0}/PKG-INFO +1 -1
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/__init__.py +1 -1
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/notification_embeds/main.py +58 -31
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/notification_embeds/orbital_embeds.py +1 -1
- aa_structures-2.13.0/structures/core/notification_embeds/skyhook_embeds.py +89 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/notification_embeds/structures_embeds.py +23 -12
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/notification_embeds/tower_embeds.py +1 -1
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/notification_types.py +57 -36
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/managers.py +9 -6
- aa_structures-2.13.0/structures/migrations/0007_add_notificationtypes_skyhook_metenox.py +149 -0
- aa_structures-2.13.0/structures/migrations/0008_add_notificationtypes_skyhook_metenox.py +149 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/core/test_notification_types.py +16 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/testdata/create_eveuniverse.py +6 -1
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/testdata/entities.json +71 -1
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/testdata/eveuniverse.json +6306 -5145
- aa_structures-2.13.0/structures/tests/testdata/generate_notifications.py +164 -0
- aa_structures-2.12.0/structures/tests/testdata/generate_notifications.py +0 -179
- {aa_structures-2.12.0 → aa_structures-2.13.0}/LICENSE +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/README.md +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/pyproject.toml +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/admin.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/app_settings.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/apps.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/auth_hooks.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/constants.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/__init__.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/notification_embeds/__init__.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/notification_embeds/billing_embeds.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/notification_embeds/corporate_embeds.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/notification_embeds/helpers.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/notification_embeds/moonmining_embeds.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/notification_embeds/sov_embeds.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/notification_embeds/war_embeds.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/notification_timers.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/serializers.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/sovereignty.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/starbases.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/forms.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/helpers.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/de/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/de/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/django.pot +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/en/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/en/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/es/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/es/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/fr_FR/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/fr_FR/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/it_IT/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/it_IT/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/ja/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/ja/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/ko_KR/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/ko_KR/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/ru/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/ru/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/uk/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/uk/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/locale/zh_Hans/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/management/commands/__init__.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/management/commands/structures_load_eve.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/management/commands/structures_preload_eveuniverse.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/management/commands/structures_update_poco_planets.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/migrations/0001_initial_new.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/migrations/0002_remove_eveuniverse_relation_names.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/migrations/0003_add_localization_and_unique_key.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/migrations/0004_improve_localization.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/migrations/0005_add_notification_types.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/migrations/0006_add_ownercharacter_disabled.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/migrations/__init__.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/models/__init__.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/models/eveuniverse.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/models/notifications.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/models/owners.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/models/structures_1.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/models/structures_2.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/providers.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/css/global.css +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/css/main.css +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/css/public.css +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/css/statistics.css +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/css/structures.css +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/bars-rotate-fade-black-36.svg +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/bars-rotate-fade-white-36.svg +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/eve_symbol_128.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/0h.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/0l.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/0m.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/0r.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/0s.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/1h.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/1l.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/1m.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/1r.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/2h.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/2l.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/2m.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/2r.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/3h.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/3l.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/3m.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/3r.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/4h.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/4l.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/4m.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/4s.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/5h.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/5l.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/5m.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/5s.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/6h.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/6l.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/6m.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/7h.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/7l.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/7m.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/8h.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/8l.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/8m.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/blank.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/circle.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/dustwheel.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/h.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/l.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/m.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/noship.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/r.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/tyrannis.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/tyrannis_blue.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/tyrannis_darkred.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/tyrannis_default.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/panel/tyrannis_revelations.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/img/structures_logo.png +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/js/global.js +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/js/public.js +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/js/statistics.js +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/js/structures.js +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/vendor/datatables/plugins/dataTables.rowGroup.min.js +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/vendor/datatables/plugins/datetime.js +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/vendor/datatables/plugins/filterDropDown.min.js +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/vendor/datatables/plugins/rowGroup.bootstrap.min.css +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/static/structures/vendor/datatables/plugins/rowGroup.dataTables.min.css +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tasks.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/base.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/modals/fitting_assets.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/modals/fitting_gfx.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/modals/poco_details.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/modals/starbase_detail.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/modals/structure_details.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/modals/tab_general_detail.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/modals/tab_services_detail.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/partials/menu.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/partials/public/poco_list.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/partials/statistics/structure_summary.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/partials/structures/active_tags.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/partials/structures/jump_gates_list.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/partials/structures/poco_list.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/partials/structures/starbase_list.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/partials/structures/structure_list.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/public.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/statistics.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/structures.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/templatetags/detail_title.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/templatetags/list_asset.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/templatetags/list_item.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/templatetags/list_tax_item.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templates/structures/templatetags/list_title.html +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templatetags/__init__.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/templatetags/structures.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/__init__.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/core/__init__.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/core/notification_embeds/__init__.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/core/notification_embeds/test_helpers.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/core/notification_embeds/test_main.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/core/test_notification_structuretimers.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/core/test_notifications_timerboard.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/core/test_serializers.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/core/test_sovereignty.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/core/test_starbases.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/integration/__init__.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/integration/test_tasks.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/integration/test_views.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/models/__init__.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/models/test_eveuniverse.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/models/test_notifications_1.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/models/test_notifications_2.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/models/test_notifications_3.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/models/test_notifications_discord.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/models/test_owners_1.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/models/test_owners_2.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/models/test_owners_3.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/models/test_owners_4.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/models/test_owners_5.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/models/test_owners_6.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/models/test_structures.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/test_admin.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/test_helpers.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/test_managers_1.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/test_managers_2.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/test_tasks.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/testdata/__init__.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/testdata/esi_data.json +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/testdata/factories.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/testdata/generate_notifications_2.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/testdata/generate_structures.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/testdata/helpers.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/testdata/load_eveuniverse.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/testdata/tasks_loadtest.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/testdata/test_generate_structures.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/views/__init__.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/views/test_public.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/views/test_service_status.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/views/test_statistics.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/views/test_structures.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/tests/views/utils.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/urls.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/views/__init__.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/views/common.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/views/public.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/views/statistics.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/views/status.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/views/structures.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/webhooks/__init__.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/webhooks/core.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/webhooks/managers.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/webhooks/models.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/webhooks/tests/__init__.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/webhooks/tests/test_core.py +0 -0
- {aa_structures-2.12.0 → aa_structures-2.13.0}/structures/webhooks/tests/test_utils.py +0 -0
@@ -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
|
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.
|
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.
|
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.
|
307
|
+
NT.SOV_COMMAND_NODE_EVENT_STARTED: NotificationSovCommandNodeEventStarted,
|
308
|
+
NT.SOV_ENTOSIS_CAPTURE_STARTED: NotificationSovEntosisCaptureStarted,
|
290
309
|
NT.SOV_STRUCTURE_DESTROYED: NotificationSovStructureDestroyed,
|
291
|
-
NT.
|
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.
|
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.
|
308
|
-
NT.
|
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.
|
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.
|
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
|
}
|
{aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/notification_embeds/orbital_embeds.py
RENAMED
@@ -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.
|
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.
|
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
|
{aa_structures-2.12.0 → aa_structures-2.13.0}/structures/core/notification_embeds/tower_embeds.py
RENAMED
@@ -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.
|
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") % {
|
@@ -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,34 +186,40 @@ 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,
|
205
224
|
}
|
206
225
|
|
@@ -210,15 +229,15 @@ class NotificationType(models.TextChoices):
|
|
210
229
|
return {
|
211
230
|
# billing
|
212
231
|
cls.BILLING_BILL_OUT_OF_MONEY_MSG,
|
213
|
-
cls.BILLING_I_HUB_DESTROYED_BY_BILL_FAILURE,
|
214
232
|
cls.BILLING_I_HUB_BILL_ABOUT_TO_EXPIRE,
|
233
|
+
cls.BILLING_I_HUB_DESTROYED_BY_BILL_FAILURE,
|
215
234
|
# sov
|
216
|
-
cls.SOV_ENTOSIS_CAPTURE_STARTED,
|
217
|
-
cls.SOV_COMMAND_NODE_EVENT_STARTED,
|
218
235
|
cls.SOV_ALL_CLAIM_ACQUIRED_MSG,
|
219
|
-
cls.SOV_STRUCTURE_REINFORCED,
|
220
|
-
cls.SOV_STRUCTURE_DESTROYED,
|
221
236
|
cls.SOV_ALL_CLAIM_LOST_MSG,
|
237
|
+
cls.SOV_COMMAND_NODE_EVENT_STARTED,
|
238
|
+
cls.SOV_ENTOSIS_CAPTURE_STARTED,
|
239
|
+
cls.SOV_STRUCTURE_DESTROYED,
|
240
|
+
cls.SOV_STRUCTURE_REINFORCED,
|
222
241
|
# cls.SOV_ALL_ANCHORING_MSG, # This notif is not broadcasted to all corporations
|
223
242
|
# wars
|
224
243
|
cls.WAR_ALLY_JOINED_WAR_AGGRESSOR_MSG,
|
@@ -238,43 +257,45 @@ class NotificationType(models.TextChoices):
|
|
238
257
|
def relevant_for_moonmining(cls) -> Set["NotificationType"]:
|
239
258
|
"""Notification types about moon mining."""
|
240
259
|
return {
|
241
|
-
cls.
|
260
|
+
cls.MOONMINING_AUTOMATIC_FRACTURE,
|
242
261
|
cls.MOONMINING_EXTRACTION_CANCELLED,
|
243
|
-
cls.MOONMINING_LASER_FIRED,
|
244
262
|
cls.MOONMINING_EXTRACTION_FINISHED,
|
245
|
-
cls.
|
263
|
+
cls.MOONMINING_EXTRACTION_STARTED,
|
264
|
+
cls.MOONMINING_LASER_FIRED,
|
246
265
|
}
|
247
266
|
|
248
267
|
@classmethod
|
249
268
|
def structure_related(cls) -> Set["NotificationType"]:
|
250
269
|
"""Notification types that are related to a structure."""
|
251
270
|
return {
|
252
|
-
cls.
|
271
|
+
cls.MOONMINING_AUTOMATIC_FRACTURE,
|
272
|
+
cls.MOONMINING_EXTRACTION_CANCELLED,
|
273
|
+
cls.MOONMINING_EXTRACTION_FINISHED,
|
274
|
+
cls.MOONMINING_EXTRACTION_STARTED,
|
275
|
+
cls.MOONMINING_LASER_FIRED,
|
276
|
+
cls.ORBITAL_ATTACKED,
|
277
|
+
cls.ORBITAL_REINFORCED,
|
278
|
+
cls.OWNERSHIP_TRANSFERRED,
|
279
|
+
cls.STRUCTURE_ANCHORING,
|
280
|
+
cls.STRUCTURE_DESTROYED,
|
253
281
|
cls.STRUCTURE_FUEL_ALERT,
|
254
282
|
cls.STRUCTURE_JUMP_FUEL_ALERT,
|
283
|
+
cls.STRUCTURE_LOST_ARMOR,
|
284
|
+
cls.STRUCTURE_LOST_SHIELD,
|
285
|
+
cls.STRUCTURE_LOW_REAGENTS_ALERT,
|
286
|
+
cls.STRUCTURE_NO_REAGENTS_ALERT,
|
287
|
+
cls.STRUCTURE_ONLINE,
|
255
288
|
cls.STRUCTURE_REFUELED_EXTRA,
|
289
|
+
cls.STRUCTURE_REINFORCEMENT_CHANGED,
|
256
290
|
cls.STRUCTURE_SERVICES_OFFLINE,
|
257
|
-
cls.STRUCTURE_WENT_LOW_POWER,
|
258
|
-
cls.STRUCTURE_WENT_HIGH_POWER,
|
259
291
|
cls.STRUCTURE_UNANCHORING,
|
260
292
|
cls.STRUCTURE_UNDER_ATTACK,
|
261
|
-
cls.
|
262
|
-
cls.
|
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,
|
293
|
+
cls.STRUCTURE_WENT_HIGH_POWER,
|
294
|
+
cls.STRUCTURE_WENT_LOW_POWER,
|
274
295
|
cls.TOWER_ALERT_MSG,
|
275
|
-
cls.TOWER_RESOURCE_ALERT_MSG,
|
276
296
|
cls.TOWER_REFUELED_EXTRA,
|
277
297
|
cls.TOWER_REINFORCED_EXTRA,
|
298
|
+
cls.TOWER_RESOURCE_ALERT_MSG,
|
278
299
|
}
|
279
300
|
|
280
301
|
@classmethod
|
@@ -237,7 +237,7 @@ class StructureQuerySet(models.QuerySet):
|
|
237
237
|
|
238
238
|
def select_related_defaults(self) -> models.QuerySet:
|
239
239
|
"""returns a QuerySet with the default select_related"""
|
240
|
-
return self.select_related(
|
240
|
+
return self.select_related( # pylint: disable=E1102
|
241
241
|
"owner",
|
242
242
|
"owner__corporation",
|
243
243
|
"owner__corporation__alliance",
|
@@ -383,7 +383,9 @@ class StructureManagerBase(models.Manager):
|
|
383
383
|
def update_or_create_from_dict(self, structure: dict, owner) -> Tuple[Any, bool]:
|
384
384
|
"""update or create structure from given dict"""
|
385
385
|
|
386
|
-
eve_type
|
386
|
+
eve_type: EveType = EveType.objects.get_or_create_esi(id=structure["type_id"])[
|
387
|
+
0
|
388
|
+
]
|
387
389
|
eve_solar_system, _ = EveSolarSystem.objects.get_or_create_esi(
|
388
390
|
id=structure["system_id"]
|
389
391
|
)
|
@@ -423,10 +425,11 @@ class StructureManagerBase(models.Manager):
|
|
423
425
|
if old_obj:
|
424
426
|
obj.handle_fuel_notifications(old_obj)
|
425
427
|
|
426
|
-
# Make sure we have dogmas loaded
|
427
|
-
|
428
|
-
|
429
|
-
|
428
|
+
# Make sure we have dogmas loaded with all upwell structures for fittings
|
429
|
+
if eve_type.eve_group.eve_category_id == EveCategoryId.STRUCTURE:
|
430
|
+
EveType.objects.get_or_create_esi(
|
431
|
+
id=structure["type_id"], enabled_sections=[EveType.Section.DOGMAS]
|
432
|
+
)
|
430
433
|
|
431
434
|
self._save_related_structure_services(structure, obj)
|
432
435
|
|