diff --git a/opencti-platform/opencti-front/src/private/components/settings/decay/Decay.tsx b/opencti-platform/opencti-front/src/private/components/settings/decay/Decay.tsx index df3c19357592c..a85e63f11e5f6 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/decay/Decay.tsx +++ b/opencti-platform/opencti-front/src/private/components/settings/decay/Decay.tsx @@ -33,12 +33,11 @@ let graphData: GraphData = { startDateMs:now(), startScore:100, decayModel: DEFAULT_DECAY_MODEL, - pointCount: 30, + pointCount: 150, pound: 1 }; export const handleSubmit = (values: FormikValues) => { - console.log('handleSubmit of ', values); const newStartScore: number = parseInt(values.startScore); if (newStartScore > 0 && newStartScore <=100 ) { graphData.startScore = newStartScore; @@ -48,6 +47,20 @@ export const handleSubmit = (values: FormikValues) => { if (newPound) { graphData.pound = newPound; } + + const newLifeTime: number = parseInt(values.lifetime); + if (newLifeTime > 0) { + graphData.decayModel.decay_lifetime = newLifeTime; + } + + if (values.reactionPoints) { + graphData.decayModel.decay_points = values.reactionPoints.split(';'); + } + + const newCutOff: number = parseInt(values.cutoff); + if (newCutOff) { + graphData.decayModel.decay_revoked_cutoff = newCutOff; + } } const Decay = () => { @@ -79,8 +92,11 @@ const Decay = () => {
{ handleSubmit(values); @@ -88,18 +104,39 @@ const Decay = () => { }} >
- - +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
- - - +
+ +
Model is:-
-
decay_points: {graphData.decayModel.decay_points}
decay_factor: {graphData.decayModel.decay_factor}
decay_lifetime: {graphData.decayModel.decay_lifetime} day(s)
decay_revoked_cutoff: {graphData.decayModel.decay_revoked_cutoff} day(s)