aa-intel-tool 2.10.1__py3-none-any.whl → 2.11.1__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.
- aa_intel_tool/__init__.py +1 -1
- aa_intel_tool/auth_hooks.py +2 -2
- aa_intel_tool/locale/cs_CZ/LC_MESSAGES/django.po +4 -4
- aa_intel_tool/locale/de/LC_MESSAGES/django.po +4 -4
- aa_intel_tool/locale/django.pot +5 -5
- aa_intel_tool/locale/es/LC_MESSAGES/django.po +4 -4
- aa_intel_tool/locale/fr_FR/LC_MESSAGES/django.po +4 -4
- aa_intel_tool/locale/it_IT/LC_MESSAGES/django.po +4 -4
- aa_intel_tool/locale/ja/LC_MESSAGES/django.mo +0 -0
- aa_intel_tool/locale/ja/LC_MESSAGES/django.po +35 -35
- aa_intel_tool/locale/ko_KR/LC_MESSAGES/django.po +4 -4
- aa_intel_tool/locale/nl_NL/LC_MESSAGES/django.po +4 -4
- aa_intel_tool/locale/pl_PL/LC_MESSAGES/django.po +4 -4
- aa_intel_tool/locale/ru/LC_MESSAGES/django.po +4 -4
- aa_intel_tool/locale/sk/LC_MESSAGES/django.po +4 -4
- aa_intel_tool/locale/uk/LC_MESSAGES/django.po +4 -4
- aa_intel_tool/locale/zh_Hans/LC_MESSAGES/django.po +4 -4
- aa_intel_tool/parser/module/dscan.py +4 -5
- aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.css +23 -26
- aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.min.css +1 -1
- aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.min.css.map +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan.js +169 -282
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan.min.js +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan.min.js.map +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.js +251 -572
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.min.js +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.min.js.map +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition.js +163 -237
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition.min.js +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition.min.js.map +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-scan-result-common.js +18 -0
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-scan-result-common.min.js +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-scan-result-common.min.js.map +1 -1
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/2.3.4/dataTables.bootstrap5.css +610 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/2.3.4/dataTables.bootstrap5.js +123 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/2.3.4/dataTables.bootstrap5.min.css +8 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/2.3.4/dataTables.bootstrap5.min.css.map +1 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/2.3.4/dataTables.bootstrap5.min.js +6 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/2.3.4/dataTables.bootstrap5.min.js.map +1 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/2.3.4/datatables.min.js +10 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/2.3.4/datatables.min.js.map +1 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/ColumnControl/1.1.1/css/columnControl.bootstrap5.css +516 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/ColumnControl/1.1.1/css/columnControl.bootstrap5.min.css +2 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/ColumnControl/1.1.1/css/columnControl.bootstrap5.min.css.map +1 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/ColumnControl/1.1.1/js/columnControl.bootstrap5.js +73 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/ColumnControl/1.1.1/js/columnControl.bootstrap5.min.js +6 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/ColumnControl/1.1.1/js/columnControl.bootstrap5.min.js.map +1 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/ColumnControl/1.1.1/js/dataTables.columnControl.js +3091 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/ColumnControl/1.1.1/js/dataTables.columnControl.min.js +10 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/ColumnControl/1.1.1/js/dataTables.columnControl.min.js.map +1 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/FixedHeader/4.0.4/css/fixedHeader.bootstrap5.css +20 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/FixedHeader/4.0.4/css/fixedHeader.bootstrap5.min.css +2 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/FixedHeader/4.0.4/css/fixedHeader.bootstrap5.min.css.map +1 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/FixedHeader/4.0.4/js/dataTables.fixedHeader.js +1203 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/FixedHeader/4.0.4/js/dataTables.fixedHeader.min.js +6 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/FixedHeader/4.0.4/js/dataTables.fixedHeader.min.js.map +1 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/FixedHeader/4.0.4/js/fixedHeader.bootstrap5.js +59 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/FixedHeader/4.0.4/js/fixedHeader.bootstrap5.min.js +6 -0
- aa_intel_tool/static/aa_intel_tool/libs/DataTables/Extensions/FixedHeader/4.0.4/js/fixedHeader.bootstrap5.min.js.map +1 -0
- aa_intel_tool/templates/aa_intel_tool/base.html +30 -0
- aa_intel_tool/templates/aa_intel_tool/bundles/datatables-2-css.html +11 -0
- aa_intel_tool/templates/aa_intel_tool/bundles/datatables-2-js.html +14 -0
- aa_intel_tool/templates/aa_intel_tool/partials/scan/chatlist/alliances.html +1 -1
- aa_intel_tool/templates/aa_intel_tool/partials/scan/chatlist/corporations.html +1 -1
- aa_intel_tool/templates/aa_intel_tool/partials/scan/chatlist/pilots.html +2 -2
- aa_intel_tool/templates/aa_intel_tool/partials/scan/dscan/interesting-on-grid/items.html +1 -1
- aa_intel_tool/templates/aa_intel_tool/partials/scan/dscan/ships-breakdown/ship-classes.html +1 -1
- aa_intel_tool/templates/aa_intel_tool/partials/scan/dscan/ships-breakdown/ship-types.html +1 -1
- aa_intel_tool/templates/aa_intel_tool/partials/scan/fleetcomp/fleet-details/pilots.html +1 -1
- aa_intel_tool/templates/aa_intel_tool/views/scan/chatlist.html +2 -2
- aa_intel_tool/templates/aa_intel_tool/views/scan/dscan.html +2 -2
- aa_intel_tool/templates/aa_intel_tool/views/scan/fleetcomp.html +2 -2
- aa_intel_tool/tests/__init__.py +38 -0
- aa_intel_tool/tests/test_access.py +2 -2
- aa_intel_tool/tests/test_admin.py +4 -3
- aa_intel_tool/tests/test_app_settings.py +3 -2
- aa_intel_tool/tests/test_auth_hooks.py +2 -2
- aa_intel_tool/tests/test_helper_data_structures.py +2 -4
- aa_intel_tool/tests/test_helper_eve_character.py +5 -7
- aa_intel_tool/tests/test_models.py +3 -3
- aa_intel_tool/tests/test_parser_general.py +48 -34
- aa_intel_tool/tests/test_parser_helper_db.py +2 -4
- aa_intel_tool/tests/test_parser_module_chatlist.py +2 -2
- aa_intel_tool/tests/test_parser_module_dscan.py +828 -0
- aa_intel_tool/tests/test_parser_module_feetcomp.py +230 -0
- aa_intel_tool/tests/test_tasks.py +56 -0
- aa_intel_tool/tests/test_views_ajax.py +72 -0
- aa_intel_tool/tests/test_views_general.py +240 -0
- {aa_intel_tool-2.10.1.dist-info → aa_intel_tool-2.11.1.dist-info}/METADATA +1 -1
- {aa_intel_tool-2.10.1.dist-info → aa_intel_tool-2.11.1.dist-info}/RECORD +92 -59
- {aa_intel_tool-2.10.1.dist-info → aa_intel_tool-2.11.1.dist-info}/WHEEL +0 -0
- {aa_intel_tool-2.10.1.dist-info → aa_intel_tool-2.11.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,307 +1,194 @@
|
|
|
1
|
-
/* global _getAaIntelToolJsSettings, _toggleChatscanStickyHighlight, bootstrapTooltip, fetchGet, pilotInfoPanel, corporationInfoPanel, allianceInfoPanel */
|
|
1
|
+
/* global _getAaIntelToolJsSettings, _toggleChatscanStickyHighlight, bootstrapTooltip, fetchGet, pilotInfoPanel, corporationInfoPanel, allianceInfoPanel, _removeSearchFromColumnControl, DataTable */
|
|
2
2
|
|
|
3
3
|
$(document).ready(() => {
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
/* Variables and helpers
|
|
7
|
-
--------------------------------------------------------------------------------- */
|
|
8
6
|
const settings = _getAaIntelToolJsSettings();
|
|
9
7
|
const elements = {
|
|
10
|
-
// Tables
|
|
11
8
|
pilotsTable: $('table.aa-intel-pilot-participation-list'),
|
|
12
9
|
corporationsTable: $('table.aa-intel-corporation-participation-list'),
|
|
13
10
|
alliancesTable: $('table.aa-intel-alliance-participation-list'),
|
|
14
|
-
|
|
15
|
-
// Totals counters
|
|
16
11
|
pilotsTotalCount: $('span#aa-intel-pilots-count'),
|
|
17
12
|
corporationsTotalCount: $('span#aa-intel-corporations-count'),
|
|
18
13
|
alliancesTotalCount: $('span#aa-intel-alliances-count')
|
|
19
14
|
};
|
|
15
|
+
const defaultOrder = [[1, 'desc']];
|
|
16
|
+
const defaultColumnDefs = [
|
|
17
|
+
{
|
|
18
|
+
target: 0,
|
|
19
|
+
createdCell: (td) => $(td).addClass('text-ellipsis fix-eve-image-position')
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
target: 1,
|
|
23
|
+
width: 35,
|
|
24
|
+
createdCell: (td) => $(td).addClass('text-end'),
|
|
25
|
+
columnControl: _removeSearchFromColumnControl(settings.dataTables.columnControl, 1)
|
|
26
|
+
}
|
|
27
|
+
];
|
|
20
28
|
|
|
21
|
-
/* DataTables
|
|
22
|
-
--------------------------------------------------------------------------------- */
|
|
23
29
|
/**
|
|
24
|
-
*
|
|
30
|
+
* Create the DataTable.
|
|
31
|
+
*
|
|
32
|
+
* @param table
|
|
33
|
+
* @param url
|
|
34
|
+
* @param loadingClass
|
|
35
|
+
* @param emptyClass
|
|
36
|
+
* @param containerClass
|
|
37
|
+
* @param columns
|
|
38
|
+
* @param rowClass
|
|
39
|
+
* @param totalCountElement
|
|
40
|
+
* @param rowAttributes
|
|
41
|
+
* @param highlightType
|
|
42
|
+
* @param tooltipSelector
|
|
43
|
+
* @param columnDefs
|
|
44
|
+
* @param order
|
|
25
45
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
data: 'count'
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
data: 'ticker'
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
order: [
|
|
59
|
-
[1, 'desc']
|
|
60
|
-
],
|
|
61
|
-
columnDefs: [
|
|
62
|
-
{
|
|
63
|
-
targets: 0,
|
|
64
|
-
createdCell: (td) => {
|
|
65
|
-
$(td).addClass('text-ellipsis fix-eve-image-position');
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
targets: 1,
|
|
70
|
-
width: 35,
|
|
71
|
-
createdCell: (td) => {
|
|
72
|
-
$(td).addClass('text-end');
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
targets: 2,
|
|
77
|
-
visible: false
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
createdRow: (row, data) => {
|
|
81
|
-
// Alliance total count
|
|
82
|
-
const currentTotal = elements.alliancesTotalCount.html();
|
|
83
|
-
let newTotal;
|
|
84
|
-
|
|
85
|
-
if (data.id !== 1) {
|
|
86
|
-
newTotal = parseInt(currentTotal) + 1;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
elements.alliancesTotalCount.html(newTotal);
|
|
90
|
-
|
|
91
|
-
$(row)
|
|
92
|
-
.addClass(`aa-intel-alliance-participation-item aa-intel-alliance-id-${data.id}`)
|
|
93
|
-
.attr('data-alliance-id', data.id);
|
|
94
|
-
},
|
|
95
|
-
initComplete: () => {
|
|
96
|
-
const classTableRow = $('.aa-intel-alliance-participation-item');
|
|
97
|
-
|
|
98
|
-
_toggleChatscanStickyHighlight({
|
|
99
|
-
element: classTableRow,
|
|
100
|
-
type: 'alliance'
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
// Initialize Bootstrap tooltips
|
|
104
|
-
bootstrapTooltip({selector: '.aa-intel-alliance-participation-list'});
|
|
105
|
-
}
|
|
106
|
-
});
|
|
46
|
+
const createDataTable = ({
|
|
47
|
+
table,
|
|
48
|
+
url,
|
|
49
|
+
loadingClass,
|
|
50
|
+
emptyClass,
|
|
51
|
+
containerClass,
|
|
52
|
+
columns,
|
|
53
|
+
rowClass,
|
|
54
|
+
totalCountElement,
|
|
55
|
+
rowAttributes,
|
|
56
|
+
highlightType,
|
|
57
|
+
tooltipSelector,
|
|
58
|
+
columnDefs,
|
|
59
|
+
order
|
|
60
|
+
}) => {
|
|
61
|
+
fetchGet({url})
|
|
62
|
+
.then((tableData) => {
|
|
63
|
+
$(`div.${loadingClass}`).addClass('d-none');
|
|
64
|
+
|
|
65
|
+
if (!tableData || Object.keys(tableData).length === 0) {
|
|
66
|
+
$(`div.${emptyClass}`).removeClass('d-none');
|
|
67
|
+
|
|
68
|
+
return;
|
|
107
69
|
}
|
|
108
|
-
}
|
|
109
|
-
})
|
|
110
|
-
.catch((error) => {
|
|
111
|
-
console.error('Error fetching alliance list data:', error);
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Datatable Corporations Breakdown
|
|
116
|
-
*/
|
|
117
|
-
fetchGet({url: settings.url.getCorporationList})
|
|
118
|
-
.then((tableData) => {
|
|
119
|
-
if (tableData) {
|
|
120
|
-
$('div.aa-intel-loading-table-info-corporation-participation-list').addClass('d-none');
|
|
121
|
-
|
|
122
|
-
if (Object.keys(tableData).length === 0) {
|
|
123
|
-
$('div.aa-intel-empty-table-info-corporation-participation-list').removeClass('d-none');
|
|
124
|
-
} else {
|
|
125
|
-
$('div.table-local-scan-corporations').removeClass('d-none');
|
|
126
|
-
|
|
127
|
-
elements.corporationsTable.DataTable({
|
|
128
|
-
data: tableData,
|
|
129
|
-
paging: false,
|
|
130
|
-
language: settings.language.dataTables,
|
|
131
|
-
lengthChange: false,
|
|
132
|
-
dom:
|
|
133
|
-
'<\'row\'<\'col-sm-12\'f>>' +
|
|
134
|
-
'<\'row\'<\'col-sm-12\'tr>>' +
|
|
135
|
-
'<\'row\'<\'col-sm-12\'i>>',
|
|
136
|
-
columns: [
|
|
137
|
-
{
|
|
138
|
-
data: (data) => {
|
|
139
|
-
return corporationInfoPanel(data);
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
data: 'count'
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
data: 'ticker'
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
data: 'alliance.name'
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
data: 'alliance.ticker'
|
|
153
|
-
}
|
|
154
|
-
],
|
|
155
|
-
order: [
|
|
156
|
-
[1, 'desc']
|
|
157
|
-
],
|
|
158
|
-
columnDefs: [
|
|
159
|
-
{
|
|
160
|
-
targets: 0,
|
|
161
|
-
createdCell: (td) => {
|
|
162
|
-
$(td).addClass('text-ellipsis fix-eve-image-position');
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
targets: 1,
|
|
167
|
-
width: 35,
|
|
168
|
-
createdCell: (td) => {
|
|
169
|
-
$(td).addClass('text-end');
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
targets: [2, 3, 4],
|
|
174
|
-
visible: false
|
|
175
|
-
}
|
|
176
|
-
],
|
|
177
|
-
createdRow: (row, data) => {
|
|
178
|
-
// Corporation total count
|
|
179
|
-
const currentTotal = elements.corporationsTotalCount.html();
|
|
180
|
-
const newTotal = parseInt(currentTotal) + 1;
|
|
181
|
-
|
|
182
|
-
elements.corporationsTotalCount.html(newTotal);
|
|
183
70
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
71
|
+
$(`div.${containerClass}`).removeClass('d-none');
|
|
72
|
+
|
|
73
|
+
const dt = new DataTable(table, { // eslint-disable-line no-unused-vars
|
|
74
|
+
data: tableData,
|
|
75
|
+
paging: false,
|
|
76
|
+
language: settings.language.dataTables,
|
|
77
|
+
lengthChange: false,
|
|
78
|
+
dom: settings.dataTables.dom,
|
|
79
|
+
ordering: settings.dataTables.ordering,
|
|
80
|
+
columnControl: settings.dataTables.columnControl,
|
|
81
|
+
columns: columns,
|
|
82
|
+
order: order || defaultOrder,
|
|
83
|
+
columnDefs: columnDefs || defaultColumnDefs,
|
|
84
|
+
createdRow: (row, data) => {
|
|
85
|
+
if (totalCountElement) {
|
|
86
|
+
const currentTotal = parseInt(totalCountElement.html()) || 0;
|
|
87
|
+
|
|
88
|
+
totalCountElement.html(currentTotal + 1);
|
|
199
89
|
}
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
})
|
|
204
|
-
.catch((error) => {
|
|
205
|
-
console.error('Error fetching corporation list data:', error);
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Datatable Pilots Breakdown
|
|
210
|
-
*/
|
|
211
|
-
fetchGet({url: settings.url.getPilotList})
|
|
212
|
-
.then((tableData) => {
|
|
213
|
-
if (tableData) {
|
|
214
|
-
$('div.aa-intel-loading-table-info-pilot-participation-list').addClass('d-none');
|
|
215
90
|
|
|
216
|
-
|
|
217
|
-
$('div.aa-intel-empty-table-info-pilot-participation-list').removeClass('d-none');
|
|
218
|
-
} else {
|
|
219
|
-
$('div.table-local-scan-pilots').removeClass('d-none');
|
|
91
|
+
$(row).addClass(rowClass);
|
|
220
92
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
language: settings.language.dataTables,
|
|
225
|
-
lengthChange: false,
|
|
226
|
-
dom:
|
|
227
|
-
'<\'row\'<\'col-sm-12\'f>>' +
|
|
228
|
-
'<\'row\'<\'col-sm-12\'tr>>' +
|
|
229
|
-
'<\'row\'<\'col-sm-12\'i>>',
|
|
230
|
-
columns: [
|
|
231
|
-
{
|
|
232
|
-
data: (data) => {
|
|
233
|
-
return pilotInfoPanel(data);
|
|
234
|
-
}
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
data: (data) => {
|
|
238
|
-
return allianceInfoPanel(data.alliance, true) + data.alliance.ticker;
|
|
239
|
-
}
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
data: (data) => {
|
|
243
|
-
return corporationInfoPanel(data.corporation, true) + data.corporation.ticker;
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
data: 'alliance.name'
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
data: 'corporation.name'
|
|
251
|
-
}
|
|
252
|
-
],
|
|
253
|
-
order: [
|
|
254
|
-
[0, 'asc']
|
|
255
|
-
],
|
|
256
|
-
columnDefs: [
|
|
257
|
-
{
|
|
258
|
-
targets: 0,
|
|
259
|
-
createdCell: (td) => {
|
|
260
|
-
$(td).addClass('text-ellipsis fix-eve-image-position');
|
|
261
|
-
}
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
targets: 1,
|
|
265
|
-
width: 125
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
targets: 2,
|
|
269
|
-
width: 125
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
targets: [3, 4],
|
|
273
|
-
visible: false
|
|
274
|
-
}
|
|
275
|
-
],
|
|
276
|
-
createdRow: (row, data) => {
|
|
277
|
-
// Pilot total count
|
|
278
|
-
const currentTotal = elements.pilotsTotalCount.html();
|
|
279
|
-
const newTotal = parseInt(currentTotal) + 1;
|
|
280
|
-
|
|
281
|
-
elements.pilotsTotalCount.html(newTotal);
|
|
282
|
-
|
|
283
|
-
$(row)
|
|
284
|
-
.addClass(`aa-intel-pilot-participation-item aa-intel-character-id-${data.id} aa-intel-corporation-id-${data.corporation.id} aa-intel-alliance-id-${data.alliance.id}`)
|
|
285
|
-
.attr('data-character-id', data.id)
|
|
286
|
-
.attr('data-corporation-id', data.corporation.id)
|
|
287
|
-
.attr('data-alliance-id', data.alliance.id);
|
|
288
|
-
},
|
|
289
|
-
initComplete: () => {
|
|
290
|
-
const classTableRow = $('.aa-intel-pilot-participation-item');
|
|
291
|
-
|
|
292
|
-
_toggleChatscanStickyHighlight({
|
|
293
|
-
element: classTableRow,
|
|
294
|
-
type: 'pilot'
|
|
93
|
+
if (rowAttributes) {
|
|
94
|
+
Object.entries(rowAttributes(data)).forEach(([key, value]) => {
|
|
95
|
+
$(row).attr(key, value);
|
|
295
96
|
});
|
|
296
|
-
|
|
297
|
-
// Initialize Bootstrap tooltips
|
|
298
|
-
bootstrapTooltip({selector: '.aa-intel-pilot-participation-list'});
|
|
299
97
|
}
|
|
300
|
-
}
|
|
301
|
-
|
|
98
|
+
},
|
|
99
|
+
initComplete: () => {
|
|
100
|
+
_toggleChatscanStickyHighlight({
|
|
101
|
+
element: $(`.${rowClass}`),
|
|
102
|
+
type: highlightType
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
if (tooltipSelector) {
|
|
106
|
+
bootstrapTooltip({selector: tooltipSelector});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
})
|
|
111
|
+
.catch((error) => console.error(`Error fetching data for ${rowClass}:`, error));
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
// Create the alliances DataTable.
|
|
115
|
+
createDataTable({
|
|
116
|
+
table: elements.alliancesTable,
|
|
117
|
+
url: settings.url.getAllianceList,
|
|
118
|
+
loadingClass: 'aa-intel-loading-table-info-alliance-participation-list',
|
|
119
|
+
emptyClass: 'aa-intel-empty-table-info-alliance-participation-list',
|
|
120
|
+
containerClass: 'table-local-scan-alliances',
|
|
121
|
+
columns: [
|
|
122
|
+
{data: (data) => `${allianceInfoPanel(data)}<span class="d-none">${(data.ticker || '')}</span>`},
|
|
123
|
+
{data: 'count'}
|
|
124
|
+
],
|
|
125
|
+
rowClass: 'aa-intel-alliance-participation-item',
|
|
126
|
+
totalCountElement: elements.alliancesTotalCount,
|
|
127
|
+
rowAttributes: (data) => ({'data-alliance-id': data.id}),
|
|
128
|
+
highlightType: 'alliance',
|
|
129
|
+
tooltipSelector: '.aa-intel-alliance-participation-list'
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
// Create the corporations DataTable.
|
|
133
|
+
createDataTable({
|
|
134
|
+
table: elements.corporationsTable,
|
|
135
|
+
url: settings.url.getCorporationList,
|
|
136
|
+
loadingClass: 'aa-intel-loading-table-info-corporation-participation-list',
|
|
137
|
+
emptyClass: 'aa-intel-empty-table-info-corporation-participation-list',
|
|
138
|
+
containerClass: 'table-local-scan-corporations',
|
|
139
|
+
columns: [
|
|
140
|
+
{data: (data) => `${corporationInfoPanel(data)}<span class="d-none">${(data.ticker || '')}, ${(data.alliance && data.alliance.name) || ''}, ${(data.alliance && data.alliance.ticker) || ''}</span>`},
|
|
141
|
+
{data: 'count'}
|
|
142
|
+
],
|
|
143
|
+
rowClass: 'aa-intel-corporation-participation-item',
|
|
144
|
+
totalCountElement: elements.corporationsTotalCount,
|
|
145
|
+
rowAttributes: (data) => ({
|
|
146
|
+
'data-corporation-id': data.id,
|
|
147
|
+
'data-alliance-id': (data.alliance && data.alliance.id) || ''
|
|
148
|
+
}),
|
|
149
|
+
highlightType: 'corporation',
|
|
150
|
+
tooltipSelector: '.aa-intel-corporation-participation-list'
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
// Create the pilots DataTable.
|
|
154
|
+
createDataTable({
|
|
155
|
+
table: elements.pilotsTable,
|
|
156
|
+
url: settings.url.getPilotList,
|
|
157
|
+
loadingClass: 'aa-intel-loading-table-info-pilot-participation-list',
|
|
158
|
+
emptyClass: 'aa-intel-empty-table-info-pilot-participation-list',
|
|
159
|
+
containerClass: 'table-local-scan-pilots',
|
|
160
|
+
columns: [
|
|
161
|
+
{data: (data) => pilotInfoPanel(data)},
|
|
162
|
+
{data: (data) => `${corporationInfoPanel((data.corporation || {}), true)}${((data.corporation && data.corporation.ticker) || '')}<span class="d-none">${((data.corporation && data.corporation.name) || '')}</span>`},
|
|
163
|
+
{data: (data) => `${allianceInfoPanel((data.alliance || {}), true)}${((data.alliance && data.alliance.ticker) || '')}<span class="d-none">${((data.alliance && data.alliance.name) || '')}</span>`}
|
|
164
|
+
],
|
|
165
|
+
// custom order
|
|
166
|
+
order: [
|
|
167
|
+
[0, 'asc']
|
|
168
|
+
],
|
|
169
|
+
// custom columnDefs
|
|
170
|
+
columnDefs: [
|
|
171
|
+
{
|
|
172
|
+
target: 0,
|
|
173
|
+
createdCell: (td) => $(td).addClass('text-ellipsis fix-eve-image-position')
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
target: 1,
|
|
177
|
+
width: 125
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
target: 2,
|
|
181
|
+
width: 125
|
|
302
182
|
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
183
|
+
],
|
|
184
|
+
rowClass: 'aa-intel-pilot-participation-item',
|
|
185
|
+
totalCountElement: elements.pilotsTotalCount,
|
|
186
|
+
rowAttributes: (data) => ({
|
|
187
|
+
'data-character-id': data.id,
|
|
188
|
+
'data-corporation-id': (data.corporation && data.corporation.id) || '',
|
|
189
|
+
'data-alliance-id': (data.alliance && data.alliance.id) || ''
|
|
190
|
+
}),
|
|
191
|
+
highlightType: 'pilot',
|
|
192
|
+
tooltipSelector: '.aa-intel-pilot-participation-list'
|
|
193
|
+
});
|
|
307
194
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
$(document).ready(()=>{'use strict';const a=_getAaIntelToolJsSettings(),t={pilotsTable:$('table.aa-intel-pilot-participation-list'),corporationsTable:$('table.aa-intel-corporation-participation-list'),alliancesTable:$('table.aa-intel-alliance-participation-list'),pilotsTotalCount:$('span#aa-intel-pilots-count'),corporationsTotalCount:$('span#aa-intel-corporations-count'),alliancesTotalCount:$('span#aa-intel-alliances-count')}
|
|
1
|
+
$(document).ready(()=>{'use strict';const a=_getAaIntelToolJsSettings(),t={pilotsTable:$('table.aa-intel-pilot-participation-list'),corporationsTable:$('table.aa-intel-corporation-participation-list'),alliancesTable:$('table.aa-intel-alliance-participation-list'),pilotsTotalCount:$('span#aa-intel-pilots-count'),corporationsTotalCount:$('span#aa-intel-corporations-count'),alliancesTotalCount:$('span#aa-intel-alliances-count')},l=[[1,'desc']],o=[{target:0,createdCell:a=>$(a).addClass('text-ellipsis fix-eve-image-position')},{target:1,width:35,createdCell:a=>$(a).addClass('text-end'),columnControl:_removeSearchFromColumnControl(a.dataTables.columnControl,1)}],i=({table:t,url:i,loadingClass:e,emptyClass:n,containerClass:r,columns:s,rowClass:c,totalCountElement:p,rowAttributes:d,highlightType:C,tooltipSelector:u,columnDefs:g,order:m})=>{fetchGet({url:i}).then(i=>{if($(`div.${e}`).addClass('d-none'),!i||0===Object.keys(i).length)return void $(`div.${n}`).removeClass('d-none');$(`div.${r}`).removeClass('d-none');new DataTable(t,{data:i,paging:!1,language:a.language.dataTables,lengthChange:!1,dom:a.dataTables.dom,ordering:a.dataTables.ordering,columnControl:a.dataTables.columnControl,columns:s,order:m||l,columnDefs:g||o,createdRow:(a,t)=>{if(p){const a=parseInt(p.html())||0;p.html(a+1)}$(a).addClass(c),d&&Object.entries(d(t)).forEach(([t,l])=>{$(a).attr(t,l)})},initComplete:()=>{_toggleChatscanStickyHighlight({element:$(`.${c}`),type:C}),u&&bootstrapTooltip({selector:u})}})}).catch(a=>console.error(`Error fetching data for ${c}:`,a))};i({table:t.alliancesTable,url:a.url.getAllianceList,loadingClass:'aa-intel-loading-table-info-alliance-participation-list',emptyClass:'aa-intel-empty-table-info-alliance-participation-list',containerClass:'table-local-scan-alliances',columns:[{data:a=>`${allianceInfoPanel(a)}<span class="d-none">${a.ticker||''}</span>`},{data:'count'}],rowClass:'aa-intel-alliance-participation-item',totalCountElement:t.alliancesTotalCount,rowAttributes:a=>({'data-alliance-id':a.id}),highlightType:'alliance',tooltipSelector:'.aa-intel-alliance-participation-list'}),i({table:t.corporationsTable,url:a.url.getCorporationList,loadingClass:'aa-intel-loading-table-info-corporation-participation-list',emptyClass:'aa-intel-empty-table-info-corporation-participation-list',containerClass:'table-local-scan-corporations',columns:[{data:a=>`${corporationInfoPanel(a)}<span class="d-none">${a.ticker||''}, ${a.alliance&&a.alliance.name||''}, ${a.alliance&&a.alliance.ticker||''}</span>`},{data:'count'}],rowClass:'aa-intel-corporation-participation-item',totalCountElement:t.corporationsTotalCount,rowAttributes:a=>({'data-corporation-id':a.id,'data-alliance-id':a.alliance&&a.alliance.id||''}),highlightType:'corporation',tooltipSelector:'.aa-intel-corporation-participation-list'}),i({table:t.pilotsTable,url:a.url.getPilotList,loadingClass:'aa-intel-loading-table-info-pilot-participation-list',emptyClass:'aa-intel-empty-table-info-pilot-participation-list',containerClass:'table-local-scan-pilots',columns:[{data:a=>pilotInfoPanel(a)},{data:a=>`${corporationInfoPanel(a.corporation||{},!0)}${a.corporation&&a.corporation.ticker||''}<span class="d-none">${a.corporation&&a.corporation.name||''}</span>`},{data:a=>`${allianceInfoPanel(a.alliance||{},!0)}${a.alliance&&a.alliance.ticker||''}<span class="d-none">${a.alliance&&a.alliance.name||''}</span>`}],order:[[0,'asc']],columnDefs:[{target:0,createdCell:a=>$(a).addClass('text-ellipsis fix-eve-image-position')},{target:1,width:125},{target:2,width:125}],rowClass:'aa-intel-pilot-participation-item',totalCountElement:t.pilotsTotalCount,rowAttributes:a=>({'data-character-id':a.id,'data-corporation-id':a.corporation&&a.corporation.id||'','data-alliance-id':a.alliance&&a.alliance.id||''}),highlightType:'pilot',tooltipSelector:'.aa-intel-pilot-participation-list'})});
|
|
2
2
|
//# sourceMappingURL=aa-intel-tool-chatscan.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["$","document","ready","settings","_getAaIntelToolJsSettings","elements","pilotsTable","corporationsTable","alliancesTable","pilotsTotalCount","corporationsTotalCount","alliancesTotalCount","
|
|
1
|
+
{"version":3,"names":["$","document","ready","settings","_getAaIntelToolJsSettings","elements","pilotsTable","corporationsTable","alliancesTable","pilotsTotalCount","corporationsTotalCount","alliancesTotalCount","defaultOrder","defaultColumnDefs","target","createdCell","td","addClass","width","columnControl","_removeSearchFromColumnControl","dataTables","createDataTable","table","url","loadingClass","emptyClass","containerClass","columns","rowClass","totalCountElement","rowAttributes","highlightType","tooltipSelector","columnDefs","order","fetchGet","then","tableData","Object","keys","length","removeClass","DataTable","data","paging","language","lengthChange","dom","ordering","createdRow","row","currentTotal","parseInt","html","entries","forEach","key","value","attr","initComplete","_toggleChatscanStickyHighlight","element","type","bootstrapTooltip","selector","catch","error","console","getAllianceList","allianceInfoPanel","ticker","id","getCorporationList","corporationInfoPanel","alliance","name","getPilotList","pilotInfoPanel","corporation"],"sources":["aa-intel-tool-chatscan.js"],"mappings":"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","ignoreList":[]}
|