web-mojo 2.1.867 → 2.1.936
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.
- package/dist/admin.cjs.js +1 -1
- package/dist/admin.cjs.js.map +1 -1
- package/dist/admin.es.js +355 -61
- package/dist/admin.es.js.map +1 -1
- package/dist/auth.cjs.js +1 -1
- package/dist/auth.cjs.js.map +1 -1
- package/dist/auth.es.js +3 -3
- package/dist/auth.es.js.map +1 -1
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.es.js +2 -2
- package/dist/chunks/{ChatView-8wuIN1zH.js → ChatView-DlSxjxah.js} +63 -6
- package/dist/chunks/ChatView-DlSxjxah.js.map +1 -0
- package/dist/chunks/ChatView-DnqrGXMC.js +2 -0
- package/dist/chunks/ChatView-DnqrGXMC.js.map +1 -0
- package/dist/chunks/{ContextMenu-DPxZgf69.js → ContextMenu-CE77rUmn.js} +2 -2
- package/dist/chunks/{ContextMenu-DPxZgf69.js.map → ContextMenu-CE77rUmn.js.map} +1 -1
- package/dist/chunks/{ContextMenu-Bem9gIL6.js → ContextMenu-KVxd0Kgd.js} +2 -2
- package/dist/chunks/{ContextMenu-Bem9gIL6.js.map → ContextMenu-KVxd0Kgd.js.map} +1 -1
- package/dist/chunks/{DataView-DhbOr4Wm.js → DataView-Vmjx4eCr.js} +11 -21
- package/dist/chunks/DataView-Vmjx4eCr.js.map +1 -0
- package/dist/chunks/DataView-XJbTQ5q0.js +2 -0
- package/dist/chunks/DataView-XJbTQ5q0.js.map +1 -0
- package/dist/chunks/{Dialog-gO9ln-ej.js → Dialog-BinTQTfO.js} +2 -2
- package/dist/chunks/{Dialog-gO9ln-ej.js.map → Dialog-BinTQTfO.js.map} +1 -1
- package/dist/chunks/{Dialog-CQA_WzmY.js → Dialog-D_rAf4gQ.js} +5 -5
- package/dist/chunks/{Dialog-CQA_WzmY.js.map → Dialog-D_rAf4gQ.js.map} +1 -1
- package/dist/chunks/{FormView-DbPm-jDU.js → FormView-CIriLDZY.js} +2 -2
- package/dist/chunks/{FormView-DbPm-jDU.js.map → FormView-CIriLDZY.js.map} +1 -1
- package/dist/chunks/{FormView-DkxYCmes.js → FormView-TPFsq8ZX.js} +2 -2
- package/dist/chunks/{FormView-DkxYCmes.js.map → FormView-TPFsq8ZX.js.map} +1 -1
- package/dist/chunks/{MetricsMiniChartWidget-Dz2d0GG2.js → MetricsMiniChartWidget-BolRZ-Ja.js} +3 -3
- package/dist/chunks/{MetricsMiniChartWidget-Dz2d0GG2.js.map → MetricsMiniChartWidget-BolRZ-Ja.js.map} +1 -1
- package/dist/chunks/{MetricsMiniChartWidget-C41dYV1K.js → MetricsMiniChartWidget-sONcM0pG.js} +2 -2
- package/dist/chunks/{MetricsMiniChartWidget-C41dYV1K.js.map → MetricsMiniChartWidget-sONcM0pG.js.map} +1 -1
- package/dist/chunks/{PDFViewer-BJT0-zQL.js → PDFViewer-D6SKOl85.js} +3 -3
- package/dist/chunks/{PDFViewer-BJT0-zQL.js.map → PDFViewer-D6SKOl85.js.map} +1 -1
- package/dist/chunks/{PDFViewer-DvTxpaXI.js → PDFViewer-UBhinN8A.js} +2 -2
- package/dist/chunks/{PDFViewer-DvTxpaXI.js.map → PDFViewer-UBhinN8A.js.map} +1 -1
- package/dist/chunks/{Page-CeYPFh_j.js → Page-B7L25Omb.js} +2 -2
- package/dist/chunks/{Page-CeYPFh_j.js.map → Page-B7L25Omb.js.map} +1 -1
- package/dist/chunks/{Page-xjtBxzqE.js → Page-CnvHhwLZ.js} +2 -2
- package/dist/chunks/{Page-xjtBxzqE.js.map → Page-CnvHhwLZ.js.map} +1 -1
- package/dist/chunks/{TopNav-baMWNGG2.js → TopNav-CPA884W7.js} +5 -5
- package/dist/chunks/{TopNav-baMWNGG2.js.map → TopNav-CPA884W7.js.map} +1 -1
- package/dist/chunks/{TopNav-CcS_qMvn.js → TopNav-Dcmcic-i.js} +2 -2
- package/dist/chunks/{TopNav-CcS_qMvn.js.map → TopNav-Dcmcic-i.js.map} +1 -1
- package/dist/chunks/{WebApp-DLAySO90.js → WebApp-El07OMHH.js} +13 -13
- package/dist/chunks/{WebApp-DLAySO90.js.map → WebApp-El07OMHH.js.map} +1 -1
- package/dist/chunks/{WebApp-DkJV3BmZ.js → WebApp-b9DQWz1d.js} +2 -2
- package/dist/chunks/{WebApp-DkJV3BmZ.js.map → WebApp-b9DQWz1d.js.map} +1 -1
- package/dist/docit.cjs.js +1 -1
- package/dist/docit.es.js +5 -5
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +11 -11
- package/dist/lightbox.cjs.js +1 -1
- package/dist/lightbox.es.js +4 -4
- package/package.json +1 -1
- package/dist/chunks/ChatView-8wuIN1zH.js.map +0 -1
- package/dist/chunks/ChatView-BtoAS3jU.js +0 -2
- package/dist/chunks/ChatView-BtoAS3jU.js.map +0 -1
- package/dist/chunks/DataView-C9O8uelM.js +0 -2
- package/dist/chunks/DataView-C9O8uelM.js.map +0 -1
- package/dist/chunks/DataView-DhbOr4Wm.js.map +0 -1
package/dist/admin.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { P as Page } from "./chunks/Page-
|
|
2
|
-
import { V as View, h as MOJOUtils } from "./chunks/WebApp-
|
|
3
|
-
import { B, b, a, c, e, f, W } from "./chunks/WebApp-
|
|
4
|
-
import Dialog$1 from "./chunks/Dialog-
|
|
5
|
-
import { M as MetricsChart, c as MetricsMiniChartWidget, P as PieChart } from "./chunks/MetricsMiniChartWidget-
|
|
6
|
-
import { b as TablePage, k as EmailDomainForms, j as EmailDomainList, E as EmailDomain, n as MailboxForms, m as MailboxList, l as Mailbox, r as EmailTemplate, d as TabView, t as EmailTemplateForms, s as EmailTemplateList, I as IncidentEvent, B as IncidentEventForms, A as IncidentEventList, w as FileManagerForms, v as FileManagerList, x as File, T as TableView, z as FileForms, y as FileList, av as GeoLocatedIP, aw as GeoLocatedIPList, ag as MemberList, af as LogList, ay as TicketList, G as IncidentList, _ as IncidentStats, R as IncidentHistoryList, Q as IncidentHistory, D as Incident, C as ChatView, H as IncidentForms, a3 as Job, a9 as JobEventList, a7 as JobLogList, a5 as JobForms, a4 as JobList, ac as JobRunnerList, aa as JobsEngineStats, ad as JobRunnerForms, ab as JobRunner, ae as Log, M as Member, ah as MemberForms, ai as MetricsPermission, ak as MetricsForms, aj as MetricsPermissionList, at as PushConfigForms, aq as PushConfigList, as as PushDeliveryList, am as PushDeviceList, au as PushTemplateForms, ao as PushTemplateList, U as RuleSet, a0 as MatchByOptions, $ as BundleByOptions, Y as RuleList, V as RuleSetList, i as S3BucketForms, h as S3BucketList, o as SentMessage, p as SentMessageList, aA as TicketNoteList, az as TicketNote, ax as Ticket, aB as TicketForms, aC as TicketCategories } from "./chunks/ChatView-
|
|
7
|
-
import DataView from "./chunks/DataView-
|
|
8
|
-
import { b as ContextMenu, C as Collection, a as Group, G as GroupList, c as GroupForms, g as UserDevice, j as UserDeviceLocationList, h as UserDeviceList, U as User, f as UserDataView, e as UserForms, d as UserList } from "./chunks/ContextMenu-
|
|
9
|
-
import { L as LightboxGallery, P as PDFViewer } from "./chunks/PDFViewer-
|
|
10
|
-
import { a as applyFileDropMixin, F as FormView } from "./chunks/FormView-
|
|
1
|
+
import { P as Page } from "./chunks/Page-B7L25Omb.js";
|
|
2
|
+
import { V as View, h as MOJOUtils } from "./chunks/WebApp-El07OMHH.js";
|
|
3
|
+
import { B, b, a, c, e, f, W } from "./chunks/WebApp-El07OMHH.js";
|
|
4
|
+
import Dialog$1 from "./chunks/Dialog-D_rAf4gQ.js";
|
|
5
|
+
import { M as MetricsChart, c as MetricsMiniChartWidget, P as PieChart } from "./chunks/MetricsMiniChartWidget-BolRZ-Ja.js";
|
|
6
|
+
import { b as TablePage, k as EmailDomainForms, j as EmailDomainList, E as EmailDomain, n as MailboxForms, m as MailboxList, l as Mailbox, r as EmailTemplate, d as TabView, t as EmailTemplateForms, s as EmailTemplateList, I as IncidentEvent, B as IncidentEventForms, A as IncidentEventList, w as FileManagerForms, v as FileManagerList, x as File, T as TableView, z as FileForms, y as FileList, av as GeoLocatedIP, aw as GeoLocatedIPList, ag as MemberList, af as LogList, ay as TicketList, G as IncidentList, _ as IncidentStats, R as IncidentHistoryList, Q as IncidentHistory, D as Incident, C as ChatView, H as IncidentForms, a3 as Job, a9 as JobEventList, a7 as JobLogList, a5 as JobForms, a4 as JobList, ac as JobRunnerList, aa as JobsEngineStats, ad as JobRunnerForms, ab as JobRunner, ae as Log, M as Member, ah as MemberForms, ai as MetricsPermission, ak as MetricsForms, aj as MetricsPermissionList, at as PushConfigForms, aq as PushConfigList, as as PushDeliveryList, am as PushDeviceList, au as PushTemplateForms, ao as PushTemplateList, U as RuleSet, a0 as MatchByOptions, $ as BundleByOptions, Y as RuleList, V as RuleSetList, i as S3BucketForms, h as S3BucketList, o as SentMessage, p as SentMessageList, aA as TicketNoteList, az as TicketNote, ax as Ticket, aB as TicketForms, aC as TicketCategories } from "./chunks/ChatView-DlSxjxah.js";
|
|
7
|
+
import DataView from "./chunks/DataView-Vmjx4eCr.js";
|
|
8
|
+
import { b as ContextMenu, C as Collection, a as Group, G as GroupList, c as GroupForms, g as UserDevice, j as UserDeviceLocationList, h as UserDeviceList, U as User, f as UserDataView, e as UserForms, d as UserList } from "./chunks/ContextMenu-CE77rUmn.js";
|
|
9
|
+
import { L as LightboxGallery, P as PDFViewer } from "./chunks/PDFViewer-D6SKOl85.js";
|
|
10
|
+
import { a as applyFileDropMixin, F as FormView } from "./chunks/FormView-CIriLDZY.js";
|
|
11
11
|
class AdminHeaderView extends View {
|
|
12
12
|
constructor(options = {}) {
|
|
13
13
|
super({
|
|
@@ -1590,7 +1590,7 @@ class FileTablePage extends TablePage {
|
|
|
1590
1590
|
*/
|
|
1591
1591
|
async onActionAdd(event, element) {
|
|
1592
1592
|
event.preventDefault();
|
|
1593
|
-
const Dialog2 = (await import("./chunks/Dialog-
|
|
1593
|
+
const Dialog2 = (await import("./chunks/Dialog-D_rAf4gQ.js")).default;
|
|
1594
1594
|
const formData = await Dialog2.showForm({
|
|
1595
1595
|
title: "Upload File",
|
|
1596
1596
|
size: "md",
|
|
@@ -1686,6 +1686,185 @@ class FileTablePage extends TablePage {
|
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
1688
|
applyFileDropMixin(FileTablePage);
|
|
1689
|
+
class MapView extends View {
|
|
1690
|
+
constructor(options = {}) {
|
|
1691
|
+
super({
|
|
1692
|
+
className: "map-view",
|
|
1693
|
+
...options
|
|
1694
|
+
});
|
|
1695
|
+
this.markers = options.markers || [];
|
|
1696
|
+
this.center = options.center || null;
|
|
1697
|
+
this.zoom = options.zoom || 13;
|
|
1698
|
+
this.height = options.height || 400;
|
|
1699
|
+
this.showZoomControl = options.showZoomControl !== false;
|
|
1700
|
+
this.tileLayer = options.tileLayer || "osm";
|
|
1701
|
+
this.map = null;
|
|
1702
|
+
this.leafletMarkers = [];
|
|
1703
|
+
this.template = `
|
|
1704
|
+
<div class="map-container">
|
|
1705
|
+
<div id="map-{{id}}" style="height: {{height}}px; width: 100%; border-radius: 0.375rem; border: 1px solid #dee2e6;"></div>
|
|
1706
|
+
</div>
|
|
1707
|
+
`;
|
|
1708
|
+
}
|
|
1709
|
+
async onAfterRender() {
|
|
1710
|
+
await this.loadLeaflet();
|
|
1711
|
+
await this.initializeMap();
|
|
1712
|
+
}
|
|
1713
|
+
async loadLeaflet() {
|
|
1714
|
+
if (window.L) return;
|
|
1715
|
+
const cssLoaded = new Promise((resolve) => {
|
|
1716
|
+
const link = document.createElement("link");
|
|
1717
|
+
link.rel = "stylesheet";
|
|
1718
|
+
link.href = "https://unpkg.com/leaflet@1.9.4/dist/leaflet.css";
|
|
1719
|
+
link.onload = resolve;
|
|
1720
|
+
link.onerror = resolve;
|
|
1721
|
+
document.head.appendChild(link);
|
|
1722
|
+
});
|
|
1723
|
+
const jsLoaded = new Promise((resolve, reject) => {
|
|
1724
|
+
const script = document.createElement("script");
|
|
1725
|
+
script.src = "https://unpkg.com/leaflet@1.9.4/dist/leaflet.js";
|
|
1726
|
+
script.onload = resolve;
|
|
1727
|
+
script.onerror = reject;
|
|
1728
|
+
document.head.appendChild(script);
|
|
1729
|
+
});
|
|
1730
|
+
await Promise.all([cssLoaded, jsLoaded]);
|
|
1731
|
+
}
|
|
1732
|
+
getTileLayerUrl() {
|
|
1733
|
+
const tileLayers = {
|
|
1734
|
+
// Standard street maps
|
|
1735
|
+
osm: {
|
|
1736
|
+
url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
|
|
1737
|
+
attribution: "© OpenStreetMap contributors",
|
|
1738
|
+
maxZoom: 19
|
|
1739
|
+
},
|
|
1740
|
+
// Satellite imagery
|
|
1741
|
+
satellite: {
|
|
1742
|
+
url: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
|
|
1743
|
+
attribution: "© Esri",
|
|
1744
|
+
maxZoom: 19
|
|
1745
|
+
},
|
|
1746
|
+
// Terrain and topographic
|
|
1747
|
+
terrain: {
|
|
1748
|
+
url: "https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",
|
|
1749
|
+
attribution: "© OpenTopoMap contributors",
|
|
1750
|
+
maxZoom: 17
|
|
1751
|
+
},
|
|
1752
|
+
// Dark mode styles
|
|
1753
|
+
dark: {
|
|
1754
|
+
url: "https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",
|
|
1755
|
+
attribution: "© OpenStreetMap contributors © CARTO",
|
|
1756
|
+
maxZoom: 20
|
|
1757
|
+
},
|
|
1758
|
+
// Light/minimal styles
|
|
1759
|
+
light: {
|
|
1760
|
+
url: "https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",
|
|
1761
|
+
attribution: "© OpenStreetMap contributors © CARTO",
|
|
1762
|
+
maxZoom: 20
|
|
1763
|
+
},
|
|
1764
|
+
// Watercolor artistic style
|
|
1765
|
+
watercolor: {
|
|
1766
|
+
url: "https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg",
|
|
1767
|
+
attribution: "© Stadia Maps © Stamen Design © OpenStreetMap contributors",
|
|
1768
|
+
maxZoom: 16
|
|
1769
|
+
},
|
|
1770
|
+
// Black and white
|
|
1771
|
+
bw: {
|
|
1772
|
+
url: "https://{s}.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}{r}.png",
|
|
1773
|
+
attribution: "© OpenStreetMap contributors © CARTO",
|
|
1774
|
+
maxZoom: 20
|
|
1775
|
+
},
|
|
1776
|
+
// Streets with labels
|
|
1777
|
+
streets: {
|
|
1778
|
+
url: "https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png",
|
|
1779
|
+
attribution: "© OpenStreetMap contributors © CARTO",
|
|
1780
|
+
maxZoom: 20
|
|
1781
|
+
}
|
|
1782
|
+
};
|
|
1783
|
+
return tileLayers[this.tileLayer] || tileLayers.osm;
|
|
1784
|
+
}
|
|
1785
|
+
async initializeMap() {
|
|
1786
|
+
const mapElement = this.element.querySelector(`#map-${this.id}`);
|
|
1787
|
+
if (!mapElement || !window.L) return;
|
|
1788
|
+
let mapCenter = this.center;
|
|
1789
|
+
if (!mapCenter && this.markers.length > 0) {
|
|
1790
|
+
mapCenter = [this.markers[0].lat, this.markers[0].lng];
|
|
1791
|
+
}
|
|
1792
|
+
if (!mapCenter) {
|
|
1793
|
+
mapCenter = [0, 0];
|
|
1794
|
+
}
|
|
1795
|
+
this.map = window.L.map(mapElement, {
|
|
1796
|
+
center: mapCenter,
|
|
1797
|
+
zoom: this.zoom,
|
|
1798
|
+
zoomControl: this.showZoomControl
|
|
1799
|
+
});
|
|
1800
|
+
const tileConfig = this.getTileLayerUrl();
|
|
1801
|
+
window.L.tileLayer(tileConfig.url, {
|
|
1802
|
+
attribution: tileConfig.attribution,
|
|
1803
|
+
maxZoom: tileConfig.maxZoom
|
|
1804
|
+
}).addTo(this.map);
|
|
1805
|
+
this.addMarkers(this.markers);
|
|
1806
|
+
if (this.markers.length > 1) {
|
|
1807
|
+
this.fitBounds();
|
|
1808
|
+
}
|
|
1809
|
+
setTimeout(() => {
|
|
1810
|
+
if (this.map) {
|
|
1811
|
+
this.map.invalidateSize();
|
|
1812
|
+
}
|
|
1813
|
+
}, 300);
|
|
1814
|
+
}
|
|
1815
|
+
addMarkers(markers) {
|
|
1816
|
+
if (!this.map || !Array.isArray(markers)) return;
|
|
1817
|
+
markers.forEach((markerData) => {
|
|
1818
|
+
const { lat, lng, popup, icon } = markerData;
|
|
1819
|
+
if (!lat || !lng) return;
|
|
1820
|
+
const markerOptions = {};
|
|
1821
|
+
if (icon) {
|
|
1822
|
+
markerOptions.icon = window.L.icon(icon);
|
|
1823
|
+
}
|
|
1824
|
+
const marker = window.L.marker([lat, lng], markerOptions).addTo(this.map);
|
|
1825
|
+
if (popup) {
|
|
1826
|
+
marker.bindPopup(popup);
|
|
1827
|
+
}
|
|
1828
|
+
this.leafletMarkers.push(marker);
|
|
1829
|
+
});
|
|
1830
|
+
}
|
|
1831
|
+
fitBounds() {
|
|
1832
|
+
if (!this.map || this.leafletMarkers.length === 0) return;
|
|
1833
|
+
const group = new window.L.featureGroup(this.leafletMarkers);
|
|
1834
|
+
this.map.fitBounds(group.getBounds().pad(0.1));
|
|
1835
|
+
}
|
|
1836
|
+
updateMarkers(newMarkers) {
|
|
1837
|
+
this.clearMarkers();
|
|
1838
|
+
this.markers = newMarkers;
|
|
1839
|
+
this.addMarkers(newMarkers);
|
|
1840
|
+
if (newMarkers.length > 1) {
|
|
1841
|
+
this.fitBounds();
|
|
1842
|
+
} else if (newMarkers.length === 1) {
|
|
1843
|
+
this.map.setView([newMarkers[0].lat, newMarkers[0].lng], this.zoom);
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
clearMarkers() {
|
|
1847
|
+
this.leafletMarkers.forEach((marker) => {
|
|
1848
|
+
this.map.removeLayer(marker);
|
|
1849
|
+
});
|
|
1850
|
+
this.leafletMarkers = [];
|
|
1851
|
+
}
|
|
1852
|
+
setView(lat, lng, zoom = null) {
|
|
1853
|
+
if (!this.map) return;
|
|
1854
|
+
this.map.setView([lat, lng], zoom || this.zoom);
|
|
1855
|
+
}
|
|
1856
|
+
setZoom(zoom) {
|
|
1857
|
+
if (!this.map) return;
|
|
1858
|
+
this.map.setZoom(zoom);
|
|
1859
|
+
}
|
|
1860
|
+
async onBeforeDestroy() {
|
|
1861
|
+
if (this.map) {
|
|
1862
|
+
this.map.remove();
|
|
1863
|
+
this.map = null;
|
|
1864
|
+
}
|
|
1865
|
+
await super.onBeforeDestroy();
|
|
1866
|
+
}
|
|
1867
|
+
}
|
|
1689
1868
|
class GeoIPView extends View {
|
|
1690
1869
|
constructor(options = {}) {
|
|
1691
1870
|
super({
|
|
@@ -1720,36 +1899,99 @@ class GeoIPView extends View {
|
|
|
1720
1899
|
</div>
|
|
1721
1900
|
</div>
|
|
1722
1901
|
|
|
1723
|
-
<!--
|
|
1724
|
-
<div data-container="geoip-
|
|
1902
|
+
<!-- Tabs -->
|
|
1903
|
+
<div data-container="geoip-tabs"></div>
|
|
1725
1904
|
</div>
|
|
1726
1905
|
`;
|
|
1727
1906
|
}
|
|
1728
1907
|
async onInit() {
|
|
1729
|
-
this.
|
|
1730
|
-
containerId: "geoip-data-view",
|
|
1908
|
+
this.detailsView = new DataView({
|
|
1731
1909
|
model: this.model,
|
|
1732
|
-
className: "p-3
|
|
1910
|
+
className: "p-3",
|
|
1733
1911
|
showEmptyValues: true,
|
|
1734
1912
|
emptyValueText: "—",
|
|
1735
1913
|
columns: 2,
|
|
1736
1914
|
fields: [
|
|
1737
|
-
{ name: "
|
|
1738
|
-
{ name: "subnet", label: "Subnet" },
|
|
1739
|
-
{ name: "
|
|
1740
|
-
{ name: "
|
|
1741
|
-
{ name: "
|
|
1742
|
-
{ name: "
|
|
1743
|
-
{ name: "
|
|
1744
|
-
{ name: "
|
|
1745
|
-
{ name: "
|
|
1746
|
-
{ name: "
|
|
1747
|
-
{ name: "modified", label: "Last Modified", format: "datetime" },
|
|
1748
|
-
{ name: "expires_at", label: "Expires", format: "datetime" }
|
|
1915
|
+
{ name: "ip_address", label: "IP Address", cols: 4 },
|
|
1916
|
+
{ name: "subnet", label: "Subnet", cols: 4 },
|
|
1917
|
+
{ name: "country_name", label: "Country", cols: 4 },
|
|
1918
|
+
{ name: "country_code", label: "Country Code", cols: 4 },
|
|
1919
|
+
{ name: "region", label: "Region", cols: 4 },
|
|
1920
|
+
{ name: "city", label: "City", cols: 4 },
|
|
1921
|
+
{ name: "postal_code", label: "Postal Code", cols: 4 },
|
|
1922
|
+
{ name: "timezone", label: "Timezone", cols: 4 },
|
|
1923
|
+
{ name: "latitude", label: "Latitude", cols: 4 },
|
|
1924
|
+
{ name: "longitude", label: "Longitude", cols: 4 }
|
|
1749
1925
|
]
|
|
1750
1926
|
});
|
|
1751
|
-
this.
|
|
1927
|
+
this.securityView = new DataView({
|
|
1928
|
+
model: this.model,
|
|
1929
|
+
className: "p-3",
|
|
1930
|
+
showEmptyValues: true,
|
|
1931
|
+
emptyValueText: "—",
|
|
1932
|
+
columns: 2,
|
|
1933
|
+
fields: [
|
|
1934
|
+
{ name: "threat_level", label: "Threat Level", cols: 4 },
|
|
1935
|
+
{ name: "is_tor", label: "TOR Exit Node", cols: 4 },
|
|
1936
|
+
{ name: "is_vpn", label: "VPN", formatter: "yesnoicon", cols: 4 },
|
|
1937
|
+
{ name: "is_proxy", label: "Proxy", formatter: "yesnoicon", cols: 4 },
|
|
1938
|
+
{ name: "is_cloud", label: "Cloud Provider", formatter: "yesnoicon", cols: 4 },
|
|
1939
|
+
{ name: "is_datacenter", label: "Datacenter", formatter: "yesnoicon", cols: 4 },
|
|
1940
|
+
{ name: "asn", label: "ASN", cols: 4 },
|
|
1941
|
+
{ name: "asn_org", label: "ASN Organization", cols: 4 },
|
|
1942
|
+
{ name: "isp", label: "ISP", cols: 4 },
|
|
1943
|
+
{ name: "connection_type", label: "Connection Type", cols: 6 }
|
|
1944
|
+
]
|
|
1945
|
+
});
|
|
1946
|
+
this.metadataView = new DataView({
|
|
1947
|
+
model: this.model,
|
|
1948
|
+
className: "p-3",
|
|
1949
|
+
showEmptyValues: true,
|
|
1950
|
+
emptyValueText: "—",
|
|
1951
|
+
columns: 2,
|
|
1952
|
+
fields: [
|
|
1953
|
+
{ name: "id", label: "Record ID", cols: 6 },
|
|
1954
|
+
{ name: "provider", label: "Data Provider", formatter: "capitalize", cols: 6 },
|
|
1955
|
+
{ name: "created", label: "Created", formatter: "datetime", cols: 6 },
|
|
1956
|
+
{ name: "modified", label: "Last Modified", formatter: "datetime", cols: 6 },
|
|
1957
|
+
{ name: "expires_at", label: "Expires", formatter: "datetime", cols: 12 }
|
|
1958
|
+
]
|
|
1959
|
+
});
|
|
1960
|
+
const tabs = {
|
|
1961
|
+
"Location": this.detailsView,
|
|
1962
|
+
"Security": this.securityView,
|
|
1963
|
+
"Metadata": this.metadataView
|
|
1964
|
+
};
|
|
1965
|
+
if (this.hasCoordinates) {
|
|
1966
|
+
const lat = this.model.get("latitude");
|
|
1967
|
+
const lng = this.model.get("longitude");
|
|
1968
|
+
const city = this.model.get("city") || "Unknown";
|
|
1969
|
+
const region = this.model.get("region") || "";
|
|
1970
|
+
const country = this.model.get("country_name") || "";
|
|
1971
|
+
const locationStr = [city, region, country].filter(Boolean).join(", ");
|
|
1972
|
+
this.mapView = new MapView({
|
|
1973
|
+
markers: [{
|
|
1974
|
+
lat,
|
|
1975
|
+
lng,
|
|
1976
|
+
popup: `<strong>${this.model.get("ip_address")}</strong><br>${locationStr}`
|
|
1977
|
+
}],
|
|
1978
|
+
tileLayer: "light",
|
|
1979
|
+
zoom: 4,
|
|
1980
|
+
height: 450
|
|
1981
|
+
});
|
|
1982
|
+
tabs["Map"] = this.mapView;
|
|
1983
|
+
}
|
|
1984
|
+
this.tabView = new TabView({
|
|
1985
|
+
containerId: "geoip-tabs",
|
|
1986
|
+
tabs,
|
|
1987
|
+
activeTab: this.hasCoordinates ? "Map" : "Location"
|
|
1988
|
+
});
|
|
1989
|
+
this.addChild(this.tabView);
|
|
1752
1990
|
const menuItems = [
|
|
1991
|
+
{ label: "Edit Location", action: "edit-location", icon: "bi-geo-alt" },
|
|
1992
|
+
{ label: "Edit Security", action: "edit-security", icon: "bi-shield-lock" },
|
|
1993
|
+
{ label: "Edit Network", action: "edit-network", icon: "bi-diagram-3" },
|
|
1994
|
+
{ type: "divider" },
|
|
1753
1995
|
{ label: "Refresh Geolocation", action: "refresh-geoip", icon: "bi-arrow-clockwise" }
|
|
1754
1996
|
];
|
|
1755
1997
|
if (this.hasCoordinates) {
|
|
@@ -1774,8 +2016,41 @@ class GeoIPView extends View {
|
|
|
1774
2016
|
});
|
|
1775
2017
|
this.addChild(geoIPMenu);
|
|
1776
2018
|
}
|
|
2019
|
+
async onActionEditLocation() {
|
|
2020
|
+
const resp = await Dialog$1.showModelForm({
|
|
2021
|
+
title: `Edit Location - ${this.model.get("ip_address")}`,
|
|
2022
|
+
model: this.model,
|
|
2023
|
+
formConfig: GeoLocatedIP.EDIT_LOCATION_FORM
|
|
2024
|
+
});
|
|
2025
|
+
if (resp) {
|
|
2026
|
+
await this.render();
|
|
2027
|
+
this.getApp()?.toast?.success("Location updated successfully");
|
|
2028
|
+
}
|
|
2029
|
+
}
|
|
2030
|
+
async onActionEditSecurity() {
|
|
2031
|
+
const resp = await Dialog$1.showModelForm({
|
|
2032
|
+
title: `Edit Security - ${this.model.get("ip_address")}`,
|
|
2033
|
+
model: this.model,
|
|
2034
|
+
formConfig: GeoLocatedIP.EDIT_SECURITY_FORM
|
|
2035
|
+
});
|
|
2036
|
+
if (resp) {
|
|
2037
|
+
await this.render();
|
|
2038
|
+
this.getApp()?.toast?.success("Security settings updated successfully");
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
async onActionEditNetwork() {
|
|
2042
|
+
const resp = await Dialog$1.showModelForm({
|
|
2043
|
+
title: `Edit Network - ${this.model.get("ip_address")}`,
|
|
2044
|
+
model: this.model,
|
|
2045
|
+
formConfig: GeoLocatedIP.EDIT_NETWORK_FORM
|
|
2046
|
+
});
|
|
2047
|
+
if (resp) {
|
|
2048
|
+
await this.render();
|
|
2049
|
+
this.getApp()?.toast?.success("Network information updated successfully");
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
1777
2052
|
async onActionRefreshGeoip() {
|
|
1778
|
-
|
|
2053
|
+
await this.model.save({ refresh: true });
|
|
1779
2054
|
this.getApp()?.toast?.info("Refresh request sent for " + this.model.get("ip_address"));
|
|
1780
2055
|
}
|
|
1781
2056
|
async onActionViewOnMap() {
|
|
@@ -1826,20 +2101,19 @@ class GeoLocatedIPTablePage extends TablePage {
|
|
|
1826
2101
|
pageName: "GeoIP Cache",
|
|
1827
2102
|
router: "admin/system/geoip",
|
|
1828
2103
|
Collection: GeoLocatedIPList,
|
|
1829
|
-
|
|
2104
|
+
itemView: GeoIPView,
|
|
1830
2105
|
viewDialogOptions: {
|
|
1831
2106
|
header: false,
|
|
1832
|
-
size: "
|
|
2107
|
+
size: "xl"
|
|
1833
2108
|
},
|
|
1834
2109
|
// Column definitions
|
|
1835
2110
|
columns: [
|
|
1836
|
-
{ key: "id", label: "ID", width: "70px", sortable: true, class: "text-muted" },
|
|
1837
2111
|
{ key: "ip_address", label: "IP Address", sortable: true },
|
|
1838
2112
|
{ key: "city", label: "City", sortable: true, formatter: "default('—')" },
|
|
1839
2113
|
{ key: "region", label: "Region", sortable: true, formatter: "default('—')" },
|
|
1840
2114
|
{ key: "country_name", label: "Country", sortable: true, formatter: "default('—')" },
|
|
1841
|
-
{ key: "
|
|
1842
|
-
{ key: "
|
|
2115
|
+
{ key: "isp", label: "ISP", sortable: true, formatter: "default('—')" },
|
|
2116
|
+
{ key: "threat_level", label: "Threat", formatter: "default('—')" }
|
|
1843
2117
|
],
|
|
1844
2118
|
// Table features
|
|
1845
2119
|
selectable: true,
|
|
@@ -1847,6 +2121,9 @@ class GeoLocatedIPTablePage extends TablePage {
|
|
|
1847
2121
|
sortable: true,
|
|
1848
2122
|
filterable: true,
|
|
1849
2123
|
paginated: true,
|
|
2124
|
+
// Actions
|
|
2125
|
+
// actions: ['view', 'edit', 'delete'],
|
|
2126
|
+
clickAction: "view",
|
|
1850
2127
|
// Toolbar
|
|
1851
2128
|
showRefresh: true,
|
|
1852
2129
|
showAdd: false,
|
|
@@ -2052,23 +2329,15 @@ class GroupTablePage extends TablePage {
|
|
|
2052
2329
|
{
|
|
2053
2330
|
key: "id",
|
|
2054
2331
|
label: "ID",
|
|
2055
|
-
width: "60px",
|
|
2056
2332
|
sortable: true,
|
|
2057
2333
|
class: "text-muted"
|
|
2058
2334
|
},
|
|
2059
2335
|
{
|
|
2060
|
-
key: "
|
|
2061
|
-
label: "
|
|
2062
|
-
visibility: "lg"
|
|
2063
|
-
},
|
|
2064
|
-
{
|
|
2065
|
-
label: "Avatar",
|
|
2066
|
-
key: 'avatar|avatar("sm", "rounded")',
|
|
2067
|
-
sortable: false,
|
|
2068
|
-
visibility: "lg"
|
|
2336
|
+
key: "name",
|
|
2337
|
+
label: "Display Name"
|
|
2069
2338
|
},
|
|
2070
2339
|
{
|
|
2071
|
-
key: "kind",
|
|
2340
|
+
key: "kind|badge",
|
|
2072
2341
|
label: "Kind",
|
|
2073
2342
|
filter: {
|
|
2074
2343
|
type: "select",
|
|
@@ -2076,14 +2345,16 @@ class GroupTablePage extends TablePage {
|
|
|
2076
2345
|
}
|
|
2077
2346
|
},
|
|
2078
2347
|
{
|
|
2079
|
-
key: "
|
|
2080
|
-
label: "
|
|
2348
|
+
key: "is_active|yesnoicon",
|
|
2349
|
+
label: "Enabled",
|
|
2350
|
+
visibility: "lg"
|
|
2081
2351
|
},
|
|
2082
2352
|
{
|
|
2083
2353
|
key: "parent.name",
|
|
2084
2354
|
label: "Parent",
|
|
2085
|
-
formatter: "default('
|
|
2086
|
-
visibility: "md"
|
|
2355
|
+
formatter: "default('-')",
|
|
2356
|
+
visibility: "md",
|
|
2357
|
+
class: "text-muted fs-8"
|
|
2087
2358
|
},
|
|
2088
2359
|
{
|
|
2089
2360
|
key: "created",
|
|
@@ -2091,6 +2362,13 @@ class GroupTablePage extends TablePage {
|
|
|
2091
2362
|
className: "text-muted fs-8",
|
|
2092
2363
|
formatter: "epoch|datetime",
|
|
2093
2364
|
visibility: "lg"
|
|
2365
|
+
},
|
|
2366
|
+
{
|
|
2367
|
+
key: "last_activity",
|
|
2368
|
+
label: "Activity",
|
|
2369
|
+
className: "text-muted fs-8",
|
|
2370
|
+
formatter: "relative",
|
|
2371
|
+
visibility: "lg"
|
|
2094
2372
|
}
|
|
2095
2373
|
],
|
|
2096
2374
|
filters: [
|
|
@@ -8051,31 +8329,47 @@ class UserTablePage extends TablePage {
|
|
|
8051
8329
|
{
|
|
8052
8330
|
key: "id",
|
|
8053
8331
|
label: "ID",
|
|
8054
|
-
width: "60px",
|
|
8055
8332
|
sortable: true,
|
|
8056
8333
|
class: "text-muted"
|
|
8057
8334
|
},
|
|
8058
8335
|
{
|
|
8059
|
-
label: "
|
|
8060
|
-
key:
|
|
8336
|
+
label: "Info",
|
|
8337
|
+
key: "permissions.manage_users",
|
|
8338
|
+
template: `
|
|
8339
|
+
{{#model.permissions.manage_users}}{{{model.permissions.manage_users|yesnoicon('bi bi-person-gear text-danger')|tooltip('Manage Users')}}} {{/model.permissions.manage_users}}
|
|
8340
|
+
{{#model.permissions.manage_groups}}{{{model.permissions.manage_groups|yesnoicon('bi bi-building-gear text-primary')|tooltip('Manage Groups')}}} {{/model.permissions.manage_groups}}
|
|
8341
|
+
{{#model.permissions.view_global}}{{{model.permissions.view_global|yesnoicon('bi bi-globe text-secondary')|tooltip('View Global Menu')}}} {{/model.permissions.view_global}}
|
|
8342
|
+
{{#model.permissions.view_admin}}{{{model.permissions.view_admin|yesnoicon('bi bi-wrench text-secondary')|tooltip('View Admin Menu')}}} {{/model.permissions.view_admin}}
|
|
8343
|
+
`,
|
|
8061
8344
|
sortable: false
|
|
8062
8345
|
},
|
|
8063
|
-
{
|
|
8064
|
-
|
|
8346
|
+
// {
|
|
8347
|
+
// label: 'Avatar',
|
|
8348
|
+
// key: 'avatar|avatar("sm")',
|
|
8349
|
+
// sortable: false,
|
|
8350
|
+
// visibility: 'md'
|
|
8351
|
+
// },
|
|
8352
|
+
{
|
|
8353
|
+
key: "display_name|tooltip:model.username",
|
|
8065
8354
|
label: "Display Name"
|
|
8066
8355
|
},
|
|
8067
|
-
{
|
|
8068
|
-
key: "username",
|
|
8069
|
-
label: "Username"
|
|
8070
|
-
},
|
|
8071
8356
|
{
|
|
8072
8357
|
key: "email",
|
|
8073
|
-
label: "Email"
|
|
8358
|
+
label: "Email",
|
|
8359
|
+
visibility: "xl",
|
|
8360
|
+
className: "text-muted fs-8"
|
|
8074
8361
|
},
|
|
8362
|
+
// {
|
|
8363
|
+
// key: 'username',
|
|
8364
|
+
// label: 'Username',
|
|
8365
|
+
// visibility: 'xl',
|
|
8366
|
+
// className: 'text-muted fs-8',
|
|
8367
|
+
// },
|
|
8075
8368
|
{
|
|
8076
8369
|
key: "last_activity",
|
|
8077
8370
|
label: "Last Activity",
|
|
8078
|
-
formatter: "
|
|
8371
|
+
formatter: "relative",
|
|
8372
|
+
className: "text-muted fs-8"
|
|
8079
8373
|
}
|
|
8080
8374
|
],
|
|
8081
8375
|
// Table features
|