aa-structures 2.16.0__py3-none-any.whl → 3.0.0__py3-none-any.whl

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 (27) hide show
  1. {aa_structures-2.16.0.dist-info → aa_structures-3.0.0.dist-info}/METADATA +5 -4
  2. {aa_structures-2.16.0.dist-info → aa_structures-3.0.0.dist-info}/RECORD +27 -26
  3. {aa_structures-2.16.0.dist-info → aa_structures-3.0.0.dist-info}/WHEEL +1 -1
  4. structures/__init__.py +1 -1
  5. structures/core/notification_embeds/corporate_embeds.py +58 -0
  6. structures/core/notification_embeds/main.py +8 -2
  7. structures/core/notification_types.py +86 -76
  8. structures/core/serializers.py +6 -6
  9. structures/migrations/0009_add_project_goal_notifications.py +152 -0
  10. structures/models/owners.py +1 -1
  11. structures/static/structures/js/public.js +9 -3
  12. structures/static/structures/js/structures.js +5 -1
  13. structures/templates/structures/base.html +39 -6
  14. structures/templates/structures/modals/poco_details.html +15 -15
  15. structures/templates/structures/modals/starbase_detail.html +19 -20
  16. structures/templates/structures/modals/structure_details.html +19 -21
  17. structures/templates/structures/partials/menu.html +2 -2
  18. structures/templates/structures/public.html +28 -34
  19. structures/templates/structures/statistics.html +11 -19
  20. structures/templates/structures/structures.html +89 -99
  21. structures/templates/structures/templatetags/list_asset.html +7 -5
  22. structures/templates/structures/templatetags/list_item.html +3 -3
  23. structures/templates/structures/templatetags/list_tax_item.html +3 -3
  24. structures/templates/structures/templatetags/list_title.html +1 -1
  25. structures/tests/testdata/entities.json +30 -0
  26. structures/tests/testdata/generate_notifications.py +1 -1
  27. {aa_structures-2.16.0.dist-info → aa_structures-3.0.0.dist-info/licenses}/LICENSE +0 -0
@@ -1,13 +1,12 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: aa-structures
3
- Version: 2.16.0
3
+ Version: 3.0.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
7
7
  Description-Content-Type: text/markdown
8
8
  Classifier: Environment :: Web Environment
9
9
  Classifier: Framework :: Django
10
- Classifier: Framework :: Django :: 4.0
11
10
  Classifier: Framework :: Django :: 4.2
12
11
  Classifier: Intended Audience :: End Users/Desktop
13
12
  Classifier: License :: OSI Approved :: MIT License
@@ -17,10 +16,12 @@ Classifier: Programming Language :: Python :: 3.8
17
16
  Classifier: Programming Language :: Python :: 3.9
18
17
  Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
20
  Classifier: Topic :: Internet :: WWW/HTTP
21
21
  Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
22
+ License-File: LICENSE
22
23
  Requires-Dist: allianceauth-app-utils>=1.22
23
- Requires-Dist: allianceauth>=3.0
24
+ Requires-Dist: allianceauth>=4
24
25
  Requires-Dist: dhooks-lite>=1.0
25
26
  Requires-Dist: django-eveuniverse>=1.5.2
26
27
  Requires-Dist: django-multiselectfield
@@ -1,4 +1,4 @@
1
- structures/__init__.py,sha256=Z3bIPmcm4sX1w_r8VxYDVpCP0rbtGGuzUzh7wP8la5c,204
1
+ structures/__init__.py,sha256=p-Kws80XoPuHIk0qVeDd8FLU4GCvqHAoNk9pn-WgZC4,203
2
2
  structures/admin.py,sha256=K7wh8mHFfGHONn7oLdqXsBAxq0rmYrwbZ7S3uIOuMtg,41303
3
3
  structures/app_settings.py,sha256=aWA2bTcv_vVwIyisx-G7GBSpfM6JDyt2MWcXKtHnjK0,6651
4
4
  structures/apps.py,sha256=MNZH9l3qWCwuS7OGiKGkBVrDzKoOFlqwDdEgyEFzxVA,195
@@ -12,15 +12,15 @@ structures/tasks.py,sha256=INZ3soMYHYfxrQsyTO-ozoxbVX6lpMnF3AUo8ybWIoA,9083
12
12
  structures/urls.py,sha256=An5v27AD_NXMNL66cMVtQNci1C_Aqry32rrvDkMpgYo,1467
13
13
  structures/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  structures/core/notification_timers.py,sha256=KLjkVrlCCKTWtHJNUfI3U6ppAIZN8vPnIx1zCafRkKQ,16748
15
- structures/core/notification_types.py,sha256=Ebl4i-mvyGe4luxeNiPmxf7T9bmghe8NU5Giu9pqPCo,13262
16
- structures/core/serializers.py,sha256=4W6kA7mhVvc-1OSiTl_w0rSio_HUsjIBm9qbkEr9vCY,20965
15
+ structures/core/notification_types.py,sha256=AMelkzBgOVcXKQauHEjBkcu5iFcLx6R_e9kXLBasbrs,13676
16
+ structures/core/serializers.py,sha256=E20LHTt24RfjzuDDhXo-K4JjMiZaa5eHdm61YTzpwZo,20989
17
17
  structures/core/sovereignty.py,sha256=XKgjAFO4BfLpEEUz_hBr2DVDnvWBq9sL9EEQiT4T0n0,730
18
18
  structures/core/starbases.py,sha256=nw7skHYATrnAV-zuPAuxmhM5E4Aqjc_DHSU2TYWgBng,1757
19
19
  structures/core/notification_embeds/__init__.py,sha256=30cpjKLZ5_OFtXDACDcjvWQAYszM2BrYxUYb5PRQoTA,131
20
20
  structures/core/notification_embeds/billing_embeds.py,sha256=d9XkTyYH7U3UDZaqXu0WoN0wvlrT2S68Rfn2jEpVtM4,5164
21
- structures/core/notification_embeds/corporate_embeds.py,sha256=mfm6dDrgzupyRZ9TZGXML-UGoY_PymNj9LuR8EthdDA,6098
21
+ structures/core/notification_embeds/corporate_embeds.py,sha256=v1ala3_2czhXRoUEk-XvripsbYyBY0bjci7UjwNTSZQ,8367
22
22
  structures/core/notification_embeds/helpers.py,sha256=0SlrLLFyV0IrdOYfIOLQs0xZgzK8bO7Iroqh7dZnm98,2974
23
- structures/core/notification_embeds/main.py,sha256=B8OReupxjSbtxqw2MXC9qN41A4Bw8x6_n0LIZlfIJxE,17311
23
+ structures/core/notification_embeds/main.py,sha256=QRMbJoOV-Y6mrplJlbJsILN8PhBXHCePEdepyWM6MSw,17658
24
24
  structures/core/notification_embeds/moonmining_embeds.py,sha256=5OJtfwoLE18mB62iwyHTcMo9eOPBC2vQFSjQlDnTcTY,7130
25
25
  structures/core/notification_embeds/orbital_embeds.py,sha256=abU9eN7-4FV2wm6IbZt5O0hQZ09hdrkSJ4JaKLBksTE,2864
26
26
  structures/core/notification_embeds/skyhook_embeds.py,sha256=Wl7G3jYin8IfSPFWfoBHndtvxiOUTIboD9xfJ1VJd_4,3019
@@ -61,11 +61,12 @@ structures/migrations/0005_add_notification_types.py,sha256=aIgNZN4Gsvh9GiJ0i4Xm
61
61
  structures/migrations/0006_add_ownercharacter_disabled.py,sha256=yfcuwWHdSoF7HTEzdtQ1bGhI-K78SxCeE3g3z6UjbqI,726
62
62
  structures/migrations/0007_add_notificationtypes_skyhook_metenox.py,sha256=5qxb2AyZyyHFAU39ScFW4eCHHWBL9lMszt0MzXJu4RM,7835
63
63
  structures/migrations/0008_add_notificationtypes_skyhook_metenox.py,sha256=5QtcYJR7krqKheJ-vBb7QT771mK39aET7F07hhMy9q4,7844
64
+ structures/migrations/0009_add_project_goal_notifications.py,sha256=ig0ZLIvoml2WTBRp2-5nEI57P5nKSJGf1y7hAlGG2I0,8074
64
65
  structures/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
65
66
  structures/models/__init__.py,sha256=Da0-Z4BtsZ_mlnI6XtyvoE0UtTuOA0psGCuVhVPVKrM,916
66
67
  structures/models/eveuniverse.py,sha256=vTIfzZL9guEDuZHQvRdG6pI4zSEdMqfVE-2SkHdqbRo,2213
67
68
  structures/models/notifications.py,sha256=HwQc-ChdP0ULuJgxUym9_CBsCWCmcHT7whlk9tB2vzw,35364
68
- structures/models/owners.py,sha256=Oxs9LDtoKRvpqGtvZehNDyBPKgW_UIrUntZPe6LVPzY,59611
69
+ structures/models/owners.py,sha256=yXeP21KkdpNdO6yqKLoEMfYVA72uVaCvBmq0e19Qm78,59611
69
70
  structures/models/structures_1.py,sha256=zk380uG2DuQ7exO7THbq5TE5Ro2jr6EyVCIxRJXHIJI,29958
70
71
  structures/models/structures_2.py,sha256=g5Pct5jNmZC-n7fnpLs5UyiP9JLrGdI1vjYucHTV_wQ,10371
71
72
  structures/static/structures/css/global.css,sha256=R4LEH9PwLoN77qkqBK7u2y_vzRC3fq8X_zKnAW7yhiA,1165
@@ -125,26 +126,26 @@ structures/static/structures/img/panel/tyrannis_darkred.png,sha256=CwCeqXvr6Nm-K
125
126
  structures/static/structures/img/panel/tyrannis_default.png,sha256=18TntkT7i0YZHZ-v9D_-glKHDKYEA0rSTjXMqwXFy0Q,38343
126
127
  structures/static/structures/img/panel/tyrannis_revelations.png,sha256=mnaL5lt-1D-Do7sb77QJDc3EPtoynz207Z932S09is0,42868
127
128
  structures/static/structures/js/global.js,sha256=DK1IZs-SePAO00WVTo03iOcw1CfT43ET2X7a4givvgk,1842
128
- structures/static/structures/js/public.js,sha256=b7CnBNpjffMmvQ022_vb6RfVmnyoH2bAmA0JIUFiw2s,3746
129
+ structures/static/structures/js/public.js,sha256=Bxi2BOE2H9fxzlC9U4qiboKqUDXy8MMGC5elvWKiFeE,3970
129
130
  structures/static/structures/js/statistics.js,sha256=qSfjy3opXq9XQ1Fp1yXA0dbk6JylgavpJpVIPfRZ9x8,2857
130
- structures/static/structures/js/structures.js,sha256=YccSuNWXvCs5WNitWy7NdC-nIHlCu2-LCjPAWbApJSk,15089
131
+ structures/static/structures/js/structures.js,sha256=RPgdyQHPssY1VcaPMdkTFiKeRuZGz1r-T3CWm3Fn83w,15240
131
132
  structures/static/structures/vendor/datatables/plugins/dataTables.rowGroup.min.js,sha256=TqdVnz3vX_H-UpCbPy3eqKY7poGMHGkKud7oBnHu9eY,5573
132
133
  structures/static/structures/vendor/datatables/plugins/datetime.js,sha256=yJzBU69oWEoQI16MOC18R2vrPpzqPGrGmtFhR6UT30A,3908
133
134
  structures/static/structures/vendor/datatables/plugins/filterDropDown.min.js,sha256=_ZGm5gV7NHq3wulljXeipLvpJi0SNEI4mydoEUCXIeQ,2529
134
135
  structures/static/structures/vendor/datatables/plugins/rowGroup.bootstrap.min.css,sha256=mfb-mieZDwLASMlQTUNXrZQr8OXvQyEDfV3Xz3E7DSU,384
135
136
  structures/static/structures/vendor/datatables/plugins/rowGroup.dataTables.min.css,sha256=mfb-mieZDwLASMlQTUNXrZQr8OXvQyEDfV3Xz3E7DSU,384
136
- structures/templates/structures/base.html,sha256=ND0JjP2Pa537FXOrIj3cziHfDbTh0ZNzrLFJ_zpVhw8,337
137
- structures/templates/structures/public.html,sha256=R3kjhr1MLC5r9r8L3t-1-Nh7-ngKbRiiZNIwgpsGg70,3239
138
- structures/templates/structures/statistics.html,sha256=rVI_wPW4VXIO3IoWna8_GoqWCc5ra-6Jc9iekfusS78,1736
139
- structures/templates/structures/structures.html,sha256=q0c7Wlaxvt2dg1B236JIEmmSBgQyX5F_QlBLokt-W0E,8329
137
+ structures/templates/structures/base.html,sha256=uefphR7JSABi6BtoOzx4t4cMBCMqelVPNpMYESe27xI,1711
138
+ structures/templates/structures/public.html,sha256=P93tur3mxlx-MwTfGPu6KBlxBfMVV2WnnJJdGOF5tQI,3219
139
+ structures/templates/structures/statistics.html,sha256=2AVIeznBQCaJc-z7kxNSx3pxSdLW5Y81AiISbvUTAPE,1644
140
+ structures/templates/structures/structures.html,sha256=BfzIj_i6jYLOQNXx_aopIv7PJAD-MEyXVuLM4b02vAQ,8138
140
141
  structures/templates/structures/modals/fitting_assets.html,sha256=0GSpDAk-wgvaZdxM9JzteUYhoPsek5y-L4TdG2q5Sbg,264
141
142
  structures/templates/structures/modals/fitting_gfx.html,sha256=hmdU1Zv09woGKigUugbBRxScKQun8l81yEPUMGrok2g,9530
142
- structures/templates/structures/modals/poco_details.html,sha256=uwaEM0jDvkdu_Lff2mUKwm7pn1KXePcgN9yBwFHsQO4,2705
143
- structures/templates/structures/modals/starbase_detail.html,sha256=qfFayAyzL1Sa20NVhK-O4gnfASQQ-zvR-0Q8FyAwBQc,4133
144
- structures/templates/structures/modals/structure_details.html,sha256=lA6PoGPECv7c3MPBiF059gjYTwvjTOGspgfldC1gb2s,4102
143
+ structures/templates/structures/modals/poco_details.html,sha256=oiaSEMF9HiojXHbN2OjHmK5nPuWRR4mZBgB9ySYNrAY,2835
144
+ structures/templates/structures/modals/starbase_detail.html,sha256=-mOo5zMGClZ2oRjVQS440n55ipHM8rU2O8wVPuI3OmI,4383
145
+ structures/templates/structures/modals/structure_details.html,sha256=zY3X_LFmrj2c3bUevSDd10qzmR1rsHqtgkDbSI_e8Xc,4339
145
146
  structures/templates/structures/modals/tab_general_detail.html,sha256=oX3Aa3RrjfWXUDiQgxB7HN-6ILJDL0fZuf85_0Kua5w,2324
146
147
  structures/templates/structures/modals/tab_services_detail.html,sha256=fd-KhwR0ARF3hFCPXCjirpBHgdZv-RgoXzHMYUe0vSQ,596
147
- structures/templates/structures/partials/menu.html,sha256=pxN_Tvo_vON0Fauyg_XPYlE6R6kaKRNFfhkLszIAMJI,2329
148
+ structures/templates/structures/partials/menu.html,sha256=rSsemMJclo_O33V9NaGRMa39tZizpwZXHXvkfUAYknM,2335
148
149
  structures/templates/structures/partials/public/poco_list.html,sha256=tVAsGXS7rh7Qr5x2X26buyt7jwJJ-YoNLs9eMs0gDM4,1222
149
150
  structures/templates/structures/partials/statistics/structure_summary.html,sha256=ZCEBOPhfOUyih7C8TzaQi9OI2AsMzZGBb9ZGHsShzmk,1133
150
151
  structures/templates/structures/partials/structures/active_tags.html,sha256=KhYA6LbAqg-iJJ2J4BGACXdbdiZFM4wAgDEq2RQEu0s,106
@@ -153,10 +154,10 @@ structures/templates/structures/partials/structures/orbital_list.html,sha256=uWV
153
154
  structures/templates/structures/partials/structures/starbase_list.html,sha256=Djl3nsTSn9TIZ6k4F0hiF-qDv_rLiVSIapnWUz0bvqU,1412
154
155
  structures/templates/structures/partials/structures/structure_list.html,sha256=2EHP1xJrmDNhwENhxGY3L6YbC53qFwhnDHcFzxkNXpI,1421
155
156
  structures/templates/structures/templatetags/detail_title.html,sha256=PWoYNZhTt1ngDEdz_B4TlyC7duO-8MxgznSUb27lUDA,117
156
- structures/templates/structures/templatetags/list_asset.html,sha256=6wWndrdBlWbOMIQlGaqeUtSfk-c6F3ZQMYErZJ4H7SM,375
157
- structures/templates/structures/templatetags/list_item.html,sha256=vWOvGx-QEjsno-iqSJrfv_ip4VphoVVV0-FIngqnK5Q,706
158
- structures/templates/structures/templatetags/list_tax_item.html,sha256=K5XSYY5UyNx_o3GWN_WLyObxb0mDcmCJkztc20sTC0Q,505
159
- structures/templates/structures/templatetags/list_title.html,sha256=C2NWwo27TGfGsQo4BgSD_2A6TemcR4DEwb04tSN_hEM,68
157
+ structures/templates/structures/templatetags/list_asset.html,sha256=loGzJwxp--c3nYAukAAGqfp4_hcBddoWgbooLLPDI1A,414
158
+ structures/templates/structures/templatetags/list_item.html,sha256=jhl2Clt6fmLSQPidTqkgwTk2gZmwx7aWTQ7ClQSwwyM,706
159
+ structures/templates/structures/templatetags/list_tax_item.html,sha256=Cs9KDpCaiC-hyBqETbWObSnepn1lpRBjto33OY_X4x0,505
160
+ structures/templates/structures/templatetags/list_title.html,sha256=IzRlAPQ1cDDXnhpEO2CtD_GIfHrh-wy06LeOZP3KmNw,52
160
161
  structures/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
161
162
  structures/templatetags/structures.py,sha256=vSt5AnfYuo11q1SxiskT4oshSMsZ9ZgM0nYpYiMl8bA,1637
162
163
  structures/tests/__init__.py,sha256=9MrJzKr8DdsQY3-79v188pTpwqT4TDQ46vKnBJAGqic,75
@@ -194,11 +195,11 @@ structures/tests/models/test_structures.py,sha256=iCCa0yYyPHieNfj8TQbdoIv141oLc6
194
195
  structures/tests/testdata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
195
196
  structures/tests/testdata/constants.py,sha256=iab-9cHjAO4RBM88UeWbBypRm9qoZcViwZ8BPY17p1Q,441
196
197
  structures/tests/testdata/create_eveuniverse.py,sha256=a5DHYAxxsytOeevAL53RDoeDWObKwViqfpXRlmZeOHY,2157
197
- structures/tests/testdata/entities.json,sha256=vmb0uhwTpD0gycGAakgYidr3qSbnHiMubAd4u7T2l70,36053
198
+ structures/tests/testdata/entities.json,sha256=G4OyYlrAbUa0eY1PZgA-K-77c-w5TrDvoF-dI-duNSo,37358
198
199
  structures/tests/testdata/esi_data.json,sha256=DX47oSlRZIPxlPueMfiNElbZbAip2cp3LAUmv8GAPJ0,13864
199
200
  structures/tests/testdata/eveuniverse.json,sha256=7RA5qeaPYx78Mk5_zixL2XYd-Oa4omhUihjgAbgNLyc,1616628
200
201
  structures/tests/testdata/factories.py,sha256=UF7Zao2-DjVFLZLEBWaJv4Pg1uw5D6p0TO8ZKuoAI_8,25293
201
- structures/tests/testdata/generate_notifications.py,sha256=lhcnbsnE4O6g0OFUAYO2sCfu8vmwBcFtxn-TuTLtFnM,5417
202
+ structures/tests/testdata/generate_notifications.py,sha256=MmgG8N-0k1WMNJ_r1TEnbDwLs4su6--gUEZ3lJ6qhOk,5416
202
203
  structures/tests/testdata/generate_notifications_2.py,sha256=mdoGXd9vgy_opmrwTr9MfGe-QieHV4BHtRA7VFzxFKM,1413
203
204
  structures/tests/testdata/generate_structures.py,sha256=4p2ypDj-goniBnraTP2KfWzEX3YLj0qhKPNTfCXy05g,9134
204
205
  structures/tests/testdata/helpers.py,sha256=FSlg7-6Dn3aMQnQPUnH9o9r8WsV1_BYxElm-E9x_5uo,6316
@@ -224,7 +225,7 @@ structures/webhooks/models.py,sha256=kUkt9rnRQIJIrU9Bjcs34rvkb-TMbUubHdn-kny08kI
224
225
  structures/webhooks/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
225
226
  structures/webhooks/tests/test_core.py,sha256=4NcEAQgK2KhQkFOxYh2ad0S-qUWh1DNGDmLo5Mo5opI,6762
226
227
  structures/webhooks/tests/test_utils.py,sha256=ekADFv0JOEtXeqdiejbeqrABO__Q1flJHzVieQ7L9e0,459
227
- aa_structures-2.16.0.dist-info/LICENSE,sha256=XZiwB_S_40_HhnvLg5xvtBb3g1oGjPrk0rpFwk8iInE,1070
228
- aa_structures-2.16.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
229
- aa_structures-2.16.0.dist-info/METADATA,sha256=1Aqt2HSauvphDqPjDpuv3s2Pkht-0ezvNuQWA7Op4hI,5972
230
- aa_structures-2.16.0.dist-info/RECORD,,
228
+ aa_structures-3.0.0.dist-info/licenses/LICENSE,sha256=XZiwB_S_40_HhnvLg5xvtBb3g1oGjPrk0rpFwk8iInE,1070
229
+ aa_structures-3.0.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
230
+ aa_structures-3.0.0.dist-info/METADATA,sha256=OyAeM44w8YCHpim9bIhelwPeDXb45WR3PkJkXx3mCX0,6003
231
+ aa_structures-3.0.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: flit 3.9.0
2
+ Generator: flit 3.12.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
structures/__init__.py CHANGED
@@ -3,5 +3,5 @@
3
3
  # pylint: disable = invalid-name
4
4
  default_app_config = "structures.apps.StructuresConfig"
5
5
 
6
- __version__ = "2.16.0"
6
+ __version__ = "3.0.0"
7
7
  __title__ = "Structures"
@@ -157,3 +157,61 @@ class NotificationCharLeftCorpMsg(NotificationCorpCharEmbed):
157
157
  "corporation_name": self._corporation_link,
158
158
  }
159
159
  self._color = Webhook.Color.INFO
160
+
161
+
162
+ class NotificationCorpGoalEmbed(NotificationBaseEmbed):
163
+ def __init__(self, notification: Notification) -> None:
164
+ super().__init__(notification)
165
+ self._creator = get_or_create_eve_entity(id=self._data["creator_id"])
166
+ self._creator_link = gen_eve_entity_link(self._creator)
167
+ self._corporation = get_or_create_eve_entity(id=self._data["corporation_id"])
168
+ self._goal_name = self._data["goal_name"]
169
+ self._thumbnail = dhooks_lite.Thumbnail(
170
+ self._corporation.icon_url(size=self.ICON_DEFAULT_SIZE)
171
+ )
172
+
173
+
174
+ class NotificationCorpGoalClosed(NotificationCorpGoalEmbed):
175
+ def __init__(self, notification: Notification) -> None:
176
+ super().__init__(notification)
177
+ self._title = _("Project canceled")
178
+ closer = get_or_create_eve_entity(id=self._data["closer_id"])
179
+ self._description = _(
180
+ "Project **%(goal_name)s** has ben closed by %(closer)s "
181
+ "and will not accept further contributions."
182
+ % {
183
+ "goal_name": self._goal_name,
184
+ "closer": gen_eve_entity_link(closer),
185
+ }
186
+ )
187
+ self._color = Webhook.Color.INFO
188
+
189
+
190
+ class NotificationCorpGoalCompleted(NotificationCorpGoalEmbed):
191
+ def __init__(self, notification: Notification) -> None:
192
+ super().__init__(notification)
193
+ self._title = _("Project completed")
194
+ self._description = _(
195
+ "Project **%(goal_name)s** created by %(creator)s "
196
+ "has been successfully completed after reaching it's target."
197
+ % {
198
+ "goal_name": self._goal_name,
199
+ "creator": self._creator_link,
200
+ }
201
+ )
202
+ self._color = Webhook.Color.SUCCESS
203
+
204
+
205
+ class NotificationCorpGoalCreated(NotificationCorpGoalEmbed):
206
+ def __init__(self, notification: Notification) -> None:
207
+ super().__init__(notification)
208
+ self._title = _("New Project Available")
209
+ self._description = _(
210
+ "Project **%(goal_name)s** has been created by %(creator)s "
211
+ "and is open for contributions."
212
+ % {
213
+ "goal_name": self._goal_name,
214
+ "creator": self._creator_link,
215
+ }
216
+ )
217
+ self._color = Webhook.Color.INFO
@@ -1,4 +1,4 @@
1
- """Billing embeds."""
1
+ """Dispatcher for all embeds."""
2
2
 
3
3
  # pylint: disable=missing-class-docstring
4
4
 
@@ -198,6 +198,9 @@ class NotificationBaseEmbed:
198
198
  NotificationCorpAppInvitedMsg,
199
199
  NotificationCorpAppNewMsg,
200
200
  NotificationCorpAppRejectCustomMsg,
201
+ NotificationCorpGoalClosed,
202
+ NotificationCorpGoalCompleted,
203
+ NotificationCorpGoalCreated,
201
204
  )
202
205
  from .moonmining_embeds import (
203
206
  NotificationMoonminningAutomaticFracture,
@@ -283,7 +286,7 @@ class NotificationBaseEmbed:
283
286
  NT.BILLING_CORP_ALL_BILL_MSG: NotificationCorpAllBillMsg,
284
287
  NT.BILLING_I_HUB_BILL_ABOUT_TO_EXPIRE: NotificationBillingIHubBillAboutToExpire,
285
288
  NT.BILLING_I_HUB_DESTROYED_BY_BILL_FAILURE: NotificationBillingIHubDestroyedByBillFailure,
286
- # character
289
+ # Corporate
287
290
  NT.CHAR_APP_ACCEPT_MSG: NotificationCharAppAcceptMsg,
288
291
  NT.CHAR_APP_WITHDRAW_MSG: NotificationCharAppWithdrawMsg,
289
292
  NT.CHAR_LEFT_CORP_MSG: NotificationCharLeftCorpMsg,
@@ -291,6 +294,9 @@ class NotificationBaseEmbed:
291
294
  NT.CORP_APP_NEW_MSG: NotificationCorpAppNewMsg,
292
295
  NT.CORP_APP_REJECT_CUSTOM_MSG: NotificationCorpAppRejectCustomMsg,
293
296
  NT.CORP_APP_REJECT_MSG: NotificationCharAppRejectMsg,
297
+ NT.CORPORATION_GOAL_CLOSED: NotificationCorpGoalClosed,
298
+ NT.CORPORATION_GOAL_COMPLETED: NotificationCorpGoalCompleted,
299
+ NT.CORPORATION_GOAL_CREATED: NotificationCorpGoalCreated,
294
300
  # moonmining
295
301
  NT.MOONMINING_AUTOMATIC_FRACTURE: NotificationMoonminningAutomaticFracture,
296
302
  NT.MOONMINING_EXTRACTION_CANCELLED: NotificationMoonminningExtractionCanceled,
@@ -11,61 +11,42 @@ from structures.app_settings import STRUCTURES_FEATURE_REFUELED_NOTIFICATIONS
11
11
  class NotificationType(models.TextChoices):
12
12
  """Definition of all supported notification types."""
13
13
 
14
- # upwell structures
15
- OWNERSHIP_TRANSFERRED = "OwnershipTransferred", _(
16
- "Upwell structure ownership transferred"
17
- )
18
- STRUCTURE_ANCHORING = "StructureAnchoring", _("Upwell structure anchoring")
19
- STRUCTURE_DESTROYED = "StructureDestroyed", _("Upwell structure destroyed")
20
- STRUCTURE_FUEL_ALERT = "StructureFuelAlert", _("Upwell structure fuel alert")
21
- STRUCTURE_JUMP_FUEL_ALERT = "StructureJumpFuelAlert", _(
22
- "Upwell structure jump fuel alert"
23
- )
24
- STRUCTURE_LOST_ARMOR = "StructureLostArmor", _("Upwell structure lost armor")
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
- )
32
- STRUCTURE_ONLINE = "StructureOnline", _("Upwell structure went online")
33
- STRUCTURE_REFUELED_EXTRA = "StructureRefueledExtra", _("Upwell structure refueled")
34
- STRUCTURE_REINFORCEMENT_CHANGED = "StructuresReinforcementChanged", _(
35
- "Upwell structure reinforcement time changed"
36
- )
37
- STRUCTURE_SERVICES_OFFLINE = "StructureServicesOffline", _(
38
- "Upwell structure services went offline"
14
+ # billing
15
+ BILLING_BILL_OUT_OF_MONEY_MSG = "BillOutOfMoneyMsg", _("Bill out of money")
16
+ BILLING_CORP_ALL_BILL_MSG = "CorpAllBillMsg", _("Corp alliance billing message")
17
+ BILLING_I_HUB_BILL_ABOUT_TO_EXPIRE = (
18
+ "InfrastructureHubBillAboutToExpire",
19
+ _("I-HUB bill about to expire"),
39
20
  )
40
- STRUCTURE_UNANCHORING = "StructureUnanchoring", _("Upwell structure unanchoring")
41
- STRUCTURE_UNDER_ATTACK = "StructureUnderAttack", _(
42
- "Upwell structure is under attack"
21
+ BILLING_I_HUB_DESTROYED_BY_BILL_FAILURE = (
22
+ "IHubDestroyedByBillFailure",
23
+ _("I_HUB destroyed by bill failure"),
43
24
  )
44
- STRUCTURE_WENT_HIGH_POWER = "StructureWentHighPower", _(
45
- "Upwell structure went high power"
25
+
26
+ # Corporation Membership
27
+ CHAR_APP_ACCEPT_MSG = "CharAppAcceptMsg", _("Character joins corporation")
28
+ CORP_APP_INVITED_MSG = "CorpAppInvitedMsg", _(
29
+ "Character invited to join corporation"
46
30
  )
47
- STRUCTURE_WENT_LOW_POWER = "StructureWentLowPower", _(
48
- "Upwell structure went low power"
31
+ CORP_APP_NEW_MSG = "CorpAppNewMsg", _("Character submitted application")
32
+ CORP_APP_REJECT_MSG = "CharAppRejectMsg", _("Corp application rejected message")
33
+ CORP_APP_REJECT_CUSTOM_MSG = "CorpAppRejectCustomMsg", _(
34
+ "Corp application rejected custom message"
49
35
  )
36
+ CHAR_APP_WITHDRAW_MSG = "CharAppWithdrawMsg", _("Character withdrew application")
37
+ CHAR_LEFT_CORP_MSG = "CharLeftCorpMsg", _("Character leaves corporation")
50
38
 
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
-
58
- # customs offices
59
- ORBITAL_ATTACKED = "OrbitalAttacked", _("Customs office attacked")
60
- ORBITAL_REINFORCED = "OrbitalReinforced", _("Customs office reinforced")
39
+ # Corporation Goals
40
+ CORPORATION_GOAL_CLOSED = "CorporationGoalClosed", _("Corporation goal closed")
41
+ CORPORATION_GOAL_COMPLETED = "CorporationGoalCompleted", _(
42
+ "Corporation goal completed"
43
+ )
44
+ CORPORATION_GOAL_CREATED = "CorporationGoalCreated", _("Corporation goal created")
45
+ # CORPORATION_GOAL_NAME_CHANGE = "CorporationGoalNameChange", _(
46
+ # "Corporation goal name change"
47
+ # )
61
48
 
62
- # starbases
63
- TOWER_ALERT_MSG = "TowerAlertMsg", _("Starbase attacked")
64
- TOWER_REFUELED_EXTRA = "TowerRefueledExtra", _("Starbase refueled (BETA)")
65
- TOWER_REINFORCED_EXTRA = "TowerReinforcedExtra", _("Starbase reinforced (BETA)")
66
- TOWER_RESOURCE_ALERT_MSG = "TowerResourceAlertMsg", _("Starbase fuel alert")
67
-
68
- # moon mining
49
+ # Moon Mining
69
50
  MOONMINING_AUTOMATIC_FRACTURE = "MoonminingAutomaticFracture", _(
70
51
  "Moon mining automatic fracture triggered"
71
52
  )
@@ -80,7 +61,18 @@ class NotificationType(models.TextChoices):
80
61
  )
81
62
  MOONMINING_LASER_FIRED = "MoonminingLaserFired", _("Moonmining laser fired")
82
63
 
83
- # sov
64
+ # Skyhook structures
65
+ SKYHOOK_DEPLOYED = "SkyhookDeployed", _("Skyhook deployed")
66
+ SKYHOOK_DESTROYED = "SkyhookDestroyed", _("Skyhook destroyed")
67
+ SKYHOOK_LOST_SHIELDS = "SkyhookLostShields", _("Skyhook lost shields")
68
+ SKYHOOK_ONLINE = "SkyhookOnline", _("Skyhook online")
69
+ SKYHOOK_UNDER_ATTACK = "SkyhookUnderAttack", _("Skyhook under attack")
70
+
71
+ # Orbitals
72
+ ORBITAL_ATTACKED = "OrbitalAttacked", _("Customs office attacked")
73
+ ORBITAL_REINFORCED = "OrbitalReinforced", _("Customs office reinforced")
74
+
75
+ # Sov
84
76
  SOV_ALL_CLAIM_ACQUIRED_MSG = "SovAllClaimAquiredMsg", _(
85
77
  "Sovereignty claim acknowledgment" # SovAllClaimAquiredMsg [sic!]
86
78
  )
@@ -101,7 +93,50 @@ class NotificationType(models.TextChoices):
101
93
  "Sovereignty command node event started"
102
94
  )
103
95
 
104
- # wars
96
+ # Starbases
97
+ TOWER_ALERT_MSG = "TowerAlertMsg", _("Starbase attacked")
98
+ TOWER_REFUELED_EXTRA = "TowerRefueledExtra", _("Starbase refueled (BETA)")
99
+ TOWER_REINFORCED_EXTRA = "TowerReinforcedExtra", _("Starbase reinforced (BETA)")
100
+ TOWER_RESOURCE_ALERT_MSG = "TowerResourceAlertMsg", _("Starbase fuel alert")
101
+
102
+ # Upwell Structures
103
+ OWNERSHIP_TRANSFERRED = "OwnershipTransferred", _(
104
+ "Upwell structure ownership transferred"
105
+ )
106
+ STRUCTURE_ANCHORING = "StructureAnchoring", _("Upwell structure anchoring")
107
+ STRUCTURE_DESTROYED = "StructureDestroyed", _("Upwell structure destroyed")
108
+ STRUCTURE_FUEL_ALERT = "StructureFuelAlert", _("Upwell structure fuel alert")
109
+ STRUCTURE_JUMP_FUEL_ALERT = "StructureJumpFuelAlert", _(
110
+ "Upwell structure jump fuel alert"
111
+ )
112
+ STRUCTURE_LOST_ARMOR = "StructureLostArmor", _("Upwell structure lost armor")
113
+ STRUCTURE_LOST_SHIELD = "StructureLostShields", _("Upwell structure lost shields")
114
+ STRUCTURE_LOW_REAGENTS_ALERT = "StructureLowReagentsAlert", _(
115
+ "Structure low reagents alert"
116
+ )
117
+ STRUCTURE_NO_REAGENTS_ALERT = "StructureNoReagentsAlert", _(
118
+ "Structure no reagents alert"
119
+ )
120
+ STRUCTURE_ONLINE = "StructureOnline", _("Upwell structure went online")
121
+ STRUCTURE_REFUELED_EXTRA = "StructureRefueledExtra", _("Upwell structure refueled")
122
+ STRUCTURE_REINFORCEMENT_CHANGED = "StructuresReinforcementChanged", _(
123
+ "Upwell structure reinforcement time changed"
124
+ )
125
+ STRUCTURE_SERVICES_OFFLINE = "StructureServicesOffline", _(
126
+ "Upwell structure services went offline"
127
+ )
128
+ STRUCTURE_UNANCHORING = "StructureUnanchoring", _("Upwell structure unanchoring")
129
+ STRUCTURE_UNDER_ATTACK = "StructureUnderAttack", _(
130
+ "Upwell structure is under attack"
131
+ )
132
+ STRUCTURE_WENT_HIGH_POWER = "StructureWentHighPower", _(
133
+ "Upwell structure went high power"
134
+ )
135
+ STRUCTURE_WENT_LOW_POWER = "StructureWentLowPower", _(
136
+ "Upwell structure went low power"
137
+ )
138
+
139
+ # Wars
105
140
  WAR_ACCEPTED_ALLY = "AcceptedAlly", _("War accepted ally")
106
141
  WAR_ALL_WAR_CORP_JOINED_ALLIANCE_MSG = "AllWarCorpJoinedAllianceMsg", _(
107
142
  "Alliance war corporation joined alliance message"
@@ -142,31 +177,6 @@ class NotificationType(models.TextChoices):
142
177
  )
143
178
  WAR_WAR_SURRENDER_OFFER_MSG = "WarSurrenderOfferMsg", _("War surrender offered")
144
179
 
145
- # corporation membership
146
- CHAR_APP_ACCEPT_MSG = "CharAppAcceptMsg", _("Character joins corporation")
147
- CORP_APP_INVITED_MSG = "CorpAppInvitedMsg", _(
148
- "Character invited to join corporation"
149
- )
150
- CORP_APP_NEW_MSG = "CorpAppNewMsg", _("Character submitted application")
151
- CORP_APP_REJECT_MSG = "CharAppRejectMsg", _("Corp application rejected message")
152
- CORP_APP_REJECT_CUSTOM_MSG = "CorpAppRejectCustomMsg", _(
153
- "Corp application rejected custom message"
154
- )
155
- CHAR_APP_WITHDRAW_MSG = "CharAppWithdrawMsg", _("Character withdrew application")
156
- CHAR_LEFT_CORP_MSG = "CharLeftCorpMsg", _("Character leaves corporation")
157
-
158
- # billing
159
- BILLING_BILL_OUT_OF_MONEY_MSG = "BillOutOfMoneyMsg", _("Bill out of money")
160
- BILLING_CORP_ALL_BILL_MSG = "CorpAllBillMsg", _("Corp alliance billing message")
161
- BILLING_I_HUB_BILL_ABOUT_TO_EXPIRE = (
162
- "InfrastructureHubBillAboutToExpire",
163
- _("I-HUB bill about to expire"),
164
- )
165
- BILLING_I_HUB_DESTROYED_BY_BILL_FAILURE = (
166
- "IHubDestroyedByBillFailure",
167
- _("I_HUB destroyed by bill failure"),
168
- )
169
-
170
180
  @classmethod
171
181
  def esi_notifications(cls) -> Set["NotificationType"]:
172
182
  """Return all ESI notification types."""
@@ -330,8 +330,8 @@ class _AbstractStructureListSerializer(ABC):
330
330
  ):
331
331
  ajax_url = reverse("structures:structure_details", args=[structure.id])
332
332
  row["details"] = format_html(
333
- '<button type="button" class="btn btn-default" '
334
- 'data-toggle="modal" data-target="#modalUpwellDetails" '
333
+ '<button type="button" class="btn btn-secondary" '
334
+ 'data-bs-toggle="modal" data-bs-target="#modalUpwellDetails" '
335
335
  f"data-ajax_url={ajax_url} "
336
336
  f'title="{_("Show fitting")}">'
337
337
  '<i class="fas fa-search"></i></button>'
@@ -340,8 +340,8 @@ class _AbstractStructureListSerializer(ABC):
340
340
  elif structure.is_poco:
341
341
  ajax_url = reverse("structures:poco_details", args=[structure.id])
342
342
  row["details"] = format_html(
343
- '<button type="button" class="btn btn-default" '
344
- 'data-toggle="modal" data-target="#modalPocoDetails" '
343
+ '<button type="button" class="btn btn-secondary" '
344
+ 'data-bs-toggle="modal" data-bs-target="#modalPocoDetails" '
345
345
  f"data-ajax_url={ajax_url} "
346
346
  f'title="{_("Show details")}">'
347
347
  '<i class="fas fa-search"></i></button>'
@@ -350,8 +350,8 @@ class _AbstractStructureListSerializer(ABC):
350
350
  elif structure.is_starbase:
351
351
  ajax_url = reverse("structures:starbase_detail", args=[structure.id])
352
352
  row["details"] = format_html(
353
- '<button type="button" class="btn btn-default" '
354
- 'data-toggle="modal" data-target="#modalStarbaseDetail" '
353
+ '<button type="button" class="btn btn-secondary" '
354
+ 'data-bs-toggle="modal" data-bs-target="#modalStarbaseDetail" '
355
355
  f"data-ajax_url={ajax_url} "
356
356
  f'title="{_("Show details")}">'
357
357
  '<i class="fas fa-search"></i></button>'