Commit 7945666
Refactor: Migrate Tier 3 Reflux stores to react-query and direct API calls (#25320)
* Replace InputStaticFieldsStore with direct @graylog/server-api calls
Use StaticFields.create/remove from @graylog/server-api instead of
the Reflux store. Remove cross-store dependency from InputsStore
since react-query cache invalidation already handles input list refresh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Migrate InputStatesStore from Reflux to react-query hooks
Replace all usages of the Reflux InputStatesStore with the existing
useInputsStates hook and useInputStateMutations hook. Components now
use SystemInputStates from @graylog/server-api directly where hooks
cannot be used (StartInputStep).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Migrate InputTypesStore from Reflux to react-query hooks
Replace all usages of InputTypesStore with existing hooks:
- useInputTypesDescriptions for input type descriptions
- useInputTypes (hooks/) for input type summaries
- fetchInputType for fetching a single input type definition
Move InputDescription type to hooks/useInputType.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Migrate PipelineConnectionsStore from Reflux to react-query hooks
Create usePipelineConnections hook for fetching connections and
usePipelineConnectionMutation for updating pipeline-to-stream
connections. Uses PipelinesConnections from @graylog/server-api.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Migrate StreamRulesStore from Reflux to react-query
Replace StreamRulesStore with useStreamRuleMutations hook for create/update/remove
operations. Update useStreamRuleTypes to use generated API client directly.
Remove onChange/unregister callbacks in favor of query invalidation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Migrate GrokPatternsStore from Reflux to standalone API functions
Replace GrokPatternsStore with exported functions in hooks/useGrokPatterns.ts
that call the generated SystemGrok API client. Update all three consumers
(GrokPatterns, BulkLoadPatternModal, GrokExtractorConfiguration) and replace
CancellablePromise patterns with unmounted flags.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Migrate OutputsStore from Reflux to react-query hooks
Create useOutputMutations hook for save/update/remove operations using
SystemOutputs API client. Move Output type to hooks/useOutputs. Update
OutputsComponent to use useOutputs/useStreamOutputs hooks instead of
store callbacks. Update OutputsList and AddOutputButton to use mutations.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Migrate ContentPacksStore from Reflux to API functions
Replace ContentPacksActions with direct calls to SystemContentPacks API
client. Replace useStore(ContentPacksStore) in EditContentPackPage with
useContentPackRevisions hook. Use queryClient.invalidateQueries for
cache refresh after upload.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Migrate LookupTables/Caches/DataAdapters stores from Reflux to direct API calls
Replace LookupTablesStore, LookupTableCachesStore, and LookupTableDataAdaptersStore
with direct REST calls via lookupTablesAPI.ts. Consumers now use react-query or
call API functions directly instead of going through Reflux stores.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Migrate IndexSetsStore from Reflux to direct API functions and react-query hooks
Replace the Reflux store with standalone API functions (fetchIndexSets,
createIndexSet, updateIndexSet, deleteIndexSet, setDefaultIndexSet, etc.)
and leverage existing useIndexSetsList/useSingleIndexSet react-query hooks.
Update all 20 consumer files including tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Remove useFetchLookupTables wrapper, use named exports directly
Replace the useFetchLookupTables hook with direct named exports of
fetchPaginatedLookupTables and lookupTablesKeyFn from useLookupTablesAPI.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix type error in lookup table list test mock
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fixing linter hints.
* Fix stale imports from earlier Reflux store migrations
- Update InputState type import to hooks/useInputsStates (InputStatesStore was removed in Tier 2)
- Update DataAdapter test mock to use lookupDataAdapter API function (LookupTableDataAdaptersStore was removed in Tier 3)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Waiting for index sets to have loaded before showing modal.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent a0e2a8a commit 7945666
File tree
94 files changed
+1062
-2833
lines changed- graylog2-web-interface/src
- components
- content-packs
- event-definitions/event-definition-types
- extractors
- converters_configuration
- extractors_configuration
- grok-patterns
- indices
- IndexSetFieldTypeProfiles
- IndexSetFieldTypes
- hooks
- hooks
- inputs
- InputDiagnosis
- InputSetupWizard
- steps
- InputsOveriew
- lookup-tables
- hooks
- api
- lookup-table-list
- nodes
- outputs
- pipelines
- streamrules
- hooks
- streams
- StreamDetails
- routing-destination
- StreamsOverview
- hooks
- hooks
- pages
- stores
- content-packs
- grok-patterns
- indices
- inputs
- lookup-tables
- outputs
- pipelines
- streams
- views/logic/fieldactions/ChangeFieldType
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
94 files changed
+1062
-2833
lines changedLines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
47 | | - | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | | - | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| |||
Lines changed: 8 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
143 | 147 | | |
144 | 148 | | |
145 | 149 | | |
| |||
161 | 165 | | |
162 | 166 | | |
163 | 167 | | |
164 | | - | |
| 168 | + | |
165 | 169 | | |
166 | 170 | | |
167 | 171 | | |
| |||
253 | 257 | | |
254 | 258 | | |
255 | 259 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | 260 | | |
263 | 261 | | |
264 | 262 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
Lines changed: 5 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | | - | |
62 | | - | |
63 | | - | |
| 60 | + | |
64 | 61 | | |
65 | 62 | | |
66 | | - | |
| 63 | + | |
67 | 64 | | |
68 | 65 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 66 | + | |
| 67 | + | |
73 | 68 | | |
74 | 69 | | |
75 | 70 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
Lines changed: 17 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | | - | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
42 | | - | |
43 | | - | |
| 46 | + | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
96 | | - | |
97 | | - | |
98 | | - | |
| 100 | + | |
99 | 101 | | |
100 | 102 | | |
101 | | - | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| |||
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
112 | | - | |
| 114 | + | |
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 119 | + | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
Lines changed: 6 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
49 | 43 | | |
50 | 44 | | |
51 | 45 | | |
| |||
0 commit comments