@kineticdata/react 6.0.5 → 6.1.1
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/README.md +110 -110
- package/assets/task/icons/defer.svg +12 -12
- package/assets/task/icons/drag-handle.svg +3 -3
- package/assets/task/icons/filter.svg +11 -11
- package/assets/task/icons/loop.svg +10 -10
- package/assets/task/icons/plus_small.svg +5 -5
- package/assets/task/icons/routine.svg +9 -9
- package/assets/task/icons/scale-minus.svg +11 -11
- package/assets/task/icons/scale-plus.svg +13 -13
- package/assets/task/icons/start.svg +11 -11
- package/assets/task/icons/stop.svg +8 -8
- package/lib/apis/core/activity.js +4 -4
- package/lib/apis/core/attributeDefinitions.js +64 -6
- package/lib/apis/core/attributeDefinitions.test.js +7 -4
- package/lib/apis/core/authentication.js +12 -1
- package/lib/apis/core/bridgeModels.test.js +46 -23
- package/lib/apis/core/bridgedresources.js +41 -41
- package/lib/apis/core/fileResources.js +2 -6
- package/lib/apis/core/forms.js +51 -2
- package/lib/apis/core/forms.test.js +32 -19
- package/lib/apis/core/integrations.js +61 -0
- package/lib/apis/core/kapps.js +49 -0
- package/lib/apis/core/kapps.test.js +16 -10
- package/lib/apis/core/notices.js +7 -0
- package/lib/apis/core/securityPolicyDefinitions.test.js +7 -4
- package/lib/apis/core/space.js +18 -0
- package/lib/apis/core/space.test.js +16 -10
- package/lib/apis/core/submissionActivities.js +38 -0
- package/lib/apis/core/submissions.js +114 -15
- package/lib/apis/core/translations.test.js +126 -55
- package/lib/apis/core/userPreferences.js +59 -0
- package/lib/apis/core/webApis.js +32 -2
- package/lib/apis/core/webhooks.test.js +7 -4
- package/lib/apis/http.js +30 -5
- package/lib/apis/index.js +48 -0
- package/lib/apis/integrator/index.js +337 -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 +11 -2
- package/lib/components/common/BridgeSelect.js +3 -1
- package/lib/components/common/ConnectionSelect.js +73 -0
- package/lib/components/common/FormSelect.js +3 -1
- package/lib/components/common/NodeSelect.js +1 -0
- package/lib/components/common/StaticSelect.js +16 -6
- package/lib/components/common/TableInput.js +4 -1
- package/lib/components/common/TeamSelect.js +3 -1
- package/lib/components/common/ToastContainer.js +34 -10
- package/lib/components/common/Typeahead.js +62 -23
- package/lib/components/common/UserSelect.js +3 -1
- package/lib/components/common/authentication/AuthenticationContainer.js +121 -55
- package/lib/components/common/authentication/RequestInterceptor.js +1 -1
- package/lib/components/common/preferences/PreferencesProvider.js +461 -0
- package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +10 -7
- 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/field_definition/FieldDefinitionForm.js +3 -3
- 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 +13 -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 +142 -0
- package/lib/components/core/kapp/KappForm.js +18 -5
- 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 +17 -36
- 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/SubmissionActivityForm.js +79 -0
- package/lib/components/core/submission/SubmissionForm.js +15 -3
- package/lib/components/core/team/TeamTable.js +17 -7
- package/lib/components/core/translation/EntryTable.js +8 -7
- package/lib/components/core/user/UserForm.js +2 -0
- package/lib/components/core/user/UserTable.js +22 -22
- 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 +264 -171
- package/lib/components/form/Form.models.js +6 -1
- package/lib/components/form/FormState.js +9 -5
- package/lib/components/form/SimpleForm.js +2 -2
- package/lib/components/form/defaults/CodeField.js +44 -1
- package/lib/components/index.js +152 -3
- package/lib/components/integrator/connection/ConnectionForm.js +156 -0
- package/lib/components/integrator/connection/ConnectionTable.js +82 -0
- package/lib/components/integrator/connection/config_fields/http.js +570 -0
- package/lib/components/integrator/connection/config_fields/sql.js +123 -0
- package/lib/components/integrator/integrationTypes.js +120 -0
- package/lib/components/integrator/operation/OperationForm.js +148 -0
- package/lib/components/integrator/operation/OperationTable.js +62 -0
- package/lib/components/integrator/operation/config_fields/http.js +185 -0
- package/lib/components/integrator/operation/config_fields/sql.js +81 -0
- package/lib/components/system/SystemSecurityForm.js +1 -1
- package/lib/components/system/SystemTaskAdapterForm.js +9 -9
- package/lib/components/system/SystemUserForm.js +2 -0
- 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.js +75 -15
- package/lib/components/table/Table.redux.js +297 -73
- package/lib/components/table/defaults/FilterControl.js +24 -0
- package/lib/components/table/defaults/index.js +2 -0
- package/lib/components/table/tests/Table.test.js +22 -22
- package/lib/components/table/tests/components.js +9 -2
- package/lib/components/task/builder/Connector.js +51 -41
- package/lib/components/task/builder/ConnectorForm.js +11 -7
- package/lib/components/task/builder/Node.js +31 -35
- package/lib/components/task/builder/NodeForm.js +93 -22
- package/lib/components/task/builder/NodeParametersForm.js +29 -17
- package/lib/components/task/builder/SvgCanvas.js +3 -17
- package/lib/components/task/builder/TaskDefinitionConfigForm.js +18 -50
- package/lib/components/task/builder/TreeBuilder.js +23 -3
- package/lib/components/task/builder/builder.redux.js +342 -197
- package/lib/components/task/builder/constants.js +10 -2
- package/lib/components/task/builder/helpers.js +231 -81
- package/lib/components/task/builder/models.js +7 -6
- package/lib/components/task/category/TaskCategoryTable.js +3 -3
- package/lib/components/task/common/UsageTable.js +9 -2
- package/lib/components/task/handlers/HandlerTable.js +44 -37
- 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 +10 -14
- 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 +16 -11
- package/lib/components/task/workflows/WorkflowForm.js +27 -8
- package/lib/components/task/workflows/WorkflowTable.js +27 -26
- package/lib/helpers/index.js +307 -74
- package/lib/index.js +2 -1
- package/lib/saga.js +4 -4
- package/lib/store.js +2 -1
- package/package.json +7 -6
- package/proxyhelper.js +201 -176
- package/CHANGELOG.md +0 -94
|
@@ -25,16 +25,19 @@ var FormState = exports.FormState = (0, _immutable.Record)({
|
|
|
25
25
|
});
|
|
26
26
|
var DATA_SOURCE_STATUS = exports.DATA_SOURCE_STATUS = {
|
|
27
27
|
PENDING: 'PENDING',
|
|
28
|
+
PENDING_RELOAD: 'PENDING_RELOAD',
|
|
28
29
|
RESOLVED: 'RESOLVED',
|
|
29
30
|
REJECTED: 'REJECTED'
|
|
30
31
|
};
|
|
31
32
|
var DataSource = exports.DataSource = (0, _immutable.Record)({
|
|
32
33
|
data: null,
|
|
34
|
+
error: null,
|
|
33
35
|
fn: null,
|
|
34
36
|
params: null,
|
|
35
37
|
paramsFn: null,
|
|
36
38
|
status: DATA_SOURCE_STATUS.PENDING,
|
|
37
|
-
transform: null
|
|
39
|
+
transform: null,
|
|
40
|
+
errorTransform: null
|
|
38
41
|
});
|
|
39
42
|
var FIELD_DEFAULT_VALUES = exports.FIELD_DEFAULT_VALUES = (0, _immutable.Map)({
|
|
40
43
|
attributes: (0, _immutable.Map)(),
|
|
@@ -45,6 +48,7 @@ var FIELD_DEFAULT_VALUES = exports.FIELD_DEFAULT_VALUES = (0, _immutable.Map)({
|
|
|
45
48
|
form: null,
|
|
46
49
|
'form-multi': (0, _immutable.List)(),
|
|
47
50
|
map: (0, _immutable.OrderedMap)(),
|
|
51
|
+
nullable: null,
|
|
48
52
|
'select-multi': (0, _immutable.List)(),
|
|
49
53
|
team: null,
|
|
50
54
|
'team-multi': (0, _immutable.List)(),
|
|
@@ -54,6 +58,7 @@ var FIELD_DEFAULT_VALUES = exports.FIELD_DEFAULT_VALUES = (0, _immutable.Map)({
|
|
|
54
58
|
'user-multi': (0, _immutable.List)()
|
|
55
59
|
});
|
|
56
60
|
var Field = exports.Field = (0, _immutable.Record)({
|
|
61
|
+
bindings: {},
|
|
57
62
|
constraint: null,
|
|
58
63
|
constraintMessage: 'Invalid',
|
|
59
64
|
dirty: false,
|
|
@@ -8,18 +8,22 @@ var _store = require("../../store");
|
|
|
8
8
|
var selectFormState = function selectFormState(formState) {
|
|
9
9
|
var _formState$fields;
|
|
10
10
|
return {
|
|
11
|
-
dirty: (_formState$fields = formState.fields) === null || _formState$fields === void 0 ? void 0 : _formState$fields.some(function (field) {
|
|
11
|
+
dirty: formState === null || formState === void 0 ? void 0 : (_formState$fields = formState.fields) === null || _formState$fields === void 0 ? void 0 : _formState$fields.some(function (field) {
|
|
12
12
|
return field.dirty;
|
|
13
13
|
}),
|
|
14
|
-
error: formState.error
|
|
14
|
+
error: formState === null || formState === void 0 ? void 0 : formState.error
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
var mapStateToProps = function mapStateToProps(state, props) {
|
|
18
18
|
return {
|
|
19
|
-
formState: state.getIn(['forms', props.formKey]
|
|
19
|
+
formState: state.getIn(['forms', props.formKey])
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
var FormStateComopnent = function FormStateComopnent(props) {
|
|
23
|
-
return props.
|
|
23
|
+
return props.children((props.selector || selectFormState)(props.formState));
|
|
24
24
|
};
|
|
25
|
-
var FormState = exports.FormState = (0, _store.connect)(mapStateToProps)(FormStateComopnent);
|
|
25
|
+
var FormState = exports.FormState = (0, _store.connect)(mapStateToProps)(FormStateComopnent);
|
|
26
|
+
FormState.get = function (formKey) {
|
|
27
|
+
var _store$getState;
|
|
28
|
+
return selectFormState((_store$getState = _store.store.getState()) === null || _store$getState === void 0 ? void 0 : _store$getState.getIn(['forms', formKey]));
|
|
29
|
+
};
|
|
@@ -273,8 +273,8 @@ var resetSimpleForm = exports.resetSimpleForm = function resetSimpleForm(formKey
|
|
|
273
273
|
// to do this because we need to use the form key in the mapStateToProps of the
|
|
274
274
|
// wrapped component.
|
|
275
275
|
|
|
276
|
-
/**
|
|
277
|
-
* @component
|
|
276
|
+
/**
|
|
277
|
+
* @component
|
|
278
278
|
*/
|
|
279
279
|
var SimpleForm = exports.SimpleForm = /*#__PURE__*/function (_Component) {
|
|
280
280
|
(0, _inherits2["default"])(SimpleForm, _Component);
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.CodeField = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _CodeInput = require("../../common/code_input/CodeInput");
|
|
10
|
+
var _immutable = require("immutable");
|
|
10
11
|
var CodeField = exports.CodeField = function CodeField(props) {
|
|
11
12
|
return props.visible && /*#__PURE__*/_react["default"].createElement("div", {
|
|
12
13
|
className: "field"
|
|
@@ -15,10 +16,52 @@ var CodeField = exports.CodeField = function CodeField(props) {
|
|
|
15
16
|
}, props.label), /*#__PURE__*/_react["default"].createElement(_CodeInput.CodeInput, {
|
|
16
17
|
id: props.id || props.name,
|
|
17
18
|
language: props.language,
|
|
18
|
-
bindings: props.options,
|
|
19
|
+
bindings: prepareOptions(props.options),
|
|
19
20
|
value: props.value,
|
|
20
21
|
onBlur: props.onBlur,
|
|
21
22
|
onChange: props.onChange,
|
|
22
23
|
onFocus: props.onFocus
|
|
24
|
+
}, function (_ref) {
|
|
25
|
+
var editor = _ref.editor,
|
|
26
|
+
wrapperProps = _ref.wrapperProps;
|
|
27
|
+
return /*#__PURE__*/_react["default"].createElement("div", Object.assign({}, wrapperProps, {
|
|
28
|
+
className: "code-input"
|
|
29
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
30
|
+
className: "content"
|
|
31
|
+
}, editor));
|
|
23
32
|
}));
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// We deprecated the use of CodeInput in the consoles, but are keeping the
|
|
36
|
+
// component in RKL since it might be used outside the consoles. We'll also
|
|
37
|
+
// continue using it for this default CodeField in RKL, so we want to massage
|
|
38
|
+
// the new CodeEditor options into a format that will work here.
|
|
39
|
+
var prepareOptions = function prepareOptions(options) {
|
|
40
|
+
return _immutable.Map.isMap(options) ? options : options.flatMap(function (opt) {
|
|
41
|
+
return !opt.get('siblings') || opt.get('siblings').isEmpty() ? (0, _immutable.List)([opt]) : opt.get('siblings').map(function (sib) {
|
|
42
|
+
return opt.update('label', function (label) {
|
|
43
|
+
return "".concat(label, ":").concat(sib.get('label'));
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
}).flatMap(function (opt) {
|
|
47
|
+
return !opt.get('type') || opt.get('type') === 'constant' || !opt.get('children') || opt.get('children').isEmpty() ? (0, _immutable.List)([opt]) : opt.get('children').flatMap(function (child) {
|
|
48
|
+
return !(0, _immutable.fromJS)(child).get('siblings') || (0, _immutable.fromJS)(child).get('siblings').isEmpty() ? (0, _immutable.List)([child]) : (0, _immutable.fromJS)(child).get('siblings').map(function (sib) {
|
|
49
|
+
return child.update('label', function (label) {
|
|
50
|
+
return "".concat(label, ":").concat(sib.get('label'));
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}).map(function (child) {
|
|
54
|
+
return (0, _immutable.fromJS)(child).update('label', function (label) {
|
|
55
|
+
return opt.get('type') === 'function' ? "".concat(opt.get('label'), "('").concat(label, "')") : opt.get('type') === 'object' ? "".concat(opt.get('label'), "['").concat(label, "']") : opt.get('type') === 'dot-object' ? "".concat(opt.get('label'), ".").concat(label) : opt.get('label');
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}).sortBy(function (opt) {
|
|
59
|
+
return opt.get('label');
|
|
60
|
+
}).toOrderedMap().mapKeys(function (_, opt) {
|
|
61
|
+
return opt.get('label');
|
|
62
|
+
}).map(function (opt) {
|
|
63
|
+
return (0, _immutable.Map)({
|
|
64
|
+
value: "".concat(opt.get('label')).concat(opt.get('type') === 'function' ? "('')" : opt.get('type') === 'object' ? "['']" : '')
|
|
65
|
+
});
|
|
66
|
+
});
|
|
24
67
|
};
|
package/lib/components/index.js
CHANGED
|
@@ -117,6 +117,24 @@ Object.defineProperty(exports, "CodeInput", {
|
|
|
117
117
|
return _CodeInput.CodeInput;
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
|
+
Object.defineProperty(exports, "ConnectionForm", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function get() {
|
|
123
|
+
return _ConnectionForm.ConnectionForm;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
Object.defineProperty(exports, "ConnectionSelect", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function get() {
|
|
129
|
+
return _ConnectionSelect.ConnectionSelect;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
Object.defineProperty(exports, "ConnectionTable", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function get() {
|
|
135
|
+
return _ConnectionTable.ConnectionTable;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
120
138
|
Object.defineProperty(exports, "ConnectorForm", {
|
|
121
139
|
enumerable: true,
|
|
122
140
|
get: function get() {
|
|
@@ -291,6 +309,18 @@ Object.defineProperty(exports, "IndexJobTable", {
|
|
|
291
309
|
return _IndexJobTable.IndexJobTable;
|
|
292
310
|
}
|
|
293
311
|
});
|
|
312
|
+
Object.defineProperty(exports, "IntegrationForm", {
|
|
313
|
+
enumerable: true,
|
|
314
|
+
get: function get() {
|
|
315
|
+
return _IntegrationForm.IntegrationForm;
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
Object.defineProperty(exports, "IntegrationTable", {
|
|
319
|
+
enumerable: true,
|
|
320
|
+
get: function get() {
|
|
321
|
+
return _IntegrationTable.IntegrationTable;
|
|
322
|
+
}
|
|
323
|
+
});
|
|
294
324
|
Object.defineProperty(exports, "KappForm", {
|
|
295
325
|
enumerable: true,
|
|
296
326
|
get: function get() {
|
|
@@ -387,6 +417,18 @@ Object.defineProperty(exports, "OAuthClientTable", {
|
|
|
387
417
|
return _OAuthClientTable.OAuthClientTable;
|
|
388
418
|
}
|
|
389
419
|
});
|
|
420
|
+
Object.defineProperty(exports, "OperationForm", {
|
|
421
|
+
enumerable: true,
|
|
422
|
+
get: function get() {
|
|
423
|
+
return _OperationForm.OperationForm;
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
Object.defineProperty(exports, "OperationTable", {
|
|
427
|
+
enumerable: true,
|
|
428
|
+
get: function get() {
|
|
429
|
+
return _OperationTable.OperationTable;
|
|
430
|
+
}
|
|
431
|
+
});
|
|
390
432
|
Object.defineProperty(exports, "PolicyRuleForm", {
|
|
391
433
|
enumerable: true,
|
|
392
434
|
get: function get() {
|
|
@@ -471,6 +513,12 @@ Object.defineProperty(exports, "StaticSelect", {
|
|
|
471
513
|
return _StaticSelect.StaticSelect;
|
|
472
514
|
}
|
|
473
515
|
});
|
|
516
|
+
Object.defineProperty(exports, "SubmissionActivityForm", {
|
|
517
|
+
enumerable: true,
|
|
518
|
+
get: function get() {
|
|
519
|
+
return _SubmissionActivityForm.SubmissionActivityForm;
|
|
520
|
+
}
|
|
521
|
+
});
|
|
474
522
|
Object.defineProperty(exports, "SubmissionForm", {
|
|
475
523
|
enumerable: true,
|
|
476
524
|
get: function get() {
|
|
@@ -555,6 +603,12 @@ Object.defineProperty(exports, "SystemTenantForm", {
|
|
|
555
603
|
return _SystemTenantForm.SystemTenantForm;
|
|
556
604
|
}
|
|
557
605
|
});
|
|
606
|
+
Object.defineProperty(exports, "SystemTenantMigrateForm", {
|
|
607
|
+
enumerable: true,
|
|
608
|
+
get: function get() {
|
|
609
|
+
return _SystemTenantMigrateForm.SystemTenantMigrateForm;
|
|
610
|
+
}
|
|
611
|
+
});
|
|
558
612
|
Object.defineProperty(exports, "SystemTenantTable", {
|
|
559
613
|
enumerable: true,
|
|
560
614
|
get: function get() {
|
|
@@ -729,6 +783,12 @@ Object.defineProperty(exports, "clearToasts", {
|
|
|
729
783
|
return _ToastContainer.clearToasts;
|
|
730
784
|
}
|
|
731
785
|
});
|
|
786
|
+
Object.defineProperty(exports, "findTableKey", {
|
|
787
|
+
enumerable: true,
|
|
788
|
+
get: function get() {
|
|
789
|
+
return _Table.findTableKey;
|
|
790
|
+
}
|
|
791
|
+
});
|
|
732
792
|
Object.defineProperty(exports, "formPropertyName", {
|
|
733
793
|
enumerable: true,
|
|
734
794
|
get: function get() {
|
|
@@ -753,10 +813,10 @@ Object.defineProperty(exports, "generateTable", {
|
|
|
753
813
|
return _Table2.generateTable;
|
|
754
814
|
}
|
|
755
815
|
});
|
|
756
|
-
Object.defineProperty(exports, "
|
|
816
|
+
Object.defineProperty(exports, "getConnectionMetadata", {
|
|
757
817
|
enumerable: true,
|
|
758
818
|
get: function get() {
|
|
759
|
-
return
|
|
819
|
+
return _integrationTypes.getConnectionMetadata;
|
|
760
820
|
}
|
|
761
821
|
});
|
|
762
822
|
Object.defineProperty(exports, "getCsrfToken", {
|
|
@@ -771,6 +831,12 @@ Object.defineProperty(exports, "getLockedBy", {
|
|
|
771
831
|
return _CoreForm.getLockedBy;
|
|
772
832
|
}
|
|
773
833
|
});
|
|
834
|
+
Object.defineProperty(exports, "getOperationMetadata", {
|
|
835
|
+
enumerable: true,
|
|
836
|
+
get: function get() {
|
|
837
|
+
return _integrationTypes.getOperationMetadata;
|
|
838
|
+
}
|
|
839
|
+
});
|
|
774
840
|
Object.defineProperty(exports, "getTimeLeft", {
|
|
775
841
|
enumerable: true,
|
|
776
842
|
get: function get() {
|
|
@@ -783,6 +849,12 @@ Object.defineProperty(exports, "getToken", {
|
|
|
783
849
|
return _AuthenticationContainer.getToken;
|
|
784
850
|
}
|
|
785
851
|
});
|
|
852
|
+
Object.defineProperty(exports, "hasTableFiltersApplied", {
|
|
853
|
+
enumerable: true,
|
|
854
|
+
get: function get() {
|
|
855
|
+
return _Table.hasTableFiltersApplied;
|
|
856
|
+
}
|
|
857
|
+
});
|
|
786
858
|
Object.defineProperty(exports, "hideToast", {
|
|
787
859
|
enumerable: true,
|
|
788
860
|
get: function get() {
|
|
@@ -795,6 +867,12 @@ Object.defineProperty(exports, "importLocale", {
|
|
|
795
867
|
return _Moment.importLocale;
|
|
796
868
|
}
|
|
797
869
|
});
|
|
870
|
+
Object.defineProperty(exports, "integrationTypes", {
|
|
871
|
+
enumerable: true,
|
|
872
|
+
get: function get() {
|
|
873
|
+
return _integrationTypes.integrationTypes;
|
|
874
|
+
}
|
|
875
|
+
});
|
|
798
876
|
Object.defineProperty(exports, "isLockable", {
|
|
799
877
|
enumerable: true,
|
|
800
878
|
get: function get() {
|
|
@@ -855,6 +933,24 @@ Object.defineProperty(exports, "reloadDataSource", {
|
|
|
855
933
|
return _Form.reloadDataSource;
|
|
856
934
|
}
|
|
857
935
|
});
|
|
936
|
+
Object.defineProperty(exports, "reloadDataSources", {
|
|
937
|
+
enumerable: true,
|
|
938
|
+
get: function get() {
|
|
939
|
+
return _Form.reloadDataSources;
|
|
940
|
+
}
|
|
941
|
+
});
|
|
942
|
+
Object.defineProperty(exports, "reloadTablePage", {
|
|
943
|
+
enumerable: true,
|
|
944
|
+
get: function get() {
|
|
945
|
+
return _Table.reloadTablePage;
|
|
946
|
+
}
|
|
947
|
+
});
|
|
948
|
+
Object.defineProperty(exports, "resetFilterForm", {
|
|
949
|
+
enumerable: true,
|
|
950
|
+
get: function get() {
|
|
951
|
+
return _Table.resetFilterForm;
|
|
952
|
+
}
|
|
953
|
+
});
|
|
858
954
|
Object.defineProperty(exports, "resetForm", {
|
|
859
955
|
enumerable: true,
|
|
860
956
|
get: function get() {
|
|
@@ -873,6 +969,30 @@ Object.defineProperty(exports, "serializeForm", {
|
|
|
873
969
|
return _Form.serializeForm;
|
|
874
970
|
}
|
|
875
971
|
});
|
|
972
|
+
Object.defineProperty(exports, "setFormValue", {
|
|
973
|
+
enumerable: true,
|
|
974
|
+
get: function get() {
|
|
975
|
+
return _Form.setValue;
|
|
976
|
+
}
|
|
977
|
+
});
|
|
978
|
+
Object.defineProperty(exports, "setPreference", {
|
|
979
|
+
enumerable: true,
|
|
980
|
+
get: function get() {
|
|
981
|
+
return _PreferencesProvider.setPreference;
|
|
982
|
+
}
|
|
983
|
+
});
|
|
984
|
+
Object.defineProperty(exports, "setPreferenceBool", {
|
|
985
|
+
enumerable: true,
|
|
986
|
+
get: function get() {
|
|
987
|
+
return _PreferencesProvider.setPreferenceBool;
|
|
988
|
+
}
|
|
989
|
+
});
|
|
990
|
+
Object.defineProperty(exports, "setPreferenceJSON", {
|
|
991
|
+
enumerable: true,
|
|
992
|
+
get: function get() {
|
|
993
|
+
return _PreferencesProvider.setPreferenceJSON;
|
|
994
|
+
}
|
|
995
|
+
});
|
|
876
996
|
Object.defineProperty(exports, "showToast", {
|
|
877
997
|
enumerable: true,
|
|
878
998
|
get: function get() {
|
|
@@ -891,6 +1011,12 @@ Object.defineProperty(exports, "timedOut", {
|
|
|
891
1011
|
return _AuthenticationContainer.timedOut;
|
|
892
1012
|
}
|
|
893
1013
|
});
|
|
1014
|
+
Object.defineProperty(exports, "toggleFilterField", {
|
|
1015
|
+
enumerable: true,
|
|
1016
|
+
get: function get() {
|
|
1017
|
+
return _Table.toggleFilterField;
|
|
1018
|
+
}
|
|
1019
|
+
});
|
|
894
1020
|
Object.defineProperty(exports, "unlockSubmission", {
|
|
895
1021
|
enumerable: true,
|
|
896
1022
|
get: function get() {
|
|
@@ -915,6 +1041,18 @@ Object.defineProperty(exports, "unmountTreeBuilder", {
|
|
|
915
1041
|
return _builder.unmountTreeBuilder;
|
|
916
1042
|
}
|
|
917
1043
|
});
|
|
1044
|
+
Object.defineProperty(exports, "usePreferences", {
|
|
1045
|
+
enumerable: true,
|
|
1046
|
+
get: function get() {
|
|
1047
|
+
return _PreferencesProvider.usePreferences;
|
|
1048
|
+
}
|
|
1049
|
+
});
|
|
1050
|
+
Object.defineProperty(exports, "validateForm", {
|
|
1051
|
+
enumerable: true,
|
|
1052
|
+
get: function get() {
|
|
1053
|
+
return _Form.validateForm;
|
|
1054
|
+
}
|
|
1055
|
+
});
|
|
918
1056
|
var _AttributeSelect = require("./common/AttributeSelect");
|
|
919
1057
|
var _BridgeSelect = require("./common/BridgeSelect");
|
|
920
1058
|
var _CodeInput = require("./common/code_input/CodeInput");
|
|
@@ -926,7 +1064,9 @@ var _TableInput = require("./common/TableInput");
|
|
|
926
1064
|
var _FormSelect = require("./common/FormSelect");
|
|
927
1065
|
var _Scroller = require("./common/Scroller");
|
|
928
1066
|
var _StaticSelect = require("./common/StaticSelect");
|
|
1067
|
+
var _ConnectionSelect = require("./common/ConnectionSelect");
|
|
929
1068
|
var _AuthenticationContainer = require("./common/authentication/AuthenticationContainer");
|
|
1069
|
+
var _PreferencesProvider = require("./common/preferences/PreferencesProvider");
|
|
930
1070
|
var _ToastContainer = require("./common/ToastContainer");
|
|
931
1071
|
var _Form = require("./form/Form");
|
|
932
1072
|
var _FormState = require("./form/FormState");
|
|
@@ -974,6 +1114,8 @@ var _CoreForm = require("./core/core_form/CoreForm");
|
|
|
974
1114
|
var _IndexDefinitionForm = require("./core/index_definition/IndexDefinitionForm");
|
|
975
1115
|
var _IndexDefinitionTable = require("./core/index_definition/IndexDefinitionTable");
|
|
976
1116
|
var _IndexJobTable = require("./core/index_job/IndexJobTable");
|
|
1117
|
+
var _IntegrationForm = require("./core/integration/IntegrationForm");
|
|
1118
|
+
var _IntegrationTable = require("./core/integration/IntegrationTable");
|
|
977
1119
|
var _KappForm = require("./core/kapp/KappForm");
|
|
978
1120
|
var _KappTable = require("./core/kapp/KappTable");
|
|
979
1121
|
var _LocaleForm = require("./core/translation/LocaleForm");
|
|
@@ -986,6 +1128,7 @@ var _SecurityDefinitionTable = require("./core/security_definition/SecurityDefin
|
|
|
986
1128
|
var _SpaceForm = require("./core/space/SpaceForm");
|
|
987
1129
|
var _SubmissionTable = require("./core/submission/SubmissionTable");
|
|
988
1130
|
var _SubmissionForm = require("./core/submission/SubmissionForm");
|
|
1131
|
+
var _SubmissionActivityForm = require("./core/submission/SubmissionActivityForm");
|
|
989
1132
|
var _DatastoreSubmissionTable = require("./core/submission/DatastoreSubmissionTable");
|
|
990
1133
|
var _TeamForm = require("./core/team/TeamForm");
|
|
991
1134
|
var _TeamTable = require("./core/team/TeamTable");
|
|
@@ -999,6 +1142,7 @@ var _WebhookTable = require("./core/webhook/WebhookTable");
|
|
|
999
1142
|
var _WebhookJobTable = require("./core/webhook_job/WebhookJobTable");
|
|
1000
1143
|
var _SystemTenantTable = require("./system/spaces/SystemTenantTable");
|
|
1001
1144
|
var _SystemTenantForm = require("./system/spaces/SystemTenantForm");
|
|
1145
|
+
var _SystemTenantMigrateForm = require("./system/spaces/SystemTenantMigrateForm");
|
|
1002
1146
|
var _SystemSpaceForm = require("./system/spaces/SystemSpaceForm");
|
|
1003
1147
|
var _SystemFilestoreForm = require("./system/SystemFilestoreForm");
|
|
1004
1148
|
var _SystemUserForm = require("./system/SystemUserForm");
|
|
@@ -1039,4 +1183,9 @@ var _TaskCategoryTable = require("./task/category/TaskCategoryTable");
|
|
|
1039
1183
|
var _TaskCategoryForm = require("./task/category/TaskCategoryForm");
|
|
1040
1184
|
var _PolicyRuleTable = require("./task/policy_rule/PolicyRuleTable");
|
|
1041
1185
|
var _PolicyRuleForm = require("./task/policy_rule/PolicyRuleForm");
|
|
1042
|
-
var _EngineSettingsForm = require("./task/engine/EngineSettingsForm");
|
|
1186
|
+
var _EngineSettingsForm = require("./task/engine/EngineSettingsForm");
|
|
1187
|
+
var _integrationTypes = require("./integrator/integrationTypes");
|
|
1188
|
+
var _ConnectionTable = require("./integrator/connection/ConnectionTable");
|
|
1189
|
+
var _ConnectionForm = require("./integrator/connection/ConnectionForm");
|
|
1190
|
+
var _OperationTable = require("./integrator/operation/OperationTable");
|
|
1191
|
+
var _OperationForm = require("./integrator/operation/OperationForm");
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ConnectionForm = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
|
+
var _immutable = require("immutable");
|
|
12
|
+
var _Form = require("../../form/Form");
|
|
13
|
+
var _apis = require("../../../apis");
|
|
14
|
+
var _integrationTypes = _interopRequireDefault(require("../integrationTypes"));
|
|
15
|
+
var _http = require("./config_fields/http");
|
|
16
|
+
var _sql = require("./config_fields/sql");
|
|
17
|
+
var dataSources = function dataSources(_ref) {
|
|
18
|
+
var id = _ref.id,
|
|
19
|
+
clone = _ref.clone,
|
|
20
|
+
importData = _ref.importData,
|
|
21
|
+
importOverwrite = _ref.importOverwrite;
|
|
22
|
+
return {
|
|
23
|
+
connection:
|
|
24
|
+
// If importing and overwriting an existing connection, set the import data
|
|
25
|
+
// into the bindings. Otherwise, fetch the connection if an id is provided.
|
|
26
|
+
importData && importOverwrite === true ? {
|
|
27
|
+
fn: function fn() {
|
|
28
|
+
return importData;
|
|
29
|
+
},
|
|
30
|
+
params: []
|
|
31
|
+
} : {
|
|
32
|
+
fn: _apis.fetchConnection,
|
|
33
|
+
params: id && [{
|
|
34
|
+
id: id
|
|
35
|
+
}],
|
|
36
|
+
transform: function transform(result) {
|
|
37
|
+
return result.connection;
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
isClone: {
|
|
41
|
+
fn: function fn() {
|
|
42
|
+
return clone;
|
|
43
|
+
},
|
|
44
|
+
params: []
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
var handleSubmit = function handleSubmit(_ref2) {
|
|
49
|
+
var id = _ref2.id,
|
|
50
|
+
clone = _ref2.clone,
|
|
51
|
+
importData = _ref2.importData,
|
|
52
|
+
importOverwrite = _ref2.importOverwrite;
|
|
53
|
+
return function (values) {
|
|
54
|
+
return (importData ? _apis.importConnection : id && !clone ? _apis.updateConnection : _apis.createConnection)({
|
|
55
|
+
id: importData ? undefined : id,
|
|
56
|
+
connection: importData && importOverwrite !== false ? values.set('id', importData.id).toJS() : values.toJS(),
|
|
57
|
+
force: importData ? importOverwrite : undefined
|
|
58
|
+
}).then(function (_ref3) {
|
|
59
|
+
var connection = _ref3.connection,
|
|
60
|
+
error = _ref3.error;
|
|
61
|
+
if (error) {
|
|
62
|
+
throw error.statusCode === 400 && error.message || 'There was an error saving the connection';
|
|
63
|
+
}
|
|
64
|
+
return connection;
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
var getFieldConfigByType = function getFieldConfigByType(type, connection, options) {
|
|
69
|
+
switch (type) {
|
|
70
|
+
case 'http':
|
|
71
|
+
var configFieldsHTTP = (0, _http.generateHttpConnectionConfigFields)((0, _immutable.get)(connection, 'config'), options);
|
|
72
|
+
return [configFieldsHTTP, (0, _http.serializeHttpConnectionConfigFields)(configFieldsHTTP)];
|
|
73
|
+
case 'postgres':
|
|
74
|
+
case 'mssql':
|
|
75
|
+
var configFieldsSQL = (0, _sql.generateSQLConnectionConfigFields)((0, _immutable.get)(connection, 'config'), type, options);
|
|
76
|
+
return [configFieldsSQL, (0, _sql.serializeSQLConnectionConfigFields)(configFieldsSQL)];
|
|
77
|
+
default:
|
|
78
|
+
return [[], undefined];
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
var fields = function fields(_ref4) {
|
|
82
|
+
var id = _ref4.id,
|
|
83
|
+
type = _ref4.type,
|
|
84
|
+
clone = _ref4.clone,
|
|
85
|
+
importData = _ref4.importData,
|
|
86
|
+
importOverwrite = _ref4.importOverwrite;
|
|
87
|
+
return function (_ref5) {
|
|
88
|
+
var connection = _ref5.connection;
|
|
89
|
+
// Must provide an id of an existing connection, or a type
|
|
90
|
+
if (importData || (id ? connection : type)) {
|
|
91
|
+
var record = connection || (0, _immutable.fromJS)(importData);
|
|
92
|
+
var typeValue = (0, _immutable.getIn)(record, ['config', 'configType']) || type;
|
|
93
|
+
var _getFieldConfigByType = getFieldConfigByType(typeValue, record, {
|
|
94
|
+
isClone: clone,
|
|
95
|
+
isNewImport: importData && importOverwrite !== true
|
|
96
|
+
}),
|
|
97
|
+
_getFieldConfigByType2 = (0, _slicedToArray2["default"])(_getFieldConfigByType, 2),
|
|
98
|
+
configFields = _getFieldConfigByType2[0],
|
|
99
|
+
configSerialize = _getFieldConfigByType2[1];
|
|
100
|
+
return [{
|
|
101
|
+
name: 'name',
|
|
102
|
+
label: 'Connection Name',
|
|
103
|
+
type: 'text',
|
|
104
|
+
initialValue: !clone ? (0, _immutable.get)(record, 'name') : '',
|
|
105
|
+
required: true,
|
|
106
|
+
placeholder: !clone ? 'Enter a name to find your connection easily' : "Clone of ".concat((0, _immutable.get)(record, 'name'))
|
|
107
|
+
}, {
|
|
108
|
+
name: 'type',
|
|
109
|
+
label: 'Type',
|
|
110
|
+
type: 'select',
|
|
111
|
+
options: _integrationTypes["default"],
|
|
112
|
+
initialValue: typeValue,
|
|
113
|
+
required: true,
|
|
114
|
+
enabled: false
|
|
115
|
+
}, {
|
|
116
|
+
name: 'documentationLink',
|
|
117
|
+
label: 'API Documentation Link',
|
|
118
|
+
type: 'text',
|
|
119
|
+
initialValue: (0, _immutable.get)(record, 'documentationLink') || '',
|
|
120
|
+
placeholder: 'Optional (but recommended)'
|
|
121
|
+
}, {
|
|
122
|
+
name: 'description',
|
|
123
|
+
label: 'Description',
|
|
124
|
+
type: 'text',
|
|
125
|
+
initialValue: (0, _immutable.get)(record, 'description') || '',
|
|
126
|
+
placeholder: 'Enter a short description for the connection'
|
|
127
|
+
}, {
|
|
128
|
+
name: 'secrets',
|
|
129
|
+
label: 'Secrets',
|
|
130
|
+
type: 'map',
|
|
131
|
+
initialValue: (0, _immutable.get)(record, 'secrets') || {},
|
|
132
|
+
placeholder: 'Secret Key',
|
|
133
|
+
helpText: 'Secrets are key-value pairs that define sensitive values that will be hidden from view, but can be referenced in other parts of the connection by their keys.'
|
|
134
|
+
}, {
|
|
135
|
+
name: 'config',
|
|
136
|
+
label: 'Config',
|
|
137
|
+
type: null,
|
|
138
|
+
visible: false,
|
|
139
|
+
initialValue: (0, _immutable.get)(record, 'config'),
|
|
140
|
+
// Serialize the transient config fields into a single config object
|
|
141
|
+
serialize: configSerialize
|
|
142
|
+
}].concat((0, _toConsumableArray2["default"])(configFields.map(function (field) {
|
|
143
|
+
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, field), {}, {
|
|
144
|
+
"transient": true
|
|
145
|
+
});
|
|
146
|
+
})));
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
var ConnectionForm = exports.ConnectionForm = (0, _Form.generateForm)({
|
|
151
|
+
formOptions: ['id', 'type', 'clone', 'importData', 'importOverwrite'],
|
|
152
|
+
dataSources: dataSources,
|
|
153
|
+
fields: fields,
|
|
154
|
+
handleSubmit: handleSubmit
|
|
155
|
+
});
|
|
156
|
+
ConnectionForm.displayName = 'ConnectionForm';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ConnectionTable = void 0;
|
|
8
|
+
var _apis = require("../../../apis");
|
|
9
|
+
var _Table = require("../../table/Table");
|
|
10
|
+
var _integrationTypes = _interopRequireDefault(require("../integrationTypes"));
|
|
11
|
+
var _helpers = require("../../../helpers");
|
|
12
|
+
var filters = function filters() {
|
|
13
|
+
return function () {
|
|
14
|
+
return [{
|
|
15
|
+
name: 'name',
|
|
16
|
+
label: 'Name',
|
|
17
|
+
type: 'text'
|
|
18
|
+
}, {
|
|
19
|
+
name: 'type',
|
|
20
|
+
label: 'Type',
|
|
21
|
+
type: 'select',
|
|
22
|
+
options: _integrationTypes["default"]
|
|
23
|
+
}];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
var clientSide = (0, _helpers.defineFilter)(true).matches('name', 'name').equals('type', 'type').end();
|
|
27
|
+
var dataSource = function dataSource() {
|
|
28
|
+
return {
|
|
29
|
+
fn: _apis.fetchConnections,
|
|
30
|
+
clientSide: clientSide,
|
|
31
|
+
params: function params() {
|
|
32
|
+
return [];
|
|
33
|
+
},
|
|
34
|
+
transform: function transform(result) {
|
|
35
|
+
return {
|
|
36
|
+
data: result.connections
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
var columns = [{
|
|
42
|
+
value: 'name',
|
|
43
|
+
title: 'Name',
|
|
44
|
+
sortable: true
|
|
45
|
+
}, {
|
|
46
|
+
value: 'type',
|
|
47
|
+
valueTransform: function valueTransform(_value, row) {
|
|
48
|
+
return row.getIn(['config', 'configType']);
|
|
49
|
+
},
|
|
50
|
+
title: 'Type',
|
|
51
|
+
sortable: true,
|
|
52
|
+
toggleable: true
|
|
53
|
+
}, {
|
|
54
|
+
value: 'status',
|
|
55
|
+
valueTransform: function valueTransform(_value, row) {
|
|
56
|
+
return row.getIn(['status', 'healthy']) ? 'Valid' : 'Invalid';
|
|
57
|
+
},
|
|
58
|
+
title: 'Status',
|
|
59
|
+
sortable: false,
|
|
60
|
+
toggleable: true
|
|
61
|
+
}, {
|
|
62
|
+
value: 'id',
|
|
63
|
+
title: 'Id',
|
|
64
|
+
toggleable: true
|
|
65
|
+
}, {
|
|
66
|
+
value: 'insertedAt',
|
|
67
|
+
title: 'Created At',
|
|
68
|
+
sortable: true,
|
|
69
|
+
toggleable: true
|
|
70
|
+
}, {
|
|
71
|
+
value: 'updatedAt',
|
|
72
|
+
title: 'Updated At',
|
|
73
|
+
sortable: true,
|
|
74
|
+
toggleable: true
|
|
75
|
+
}];
|
|
76
|
+
var ConnectionTable = exports.ConnectionTable = (0, _Table.generateTable)({
|
|
77
|
+
tableOptions: [],
|
|
78
|
+
columns: columns,
|
|
79
|
+
filters: filters,
|
|
80
|
+
dataSource: dataSource
|
|
81
|
+
});
|
|
82
|
+
ConnectionTable.displayName = 'ConnectionTable';
|