@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.
- package/CHANGELOG.md +116 -86
- package/lib/apis/core/attributeDefinitions.js +9 -6
- package/lib/apis/core/integrations.js +61 -0
- package/lib/apis/core/submissions.js +52 -15
- package/lib/apis/http.js +16 -2
- package/lib/apis/index.js +24 -0
- package/lib/apis/integrator/index.js +262 -0
- package/lib/apis/system/index.js +64 -12
- package/lib/apis/task/index.js +9 -2
- package/lib/components/agent/filestore/FilestoreForm.js +1 -1
- package/lib/components/common/AttributeSelect.js +10 -2
- package/lib/components/common/BridgeSelect.js +2 -1
- package/lib/components/common/ConnectionSelect.js +72 -0
- package/lib/components/common/FormSelect.js +2 -1
- package/lib/components/common/StaticSelect.js +15 -6
- package/lib/components/common/TableInput.js +4 -1
- package/lib/components/common/TeamSelect.js +2 -1
- package/lib/components/common/ToastContainer.js +34 -10
- package/lib/components/common/Typeahead.js +59 -23
- package/lib/components/common/UserSelect.js +2 -1
- package/lib/components/common/authentication/RequestInterceptor.js +1 -1
- package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +3 -0
- package/lib/components/core/bridge_model/BridgeModelTable.js +19 -0
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeForm.js +6 -9
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeTable.js +0 -4
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationForm.js +7 -10
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationTable.js +2 -15
- package/lib/components/core/category/CategoryForm.js +4 -1
- package/lib/components/core/category/CategoryTable.js +2 -2
- package/lib/components/core/core_form/CoreForm.js +18 -10
- package/lib/components/core/file_resource/FileResourceForm.js +2 -1
- package/lib/components/core/file_resource/FileResourceTable.js +14 -7
- package/lib/components/core/form/FormForm.js +42 -19
- package/lib/components/core/form/FormTable.js +14 -14
- package/lib/components/core/form_type/FormTypeForm.js +3 -0
- package/lib/components/core/i18n/Moment.js +1 -0
- package/lib/components/core/integration/IntegrationForm.js +232 -0
- package/lib/components/core/integration/IntegrationTable.js +139 -0
- package/lib/components/core/kapp/KappForm.js +56 -67
- package/lib/components/core/kapp/KappTable.js +3 -3
- package/lib/components/core/log/LogTable.js +1 -1
- package/lib/components/core/security_definition/SecurityDefinitionForm.js +48 -10
- package/lib/components/core/space/SpaceForm.js +97 -111
- package/lib/components/core/submission/DatastoreSubmissionTable.js +4 -4
- package/lib/components/core/submission/FormSubmissionTable.js +12 -7
- package/lib/components/core/submission/KappSubmissionTable.js +4 -4
- package/lib/components/core/submission/SubmissionForm.js +3 -1
- package/lib/components/core/team/TeamTable.js +17 -7
- package/lib/components/core/user/UserTable.js +18 -18
- package/lib/components/core/webapi/WebApiForm.js +5 -2
- package/lib/components/core/webapi/WebApiTable.js +2 -2
- package/lib/components/core/webhook/WebhookForm.js +43 -33
- package/lib/components/core/webhook/WebhookTable.js +16 -16
- package/lib/components/core/webhook_job/WebhookJobTable.js +17 -6
- package/lib/components/form/Form.helpers.js +10 -4
- package/lib/components/form/Form.js +250 -168
- package/lib/components/form/Form.models.js +6 -1
- package/lib/components/form/FormState.js +9 -5
- package/lib/components/form/defaults/CodeField.js +44 -1
- package/lib/components/index.js +84 -3
- package/lib/components/integrator/connection/ConnectionForm.js +112 -0
- package/lib/components/integrator/connection/ConnectionTable.js +80 -0
- package/lib/components/integrator/connection/config_fields/http.js +570 -0
- package/lib/components/integrator/integrationTypes.js +98 -0
- package/lib/components/integrator/operation/OperationForm.js +128 -0
- package/lib/components/integrator/operation/OperationTable.js +64 -0
- package/lib/components/integrator/operation/config_fields/http.js +184 -0
- package/lib/components/system/SystemSecurityForm.js +1 -1
- package/lib/components/system/SystemTaskAdapterForm.js +9 -9
- package/lib/components/system/helpers.js +123 -100
- package/lib/components/system/spaces/SystemSpaceForm.js +9 -37
- package/lib/components/system/spaces/SystemTenantForm.js +276 -104
- package/lib/components/system/spaces/SystemTenantMigrateForm.js +449 -0
- package/lib/components/system/spaces/SystemTenantTable.js +20 -16
- package/lib/components/table/Table.redux.js +1 -1
- package/lib/components/task/builder/ConnectorForm.js +11 -7
- package/lib/components/task/builder/Node.js +11 -2
- package/lib/components/task/builder/NodeForm.js +93 -22
- package/lib/components/task/builder/NodeParametersForm.js +29 -17
- package/lib/components/task/builder/TaskDefinitionConfigForm.js +18 -50
- package/lib/components/task/builder/TreeBuilder.js +32 -5
- package/lib/components/task/builder/builder.redux.js +399 -205
- package/lib/components/task/builder/constants.js +10 -2
- package/lib/components/task/builder/helpers.js +199 -79
- package/lib/components/task/builder/models.js +11 -9
- package/lib/components/task/category/TaskCategoryTable.js +3 -3
- package/lib/components/task/common/UsageTable.js +1 -1
- package/lib/components/task/handlers/HandlerTable.js +35 -19
- package/lib/components/task/policy_rule/PolicyRuleTable.js +3 -3
- package/lib/components/task/runs/CreateManualTriggerForm.js +2 -0
- package/lib/components/task/runs/RunTable.js +4 -4
- package/lib/components/task/runs/RunTaskTable.js +1 -1
- package/lib/components/task/sources/SourceTable.js +2 -2
- package/lib/components/task/triggers/TriggerTable.js +2 -2
- package/lib/components/task/workflows/LinkedWorkflowTable.js +2 -2
- package/lib/components/task/workflows/WorkflowForm.js +29 -9
- package/lib/components/task/workflows/WorkflowTable.js +2 -2
- package/lib/helpers/index.js +289 -72
- package/package.json +5 -3
- package/proxyhelper.js +28 -3
|
@@ -8,7 +8,7 @@ exports.SystemTenantForm = void 0;
|
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
11
|
-
var
|
|
11
|
+
var _objectSpread4 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
12
12
|
var _immutable = require("immutable");
|
|
13
13
|
var _Form = require("../../form/Form");
|
|
14
14
|
var _apis = require("../../../apis");
|
|
@@ -29,8 +29,8 @@ var dataSources = function dataSources(_ref) {
|
|
|
29
29
|
return result.tenant;
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
|
|
33
|
-
fn: _apis.
|
|
32
|
+
defaultSQLDatabaseAdapter: {
|
|
33
|
+
fn: _apis.fetchSystemDefaultSQLDbAdapter,
|
|
34
34
|
params: [],
|
|
35
35
|
transform: function transform(result) {
|
|
36
36
|
return result.adapter;
|
|
@@ -49,58 +49,109 @@ var dataSources = function dataSources(_ref) {
|
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
51
|
var handleSubmit = function handleSubmit(_ref2) {
|
|
52
|
-
var slug = _ref2.slug
|
|
52
|
+
var slug = _ref2.slug,
|
|
53
|
+
component = _ref2.component;
|
|
53
54
|
return function (values, _ref3) {
|
|
54
55
|
var fileFields = _ref3.fileFields,
|
|
55
|
-
rawValues = _ref3.values
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
rawValues = _ref3.values,
|
|
57
|
+
originalTenant = _ref3.tenant;
|
|
58
|
+
var taskEnabled = !!values.get('task_feature');
|
|
59
|
+
var integratorEnabled = !!values.get('integrator_feature');
|
|
60
|
+
var task = {},
|
|
61
|
+
integrator = {};
|
|
62
|
+
if (taskEnabled && (!component || component === 'task')) {
|
|
63
|
+
var type = values.get('task_databaseAdapter_type');
|
|
64
|
+
var fileFieldsForType = fileFields.get(type);
|
|
65
|
+
// Only include values for file fields if the toggle field is true
|
|
66
|
+
var filterFn = function filterFn(value, key) {
|
|
67
|
+
return !fileFieldsForType.includes(key) || !!rawValues.get("task_".concat(type, "_change_").concat(key));
|
|
68
|
+
};
|
|
69
|
+
// Get adapter properties to save
|
|
70
|
+
var properties = (0, _helpers2.adapterProperties)(values, 'task', type, filterFn);
|
|
71
|
+
// If creating new, pass in file values from default adapter if not uploaded
|
|
72
|
+
if (!slug || originalTenant.getIn(['features', 'task']) === 'false') {
|
|
73
|
+
properties = fileFieldsForType.reduce(function (props, field) {
|
|
74
|
+
if (typeof props[field] === 'undefined' && !!rawValues.getIn(["task_".concat(type, "_current_").concat(field), 'pem'])) {
|
|
75
|
+
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"), {
|
|
76
|
+
type: 'text/plain'
|
|
77
|
+
})));
|
|
78
|
+
}
|
|
79
|
+
return props;
|
|
80
|
+
}, properties);
|
|
63
81
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
var authenticationSecret = values.get('task_authenticationSecret') ? {
|
|
83
|
+
authenticationSecret: values.get('task_authenticationSecret')
|
|
84
|
+
} : {};
|
|
85
|
+
task = {
|
|
86
|
+
task: (0, _objectSpread4["default"])((0, _objectSpread4["default"])({}, authenticationSecret), {}, {
|
|
87
|
+
deployment: {
|
|
88
|
+
image: values.get('task_image'),
|
|
89
|
+
replicas: parseInt(values.get('task_replicas'))
|
|
90
|
+
},
|
|
91
|
+
databaseAdapter: {
|
|
92
|
+
type: type,
|
|
93
|
+
properties: properties
|
|
94
|
+
},
|
|
95
|
+
autoCreateDatabase: (!!values.get('task_autoCreateDatabase')).toString()
|
|
96
|
+
})
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
if (integratorEnabled && (!component || component === 'integrator')) {
|
|
100
|
+
var _type = values.get('integrator_databaseAdapter_type');
|
|
101
|
+
var _fileFieldsForType = fileFields.get(_type);
|
|
102
|
+
// Only include values for file fields if the toggle field is true
|
|
103
|
+
var _filterFn = function _filterFn(value, key) {
|
|
104
|
+
return !_fileFieldsForType.includes(key) || !!rawValues.get("integrator_".concat(_type, "_change_").concat(key));
|
|
105
|
+
};
|
|
106
|
+
// Get adapter properties to save
|
|
107
|
+
var _properties = (0, _helpers2.adapterProperties)(values, 'integrator', _type, _filterFn);
|
|
108
|
+
// If creating new, pass in file values from default adapter if not uploaded
|
|
109
|
+
if (!slug || originalTenant.getIn(['features', 'integrator']) === 'false') {
|
|
110
|
+
_properties = _fileFieldsForType.reduce(function (props, field) {
|
|
111
|
+
if (typeof props[field] === 'undefined' && !!rawValues.getIn(["integrator_".concat(_type, "_current_").concat(field), 'pem'])) {
|
|
112
|
+
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"), {
|
|
113
|
+
type: 'text/plain'
|
|
114
|
+
})));
|
|
115
|
+
}
|
|
116
|
+
return props;
|
|
117
|
+
}, _properties);
|
|
118
|
+
}
|
|
119
|
+
integrator = {
|
|
120
|
+
integrator: {
|
|
121
|
+
deployment: {
|
|
122
|
+
image: values.get('integrator_image'),
|
|
123
|
+
replicas: parseInt(values.get('integrator_replicas'))
|
|
124
|
+
},
|
|
125
|
+
databaseAdapter: {
|
|
126
|
+
type: _type,
|
|
127
|
+
properties: _properties
|
|
128
|
+
},
|
|
129
|
+
autoCreateDatabase: (!!values.get('integrator_autoCreateDatabase')).toString()
|
|
80
130
|
}
|
|
81
|
-
|
|
82
|
-
}, properties);
|
|
131
|
+
};
|
|
83
132
|
}
|
|
84
|
-
var tenant = (0,
|
|
133
|
+
var tenant = (0, _objectSpread4["default"])((0, _objectSpread4["default"])((0, _objectSpread4["default"])({
|
|
85
134
|
space: {
|
|
86
135
|
slug: values.get('slug'),
|
|
87
136
|
name: values.get('name')
|
|
88
137
|
},
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
properties: properties
|
|
95
|
-
}
|
|
96
|
-
}),
|
|
138
|
+
features: {
|
|
139
|
+
task: taskEnabled.toString(),
|
|
140
|
+
integrator: integratorEnabled.toString()
|
|
141
|
+
}
|
|
142
|
+
}, task), integrator), {}, {
|
|
97
143
|
users: values.get('users')
|
|
98
144
|
});
|
|
99
|
-
var multipart = Object.entries(tenant.task.databaseAdapter.properties).some(function (_ref4) {
|
|
145
|
+
var multipart = taskEnabled && (!component || component === 'task') && Object.entries(tenant.task.databaseAdapter.properties).some(function (_ref4) {
|
|
100
146
|
var _ref5 = (0, _slicedToArray2["default"])(_ref4, 2),
|
|
101
147
|
name = _ref5[0],
|
|
102
148
|
value = _ref5[1];
|
|
103
149
|
return value instanceof File;
|
|
150
|
+
}) || integratorEnabled && (!component || component === 'integrator') && Object.entries(tenant.integrator.databaseAdapter.properties).some(function (_ref6) {
|
|
151
|
+
var _ref7 = (0, _slicedToArray2["default"])(_ref6, 2),
|
|
152
|
+
name = _ref7[0],
|
|
153
|
+
value = _ref7[1];
|
|
154
|
+
return value instanceof File;
|
|
104
155
|
});
|
|
105
156
|
return slug ? (0, _apis.updateTenant)({
|
|
106
157
|
slug: slug,
|
|
@@ -115,49 +166,22 @@ var handleSubmit = function handleSubmit(_ref2) {
|
|
|
115
166
|
var getSpaceValue = function getSpaceValue(tenant, key) {
|
|
116
167
|
return tenant ? (0, _immutable.getIn)(tenant, ['space', key], '') : '';
|
|
117
168
|
};
|
|
118
|
-
var fields = function fields(
|
|
119
|
-
var slug =
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
{
|
|
126
|
-
name: 'authenticationSecret',
|
|
127
|
-
label: 'Authentication Secret',
|
|
128
|
-
type: 'password',
|
|
129
|
-
visible: function visible(_ref8) {
|
|
130
|
-
var values = _ref8.values;
|
|
131
|
-
return values.get('changeAuthenticationSecret');
|
|
132
|
-
},
|
|
133
|
-
"transient": function transient(_ref9) {
|
|
134
|
-
var values = _ref9.values;
|
|
135
|
-
return !values.get('changeAuthenticationSecret');
|
|
136
|
-
},
|
|
137
|
-
required: false
|
|
138
|
-
}, {
|
|
139
|
-
name: 'changeAuthenticationSecret',
|
|
140
|
-
label: 'Change Authentication Secret',
|
|
141
|
-
type: 'checkbox',
|
|
142
|
-
"transient": true,
|
|
143
|
-
initialValue: false,
|
|
144
|
-
onChange: function onChange(_ref10, _ref11) {
|
|
145
|
-
var values = _ref10.values;
|
|
146
|
-
var setValue = _ref11.setValue;
|
|
147
|
-
if (values.get('authenticationSecret') !== '') {
|
|
148
|
-
setValue('authenticationSecret', '');
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
},
|
|
169
|
+
var fields = function fields(_ref8) {
|
|
170
|
+
var slug = _ref8.slug,
|
|
171
|
+
component = _ref8.component;
|
|
172
|
+
return function (_ref9) {
|
|
173
|
+
var tenant = _ref9.tenant,
|
|
174
|
+
defaultSQLDatabaseAdapter = _ref9.defaultSQLDatabaseAdapter;
|
|
175
|
+
return (tenant || !slug) && (defaultSQLDatabaseAdapter || defaultSQLDatabaseAdapter === null) && [
|
|
152
176
|
// Start - Space Fields
|
|
153
177
|
{
|
|
154
178
|
name: 'name',
|
|
155
179
|
label: 'Name',
|
|
156
180
|
type: 'text',
|
|
157
181
|
required: true,
|
|
158
|
-
onChange: function onChange(
|
|
159
|
-
var values =
|
|
160
|
-
var setValue =
|
|
182
|
+
onChange: function onChange(_ref10, _ref11) {
|
|
183
|
+
var values = _ref10.values;
|
|
184
|
+
var setValue = _ref11.setValue;
|
|
161
185
|
if (values.get('linked')) {
|
|
162
186
|
setValue('slug', (0, _helpers.slugify)(values.get('name')), false);
|
|
163
187
|
}
|
|
@@ -169,8 +193,8 @@ var fields = function fields(_ref6) {
|
|
|
169
193
|
type: 'text',
|
|
170
194
|
required: true,
|
|
171
195
|
enabled: !slug,
|
|
172
|
-
onChange: function onChange(_bindings,
|
|
173
|
-
var setValue =
|
|
196
|
+
onChange: function onChange(_bindings, _ref12) {
|
|
197
|
+
var setValue = _ref12.setValue;
|
|
174
198
|
setValue('linked', false);
|
|
175
199
|
},
|
|
176
200
|
initialValue: getSpaceValue(tenant, 'slug')
|
|
@@ -184,43 +208,191 @@ var fields = function fields(_ref6) {
|
|
|
184
208
|
},
|
|
185
209
|
// End - Space Fields
|
|
186
210
|
|
|
211
|
+
// Start - Feature Flags
|
|
212
|
+
{
|
|
213
|
+
name: 'task_feature',
|
|
214
|
+
label: 'Task Component',
|
|
215
|
+
type: 'checkbox',
|
|
216
|
+
initialValue: (0, _immutable.getIn)(tenant, ['features', 'task']) === 'true' || !slug,
|
|
217
|
+
onChange: function onChange(_ref13, _ref14) {
|
|
218
|
+
var values = _ref13.values;
|
|
219
|
+
var setValue = _ref14.setValue;
|
|
220
|
+
// When you toggle the feature, set or clear the adapter type value so
|
|
221
|
+
// that the downstream adapter fields can be automatically hidden
|
|
222
|
+
if (!!values.get('task_feature')) {
|
|
223
|
+
setValue('task_databaseAdapter_type', (0, _immutable.getIn)(tenant, ['task', 'databaseAdapter', 'type'], (0, _immutable.get)(defaultSQLDatabaseAdapter, 'type', '')));
|
|
224
|
+
} else {
|
|
225
|
+
setValue('task_databaseAdapter_type', '');
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}, {
|
|
229
|
+
name: 'integrator_feature',
|
|
230
|
+
label: 'Integrator Component',
|
|
231
|
+
type: 'checkbox',
|
|
232
|
+
initialValue: (0, _immutable.getIn)(tenant, ['features', 'integrator']) === 'true' || !slug,
|
|
233
|
+
onChange: function onChange(_ref15, _ref16) {
|
|
234
|
+
var values = _ref15.values;
|
|
235
|
+
var setValue = _ref16.setValue;
|
|
236
|
+
// When you toggle the feature, set or clear the adapter type value so
|
|
237
|
+
// that the downstream adapter fields can be automatically hidden
|
|
238
|
+
if (!!values.get('task_feature')) {
|
|
239
|
+
setValue('integrator_databaseAdapter_type', (0, _immutable.getIn)(tenant, ['integrator', 'databaseAdapter', 'type'], (0, _immutable.get)(defaultSQLDatabaseAdapter, 'type', '')));
|
|
240
|
+
} else {
|
|
241
|
+
setValue('task_databaseAdapter_type', '');
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}].concat((0, _toConsumableArray2["default"])(!component || component === 'task' ? [
|
|
187
245
|
// Start - Task fields
|
|
188
246
|
{
|
|
189
|
-
name: '
|
|
190
|
-
label: '
|
|
191
|
-
type: '
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
247
|
+
name: 'task_replicas',
|
|
248
|
+
label: 'Replica Count',
|
|
249
|
+
type: 'number',
|
|
250
|
+
initialValue: (0, _immutable.getIn)(tenant, ['task', 'deployment', 'specReplicas'], 1),
|
|
251
|
+
constraint: function constraint(_ref17) {
|
|
252
|
+
var values = _ref17.values;
|
|
253
|
+
return !values.get('task_feature') || typeof values.get('task_replicas') === 'number' && values.get('task_replicas') >= 0;
|
|
254
|
+
},
|
|
255
|
+
constraintMessage: 'Replica count must be a positive integer or zero.'
|
|
197
256
|
}, {
|
|
198
|
-
name: '
|
|
257
|
+
name: 'task_image',
|
|
199
258
|
label: 'Task Image',
|
|
200
259
|
type: 'text',
|
|
201
|
-
required: !!slug,
|
|
202
260
|
initialValue: (0, _immutable.getIn)(tenant, ['task', 'deployment', 'image'])
|
|
261
|
+
}, {
|
|
262
|
+
name: 'task_image',
|
|
263
|
+
label: 'Task Image',
|
|
264
|
+
type: 'text',
|
|
265
|
+
visible: function visible(_ref18) {
|
|
266
|
+
var values = _ref18.values;
|
|
267
|
+
return !values.get('task_imageToggle');
|
|
268
|
+
},
|
|
269
|
+
initialValue: (0, _immutable.getIn)(tenant, ['task', 'deployment', 'image']),
|
|
270
|
+
helpText: 'Optionally set the version of Kinetic Task to use for this space. Leave blank to use the default version.'
|
|
271
|
+
}, {
|
|
272
|
+
name: 'task_imageToggle',
|
|
273
|
+
label: 'Use Default Task Image',
|
|
274
|
+
type: 'checkbox',
|
|
275
|
+
"transient": true,
|
|
276
|
+
visible: !slug || (0, _immutable.getIn)(tenant, ['features', 'task']) === 'false',
|
|
277
|
+
initialValue: !(0, _immutable.getIn)(tenant, ['task', 'deployment', 'image']),
|
|
278
|
+
onChange: function onChange(_ref19, _ref20) {
|
|
279
|
+
var values = _ref19.values;
|
|
280
|
+
var setValue = _ref20.setValue;
|
|
281
|
+
if (!!values.get('task_imageToggle')) {
|
|
282
|
+
setValue('task_image', '');
|
|
283
|
+
}
|
|
284
|
+
}
|
|
203
285
|
}, {
|
|
204
286
|
name: 'task_databaseAdapter_type',
|
|
205
|
-
label: '
|
|
206
|
-
required:
|
|
287
|
+
label: 'Database Adapter',
|
|
288
|
+
required: function required(_ref21) {
|
|
289
|
+
var values = _ref21.values;
|
|
290
|
+
return values.get('task_feature');
|
|
291
|
+
},
|
|
207
292
|
type: 'select',
|
|
208
293
|
options: _helpers2.VALIDATE_DB_ADAPTERS,
|
|
209
|
-
initialValue: (0, _immutable.getIn)(tenant, ['task', 'databaseAdapter', 'type'], (0, _immutable.get)(
|
|
294
|
+
initialValue: (0, _immutable.getIn)(tenant, ['task', 'databaseAdapter', 'type'], (0, _immutable.get)(defaultSQLDatabaseAdapter, 'type', ''))
|
|
210
295
|
}, {
|
|
211
296
|
name: 'task_autoCreateDatabase',
|
|
212
297
|
label: 'Auto-Create Database',
|
|
213
298
|
type: 'checkbox',
|
|
214
|
-
visible: function visible(
|
|
215
|
-
var values =
|
|
216
|
-
return values.get('task_databaseAdapter_type') === 'postgres';
|
|
299
|
+
visible: function visible(_ref22) {
|
|
300
|
+
var values = _ref22.values;
|
|
301
|
+
return (0, _immutable.getIn)(tenant, ['task', 'databaseAdapter', 'type']) !== 'postgres' && values.get('task_databaseAdapter_type') === 'postgres';
|
|
217
302
|
},
|
|
218
|
-
"transient": function transient(
|
|
219
|
-
var values =
|
|
303
|
+
"transient": function transient(_ref23) {
|
|
304
|
+
var values = _ref23.values;
|
|
220
305
|
return values.get('task_databaseAdapter_type') !== 'postgres';
|
|
221
306
|
},
|
|
222
|
-
initialValue: slug
|
|
223
|
-
}
|
|
307
|
+
initialValue: !slug || (0, _immutable.getIn)(tenant, ['features', 'task']) === 'false'
|
|
308
|
+
}, {
|
|
309
|
+
name: 'task_authenticationSecret',
|
|
310
|
+
label: 'Authentication Secret',
|
|
311
|
+
type: 'password',
|
|
312
|
+
visible: function visible(_ref24) {
|
|
313
|
+
var values = _ref24.values;
|
|
314
|
+
return values.get('task_changeAuthenticationSecret');
|
|
315
|
+
},
|
|
316
|
+
"transient": function transient(_ref25) {
|
|
317
|
+
var values = _ref25.values;
|
|
318
|
+
return !values.get('task_changeAuthenticationSecret');
|
|
319
|
+
},
|
|
320
|
+
required: false
|
|
321
|
+
}, {
|
|
322
|
+
name: 'task_changeAuthenticationSecret',
|
|
323
|
+
label: 'Change Authentication Secret',
|
|
324
|
+
type: 'checkbox',
|
|
325
|
+
"transient": true,
|
|
326
|
+
initialValue: false,
|
|
327
|
+
onChange: function onChange(_ref26, _ref27) {
|
|
328
|
+
var values = _ref26.values;
|
|
329
|
+
var setValue = _ref27.setValue;
|
|
330
|
+
if (values.get('task_authenticationSecret') !== '') {
|
|
331
|
+
setValue('task_authenticationSecret', '');
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}].concat((0, _toConsumableArray2["default"])((0, _helpers2.MSSQL_FIELDS)('task_databaseAdapter_type', tenant, ['task', 'databaseAdapter'], defaultSQLDatabaseAdapter)), (0, _toConsumableArray2["default"])((0, _helpers2.ORACLE_FIELDS)('task_databaseAdapter_type', tenant, ['task', 'databaseAdapter'], defaultSQLDatabaseAdapter)), (0, _toConsumableArray2["default"])((0, _helpers2.POSTGRES_FIELDS)('task_databaseAdapter_type', tenant, ['task', 'databaseAdapter'], defaultSQLDatabaseAdapter))) : []), (0, _toConsumableArray2["default"])(!component || component === 'integrator' ? [
|
|
335
|
+
// Start - Integrator fields
|
|
336
|
+
{
|
|
337
|
+
name: 'integrator_replicas',
|
|
338
|
+
label: 'Replica Count',
|
|
339
|
+
type: 'number',
|
|
340
|
+
initialValue: (0, _immutable.getIn)(tenant, ['integrator', 'deployment', 'specReplicas'], 1),
|
|
341
|
+
constraint: function constraint(_ref28) {
|
|
342
|
+
var values = _ref28.values;
|
|
343
|
+
return !values.get('integrator_feature') || typeof values.get('integrator_replicas') === 'number' && values.get('integrator_replicas') >= 0;
|
|
344
|
+
},
|
|
345
|
+
constraintMessage: 'Replica count must be a positive integer or zero.'
|
|
346
|
+
}, {
|
|
347
|
+
name: 'integrator_image',
|
|
348
|
+
label: 'Integrator Image',
|
|
349
|
+
type: 'text',
|
|
350
|
+
visible: function visible(_ref29) {
|
|
351
|
+
var values = _ref29.values;
|
|
352
|
+
return !values.get('integrator_imageToggle');
|
|
353
|
+
},
|
|
354
|
+
initialValue: (0, _immutable.getIn)(tenant, ['integrator', 'deployment', 'image']),
|
|
355
|
+
helpText: 'Optionally set the version of Kinetic Integrator to use for this space. Leave blank to use the default version.'
|
|
356
|
+
}, {
|
|
357
|
+
name: 'integrator_imageToggle',
|
|
358
|
+
label: 'Use Default Integrator Image',
|
|
359
|
+
type: 'checkbox',
|
|
360
|
+
"transient": true,
|
|
361
|
+
visible: !slug || (0, _immutable.getIn)(tenant, ['features', 'integrator']) === 'false',
|
|
362
|
+
initialValue: !(0, _immutable.getIn)(tenant, ['integrator', 'deployment', 'image']),
|
|
363
|
+
onChange: function onChange(_ref30, _ref31) {
|
|
364
|
+
var values = _ref30.values;
|
|
365
|
+
var setValue = _ref31.setValue;
|
|
366
|
+
if (!!values.get('integrator_imageToggle')) {
|
|
367
|
+
setValue('integrator_image', '');
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}, {
|
|
371
|
+
name: 'integrator_databaseAdapter_type',
|
|
372
|
+
label: 'Database Adapter',
|
|
373
|
+
required: function required(_ref32) {
|
|
374
|
+
var values = _ref32.values;
|
|
375
|
+
return values.get('integrator_feature');
|
|
376
|
+
},
|
|
377
|
+
type: 'select',
|
|
378
|
+
options: _helpers2.VALIDATE_DB_ADAPTERS.filter(function (adapter) {
|
|
379
|
+
return adapter.value === 'postgres';
|
|
380
|
+
}),
|
|
381
|
+
initialValue: (0, _immutable.getIn)(tenant, ['integrator', 'databaseAdapter', 'type'], (0, _immutable.get)(defaultSQLDatabaseAdapter, 'type', ''))
|
|
382
|
+
}, {
|
|
383
|
+
name: 'integrator_autoCreateDatabase',
|
|
384
|
+
label: 'Auto-Create Database',
|
|
385
|
+
type: 'checkbox',
|
|
386
|
+
visible: function visible(_ref33) {
|
|
387
|
+
var values = _ref33.values;
|
|
388
|
+
return (0, _immutable.getIn)(tenant, ['integrator', 'databaseAdapter', 'type']) !== 'postgres' && values.get('integrator_databaseAdapter_type') === 'postgres';
|
|
389
|
+
},
|
|
390
|
+
"transient": function transient(_ref34) {
|
|
391
|
+
var values = _ref34.values;
|
|
392
|
+
return values.get('integrator_databaseAdapter_type') !== 'postgres';
|
|
393
|
+
},
|
|
394
|
+
initialValue: !slug || (0, _immutable.getIn)(tenant, ['features', 'integrator']) === 'false'
|
|
395
|
+
}].concat((0, _toConsumableArray2["default"])((0, _helpers2.POSTGRES_FIELDS)('integrator_databaseAdapter_type', tenant, ['integrator', 'databaseAdapter'], defaultSQLDatabaseAdapter))) : []), (0, _toConsumableArray2["default"])(slug ? [] : [{
|
|
224
396
|
name: 'username',
|
|
225
397
|
label: 'Username',
|
|
226
398
|
type: 'text',
|
|
@@ -263,8 +435,8 @@ var fields = function fields(_ref6) {
|
|
|
263
435
|
required: true,
|
|
264
436
|
enabled: true,
|
|
265
437
|
visible: true,
|
|
266
|
-
constraint: function constraint(
|
|
267
|
-
var values =
|
|
438
|
+
constraint: function constraint(_ref35) {
|
|
439
|
+
var values = _ref35.values;
|
|
268
440
|
return values.get('passwordConfirmation') === values.get('password');
|
|
269
441
|
},
|
|
270
442
|
constraintMessage: 'Password Confirmation does not match'
|
|
@@ -274,8 +446,8 @@ var fields = function fields(_ref6) {
|
|
|
274
446
|
type: null,
|
|
275
447
|
visible: false,
|
|
276
448
|
required: false,
|
|
277
|
-
serialize: function serialize(
|
|
278
|
-
var values =
|
|
449
|
+
serialize: function serialize(_ref36) {
|
|
450
|
+
var values = _ref36.values;
|
|
279
451
|
return [{
|
|
280
452
|
username: values.get('username'),
|
|
281
453
|
password: values.get('password'),
|
|
@@ -287,7 +459,7 @@ var fields = function fields(_ref6) {
|
|
|
287
459
|
};
|
|
288
460
|
};
|
|
289
461
|
var SystemTenantForm = exports.SystemTenantForm = (0, _Form.generateForm)({
|
|
290
|
-
formOptions: ['slug'],
|
|
462
|
+
formOptions: ['slug', 'component'],
|
|
291
463
|
dataSources: dataSources,
|
|
292
464
|
fields: fields,
|
|
293
465
|
handleSubmit: handleSubmit
|