aa-intel-tool 2.5.2__py3-none-any.whl → 2.6.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.
- aa_intel_tool/__init__.py +1 -1
- aa_intel_tool/app_settings.py +1 -1
- aa_intel_tool/constants.py +12 -5
- aa_intel_tool/helper/static_files.py +41 -0
- aa_intel_tool/locale/cs_CZ/LC_MESSAGES/django.po +34 -55
- aa_intel_tool/locale/de/LC_MESSAGES/django.po +44 -74
- aa_intel_tool/locale/django.pot +25 -30
- aa_intel_tool/locale/es/LC_MESSAGES/django.po +33 -53
- aa_intel_tool/locale/fr_FR/LC_MESSAGES/django.po +44 -72
- aa_intel_tool/locale/it_IT/LC_MESSAGES/django.po +32 -50
- aa_intel_tool/locale/ja/LC_MESSAGES/django.po +32 -50
- aa_intel_tool/locale/ko_KR/LC_MESSAGES/django.po +40 -62
- aa_intel_tool/locale/nl_NL/LC_MESSAGES/django.po +32 -50
- aa_intel_tool/locale/pl_PL/LC_MESSAGES/django.po +34 -55
- aa_intel_tool/locale/ru/LC_MESSAGES/django.po +45 -76
- aa_intel_tool/locale/sk/LC_MESSAGES/django.po +33 -52
- aa_intel_tool/locale/uk/LC_MESSAGES/django.po +34 -55
- aa_intel_tool/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- aa_intel_tool/locale/zh_Hans/LC_MESSAGES/django.po +38 -55
- aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.css +5 -0
- 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-highlight.js +1 -0
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan-highlight.min.js +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan-highlight.min.js.map +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan.js +7 -7
- 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-highlight.js +1 -0
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan-highlight.min.js +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan-highlight.min.js.map +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.js +18 -18
- 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-highlight.js +28 -2
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition-highlight.min.js +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition-highlight.min.js.map +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-fleetcomposition.js +41 -8
- 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 +5 -5
- 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/javascript/aa-intel-tool.js +66 -2
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool.min.js +1 -1
- aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool.min.js.map +1 -1
- aa_intel_tool/templates/aa_intel_tool/base.html +67 -0
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-chatscan-highlight-js.html +3 -0
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-chatscan-js.html +6 -3
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-css.html +1 -1
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-dscan-highlight-js.html +3 -0
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-dscan-js.html +4 -3
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-fleetcomp-js.html +6 -5
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-fleetcomposition-highlight-js.html +3 -0
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-js.html +1 -1
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-scan-result-common-js.html +3 -0
- aa_intel_tool/templates/aa_intel_tool/views/scan/chatlist.html +3 -3
- aa_intel_tool/templates/aa_intel_tool/views/scan/dscan.html +3 -3
- aa_intel_tool/templates/aa_intel_tool/views/scan/fleetcomp.html +3 -3
- aa_intel_tool/templatetags/aa_intel_tool.py +66 -9
- aa_intel_tool/tests/test_app_settings.py +7 -1
- aa_intel_tool/tests/test_templatetags.py +57 -12
- {aa_intel_tool-2.5.2.dist-info → aa_intel_tool-2.6.0.dist-info}/METADATA +4 -3
- {aa_intel_tool-2.5.2.dist-info → aa_intel_tool-2.6.0.dist-info}/RECORD +66 -62
- {aa_intel_tool-2.5.2.dist-info → aa_intel_tool-2.6.0.dist-info}/WHEEL +1 -1
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-js-l10n.html +0 -46
- {aa_intel_tool-2.5.2.dist-info → aa_intel_tool-2.6.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
$(()=>{const
|
|
1
|
+
$(()=>{const a=$("table.aa-intel-dscan-ship-classes-ship-classes-list"),i=$("span#aa-intel-dscan-ship-classes-mass"),e=$("table.aa-intel-dscan-ship-types-list"),s=$("table.aa-intel-fleetcomp-pilot-ships-list"),l=$("span#aa-intel-fleet-participation-count");fetchAjaxData(aaIntelToolJsSettings.url.getShipClasses).then(t=>{t&&($("div.aa-intel-loading-table-info-ship-classes").addClass("d-none"),0===Object.keys(t).length?$("div.aa-intel-empty-table-info-ship-classes").removeClass("d-none"):($("div.table-dscan-ship-classes-ship-classes").removeClass("d-none"),a.DataTable({data:t,paging:!1,language:aaIntelToolJsSettings.translation.dataTables,lengthChange:!1,dom:"<'row'<'col-sm-12'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12'i>>",columns:[{data:t=>shipInfoPanel(t)},{data:"count"},{data:"type_name"}],order:[[1,"desc"]],columnDefs:[{targets:0,createdCell:t=>{$(t).addClass("text-ellipsis")}},{targets:1,width:45,createdCell:t=>{$(t).addClass("text-end")}},{targets:2,visible:!1}],createdRow:(e,t)=>{const a=i.data("mass")||0,s=parseInt(a)+t.mass;i.data("mass",s),i.html(new Intl.NumberFormat(aaIntelToolJsSettings.language).format(s)),$(e).attr("data-shipclass-id",t.id).attr("data-shiptype-id",t.type_id),$(e).mouseenter(()=>{addFleetcompositionHightlight("shipclass",$(e))}).mouseleave(()=>{removeFleetcompositionHightlight("shipclass",$(e))}),$(e).click(t=>{const a=$(t.target);a.hasClass("aa-intel-information-link")?t.stopPropagation():changeFleetcompositionStickyHighlight("shipclass",$(e))})}})))}).then(()=>{bootstrapTooltip(".aa-intel-dscan-ship-classes-ship-classes-list")}),fetchAjaxData(aaIntelToolJsSettings.url.getShipTypes).then(t=>{t&&($("div.aa-intel-loading-table-info-ship-types").addClass("d-none"),0===Object.keys(t).length?$("div.aa-intel-empty-table-info-ship-types").removeClass("d-none"):($("div.table-dscan-ship-types").removeClass("d-none"),e.DataTable({data:t,paging:!1,language:aaIntelToolJsSettings.translation.dataTables,lengthChange:!1,dom:"<'row'<'col-sm-12'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12'i>>",columns:[{data:"name"},{data:"count"}],order:[[1,"desc"]],columnDefs:[{targets:1,width:45,createdCell:t=>{$(t).addClass("text-end")}}],createdRow:(e,t)=>{$(e).attr("data-shiptype-id",t.id),$(e).mouseenter(()=>{addFleetcompositionHightlight("shiptype",$(e))}).mouseleave(()=>{removeFleetcompositionHightlight("shiptype",$(e))}),$(e).click(t=>{const a=$(t.target);a.hasClass("aa-intel-information-link")?t.stopPropagation():changeFleetcompositionStickyHighlight("shiptype",$(e))})}})))}).then(()=>{bootstrapTooltip(".aa-intel-dscan-ship-types-list")}),fetchAjaxData(aaIntelToolJsSettings.url.getFleetComposition).then(t=>{t&&($("div.aa-intel-loading-table-info-fleetcomp-pilot-ships").addClass("d-none"),0===Object.keys(t).length?$("div.aa-intel-empty-table-info-fleetcomp-pilot-ships").removeClass("d-none"):($("div.table-fleetcomp-pilot-ships").removeClass("d-none"),s.DataTable({data:t,paging:!1,language:aaIntelToolJsSettings.translation.dataTables,lengthChange:!1,dom:"<'row'<'col-sm-12'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12'i>>",columns:[{data:t=>pilotInfoPanel(t)},{data:"ship"},{data:"solarsystem"}],order:[[0,"asc"]],columnDefs:[{targets:0,createdCell:t=>{$(t).addClass("fix-eve-image-position")}}],createdRow:(e,t)=>{const a=l.html(),s=parseInt(a)+1;l.html(s),$(e).attr("data-shipclass-id",t.ship_id).attr("data-shiptype-id",t.ship_type_id),$(e).mouseenter(()=>{addFleetcompositionHightlight("shiptype",$(e))}).mouseleave(()=>{removeFleetcompositionHightlight("shiptype",$(e))}),$(e).click(t=>{const a=$(t.target);a.hasClass("aa-intel-information-link")?t.stopPropagation():changeFleetcompositionStickyHighlight("shiptype",$(e))})}})))}).then(()=>{bootstrapTooltip(".aa-intel-fleetcomp-pilot-ships-list")})});
|
|
2
2
|
//# sourceMappingURL=aa-intel-tool-fleetcomposition.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["aa-intel-tool-fleetcomposition.js"],"names":["$","elementShipClassesTable","elementShipClassesMass","elementShipTypesTable","elementFleetcompositionTable","elementPilotsCount","fetchAjaxData","
|
|
1
|
+
{"version":3,"sources":["aa-intel-tool-fleetcomposition.js"],"names":["$","elementShipClassesTable","elementShipClassesMass","elementShipTypesTable","elementFleetcompositionTable","elementPilotsCount","fetchAjaxData","aaIntelToolJsSettings","url","getShipClasses","then","tableData","addClass","Object","keys","length","removeClass","DataTable","data","paging","language","translation","dataTables","lengthChange","dom","columns","shipInfoPanel","order","columnDefs","targets","createdCell","td","width","visible","createdRow","row","currentMass","newMass","parseInt","mass","html","Intl","NumberFormat","format","attr","id","type_id","mouseenter","addFleetcompositionHightlight","mouseleave","removeFleetcompositionHightlight","click","target","event","hasClass","stopPropagation","changeFleetcompositionStickyHighlight","bootstrapTooltip","getShipTypes","getFleetComposition","pilotInfoPanel","currentTotal","newTotal","ship_id","ship_type_id"],"mappings":"AAEAA,EAAE,KAGE,MAAMC,EAA0BD,EAAE,qDAAqD,EACjFE,EAAyBF,EAAE,uCAAuC,EAClEG,EAAwBH,EAAE,sCAAsC,EAChEI,EAA+BJ,EAAE,2CAA2C,EAC5EK,EAAqBL,EAAE,yCAAyC,EAMtEM,cAAcC,sBAAsBC,IAAIC,cAAc,EAAEC,KAAKC,IACrDA,IACAX,EAAE,8CAA8C,EAAEY,SAAS,QAAQ,EAE7B,IAAlCC,OAAOC,KAAKH,CAAS,EAAEI,OACvBf,EAAE,4CAA4C,EAAEgB,YAAY,QAAQ,GAEpEhB,EAAE,2CAA2C,EAAEgB,YAAY,QAAQ,EAEnEf,EAAwBgB,UAAU,CAC9BC,KAAMP,EACNQ,OAAQ,CAAA,EACRC,SAAUb,sBAAsBc,YAAYC,WAC5CC,aAAc,CAAA,EACdC,IACI,mEAGJC,QAAS,CACL,CACIP,KAAM,GACKQ,cAAcR,CAAI,CAEjC,EACA,CACIA,KAAM,OACV,EACA,C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C,aAAc,CAAA,EACdC,IACI,mEAGJC,QAAS,CACL,CACIP,KAAM,GACK0C,eAAe1C,CAAI,CAElC,EACA,CACIA,KAAM,MACV,EACA,CACIA,KAAM,aACV,GAEJS,MAAO,CACH,CAAC,EAAG,QAERC,WAAY,CACR,CACIC,QAAS,EACTC,YAAa,IACT9B,EAAE+B,CAAE,EAAEnB,SAAS,wBAAwB,CAC3C,CACJ,GAEJsB,WAAY,CAACC,EAAKjB,KAEd,MAAM2C,EAAexD,EAAmBmC,KAAK,EACvCsB,EAAWxB,SAASuB,CAAY,EAAI,EAE1CxD,EAAmBmC,KAAKsB,CAAQ,EAEhC9D,EAAEmC,CAAG,EACAS,KAAK,oBAAqB1B,EAAK6C,OAAO,EACtCnB,KAAK,mBAAoB1B,EAAK8C,YAAY,EAG/ChE,EAAEmC,CAAG,EAAEY,WAAW,KACdC,8BAA8B,WAAYhD,EAAEmC,CAAG,CAAC,CACpD,CAAC,EAAEc,WAAW,KACVC,iCAAiC,WAAYlD,EAAEmC,CAAG,CAAC,CACvD,CAAC,EAGDnC,EAAEmC,CAAG,EAAEgB,MAAM,IACT,MAAMC,EAASpD,EAAEqD,EAAMD,MAAM,EAEzBA,EAAOE,SAAS,2BAA2B,EAC3CD,EAAME,gBAAgB,EAEtBC,sCAAsC,WAAYxD,EAAEmC,CAAG,CAAC,CAEhE,CAAC,CACL,CACJ,CAAC,GAGb,CAAC,EAAEzB,KAAK,KAEJ+C,iBAAiB,sCAAsC,CAC3D,CAAC,CACL,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* global
|
|
1
|
+
/* global aaIntelToolJsSettings, ClipboardJS, bootstrap */
|
|
2
2
|
|
|
3
3
|
/* jshint -W097 */
|
|
4
4
|
'use strict';
|
|
@@ -117,7 +117,7 @@ const corporationInfoPanel = (corporationData, logoOnly = false) => { // eslint-
|
|
|
117
117
|
html_info += `<span class="aa-intel-corporation-links-wrapper"><small>`;
|
|
118
118
|
|
|
119
119
|
if ((1000000 <= corporationData.id) && corporationData.id <= 2000000) {
|
|
120
|
-
html_info += `(${
|
|
120
|
+
html_info += `(${aaIntelToolJsSettings.translation.scanData.npcCorp})`;
|
|
121
121
|
} else {
|
|
122
122
|
html_info += `${dotlanLinkHtml(corporationData.dotlan)} | ${zkillboardLinkHtml(corporationData.zkillboard)}</small></span>`;
|
|
123
123
|
}
|
|
@@ -141,7 +141,7 @@ const corporationInfoPanel = (corporationData, logoOnly = false) => { // eslint-
|
|
|
141
141
|
*/
|
|
142
142
|
const allianceInfoPanel = (allianceData, logoOnly = false) => { // eslint-disable-line no-unused-vars
|
|
143
143
|
if (allianceData.name === '') {
|
|
144
|
-
allianceData.name =
|
|
144
|
+
allianceData.name = aaIntelToolJsSettings.translation.scanData.empty;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
const html_logo = `<span class="aa-intel-corporation-logo-wrapper">${eveImageHtml(allianceData.id, allianceData.name, allianceData.logo)}</span>`;
|
|
@@ -254,7 +254,7 @@ $(() => {
|
|
|
254
254
|
*/
|
|
255
255
|
clipboardScanLink.on('success', (e) => {
|
|
256
256
|
showSuccess(
|
|
257
|
-
|
|
257
|
+
aaIntelToolJsSettings.translation.copyToClipboard.permalink.text.success,
|
|
258
258
|
'.aa-intel-copy-result'
|
|
259
259
|
);
|
|
260
260
|
|
|
@@ -267,7 +267,7 @@ $(() => {
|
|
|
267
267
|
*/
|
|
268
268
|
clipboardScanLink.on('error', () => {
|
|
269
269
|
showError(
|
|
270
|
-
|
|
270
|
+
aaIntelToolJsSettings.translation.copyToClipboard.permalink.text.error,
|
|
271
271
|
'.aa-intel-copy-result'
|
|
272
272
|
);
|
|
273
273
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const fetchAjaxData=async a=>fetch(a).then(a=>a.ok?Promise.resolve(a):Promise.reject(new Error("Failed to load"))).then(a=>a.json()).then(a=>a).catch(function(a){console.log(`Error: ${a.message}`)}),bootstrapTooltip=(a="body")=>{[].slice.call(document.querySelectorAll(`${a} [data-bs-tooltip="aa-intel-tool"]`)).map(a=>new bootstrap.Tooltip(a))},eveImageHtml=(a,e,l,n=32)=>`<img class="eve-image rounded" data-eveid="${a}" src="${l}" alt="${e}" title="${e}" data-bs-tooltip="aa-intel-tool" loading="lazy" width="${n}" height="${n}">`,eveWhoLinkHtml=a=>`<a class="aa-intel-information-link" href="${a}" target="_blank" rel="noopener noreferer">evewho <sup><small><i class="fa-solid fa-external-link-alt" aria-hidden="true"></i></small></sup></a>`,zkillboardLinkHtml=a=>`<a class="aa-intel-information-link" href="${a}" target="_blank" rel="noopener noreferer">zkillboard <sup><small><i class="fa-solid fa-external-link-alt" aria-hidden="true"></i></small></sup></a>`,dotlanLinkHtml=a=>`<a class="aa-intel-information-link" href="${a}" target="_blank" rel="noopener noreferer">dotlan <sup><small><i class="fa-solid fa-external-link-alt" aria-hidden="true"></i></small></sup></a>`,pilotInfoPanel=a=>{const e=`<span class="aa-intel-pilot-avatar-wrapper">${eveImageHtml(a.id,a.name,a.portrait)}</span>`;let l=`<span class="aa-intel-pilot-information-wrapper"><span class="aa-intel-pilot-name-wrapper">${a.name}</span>`;return l+=`<span class="aa-intel-pilot-links-wrapper"><small>${eveWhoLinkHtml(a.evewho)} | ${zkillboardLinkHtml(a.zkillboard)}</small></span>`,e+l},corporationInfoPanel=(a,e=!1)=>{const l=`<span class="aa-intel-corporation-logo-wrapper">${eveImageHtml(a.id,a.name,a.logo)}</span>`;let n=`<span class="aa-intel-corporation-information-wrapper"><span class="aa-intel-corporation-name-wrapper">${a.name}</span>`;return n+=`<span class="aa-intel-corporation-links-wrapper"><small>`,1e6<=a.id&&a.id<=2e6?n+=`(${
|
|
1
|
+
const fetchAjaxData=async a=>fetch(a).then(a=>a.ok?Promise.resolve(a):Promise.reject(new Error("Failed to load"))).then(a=>a.json()).then(a=>a).catch(function(a){console.log(`Error: ${a.message}`)}),bootstrapTooltip=(a="body")=>{[].slice.call(document.querySelectorAll(`${a} [data-bs-tooltip="aa-intel-tool"]`)).map(a=>new bootstrap.Tooltip(a))},eveImageHtml=(a,e,l,n=32)=>`<img class="eve-image rounded" data-eveid="${a}" src="${l}" alt="${e}" title="${e}" data-bs-tooltip="aa-intel-tool" loading="lazy" width="${n}" height="${n}">`,eveWhoLinkHtml=a=>`<a class="aa-intel-information-link" href="${a}" target="_blank" rel="noopener noreferer">evewho <sup><small><i class="fa-solid fa-external-link-alt" aria-hidden="true"></i></small></sup></a>`,zkillboardLinkHtml=a=>`<a class="aa-intel-information-link" href="${a}" target="_blank" rel="noopener noreferer">zkillboard <sup><small><i class="fa-solid fa-external-link-alt" aria-hidden="true"></i></small></sup></a>`,dotlanLinkHtml=a=>`<a class="aa-intel-information-link" href="${a}" target="_blank" rel="noopener noreferer">dotlan <sup><small><i class="fa-solid fa-external-link-alt" aria-hidden="true"></i></small></sup></a>`,pilotInfoPanel=a=>{const e=`<span class="aa-intel-pilot-avatar-wrapper">${eveImageHtml(a.id,a.name,a.portrait)}</span>`;let l=`<span class="aa-intel-pilot-information-wrapper"><span class="aa-intel-pilot-name-wrapper">${a.name}</span>`;return l+=`<span class="aa-intel-pilot-links-wrapper"><small>${eveWhoLinkHtml(a.evewho)} | ${zkillboardLinkHtml(a.zkillboard)}</small></span>`,e+l},corporationInfoPanel=(a,e=!1)=>{const l=`<span class="aa-intel-corporation-logo-wrapper">${eveImageHtml(a.id,a.name,a.logo)}</span>`;let n=`<span class="aa-intel-corporation-information-wrapper"><span class="aa-intel-corporation-name-wrapper">${a.name}</span>`;return n+=`<span class="aa-intel-corporation-links-wrapper"><small>`,1e6<=a.id&&a.id<=2e6?n+=`(${aaIntelToolJsSettings.translation.scanData.npcCorp})`:n+=`${dotlanLinkHtml(a.dotlan)} | ${zkillboardLinkHtml(a.zkillboard)}</small></span>`,n+=`</span>`,e?l:l+n},allianceInfoPanel=(a,e=!1)=>{""===a.name&&(a.name=aaIntelToolJsSettings.translation.scanData.empty);const l=`<span class="aa-intel-corporation-logo-wrapper">${eveImageHtml(a.id,a.name,a.logo)}</span>`;let n=`<span class="aa-intel-alliance-information-wrapper"><span class="aa-intel-alliance-name-wrapper">${a.name}</span>`;return 1<a.id&&(n+=`<span class="aa-intel-alliance-links-wrapper"><small>${dotlanLinkHtml(a.dotlan)} | ${zkillboardLinkHtml(a.zkillboard)}</small></span>`),n+=`</span>`,e?1===a.id?"":l:l+n},shipInfoPanel=a=>{const e=`<span class="aa-intel-ship-image-wrapper">${eveImageHtml(a.id,a.name,a.image)}</span>`,l=`<span class="aa-intel-ship-information-wrapper"><span class="aa-intel-ship-name-wrapper">${a.name}</span></span>`;return e+l};$(()=>{const a=$("button#btn-copy-permalink-to-clipboard"),l=(ClipboardJS.isSupported()||a.remove(),(a,e=10)=>{$(a).fadeTo(1e3*e,500).slideUp(500,()=>{$(a).remove()})}),n=(a,e)=>{$(e).html(`<div class="alert alert-success alert-dismissible alert-message-success d-flex align-items-center fade show">${a}<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button></div>`),l(".alert-message-success")},t=(a,e)=>{$(e).html(`<div class="alert alert-danger alert-dismissible alert-message-error d-flex align-items-center fade show">${a}<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button></div>`),l(".alert-message-error",9999)},e=a=>{const e=new ClipboardJS(a);e.on("success",a=>{n(aaIntelToolJsSettings.translation.copyToClipboard.permalink.text.success,".aa-intel-copy-result"),a.clearSelection(),e.destroy()}),e.on("error",()=>{t(aaIntelToolJsSettings.translation.copyToClipboard.permalink.text.error,".aa-intel-copy-result"),e.destroy()})};a.click(()=>{e("#"+a.attr("id"))})});
|
|
2
2
|
//# sourceMappingURL=aa-intel-tool-scan-result-common.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["aa-intel-tool-scan-result-common.js"],"names":["fetchAjaxData","async","url","fetch","then","response","ok","Promise","resolve","reject","Error","json","tableData","catch","error","console","log","message","bootstrapTooltip","selector","slice","call","document","querySelectorAll","map","bootstrap","Tooltip","tooltipTriggerEl","eveImageHtml","eveId","eveName","imageSource","imageSize","eveWhoLinkHtml","href","zkillboardLinkHtml","dotlanLinkHtml","pilotInfoPanel","html_logo","pilotData","id","name","portrait","let","html_info","evewho","zkillboard","corporationInfoPanel","corporationData","logoOnly","logo","
|
|
1
|
+
{"version":3,"sources":["aa-intel-tool-scan-result-common.js"],"names":["fetchAjaxData","async","url","fetch","then","response","ok","Promise","resolve","reject","Error","json","tableData","catch","error","console","log","message","bootstrapTooltip","selector","slice","call","document","querySelectorAll","map","bootstrap","Tooltip","tooltipTriggerEl","eveImageHtml","eveId","eveName","imageSource","imageSize","eveWhoLinkHtml","href","zkillboardLinkHtml","dotlanLinkHtml","pilotInfoPanel","html_logo","pilotData","id","name","portrait","let","html_info","evewho","zkillboard","corporationInfoPanel","corporationData","logoOnly","logo","aaIntelToolJsSettings","translation","scanData","npcCorp","dotlan","allianceInfoPanel","allianceData","empty","shipInfoPanel","shipData","image","$","elementCopyToClipboard","closeMessageElement","ClipboardJS","isSupported","remove","element","closeAfter","fadeTo","slideUp","showSuccess","html","showError","copyScanLink","clipboardScanLink","elementId","on","copyToClipboard","permalink","text","success","e","clearSelection","destroy","click","attr"],"mappings":"AAWA,MAAMA,cAAgBC,MAAOC,GACZC,MAAMD,CAAG,EACjBE,KAAKC,GACEA,EAASC,GACFC,QAAQC,QAAQH,CAAQ,EAExBE,QAAQE,OAAO,IAAIC,MAAM,gBAAgB,CAAC,CAExD,EACAN,KAAKC,GAAYA,EAASM,KAAK,CAAC,EAChCP,KAAKQ,GACKA,CACV,EACAC,MAAM,SAAUC,GACbC,QAAQC,cAAcF,EAAMG,SAAS,CACzC,CAAC,EASHC,iBAAmB,CAACC,EAAW,UAEjC,GAAGC,MAAMC,KAAKC,SAASC,oBAAoBJ,qCAA4C,CAAC,EACnFK,IAAI,GACM,IAAIC,UAAUC,QAAQC,CAAgB,CAChD,CACT,EAYMC,aAAe,CAACC,EAAOC,EAASC,EAAaC,EAAY,mDACNH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B,EAGAkB,EAAE,KACE,MAAMC,EAAyBD,EAAE,wCAAwC,EAiBnEE,GAXDC,YAAYC,YAAY,GACzBH,EAAuBI,OAAO,EAUN,CAACC,EAASC,EAAa,MAC/CP,EAAEM,CAAO,EAAEE,OAAoB,IAAbD,EAAmB,GAAG,EAAEE,QAAQ,IAAK,KACnDT,EAAEM,CAAO,EAAED,OAAO,CACtB,CAAC,CACL,GASMK,EAAc,CAACvD,EAASmD,KAC1BN,EAAEM,CAAO,EAAEK,qHACyGxD,qGACpH,EAEA+C,EAAoB,wBAAwB,CAChD,EASMU,EAAY,CAACzD,EAASmD,KACxBN,EAAEM,CAAO,EAAEK,kHACsGxD,qGACjH,EAEA+C,EAAoB,uBAAwB,IAAI,CACpD,EAQMW,EAAe,IAMjB,MAAMC,EAAoB,IAAIX,YAAYY,CAAS,EAOnDD,EAAkBE,GAAG,UAAW,IAC5BN,EACIrB,sBAAsBC,YAAY2B,gBAAgBC,UAAUC,KAAKC,QACjE,uBACJ,EAEAC,EAAEC,eAAe,EACjBR,EAAkBS,QAAQ,CAC9B,CAAC,EAKDT,EAAkBE,GAAG,QAAS,KAC1BJ,EACIvB,sBAAsBC,YAAY2B,gBAAgBC,UAAUC,KAAKnE,MACjE,uBACJ,EAEA8D,EAAkBS,QAAQ,CAC9B,CAAC,CACL,EAMAtB,EAAuBuB,MAAM,KACzBX,EAAa,IAAMZ,EAAuBwB,KAAK,IAAI,CAAC,CACxD,CAAC,CACL,CAAC"}
|
|
@@ -1,6 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/* global aaIntelToolJsSettingsDefaults, aaIntelToolJsSettingsOverride */
|
|
2
|
+
|
|
3
|
+
/* jshint -W097 */
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Checks if the given item is a plain object, excluding arrays and dates.
|
|
8
|
+
*
|
|
9
|
+
* @param {*} item - The item to check.
|
|
10
|
+
* @returns {boolean} True if the item is a plain object, false otherwise.
|
|
11
|
+
*/
|
|
12
|
+
const isObject = (item) => {
|
|
13
|
+
return (
|
|
14
|
+
item && typeof item === 'object' && !Array.isArray(item) && !(item instanceof Date)
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Recursively merges properties from source objects into a target object. If a property at the current level is an object,
|
|
20
|
+
* and both target and source have it, the property is merged. Otherwise, the source property overwrites the target property.
|
|
21
|
+
* This function does not modify the source objects and prevents prototype pollution by not allowing __proto__, constructor,
|
|
22
|
+
* and prototype property names.
|
|
23
|
+
*
|
|
24
|
+
* @param {Object} target - The target object to merge properties into.
|
|
25
|
+
* @param {...Object} sources - One or more source objects from which to merge properties.
|
|
26
|
+
* @returns {Object} The target object after merging properties from sources.
|
|
27
|
+
*/
|
|
28
|
+
const objectMerge = (target, ...sources) => {
|
|
29
|
+
if (!sources.length) {
|
|
30
|
+
return target;
|
|
31
|
+
}
|
|
3
32
|
|
|
33
|
+
// Iterate through each source object without modifying the `sources` array.
|
|
34
|
+
sources.forEach(source => {
|
|
35
|
+
if (isObject(target) && isObject(source)) {
|
|
36
|
+
for (const key in source) {
|
|
37
|
+
if (isObject(source[key])) {
|
|
38
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
39
|
+
continue; // Skip potentially dangerous keys to prevent prototype pollution.
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (!target[key] || !isObject(target[key])) {
|
|
43
|
+
target[key] = {};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
objectMerge(target[key], source[key]);
|
|
47
|
+
} else {
|
|
48
|
+
target[key] = source[key];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
return target;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// Build the settings object
|
|
58
|
+
let aaIntelToolJsSettings = typeof aaIntelToolJsSettingsDefaults !== 'undefined' ? aaIntelToolJsSettingsDefaults : null; // eslint-disable-line no-unused-vars
|
|
59
|
+
|
|
60
|
+
if (aaIntelToolJsSettings && typeof aaIntelToolJsSettingsOverride !== 'undefined') {
|
|
61
|
+
aaIntelToolJsSettings = objectMerge( // eslint-disable-line no-unused-vars
|
|
62
|
+
aaIntelToolJsSettings,
|
|
63
|
+
aaIntelToolJsSettingsOverride
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
$(() => {
|
|
4
68
|
/**
|
|
5
69
|
* Prevent double form submits
|
|
6
70
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
const isObject=t=>t&&"object"==typeof t&&!Array.isArray(t)&&!(t instanceof Date),objectMerge=(s,...t)=>(t.length&&t.forEach(t=>{if(isObject(s)&&isObject(t))for(var e in t)isObject(t[e])?"__proto__"!==e&&"constructor"!==e&&"prototype"!==e&&(s[e]&&isObject(s[e])||(s[e]={}),objectMerge(s[e],t[e])):s[e]=t[e]}),s);let aaIntelToolJsSettings="undefined"!=typeof aaIntelToolJsSettingsDefaults?aaIntelToolJsSettingsDefaults:null;aaIntelToolJsSettings&&"undefined"!=typeof aaIntelToolJsSettingsOverride&&(aaIntelToolJsSettings=objectMerge(aaIntelToolJsSettings,aaIntelToolJsSettingsOverride)),$(()=>{document.querySelectorAll("form").forEach(e=>{e.addEventListener("submit",t=>{e.classList.contains("is-submitting")&&t.preventDefault(),e.classList.add("is-submitting")})})});
|
|
2
2
|
//# sourceMappingURL=aa-intel-tool.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["aa-intel-tool.js"],"names":["
|
|
1
|
+
{"version":3,"sources":["aa-intel-tool.js"],"names":["isObject","item","Array","isArray","Date","objectMerge","target","sources","length","forEach","source","key","let","aaIntelToolJsSettings","aaIntelToolJsSettingsDefaults","aaIntelToolJsSettingsOverride","$","document","querySelectorAll","form","addEventListener","classList","contains","e","preventDefault","add"],"mappings":"AAWA,MAAMA,SAAW,GAETC,GAAwB,UAAhB,OAAOA,GAAqB,CAACC,MAAMC,QAAQF,CAAI,GAAK,EAAEA,aAAgBG,MAchFC,YAAc,CAACC,KAAWC,KACvBA,EAAQC,QAKbD,EAAQE,QAAQC,IACZ,GAAIV,SAASM,CAAM,GAAKN,SAASU,CAAM,EACnC,IAAK,IAAMC,KAAOD,EACVV,SAASU,EAAOC,EAAI,EACR,cAARA,GAA+B,gBAARA,GAAiC,cAARA,IAI/CL,EAAOK,IAASX,SAASM,EAAOK,EAAI,IACrCL,EAAOK,GAAO,IAGlBN,YAAYC,EAAOK,GAAMD,EAAOC,EAAI,GAEpCL,EAAOK,GAAOD,EAAOC,EAIrC,CAAC,EAEML,GAIXM,IAAIC,sBAAiE,aAAzC,OAAOC,8BAAgDA,8BAAgC,KAE/GD,uBAAkE,aAAzC,OAAOE,gCAChCF,sBAAwBR,YACpBQ,sBACAE,6BACJ,GAGJC,EAAE,KAIEC,SAASC,iBAAiB,MAAM,EAAET,QAAQ,IACtCU,EAAKC,iBAAiB,SAAU,IAExBD,EAAKE,UAAUC,SAAS,eAAe,GACvCC,EAAEC,eAAe,EAIrBL,EAAKE,UAAUI,IAAI,eAAe,CACtC,CAAC,CACL,CAAC,CACL,CAAC"}
|
|
@@ -17,6 +17,73 @@
|
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
19
|
<div class="aa-intel-tool-body">
|
|
20
|
+
{% translate "Permalink successfully copied" as copyToClipboardSuccess %}
|
|
21
|
+
{% translate "Something went wrong. Nothing copied. Maybe your browser does not support this function." as copyToClipboardError %}
|
|
22
|
+
{% translate "Unaffiliated / No Alliance" as scanDataEmpty %}
|
|
23
|
+
{% translate "NPC Corp" as scanDataNpcCorp %}
|
|
24
|
+
{% translate "." context "Decimal separator" as decimalSeparator %}
|
|
25
|
+
{% translate "," context "Thousands separator" as thousandsSeparator %}
|
|
26
|
+
{% translate "No data available in this table" as emptyTable %}
|
|
27
|
+
{% translate "Showing _END_ entries" as info context "Keep _END_ as it is. It will be replaced by a number." %}
|
|
28
|
+
{% translate "(filtered from _MAX_ total entries)" as infoFiltered context "Keep _MAX_ as it is. It will be replaced by a number." %}
|
|
29
|
+
{% translate "No records available" as infoEmpty %}
|
|
30
|
+
{% translate "Loading …" as loadingRecords %}
|
|
31
|
+
{% translate "Processing …" as processing %}
|
|
32
|
+
{% translate "Nothing found, sorry …" as zeroRecords%}
|
|
33
|
+
{% translate "Search …" as searchPlaceholder %}
|
|
34
|
+
{% translate "First" as paginateFirst %}
|
|
35
|
+
{% translate "Last" as paginateLast %}
|
|
36
|
+
{% translate "Next" as paginateNext %}
|
|
37
|
+
{% translate "Previous" as paginatePrevious %}
|
|
38
|
+
{% translate ": activate to sort column ascending" as ariaSortAscending %}
|
|
39
|
+
{% translate ": activate to sort column descending" as ariaSortDescending %}
|
|
40
|
+
|
|
41
|
+
<script>
|
|
42
|
+
const aaIntelToolJsSettingsDefaults = {
|
|
43
|
+
language: '{{ LANGUAGE_CODE }}',
|
|
44
|
+
url: {},
|
|
45
|
+
translation: {
|
|
46
|
+
copyToClipboard: {
|
|
47
|
+
permalink: {
|
|
48
|
+
text: {
|
|
49
|
+
success: '{{ copyToClipboardSuccess|escapejs }}',
|
|
50
|
+
error: '{{ copyToClipboardError|escapejs }}'
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
scanData: {
|
|
55
|
+
empty: '{{ scanDataEmpty|escapejs }}',
|
|
56
|
+
npcCorp: '{{ scanDataNpcCorp|escapejs }}',
|
|
57
|
+
},
|
|
58
|
+
dataTables: {
|
|
59
|
+
decimal: '{{ decimalSeparator|escapejs }}',
|
|
60
|
+
thousands: '{{ thousandsSeparator|escapejs }}',
|
|
61
|
+
emptyTable: '{{ emptyTable|escapejs }}',
|
|
62
|
+
info: '{{ info|escapejs }}',
|
|
63
|
+
infoFiltered: '{{ infoFiltered|escapejs }}',
|
|
64
|
+
infoEmpty: '{{ infoEmpty|escapejs }}',
|
|
65
|
+
infoPostFix: '',
|
|
66
|
+
lengthMenu: '_MENU_',
|
|
67
|
+
loadingRecords: '{{ loadingRecords|escapejs }}',
|
|
68
|
+
processing: '{{ processing|escapejs }}',
|
|
69
|
+
zeroRecords: '{{ zeroRecords|escapejs }}',
|
|
70
|
+
search: '_INPUT_',
|
|
71
|
+
searchPlaceholder: '{{ searchPlaceholder|escapejs }}',
|
|
72
|
+
paginate: {
|
|
73
|
+
first: '{{ paginateFirst|escapejs }}',
|
|
74
|
+
last: '{{ paginateLast|escapejs }}',
|
|
75
|
+
next: '{{ paginateNext|escapejs }}',
|
|
76
|
+
previous: '{{ paginatePrevious|escapejs }}'
|
|
77
|
+
},
|
|
78
|
+
aria: {
|
|
79
|
+
sortAscending: '{{ ariaSortAscending|escapejs }}',
|
|
80
|
+
sortDescending: '{{ ariaSortDescending|escapejs }}'
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
</script>
|
|
86
|
+
|
|
20
87
|
{% block aa_intel_tool_body %}{% endblock %}
|
|
21
88
|
</div>
|
|
22
89
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
{% load aa_intel_tool %}
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
{% if not common_already_loaded %}
|
|
4
|
+
{% include "aa_intel_tool/bundles/aa-intel-tool-scan-result-common-js.html" %}
|
|
5
|
+
{% include "aa_intel_tool/bundles/aa-intel-tool-chatscan-highlight-js.html" %}
|
|
6
|
+
{% endif %}
|
|
7
|
+
|
|
8
|
+
{% aa_intel_tool_static "javascript/aa-intel-tool-chatscan.min.js" %}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{% load aa_intel_tool %}
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
{% include "aa_intel_tool/bundles/aa-intel-tool-scan-result-common-js.html" %}
|
|
4
|
+
{% include "aa_intel_tool/bundles/aa-intel-tool-dscan-highlight-js.html" %}
|
|
5
|
+
|
|
6
|
+
{% aa_intel_tool_static "javascript/aa-intel-tool-dscan.min.js" %}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{% load aa_intel_tool %}
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
{% include "aa_intel_tool/bundles/aa-intel-tool-scan-result-common-js.html" %}
|
|
4
|
+
{% include "aa_intel_tool/bundles/aa-intel-tool-fleetcomposition-highlight-js.html" %}
|
|
5
|
+
|
|
6
|
+
{% aa_intel_tool_static "javascript/aa-intel-tool-fleetcomposition.min.js" %}
|
|
6
7
|
|
|
7
8
|
{% if app_settings.INTELTOOL_ENABLE_MODULE_CHATSCAN %}
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
{% include "aa_intel_tool/bundles/aa-intel-tool-chatscan-highlight-js.html" with common_already_loaded=True %}
|
|
10
|
+
{% include "aa_intel_tool/bundles/aa-intel-tool-chatscan-js.html" with common_already_loaded=True %}
|
|
10
11
|
{% endif %}
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
|
|
29
29
|
{% block extra_javascript %}
|
|
30
30
|
<script>
|
|
31
|
-
const
|
|
32
|
-
|
|
31
|
+
const aaIntelToolJsSettingsOverride = {
|
|
32
|
+
url: {
|
|
33
33
|
getPilotList: '{% url "aa_intel_tool:ajax_get_scan_data" scan_hash scan_data_section.PILOTLIST.value %}',
|
|
34
34
|
getCorporationList: '{% url "aa_intel_tool:ajax_get_scan_data" scan_hash scan_data_section.CORPORATIONLIST.value %}',
|
|
35
35
|
getAllianceList: '{% url "aa_intel_tool:ajax_get_scan_data" scan_hash scan_data_section.ALLIANCELIST.value %}'
|
|
@@ -39,6 +39,6 @@
|
|
|
39
39
|
|
|
40
40
|
{% include "bundles/datatables-js-bs5.html" %}
|
|
41
41
|
{% include "bundles/clipboard-js.html" %}
|
|
42
|
-
{% include "aa_intel_tool/bundles/aa-intel-tool-js
|
|
42
|
+
{% include "aa_intel_tool/bundles/aa-intel-tool-js.html" %}
|
|
43
43
|
{% include "aa_intel_tool/bundles/aa-intel-tool-chatscan-js.html" %}
|
|
44
44
|
{% endblock extra_javascript %}
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
|
|
27
27
|
{% block extra_javascript %}
|
|
28
28
|
<script>
|
|
29
|
-
const
|
|
30
|
-
|
|
29
|
+
const aaIntelToolJsSettingsOverride = {
|
|
30
|
+
url: {
|
|
31
31
|
getShipClassesAll: '{% url "aa_intel_tool:ajax_get_scan_data" scan_hash scan_data_section.SHIPLIST.value %}',
|
|
32
32
|
getShipClassesOngrid: '{% url "aa_intel_tool:ajax_get_scan_data" scan_hash scan_data_section.SHIPLIST_ON_GRID.value %}',
|
|
33
33
|
getShipClassesOffgrid: '{% url "aa_intel_tool:ajax_get_scan_data" scan_hash scan_data_section.SHIPLIST_OFF_GRID.value %}',
|
|
@@ -41,6 +41,6 @@
|
|
|
41
41
|
|
|
42
42
|
{% include "bundles/datatables-js-bs5.html" %}
|
|
43
43
|
{% include "bundles/clipboard-js.html" %}
|
|
44
|
-
{% include "aa_intel_tool/bundles/aa-intel-tool-js
|
|
44
|
+
{% include "aa_intel_tool/bundles/aa-intel-tool-js.html" %}
|
|
45
45
|
{% include "aa_intel_tool/bundles/aa-intel-tool-dscan-js.html" %}
|
|
46
46
|
{% endblock extra_javascript %}
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
|
|
29
29
|
{% block extra_javascript %}
|
|
30
30
|
<script>
|
|
31
|
-
const
|
|
32
|
-
|
|
31
|
+
const aaIntelToolJsSettingsOverride = {
|
|
32
|
+
url: {
|
|
33
33
|
getShipClasses: '{% url "aa_intel_tool:ajax_get_scan_data" scan_hash scan_data_section.SHIPLIST.value %}',
|
|
34
34
|
getShipTypes: '{% url "aa_intel_tool:ajax_get_scan_data" scan_hash scan_data_section.SHIPTYPES.value %}',
|
|
35
35
|
getFleetComposition: '{% url "aa_intel_tool:ajax_get_scan_data" scan_hash scan_data_section.FLEETCOMPOSITION.value %}',
|
|
@@ -42,6 +42,6 @@
|
|
|
42
42
|
|
|
43
43
|
{% include "bundles/datatables-js-bs5.html" %}
|
|
44
44
|
{% include "bundles/clipboard-js.html" %}
|
|
45
|
-
{% include "aa_intel_tool/bundles/aa-intel-tool-js
|
|
45
|
+
{% include "aa_intel_tool/bundles/aa-intel-tool-js.html" %}
|
|
46
46
|
{% include "aa_intel_tool/bundles/aa-intel-tool-fleetcomp-js.html" %}
|
|
47
47
|
{% endblock extra_javascript %}
|
|
@@ -2,25 +2,82 @@
|
|
|
2
2
|
Versioned static URLs to break browser caches when changing the app version
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
# Standard Library
|
|
6
|
+
import os
|
|
7
|
+
|
|
5
8
|
# Django
|
|
9
|
+
from django.conf import settings
|
|
6
10
|
from django.template.defaulttags import register
|
|
7
11
|
from django.templatetags.static import static
|
|
12
|
+
from django.utils.safestring import mark_safe
|
|
13
|
+
|
|
14
|
+
# Alliance Auth
|
|
15
|
+
from allianceauth.services.hooks import get_extension_logger
|
|
16
|
+
|
|
17
|
+
# Alliance Auth (External Libs)
|
|
18
|
+
from app_utils.logging import LoggerAddTag
|
|
8
19
|
|
|
9
20
|
# AA Intel Tool
|
|
10
|
-
from aa_intel_tool import __version__
|
|
21
|
+
from aa_intel_tool import __title__, __version__
|
|
22
|
+
from aa_intel_tool.helper.static_files import calculate_integrity_hash
|
|
23
|
+
|
|
24
|
+
logger = LoggerAddTag(my_logger=get_extension_logger(__name__), prefix=__title__)
|
|
11
25
|
|
|
12
26
|
|
|
13
27
|
@register.simple_tag
|
|
14
|
-
def aa_intel_tool_static(
|
|
28
|
+
def aa_intel_tool_static(
|
|
29
|
+
relative_file_path: str, script_type: str = None
|
|
30
|
+
) -> str | None:
|
|
15
31
|
"""
|
|
16
32
|
Versioned static URL
|
|
17
|
-
|
|
18
|
-
:
|
|
19
|
-
:
|
|
20
|
-
:
|
|
33
|
+
|
|
34
|
+
:param relative_file_path: The file path relative to the `aa-intel-tool/aa_intel_tool/static/aa_intel_tool folder
|
|
35
|
+
:type relative_file_path: str
|
|
36
|
+
:param script_type: The script type
|
|
37
|
+
:type script_type: str
|
|
38
|
+
:return: Versioned static URL
|
|
39
|
+
:rtype: str
|
|
21
40
|
"""
|
|
22
41
|
|
|
23
|
-
|
|
24
|
-
|
|
42
|
+
logger.debug(f"Getting versioned static URL for: {relative_file_path}")
|
|
43
|
+
|
|
44
|
+
file_type = os.path.splitext(relative_file_path)[1][1:]
|
|
45
|
+
|
|
46
|
+
logger.debug(f"File extension: {file_type}")
|
|
47
|
+
|
|
48
|
+
# Only support CSS and JS files
|
|
49
|
+
if file_type not in ["css", "js"]:
|
|
50
|
+
raise ValueError(f"Unsupported file type: {file_type}")
|
|
51
|
+
|
|
52
|
+
static_file_path = os.path.join("aa_intel_tool", relative_file_path)
|
|
53
|
+
static_url = static(static_file_path)
|
|
54
|
+
|
|
55
|
+
# Integrity hash calculation only for non-debug mode
|
|
56
|
+
sri_string = (
|
|
57
|
+
f' integrity="{calculate_integrity_hash(relative_file_path)}" crossorigin="anonymous"'
|
|
58
|
+
if not settings.DEBUG
|
|
59
|
+
else ""
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
# Versioned URL for CSS and JS files
|
|
63
|
+
# Add version query parameter to break browser caches when changing the app version
|
|
64
|
+
# Do not add version query parameter for libs as they are already versioned through their file path
|
|
65
|
+
versioned_url = (
|
|
66
|
+
static_url
|
|
67
|
+
if relative_file_path.startswith("libs/")
|
|
68
|
+
else static_url + "?v=" + __version__
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
# Return the versioned URL with integrity hash for CSS
|
|
72
|
+
if file_type == "css":
|
|
73
|
+
return mark_safe(f'<link rel="stylesheet" href="{versioned_url}"{sri_string}>')
|
|
74
|
+
|
|
75
|
+
# Return the versioned URL with integrity hash for JS files
|
|
76
|
+
if file_type == "js":
|
|
77
|
+
js_type = f' type="{script_type}"' if script_type else ""
|
|
78
|
+
|
|
79
|
+
return mark_safe(
|
|
80
|
+
f'<script{js_type} src="{versioned_url}"{sri_string}></script>'
|
|
81
|
+
)
|
|
25
82
|
|
|
26
|
-
return
|
|
83
|
+
return None
|
|
@@ -6,7 +6,8 @@ Test the app settings in local.py
|
|
|
6
6
|
from unittest import mock
|
|
7
7
|
|
|
8
8
|
# Django
|
|
9
|
-
from django.
|
|
9
|
+
from django.conf import settings
|
|
10
|
+
from django.test import TestCase, override_settings
|
|
10
11
|
|
|
11
12
|
# AA Intel Tool
|
|
12
13
|
from aa_intel_tool.app_settings import AppSettings
|
|
@@ -46,6 +47,7 @@ class TestAppSettings(TestCase):
|
|
|
46
47
|
|
|
47
48
|
self.assertEqual(first=retention_time, second=expected_retention_time)
|
|
48
49
|
|
|
50
|
+
@override_settings()
|
|
49
51
|
def test_chatscan_max_pilots_default(self):
|
|
50
52
|
"""
|
|
51
53
|
Test for the default INTELTOOL_CHATSCAN_MAX_PILOTS
|
|
@@ -54,9 +56,13 @@ class TestAppSettings(TestCase):
|
|
|
54
56
|
:rtype:
|
|
55
57
|
"""
|
|
56
58
|
|
|
59
|
+
del settings.INTELTOOL_CHATSCAN_MAX_PILOTS
|
|
60
|
+
|
|
57
61
|
max_pilots = AppSettings.INTELTOOL_CHATSCAN_MAX_PILOTS
|
|
58
62
|
expected_max_pilots = 500
|
|
59
63
|
|
|
64
|
+
print("max_pilots:", max_pilots)
|
|
65
|
+
|
|
60
66
|
self.assertEqual(first=max_pilots, second=expected_max_pilots)
|
|
61
67
|
|
|
62
68
|
@mock.patch(SETTINGS_PATH + ".AppSettings.INTELTOOL_CHATSCAN_MAX_PILOTS", 1000)
|