update webapp
This commit is contained in:
@@ -1734,7 +1734,7 @@ if (function_exists('requireAuth')) {
|
||||
</svg>
|
||||
Save Settings
|
||||
</button>
|
||||
<button class="btn btn-secondary" onclick="enrichAllIps()">
|
||||
<button class="btn btn-secondary" onclick="enrichAllIps(this)">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<circle cx="12" cy="12" r="10"/>
|
||||
<line x1="2" y1="12" x2="22" y2="12"/>
|
||||
@@ -3042,7 +3042,7 @@ if (function_exists('requireAuth')) {
|
||||
// Enrich single IP
|
||||
async function enrichIp(id) {
|
||||
try {
|
||||
const result = await api('enrich_ip', { id });
|
||||
const result = await api('enrich_ip', {}, 'POST', { id });
|
||||
if (result.success) {
|
||||
showToast('IP enriched successfully', 'success');
|
||||
loadEntries(currentPage);
|
||||
@@ -3055,13 +3055,12 @@ if (function_exists('requireAuth')) {
|
||||
}
|
||||
|
||||
// Enrich all un-enriched IPs
|
||||
async function enrichAllIps() {
|
||||
const btn = event.target;
|
||||
async function enrichAllIps(btn) {
|
||||
btn.disabled = true;
|
||||
btn.innerHTML = '<span class="spinner" style="display:inline-block"></span> Enriching...';
|
||||
|
||||
try {
|
||||
const result = await api('enrich_all', {});
|
||||
const result = await api('enrich_all', {}, 'POST', {});
|
||||
if (result.success) {
|
||||
showToast(`Enriched ${result.enriched} IPs. ${result.pending_enrichment || 0} remaining.`, 'success');
|
||||
loadEntries(currentPage);
|
||||
|
||||
Reference in New Issue
Block a user