[frontend/backend] 'Only equal to' new filter operator (#5220)#14543
[frontend/backend] 'Only equal to' new filter operator (#5220)#14543
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14543 +/- ##
==========================================
+ Coverage 32.36% 32.40% +0.04%
==========================================
Files 3096 3096
Lines 210889 211185 +296
Branches 38195 38364 +169
==========================================
+ Hits 68255 68437 +182
- Misses 142634 142748 +114
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
57e1235 to
c1d4b6c
Compare
5d0cdb6 to
527c3e9
Compare
527c3e9 to
164fc33
Compare
f9384d7 to
72d4d20
Compare
ffe253b to
018859c
Compare
| expect(entityTypeMap.get('RetentionRule')).toBe(entitiesCounter.RetentionRule); | ||
| expect(data.edges.length).toEqual(entitiesCounterTotal); | ||
| const filterBaseTypes = R.uniq(R.map((e) => e.node.base_type, data.edges)); | ||
| const filterBaseTypes = R.uniq(data.edges.map((e) => e.node.base_type)); |
There was a problem hiding this comment.
I think this should be equivalent if we want to remove r.uniq
const filterBaseTypes = [...new Set(data.edges.map((e) => e.node.base_type))];
There was a problem hiding this comment.
indeed... it's a bit heavy and less clear, that's why I didn't replace uniq, but I can also remove uniq if you think it's better
There was a problem hiding this comment.
Readability-wise I think both are similar so I would go with removing the ramda dep here and below . Either way, whatever the choice consider updating the notion page (:, https://www.notion.so/filigran/How-to-remove-Ramda-a0a7ddfbf1b2400c883173b16d2c9fac
opencti-platform/opencti-graphql/tests/02-dataInjection/01-dataCount/elasticSearch-test.js
Show resolved
Hide resolved
opencti-platform/opencti-graphql/tests/02-dataInjection/01-dataCount/elasticSearch-test.js
Show resolved
Hide resolved
alice-debra
left a comment
There was a problem hiding this comment.
Toby has pointed out a spelling error; it should be either 'only equals' or 'only equal to'.
@alice-debra which one do you prefer ? Maybe 'only equals' is shorter |
"only equal to" checked with @tobybutler405 :) |
| expect(entityTypeMap.get('RetentionRule')).toBe(entitiesCounter.RetentionRule); | ||
| expect(data.edges.length).toEqual(entitiesCounterTotal); | ||
| const filterBaseTypes = R.uniq(R.map((e) => e.node.base_type, data.edges)); | ||
| const filterBaseTypes = R.uniq(data.edges.map((e) => e.node.base_type)); |
There was a problem hiding this comment.
Readability-wise I think both are similar so I would go with removing the ramda dep here and below . Either way, whatever the choice consider updating the notion page (:, https://www.notion.so/filigran/How-to-remove-Ramda-a0a7ddfbf1b2400c883173b16d2c9fac
Proposed changes
Add 2 new filter operators: 'only_eq_to' and 'not_only_eq_to'
Related issues
#5220
Screenshot