From e85073733ca55d98079ebb031ec639b6ccf2053c Mon Sep 17 00:00:00 2001 From: HF Date: Thu, 16 Mar 2023 16:30:46 +0100 Subject: [PATCH] add cidr group to pixel logging tables and make cidr copy to clickboard on click --- src/components/ModWatchtools.jsx | 20 +++++++++++++++++++- src/core/parsePixelLog.js | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/components/ModWatchtools.jsx b/src/components/ModWatchtools.jsx index b0ee5da..18c2a4d 100644 --- a/src/components/ModWatchtools.jsx +++ b/src/components/ModWatchtools.jsx @@ -362,9 +362,27 @@ function ModWatchtools() { ); } case 'cid': { - const ident = canvases[val] && canvases[val].ident; + const ident = canvases?.ident; return ({ident}); } + case 'cidr': { + return ( + + copyTextToClipboard( + val.slice(0, val.indexOf('/')), + )} + >{val} + + ); + } case 'uuid': { return ( diff --git a/src/core/parsePixelLog.js b/src/core/parsePixelLog.js index 8798dc2..7733650 100644 --- a/src/core/parsePixelLog.js +++ b/src/core/parsePixelLog.js @@ -244,7 +244,7 @@ export async function getSummaryFromArea( if (ip2Info.size > 0) { printIIDs = true; columns.push('IID', 'ct', 'cidr', 'org', 'pc'); - types.push('uuid', 'flag', 'string', 'string', 'string'); + types.push('uuid', 'flag', 'cidr', 'string', 'string'); } if (uid2Name.size > 0) { printUsers = true;