aa-intel-tool 0.0.1a5__tar.gz → 0.0.1a6__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_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/PKG-INFO +1 -1
- aa_intel_tool-0.0.1a6/aa_intel_tool/admin.py +108 -0
- aa_intel_tool-0.0.1a6/aa_intel_tool/migrations/0005_alter_scan_options_alter_scandata_options_and_more.py +94 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/models.py +10 -10
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/pyproject.toml +1 -1
- aa_intel_tool-0.0.1a5/aa_intel_tool/admin.py +0 -70
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/.gitignore +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/LICENSE +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/README.md +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/__init__.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/app_settings.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/apps.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/auth_hooks.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/constants.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/exceptions.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/form.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/helper/eve_character.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/de/LC_MESSAGES/django.mo +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/de/LC_MESSAGES/django.po +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/django.pot +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/es/LC_MESSAGES/django.po +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/fr_FR/LC_MESSAGES/django.po +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/it_IT/LC_MESSAGES/django.po +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/ja/LC_MESSAGES/django.po +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/ko_KR/LC_MESSAGES/django.po +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/ru/LC_MESSAGES/django.po +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/uk/LC_MESSAGES/django.po +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/zh_Hans/LC_MESSAGES/django.po +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/management/commands/aa_intel_tool_load_eve_types.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/migrations/0001_initial.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/migrations/0002_remove_scan_processed_data_scandata.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/migrations/0003_alter_scandata_scan.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/migrations/0004_alter_scandata_section.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/migrations/__init__.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/parser/__init__.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/parser/general.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/parser/helper/db.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/parser/module/chatlist.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/parser/module/dscan.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/parser/module/fleetcomp.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/providers.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/static/aa_intel_tool/css/aa-bootstrap-fix.css +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/static/aa_intel_tool/css/aa-bootstrap-fix.min.css +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.css +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.min.css +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan.js +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan.min.js +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-clipboard.js +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-clipboard.min.js +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.js +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.min.js +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-highlight.js +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-highlight.min.js +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool.js +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool.min.js +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/tasks.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/base.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-chatscan-js.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-css.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-dscan-js.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-js-l10n.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-js.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/partials/body/scan-retention-note.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/partials/footer/app-translation-footer.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/partials/index/form.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/partials/scan/buttons.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/partials/scan/chatlist/alliances.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/partials/scan/chatlist/corporations.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/partials/scan/chatlist/pilots.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/partials/scan/dscan/ship-classes.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/partials/scan/dscan/ship-types.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/partials/scan/evetime.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/views/index.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/views/scan/chatlist.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/views/scan/dscan.html +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templatetags/__init__.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templatetags/inteltool_versioned_static.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/tests/__init__.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/tests/test-data/chatscan-faulty.txt +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/tests/test-data/chatscan.txt +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/tests/test-data/dscan.txt +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/tests/test-data/fleetcomp.txt +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/tests/test_access.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/tests/test_app_settings.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/tests/test_auth_hooks.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/tests/test_models.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/tests/test_parser.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/tests/test_templatetags.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/tests/utils.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/urls.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/views/__init__.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/views/ajax.py +0 -0
- {aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/views/general.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aa-intel-tool
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.1a6
|
|
4
4
|
Summary: A simple parser for D-Scans and more for Alliance Auth
|
|
5
5
|
Project-URL: Homepage, https://github.com/ppfeufer/aa-intel-tool
|
|
6
6
|
Project-URL: Documentation, https://github.com/ppfeufer/aa-intel-tool/blob/master/README.md
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Django admin integration
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
# Django
|
|
6
|
+
from django.contrib import admin
|
|
7
|
+
from django.utils import html, safestring
|
|
8
|
+
from django.utils.translation import gettext_lazy as _
|
|
9
|
+
|
|
10
|
+
# Alliance Auth (External Libs)
|
|
11
|
+
from app_utils.urls import reverse_absolute
|
|
12
|
+
|
|
13
|
+
# AA Intel Tool
|
|
14
|
+
from aa_intel_tool.models import Scan
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class BaseReadOnlyAdminMixin:
|
|
18
|
+
"""
|
|
19
|
+
Base "Read Only" mixin for admin models
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
actions = None # Removes the default delete action.
|
|
23
|
+
|
|
24
|
+
@staticmethod
|
|
25
|
+
def has_add_permission(request): # pylint: disable=unused-argument
|
|
26
|
+
"""
|
|
27
|
+
Has "add" permissions
|
|
28
|
+
|
|
29
|
+
:param request:
|
|
30
|
+
:type request:
|
|
31
|
+
:return:
|
|
32
|
+
:rtype:
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
return False
|
|
36
|
+
|
|
37
|
+
@staticmethod
|
|
38
|
+
def has_change_permission(request, obj=None): # pylint: disable=unused-argument
|
|
39
|
+
"""
|
|
40
|
+
Has "change" permissions
|
|
41
|
+
|
|
42
|
+
:param request:
|
|
43
|
+
:type request:
|
|
44
|
+
:param obj:
|
|
45
|
+
:type obj:
|
|
46
|
+
:return:
|
|
47
|
+
:rtype:
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
return False
|
|
51
|
+
|
|
52
|
+
@staticmethod
|
|
53
|
+
def has_delete_permission(request, obj=None): # pylint: disable=unused-argument
|
|
54
|
+
"""
|
|
55
|
+
Has "delete" permissions
|
|
56
|
+
|
|
57
|
+
:param request:
|
|
58
|
+
:type request:
|
|
59
|
+
:param obj:
|
|
60
|
+
:type obj:
|
|
61
|
+
:return:
|
|
62
|
+
:rtype:
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
return False
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
@admin.register(Scan)
|
|
69
|
+
class ScanAdmin(BaseReadOnlyAdminMixin, admin.ModelAdmin):
|
|
70
|
+
"""
|
|
71
|
+
Scan Admin
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
list_display = ("hash", "scan_type", "created")
|
|
75
|
+
fields = ("_scan_type", "_raw_data")
|
|
76
|
+
|
|
77
|
+
@admin.display(description=_("Scan type"))
|
|
78
|
+
def _scan_type(self, obj) -> str:
|
|
79
|
+
"""
|
|
80
|
+
Add link to open the scan in a new browser tab
|
|
81
|
+
|
|
82
|
+
:param obj:
|
|
83
|
+
:type obj:
|
|
84
|
+
:return:
|
|
85
|
+
:rtype:
|
|
86
|
+
"""
|
|
87
|
+
intel_type = obj.get_scan_type_display()
|
|
88
|
+
scan_link = reverse_absolute(
|
|
89
|
+
viewname="aa_intel_tool:intel_tool_scan", args=[obj.hash]
|
|
90
|
+
)
|
|
91
|
+
link_text = _("Open in a new browser tab")
|
|
92
|
+
|
|
93
|
+
return safestring.mark_safe(
|
|
94
|
+
f'{intel_type} (<a href="{scan_link}" target="_blank" rel="noreferer noopener">{link_text}</a>)'
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
@admin.display(description=_("RAW data"))
|
|
98
|
+
def _raw_data(self, obj) -> str:
|
|
99
|
+
"""
|
|
100
|
+
Format the output properly
|
|
101
|
+
|
|
102
|
+
:param obj:
|
|
103
|
+
:type obj:
|
|
104
|
+
:return:
|
|
105
|
+
:rtype:
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
return html.format_html("<pre>{}</pre>", obj.raw_data)
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Generated by Django 4.0.10 on 2023-08-12 19:27
|
|
2
|
+
|
|
3
|
+
# Django
|
|
4
|
+
from django.db import migrations, models
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
dependencies = [
|
|
9
|
+
("aa_intel_tool", "0004_alter_scandata_section"),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.AlterModelOptions(
|
|
14
|
+
name="scan",
|
|
15
|
+
options={
|
|
16
|
+
"default_permissions": (),
|
|
17
|
+
"verbose_name": "Scan",
|
|
18
|
+
"verbose_name_plural": "Scans",
|
|
19
|
+
},
|
|
20
|
+
),
|
|
21
|
+
migrations.AlterModelOptions(
|
|
22
|
+
name="scandata",
|
|
23
|
+
options={
|
|
24
|
+
"default_permissions": (),
|
|
25
|
+
"verbose_name": "Scan data",
|
|
26
|
+
"verbose_name_plural": "Scan data",
|
|
27
|
+
},
|
|
28
|
+
),
|
|
29
|
+
migrations.AlterField(
|
|
30
|
+
model_name="scan",
|
|
31
|
+
name="created",
|
|
32
|
+
field=models.DateTimeField(
|
|
33
|
+
auto_now_add=True, db_index=True, verbose_name="Creation date/time"
|
|
34
|
+
),
|
|
35
|
+
),
|
|
36
|
+
migrations.AlterField(
|
|
37
|
+
model_name="scan",
|
|
38
|
+
name="hash",
|
|
39
|
+
field=models.CharField(
|
|
40
|
+
editable=False,
|
|
41
|
+
max_length=30,
|
|
42
|
+
primary_key=True,
|
|
43
|
+
serialize=False,
|
|
44
|
+
unique=True,
|
|
45
|
+
verbose_name="Scan hash",
|
|
46
|
+
),
|
|
47
|
+
),
|
|
48
|
+
migrations.AlterField(
|
|
49
|
+
model_name="scan",
|
|
50
|
+
name="raw_data",
|
|
51
|
+
field=models.TextField(verbose_name="Scan RAW data"),
|
|
52
|
+
),
|
|
53
|
+
migrations.AlterField(
|
|
54
|
+
model_name="scan",
|
|
55
|
+
name="scan_type",
|
|
56
|
+
field=models.CharField(
|
|
57
|
+
choices=[
|
|
58
|
+
("invalid", "Invalid scan data"),
|
|
59
|
+
("dscan", "D-Scan"),
|
|
60
|
+
("fleetcomp", "Fleet Composition"),
|
|
61
|
+
("chatlist", "Chat List"),
|
|
62
|
+
],
|
|
63
|
+
default="invalid",
|
|
64
|
+
max_length=9,
|
|
65
|
+
verbose_name="Scan type",
|
|
66
|
+
),
|
|
67
|
+
),
|
|
68
|
+
migrations.AlterField(
|
|
69
|
+
model_name="scandata",
|
|
70
|
+
name="processed_data",
|
|
71
|
+
field=models.JSONField(default=dict, verbose_name="Processed scan data"),
|
|
72
|
+
),
|
|
73
|
+
migrations.AlterField(
|
|
74
|
+
model_name="scandata",
|
|
75
|
+
name="section",
|
|
76
|
+
field=models.CharField(
|
|
77
|
+
choices=[
|
|
78
|
+
("invalid", "Invalid scan data"),
|
|
79
|
+
("pilotlist", "Pilot list"),
|
|
80
|
+
("corporationlist", "Corporation list"),
|
|
81
|
+
("alliancelist", "Alliance list"),
|
|
82
|
+
("shiptypes", "Ship types"),
|
|
83
|
+
("shiplist", "Ship list"),
|
|
84
|
+
("shiplist_on_grid", "Ship list (on grid)"),
|
|
85
|
+
("shiplist_off_grid", "Ship list (off grid)"),
|
|
86
|
+
("structures_on_grid", "Structures (on grid)"),
|
|
87
|
+
("deployables_on_grid", "Deployables (on grid)"),
|
|
88
|
+
],
|
|
89
|
+
default="invalid",
|
|
90
|
+
max_length=19,
|
|
91
|
+
verbose_name="Scan section",
|
|
92
|
+
),
|
|
93
|
+
),
|
|
94
|
+
]
|
|
@@ -28,22 +28,22 @@ class Scan(models.Model):
|
|
|
28
28
|
editable=False,
|
|
29
29
|
unique=True,
|
|
30
30
|
max_length=30,
|
|
31
|
-
verbose_name=_("
|
|
31
|
+
verbose_name=_("Scan hash"),
|
|
32
32
|
)
|
|
33
33
|
|
|
34
34
|
created = models.DateTimeField(
|
|
35
35
|
auto_now_add=True,
|
|
36
36
|
db_index=True,
|
|
37
|
-
verbose_name=_("
|
|
37
|
+
verbose_name=_("Creation date/time"),
|
|
38
38
|
)
|
|
39
39
|
|
|
40
|
-
raw_data = models.TextField(verbose_name=_("
|
|
40
|
+
raw_data = models.TextField(verbose_name=_("Scan RAW data"))
|
|
41
41
|
|
|
42
42
|
scan_type = models.CharField(
|
|
43
43
|
max_length=9,
|
|
44
44
|
choices=Type.choices,
|
|
45
45
|
default=Type.INVALID,
|
|
46
|
-
verbose_name=_("
|
|
46
|
+
verbose_name=_("Scan type"),
|
|
47
47
|
)
|
|
48
48
|
|
|
49
49
|
class Meta: # pylint: disable=too-few-public-methods
|
|
@@ -52,8 +52,8 @@ class Scan(models.Model):
|
|
|
52
52
|
"""
|
|
53
53
|
|
|
54
54
|
default_permissions = ()
|
|
55
|
-
verbose_name = _("
|
|
56
|
-
verbose_name_plural = _("
|
|
55
|
+
verbose_name = _("Scan")
|
|
56
|
+
verbose_name_plural = _("Scans")
|
|
57
57
|
|
|
58
58
|
def __str__(self) -> str:
|
|
59
59
|
return str(self.pk)
|
|
@@ -132,11 +132,11 @@ class ScanData(models.Model):
|
|
|
132
132
|
max_length=19,
|
|
133
133
|
choices=Section.choices,
|
|
134
134
|
default=Section.INVALID,
|
|
135
|
-
verbose_name=_("
|
|
135
|
+
verbose_name=_("Scan section"),
|
|
136
136
|
)
|
|
137
137
|
|
|
138
138
|
processed_data = models.JSONField(
|
|
139
|
-
default=dict, verbose_name=_("
|
|
139
|
+
default=dict, verbose_name=_("Processed scan data")
|
|
140
140
|
)
|
|
141
141
|
|
|
142
142
|
class Meta: # pylint: disable=too-few-public-methods
|
|
@@ -145,5 +145,5 @@ class ScanData(models.Model):
|
|
|
145
145
|
"""
|
|
146
146
|
|
|
147
147
|
default_permissions = ()
|
|
148
|
-
verbose_name = _("
|
|
149
|
-
verbose_name_plural = _("
|
|
148
|
+
verbose_name = _("Scan data")
|
|
149
|
+
verbose_name_plural = _("Scan data")
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Django admin integration
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
# Django
|
|
6
|
-
from django.contrib import admin
|
|
7
|
-
|
|
8
|
-
# AA Intel Tool
|
|
9
|
-
from aa_intel_tool.models import Scan
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class BaseReadOnlyAdminMixin:
|
|
13
|
-
"""
|
|
14
|
-
Base "Read Only" mixin for admin models
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
actions = None # Removes the default delete action.
|
|
18
|
-
|
|
19
|
-
def has_add_permission(self, request): # pylint: disable=unused-argument
|
|
20
|
-
"""
|
|
21
|
-
Has "add" permissions
|
|
22
|
-
|
|
23
|
-
:param request:
|
|
24
|
-
:type request:
|
|
25
|
-
:return:
|
|
26
|
-
:rtype:
|
|
27
|
-
"""
|
|
28
|
-
|
|
29
|
-
return False
|
|
30
|
-
|
|
31
|
-
def has_change_permission(
|
|
32
|
-
self, request, obj=None # pylint: disable=unused-argument
|
|
33
|
-
):
|
|
34
|
-
"""
|
|
35
|
-
Has "change" permissions
|
|
36
|
-
|
|
37
|
-
:param request:
|
|
38
|
-
:type request:
|
|
39
|
-
:param obj:
|
|
40
|
-
:type obj:
|
|
41
|
-
:return:
|
|
42
|
-
:rtype:
|
|
43
|
-
"""
|
|
44
|
-
|
|
45
|
-
return False
|
|
46
|
-
|
|
47
|
-
def has_delete_permission(
|
|
48
|
-
self, request, obj=None # pylint: disable=unused-argument
|
|
49
|
-
):
|
|
50
|
-
"""
|
|
51
|
-
Has "delete" permissions
|
|
52
|
-
|
|
53
|
-
:param request:
|
|
54
|
-
:type request:
|
|
55
|
-
:param obj:
|
|
56
|
-
:type obj:
|
|
57
|
-
:return:
|
|
58
|
-
:rtype:
|
|
59
|
-
"""
|
|
60
|
-
|
|
61
|
-
return False
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
@admin.register(Scan)
|
|
65
|
-
class ScanAdmin(BaseReadOnlyAdminMixin, admin.ModelAdmin):
|
|
66
|
-
"""
|
|
67
|
-
Scan Admin
|
|
68
|
-
"""
|
|
69
|
-
|
|
70
|
-
list_display = ("hash", "created")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/de/LC_MESSAGES/django.mo
RENAMED
|
File without changes
|
{aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/de/LC_MESSAGES/django.po
RENAMED
|
File without changes
|
|
File without changes
|
{aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/es/LC_MESSAGES/django.po
RENAMED
|
File without changes
|
{aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/fr_FR/LC_MESSAGES/django.po
RENAMED
|
File without changes
|
{aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/it_IT/LC_MESSAGES/django.po
RENAMED
|
File without changes
|
{aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/ja/LC_MESSAGES/django.po
RENAMED
|
File without changes
|
{aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/ko_KR/LC_MESSAGES/django.po
RENAMED
|
File without changes
|
{aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/ru/LC_MESSAGES/django.po
RENAMED
|
File without changes
|
{aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/uk/LC_MESSAGES/django.po
RENAMED
|
File without changes
|
{aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/locale/zh_Hans/LC_MESSAGES/django.po
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/migrations/0003_alter_scandata_scan.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/templates/aa_intel_tool/base.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aa_intel_tool-0.0.1a5 → aa_intel_tool-0.0.1a6}/aa_intel_tool/tests/test-data/chatscan-faulty.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|