@kineticdata/react 5.1.2 → 6.0.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/assets/task/icons/drag-handle.svg +3 -0
- package/assets/task/icons/plus_small.svg +2 -4
- package/lib/apis/agent/adapters.js +16 -12
- package/lib/apis/agent/bridges.js +54 -41
- package/lib/apis/agent/handlers.js +51 -38
- package/lib/apis/core/activity.js +19 -11
- package/lib/apis/core/attributeDefinitions.js +54 -46
- package/lib/apis/core/attributeDefinitions.test.js +47 -55
- package/lib/apis/core/authentication.js +58 -63
- package/lib/apis/core/backgroundJobs.js +38 -30
- package/lib/apis/core/bridgeModelAttributeMappings.js +42 -34
- package/lib/apis/core/bridgeModelAttributes.js +47 -37
- package/lib/apis/core/bridgeModelMappings.js +42 -34
- package/lib/apis/core/bridgeModelQualificationMappings.js +42 -34
- package/lib/apis/core/bridgeModelQualifications.js +42 -34
- package/lib/apis/core/bridgeModels.js +56 -46
- package/lib/apis/core/bridgeModels.test.js +64 -80
- package/lib/apis/core/bridgedresources.js +64 -72
- package/lib/apis/core/bridgedresources.test.js +33 -30
- package/lib/apis/core/categories.js +59 -52
- package/lib/apis/core/categories.test.js +36 -33
- package/lib/apis/core/fileResources.js +41 -33
- package/lib/apis/core/filestores.js +42 -34
- package/lib/apis/core/formTypes.js +50 -44
- package/lib/apis/core/forms.js +53 -49
- package/lib/apis/core/forms.test.js +60 -74
- package/lib/apis/core/kapps.js +45 -39
- package/lib/apis/core/kapps.test.js +45 -52
- package/lib/apis/core/logs.js +20 -16
- package/lib/apis/core/memberships.js +23 -20
- package/lib/apis/core/meta.js +31 -19
- package/lib/apis/core/notices.js +17 -9
- package/lib/apis/core/oauthClients.js +49 -45
- package/lib/apis/core/platformComponents.js +73 -57
- package/lib/apis/core/platformItems.js +22 -13
- package/lib/apis/core/profile.js +28 -21
- package/lib/apis/core/profile.test.js +20 -17
- package/lib/apis/core/securityPolicyDefinitions.js +48 -41
- package/lib/apis/core/securityPolicyDefinitions.test.js +50 -60
- package/lib/apis/core/space.js +23 -16
- package/lib/apis/core/space.test.js +31 -38
- package/lib/apis/core/submissions.js +213 -186
- package/lib/apis/core/submissions.test.js +39 -36
- package/lib/apis/core/teams.js +51 -44
- package/lib/apis/core/teams.test.js +42 -39
- package/lib/apis/core/translations.js +123 -130
- package/lib/apis/core/translations.test.js +278 -368
- package/lib/apis/core/users.js +56 -49
- package/lib/apis/core/users.test.js +42 -39
- package/lib/apis/core/version.js +20 -11
- package/lib/apis/core/webApis.js +42 -34
- package/lib/apis/core/webhooks.js +48 -41
- package/lib/apis/core/webhooks.test.js +50 -60
- package/lib/apis/core/webhooksJobs.js +30 -26
- package/lib/apis/core/workflows.js +52 -44
- package/lib/apis/http.js +89 -80
- package/lib/apis/http.test.js +37 -38
- package/lib/apis/index.js +506 -50
- package/lib/apis/system/index.js +228 -211
- package/lib/apis/task/index.js +280 -227
- package/lib/components/agent/bridge/BridgeForm.js +50 -50
- package/lib/components/agent/bridge/BridgeTable.js +12 -8
- package/lib/components/agent/filestore/FilestoreForm.js +49 -48
- package/lib/components/agent/filestore/FilestoreTable.js +12 -8
- package/lib/components/agent/handler/AgentHandlerForm.js +24 -27
- package/lib/components/agent/handler/AgentHandlerTable.js +12 -8
- package/lib/components/common/AttributeSelect.js +15 -9
- package/lib/components/common/BridgeSelect.js +48 -43
- package/lib/components/common/ComponentConfigContext.js +9 -2
- package/lib/components/common/ContentEditable.js +36 -60
- package/lib/components/common/FormSelect.js +70 -58
- package/lib/components/common/NodeSelect.js +23 -19
- package/lib/components/common/Scroller.js +24 -23
- package/lib/components/common/StaticSelect.js +57 -50
- package/lib/components/common/TableInput.js +54 -57
- package/lib/components/common/TeamSelect.js +42 -39
- package/lib/components/common/Typeahead.js +121 -138
- package/lib/components/common/UserSelect.js +42 -41
- package/lib/components/common/authentication/AuthInterceptor.js +15 -19
- package/lib/components/common/authentication/AuthInterceptor.test.js +46 -64
- package/lib/components/common/authentication/AuthenticationContainer.js +350 -454
- package/lib/components/common/authentication/RequestInterceptor.js +16 -19
- package/lib/components/common/code_input/CodeInput.js +92 -122
- package/lib/components/common/code_input/draftHelpers.js +96 -90
- package/lib/components/common/code_input/languageHelpers.js +49 -47
- package/lib/components/common/code_input/languageHelpers.test.js +21 -16
- package/lib/components/core/CoreFormModal.js +26 -24
- package/lib/components/core/CoreModal.js +37 -31
- package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +24 -23
- package/lib/components/core/attribute_definition/AttributeDefinitionTable.js +18 -15
- package/lib/components/core/bridge_model/BridgeModelForm.js +27 -37
- package/lib/components/core/bridge_model/BridgeModelTable.js +12 -8
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeForm.js +17 -16
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeTable.js +25 -21
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationForm.js +20 -20
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationTable.js +27 -22
- package/lib/components/core/category/CategoryForm.js +22 -22
- package/lib/components/core/category/CategoryTable.js +15 -10
- package/lib/components/core/core_form/CoreForm.js +209 -285
- package/lib/components/core/core_form/CoreForm.test.js +12 -10
- package/lib/components/core/core_form/defaults/index.js +52 -44
- package/lib/components/core/core_form/globals.js +14 -5
- package/lib/components/core/field_definition/FieldDefinitionForm.js +23 -21
- package/lib/components/core/field_definition/FieldDefinitionTable.js +15 -10
- package/lib/components/core/file_resource/FileResourceForm.js +38 -37
- package/lib/components/core/file_resource/FileResourceTable.js +16 -12
- package/lib/components/core/form/FormForm.js +56 -61
- package/lib/components/core/form/FormTable.js +25 -22
- package/lib/components/core/form_type/FormTypeForm.js +14 -13
- package/lib/components/core/form_type/FormTypeTable.js +12 -8
- package/lib/components/core/i18n/I18n.js +54 -61
- package/lib/components/core/i18n/I18nContext.js +9 -2
- package/lib/components/core/i18n/I18nProvider.js +40 -43
- package/lib/components/core/i18n/Moment.js +40 -50
- package/lib/components/core/index_definition/IndexDefinitionForm.js +23 -24
- package/lib/components/core/index_definition/IndexDefinitionTable.js +19 -11
- package/lib/components/core/index_job/IndexJobTable.js +20 -15
- package/lib/components/core/kapp/KappForm.js +57 -58
- package/lib/components/core/kapp/KappTable.js +17 -12
- package/lib/components/core/log/LogTable.js +35 -33
- package/lib/components/core/oauth_client/OAuthClientForm.js +17 -17
- package/lib/components/core/oauth_client/OAuthClientTable.js +12 -8
- package/lib/components/core/platform_component/AgentComponentForm.js +15 -15
- package/lib/components/core/platform_component/AgentComponentTable.js +10 -5
- package/lib/components/core/platform_component/TaskComponentForm.js +14 -14
- package/lib/components/core/profile/ProfileForm.js +40 -39
- package/lib/components/core/security_definition/SecurityDefinitionForm.js +28 -25
- package/lib/components/core/security_definition/SecurityDefinitionTable.js +18 -13
- package/lib/components/core/space/SpaceForm.js +79 -90
- package/lib/components/core/submission/DatastoreSubmissionFilters.js +39 -40
- package/lib/components/core/submission/DatastoreSubmissionTable.js +37 -34
- package/lib/components/core/submission/FormSubmissionFilters.js +79 -75
- package/lib/components/core/submission/FormSubmissionTable.js +27 -20
- package/lib/components/core/submission/KappSubmissionTable.js +30 -29
- package/lib/components/core/submission/SubmissionForm.js +126 -55
- package/lib/components/core/submission/SubmissionTable.js +24 -20
- package/lib/components/core/submission/helpers.js +37 -33
- package/lib/components/core/submission/helpers.test.js +69 -20
- package/lib/components/core/team/TeamForm.js +24 -21
- package/lib/components/core/team/TeamTable.js +16 -11
- package/lib/components/core/translation/ContextForm.js +13 -10
- package/lib/components/core/translation/ContextTable.js +13 -10
- package/lib/components/core/translation/EntryForm.js +27 -24
- package/lib/components/core/translation/EntryTable.js +19 -16
- package/lib/components/core/translation/LocaleForm.js +16 -13
- package/lib/components/core/translation/LocaleTable.js +12 -8
- package/lib/components/core/user/UserForm.js +38 -37
- package/lib/components/core/user/UserTable.js +19 -15
- package/lib/components/core/webapi/WebApiForm.js +49 -61
- package/lib/components/core/webapi/WebApiTable.js +14 -10
- package/lib/components/core/webhook/WebhookForm.js +33 -32
- package/lib/components/core/webhook/WebhookTable.js +22 -20
- package/lib/components/core/webhook_job/WebhookJobTable.js +19 -16
- package/lib/components/form/Form.helpers.js +102 -90
- package/lib/components/form/Form.js +467 -524
- package/lib/components/form/Form.models.js +38 -24
- package/lib/components/form/FormState.js +8 -5
- package/lib/components/form/KitchenSinkForm.js +135 -4
- package/lib/components/form/defaults/AttributesField.js +48 -59
- package/lib/components/form/defaults/CheckboxField.js +14 -6
- package/lib/components/form/defaults/CodeField.js +15 -7
- package/lib/components/form/defaults/FormButtons.js +12 -4
- package/lib/components/form/defaults/FormError.js +12 -4
- package/lib/components/form/defaults/FormField.js +15 -7
- package/lib/components/form/defaults/FormLayout.js +12 -4
- package/lib/components/form/defaults/FormMultiField.js +15 -7
- package/lib/components/form/defaults/PasswordField.js +14 -6
- package/lib/components/form/defaults/RadioField.js +15 -7
- package/lib/components/form/defaults/SampleTeamsRolesFIeld.js +17 -9
- package/lib/components/form/defaults/SelectField.js +16 -8
- package/lib/components/form/defaults/SelectMultiField.js +15 -7
- package/lib/components/form/defaults/TableField.js +14 -6
- package/lib/components/form/defaults/TeamField.js +15 -7
- package/lib/components/form/defaults/TeamMultiField.js +15 -7
- package/lib/components/form/defaults/TextField.js +14 -6
- package/lib/components/form/defaults/TextMultiField.js +26 -28
- package/lib/components/form/defaults/UserField.js +15 -7
- package/lib/components/form/defaults/UserMultiField.js +15 -7
- package/lib/components/form/defaults/index.js +48 -41
- package/lib/components/form/tests/Form.test.js +568 -864
- package/lib/components/form/tests/components.js +15 -25
- package/lib/components/form/tests/helpers.test.js +35 -33
- package/lib/components/index.js +981 -135
- package/lib/components/system/SystemBackgroundTasksTable.js +14 -10
- package/lib/components/system/SystemFilestoreForm.js +28 -25
- package/lib/components/system/SystemForm.js +19 -16
- package/lib/components/system/SystemIngressForm.js +10 -9
- package/lib/components/system/SystemSecurityForm.js +17 -14
- package/lib/components/system/SystemSmtpForm.js +13 -13
- package/lib/components/system/SystemTaskAdapterForm.js +21 -17
- package/lib/components/system/SystemUserForm.js +15 -14
- package/lib/components/system/helpers.js +62 -60
- package/lib/components/system/helpers.test.js +16 -12
- package/lib/components/system/spaces/SystemSpaceForm.js +25 -24
- package/lib/components/system/spaces/SystemTenantForm.js +43 -40
- package/lib/components/system/spaces/SystemTenantTable.js +12 -8
- package/lib/components/table/Table.js +211 -224
- package/lib/components/table/Table.redux.js +292 -329
- package/lib/components/table/Table.redux.test.js +49 -47
- package/lib/components/table/Table.test.js +107 -132
- package/lib/components/table/defaults/BodyCell.js +12 -6
- package/lib/components/table/defaults/BodyRow.js +10 -4
- package/lib/components/table/defaults/BooleanFilter.js +17 -11
- package/lib/components/table/defaults/EmptyBodyRow.js +12 -6
- package/lib/components/table/defaults/FilterLayout.js +17 -11
- package/lib/components/table/defaults/Footer.js +11 -5
- package/lib/components/table/defaults/FooterCell.js +10 -4
- package/lib/components/table/defaults/FooterRow.js +10 -4
- package/lib/components/table/defaults/Header.js +10 -4
- package/lib/components/table/defaults/HeaderCell.js +16 -10
- package/lib/components/table/defaults/HeaderRow.js +10 -4
- package/lib/components/table/defaults/PaginationControl.js +18 -9
- package/lib/components/table/defaults/TableBody.js +10 -4
- package/lib/components/table/defaults/TableLayout.js +12 -6
- package/lib/components/table/defaults/TextFilter.js +16 -10
- package/lib/components/table/defaults/index.js +41 -33
- package/lib/components/task/builder/Connector.js +100 -111
- package/lib/components/task/builder/ConnectorForm.js +17 -11
- package/lib/components/task/builder/Node.js +101 -83
- package/lib/components/task/builder/NodeForm.js +30 -27
- package/lib/components/task/builder/NodeParametersForm.js +27 -24
- package/lib/components/task/builder/SvgCanvas.js +67 -96
- package/lib/components/task/builder/SvgText.js +19 -134
- package/lib/components/task/builder/TaskDefinitionConfigForm.js +27 -22
- package/lib/components/task/builder/TreeBuilder.js +140 -115
- package/lib/components/task/builder/builder.redux.js +311 -326
- package/lib/components/task/builder/constants.js +94 -45
- package/lib/components/task/builder/helpers.js +184 -173
- package/lib/components/task/builder/helpers.test.js +20 -18
- package/lib/components/task/builder/models.js +121 -98
- package/lib/components/task/category/TaskCategoryForm.js +31 -29
- package/lib/components/task/category/TaskCategoryTable.js +12 -8
- package/lib/components/task/common/UsageTable.js +16 -12
- package/lib/components/task/engine/EngineSettingsForm.js +13 -11
- package/lib/components/task/errors/RunErrorTable.js +17 -13
- package/lib/components/task/errors/SystemErrorsTable.js +13 -9
- package/lib/components/task/handlers/HandlerForm.js +55 -55
- package/lib/components/task/handlers/HandlerTable.js +12 -8
- package/lib/components/task/handlers/MissingHandlerTable.js +12 -8
- package/lib/components/task/policy_rule/PolicyRuleForm.js +33 -32
- package/lib/components/task/policy_rule/PolicyRuleTable.js +12 -8
- package/lib/components/task/runs/CreateManualTriggerForm.js +17 -15
- package/lib/components/task/runs/RunTable.js +23 -20
- package/lib/components/task/runs/RunTaskTable.js +10 -6
- package/lib/components/task/sources/SourceForm.js +47 -47
- package/lib/components/task/sources/SourceTable.js +14 -11
- package/lib/components/task/triggers/TriggerTable.js +21 -18
- package/lib/components/task/workflows/LinkedWorkflowForm.js +48 -54
- package/lib/components/task/workflows/LinkedWorkflowTable.js +14 -10
- package/lib/components/task/workflows/MissingRoutineTable.js +12 -8
- package/lib/components/task/workflows/WorkflowForm.js +49 -44
- package/lib/components/task/workflows/WorkflowTable.js +17 -14
- package/lib/helpers/SearchBuilder.js +73 -127
- package/lib/helpers/SearchBuilder.test.js +184 -175
- package/lib/helpers/index.js +116 -74
- package/lib/index.js +86 -38
- package/lib/reducer.js +11 -3
- package/lib/saga.js +42 -38
- package/lib/store.js +59 -35
- package/package.json +3 -28
- package/proxyhelper.js +105 -46
- package/assets/discussions/images/avi_128.png +0 -0
- package/assets/discussions/images/excel_128.png +0 -0
- package/assets/discussions/images/html_128.png +0 -0
- package/assets/discussions/images/illustrator_128.png +0 -0
- package/assets/discussions/images/indesign_128.png +0 -0
- package/assets/discussions/images/movie_128.png +0 -0
- package/assets/discussions/images/mpeg_128.png +0 -0
- package/assets/discussions/images/pdf_128.png +0 -0
- package/assets/discussions/images/photoshop_128.png +0 -0
- package/assets/discussions/images/powerpoint_128.png +0 -0
- package/assets/discussions/images/txt_128.png +0 -0
- package/assets/discussions/images/unknown_128.png +0 -0
- package/assets/discussions/images/word_128.png +0 -0
- package/assets/discussions/styles/_discussion.scss +0 -506
- package/lib/apis/discussions/index.js +0 -395
- package/lib/apis/socket/index.js +0 -77
- package/lib/apis/socket/socket.js +0 -350
- package/lib/apis/socket/socket.test.js +0 -90
- package/lib/apis/socket/timer.js +0 -45
- package/lib/apis/socket/timer.test.js +0 -51
- package/lib/apis/socket/topic.js +0 -185
- package/lib/apis/topics/index.js +0 -19
- package/lib/components/discussions/ChatInputForm.js +0 -424
- package/lib/components/discussions/DateBanner.js +0 -10
- package/lib/components/discussions/Discussion.js +0 -202
- package/lib/components/discussions/DiscussionForm.js +0 -227
- package/lib/components/discussions/InvitationForm.js +0 -107
- package/lib/components/discussions/MessageHistory.js +0 -110
- package/lib/components/discussions/MessagesByDate.js +0 -40
- package/lib/components/discussions/MessagesList.js +0 -30
- package/lib/components/discussions/MoreMessagesBanner.js +0 -26
- package/lib/components/discussions/ScrollHelper.js +0 -84
- package/lib/components/discussions/SystemMessage.js +0 -88
- package/lib/components/discussions/SystemMessageGroup.js +0 -15
- package/lib/components/discussions/UserMessage.js +0 -163
- package/lib/components/discussions/UserMessageGroup.js +0 -34
- package/lib/components/discussions/redux.js +0 -178
- package/lib/components/discussions/sagas.js +0 -500
- package/lib/helpers/discussions/canManage.js +0 -30
- package/lib/helpers/discussions/canManage.test.js +0 -69
- package/lib/helpers/discussions/generateSystemMessageContent.js +0 -131
- package/lib/helpers/discussions/generateSystemMessageContent.test.js +0 -450
- package/lib/models/discussions.js +0 -76
- package/lib/models/index.js +0 -1
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.PolicyRuleForm = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _immutable = require("immutable");
|
|
10
|
+
var _apis = require("../../../apis");
|
|
11
|
+
var _Form = require("../../form/Form");
|
|
5
12
|
var SYSTEM_DEFAULTS = ['Allow All', 'Deny All'];
|
|
6
13
|
var POLICY_TYPES = ['Category Access', 'Console Access', 'API Access'];
|
|
7
14
|
var CONSOLE_LIST = ['Categories', 'Dashboard', 'Engine', 'Environment', 'Errors', 'Handlers', 'Logs', 'Routines', 'Runs', 'Staged', 'System Errors', 'Trees', 'Access Keys', 'ApiV2', 'Console Access', 'Groups', 'Policy Rules', 'Setup', 'Sources', 'Users'];
|
|
8
|
-
|
|
9
15
|
var dataSources = function dataSources(_ref) {
|
|
10
16
|
var policyName = _ref.policyName,
|
|
11
|
-
|
|
17
|
+
policyType = _ref.policyType;
|
|
12
18
|
return {
|
|
13
19
|
categories: {
|
|
14
|
-
fn: fetchTaskCategories,
|
|
20
|
+
fn: _apis.fetchTaskCategories,
|
|
15
21
|
params: [{
|
|
16
22
|
include: 'details'
|
|
17
23
|
}],
|
|
@@ -20,7 +26,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
20
26
|
}
|
|
21
27
|
},
|
|
22
28
|
sources: {
|
|
23
|
-
fn: fetchSources,
|
|
29
|
+
fn: _apis.fetchSources,
|
|
24
30
|
params: [{
|
|
25
31
|
include: 'details'
|
|
26
32
|
}],
|
|
@@ -29,7 +35,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
29
35
|
}
|
|
30
36
|
},
|
|
31
37
|
policyRule: {
|
|
32
|
-
fn: fetchPolicyRule,
|
|
38
|
+
fn: _apis.fetchPolicyRule,
|
|
33
39
|
params: policyName && [{
|
|
34
40
|
policyName: policyName,
|
|
35
41
|
policyType: policyType,
|
|
@@ -41,30 +47,26 @@ var dataSources = function dataSources(_ref) {
|
|
|
41
47
|
}
|
|
42
48
|
};
|
|
43
49
|
};
|
|
44
|
-
|
|
45
50
|
var handleSubmit = function handleSubmit(_ref2) {
|
|
46
51
|
var policyName = _ref2.policyName;
|
|
47
52
|
return function (values) {
|
|
48
|
-
return (policyName ? updatePolicyRule : createPolicyRule)({
|
|
53
|
+
return (policyName ? _apis.updatePolicyRule : _apis.createPolicyRule)({
|
|
49
54
|
policy: values.toJS(),
|
|
50
55
|
policyName: policyName,
|
|
51
56
|
policyType: values.get('type')
|
|
52
57
|
}).then(function (_ref3) {
|
|
53
58
|
var policyRule = _ref3.policyRule,
|
|
54
|
-
|
|
55
|
-
|
|
59
|
+
error = _ref3.error;
|
|
56
60
|
if (error) {
|
|
57
61
|
throw error.statusCode === 400 && error.message || 'There was an error saving the policy rule';
|
|
58
62
|
}
|
|
59
|
-
|
|
60
63
|
return policyRule;
|
|
61
64
|
});
|
|
62
65
|
};
|
|
63
66
|
};
|
|
64
|
-
|
|
65
67
|
var fields = function fields(_ref4) {
|
|
66
68
|
var policyName = _ref4.policyName,
|
|
67
|
-
|
|
69
|
+
policyType = _ref4.policyType;
|
|
68
70
|
return function (_ref5) {
|
|
69
71
|
var policyRule = _ref5.policyRule;
|
|
70
72
|
return (!policyName || policyRule) && [{
|
|
@@ -97,7 +99,6 @@ var fields = function fields(_ref4) {
|
|
|
97
99
|
onChange: function onChange(_ref6, _ref7) {
|
|
98
100
|
var values = _ref6.values;
|
|
99
101
|
var setValue = _ref7.setValue;
|
|
100
|
-
|
|
101
102
|
if (values.get('type') === 'System Default') {
|
|
102
103
|
if (values.get('name') === 'Allow All') {
|
|
103
104
|
setValue('rule', 'true');
|
|
@@ -134,7 +135,7 @@ var fields = function fields(_ref4) {
|
|
|
134
135
|
options: function options(_ref9) {
|
|
135
136
|
var categories = _ref9.categories;
|
|
136
137
|
return categories ? categories.map(function (category) {
|
|
137
|
-
return Map({
|
|
138
|
+
return (0, _immutable.Map)({
|
|
138
139
|
label: category.get('name'),
|
|
139
140
|
value: category.get('name')
|
|
140
141
|
});
|
|
@@ -185,7 +186,7 @@ var fields = function fields(_ref4) {
|
|
|
185
186
|
options: function options(_ref14) {
|
|
186
187
|
var sources = _ref14.sources;
|
|
187
188
|
return sources ? sources.map(function (source) {
|
|
188
|
-
return Map({
|
|
189
|
+
return (0, _immutable.Map)({
|
|
189
190
|
label: source.get('name'),
|
|
190
191
|
value: source.get('name')
|
|
191
192
|
});
|
|
@@ -203,19 +204,18 @@ var fields = function fields(_ref4) {
|
|
|
203
204
|
}];
|
|
204
205
|
};
|
|
205
206
|
};
|
|
206
|
-
|
|
207
|
-
export var PolicyRuleForm = function PolicyRuleForm(_ref16) {
|
|
207
|
+
var PolicyRuleForm = function PolicyRuleForm(_ref16) {
|
|
208
208
|
var addFields = _ref16.addFields,
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
return /*#__PURE__*/
|
|
209
|
+
alterFields = _ref16.alterFields,
|
|
210
|
+
fieldSet = _ref16.fieldSet,
|
|
211
|
+
formKey = _ref16.formKey,
|
|
212
|
+
components = _ref16.components,
|
|
213
|
+
onSave = _ref16.onSave,
|
|
214
|
+
onError = _ref16.onError,
|
|
215
|
+
children = _ref16.children,
|
|
216
|
+
policyName = _ref16.policyName,
|
|
217
|
+
policyType = _ref16.policyType;
|
|
218
|
+
return /*#__PURE__*/_react["default"].createElement(_Form.Form, {
|
|
219
219
|
addFields: addFields,
|
|
220
220
|
alterFields: alterFields,
|
|
221
221
|
fieldSet: fieldSet,
|
|
@@ -231,4 +231,5 @@ export var PolicyRuleForm = function PolicyRuleForm(_ref16) {
|
|
|
231
231
|
policyType: policyType
|
|
232
232
|
}
|
|
233
233
|
}, children);
|
|
234
|
-
};
|
|
234
|
+
};
|
|
235
|
+
exports.PolicyRuleForm = PolicyRuleForm;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import { fetchPolicyRules } from '../../../apis';
|
|
3
|
-
import { defineFilter } from '../../../helpers';
|
|
4
|
-
var clientSide = defineFilter(true).startsWith('name', 'name').startsWith('type', 'type').end();
|
|
1
|
+
"use strict";
|
|
5
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PolicyRuleTable = void 0;
|
|
7
|
+
var _Table = require("../../table/Table");
|
|
8
|
+
var _apis = require("../../../apis");
|
|
9
|
+
var _helpers = require("../../../helpers");
|
|
10
|
+
var clientSide = (0, _helpers.defineFilter)(true).startsWith('name', 'name').startsWith('type', 'type').end();
|
|
6
11
|
var dataSource = function dataSource() {
|
|
7
12
|
return {
|
|
8
|
-
fn: fetchPolicyRules,
|
|
13
|
+
fn: _apis.fetchPolicyRules,
|
|
9
14
|
clientSide: clientSide,
|
|
10
15
|
params: function params() {
|
|
11
16
|
return [{
|
|
@@ -19,7 +24,6 @@ var dataSource = function dataSource() {
|
|
|
19
24
|
}
|
|
20
25
|
};
|
|
21
26
|
};
|
|
22
|
-
|
|
23
27
|
var filters = function filters() {
|
|
24
28
|
return function () {
|
|
25
29
|
return [{
|
|
@@ -29,7 +33,6 @@ var filters = function filters() {
|
|
|
29
33
|
}];
|
|
30
34
|
};
|
|
31
35
|
};
|
|
32
|
-
|
|
33
36
|
var columns = [{
|
|
34
37
|
value: 'name',
|
|
35
38
|
title: 'Name',
|
|
@@ -67,10 +70,11 @@ var columns = [{
|
|
|
67
70
|
title: 'Updated By',
|
|
68
71
|
sortable: true
|
|
69
72
|
}];
|
|
70
|
-
|
|
73
|
+
var PolicyRuleTable = (0, _Table.generateTable)({
|
|
71
74
|
columns: columns,
|
|
72
75
|
filters: filters,
|
|
73
76
|
dataSource: dataSource
|
|
74
77
|
});
|
|
78
|
+
exports.PolicyRuleTable = PolicyRuleTable;
|
|
75
79
|
PolicyRuleTable.propTypes = {};
|
|
76
80
|
PolicyRuleTable.displayName = 'PolicyRuleTable';
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import { createTaskTrigger } from '../../../apis';
|
|
3
|
-
import { generateForm } from '../../form/Form';
|
|
4
|
-
import { serializeNodeId } from '../builder/models';
|
|
1
|
+
"use strict";
|
|
5
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.CreateManualTriggerForm = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
|
+
var _apis = require("../../../apis");
|
|
10
|
+
var _Form = require("../../form/Form");
|
|
11
|
+
var _models = require("../builder/models");
|
|
6
12
|
var dataSources = function dataSources(_ref) {
|
|
7
13
|
var tree = _ref.tree;
|
|
8
14
|
return {
|
|
@@ -10,8 +16,8 @@ var dataSources = function dataSources(_ref) {
|
|
|
10
16
|
fn: function fn() {
|
|
11
17
|
return tree.nodes.map(function (node) {
|
|
12
18
|
return {
|
|
13
|
-
label: "".concat(node.name, " (").concat(serializeNodeId(node), ")"),
|
|
14
|
-
value: serializeNodeId(node)
|
|
19
|
+
label: "".concat(node.name, " (").concat((0, _models.serializeNodeId)(node), ")"),
|
|
20
|
+
value: (0, _models.serializeNodeId)(node)
|
|
15
21
|
};
|
|
16
22
|
}).valueSeq().toArray();
|
|
17
23
|
},
|
|
@@ -19,25 +25,21 @@ var dataSources = function dataSources(_ref) {
|
|
|
19
25
|
}
|
|
20
26
|
};
|
|
21
27
|
};
|
|
22
|
-
|
|
23
28
|
var handleSubmit = function handleSubmit(formOptions) {
|
|
24
29
|
return function (values) {
|
|
25
|
-
return createTaskTrigger(
|
|
30
|
+
return (0, _apis.createTaskTrigger)((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, formOptions), values.toJS())).then(function (_ref2) {
|
|
26
31
|
var error = _ref2.error,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
message = _ref2.message,
|
|
33
|
+
messageType = _ref2.messageType;
|
|
30
34
|
if (error) {
|
|
31
35
|
throw error.message || 'An error occurred while manually creating the trigger.';
|
|
32
36
|
}
|
|
33
|
-
|
|
34
37
|
if (messageType === 'success') {
|
|
35
38
|
return message;
|
|
36
39
|
}
|
|
37
40
|
});
|
|
38
41
|
};
|
|
39
42
|
};
|
|
40
|
-
|
|
41
43
|
var fields = function fields() {
|
|
42
44
|
return function (_ref3) {
|
|
43
45
|
var nodes = _ref3.nodes;
|
|
@@ -74,11 +76,11 @@ var fields = function fields() {
|
|
|
74
76
|
}];
|
|
75
77
|
};
|
|
76
78
|
};
|
|
77
|
-
|
|
78
|
-
export var CreateManualTriggerForm = generateForm({
|
|
79
|
+
var CreateManualTriggerForm = (0, _Form.generateForm)({
|
|
79
80
|
formOptions: ['runId', 'tree'],
|
|
80
81
|
dataSources: dataSources,
|
|
81
82
|
fields: fields,
|
|
82
83
|
handleSubmit: handleSubmit
|
|
83
84
|
});
|
|
85
|
+
exports.CreateManualTriggerForm = CreateManualTriggerForm;
|
|
84
86
|
CreateManualTriggerForm.displayName = 'CreateManualTriggerForm';
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RunTable = void 0;
|
|
7
|
+
var _apis = require("../../../apis");
|
|
8
|
+
var _Table = require("../../table/Table");
|
|
9
|
+
var _immutable = require("immutable");
|
|
10
|
+
var ORDER_BY = (0, _immutable.Map)({
|
|
5
11
|
sourceName: 'tree.sourceRoot.name',
|
|
6
12
|
sourceGroup: 'tree.sourceGroup',
|
|
7
13
|
tree: 'tree.name',
|
|
@@ -13,17 +19,16 @@ var RUN_TYPES = ['Tree', 'Global Routine', 'Local Routine'].map(function (v) {
|
|
|
13
19
|
value: v
|
|
14
20
|
};
|
|
15
21
|
});
|
|
16
|
-
|
|
17
22
|
var dataSource = function dataSource(_ref) {
|
|
18
23
|
var sourceName = _ref.sourceName,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
sourceGroup = _ref.sourceGroup,
|
|
25
|
+
treeName = _ref.treeName,
|
|
26
|
+
treeType = _ref.treeType,
|
|
27
|
+
sourceId = _ref.sourceId,
|
|
28
|
+
id = _ref.id,
|
|
29
|
+
count = _ref.count;
|
|
25
30
|
return {
|
|
26
|
-
fn: fetchTaskRuns,
|
|
31
|
+
fn: _apis.fetchTaskRuns,
|
|
27
32
|
params: function params(paramData) {
|
|
28
33
|
return [{
|
|
29
34
|
source: sourceName ? sourceName : paramData.filters.get('sourceName'),
|
|
@@ -55,11 +60,10 @@ var dataSource = function dataSource(_ref) {
|
|
|
55
60
|
}
|
|
56
61
|
};
|
|
57
62
|
};
|
|
58
|
-
|
|
59
63
|
var filterDataSources = function filterDataSources() {
|
|
60
64
|
return {
|
|
61
65
|
sourceTypes: {
|
|
62
|
-
fn: fetchSources,
|
|
66
|
+
fn: _apis.fetchSources,
|
|
63
67
|
params: [],
|
|
64
68
|
transform: function transform(result) {
|
|
65
69
|
return result.sources.filter(function (s) {
|
|
@@ -74,7 +78,6 @@ var filterDataSources = function filterDataSources() {
|
|
|
74
78
|
}
|
|
75
79
|
};
|
|
76
80
|
};
|
|
77
|
-
|
|
78
81
|
var filters = function filters() {
|
|
79
82
|
return function (_ref2) {
|
|
80
83
|
var sourceTypes = _ref2.sourceTypes;
|
|
@@ -120,7 +123,6 @@ var filters = function filters() {
|
|
|
120
123
|
}];
|
|
121
124
|
};
|
|
122
125
|
};
|
|
123
|
-
|
|
124
126
|
var columns = [{
|
|
125
127
|
value: 'id',
|
|
126
128
|
title: 'Id',
|
|
@@ -132,7 +134,7 @@ var columns = [{
|
|
|
132
134
|
}, {
|
|
133
135
|
value: 'sourceName',
|
|
134
136
|
valueTransform: function valueTransform(_value, row) {
|
|
135
|
-
return getIn(row, ['source', 'name'], '');
|
|
137
|
+
return (0, _immutable.getIn)(row, ['source', 'name'], '');
|
|
136
138
|
},
|
|
137
139
|
title: 'Source',
|
|
138
140
|
sortable: true
|
|
@@ -145,7 +147,7 @@ var columns = [{
|
|
|
145
147
|
title: 'Tree',
|
|
146
148
|
sortable: true,
|
|
147
149
|
valueTransform: function valueTransform(value) {
|
|
148
|
-
return get(value, 'name', '');
|
|
150
|
+
return (0, _immutable.get)(value, 'name', '');
|
|
149
151
|
}
|
|
150
152
|
}, {
|
|
151
153
|
value: 'sourceGroup',
|
|
@@ -182,10 +184,11 @@ var columns = [{
|
|
|
182
184
|
title: 'Updated By',
|
|
183
185
|
sortable: false
|
|
184
186
|
}];
|
|
185
|
-
|
|
187
|
+
var RunTable = (0, _Table.generateTable)({
|
|
186
188
|
tableOptions: ['sourceName', 'sourceGroup', 'treeName', 'sourceId', 'count'],
|
|
187
189
|
columns: columns,
|
|
188
190
|
filters: filters,
|
|
189
191
|
dataSource: dataSource,
|
|
190
192
|
filterDataSources: filterDataSources
|
|
191
|
-
});
|
|
193
|
+
});
|
|
194
|
+
exports.RunTable = RunTable;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineFilter } from '../../../helpers';
|
|
3
|
-
var clientSide = defineFilter(true).startsWith('name', 'name').equals('status', 'status').end();
|
|
1
|
+
"use strict";
|
|
4
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RunTaskTable = void 0;
|
|
7
|
+
var _ = require("../..");
|
|
8
|
+
var _helpers = require("../../../helpers");
|
|
9
|
+
var clientSide = (0, _helpers.defineFilter)(true).startsWith('name', 'name').equals('status', 'status').end();
|
|
5
10
|
var dataSource = function dataSource(_ref) {
|
|
6
11
|
var run = _ref.run;
|
|
7
12
|
return {
|
|
@@ -19,7 +24,6 @@ var dataSource = function dataSource(_ref) {
|
|
|
19
24
|
}
|
|
20
25
|
};
|
|
21
26
|
};
|
|
22
|
-
|
|
23
27
|
var filters = function filters() {
|
|
24
28
|
return function () {
|
|
25
29
|
return [{
|
|
@@ -33,7 +37,6 @@ var filters = function filters() {
|
|
|
33
37
|
}];
|
|
34
38
|
};
|
|
35
39
|
};
|
|
36
|
-
|
|
37
40
|
var columns = [{
|
|
38
41
|
value: 'nodeName',
|
|
39
42
|
title: 'Node Name',
|
|
@@ -51,10 +54,11 @@ var columns = [{
|
|
|
51
54
|
title: 'Created',
|
|
52
55
|
sortable: true
|
|
53
56
|
}];
|
|
54
|
-
|
|
57
|
+
var RunTaskTable = (0, _.generateTable)({
|
|
55
58
|
tableOptions: ['run'],
|
|
56
59
|
dataSource: dataSource,
|
|
57
60
|
filters: filters,
|
|
58
61
|
columns: columns
|
|
59
62
|
});
|
|
63
|
+
exports.RunTaskTable = RunTaskTable;
|
|
60
64
|
RunTaskTable.displayName = 'RunTaskTable';
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
import { get, getIn, List, Map } from 'immutable';
|
|
3
|
-
import { createSource, fetchPolicyRules, fetchSource, fetchSourceAdapters, updateSource } from '../../../apis/task';
|
|
4
|
-
import { generateForm } from '../../form/Form';
|
|
5
|
-
import { buildPropertyFields } from '../../form/Form.helpers';
|
|
1
|
+
"use strict";
|
|
6
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.SourceForm = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
9
|
+
var _immutable = require("immutable");
|
|
10
|
+
var _task = require("../../../apis/task");
|
|
11
|
+
var _Form = require("../../form/Form");
|
|
12
|
+
var _Form2 = require("../../form/Form.helpers");
|
|
7
13
|
var dataSources = function dataSources(_ref) {
|
|
8
14
|
var sourceName = _ref.sourceName,
|
|
9
|
-
|
|
15
|
+
sourceType = _ref.sourceType;
|
|
10
16
|
return {
|
|
11
17
|
source: {
|
|
12
|
-
fn: fetchSource,
|
|
18
|
+
fn: _task.fetchSource,
|
|
13
19
|
params: sourceName && [{
|
|
14
20
|
sourceName: sourceName,
|
|
15
21
|
include: 'details,policyRules,properties'
|
|
@@ -19,7 +25,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
19
25
|
}
|
|
20
26
|
},
|
|
21
27
|
policyRules: {
|
|
22
|
-
fn: fetchPolicyRules,
|
|
28
|
+
fn: _task.fetchPolicyRules,
|
|
23
29
|
params: [{
|
|
24
30
|
type: 'API Access',
|
|
25
31
|
include: 'details'
|
|
@@ -29,7 +35,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
29
35
|
}
|
|
30
36
|
},
|
|
31
37
|
sourceAdapters: {
|
|
32
|
-
fn: fetchSourceAdapters,
|
|
38
|
+
fn: _task.fetchSourceAdapters,
|
|
33
39
|
params: [{
|
|
34
40
|
include: 'details'
|
|
35
41
|
}],
|
|
@@ -43,75 +49,69 @@ var dataSources = function dataSources(_ref) {
|
|
|
43
49
|
var adapter = sourceAdapters.find(function (adapter) {
|
|
44
50
|
return adapter.get('name') === sourceAdapterType;
|
|
45
51
|
});
|
|
46
|
-
return adapter ? List(adapter.get('properties')) : List();
|
|
52
|
+
return adapter ? (0, _immutable.List)(adapter.get('properties')) : (0, _immutable.List)();
|
|
47
53
|
},
|
|
48
54
|
params: function params(_ref2) {
|
|
49
55
|
var source = _ref2.source,
|
|
50
|
-
|
|
56
|
+
sourceAdapters = _ref2.sourceAdapters;
|
|
51
57
|
return (!sourceName || source) && sourceAdapters && [sourceAdapters, source];
|
|
52
58
|
}
|
|
53
59
|
}
|
|
54
60
|
};
|
|
55
61
|
};
|
|
56
|
-
|
|
57
62
|
var handleSubmit = function handleSubmit(_ref3) {
|
|
58
63
|
var sourceName = _ref3.sourceName;
|
|
59
64
|
return function (values) {
|
|
60
|
-
return (sourceName ? updateSource : createSource)({
|
|
65
|
+
return (sourceName ? _task.updateSource : _task.createSource)({
|
|
61
66
|
sourceName: sourceName,
|
|
62
67
|
source: values.toJS()
|
|
63
68
|
}).then(function (_ref4) {
|
|
64
69
|
var source = _ref4.source,
|
|
65
|
-
|
|
66
|
-
|
|
70
|
+
error = _ref4.error;
|
|
67
71
|
if (error) {
|
|
68
72
|
throw error.statusCode === 400 && error.message || 'There was an error saving the source';
|
|
69
73
|
}
|
|
70
|
-
|
|
71
74
|
return source;
|
|
72
75
|
});
|
|
73
76
|
};
|
|
74
77
|
};
|
|
75
|
-
|
|
76
78
|
var fields = function fields(_ref5) {
|
|
77
79
|
var sourceName = _ref5.sourceName,
|
|
78
|
-
|
|
80
|
+
sourceType = _ref5.sourceType;
|
|
79
81
|
return function (_ref6) {
|
|
80
82
|
var adapterProperties = _ref6.adapterProperties,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
source = _ref6.source,
|
|
84
|
+
sourceAdapters = _ref6.sourceAdapters;
|
|
84
85
|
if (adapterProperties) {
|
|
85
|
-
var _buildPropertyFields = buildPropertyFields({
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
86
|
+
var _buildPropertyFields = (0, _Form2.buildPropertyFields)({
|
|
87
|
+
isNew: !source,
|
|
88
|
+
properties: adapterProperties,
|
|
89
|
+
getName: function getName(property) {
|
|
90
|
+
return property.get('name');
|
|
91
|
+
},
|
|
92
|
+
getRequired: function getRequired(property) {
|
|
93
|
+
return property.get('required');
|
|
94
|
+
},
|
|
95
|
+
getSensitive: function getSensitive(property) {
|
|
96
|
+
return property.get('sensitive');
|
|
97
|
+
},
|
|
98
|
+
getValue: function getValue(property) {
|
|
99
|
+
return (0, _immutable.getIn)(source, ['properties', property.get('name')], '');
|
|
100
|
+
}
|
|
101
|
+
}),
|
|
102
|
+
propertiesFields = _buildPropertyFields.propertiesFields,
|
|
103
|
+
propertiesSerialize = _buildPropertyFields.propertiesSerialize;
|
|
104
104
|
return [{
|
|
105
105
|
name: 'type',
|
|
106
106
|
label: 'Type',
|
|
107
107
|
required: true,
|
|
108
108
|
enabled: false,
|
|
109
|
-
initialValue: sourceType ? sourceType : get(source, 'type', '')
|
|
109
|
+
initialValue: sourceType ? sourceType : (0, _immutable.get)(source, 'type', '')
|
|
110
110
|
}, {
|
|
111
111
|
name: 'name',
|
|
112
112
|
label: 'Name',
|
|
113
113
|
required: true,
|
|
114
|
-
initialValue: get(source, 'name', ''),
|
|
114
|
+
initialValue: (0, _immutable.get)(source, 'name', ''),
|
|
115
115
|
type: 'text'
|
|
116
116
|
}, {
|
|
117
117
|
name: 'policyRules',
|
|
@@ -121,7 +121,7 @@ var fields = function fields(_ref5) {
|
|
|
121
121
|
options: function options(_ref7) {
|
|
122
122
|
var policyRules = _ref7.policyRules;
|
|
123
123
|
return policyRules ? policyRules.map(function (policyRule) {
|
|
124
|
-
return Map({
|
|
124
|
+
return (0, _immutable.Map)({
|
|
125
125
|
label: policyRule.get('name'),
|
|
126
126
|
value: policyRule.get('name')
|
|
127
127
|
});
|
|
@@ -142,17 +142,17 @@ var fields = function fields(_ref5) {
|
|
|
142
142
|
}, {
|
|
143
143
|
name: 'properties',
|
|
144
144
|
visible: false,
|
|
145
|
-
initialValue: get(source, 'properties', []),
|
|
145
|
+
initialValue: (0, _immutable.get)(source, 'properties', []),
|
|
146
146
|
serialize: propertiesSerialize
|
|
147
|
-
}].concat(
|
|
147
|
+
}].concat((0, _toConsumableArray2["default"])(propertiesFields));
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
150
|
};
|
|
151
|
-
|
|
152
|
-
export var SourceForm = generateForm({
|
|
151
|
+
var SourceForm = (0, _Form.generateForm)({
|
|
153
152
|
formOptions: ['sourceName', 'sourceType'],
|
|
154
153
|
dataSources: dataSources,
|
|
155
154
|
fields: fields,
|
|
156
155
|
handleSubmit: handleSubmit
|
|
157
156
|
});
|
|
157
|
+
exports.SourceForm = SourceForm;
|
|
158
158
|
SourceForm.displayName = 'SourceForm';
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import { fetchSources } from '../../../apis';
|
|
3
|
-
import { defineFilter } from '../../../helpers';
|
|
4
|
-
import { fetchSourceAdapters } from '../../../apis/task';
|
|
5
|
-
var clientSide = defineFilter(true).startsWith('name', 'name').equals('type', 'type').end();
|
|
1
|
+
"use strict";
|
|
6
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SourceTable = void 0;
|
|
7
|
+
var _Table = require("../../table/Table");
|
|
8
|
+
var _apis = require("../../../apis");
|
|
9
|
+
var _helpers = require("../../../helpers");
|
|
10
|
+
var _task = require("../../../apis/task");
|
|
11
|
+
var clientSide = (0, _helpers.defineFilter)(true).startsWith('name', 'name').equals('type', 'type').end();
|
|
7
12
|
var filterDataSources = function filterDataSources() {
|
|
8
13
|
return {
|
|
9
14
|
sourceTypes: {
|
|
10
|
-
fn: fetchSourceAdapters,
|
|
15
|
+
fn: _task.fetchSourceAdapters,
|
|
11
16
|
params: [],
|
|
12
17
|
transform: function transform(result) {
|
|
13
18
|
return result.sourceAdapters.map(function (st) {
|
|
@@ -20,10 +25,9 @@ var filterDataSources = function filterDataSources() {
|
|
|
20
25
|
}
|
|
21
26
|
};
|
|
22
27
|
};
|
|
23
|
-
|
|
24
28
|
var dataSource = function dataSource() {
|
|
25
29
|
return {
|
|
26
|
-
fn: fetchSources,
|
|
30
|
+
fn: _apis.fetchSources,
|
|
27
31
|
params: function params() {
|
|
28
32
|
return [{
|
|
29
33
|
include: 'details'
|
|
@@ -37,7 +41,6 @@ var dataSource = function dataSource() {
|
|
|
37
41
|
clientSide: clientSide
|
|
38
42
|
};
|
|
39
43
|
};
|
|
40
|
-
|
|
41
44
|
var filters = function filters() {
|
|
42
45
|
return function (_ref) {
|
|
43
46
|
var sourceTypes = _ref.sourceTypes;
|
|
@@ -53,7 +56,6 @@ var filters = function filters() {
|
|
|
53
56
|
}];
|
|
54
57
|
};
|
|
55
58
|
};
|
|
56
|
-
|
|
57
59
|
var columns = [{
|
|
58
60
|
title: 'ID',
|
|
59
61
|
value: 'id'
|
|
@@ -76,10 +78,11 @@ var columns = [{
|
|
|
76
78
|
title: 'Updated By',
|
|
77
79
|
value: 'updatedBy'
|
|
78
80
|
}];
|
|
79
|
-
|
|
81
|
+
var SourceTable = (0, _Table.generateTable)({
|
|
80
82
|
columns: columns,
|
|
81
83
|
filters: filters,
|
|
82
84
|
filterDataSources: filterDataSources,
|
|
83
85
|
dataSource: dataSource
|
|
84
86
|
});
|
|
87
|
+
exports.SourceTable = SourceTable;
|
|
85
88
|
SourceTable.displayName = 'SourceTable';
|