Skip to content

Commit

Permalink
fixed rule object to yaml conversion for timeframe (opensearch-projec…
Browse files Browse the repository at this point in the history
…t#1020) (opensearch-project#1040)

(cherry picked from commit 2b1c6f1)

Signed-off-by: Amardeepsingh Siglani <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent b0193a4 commit 9ca8d9b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ export class DetectionVisualEditor extends React.Component<
let selectionMaps: any = {};

selection.data.forEach((datum) => {
if (datum.field) {
if (selection.name === 'timeframe') {
selectionMaps = datum.values[0] || '';
} else if (datum.field) {
const key = `${datum.field}${datum.modifier ? `|${datum.modifier}` : ''}`;
selectionMaps[key] = datum.values;
} else {
Expand Down

0 comments on commit 9ca8d9b

Please sign in to comment.