aa-intel-tool 1.2.0__py3-none-any.whl → 2.0.0b1__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 (72) hide show
  1. aa_intel_tool/__init__.py +1 -6
  2. aa_intel_tool/app_settings.py +32 -1
  3. aa_intel_tool/auth_hooks.py +1 -1
  4. aa_intel_tool/constants.py +0 -13
  5. aa_intel_tool/locale/es/LC_MESSAGES/django.mo +0 -0
  6. aa_intel_tool/locale/es/LC_MESSAGES/django.po +6 -4
  7. aa_intel_tool/locale/fr_FR/LC_MESSAGES/django.mo +0 -0
  8. aa_intel_tool/locale/fr_FR/LC_MESSAGES/django.po +8 -6
  9. aa_intel_tool/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  10. aa_intel_tool/locale/zh_Hans/LC_MESSAGES/django.po +8 -8
  11. aa_intel_tool/management/commands/aa_intel_tool_load_eve_types.py +1 -1
  12. aa_intel_tool/parser/module/chatlist.py +17 -7
  13. aa_intel_tool/parser/module/dscan.py +36 -33
  14. aa_intel_tool/parser/module/fleetcomp.py +11 -5
  15. aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.css +7 -147
  16. aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.min.css +1 -1
  17. aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.min.css.map +1 -1
  18. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan.js +12 -12
  19. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan.min.js +1 -1
  20. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan.min.js.map +1 -1
  21. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.js +33 -33
  22. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.min.js +1 -1
  23. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.min.js.map +1 -1
  24. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition.js +13 -13
  25. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition.min.js +1 -1
  26. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition.min.js.map +1 -1
  27. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-scan-result-common.js +17 -19
  28. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-scan-result-common.min.js +1 -1
  29. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-scan-result-common.min.js.map +1 -1
  30. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool.js +1 -1
  31. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool.min.js +1 -1
  32. aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool.min.js.map +1 -1
  33. aa_intel_tool/templates/aa_intel_tool/base.html +9 -4
  34. aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-chatscan-js.html +1 -1
  35. aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-css.html +1 -2
  36. aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-dscan-js.html +1 -1
  37. aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-fleetcomp-js.html +1 -1
  38. aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-js.html +1 -1
  39. aa_intel_tool/templates/aa_intel_tool/partials/body/scan-retention-note.html +1 -1
  40. aa_intel_tool/templates/aa_intel_tool/partials/footer/app-translation-footer.html +1 -1
  41. aa_intel_tool/templates/aa_intel_tool/partials/index/form.html +21 -22
  42. aa_intel_tool/templates/aa_intel_tool/partials/scan/buttons.html +6 -5
  43. aa_intel_tool/templates/aa_intel_tool/partials/scan/chatlist/alliances.html +7 -7
  44. aa_intel_tool/templates/aa_intel_tool/partials/scan/chatlist/corporations.html +7 -7
  45. aa_intel_tool/templates/aa_intel_tool/partials/scan/chatlist/pilots.html +7 -7
  46. aa_intel_tool/templates/aa_intel_tool/partials/scan/dscan/interesting-on-grid/items.html +7 -7
  47. aa_intel_tool/templates/aa_intel_tool/partials/scan/dscan/interesting-on-grid.html +2 -2
  48. aa_intel_tool/templates/aa_intel_tool/partials/scan/dscan/ships-breakdown/ship-classes.html +7 -7
  49. aa_intel_tool/templates/aa_intel_tool/partials/scan/dscan/ships-breakdown/ship-types.html +7 -7
  50. aa_intel_tool/templates/aa_intel_tool/partials/scan/dscan/ships-breakdown.html +1 -1
  51. aa_intel_tool/templates/aa_intel_tool/partials/scan/dscan/system-information.html +2 -2
  52. aa_intel_tool/templates/aa_intel_tool/partials/scan/evetime.html +1 -1
  53. aa_intel_tool/templates/aa_intel_tool/partials/scan/fleetcomp/fleet-details/pilots.html +6 -6
  54. aa_intel_tool/templates/aa_intel_tool/partials/scan/fleetcomp/fleet-details.html +1 -1
  55. aa_intel_tool/templates/aa_intel_tool/partials/scan/fleetcomp/participation.html +1 -1
  56. aa_intel_tool/templates/aa_intel_tool/views/index.html +4 -9
  57. aa_intel_tool/templates/aa_intel_tool/views/scan/chatlist.html +2 -2
  58. aa_intel_tool/templates/aa_intel_tool/views/scan/dscan.html +2 -2
  59. aa_intel_tool/templates/aa_intel_tool/views/scan/fleetcomp.html +2 -2
  60. aa_intel_tool/tests/test_access.py +24 -13
  61. aa_intel_tool/tests/test_auth_hooks.py +18 -12
  62. aa_intel_tool/tests/test_templatetags.py +2 -3
  63. aa_intel_tool/tests/utils.py +14 -0
  64. aa_intel_tool/views/general.py +3 -1
  65. {aa_intel_tool-1.2.0.dist-info → aa_intel_tool-2.0.0b1.dist-info}/METADATA +31 -36
  66. {aa_intel_tool-1.2.0.dist-info → aa_intel_tool-2.0.0b1.dist-info}/RECORD +69 -72
  67. {aa_intel_tool-1.2.0.dist-info → aa_intel_tool-2.0.0b1.dist-info}/WHEEL +1 -1
  68. aa_intel_tool/static/aa_intel_tool/css/aa-bootstrap-fix.css +0 -13
  69. aa_intel_tool/static/aa_intel_tool/css/aa-bootstrap-fix.min.css +0 -2
  70. aa_intel_tool/static/aa_intel_tool/css/aa-bootstrap-fix.min.css.map +0 -1
  71. /aa_intel_tool/templatetags/{inteltool_versioned_static.py → aa_intel_tool.py} +0 -0
  72. {aa_intel_tool-1.2.0.dist-info → aa_intel_tool-2.0.0b1.dist-info}/licenses/LICENSE +0 -0
@@ -1,20 +1,21 @@
1
1
  {% load i18n %}
2
2
 
3
- <div class="aa-intel-scan-page-buttons">
3
+ <div class="aa-intel-scan-page-buttons my-4">
4
4
  <ul class="nav nav-pills clearfix">
5
- <li role="presentation">
5
+ <li class="me-2 mb-2">
6
6
  <a href="{% url "aa_intel_tool:intel_tool_index" %}">
7
- <button class="btn btn-default btn-sm">
7
+ <button class="btn btn-primary btn-sm">
8
8
  {% translate "New scan" %}
9
9
  </button>
10
10
  </a>
11
11
  </li>
12
12
 
13
- <li role="presentation">
14
- <button id="btn-copy-permalink-to-clipboard" class="btn btn-default btn-sm" data-clipboard-action="copy" data-clipboard-text="{{ SITE_URL }}{% url 'aa_intel_tool:intel_tool_scan' scan_hash %}">
13
+ <li class="me-2 mb-2">
14
+ <button id="btn-copy-permalink-to-clipboard" class="btn btn-secondary btn-sm" data-clipboard-action="copy" data-clipboard-text="{{ SITE_URL }}{% url 'aa_intel_tool:intel_tool_scan' scan_hash %}">
15
15
  {% translate "Copy permalink" %}
16
16
  </button>
17
17
  </li>
18
18
  </ul>
19
19
  </div>
20
+
20
21
  <div class="aa-intel-copy-result"></div>
@@ -4,17 +4,17 @@
4
4
  {% translate "Unaffiliated / No Alliance" as no_alliance %}
5
5
 
6
6
  <div class="col-md-6 col-lg-3 aa-intel-chatscan-alliances">
7
- <header class="aa-intel-section-header">
7
+ <header class="aa-intel-section-header my-4">
8
8
  <h2 class="aa-intel-section-title">
9
9
  {% translate "Alliances breakdown" as table_title %}
10
10
  {{ table_title|title }} (<span id="aa-intel-alliances-count">0</span>)
11
11
  </h2>
12
12
  </header>
13
13
 
14
- <div class="panel panel-default">
15
- <div class="panel-body">
16
- <div class="table-local-scan table-local-scan-alliances table-aa-intel">
17
- <table class="table table-condensed table-sortable aa-intel-alliance-participation-list" style="width: 100%;">
14
+ <div class="card card-default border-0">
15
+ <div class="card-body">
16
+ <div class="table-local-scan table-local-scan-alliances table-aa-intel d-none">
17
+ <table class="table table-sm table-sortable aa-intel-alliance-participation-list" style="width: 100%;">
18
18
  <thead>
19
19
  <tr>
20
20
  <th>{% translate "Alliance" %}</th>
@@ -24,13 +24,13 @@
24
24
  </table>
25
25
  </div>
26
26
 
27
- <div class="aa-intel-loading-table-info aa-intel-loading-table-info-alliance-participation-list bs-callout bs-callout-info">
27
+ <div class="aa-intel-loading-table-info aa-intel-loading-table-info-alliance-participation-list aa-callout aa-callout-info">
28
28
  <p>
29
29
  {% translate "Loading data …" %}
30
30
  </p>
31
31
  </div>
32
32
 
33
- <div class="aa-intel-empty-table-info aa-intel-empty-table-info-alliance-participation-list bs-callout bs-callout-info">
33
+ <div class="aa-intel-empty-table-info aa-intel-empty-table-info-alliance-participation-list aa-callout aa-callout-info d-none">
34
34
  <p>
35
35
  {% translate "No data …" %}
36
36
  </p>
@@ -4,17 +4,17 @@
4
4
  {% translate "Unaffiliated / No Alliance" as no_alliance %}
5
5
 
6
6
  <div class="col-md-6 col-lg-3 aa-intel-chatscan-corporations">
7
- <header class="aa-intel-section-header">
7
+ <header class="aa-intel-section-header my-4">
8
8
  <h2 class="aa-intel-section-title">
9
9
  {% translate "Corporations breakdown" as table_title %}
10
10
  {{ table_title|title }} (<span id="aa-intel-corporations-count">0</span>)
11
11
  </h2>
12
12
  </header>
13
13
 
14
- <div class="panel panel-default">
15
- <div class="panel-body">
16
- <div class="table-local-scan table-local-scan-corporations table-aa-intel">
17
- <table class="table table-condensed table-sortable aa-intel-corporation-participation-list" style="width: 100%;">
14
+ <div class="card card-default border-0">
15
+ <div class="card-body">
16
+ <div class="table-local-scan table-local-scan-corporations table-aa-intel d-none">
17
+ <table class="table table-sm table-sortable aa-intel-corporation-participation-list" style="width: 100%;">
18
18
  <thead>
19
19
  <tr>
20
20
  <th>{% translate "Corporation" %}</th>
@@ -24,13 +24,13 @@
24
24
  </table>
25
25
  </div>
26
26
 
27
- <div class="aa-intel-loading-table-info aa-intel-loading-table-info-corporation-participation-list bs-callout bs-callout-info">
27
+ <div class="aa-intel-loading-table-info aa-intel-loading-table-info-corporation-participation-list aa-callout aa-callout-info">
28
28
  <p>
29
29
  {% translate "Loading data …" %}
30
30
  </p>
31
31
  </div>
32
32
 
33
- <div class="aa-intel-empty-table-info aa-intel-empty-table-info-corporation-participation-list bs-callout bs-callout-info">
33
+ <div class="aa-intel-empty-table-info aa-intel-empty-table-info-corporation-participation-list aa-callout aa-callout-info d-none">
34
34
  <p>
35
35
  {% translate "No data …" %}
36
36
  </p>
@@ -3,17 +3,17 @@
3
3
  {% translate "Unaffiliated / No Alliance" as no_alliance %}
4
4
 
5
5
  <div class="col-md-12 col-lg-6 aa-intel-chatscan-pilots">
6
- <header class="aa-intel-section-header">
6
+ <header class="aa-intel-section-header my-4">
7
7
  <h2 class="aa-intel-section-title">
8
8
  {% translate "Pilots breakdown" as table_title %}
9
9
  {{ table_title|title }} (<span id="aa-intel-pilots-count">0</span>)
10
10
  </h2>
11
11
  </header>
12
12
 
13
- <div class="panel panel-default">
14
- <div class="panel-body">
15
- <div class="table-local-scan table-local-scan-pilots table-aa-intel">
16
- <table class="table table-sortable table-condensed aa-intel-pilot-participation-list" style="width: 100%;">
13
+ <div class="card card-default border-0">
14
+ <div class="card-body">
15
+ <div class="table-local-scan table-local-scan-pilots table-aa-intel d-none">
16
+ <table class="table table-sortable table-sm aa-intel-pilot-participation-list" style="width: 100%;">
17
17
  <thead>
18
18
  <tr>
19
19
  <th>{% translate "Pilot" %}</th>
@@ -24,13 +24,13 @@
24
24
  </table>
25
25
  </div>
26
26
 
27
- <div class="aa-intel-loading-table-info aa-intel-loading-table-info-pilot-participation-list bs-callout bs-callout-info">
27
+ <div class="aa-intel-loading-table-info aa-intel-loading-table-info-pilot-participation-list aa-callout aa-callout-info">
28
28
  <p>
29
29
  {% translate "Loading data …" %}
30
30
  </p>
31
31
  </div>
32
32
 
33
- <div class="aa-intel-empty-table-info aa-intel-empty-table-info-pilot-participation-list bs-callout bs-callout-info">
33
+ <div class="aa-intel-empty-table-info aa-intel-empty-table-info-pilot-participation-list aa-callout aa-callout-info d-none">
34
34
  <p>
35
35
  {% translate "No data …" %}
36
36
  </p>
@@ -1,17 +1,17 @@
1
1
  {% load i18n %}
2
2
 
3
- <div class="col-sm-6 col-md-4 col-lg-3 col-aa-intel col-aa-intel-{{ dscan_section }}">
4
- <header class="aa-intel-section-header">
3
+ <div class="col-sm-6 col-md-4 col-lg-3 col-aa-intel col-aa-intel-{{ dscan_section }} d-none">
4
+ <header class="aa-intel-section-header my-4">
5
5
  <h3 class="aa-intel-section-title">
6
6
  {{ section_header|title }}
7
7
  (<span id="aa-intel-dscan-{{ dscan_section }}-count">0</span>)
8
8
  </h3>
9
9
  </header>
10
10
 
11
- <div class="panel panel-default">
12
- <div class="panel-body">
11
+ <div class="card card-default border-0">
12
+ <div class="card-body">
13
13
  <div class="table-dscan table-dscan-{{ dscan_section }} table-aa-intel">
14
- <table class="table table-condensed table-sortable aa-intel-dscan-{{ dscan_section }}-list" style="width: 100%;">
14
+ <table class="table table-sm table-sortable aa-intel-dscan-{{ dscan_section }}-list" style="width: 100%;">
15
15
  <thead>
16
16
  <tr>
17
17
  <th>{% translate "Type" %}</th>
@@ -20,13 +20,13 @@
20
20
  </thead>
21
21
  </table>
22
22
 
23
- <div class="aa-intel-loading-table-info aa-intel-loading-table-info-{{ dscan_section }} bs-callout bs-callout-info">
23
+ <div class="aa-intel-loading-table-info aa-intel-loading-table-info-{{ dscan_section }} aa-callout aa-callout-info d-none">
24
24
  <p>
25
25
  {% translate "Loading data …" %}
26
26
  </p>
27
27
  </div>
28
28
 
29
- <div class="aa-intel-empty-table-info aa-intel-empty-table-info-{{ dscan_section }} bs-callout bs-callout-info">
29
+ <div class="aa-intel-empty-table-info aa-intel-empty-table-info-{{ dscan_section }} aa-callout aa-callout-info d-none">
30
30
  <p>
31
31
  {% translate "No data …" %}
32
32
  </p>
@@ -1,9 +1,9 @@
1
1
  {% load i18n %}
2
2
 
3
- <div class="aa-intel-result-row aa-intel-dscan-result row" id="aa-intel-dscan-row-interesting-on-grid">
3
+ <div class="aa-intel-result-row aa-intel-dscan-result row d-none" id="aa-intel-dscan-row-interesting-on-grid">
4
4
  <div class="clearfix">
5
5
  <div class="col-sm-6 col-md-4 col-lg-4 clearfix">
6
- <header class="aa-intel-section-header">
6
+ <header class="aa-intel-section-header my-4">
7
7
  <h2>
8
8
  {% translate "Interesting on grid" as section_header %}
9
9
  {{ section_header|title }}
@@ -1,7 +1,7 @@
1
1
  {% load i18n %}
2
2
 
3
3
  <div class="col-md-4 col-sm-6 col-lg-3 col-aa-intel col-aa-intel-dscan-ship-classes-{{ dscan_section }}">
4
- <header class="aa-intel-section-header">
4
+ <header class="aa-intel-section-header my-4">
5
5
  <h3 class="aa-intel-section-title">
6
6
  {{ section_header|title }}
7
7
 
@@ -11,10 +11,10 @@
11
11
  </h3>
12
12
  </header>
13
13
 
14
- <div class="panel panel-default">
15
- <div class="panel-body">
16
- <div class="table-dscan table-dscan-ship-classes table-dscan-ship-classes-{{ dscan_section }} table-aa-intel">
17
- <table class="table table-condensed table-sortable aa-intel-dscan-ship-classes aa-intel-dscan-ship-classes-{{ dscan_section }}-list" style="width: 100%;">
14
+ <div class="card card-default border-0">
15
+ <div class="card-body">
16
+ <div class="table-dscan table-dscan-ship-classes table-dscan-ship-classes-{{ dscan_section }} table-aa-intel d-none">
17
+ <table class="table table-sm table-sortable aa-intel-dscan-ship-classes aa-intel-dscan-ship-classes-{{ dscan_section }}-list" style="width: 100%;">
18
18
  <thead>
19
19
  <tr>
20
20
  <th>
@@ -27,13 +27,13 @@
27
27
  </table>
28
28
  </div>
29
29
 
30
- <div class="aa-intel-loading-table-info aa-intel-loading-table-info-{{ dscan_section }} bs-callout bs-callout-info">
30
+ <div class="aa-intel-loading-table-info aa-intel-loading-table-info-{{ dscan_section }} aa-callout aa-callout-info">
31
31
  <p>
32
32
  {% translate "Loading data …" %}
33
33
  </p>
34
34
  </div>
35
35
 
36
- <div class="aa-intel-empty-table-info aa-intel-empty-table-info-{{ dscan_section }} bs-callout bs-callout-info">
36
+ <div class="aa-intel-empty-table-info aa-intel-empty-table-info-{{ dscan_section }} aa-callout aa-callout-info d-none">
37
37
  <p>
38
38
  {% translate "No data …" %}
39
39
  </p>
@@ -1,17 +1,17 @@
1
1
  {% load i18n %}
2
2
 
3
3
  <div class="col-md-4 col-sm-6 col-lg-3 col-aa-intel col-aa-intel-dscan-ship-types">
4
- <header class="aa-intel-section-header">
4
+ <header class="aa-intel-section-header my-4">
5
5
  <h3 class="aa-intel-section-title">
6
6
  {% translate "Ship types" as section_header %}
7
7
  {{ section_header|title }}
8
8
  </h3>
9
9
  </header>
10
10
 
11
- <div class="panel panel-default">
12
- <div class="panel-body">
13
- <div class="table-dscan table-dscan-ship-types table-aa-intel">
14
- <table class="table table-condensed table-sortable table-no-images aa-intel-dscan-ship-types aa-intel-dscan-ship-types-list" style="width: 100%;">
11
+ <div class="card card-default border-0">
12
+ <div class="card-body">
13
+ <div class="table-dscan table-dscan-ship-types table-aa-intel d-none">
14
+ <table class="table table-sm table-sortable table-no-images aa-intel-dscan-ship-types aa-intel-dscan-ship-types-list" style="width: 100%;">
15
15
  <thead>
16
16
  <tr>
17
17
  <th>
@@ -25,13 +25,13 @@
25
25
  </div>
26
26
 
27
27
 
28
- <div class="aa-intel-loading-table-info aa-intel-loading-table-info-ship-types bs-callout bs-callout-info">
28
+ <div class="aa-intel-loading-table-info aa-intel-loading-table-info-ship-types aa-callout aa-callout-info">
29
29
  <p>
30
30
  {% translate "Loading data …" %}
31
31
  </p>
32
32
  </div>
33
33
 
34
- <div class="aa-intel-empty-table-info aa-intel-empty-table-info-ship-types bs-callout bs-callout-info">
34
+ <div class="aa-intel-empty-table-info aa-intel-empty-table-info-ship-types aa-callout aa-callout-info d-none">
35
35
  <p>
36
36
  {% translate "No data." %}
37
37
  </p>
@@ -3,7 +3,7 @@
3
3
  <div class="aa-intel-result-row aa-intel-dscan-result row" id="aa-intel-dscan-row-ships-breakdown">
4
4
  <div class="clearfix">
5
5
  <div class="col-sm-6 col-md-4 col-lg-4 clearfix">
6
- <header class="aa-intel-section-header">
6
+ <header class="aa-intel-section-header my-4">
7
7
  <h2>
8
8
  {% translate "Ships on scan" as section_header %}
9
9
  {{ section_header|title }}
@@ -1,9 +1,9 @@
1
1
  {% load i18n %}
2
2
 
3
- <div class="aa-intel-result-row aa-intel-dscan-result row" id="aa-intel-dscan-row-system-information">
3
+ <div class="aa-intel-result-row aa-intel-dscan-result row d-none" id="aa-intel-dscan-row-system-information">
4
4
  <div class="clearfix">
5
5
  <div class="col-sm-6 col-md-4 col-lg-4 clearfix">
6
- <header class="aa-intel-section-header">
6
+ <header class="aa-intel-section-header my-4">
7
7
  <h2>
8
8
  {% translate "System information" as section_header %}
9
9
  {{ section_header|title }}
@@ -1,6 +1,6 @@
1
1
  {% load i18n %}
2
2
 
3
- <div class="aa-intel-scan-evetime">
3
+ <div class="aa-intel-scan-evetime my-4">
4
4
  <p>
5
5
  {% translate "Scan taken at (Eve time)" %}: {{ scan.created|date:"Y-m-d H:i" }}
6
6
  </p>
@@ -1,17 +1,17 @@
1
1
  {% load i18n %}
2
2
 
3
3
  <div class="col-md-12 col-lg-6 col-aa-intel col-aa-intel-fleetcomp-pilot-ships">
4
- <header class="aa-intel-section-header">
4
+ <header class="aa-intel-section-header my-4">
5
5
  <h3 class="aa-intel-section-title">
6
6
  {% translate "Who is flying what" as section_header %}
7
7
  {{ section_header|title }}
8
8
  </h3>
9
9
  </header>
10
10
 
11
- <div class="panel panel-default">
12
- <div class="panel-body">
11
+ <div class="card card-default border-0">
12
+ <div class="card-body">
13
13
  <div class="table-dscan table-fleetcomp-pilot-ships table-aa-intel">
14
- <table class="table table-condensed table-sortable aa-intel-fleetcomp-pilot-ships-list" style="width: 100%;">
14
+ <table class="table table-sm table-sortable aa-intel-fleetcomp-pilot-ships-list" style="width: 100%;">
15
15
  <thead>
16
16
  <tr>
17
17
  <th>{% translate "Pilot" %}</th>
@@ -24,13 +24,13 @@
24
24
  </thead>
25
25
  </table>
26
26
 
27
- <div class="aa-intel-loading-table-info aa-intel-loading-table-info-fleetcomp-pilot-ships bs-callout bs-callout-info">
27
+ <div class="aa-intel-loading-table-info aa-intel-loading-table-info-fleetcomp-pilot-ships aa-callout aa-callout-info">
28
28
  <p>
29
29
  {% translate "Loading data …" %}
30
30
  </p>
31
31
  </div>
32
32
 
33
- <div class="aa-intel-empty-table-info aa-intel-empty-table-info-fleetcomp-pilot-ships bs-callout bs-callout-info">
33
+ <div class="aa-intel-empty-table-info aa-intel-empty-table-info-fleetcomp-pilot-ships aa-callout aa-callout-info d-none">
34
34
  <p>
35
35
  {% translate "No data …" %}
36
36
  </p>
@@ -3,7 +3,7 @@
3
3
  <div class="local-scan-result row" id="aa-intel-fleetcomp-details-row">
4
4
  <div class="clearfix">
5
5
  <div class="col-sm-6 col-md-4 col-lg-4 clearfix">
6
- <header class="aa-intel-section-header">
6
+ <header class="aa-intel-section-header my-4">
7
7
  <h2>
8
8
  {% translate "Fleet details" as section_header %}
9
9
  {{ section_header|title }}
@@ -3,7 +3,7 @@
3
3
  <div class="local-scan-result row" id="aa-intel-fleetcomp-participation-row">
4
4
  <div class="clearfix">
5
5
  <div class="col-sm-6 col-md-4 col-lg-4 clearfix">
6
- <header class="aa-intel-section-header">
6
+ <header class="aa-intel-section-header my-4">
7
7
  <h2>
8
8
  {% translate "Participation details" as section_header %}
9
9
  {{ section_header|title }}
@@ -3,16 +3,11 @@
3
3
  {% load evelinks %}
4
4
  {% load i18n %}
5
5
 
6
- {% block page_title %}{% translate "Intel Parser" %}{% endblock %}
7
-
8
6
  {% block aa_intel_tool_header %}
9
- <header>
10
- <h1>{% translate "Intel Parser" %}</h1>
11
- </header>
12
-
13
- <p>
14
- {% translate "Please keep in mind, parsing large amounts of data can take some time. Be patient, CCP's API is not the fastest to answer …" %}
15
- </p>
7
+ {% if not user.is_authenticated %}
8
+ {% translate "Intel Parser" as translated_header %}
9
+ {% include "framework/header/page-header.html" with title=translated_header %}
10
+ {% endif %}
16
11
  {% endblock %}
17
12
 
18
13
  {% block aa_intel_tool_body %}
@@ -22,7 +22,7 @@
22
22
  {% endblock %}
23
23
 
24
24
  {% block extra_css %}
25
- {% include "bundles/datatables-css.html" %}
25
+ {% include "bundles/datatables-css-bs5.html" %}
26
26
  {% include "aa_intel_tool/bundles/aa-intel-tool-css.html" %}
27
27
  {% endblock %}
28
28
 
@@ -37,7 +37,7 @@
37
37
  }
38
38
  </script>
39
39
 
40
- {% include "bundles/datatables-js.html" %}
40
+ {% include "bundles/datatables-js-bs5.html" %}
41
41
  {% include "bundles/clipboard-js.html" %}
42
42
  {% include "aa_intel_tool/bundles/aa-intel-tool-js-l10n.html" %}
43
43
  {% include "aa_intel_tool/bundles/aa-intel-tool-chatscan-js.html" %}
@@ -20,7 +20,7 @@
20
20
  {% endblock %}
21
21
 
22
22
  {% block extra_css %}
23
- {% include "bundles/datatables-css.html" %}
23
+ {% include "bundles/datatables-css-bs5.html" %}
24
24
  {% include "aa_intel_tool/bundles/aa-intel-tool-css.html" %}
25
25
  {% endblock %}
26
26
 
@@ -39,7 +39,7 @@
39
39
  }
40
40
  </script>
41
41
 
42
- {% include "bundles/datatables-js.html" %}
42
+ {% include "bundles/datatables-js-bs5.html" %}
43
43
  {% include "bundles/clipboard-js.html" %}
44
44
  {% include "aa_intel_tool/bundles/aa-intel-tool-js-l10n.html" %}
45
45
  {% include "aa_intel_tool/bundles/aa-intel-tool-dscan-js.html" %}
@@ -22,7 +22,7 @@
22
22
  {% endblock %}
23
23
 
24
24
  {% block extra_css %}
25
- {% include "bundles/datatables-css.html" %}
25
+ {% include "bundles/datatables-css-bs5.html" %}
26
26
  {% include "aa_intel_tool/bundles/aa-intel-tool-css.html" %}
27
27
  {% endblock %}
28
28
 
@@ -40,7 +40,7 @@
40
40
  }
41
41
  </script>
42
42
 
43
- {% include "bundles/datatables-js.html" %}
43
+ {% include "bundles/datatables-js-bs5.html" %}
44
44
  {% include "bundles/clipboard-js.html" %}
45
45
  {% include "aa_intel_tool/bundles/aa-intel-tool-js-l10n.html" %}
46
46
  {% include "aa_intel_tool/bundles/aa-intel-tool-fleetcomp-js.html" %}
@@ -12,6 +12,9 @@ from django.urls import reverse
12
12
  # Alliance Auth (External Libs)
13
13
  from app_utils.testing import create_fake_user
14
14
 
15
+ # AA Intel Tool
16
+ from aa_intel_tool.tests.utils import response_content_to_str
17
+
15
18
 
16
19
  class TestAccess(TestCase):
17
20
  """
@@ -32,22 +35,21 @@ class TestAccess(TestCase):
32
35
  )
33
36
 
34
37
  cls.html_menu = f"""
35
- <li>
36
- <a class="active" href="{reverse('aa_intel_tool:intel_tool_index')}">
37
- <i class="fas fa-clipboard-list fa-fw"></i>
38
+ <li class="d-flex flex-wrap m-2 p-2 pt-0 pb-0 mt-0 mb-0 me-0 pe-0">
39
+ <i class="nav-link fa-solid fa-clipboard-list fa-fw align-self-center me-3 active"></i>
40
+ <a class="nav-link flex-fill align-self-center me-auto" href="{reverse('aa_intel_tool:intel_tool_index')}">
38
41
  Intel Parser
39
42
  </a>
40
43
  </li>
41
44
  """
42
45
 
43
- cls.header = """
46
+ cls.header_top = '<div class="navbar-brand">Intel Parser</div>'
47
+
48
+ cls.header_public_page = """
44
49
  <div class="aa-intel-tool-header">
45
- <header>
46
- <h1>Intel Parser</h1>
47
- </header>
48
- <p>
49
- Please keep in mind, parsing large amounts of data can take some time. Be patient, CCP's API is not the fastest to answer …
50
- </p>
50
+ <h1 class="page-header text-center mb-3">
51
+ Intel Parser
52
+ </h1>
51
53
  </div>
52
54
  """
53
55
 
@@ -66,8 +68,14 @@ class TestAccess(TestCase):
66
68
  )
67
69
 
68
70
  self.assertEqual(first=response.status_code, second=HTTPStatus.OK)
69
- self.assertContains(response=response, text=self.html_menu, html=True)
70
- self.assertContains(response=response, text=self.header, html=True)
71
+ # self.assertContains(response=response, text=self.html_menu, html=True)
72
+ # self.assertContains(response=response, text=self.header_top, html=True)
73
+ self.assertInHTML(
74
+ needle=self.html_menu, haystack=response_content_to_str(response)
75
+ )
76
+ self.assertInHTML(
77
+ needle=self.header_top, haystack=response_content_to_str(response)
78
+ )
71
79
 
72
80
  def test_access_to_index_as_public_page(self):
73
81
  """
@@ -82,4 +90,7 @@ class TestAccess(TestCase):
82
90
  )
83
91
 
84
92
  self.assertEqual(first=response.status_code, second=HTTPStatus.OK)
85
- self.assertContains(response=response, text=self.header, html=True)
93
+ # self.assertContains(response=response, text=self.header_public_page, html=True)
94
+ self.assertInHTML(
95
+ needle=self.header_public_page, haystack=response_content_to_str(response)
96
+ )
@@ -12,6 +12,9 @@ from django.urls import reverse
12
12
  # Alliance Auth (External Libs)
13
13
  from app_utils.testing import create_fake_user
14
14
 
15
+ # AA Intel Tool
16
+ from aa_intel_tool.tests.utils import response_content_to_str
17
+
15
18
 
16
19
  class TestHooks(TestCase):
17
20
  """
@@ -32,22 +35,19 @@ class TestHooks(TestCase):
32
35
  )
33
36
 
34
37
  cls.html_menu = f"""
35
- <li>
36
- <a class href="{reverse('aa_intel_tool:intel_tool_index')}">
37
- <i class="fas fa-clipboard-list fa-fw"></i>
38
+ <li class="d-flex flex-wrap m-2 p-2 pt-0 pb-0 mt-0 mb-0 me-0 pe-0">
39
+ <i class="nav-link fa-solid fa-clipboard-list fa-fw align-self-center me-3 "></i>
40
+ <a class="nav-link flex-fill align-self-center me-auto" href="{reverse('aa_intel_tool:intel_tool_index')}">
38
41
  Intel Parser
39
42
  </a>
40
43
  </li>
41
44
  """
42
45
 
43
- cls.header = """
46
+ cls.header_public_page = """
44
47
  <div class="aa-intel-tool-header">
45
- <header>
46
- <h1>Intel Parser</h1>
47
- </header>
48
- <p>
49
- Please keep in mind, parsing large amounts of data can take some time. Be patient, CCP's API is not the fastest to answer …
50
- </p>
48
+ <h1 class="page-header text-center mb-3">
49
+ Intel Parser
50
+ </h1>
51
51
  </div>
52
52
  """
53
53
 
@@ -64,7 +64,10 @@ class TestHooks(TestCase):
64
64
  response = self.client.get(path=reverse(viewname="authentication:dashboard"))
65
65
 
66
66
  self.assertEqual(first=response.status_code, second=HTTPStatus.OK)
67
- self.assertContains(response=response, text=self.html_menu, html=True)
67
+ # self.assertContains(response=response, text=self.html_menu, html=True)
68
+ self.assertInHTML(
69
+ needle=self.html_menu, haystack=response_content_to_str(response)
70
+ )
68
71
 
69
72
  def test_render_hook_with_public_page(self):
70
73
  """
@@ -79,4 +82,7 @@ class TestHooks(TestCase):
79
82
  )
80
83
 
81
84
  self.assertEqual(first=response.status_code, second=HTTPStatus.OK)
82
- self.assertContains(response=response, text=self.header, html=True)
85
+ # self.assertContains(response=response, text=self.header, html=True)
86
+ self.assertInHTML(
87
+ needle=self.header_public_page, haystack=response_content_to_str(response)
88
+ )
@@ -2,7 +2,6 @@
2
2
  Tests for the template tags
3
3
  """
4
4
 
5
-
6
5
  # Django
7
6
  from django.test import TestCase
8
7
 
@@ -13,7 +12,7 @@ from aa_intel_tool.tests.utils import render_template
13
12
 
14
13
  class TestForumVersionedStatic(TestCase):
15
14
  """
16
- Tests for inteltool_versioned_static template tag
15
+ Tests for aa_intel_tool template tag
17
16
  """
18
17
 
19
18
  def test_versioned_static(self):
@@ -26,7 +25,7 @@ class TestForumVersionedStatic(TestCase):
26
25
 
27
26
  rendered_template = render_template(
28
27
  string=(
29
- "{% load inteltool_versioned_static %}"
28
+ "{% load aa_intel_tool %}"
30
29
  "{% aa_intel_tool_static 'aa_intel_tool/css/aa-intel-tool.min.css' %}"
31
30
  ),
32
31
  context=context,
@@ -6,6 +6,7 @@ Helper for our tests
6
6
  from pathlib import Path
7
7
 
8
8
  # Django
9
+ from django.core.handlers.wsgi import WSGIRequest
9
10
  from django.template import Context, Template
10
11
 
11
12
 
@@ -65,3 +66,16 @@ def load_fleetcomp_txt() -> str:
65
66
  """
66
67
 
67
68
  return (Path(__file__).parent / "test-data/fleetcomp.txt").read_text()
69
+
70
+
71
+ def response_content_to_str(response: WSGIRequest) -> str:
72
+ """
73
+ Return the content of a WSGIRequest response as string
74
+
75
+ :param response:
76
+ :type response:
77
+ :return:
78
+ :rtype:
79
+ """
80
+
81
+ return response.content.decode(response.charset)
@@ -74,7 +74,9 @@ def index(request: WSGIRequest) -> HttpResponse:
74
74
  context = {"form": form, "app_settings": AppSettings}
75
75
 
76
76
  return render(
77
- request=request, template_name="aa_intel_tool/views/index.html", context=context
77
+ request=request,
78
+ template_name="aa_intel_tool/views/index.html",
79
+ context=context,
78
80
  )
79
81
 
80
82