@truedat/audit 4.43.0 → 4.43.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +6 -6
- package/src/components/ContentFilters.js +109 -98
- package/src/components/SubscriptionForm.js +127 -129
- package/src/components/Subscriptions.js +7 -4
- package/src/components/__tests__/SubscriptionForm.spec.js +113 -125
- package/src/components/__tests__/__snapshots__/SubscriptionForm.spec.js.snap +23 -2
- package/src/components/__tests__/__snapshots__/Subscriptions.spec.js.snap +192 -180
- package/src/subscriptionConstants.js +85 -140
|
@@ -14,11 +14,69 @@ exports[`<Subscriptions /> matches the latest snapshot 1`] = `
|
|
|
14
14
|
/>
|
|
15
15
|
}
|
|
16
16
|
/>
|
|
17
|
-
<
|
|
17
|
+
<Component
|
|
18
18
|
control={
|
|
19
19
|
Object {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"_defaultValues": Object {
|
|
21
|
+
"resourceTypes": Array [
|
|
22
|
+
"data_structure",
|
|
23
|
+
"domain",
|
|
24
|
+
"domains",
|
|
25
|
+
"concept",
|
|
26
|
+
"rule",
|
|
27
|
+
"source",
|
|
28
|
+
],
|
|
29
|
+
"subscriberTypes": Array [
|
|
30
|
+
"role",
|
|
31
|
+
"email",
|
|
32
|
+
"user",
|
|
33
|
+
"taxonomy_role",
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
"_executeSchema": [Function],
|
|
37
|
+
"_fields": Object {},
|
|
38
|
+
"_formState": Object {
|
|
39
|
+
"dirtyFields": Object {},
|
|
40
|
+
"errors": Object {},
|
|
41
|
+
"isDirty": false,
|
|
42
|
+
"isSubmitSuccessful": false,
|
|
43
|
+
"isSubmitted": false,
|
|
44
|
+
"isSubmitting": false,
|
|
45
|
+
"isValid": false,
|
|
46
|
+
"isValidating": false,
|
|
47
|
+
"submitCount": 0,
|
|
48
|
+
"touchedFields": Object {},
|
|
49
|
+
},
|
|
50
|
+
"_formValues": Object {
|
|
51
|
+
"resourceTypes": Array [
|
|
52
|
+
"data_structure",
|
|
53
|
+
"domain",
|
|
54
|
+
"domains",
|
|
55
|
+
"concept",
|
|
56
|
+
"rule",
|
|
57
|
+
"source",
|
|
58
|
+
],
|
|
59
|
+
"subscriberTypes": Array [
|
|
60
|
+
"role",
|
|
61
|
+
"email",
|
|
62
|
+
"user",
|
|
63
|
+
"taxonomy_role",
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
"_getDirty": [Function],
|
|
67
|
+
"_getFieldArray": [Function],
|
|
68
|
+
"_getWatch": [Function],
|
|
69
|
+
"_names": Object {
|
|
70
|
+
"array": Set {},
|
|
71
|
+
"mount": Set {},
|
|
72
|
+
"unMount": Set {},
|
|
73
|
+
"watch": Set {
|
|
74
|
+
"subscriberTypes",
|
|
75
|
+
"resourceTypes",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
"_options": Object {
|
|
79
|
+
"defaultValues": Object {
|
|
22
80
|
"resourceTypes": Array [
|
|
23
81
|
"data_structure",
|
|
24
82
|
"domain",
|
|
@@ -34,111 +92,117 @@ exports[`<Subscriptions /> matches the latest snapshot 1`] = `
|
|
|
34
92
|
"taxonomy_role",
|
|
35
93
|
],
|
|
36
94
|
},
|
|
95
|
+
"mode": "all",
|
|
96
|
+
"reValidateMode": "onChange",
|
|
97
|
+
"shouldFocusError": true,
|
|
37
98
|
},
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
"fieldArrayNamesRef": Object {
|
|
42
|
-
"current": Set {},
|
|
43
|
-
},
|
|
44
|
-
"fieldArrayValuesRef": Object {
|
|
45
|
-
"current": Object {},
|
|
46
|
-
},
|
|
47
|
-
"fieldsRef": Object {
|
|
48
|
-
"current": Object {},
|
|
49
|
-
},
|
|
50
|
-
"fieldsWithValidationRef": Object {
|
|
51
|
-
"current": Object {},
|
|
52
|
-
},
|
|
53
|
-
"formState": Object {
|
|
54
|
-
"dirtyFields": Object {},
|
|
55
|
-
"errors": Object {},
|
|
99
|
+
"_proxyFormState": Object {
|
|
100
|
+
"dirtyFields": false,
|
|
101
|
+
"errors": false,
|
|
56
102
|
"isDirty": false,
|
|
57
|
-
"
|
|
58
|
-
"isSubmitted": false,
|
|
59
|
-
"isSubmitting": false,
|
|
60
|
-
"isValid": true,
|
|
103
|
+
"isValid": false,
|
|
61
104
|
"isValidating": false,
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"touched": Object {},
|
|
105
|
+
"touchedFields": false,
|
|
106
|
+
},
|
|
107
|
+
"_removeUnmounted": [Function],
|
|
108
|
+
"_stateFlags": Object {
|
|
109
|
+
"action": false,
|
|
110
|
+
"mount": false,
|
|
111
|
+
"watch": false,
|
|
112
|
+
},
|
|
113
|
+
"_subjects": Object {
|
|
114
|
+
"array": Object {
|
|
115
|
+
"next": [Function],
|
|
116
|
+
"observers": Array [],
|
|
117
|
+
"subscribe": [Function],
|
|
118
|
+
"unsubscribe": [Function],
|
|
77
119
|
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"isReValidateOnBlur": false,
|
|
90
|
-
"isReValidateOnChange": true,
|
|
91
|
-
},
|
|
92
|
-
"readFormStateRef": Object {
|
|
93
|
-
"current": Object {
|
|
94
|
-
"constructor": true,
|
|
95
|
-
"dirtyFields": true,
|
|
96
|
-
"errors": true,
|
|
97
|
-
"isDirty": true,
|
|
98
|
-
"isSubmitSuccessful": true,
|
|
99
|
-
"isSubmitted": true,
|
|
100
|
-
"isSubmitting": true,
|
|
101
|
-
"isValid": true,
|
|
102
|
-
"isValidating": true,
|
|
103
|
-
"submitCount": true,
|
|
104
|
-
"touched": true,
|
|
120
|
+
"state": Object {
|
|
121
|
+
"next": [Function],
|
|
122
|
+
"observers": Array [],
|
|
123
|
+
"subscribe": [Function],
|
|
124
|
+
"unsubscribe": [Function],
|
|
125
|
+
},
|
|
126
|
+
"watch": Object {
|
|
127
|
+
"next": [Function],
|
|
128
|
+
"observers": Array [],
|
|
129
|
+
"subscribe": [Function],
|
|
130
|
+
"unsubscribe": [Function],
|
|
105
131
|
},
|
|
106
132
|
},
|
|
133
|
+
"_updateFieldArray": [Function],
|
|
134
|
+
"_updateValid": [Function],
|
|
135
|
+
"getFieldState": [Function],
|
|
107
136
|
"register": [Function],
|
|
108
|
-
"removeFieldEventListener": [Function],
|
|
109
|
-
"resetFieldArrayFunctionRef": Object {
|
|
110
|
-
"current": Object {},
|
|
111
|
-
},
|
|
112
|
-
"setValue": [Function],
|
|
113
|
-
"shallowFieldsStateRef": Object {
|
|
114
|
-
"current": Object {},
|
|
115
|
-
},
|
|
116
|
-
"shouldUnregister": true,
|
|
117
|
-
"trigger": [Function],
|
|
118
137
|
"unregister": [Function],
|
|
119
|
-
"updateFormState": [Function],
|
|
120
|
-
"updateWatchedValue": [Function],
|
|
121
|
-
"useWatchFieldsRef": Object {
|
|
122
|
-
"current": Object {},
|
|
123
|
-
},
|
|
124
|
-
"useWatchRenderFunctionsRef": Object {
|
|
125
|
-
"current": Object {},
|
|
126
|
-
},
|
|
127
|
-
"validFieldsRef": Object {
|
|
128
|
-
"current": Object {},
|
|
129
|
-
},
|
|
130
|
-
"validateResolver": undefined,
|
|
131
|
-
"watchInternal": [Function],
|
|
132
138
|
}
|
|
133
139
|
}
|
|
134
140
|
name="subscriberTypes"
|
|
135
141
|
render={[Function]}
|
|
136
142
|
/>
|
|
137
|
-
<
|
|
143
|
+
<Component
|
|
138
144
|
control={
|
|
139
145
|
Object {
|
|
140
|
-
"
|
|
141
|
-
"
|
|
146
|
+
"_defaultValues": Object {
|
|
147
|
+
"resourceTypes": Array [
|
|
148
|
+
"data_structure",
|
|
149
|
+
"domain",
|
|
150
|
+
"domains",
|
|
151
|
+
"concept",
|
|
152
|
+
"rule",
|
|
153
|
+
"source",
|
|
154
|
+
],
|
|
155
|
+
"subscriberTypes": Array [
|
|
156
|
+
"role",
|
|
157
|
+
"email",
|
|
158
|
+
"user",
|
|
159
|
+
"taxonomy_role",
|
|
160
|
+
],
|
|
161
|
+
},
|
|
162
|
+
"_executeSchema": [Function],
|
|
163
|
+
"_fields": Object {},
|
|
164
|
+
"_formState": Object {
|
|
165
|
+
"dirtyFields": Object {},
|
|
166
|
+
"errors": Object {},
|
|
167
|
+
"isDirty": false,
|
|
168
|
+
"isSubmitSuccessful": false,
|
|
169
|
+
"isSubmitted": false,
|
|
170
|
+
"isSubmitting": false,
|
|
171
|
+
"isValid": false,
|
|
172
|
+
"isValidating": false,
|
|
173
|
+
"submitCount": 0,
|
|
174
|
+
"touchedFields": Object {},
|
|
175
|
+
},
|
|
176
|
+
"_formValues": Object {
|
|
177
|
+
"resourceTypes": Array [
|
|
178
|
+
"data_structure",
|
|
179
|
+
"domain",
|
|
180
|
+
"domains",
|
|
181
|
+
"concept",
|
|
182
|
+
"rule",
|
|
183
|
+
"source",
|
|
184
|
+
],
|
|
185
|
+
"subscriberTypes": Array [
|
|
186
|
+
"role",
|
|
187
|
+
"email",
|
|
188
|
+
"user",
|
|
189
|
+
"taxonomy_role",
|
|
190
|
+
],
|
|
191
|
+
},
|
|
192
|
+
"_getDirty": [Function],
|
|
193
|
+
"_getFieldArray": [Function],
|
|
194
|
+
"_getWatch": [Function],
|
|
195
|
+
"_names": Object {
|
|
196
|
+
"array": Set {},
|
|
197
|
+
"mount": Set {},
|
|
198
|
+
"unMount": Set {},
|
|
199
|
+
"watch": Set {
|
|
200
|
+
"subscriberTypes",
|
|
201
|
+
"resourceTypes",
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
"_options": Object {
|
|
205
|
+
"defaultValues": Object {
|
|
142
206
|
"resourceTypes": Array [
|
|
143
207
|
"data_structure",
|
|
144
208
|
"domain",
|
|
@@ -154,101 +218,49 @@ exports[`<Subscriptions /> matches the latest snapshot 1`] = `
|
|
|
154
218
|
"taxonomy_role",
|
|
155
219
|
],
|
|
156
220
|
},
|
|
221
|
+
"mode": "all",
|
|
222
|
+
"reValidateMode": "onChange",
|
|
223
|
+
"shouldFocusError": true,
|
|
157
224
|
},
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
|
|
161
|
-
"fieldArrayNamesRef": Object {
|
|
162
|
-
"current": Set {},
|
|
163
|
-
},
|
|
164
|
-
"fieldArrayValuesRef": Object {
|
|
165
|
-
"current": Object {},
|
|
166
|
-
},
|
|
167
|
-
"fieldsRef": Object {
|
|
168
|
-
"current": Object {},
|
|
169
|
-
},
|
|
170
|
-
"fieldsWithValidationRef": Object {
|
|
171
|
-
"current": Object {},
|
|
172
|
-
},
|
|
173
|
-
"formState": Object {
|
|
174
|
-
"dirtyFields": Object {},
|
|
175
|
-
"errors": Object {},
|
|
225
|
+
"_proxyFormState": Object {
|
|
226
|
+
"dirtyFields": false,
|
|
227
|
+
"errors": false,
|
|
176
228
|
"isDirty": false,
|
|
177
|
-
"
|
|
178
|
-
"isSubmitted": false,
|
|
179
|
-
"isSubmitting": false,
|
|
180
|
-
"isValid": true,
|
|
229
|
+
"isValid": false,
|
|
181
230
|
"isValidating": false,
|
|
182
|
-
"
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
"
|
|
186
|
-
"
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
"
|
|
193
|
-
"
|
|
194
|
-
"
|
|
195
|
-
"
|
|
196
|
-
"touched": Object {},
|
|
231
|
+
"touchedFields": false,
|
|
232
|
+
},
|
|
233
|
+
"_removeUnmounted": [Function],
|
|
234
|
+
"_stateFlags": Object {
|
|
235
|
+
"action": false,
|
|
236
|
+
"mount": false,
|
|
237
|
+
"watch": false,
|
|
238
|
+
},
|
|
239
|
+
"_subjects": Object {
|
|
240
|
+
"array": Object {
|
|
241
|
+
"next": [Function],
|
|
242
|
+
"observers": Array [],
|
|
243
|
+
"subscribe": [Function],
|
|
244
|
+
"unsubscribe": [Function],
|
|
197
245
|
},
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
"
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
"isReValidateOnBlur": false,
|
|
210
|
-
"isReValidateOnChange": true,
|
|
211
|
-
},
|
|
212
|
-
"readFormStateRef": Object {
|
|
213
|
-
"current": Object {
|
|
214
|
-
"constructor": true,
|
|
215
|
-
"dirtyFields": true,
|
|
216
|
-
"errors": true,
|
|
217
|
-
"isDirty": true,
|
|
218
|
-
"isSubmitSuccessful": true,
|
|
219
|
-
"isSubmitted": true,
|
|
220
|
-
"isSubmitting": true,
|
|
221
|
-
"isValid": true,
|
|
222
|
-
"isValidating": true,
|
|
223
|
-
"submitCount": true,
|
|
224
|
-
"touched": true,
|
|
246
|
+
"state": Object {
|
|
247
|
+
"next": [Function],
|
|
248
|
+
"observers": Array [],
|
|
249
|
+
"subscribe": [Function],
|
|
250
|
+
"unsubscribe": [Function],
|
|
251
|
+
},
|
|
252
|
+
"watch": Object {
|
|
253
|
+
"next": [Function],
|
|
254
|
+
"observers": Array [],
|
|
255
|
+
"subscribe": [Function],
|
|
256
|
+
"unsubscribe": [Function],
|
|
225
257
|
},
|
|
226
258
|
},
|
|
259
|
+
"_updateFieldArray": [Function],
|
|
260
|
+
"_updateValid": [Function],
|
|
261
|
+
"getFieldState": [Function],
|
|
227
262
|
"register": [Function],
|
|
228
|
-
"removeFieldEventListener": [Function],
|
|
229
|
-
"resetFieldArrayFunctionRef": Object {
|
|
230
|
-
"current": Object {},
|
|
231
|
-
},
|
|
232
|
-
"setValue": [Function],
|
|
233
|
-
"shallowFieldsStateRef": Object {
|
|
234
|
-
"current": Object {},
|
|
235
|
-
},
|
|
236
|
-
"shouldUnregister": true,
|
|
237
|
-
"trigger": [Function],
|
|
238
263
|
"unregister": [Function],
|
|
239
|
-
"updateFormState": [Function],
|
|
240
|
-
"updateWatchedValue": [Function],
|
|
241
|
-
"useWatchFieldsRef": Object {
|
|
242
|
-
"current": Object {},
|
|
243
|
-
},
|
|
244
|
-
"useWatchRenderFunctionsRef": Object {
|
|
245
|
-
"current": Object {},
|
|
246
|
-
},
|
|
247
|
-
"validFieldsRef": Object {
|
|
248
|
-
"current": Object {},
|
|
249
|
-
},
|
|
250
|
-
"validateResolver": undefined,
|
|
251
|
-
"watchInternal": [Function],
|
|
252
264
|
}
|
|
253
265
|
}
|
|
254
266
|
name="resourceTypes"
|
|
@@ -1,144 +1,89 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
{ event: "concept_published" },
|
|
78
|
-
{ event: "concept_rejected" },
|
|
79
|
-
{ event: "concept_rejection_canceled" },
|
|
80
|
-
{ event: "concept_submitted" },
|
|
81
|
-
{ event: "delete_concept_draft" },
|
|
82
|
-
{ event: "grant_created" },
|
|
83
|
-
{ event: "grant_deleted" },
|
|
84
|
-
{ event: "implementation_created" },
|
|
85
|
-
{ event: "new_concept_draft" },
|
|
86
|
-
{ event: "relation_created" },
|
|
87
|
-
{ event: "relation_deleted" },
|
|
88
|
-
{ event: "update_concept_draft" },
|
|
89
|
-
{ event: "comment_created" },
|
|
90
|
-
{ event: "relation_deprecated" },
|
|
91
|
-
{ event: "structure_note_deleted" },
|
|
92
|
-
{ event: "structure_note_deprecated" },
|
|
93
|
-
{ event: "structure_note_draft" },
|
|
94
|
-
{ event: "structure_note_pending_approval" },
|
|
95
|
-
{ event: "structure_note_published" },
|
|
96
|
-
{ event: "structure_note_rejected" },
|
|
97
|
-
{ event: "structure_note_versioned" },
|
|
98
|
-
{ event: "structure_tag_linked" },
|
|
99
|
-
{ event: "structure_tag_link_updated" },
|
|
100
|
-
{ event: "structure_tag_link_deleted" },
|
|
101
|
-
],
|
|
102
|
-
rule: [
|
|
103
|
-
{ event: "rule_created" },
|
|
104
|
-
{
|
|
105
|
-
event: "rule_result_created",
|
|
106
|
-
statuses: [
|
|
107
|
-
{ name: "fail", color: "red" },
|
|
108
|
-
{ name: "warn", color: "yellow" },
|
|
109
|
-
{ name: "success", color: "green" },
|
|
110
|
-
],
|
|
111
|
-
},
|
|
1
|
+
import _ from "lodash/fp";
|
|
2
|
+
|
|
3
|
+
export const SUBSCRIBER_TYPE_ICONS = {
|
|
4
|
+
user: "user",
|
|
5
|
+
email: "envelope",
|
|
6
|
+
role: "student",
|
|
7
|
+
taxonomy_role: "student",
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const DEFAULT_ICON = "question";
|
|
11
|
+
|
|
12
|
+
export const RESOURCE_TYPE_ICONS = {
|
|
13
|
+
concept: "book",
|
|
14
|
+
domains: "sitemap",
|
|
15
|
+
domain: "sitemap",
|
|
16
|
+
rule: "clipboard check",
|
|
17
|
+
data_structure: "block layout",
|
|
18
|
+
source: "plug",
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const CONCEPT_EVENTS = [
|
|
22
|
+
"concept_published",
|
|
23
|
+
"concept_submitted",
|
|
24
|
+
"concept_deprecated",
|
|
25
|
+
"concept_rejected",
|
|
26
|
+
"concept_rejection_canceled",
|
|
27
|
+
"new_concept_draft",
|
|
28
|
+
"update_concept_draft",
|
|
29
|
+
"delete_concept_draft",
|
|
30
|
+
"comment_created",
|
|
31
|
+
"relation_created",
|
|
32
|
+
"relation_deprecated",
|
|
33
|
+
"relation_deleted",
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
export const STRUCTURE_EVENTS = [
|
|
37
|
+
"structure_note_published",
|
|
38
|
+
"structure_note_pending_approval",
|
|
39
|
+
"structure_note_versioned",
|
|
40
|
+
"structure_note_rejected",
|
|
41
|
+
"structure_note_deprecated",
|
|
42
|
+
"structure_note_deleted",
|
|
43
|
+
"structure_note_draft",
|
|
44
|
+
"structure_tag_linked",
|
|
45
|
+
"structure_tag_link_updated",
|
|
46
|
+
"structure_tag_link_deleted",
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
export const RULE_EVENTS = ["rule_created", "rule_result_created"];
|
|
50
|
+
|
|
51
|
+
export const SOURCE_EVENTS = ["status_changed"];
|
|
52
|
+
|
|
53
|
+
export const DOMAIN_EVENTS = [
|
|
54
|
+
...CONCEPT_EVENTS,
|
|
55
|
+
...RULE_EVENTS,
|
|
56
|
+
"implementation_created",
|
|
57
|
+
...STRUCTURE_EVENTS,
|
|
58
|
+
"grant_created",
|
|
59
|
+
"grant_deleted",
|
|
60
|
+
"ingest_sent_for_approval",
|
|
61
|
+
];
|
|
62
|
+
|
|
63
|
+
export const EVENTS_BY_TYPE = {
|
|
64
|
+
concept: CONCEPT_EVENTS,
|
|
65
|
+
data_structure: STRUCTURE_EVENTS,
|
|
66
|
+
domains: DOMAIN_EVENTS,
|
|
67
|
+
domain: DOMAIN_EVENTS,
|
|
68
|
+
rule: RULE_EVENTS,
|
|
69
|
+
source: SOURCE_EVENTS,
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const STATUSES_BY_EVENT = {
|
|
73
|
+
rule_result_created: [
|
|
74
|
+
{ name: "fail", color: "red" },
|
|
75
|
+
{ name: "warn", color: "yellow" },
|
|
76
|
+
{ name: "success", color: "green" },
|
|
112
77
|
],
|
|
113
|
-
|
|
114
|
-
{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
{ name: "job_status_succeeded", color: "green" },
|
|
121
|
-
{ name: "job_status_warning", color: "orange" },
|
|
122
|
-
{ name: "job_status_info", color: "grey" },
|
|
123
|
-
],
|
|
124
|
-
},
|
|
78
|
+
status_changed: [
|
|
79
|
+
{ name: "job_status_started", color: "blue" },
|
|
80
|
+
{ name: "job_status_pending", color: "yellow" },
|
|
81
|
+
{ name: "job_status_failed", color: "red" },
|
|
82
|
+
{ name: "job_status_succeeded", color: "green" },
|
|
83
|
+
{ name: "job_status_warning", color: "orange" },
|
|
84
|
+
{ name: "job_status_info", color: "grey" },
|
|
125
85
|
],
|
|
126
86
|
};
|
|
127
87
|
|
|
128
|
-
export const
|
|
129
|
-
|
|
130
|
-
user: "user",
|
|
131
|
-
email: "envelope",
|
|
132
|
-
role: "student",
|
|
133
|
-
taxonomy_role: "student",
|
|
134
|
-
},
|
|
135
|
-
DEFAULT_ICON: "question",
|
|
136
|
-
RESOURCE_TYPE_ICONS: {
|
|
137
|
-
concept: "book",
|
|
138
|
-
domains: "sitemap",
|
|
139
|
-
domain: "sitemap",
|
|
140
|
-
rule: "clipboard check",
|
|
141
|
-
data_structure: "block layout",
|
|
142
|
-
source: "plug",
|
|
143
|
-
},
|
|
144
|
-
};
|
|
88
|
+
export const isSubset = (first, second) =>
|
|
89
|
+
!_.isEmpty(first) && _.difference(first, second).length === 0;
|