@kineticdata/react 6.0.4 → 6.1.0

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.
Files changed (100) hide show
  1. package/CHANGELOG.md +116 -86
  2. package/lib/apis/core/attributeDefinitions.js +9 -6
  3. package/lib/apis/core/integrations.js +61 -0
  4. package/lib/apis/core/submissions.js +52 -15
  5. package/lib/apis/http.js +16 -2
  6. package/lib/apis/index.js +24 -0
  7. package/lib/apis/integrator/index.js +262 -0
  8. package/lib/apis/system/index.js +64 -12
  9. package/lib/apis/task/index.js +9 -2
  10. package/lib/components/agent/filestore/FilestoreForm.js +1 -1
  11. package/lib/components/common/AttributeSelect.js +10 -2
  12. package/lib/components/common/BridgeSelect.js +2 -1
  13. package/lib/components/common/ConnectionSelect.js +72 -0
  14. package/lib/components/common/FormSelect.js +2 -1
  15. package/lib/components/common/StaticSelect.js +15 -6
  16. package/lib/components/common/TableInput.js +4 -1
  17. package/lib/components/common/TeamSelect.js +2 -1
  18. package/lib/components/common/ToastContainer.js +34 -10
  19. package/lib/components/common/Typeahead.js +59 -23
  20. package/lib/components/common/UserSelect.js +2 -1
  21. package/lib/components/common/authentication/RequestInterceptor.js +1 -1
  22. package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +3 -0
  23. package/lib/components/core/bridge_model/BridgeModelTable.js +19 -0
  24. package/lib/components/core/bridge_model_attribute/BridgeModelAttributeForm.js +6 -9
  25. package/lib/components/core/bridge_model_attribute/BridgeModelAttributeTable.js +0 -4
  26. package/lib/components/core/bridge_model_qualification/BridgeModelQualificationForm.js +7 -10
  27. package/lib/components/core/bridge_model_qualification/BridgeModelQualificationTable.js +2 -15
  28. package/lib/components/core/category/CategoryForm.js +4 -1
  29. package/lib/components/core/category/CategoryTable.js +2 -2
  30. package/lib/components/core/core_form/CoreForm.js +18 -10
  31. package/lib/components/core/file_resource/FileResourceForm.js +2 -1
  32. package/lib/components/core/file_resource/FileResourceTable.js +14 -7
  33. package/lib/components/core/form/FormForm.js +42 -19
  34. package/lib/components/core/form/FormTable.js +14 -14
  35. package/lib/components/core/form_type/FormTypeForm.js +3 -0
  36. package/lib/components/core/i18n/Moment.js +1 -0
  37. package/lib/components/core/integration/IntegrationForm.js +232 -0
  38. package/lib/components/core/integration/IntegrationTable.js +139 -0
  39. package/lib/components/core/kapp/KappForm.js +56 -67
  40. package/lib/components/core/kapp/KappTable.js +3 -3
  41. package/lib/components/core/log/LogTable.js +1 -1
  42. package/lib/components/core/security_definition/SecurityDefinitionForm.js +48 -10
  43. package/lib/components/core/space/SpaceForm.js +97 -111
  44. package/lib/components/core/submission/DatastoreSubmissionTable.js +4 -4
  45. package/lib/components/core/submission/FormSubmissionTable.js +12 -7
  46. package/lib/components/core/submission/KappSubmissionTable.js +4 -4
  47. package/lib/components/core/submission/SubmissionForm.js +3 -1
  48. package/lib/components/core/team/TeamTable.js +17 -7
  49. package/lib/components/core/user/UserTable.js +18 -18
  50. package/lib/components/core/webapi/WebApiForm.js +5 -2
  51. package/lib/components/core/webapi/WebApiTable.js +2 -2
  52. package/lib/components/core/webhook/WebhookForm.js +43 -33
  53. package/lib/components/core/webhook/WebhookTable.js +16 -16
  54. package/lib/components/core/webhook_job/WebhookJobTable.js +17 -6
  55. package/lib/components/form/Form.helpers.js +10 -4
  56. package/lib/components/form/Form.js +250 -168
  57. package/lib/components/form/Form.models.js +6 -1
  58. package/lib/components/form/FormState.js +9 -5
  59. package/lib/components/form/defaults/CodeField.js +44 -1
  60. package/lib/components/index.js +84 -3
  61. package/lib/components/integrator/connection/ConnectionForm.js +112 -0
  62. package/lib/components/integrator/connection/ConnectionTable.js +80 -0
  63. package/lib/components/integrator/connection/config_fields/http.js +570 -0
  64. package/lib/components/integrator/integrationTypes.js +98 -0
  65. package/lib/components/integrator/operation/OperationForm.js +128 -0
  66. package/lib/components/integrator/operation/OperationTable.js +64 -0
  67. package/lib/components/integrator/operation/config_fields/http.js +184 -0
  68. package/lib/components/system/SystemSecurityForm.js +1 -1
  69. package/lib/components/system/SystemTaskAdapterForm.js +9 -9
  70. package/lib/components/system/helpers.js +123 -100
  71. package/lib/components/system/spaces/SystemSpaceForm.js +9 -37
  72. package/lib/components/system/spaces/SystemTenantForm.js +276 -104
  73. package/lib/components/system/spaces/SystemTenantMigrateForm.js +449 -0
  74. package/lib/components/system/spaces/SystemTenantTable.js +20 -16
  75. package/lib/components/table/Table.redux.js +1 -1
  76. package/lib/components/task/builder/ConnectorForm.js +11 -7
  77. package/lib/components/task/builder/Node.js +11 -2
  78. package/lib/components/task/builder/NodeForm.js +93 -22
  79. package/lib/components/task/builder/NodeParametersForm.js +29 -17
  80. package/lib/components/task/builder/TaskDefinitionConfigForm.js +18 -50
  81. package/lib/components/task/builder/TreeBuilder.js +32 -5
  82. package/lib/components/task/builder/builder.redux.js +399 -205
  83. package/lib/components/task/builder/constants.js +10 -2
  84. package/lib/components/task/builder/helpers.js +199 -79
  85. package/lib/components/task/builder/models.js +11 -9
  86. package/lib/components/task/category/TaskCategoryTable.js +3 -3
  87. package/lib/components/task/common/UsageTable.js +1 -1
  88. package/lib/components/task/handlers/HandlerTable.js +35 -19
  89. package/lib/components/task/policy_rule/PolicyRuleTable.js +3 -3
  90. package/lib/components/task/runs/CreateManualTriggerForm.js +2 -0
  91. package/lib/components/task/runs/RunTable.js +4 -4
  92. package/lib/components/task/runs/RunTaskTable.js +1 -1
  93. package/lib/components/task/sources/SourceTable.js +2 -2
  94. package/lib/components/task/triggers/TriggerTable.js +2 -2
  95. package/lib/components/task/workflows/LinkedWorkflowTable.js +2 -2
  96. package/lib/components/task/workflows/WorkflowForm.js +29 -9
  97. package/lib/components/task/workflows/WorkflowTable.js +2 -2
  98. package/lib/helpers/index.js +289 -72
  99. package/package.json +5 -3
  100. package/proxyhelper.js +28 -3
@@ -0,0 +1,449 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.SystemTenantMigrateForm = void 0;
8
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
9
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
11
+ var _objectSpread4 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
12
+ var _immutable = require("immutable");
13
+ var _Form = require("../../form/Form");
14
+ var _apis = require("../../../apis");
15
+ var _helpers = require("../helpers");
16
+ var _Form2 = require("../../form/Form.helpers");
17
+ var TENANT_INCLUDES = 'details';
18
+ var dataSources = function dataSources(_ref) {
19
+ var slug = _ref.slug;
20
+ return {
21
+ space: {
22
+ fn: _apis.fetchSpace,
23
+ params: slug && [{
24
+ slug: slug,
25
+ include: 'details,allowedIps'
26
+ }],
27
+ transform: function transform(result) {
28
+ return result.space;
29
+ }
30
+ },
31
+ tenant: {
32
+ fn: _apis.fetchTenant,
33
+ params: slug && [{
34
+ slug: slug,
35
+ include: TENANT_INCLUDES
36
+ }],
37
+ transform: function transform(result) {
38
+ return result.tenant;
39
+ }
40
+ },
41
+ defaultSQLDatabaseAdapter: {
42
+ fn: _apis.fetchSystemDefaultSQLDbAdapter,
43
+ params: [],
44
+ transform: function transform(result) {
45
+ return result.adapter;
46
+ }
47
+ },
48
+ fileFields: {
49
+ fn: function fn() {
50
+ return {
51
+ mssql: ['sslrootcert', 'sslcert'],
52
+ oracle: ['serverCert', 'clientCert'],
53
+ postgres: ['sslrootcert', 'sslcert', 'sslkey']
54
+ };
55
+ },
56
+ params: []
57
+ }
58
+ };
59
+ };
60
+ var handleSubmit = function handleSubmit(_ref2) {
61
+ var slug = _ref2.slug,
62
+ component = _ref2.component;
63
+ return function (values, _ref3) {
64
+ var fileFields = _ref3.fileFields,
65
+ rawValues = _ref3.values,
66
+ originalTenant = _ref3.tenant;
67
+ var taskEnabled = !!values.get('task_feature');
68
+ var integratorEnabled = !!values.get('integrator_feature');
69
+ var task = {},
70
+ integrator = {};
71
+ if (taskEnabled && (!component || component === 'task')) {
72
+ var type = values.get('task_databaseAdapter_type');
73
+ var fileFieldsForType = fileFields.get(type);
74
+ // Only include values for file fields if the toggle field is true
75
+ var filterFn = function filterFn(value, key) {
76
+ return !fileFieldsForType.includes(key) || !!rawValues.get("task_".concat(type, "_change_").concat(key));
77
+ };
78
+ // Get adapter properties to save
79
+ var properties = (0, _helpers.adapterProperties)(values, 'task', type, filterFn);
80
+ // If creating new, pass in file values from default adapter if not uploaded
81
+ if (!slug || originalTenant.getIn(['features', 'task']) === 'false') {
82
+ properties = fileFieldsForType.reduce(function (props, field) {
83
+ if (typeof props[field] === 'undefined' && !!rawValues.getIn(["task_".concat(type, "_current_").concat(field), 'pem'])) {
84
+ return (0, _objectSpread4["default"])((0, _objectSpread4["default"])({}, props), {}, (0, _defineProperty2["default"])({}, field, new File([rawValues.getIn(["task_".concat(type, "_current_").concat(field), 'pem'])], "".concat(field, ".crt"), {
85
+ type: 'text/plain'
86
+ })));
87
+ }
88
+ return props;
89
+ }, properties);
90
+ }
91
+ var authenticationSecret = values.get('task_authenticationSecret') ? {
92
+ authenticationSecret: values.get('task_authenticationSecret')
93
+ } : {};
94
+ task = {
95
+ task: (0, _objectSpread4["default"])((0, _objectSpread4["default"])({}, authenticationSecret), {}, {
96
+ deployment: {
97
+ image: values.get('task_image'),
98
+ replicas: parseInt(values.get('task_replicas'))
99
+ },
100
+ configuratorUser: {
101
+ username: values.get('configuratorUsername'),
102
+ password: values.get('configuratorPassword')
103
+ },
104
+ databaseAdapter: {
105
+ type: type,
106
+ properties: properties
107
+ },
108
+ autoCreateDatabase: (!!values.get('task_autoCreateDatabase')).toString()
109
+ })
110
+ };
111
+ }
112
+ if (integratorEnabled && (!component || component === 'integrator')) {
113
+ var _type = values.get('integrator_databaseAdapter_type');
114
+ var _fileFieldsForType = fileFields.get(_type);
115
+ // Only include values for file fields if the toggle field is true
116
+ var _filterFn = function _filterFn(value, key) {
117
+ return !_fileFieldsForType.includes(key) || !!rawValues.get("integrator_".concat(_type, "_change_").concat(key));
118
+ };
119
+ // Get adapter properties to save
120
+ var _properties = (0, _helpers.adapterProperties)(values, 'integrator', _type, _filterFn);
121
+ // If creating new, pass in file values from default adapter if not uploaded
122
+ if (!slug || originalTenant.getIn(['features', 'integrator']) === 'false') {
123
+ _properties = _fileFieldsForType.reduce(function (props, field) {
124
+ if (typeof props[field] === 'undefined' && !!rawValues.getIn(["integrator_".concat(_type, "_current_").concat(field), 'pem'])) {
125
+ return (0, _objectSpread4["default"])((0, _objectSpread4["default"])({}, props), {}, (0, _defineProperty2["default"])({}, field, new File([rawValues.getIn(["integrator_".concat(_type, "_current_").concat(field), 'pem'])], "".concat(field, ".crt"), {
126
+ type: 'text/plain'
127
+ })));
128
+ }
129
+ return props;
130
+ }, _properties);
131
+ }
132
+ integrator = {
133
+ integrator: {
134
+ deployment: {
135
+ image: values.get('integrator_image'),
136
+ replicas: parseInt(values.get('integrator_replicas'))
137
+ },
138
+ secretKeyBase: values.get('secretKeyBase'),
139
+ vaultKey: values.get('vaultKey'),
140
+ databaseAdapter: {
141
+ type: _type,
142
+ properties: _properties
143
+ },
144
+ autoCreateDatabase: (!!values.get('integrator_autoCreateDatabase')).toString()
145
+ }
146
+ };
147
+ }
148
+ var tenant = (0, _objectSpread4["default"])((0, _objectSpread4["default"])((0, _objectSpread4["default"])({
149
+ space: {
150
+ slug: values.get('slug'),
151
+ name: values.get('name')
152
+ },
153
+ features: {
154
+ task: taskEnabled.toString(),
155
+ integrator: integratorEnabled.toString()
156
+ },
157
+ integrationUser: {
158
+ username: values.get('integrationUsername'),
159
+ password: values.get('integrationPassword')
160
+ },
161
+ encryptionKey: values.get('encryptionKey'),
162
+ coreServiceName: values.get('coreServiceName'),
163
+ oasConsoleServiceName: 'oas-console',
164
+ spaceConsoleServiceName: 'space-console',
165
+ loghubServiceName: 'loghub'
166
+ }, task), integrator), {}, {
167
+ users: values.get('users')
168
+ });
169
+ var multipart = taskEnabled && (!component || component === 'task') && Object.entries(tenant.task.databaseAdapter.properties).some(function (_ref4) {
170
+ var _ref5 = (0, _slicedToArray2["default"])(_ref4, 2),
171
+ name = _ref5[0],
172
+ value = _ref5[1];
173
+ return value instanceof File;
174
+ }) || integratorEnabled && (!component || component === 'integrator') && Object.entries(tenant.integrator.databaseAdapter.properties).some(function (_ref6) {
175
+ var _ref7 = (0, _slicedToArray2["default"])(_ref6, 2),
176
+ name = _ref7[0],
177
+ value = _ref7[1];
178
+ return value instanceof File;
179
+ });
180
+ return (0, _apis.migrateTenant)({
181
+ slug: slug,
182
+ tenant: tenant,
183
+ multipart: multipart
184
+ }).then((0, _Form2.handleFormErrors)('space', 'There was an error migrating the Space.'));
185
+ };
186
+ };
187
+ var getSpaceValue = function getSpaceValue(tenant, key) {
188
+ return tenant ? (0, _immutable.getIn)(tenant, ['space', key], '') : '';
189
+ };
190
+ var fields = function fields(_ref8) {
191
+ var slug = _ref8.slug,
192
+ component = _ref8.component;
193
+ return function (_ref9) {
194
+ var tenant = _ref9.tenant,
195
+ defaultSQLDatabaseAdapter = _ref9.defaultSQLDatabaseAdapter;
196
+ return (tenant || !slug) && (defaultSQLDatabaseAdapter || defaultSQLDatabaseAdapter === null) && [
197
+ // Start - Migrate Space Fields
198
+ {
199
+ name: 'name',
200
+ label: 'Name',
201
+ type: 'text',
202
+ required: true,
203
+ enabled: false,
204
+ initialValue: getSpaceValue(tenant, 'name')
205
+ }, {
206
+ name: 'slug',
207
+ label: 'Slug',
208
+ type: 'text',
209
+ required: true,
210
+ enabled: false,
211
+ initialValue: getSpaceValue(tenant, 'slug')
212
+ }, {
213
+ name: 'integrationUsername',
214
+ label: 'Integration Username',
215
+ type: 'text',
216
+ required: true,
217
+ enabled: true
218
+ }, {
219
+ name: 'integrationPassword',
220
+ label: 'Integration Password',
221
+ type: 'password',
222
+ required: true
223
+ }, {
224
+ name: 'configuratorUsername',
225
+ label: 'Configurator Username',
226
+ type: 'text',
227
+ required: true,
228
+ enabled: true
229
+ }, {
230
+ name: 'configuratorPassword',
231
+ label: 'Configurator Password',
232
+ type: 'password',
233
+ required: true
234
+ }, {
235
+ name: 'encryptionKey',
236
+ label: 'Encryption Key',
237
+ type: 'password',
238
+ required: true
239
+ }, {
240
+ name: 'vaultKey',
241
+ label: 'Vault Key',
242
+ type: 'password',
243
+ required: true
244
+ }, {
245
+ name: 'coreServiceName',
246
+ label: 'Core Version',
247
+ type: 'text',
248
+ required: true
249
+ }, {
250
+ name: 'secretKeyBase',
251
+ label: 'Secret Key',
252
+ type: 'password',
253
+ required: true
254
+ },
255
+ // End - Migrate Space Fields
256
+
257
+ // Start - Feature Flags
258
+ {
259
+ name: 'task_feature',
260
+ label: 'Task Component',
261
+ type: 'checkbox',
262
+ initialValue: (0, _immutable.getIn)(tenant, ['features', 'task']) === 'true' || !slug,
263
+ onChange: function onChange(_ref10, _ref11) {
264
+ var values = _ref10.values;
265
+ var setValue = _ref11.setValue;
266
+ // When you toggle the feature, set or clear the adapter type value so
267
+ // that the downstream adapter fields can be automatically hidden
268
+ if (!!values.get('task_feature')) {
269
+ setValue('task_databaseAdapter_type', (0, _immutable.getIn)(tenant, ['task', 'databaseAdapter', 'type'], (0, _immutable.get)(defaultSQLDatabaseAdapter, 'type', '')));
270
+ } else {
271
+ setValue('task_databaseAdapter_type', '');
272
+ }
273
+ }
274
+ }, {
275
+ name: 'integrator_feature',
276
+ label: 'Integrator Component',
277
+ type: 'checkbox',
278
+ initialValue: (0, _immutable.getIn)(tenant, ['features', 'integrator']) === 'true' || !slug,
279
+ onChange: function onChange(_ref12, _ref13) {
280
+ var values = _ref12.values;
281
+ var setValue = _ref13.setValue;
282
+ // When you toggle the feature, set or clear the adapter type value so
283
+ // that the downstream adapter fields can be automatically hidden
284
+ if (!!values.get('task_feature')) {
285
+ setValue('integrator_databaseAdapter_type', (0, _immutable.getIn)(tenant, ['integrator', 'databaseAdapter', 'type'], (0, _immutable.get)(defaultSQLDatabaseAdapter, 'type', '')));
286
+ } else {
287
+ setValue('task_databaseAdapter_type', '');
288
+ }
289
+ }
290
+ }].concat((0, _toConsumableArray2["default"])(!component || component === 'task' ? [
291
+ // Start - Task fields
292
+ {
293
+ name: 'task_replicas',
294
+ label: 'Replica Count',
295
+ type: 'number',
296
+ initialValue: (0, _immutable.getIn)(tenant, ['task', 'deployment', 'specReplicas'], 1),
297
+ constraint: function constraint(_ref14) {
298
+ var values = _ref14.values;
299
+ return !values.get('task_feature') || typeof values.get('task_replicas') === 'number' && values.get('task_replicas') >= 0;
300
+ },
301
+ constraintMessage: 'Replica count must be a positive integer or zero.'
302
+ }, {
303
+ name: 'task_image',
304
+ label: 'Task Image',
305
+ type: 'text',
306
+ initialValue: (0, _immutable.getIn)(tenant, ['task', 'deployment', 'image'])
307
+ }, {
308
+ name: 'task_image',
309
+ label: 'Task Image',
310
+ type: 'text',
311
+ visible: function visible(_ref15) {
312
+ var values = _ref15.values;
313
+ return !values.get('task_imageToggle');
314
+ },
315
+ initialValue: (0, _immutable.getIn)(tenant, ['task', 'deployment', 'image']),
316
+ helpText: 'Optionally set the version of Kinetic Task to use for this space. Leave blank to use the default version.'
317
+ }, {
318
+ name: 'task_imageToggle',
319
+ label: 'Use Default Task Image',
320
+ type: 'checkbox',
321
+ "transient": true,
322
+ visible: !slug || (0, _immutable.getIn)(tenant, ['features', 'task']) === 'false',
323
+ initialValue: !(0, _immutable.getIn)(tenant, ['task', 'deployment', 'image']),
324
+ onChange: function onChange(_ref16, _ref17) {
325
+ var values = _ref16.values;
326
+ var setValue = _ref17.setValue;
327
+ if (!!values.get('task_imageToggle')) {
328
+ setValue('task_image', '');
329
+ }
330
+ }
331
+ }, {
332
+ name: 'task_databaseAdapter_type',
333
+ label: 'Database Adapter',
334
+ required: function required(_ref18) {
335
+ var values = _ref18.values;
336
+ return values.get('task_feature');
337
+ },
338
+ type: 'select',
339
+ options: _helpers.VALIDATE_DB_ADAPTERS,
340
+ initialValue: (0, _immutable.getIn)(tenant, ['task', 'databaseAdapter', 'type'], (0, _immutable.get)(defaultSQLDatabaseAdapter, 'type', ''))
341
+ }, {
342
+ name: 'task_autoCreateDatabase',
343
+ label: 'Auto-Create Database',
344
+ type: 'checkbox',
345
+ visible: function visible(_ref19) {
346
+ var values = _ref19.values;
347
+ return (0, _immutable.getIn)(tenant, ['task', 'databaseAdapter', 'type']) !== 'postgres' && values.get('task_databaseAdapter_type') === 'postgres';
348
+ },
349
+ "transient": function transient(_ref20) {
350
+ var values = _ref20.values;
351
+ return values.get('task_databaseAdapter_type') !== 'postgres';
352
+ },
353
+ initialValue: !slug || (0, _immutable.getIn)(tenant, ['features', 'task']) === 'false'
354
+ }, {
355
+ name: 'task_authenticationSecret',
356
+ label: 'Authentication Secret',
357
+ type: 'password',
358
+ visible: function visible(_ref21) {
359
+ var values = _ref21.values;
360
+ return values.get('task_changeAuthenticationSecret');
361
+ },
362
+ "transient": function transient(_ref22) {
363
+ var values = _ref22.values;
364
+ return !values.get('task_changeAuthenticationSecret');
365
+ },
366
+ required: false
367
+ }, {
368
+ name: 'task_changeAuthenticationSecret',
369
+ label: 'Change Authentication Secret',
370
+ type: 'checkbox',
371
+ "transient": true,
372
+ initialValue: false,
373
+ onChange: function onChange(_ref23, _ref24) {
374
+ var values = _ref23.values;
375
+ var setValue = _ref24.setValue;
376
+ if (values.get('task_authenticationSecret') !== '') {
377
+ setValue('task_authenticationSecret', '');
378
+ }
379
+ }
380
+ }].concat((0, _toConsumableArray2["default"])((0, _helpers.MSSQL_FIELDS)('task_databaseAdapter_type', tenant, ['task', 'databaseAdapter'], defaultSQLDatabaseAdapter)), (0, _toConsumableArray2["default"])((0, _helpers.ORACLE_FIELDS)('task_databaseAdapter_type', tenant, ['task', 'databaseAdapter'], defaultSQLDatabaseAdapter)), (0, _toConsumableArray2["default"])((0, _helpers.POSTGRES_FIELDS)('task_databaseAdapter_type', tenant, ['task', 'databaseAdapter'], defaultSQLDatabaseAdapter))) : []), (0, _toConsumableArray2["default"])(!component || component === 'integrator' ? [
381
+ // Start - Integrator fields
382
+ {
383
+ name: 'integrator_replicas',
384
+ label: 'Replica Count',
385
+ type: 'number',
386
+ initialValue: (0, _immutable.getIn)(tenant, ['integrator', 'deployment', 'specReplicas'], 1),
387
+ constraint: function constraint(_ref25) {
388
+ var values = _ref25.values;
389
+ return !values.get('integrator_feature') || typeof values.get('integrator_replicas') === 'number' && values.get('integrator_replicas') >= 0;
390
+ },
391
+ constraintMessage: 'Replica count must be a positive integer or zero.'
392
+ }, {
393
+ name: 'integrator_image',
394
+ label: 'Integrator Image',
395
+ type: 'text',
396
+ visible: function visible(_ref26) {
397
+ var values = _ref26.values;
398
+ return !values.get('integrator_imageToggle');
399
+ },
400
+ initialValue: (0, _immutable.getIn)(tenant, ['integrator', 'deployment', 'image']),
401
+ helpText: 'Optionally set the version of Kinetic Integrator to use for this space. Leave blank to use the default version.'
402
+ }, {
403
+ name: 'integrator_imageToggle',
404
+ label: 'Use Default Integrator Image',
405
+ type: 'checkbox',
406
+ "transient": true,
407
+ visible: !slug || (0, _immutable.getIn)(tenant, ['features', 'integrator']) === 'false',
408
+ initialValue: !(0, _immutable.getIn)(tenant, ['integrator', 'deployment', 'image']),
409
+ onChange: function onChange(_ref27, _ref28) {
410
+ var values = _ref27.values;
411
+ var setValue = _ref28.setValue;
412
+ if (!!values.get('integrator_imageToggle')) {
413
+ setValue('integrator_image', '');
414
+ }
415
+ }
416
+ }, {
417
+ name: 'integrator_databaseAdapter_type',
418
+ label: 'Database Adapter',
419
+ required: function required(_ref29) {
420
+ var values = _ref29.values;
421
+ return values.get('integrator_feature');
422
+ },
423
+ type: 'select',
424
+ options: _helpers.VALIDATE_DB_ADAPTERS.filter(function (adapter) {
425
+ return adapter.value === 'postgres';
426
+ }),
427
+ initialValue: (0, _immutable.getIn)(tenant, ['integrator', 'databaseAdapter', 'type'], (0, _immutable.get)(defaultSQLDatabaseAdapter, 'type', ''))
428
+ }, {
429
+ name: 'integrator_autoCreateDatabase',
430
+ label: 'Auto-Create Database',
431
+ type: 'checkbox',
432
+ visible: function visible(_ref30) {
433
+ var values = _ref30.values;
434
+ return (0, _immutable.getIn)(tenant, ['integrator', 'databaseAdapter', 'type']) !== 'postgres' && values.get('integrator_databaseAdapter_type') === 'postgres';
435
+ },
436
+ "transient": function transient(_ref31) {
437
+ var values = _ref31.values;
438
+ return values.get('integrator_databaseAdapter_type') !== 'postgres';
439
+ },
440
+ initialValue: !slug || (0, _immutable.getIn)(tenant, ['features', 'integrator']) === 'false'
441
+ }].concat((0, _toConsumableArray2["default"])((0, _helpers.POSTGRES_FIELDS)('integrator_databaseAdapter_type', tenant, ['integrator', 'databaseAdapter'], defaultSQLDatabaseAdapter))) : []));
442
+ };
443
+ };
444
+ var SystemTenantMigrateForm = exports.SystemTenantMigrateForm = (0, _Form.generateForm)({
445
+ formOptions: ['slug', 'component'],
446
+ dataSources: dataSources,
447
+ fields: fields,
448
+ handleSubmit: handleSubmit
449
+ });
@@ -1,19 +1,23 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.SystemTenantTable = void 0;
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
7
9
  var _Table = require("../../table/Table");
8
10
  var _apis = require("../../../apis");
11
+ var _http = require("../../../apis/http");
9
12
  var _helpers = require("../../../helpers");
10
- var clientSide = (0, _helpers.defineFilter)(true).startsWith('slug', 'slug').startsWith('space.name', 'space.name').end();
13
+ var filterQuery = (0, _helpers.defineKqlQuery)().matches('name', 'name').matches('slug', 'slug').end();
11
14
  var dataSource = function dataSource() {
12
15
  return {
13
16
  fn: _apis.fetchTenants,
14
- clientSide: clientSide,
15
- params: function params() {
16
- return [];
17
+ params: function params(paramData) {
18
+ return [(0, _objectSpread2["default"])((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _http.generateSortParams)(paramData)), (0, _http.generatePaginationParams)(paramData)), {}, {
19
+ q: filterQuery(paramData.filters.toJS())
20
+ })];
17
21
  },
18
22
  transform: function transform(result) {
19
23
  return {
@@ -26,20 +30,27 @@ var dataSource = function dataSource() {
26
30
  var filters = function filters() {
27
31
  return function () {
28
32
  return [{
29
- name: 'slug',
30
- label: 'Slug',
33
+ name: 'name',
34
+ label: 'Name',
31
35
  type: 'text'
32
36
  }, {
33
- name: 'space.name',
34
- label: 'Name',
37
+ name: 'slug',
38
+ label: 'Slug',
35
39
  type: 'text'
36
40
  }];
37
41
  };
38
42
  };
39
43
  var columns = [{
44
+ value: 'name',
45
+ title: 'Name',
46
+ sortable: true,
47
+ valueTransform: function valueTransform(_value, row) {
48
+ return row.getIn(['space', 'name']);
49
+ }
50
+ }, {
40
51
  value: 'slug',
41
52
  title: 'Slug',
42
- sortable: false
53
+ sortable: true
43
54
  }, {
44
55
  value: 'task.deployment.namespace',
45
56
  title: 'Namespace',
@@ -54,13 +65,6 @@ var columns = [{
54
65
  valueTransform: function valueTransform(_value, row) {
55
66
  return row.getIn(['task', 'deployment', 'image']);
56
67
  }
57
- }, {
58
- value: 'space.name',
59
- title: 'Name',
60
- sortable: false,
61
- valueTransform: function valueTransform(_value, row) {
62
- return row.getIn(['space', 'name']);
63
- }
64
68
  }, {
65
69
  value: 'space.status',
66
70
  title: 'Status',
@@ -217,7 +217,7 @@ var generateInitialSortColumn = exports.generateInitialSortColumn = function gen
217
217
  var sortDirection = t.get('sortDirection');
218
218
  return t
219
219
  // When sorting changes, reset pagination.
220
- .set('pageOffset', 0)
220
+ .set('pageOffset', 0).set('currentPageToken', null).set('nextPageToken', null).set('pageTokens', (0, _immutable.List)())
221
221
  // Update the sort column / direction.
222
222
  .set('sortDirection', sortColumn === column ? sortDirection === 'asc' ? 'desc' : 'asc' : 'asc').set('sortColumn', column).set('error', null);
223
223
  });
@@ -9,18 +9,22 @@ var _helpers = require("./helpers");
9
9
  var dataSources = function dataSources(_ref) {
10
10
  var tasks = _ref.tasks,
11
11
  tree = _ref.tree,
12
- connector = _ref.connector;
12
+ connector = _ref.connector,
13
+ connections = _ref.connections;
13
14
  return {
14
15
  bindings: {
15
16
  fn: _helpers.buildBindings,
16
- params: [tree, tasks, tree.nodes.get(connector.headId)]
17
+ params: [{
18
+ tree: tree,
19
+ tasks: tasks,
20
+ node: tree.nodes.get(connector.headId),
21
+ connections: connections
22
+ }]
17
23
  }
18
24
  };
19
25
  };
20
26
  var fields = function fields(_ref2) {
21
- var connector = _ref2.connector,
22
- tasks = _ref2.tasks,
23
- tree = _ref2.tree;
27
+ var connector = _ref2.connector;
24
28
  return function (_ref3) {
25
29
  var bindings = _ref3.bindings;
26
30
  return bindings && [{
@@ -49,7 +53,7 @@ var fields = function fields(_ref2) {
49
53
  label: 'Condition',
50
54
  type: 'code',
51
55
  initialValue: connector.condition,
52
- language: 'ruby',
56
+ language: 'ruby-expression',
53
57
  options: bindings
54
58
  }, {
55
59
  name: 'from',
@@ -82,7 +86,7 @@ var handleSubmit = function handleSubmit(_ref4) {
82
86
  };
83
87
  };
84
88
  var ConnectorForm = exports.ConnectorForm = (0, _Form.generateForm)({
85
- formOptions: ['connector', 'tasks', 'tree'],
89
+ formOptions: ['connections', 'connector', 'tasks', 'tree'],
86
90
  dataSources: dataSources,
87
91
  fields: fields,
88
92
  handleSubmit: handleSubmit
@@ -148,22 +148,27 @@ var Node = exports.Node = /*#__PURE__*/function (_Component) {
148
148
  }, {
149
149
  key: "render",
150
150
  value: function render() {
151
+ var _node$parameters$find;
151
152
  var _this$props = this.props,
152
153
  node = _this$props.node,
153
154
  highlighted = _this$props.highlighted,
154
155
  primary = _this$props.primary,
155
156
  selected = _this$props.selected,
157
+ connections = _this$props.connections,
156
158
  tasks = _this$props.tasks;
157
159
  var defers = node.defers,
158
160
  definitionId = node.definitionId,
159
161
  id = node.id,
160
162
  name = node.name;
161
163
  var tempNode = typeof id !== 'number';
162
- var missing = !tempNode && !tasks.has(node.definitionId) && !node.definitionId.startsWith('system_tree_return_v') && !node.definitionId.startsWith('system_start_v');
164
+ var isRoutine = tasks.get(definitionId) && (0, _lodashEs.isArray)(tasks.get(definitionId).inputs);
165
+ var isIntegration = node.definitionId.startsWith("".concat(_constants.ADVANCED_HANDLER_NAME_INTEGRATION, "_v"));
166
+ var missing = !tempNode && !tasks.has(node.definitionId) && !node.definitionId.startsWith('system_tree_return_v') && !node.definitionId.startsWith('system_start_v') || isIntegration && !connections.get((_node$parameters$find = node.parameters.find(function (p) {
167
+ return p.id === 'connection';
168
+ })) === null || _node$parameters$find === void 0 ? void 0 : _node$parameters$find.value);
163
169
  var invalid = missing || !tempNode && !name || node.parameters.some(function (parameter) {
164
170
  return parameter.required && parameter.value === '';
165
171
  });
166
- var isRoutine = tasks.get(definitionId) && (0, _lodashEs.isArray)(tasks.get(definitionId).inputs);
167
172
  var type = (0, _helpers.getNodeType)(node);
168
173
  var height = type === 'join' || type === 'junction' ? constants.NODE_JOIN_JUNCTION_HEIGHT : type === 'start' ? constants.NODE_START_RADIUS * 2 : constants.NODE_HEIGHT;
169
174
  var width = type === 'start' ? constants.NODE_START_RADIUS * 2 : constants.NODE_WIDTH;
@@ -215,6 +220,10 @@ var Node = exports.Node = /*#__PURE__*/function (_Component) {
215
220
  d: constants.NODE_LEFT_BAR_PATH,
216
221
  className: "routine-bar",
217
222
  strokeWidth: constants.NODE_DECORATION_STROKE_WIDTH
223
+ }), isIntegration && /*#__PURE__*/_react["default"].createElement("path", {
224
+ d: constants.NODE_PLUG_BAR_PATH,
225
+ className: "integration-bar",
226
+ strokeWidth: constants.NODE_DECORATION_STROKE_WIDTH
218
227
  }), type === 'loop-head' && /*#__PURE__*/_react["default"].createElement("path", {
219
228
  d: constants.NODE_BOTTOM_BAR_PATH,
220
229
  className: "loop-bar",