@kineticdata/react 6.0.5 → 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 -94
- 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 +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 +3 -22
- 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 +24 -3
- package/lib/components/task/builder/builder.redux.js +310 -185
- 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 +7 -6
- 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 +27 -8
- 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
|
@@ -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(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
|
+
};
|
|
@@ -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() {
|
|
@@ -555,6 +597,12 @@ Object.defineProperty(exports, "SystemTenantForm", {
|
|
|
555
597
|
return _SystemTenantForm.SystemTenantForm;
|
|
556
598
|
}
|
|
557
599
|
});
|
|
600
|
+
Object.defineProperty(exports, "SystemTenantMigrateForm", {
|
|
601
|
+
enumerable: true,
|
|
602
|
+
get: function get() {
|
|
603
|
+
return _SystemTenantMigrateForm.SystemTenantMigrateForm;
|
|
604
|
+
}
|
|
605
|
+
});
|
|
558
606
|
Object.defineProperty(exports, "SystemTenantTable", {
|
|
559
607
|
enumerable: true,
|
|
560
608
|
get: function get() {
|
|
@@ -753,10 +801,10 @@ Object.defineProperty(exports, "generateTable", {
|
|
|
753
801
|
return _Table2.generateTable;
|
|
754
802
|
}
|
|
755
803
|
});
|
|
756
|
-
Object.defineProperty(exports, "
|
|
804
|
+
Object.defineProperty(exports, "getConnectionMetadata", {
|
|
757
805
|
enumerable: true,
|
|
758
806
|
get: function get() {
|
|
759
|
-
return
|
|
807
|
+
return _integrationTypes.getConnectionMetadata;
|
|
760
808
|
}
|
|
761
809
|
});
|
|
762
810
|
Object.defineProperty(exports, "getCsrfToken", {
|
|
@@ -771,6 +819,12 @@ Object.defineProperty(exports, "getLockedBy", {
|
|
|
771
819
|
return _CoreForm.getLockedBy;
|
|
772
820
|
}
|
|
773
821
|
});
|
|
822
|
+
Object.defineProperty(exports, "getOperationMetadata", {
|
|
823
|
+
enumerable: true,
|
|
824
|
+
get: function get() {
|
|
825
|
+
return _integrationTypes.getOperationMetadata;
|
|
826
|
+
}
|
|
827
|
+
});
|
|
774
828
|
Object.defineProperty(exports, "getTimeLeft", {
|
|
775
829
|
enumerable: true,
|
|
776
830
|
get: function get() {
|
|
@@ -795,6 +849,12 @@ Object.defineProperty(exports, "importLocale", {
|
|
|
795
849
|
return _Moment.importLocale;
|
|
796
850
|
}
|
|
797
851
|
});
|
|
852
|
+
Object.defineProperty(exports, "integrationTypes", {
|
|
853
|
+
enumerable: true,
|
|
854
|
+
get: function get() {
|
|
855
|
+
return _integrationTypes.integrationTypes;
|
|
856
|
+
}
|
|
857
|
+
});
|
|
798
858
|
Object.defineProperty(exports, "isLockable", {
|
|
799
859
|
enumerable: true,
|
|
800
860
|
get: function get() {
|
|
@@ -855,6 +915,12 @@ Object.defineProperty(exports, "reloadDataSource", {
|
|
|
855
915
|
return _Form.reloadDataSource;
|
|
856
916
|
}
|
|
857
917
|
});
|
|
918
|
+
Object.defineProperty(exports, "reloadDataSources", {
|
|
919
|
+
enumerable: true,
|
|
920
|
+
get: function get() {
|
|
921
|
+
return _Form.reloadDataSources;
|
|
922
|
+
}
|
|
923
|
+
});
|
|
858
924
|
Object.defineProperty(exports, "resetForm", {
|
|
859
925
|
enumerable: true,
|
|
860
926
|
get: function get() {
|
|
@@ -915,6 +981,12 @@ Object.defineProperty(exports, "unmountTreeBuilder", {
|
|
|
915
981
|
return _builder.unmountTreeBuilder;
|
|
916
982
|
}
|
|
917
983
|
});
|
|
984
|
+
Object.defineProperty(exports, "validateForm", {
|
|
985
|
+
enumerable: true,
|
|
986
|
+
get: function get() {
|
|
987
|
+
return _Form.validateForm;
|
|
988
|
+
}
|
|
989
|
+
});
|
|
918
990
|
var _AttributeSelect = require("./common/AttributeSelect");
|
|
919
991
|
var _BridgeSelect = require("./common/BridgeSelect");
|
|
920
992
|
var _CodeInput = require("./common/code_input/CodeInput");
|
|
@@ -926,6 +998,7 @@ var _TableInput = require("./common/TableInput");
|
|
|
926
998
|
var _FormSelect = require("./common/FormSelect");
|
|
927
999
|
var _Scroller = require("./common/Scroller");
|
|
928
1000
|
var _StaticSelect = require("./common/StaticSelect");
|
|
1001
|
+
var _ConnectionSelect = require("./common/ConnectionSelect");
|
|
929
1002
|
var _AuthenticationContainer = require("./common/authentication/AuthenticationContainer");
|
|
930
1003
|
var _ToastContainer = require("./common/ToastContainer");
|
|
931
1004
|
var _Form = require("./form/Form");
|
|
@@ -974,6 +1047,8 @@ var _CoreForm = require("./core/core_form/CoreForm");
|
|
|
974
1047
|
var _IndexDefinitionForm = require("./core/index_definition/IndexDefinitionForm");
|
|
975
1048
|
var _IndexDefinitionTable = require("./core/index_definition/IndexDefinitionTable");
|
|
976
1049
|
var _IndexJobTable = require("./core/index_job/IndexJobTable");
|
|
1050
|
+
var _IntegrationForm = require("./core/integration/IntegrationForm");
|
|
1051
|
+
var _IntegrationTable = require("./core/integration/IntegrationTable");
|
|
977
1052
|
var _KappForm = require("./core/kapp/KappForm");
|
|
978
1053
|
var _KappTable = require("./core/kapp/KappTable");
|
|
979
1054
|
var _LocaleForm = require("./core/translation/LocaleForm");
|
|
@@ -999,6 +1074,7 @@ var _WebhookTable = require("./core/webhook/WebhookTable");
|
|
|
999
1074
|
var _WebhookJobTable = require("./core/webhook_job/WebhookJobTable");
|
|
1000
1075
|
var _SystemTenantTable = require("./system/spaces/SystemTenantTable");
|
|
1001
1076
|
var _SystemTenantForm = require("./system/spaces/SystemTenantForm");
|
|
1077
|
+
var _SystemTenantMigrateForm = require("./system/spaces/SystemTenantMigrateForm");
|
|
1002
1078
|
var _SystemSpaceForm = require("./system/spaces/SystemSpaceForm");
|
|
1003
1079
|
var _SystemFilestoreForm = require("./system/SystemFilestoreForm");
|
|
1004
1080
|
var _SystemUserForm = require("./system/SystemUserForm");
|
|
@@ -1039,4 +1115,9 @@ var _TaskCategoryTable = require("./task/category/TaskCategoryTable");
|
|
|
1039
1115
|
var _TaskCategoryForm = require("./task/category/TaskCategoryForm");
|
|
1040
1116
|
var _PolicyRuleTable = require("./task/policy_rule/PolicyRuleTable");
|
|
1041
1117
|
var _PolicyRuleForm = require("./task/policy_rule/PolicyRuleForm");
|
|
1042
|
-
var _EngineSettingsForm = require("./task/engine/EngineSettingsForm");
|
|
1118
|
+
var _EngineSettingsForm = require("./task/engine/EngineSettingsForm");
|
|
1119
|
+
var _integrationTypes = require("./integrator/integrationTypes");
|
|
1120
|
+
var _ConnectionTable = require("./integrator/connection/ConnectionTable");
|
|
1121
|
+
var _ConnectionForm = require("./integrator/connection/ConnectionForm");
|
|
1122
|
+
var _OperationTable = require("./integrator/operation/OperationTable");
|
|
1123
|
+
var _OperationForm = require("./integrator/operation/OperationForm");
|
|
@@ -0,0 +1,112 @@
|
|
|
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 _immutable = require("immutable");
|
|
11
|
+
var _Form = require("../../form/Form");
|
|
12
|
+
var _apis = require("../../../apis");
|
|
13
|
+
var _integrationTypes = _interopRequireDefault(require("../integrationTypes"));
|
|
14
|
+
var _http = require("./config_fields/http");
|
|
15
|
+
var dataSources = function dataSources(_ref) {
|
|
16
|
+
var id = _ref.id;
|
|
17
|
+
return {
|
|
18
|
+
connection: {
|
|
19
|
+
fn: _apis.fetchConnection,
|
|
20
|
+
params: id && [{
|
|
21
|
+
id: id
|
|
22
|
+
}],
|
|
23
|
+
transform: function transform(result) {
|
|
24
|
+
return result.connection;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
var handleSubmit = function handleSubmit(_ref2) {
|
|
30
|
+
var id = _ref2.id,
|
|
31
|
+
clone = _ref2.clone;
|
|
32
|
+
return function (values) {
|
|
33
|
+
return (id && !clone ? _apis.updateConnection : _apis.createConnection)({
|
|
34
|
+
id: id,
|
|
35
|
+
connection: values.toJS()
|
|
36
|
+
}).then(function (_ref3) {
|
|
37
|
+
var connection = _ref3.connection,
|
|
38
|
+
error = _ref3.error;
|
|
39
|
+
if (error) {
|
|
40
|
+
throw error.statusCode === 400 && error.message || 'There was an error saving the connection';
|
|
41
|
+
}
|
|
42
|
+
return connection;
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
var fields = function fields(_ref4) {
|
|
47
|
+
var id = _ref4.id,
|
|
48
|
+
type = _ref4.type,
|
|
49
|
+
clone = _ref4.clone;
|
|
50
|
+
return function (_ref5) {
|
|
51
|
+
var connection = _ref5.connection;
|
|
52
|
+
// Must provide an id of an existing connection, or a type
|
|
53
|
+
if (id ? connection : type) {
|
|
54
|
+
var typeValue = (0, _immutable.get)(connection, 'type') || type;
|
|
55
|
+
var configFields = typeValue === 'http' ? (0, _http.generateHttpConnectionConfigFields)((0, _immutable.get)(connection, 'config')) : [];
|
|
56
|
+
return [{
|
|
57
|
+
name: 'name',
|
|
58
|
+
label: 'Connection Name',
|
|
59
|
+
type: 'text',
|
|
60
|
+
initialValue: !clone ? (0, _immutable.get)(connection, 'name') : '',
|
|
61
|
+
required: true,
|
|
62
|
+
placeholder: !clone ? 'Enter a name to find your connection easily' : "Clone of ".concat((0, _immutable.get)(connection, 'name'))
|
|
63
|
+
}, {
|
|
64
|
+
name: 'type',
|
|
65
|
+
label: 'Type',
|
|
66
|
+
type: 'select',
|
|
67
|
+
options: _integrationTypes["default"],
|
|
68
|
+
initialValue: typeValue,
|
|
69
|
+
required: true,
|
|
70
|
+
enabled: false
|
|
71
|
+
}, {
|
|
72
|
+
name: 'documentationLink',
|
|
73
|
+
label: 'API Documentation Link',
|
|
74
|
+
type: 'text',
|
|
75
|
+
initialValue: (0, _immutable.get)(connection, 'documentationLink') || '',
|
|
76
|
+
placeholder: 'Optional (but recommended)'
|
|
77
|
+
}, {
|
|
78
|
+
name: 'description',
|
|
79
|
+
label: 'Description',
|
|
80
|
+
type: 'text',
|
|
81
|
+
initialValue: (0, _immutable.get)(connection, 'description') || '',
|
|
82
|
+
placeholder: 'Enter a short description for the connection'
|
|
83
|
+
}, {
|
|
84
|
+
name: 'secrets',
|
|
85
|
+
label: 'Secrets',
|
|
86
|
+
type: 'map',
|
|
87
|
+
initialValue: (0, _immutable.get)(connection, 'secrets') || {},
|
|
88
|
+
placeholder: 'Secret Key',
|
|
89
|
+
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.'
|
|
90
|
+
}, {
|
|
91
|
+
name: 'config',
|
|
92
|
+
label: 'Config',
|
|
93
|
+
type: null,
|
|
94
|
+
visible: false,
|
|
95
|
+
initialValue: (0, _immutable.get)(connection, 'config'),
|
|
96
|
+
// Serialize the transient config fields into a single config object
|
|
97
|
+
serialize: (0, _http.serializeHttpConnectionConfigFields)(configFields)
|
|
98
|
+
}].concat((0, _toConsumableArray2["default"])(configFields.map(function (field) {
|
|
99
|
+
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, field), {}, {
|
|
100
|
+
"transient": true
|
|
101
|
+
});
|
|
102
|
+
})));
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
var ConnectionForm = exports.ConnectionForm = (0, _Form.generateForm)({
|
|
107
|
+
formOptions: ['id', 'type', 'clone'],
|
|
108
|
+
dataSources: dataSources,
|
|
109
|
+
fields: fields,
|
|
110
|
+
handleSubmit: handleSubmit
|
|
111
|
+
});
|
|
112
|
+
ConnectionForm.displayName = 'ConnectionForm';
|
|
@@ -0,0 +1,80 @@
|
|
|
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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
|
+
var _apis = require("../../../apis");
|
|
10
|
+
var _Table = require("../../table/Table");
|
|
11
|
+
var _integrationTypes = _interopRequireDefault(require("../integrationTypes"));
|
|
12
|
+
var _helpers = require("../../../helpers");
|
|
13
|
+
var filters = function filters() {
|
|
14
|
+
return function () {
|
|
15
|
+
return [{
|
|
16
|
+
name: 'name',
|
|
17
|
+
label: 'Name',
|
|
18
|
+
type: 'text'
|
|
19
|
+
}, {
|
|
20
|
+
name: 'type',
|
|
21
|
+
label: 'Type',
|
|
22
|
+
type: 'select',
|
|
23
|
+
options: _integrationTypes["default"]
|
|
24
|
+
}];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
var clientSide = (0, _helpers.defineFilter)(true).matches('name', 'name').equals('type', 'type').end();
|
|
28
|
+
var dataSource = function dataSource() {
|
|
29
|
+
return {
|
|
30
|
+
fn: _apis.fetchConnections,
|
|
31
|
+
clientSide: clientSide,
|
|
32
|
+
params: function params(paramData) {
|
|
33
|
+
return [(0, _objectSpread2["default"])({}, paramData.filters.filter(Boolean).toJS())];
|
|
34
|
+
},
|
|
35
|
+
transform: function transform(result) {
|
|
36
|
+
return {
|
|
37
|
+
data: result.connections
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
var columns = [{
|
|
43
|
+
value: 'name',
|
|
44
|
+
title: 'Name',
|
|
45
|
+
sortable: true
|
|
46
|
+
}, {
|
|
47
|
+
value: 'type',
|
|
48
|
+
title: 'Type',
|
|
49
|
+
sortable: true,
|
|
50
|
+
toggleable: true
|
|
51
|
+
}, {
|
|
52
|
+
value: 'status',
|
|
53
|
+
valueTransform: function valueTransform(_value, row) {
|
|
54
|
+
return row.getIn(['status', 'healthy']) ? 'Valid' : 'Invalid';
|
|
55
|
+
},
|
|
56
|
+
title: 'Status',
|
|
57
|
+
sortable: false,
|
|
58
|
+
toggleable: true
|
|
59
|
+
}, {
|
|
60
|
+
value: 'id',
|
|
61
|
+
title: 'Id',
|
|
62
|
+
toggleable: true
|
|
63
|
+
}, {
|
|
64
|
+
value: 'insertedAt',
|
|
65
|
+
title: 'Created At',
|
|
66
|
+
sortable: true,
|
|
67
|
+
toggleable: true
|
|
68
|
+
}, {
|
|
69
|
+
value: 'updatedAt',
|
|
70
|
+
title: 'Updated At',
|
|
71
|
+
sortable: true,
|
|
72
|
+
toggleable: true
|
|
73
|
+
}];
|
|
74
|
+
var ConnectionTable = exports.ConnectionTable = (0, _Table.generateTable)({
|
|
75
|
+
tableOptions: [],
|
|
76
|
+
columns: columns,
|
|
77
|
+
filters: filters,
|
|
78
|
+
dataSource: dataSource
|
|
79
|
+
});
|
|
80
|
+
ConnectionTable.displayName = 'ConnectionTable';
|