|
@@ -181,6 +189,10 @@
Sin datos. Haz clic en "Actualizar datos".
+
+
+
@@ -193,7 +205,7 @@
-
+
|
|
@@ -214,6 +226,10 @@
Sin datos. Haz clic en "Actualizar datos".
+
+
+
@@ -227,7 +243,7 @@
-
+
|
@@ -567,6 +583,10 @@ document.addEventListener('alpine:init', () => {
domains: [],
hosting: [],
orders: [],
+ vpsSearch: '',
+ domainsSearch: '',
+ hostingSearch: '',
+ ordersSearch: '',
dnsRecords: [],
dnsDomain: '',
dnsNameServers: null,
@@ -602,6 +622,44 @@ document.addEventListener('alpine:init', () => {
}
},
+ get filteredVPS() {
+ if (!this.vpsSearch) return this.vps;
+ const q = this.vpsSearch.toLowerCase();
+ return this.vps.filter(v =>
+ (v.hostname && v.hostname.toLowerCase().includes(q)) ||
+ (v.plan && v.plan.toLowerCase().includes(q)) ||
+ (v.data_center && v.data_center.toLowerCase().includes(q)) ||
+ (v.state && v.state.toLowerCase().includes(q)) ||
+ (v.ipv4 && v.ipv4.some(ip => ip.address && ip.address.includes(q)))
+ );
+ },
+ get filteredDomains() {
+ if (!this.domainsSearch) return this.domains;
+ const q = this.domainsSearch.toLowerCase();
+ return this.domains.filter(d =>
+ (d.domain && d.domain.toLowerCase().includes(q)) ||
+ (d.status && d.status.toLowerCase().includes(q))
+ );
+ },
+ get filteredHosting() {
+ if (!this.hostingSearch) return this.hosting;
+ const q = this.hostingSearch.toLowerCase();
+ return this.hosting.filter(h =>
+ (h.domain && h.domain.toLowerCase().includes(q)) ||
+ (h.vhost_type && h.vhost_type.toLowerCase().includes(q)) ||
+ (h.username && h.username.toLowerCase().includes(q))
+ );
+ },
+ get filteredOrders() {
+ if (!this.ordersSearch) return this.orders;
+ const q = this.ordersSearch.toLowerCase();
+ return this.orders.filter(o =>
+ (o.name && o.name.toLowerCase().includes(q)) ||
+ (o.status && o.status.toLowerCase().includes(q)) ||
+ (o.id && o.id.toLowerCase().includes(q))
+ );
+ },
+
async loadTab() {
this.loading = true;
try {
| |