add cidr group to pixel logging tables and make cidr copy to clickboard

on click
This commit is contained in:
HF 2023-03-16 16:30:46 +01:00
parent 7cee79f103
commit e85073733c
2 changed files with 20 additions and 2 deletions

View File

@ -362,9 +362,27 @@ function ModWatchtools() {
);
}
case 'cid': {
const ident = canvases[val] && canvases[val].ident;
const ident = canvases?.ident;
return (<td key={type}>{ident}</td>);
}
case 'cidr': {
return (
<td key={type}>
<span
role="button"
tabIndex={-1}
style={{
cursor: 'pointer',
whiteSpace: 'initial',
}}
title={t`Copy to Clipboard`}
onClick={() => copyTextToClipboard(
val.slice(0, val.indexOf('/')),
)}
>{val}</span>
</td>
);
}
case 'uuid': {
return (
<td key={type}>

View File

@ -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;