Skip to content

Commit 2b5a904

Browse files
authored
Merge pull request #231 from mayanayza/feat/arp-scan
feat: arp scanning and full port scan
2 parents 42075c4 + d8f310c commit 2b5a904

File tree

30 files changed

+1309
-920
lines changed

30 files changed

+1309
-920
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
-- Migration: Convert processed/total_to_process to progress percentage
2+
UPDATE discovery
3+
SET run_type = jsonb_set(
4+
run_type #- '{results,processed}' #- '{results,total_to_process}',
5+
'{results,progress}',
6+
to_jsonb(
7+
CASE
8+
WHEN (run_type->'results'->>'total_to_process')::int > 0
9+
THEN LEAST(100, ((run_type->'results'->>'processed')::int * 100) / (run_type->'results'->>'total_to_process')::int)
10+
ELSE 0
11+
END
12+
)
13+
)
14+
WHERE run_type->>'type' = 'Historical'
15+
AND run_type->'results'->>'processed' IS NOT NULL;

0 commit comments

Comments
 (0)