forked from snxraven/p2ns
reorg
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// Interfaces UI functions
|
||||
function cleanupInterfaces() {
|
||||
if (window.showConfirm) {
|
||||
window.showConfirm('Cleanup interfaces?', async () => {
|
||||
try {
|
||||
const response = await fetch('/api/cleanup-interfaces', { method: 'POST' });
|
||||
if (!response.ok) {
|
||||
throw new Error(await response.text());
|
||||
}
|
||||
if (window.showNotification) window.showNotification('Interfaces cleaned up successfully');
|
||||
if (window.genericFetch) window.genericFetch('interfaces', true);
|
||||
} catch (err) {
|
||||
console.error('Failed to cleanup interfaces:', err);
|
||||
if (window.showNotification) window.showNotification('Failed to cleanup interfaces: ' + err.message, 'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
window.cleanupInterfaces = cleanupInterfaces;
|
||||
|
||||
Reference in New Issue
Block a user