many improvements

This commit is contained in:
overcuriousity
2025-09-10 22:34:58 +02:00
parent 709d3b9f3d
commit db2101d814
7 changed files with 192 additions and 237 deletions

View File

@@ -217,8 +217,12 @@ class GraphManager {
this.network.on('click', (params) => {
if (params.nodes.length > 0) {
const nodeId = params.nodes[0];
this.showNodeDetails(nodeId);
this.highlightNodeConnections(nodeId);
if (this.network.isCluster(nodeId)) {
this.network.openCluster(nodeId);
} else {
this.showNodeDetails(nodeId);
this.highlightNodeConnections(nodeId);
}
} else {
this.clearHighlights();
}
@@ -454,11 +458,13 @@ class GraphManager {
'domain': '#00ff41', // Green
'ip': '#ff9900', // Amber
'certificate': '#c7c7c7', // Gray
'asn': '#00aaff' // Blue
'asn': '#00aaff', // Blue
'large_entity': '#ff6b6b' // Red for large entities
};
return colors[nodeType] || '#ffffff';
}
/**
* Get node border color based on type
* @param {string} nodeType - Node type
@@ -900,24 +906,22 @@ class GraphManager {
* Toggle node clustering
*/
toggleClustering() {
// Simple clustering by node type
const clusterOptionsByType = {
joinCondition: (childOptions) => {
return childOptions.type === 'domain';
},
clusterNodeProperties: {
id: 'domain-cluster',
borderWidth: 3,
shape: 'database',
label: 'Domains',
color: '#00ff41'
}
};
if (this.network.clustering.isCluster('domain-cluster')) {
this.network.clustering.openCluster('domain-cluster');
if (this.network.isCluster('domain-cluster')) {
this.network.openCluster('domain-cluster');
} else {
this.network.clustering.cluster(clusterOptionsByType);
const clusterOptions = {
joinCondition: (nodeOptions) => {
return nodeOptions.type === 'domain';
},
clusterNodeProperties: {
id: 'domain-cluster',
label: 'Domains',
shape: 'database',
color: '#00ff41',
borderWidth: 3,
}
};
this.network.cluster(clusterOptions);
}
}

View File

@@ -360,6 +360,7 @@ class DNSReconApp {
console.log('--- Polling tick ---');
this.updateStatus();
this.updateGraph();
this.loadProviders();
}, 1000); // Poll every 1 second for debugging
console.log('Polling started with 1 second interval');
@@ -542,6 +543,7 @@ class DNSReconApp {
this.stopPolling();
this.showSuccess('Scan completed successfully');
this.updateConnectionStatus('completed');
this.loadProviders();
// Force a final graph update
console.log('Scan completed - forcing final graph update');
setTimeout(() => this.updateGraph(), 100);
@@ -552,6 +554,7 @@ class DNSReconApp {
this.stopPolling();
this.showError('Scan failed');
this.updateConnectionStatus('error');
this.loadProviders();
break;
case 'stopped':
@@ -559,6 +562,7 @@ class DNSReconApp {
this.stopPolling();
this.showSuccess('Scan stopped');
this.updateConnectionStatus('stopped');
this.loadProviders();
break;
case 'idle':