Skip to content
Snippets Groups Projects
Commit 4262162b authored by Leonardo's avatar Leonardo
Browse files

chore: update entities aperenace

parent 5b52edfb
No related branches found
Tags v1.121.0
No related merge requests found
Pipeline #145517 passed
......@@ -223,13 +223,13 @@ export function FormInsight(props: Props) {
label={`Entity appearance ${localInsight.type}`}
type="toggle"
position="left"
value={localInsight.alarmMode === 'entitiesAppearances'}
value={localInsight.alarmMode === 'entityAppearances'}
onChange={val => {
setLocalInsight({
...localInsight,
//alarmMode: val ? 'entitiesAppearances' : 'disabled',
alarmMode: 'entitiesAppearances',
entitiesAppearances: val
//alarmMode: val ? 'entityAppearances' : 'disabled',
alarmMode: 'entityAppearances',
entityAppearances: val
? {
nodeLabel: '',
threshold: 0,
......@@ -240,23 +240,23 @@ export function FormInsight(props: Props) {
},
});
}}
classText={localInsight.alarmMode === 'entitiesAppearances' ? 'font-bold' : ''}
classText={localInsight.alarmMode === 'entityAppearances' ? 'font-bold' : ''}
tooltip={`Conditional ${localInsight.type} will trigger based on a condition check, such as the number of nodes of a certain type is greater than 10`}
/>
</>
)}
</div>
{localInsight.alarmMode === 'entitiesAppearances' && (
{localInsight.alarmMode === 'entityAppearances' && (
<>
<div className="m-2 grid grid-cols-1 xl:grid-cols-2 gap-2">
<Input
label="Node Label"
type="dropdown"
value={localInsight.entitiesAppearances?.nodeLabel || ''}
value={localInsight.entityAppearances?.nodeLabel || ''}
onChange={value => {
const updatedCondition = { ...localInsight.entitiesAppearances, nodeLabel: String(value) };
setLocalInsight({ ...localInsight, entitiesAppearances: updatedCondition });
const updatedCondition = { ...localInsight.entityAppearances, nodeLabel: String(value) };
setLocalInsight({ ...localInsight, entityAppearances: updatedCondition });
}}
options={nodeTypes}
inline={false}
......@@ -267,11 +267,11 @@ export function FormInsight(props: Props) {
label="Value"
type="number"
min={0}
value={localInsight.entitiesAppearances?.threshold || 0}
value={localInsight.entityAppearances?.threshold || 0}
onChange={value => {
const newValue = Number(value);
const updatedCondition = { ...localInsight.entitiesAppearances, threshold: newValue >= 0 ? newValue : 0 };
setLocalInsight({ ...localInsight, entitiesAppearances: updatedCondition });
const updatedCondition = { ...localInsight.entityAppearances, threshold: newValue >= 0 ? newValue : 0 };
setLocalInsight({ ...localInsight, entityAppearances: updatedCondition });
}}
info="Enter count threshold"
/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment