feat(network): add bandwidth-ranked IP and domain activity metrics to network monitoring

This commit is contained in:
2026-04-13 11:04:15 +00:00
parent 07a3365496
commit 035173702d
10 changed files with 275 additions and 227 deletions

View File

@@ -323,16 +323,14 @@ export class OpsViewDomains extends DeesElement {
// Build target options based on current source
const targetOptions: { option: string; key: string }[] = [];
if (domain.source === 'provider') {
targetOptions.push({ option: 'DcRouter (authoritative)', key: 'dcrouter' });
}
// Add all providers (except the current one if already provider-managed)
for (const p of providers) {
if (domain.source === 'provider' && domain.providerId === p.id) continue;
targetOptions.push({ option: `${p.name} (${p.type})`, key: `provider:${p.id}` });
}
if (domain.source === 'dcrouter') {
targetOptions.unshift({ option: 'DcRouter (authoritative)', key: 'dcrouter' });
// Skip current source
if (p.builtIn && domain.source === 'dcrouter') continue;
if (!p.builtIn && domain.source === 'provider' && domain.providerId === p.id) continue;
const label = p.builtIn ? 'DcRouter (self)' : `${p.name} (${p.type})`;
const key = p.builtIn ? 'dcrouter' : `provider:${p.id}`;
targetOptions.push({ option: label, key });
}
if (targetOptions.length === 0) {
@@ -345,7 +343,7 @@ export class OpsViewDomains extends DeesElement {
}
const currentLabel = domain.source === 'dcrouter'
? 'DcRouter (authoritative)'
? 'DcRouter (self)'
: providers.find((p) => p.id === domain.providerId)?.name || 'Provider';
DeesModal.createAndShow({