@kineticdata/react 5.1.1 → 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 +61 -45
- package/lib/apis/core/bridgeModels.test.js +64 -80
- package/lib/apis/core/bridgedresources.js +64 -71
- package/lib/apis/core/bridgedresources.test.js +34 -31
- 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 -48
- 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 +30 -0
- 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 +220 -172
- package/lib/apis/core/submissions.test.js +81 -51
- 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 +64 -0
- package/lib/apis/http.js +89 -80
- package/lib/apis/http.test.js +37 -38
- package/lib/apis/index.js +506 -48
- package/lib/apis/system/index.js +228 -211
- package/lib/apis/task/index.js +283 -226
- 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 -133
- 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 +219 -225
- package/lib/components/table/Table.redux.js +298 -327
- 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 +28 -23
- package/lib/components/task/builder/TreeBuilder.js +140 -115
- package/lib/components/task/builder/builder.redux.js +322 -300
- 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 +133 -91
- 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 +249 -0
- package/lib/components/task/workflows/LinkedWorkflowTable.js +137 -0
- package/lib/components/task/workflows/MissingRoutineTable.js +12 -8
- package/lib/components/task/workflows/WorkflowForm.js +61 -46
- 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 +4 -29
- package/proxyhelper.js +105 -47
- 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,16 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
import { get, getIn, List, Map } from 'immutable';
|
|
3
|
-
import { generateForm } from '../../form/Form';
|
|
4
|
-
import { createBridge, fetchAdapters, fetchBridge, updateBridge } from '../../../apis';
|
|
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.BridgeForm = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
9
|
+
var _immutable = require("immutable");
|
|
10
|
+
var _Form = require("../../form/Form");
|
|
11
|
+
var _apis = require("../../../apis");
|
|
12
|
+
var _Form2 = require("../../form/Form.helpers");
|
|
7
13
|
var dataSources = function dataSources(_ref) {
|
|
8
14
|
var bridgeSlug = _ref.bridgeSlug,
|
|
9
|
-
|
|
10
|
-
|
|
15
|
+
agentSlug = _ref.agentSlug,
|
|
16
|
+
adapterClass = _ref.adapterClass;
|
|
11
17
|
return {
|
|
12
18
|
bridge: {
|
|
13
|
-
fn: fetchBridge,
|
|
19
|
+
fn: _apis.fetchBridge,
|
|
14
20
|
params: bridgeSlug && [{
|
|
15
21
|
agentSlug: agentSlug,
|
|
16
22
|
bridgeSlug: bridgeSlug,
|
|
@@ -21,7 +27,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
21
27
|
}
|
|
22
28
|
},
|
|
23
29
|
adapters: {
|
|
24
|
-
fn: fetchAdapters,
|
|
30
|
+
fn: _apis.fetchAdapters,
|
|
25
31
|
params: [{
|
|
26
32
|
include: 'details',
|
|
27
33
|
type: 'bridge',
|
|
@@ -37,75 +43,69 @@ var dataSources = function dataSources(_ref) {
|
|
|
37
43
|
var adapter = adapters.find(function (adapter) {
|
|
38
44
|
return adapter.get('class') === appliedAdapterClass;
|
|
39
45
|
});
|
|
40
|
-
return adapter ? List(adapter.get('properties')) : List();
|
|
46
|
+
return adapter ? (0, _immutable.List)(adapter.get('properties')) : (0, _immutable.List)();
|
|
41
47
|
},
|
|
42
48
|
params: function params(_ref2) {
|
|
43
49
|
var adapters = _ref2.adapters,
|
|
44
|
-
|
|
50
|
+
bridge = _ref2.bridge;
|
|
45
51
|
return (!bridgeSlug || bridge) && adapters && [adapters, bridge];
|
|
46
52
|
}
|
|
47
53
|
}
|
|
48
54
|
};
|
|
49
55
|
};
|
|
50
|
-
|
|
51
56
|
var handleSubmit = function handleSubmit(_ref3) {
|
|
52
57
|
var bridgeSlug = _ref3.bridgeSlug,
|
|
53
|
-
|
|
58
|
+
agentSlug = _ref3.agentSlug;
|
|
54
59
|
return function (values) {
|
|
55
|
-
return (bridgeSlug ? updateBridge : createBridge)({
|
|
60
|
+
return (bridgeSlug ? _apis.updateBridge : _apis.createBridge)({
|
|
56
61
|
bridgeSlug: bridgeSlug,
|
|
57
62
|
agentSlug: agentSlug,
|
|
58
63
|
bridge: values.toJS()
|
|
59
64
|
}).then(function (_ref4) {
|
|
60
65
|
var bridge = _ref4.bridge,
|
|
61
|
-
|
|
62
|
-
|
|
66
|
+
error = _ref4.error;
|
|
63
67
|
if (error) {
|
|
64
68
|
throw error.statusCode === 400 && error.message || 'There was an error saving the bridge';
|
|
65
69
|
}
|
|
66
|
-
|
|
67
70
|
return bridge;
|
|
68
71
|
});
|
|
69
72
|
};
|
|
70
73
|
};
|
|
71
|
-
|
|
72
74
|
var fields = function fields(_ref5) {
|
|
73
75
|
var bridgeSlug = _ref5.bridgeSlug,
|
|
74
|
-
|
|
76
|
+
adapterClass = _ref5.adapterClass;
|
|
75
77
|
return function (_ref6) {
|
|
76
78
|
var bridge = _ref6.bridge,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
adapters = _ref6.adapters,
|
|
80
|
+
adapterProperties = _ref6.adapterProperties;
|
|
80
81
|
if (adapterProperties) {
|
|
81
|
-
var _buildPropertyFields = buildPropertyFields({
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
82
|
+
var _buildPropertyFields = (0, _Form2.buildPropertyFields)({
|
|
83
|
+
isNew: !bridge,
|
|
84
|
+
properties: adapterProperties,
|
|
85
|
+
getName: function getName(property) {
|
|
86
|
+
return property.get('name');
|
|
87
|
+
},
|
|
88
|
+
getRequired: function getRequired(property) {
|
|
89
|
+
return property.get('required');
|
|
90
|
+
},
|
|
91
|
+
getSensitive: function getSensitive(property) {
|
|
92
|
+
return property.get('sensitive');
|
|
93
|
+
},
|
|
94
|
+
getOptions: function getOptions(property) {
|
|
95
|
+
return property.get('options');
|
|
96
|
+
},
|
|
97
|
+
getValue: function getValue(property) {
|
|
98
|
+
return (0, _immutable.getIn)(bridge, ['properties', property.get('name')], '');
|
|
99
|
+
}
|
|
100
|
+
}),
|
|
101
|
+
propertiesFields = _buildPropertyFields.propertiesFields,
|
|
102
|
+
propertiesSerialize = _buildPropertyFields.propertiesSerialize;
|
|
103
103
|
return [{
|
|
104
104
|
name: 'slug',
|
|
105
105
|
label: 'Bridge Slug',
|
|
106
106
|
type: 'text',
|
|
107
107
|
required: true,
|
|
108
|
-
initialValue: get(bridge, 'slug', ''),
|
|
108
|
+
initialValue: (0, _immutable.get)(bridge, 'slug', ''),
|
|
109
109
|
pattern: /^[a-z\d-]+$/,
|
|
110
110
|
patternMessage: 'Bridge Slug may only contain letters, numbers, and dashes',
|
|
111
111
|
helpText: 'Unique name used in the bridge path.'
|
|
@@ -117,25 +117,25 @@ var fields = function fields(_ref5) {
|
|
|
117
117
|
required: false,
|
|
118
118
|
initialValue: bridge ? bridge.get('adapterClass') : adapterClass,
|
|
119
119
|
options: adapters.map(function (adapter) {
|
|
120
|
-
return Map({
|
|
120
|
+
return (0, _immutable.Map)({
|
|
121
121
|
value: adapter.get('class'),
|
|
122
122
|
label: adapter.get('name')
|
|
123
123
|
});
|
|
124
124
|
})
|
|
125
|
-
}].concat(
|
|
125
|
+
}].concat((0, _toConsumableArray2["default"])(propertiesFields), [{
|
|
126
126
|
name: 'properties',
|
|
127
127
|
visible: false,
|
|
128
|
-
initialValue: get(bridge, 'properties', {}),
|
|
128
|
+
initialValue: (0, _immutable.get)(bridge, 'properties', {}),
|
|
129
129
|
serialize: propertiesSerialize
|
|
130
130
|
}]);
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
};
|
|
134
|
-
|
|
135
|
-
export var BridgeForm = generateForm({
|
|
134
|
+
var BridgeForm = (0, _Form.generateForm)({
|
|
136
135
|
formOptions: ['bridgeSlug', 'adapterClass', 'agentSlug'],
|
|
137
136
|
dataSources: dataSources,
|
|
138
137
|
fields: fields,
|
|
139
138
|
handleSubmit: handleSubmit
|
|
140
139
|
});
|
|
140
|
+
exports.BridgeForm = BridgeForm;
|
|
141
141
|
BridgeForm.displayName = 'BridgeForm';
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
import { fetchBridges } from '../../../apis';
|
|
3
|
-
import { defineFilter } from '../../../helpers';
|
|
4
|
-
var clientSide = defineFilter(true).startsWith('slug', 'slug').startsWith('adapterClass', 'adapterClass').end();
|
|
1
|
+
"use strict";
|
|
5
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BridgeTable = 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('slug', 'slug').startsWith('adapterClass', 'adapterClass').end();
|
|
6
11
|
var dataSource = function dataSource(_ref) {
|
|
7
12
|
var agentSlug = _ref.agentSlug;
|
|
8
13
|
return {
|
|
9
|
-
fn: fetchBridges,
|
|
14
|
+
fn: _apis.fetchBridges,
|
|
10
15
|
clientSide: clientSide,
|
|
11
16
|
params: function params() {
|
|
12
17
|
return [{
|
|
@@ -21,7 +26,6 @@ var dataSource = function dataSource(_ref) {
|
|
|
21
26
|
}
|
|
22
27
|
};
|
|
23
28
|
};
|
|
24
|
-
|
|
25
29
|
var filters = function filters() {
|
|
26
30
|
return function () {
|
|
27
31
|
return [{
|
|
@@ -35,7 +39,6 @@ var filters = function filters() {
|
|
|
35
39
|
}];
|
|
36
40
|
};
|
|
37
41
|
};
|
|
38
|
-
|
|
39
42
|
var columns = [{
|
|
40
43
|
value: 'slug',
|
|
41
44
|
title: 'Slug',
|
|
@@ -48,10 +51,11 @@ var columns = [{
|
|
|
48
51
|
return _value.split('.').pop().match(/[A-Z][a-z]+/g).join(' ');
|
|
49
52
|
}
|
|
50
53
|
}];
|
|
51
|
-
|
|
54
|
+
var BridgeTable = (0, _Table.generateTable)({
|
|
52
55
|
tableOptions: ['agentSlug'],
|
|
53
56
|
columns: columns,
|
|
54
57
|
filters: filters,
|
|
55
58
|
dataSource: dataSource
|
|
56
59
|
});
|
|
60
|
+
exports.BridgeTable = BridgeTable;
|
|
57
61
|
BridgeTable.displayName = 'BridgeTable';
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
import { createFilestore, fetchFilestore, updateFilestore } from '../../../apis';
|
|
3
|
-
import { fetchAdapters } from '../../../apis';
|
|
4
|
-
import { get, getIn, List, Map } from 'immutable';
|
|
5
|
-
import { buildPropertyFields, handleFormErrors } from '../../form/Form.helpers';
|
|
6
|
-
import { generateForm } from '../../form/Form';
|
|
1
|
+
"use strict";
|
|
7
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.FilestoreForm = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
9
|
+
var _apis = require("../../../apis");
|
|
10
|
+
var _immutable = require("immutable");
|
|
11
|
+
var _Form = require("../../form/Form.helpers");
|
|
12
|
+
var _Form2 = require("../../form/Form");
|
|
8
13
|
var dataSources = function dataSources(_ref) {
|
|
9
14
|
var agentSlug = _ref.agentSlug,
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
filestoreSlug = _ref.filestoreSlug,
|
|
16
|
+
adapterClass = _ref.adapterClass;
|
|
12
17
|
return {
|
|
13
18
|
filestore: {
|
|
14
|
-
fn: fetchFilestore,
|
|
19
|
+
fn: _apis.fetchFilestore,
|
|
15
20
|
params: agentSlug && filestoreSlug && [{
|
|
16
21
|
agentSlug: agentSlug,
|
|
17
22
|
filestoreSlug: filestoreSlug,
|
|
@@ -22,7 +27,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
22
27
|
}
|
|
23
28
|
},
|
|
24
29
|
adapters: {
|
|
25
|
-
fn: fetchAdapters,
|
|
30
|
+
fn: _apis.fetchAdapters,
|
|
26
31
|
params: [{
|
|
27
32
|
include: 'details',
|
|
28
33
|
type: 'filestore',
|
|
@@ -38,65 +43,61 @@ var dataSources = function dataSources(_ref) {
|
|
|
38
43
|
var adapter = adapters.find(function (adapter) {
|
|
39
44
|
return adapter.get('class') === appliedAdapterClass;
|
|
40
45
|
});
|
|
41
|
-
return adapter ? List(adapter.get('properties')) : List();
|
|
46
|
+
return adapter ? (0, _immutable.List)(adapter.get('properties')) : (0, _immutable.List)();
|
|
42
47
|
},
|
|
43
48
|
params: function params(_ref2) {
|
|
44
49
|
var adapters = _ref2.adapters,
|
|
45
|
-
|
|
50
|
+
filestore = _ref2.filestore;
|
|
46
51
|
return (!filestoreSlug || filestore) && adapters && [adapters, filestore];
|
|
47
52
|
}
|
|
48
53
|
}
|
|
49
54
|
};
|
|
50
55
|
};
|
|
51
|
-
|
|
52
56
|
var handleSubmit = function handleSubmit(_ref3) {
|
|
53
57
|
var agentSlug = _ref3.agentSlug,
|
|
54
|
-
|
|
58
|
+
filestoreSlug = _ref3.filestoreSlug;
|
|
55
59
|
return function (values) {
|
|
56
|
-
return (filestoreSlug ? updateFilestore : createFilestore)({
|
|
60
|
+
return (filestoreSlug ? _apis.updateFilestore : _apis.createFilestore)({
|
|
57
61
|
agentSlug: agentSlug,
|
|
58
62
|
filestoreSlug: filestoreSlug,
|
|
59
63
|
filestore: values.toJS()
|
|
60
|
-
}).then(handleFormErrors('filestore', 'There was a problem saving the filestore.'));
|
|
64
|
+
}).then((0, _Form.handleFormErrors)('filestore', 'There was a problem saving the filestore.'));
|
|
61
65
|
};
|
|
62
66
|
};
|
|
63
|
-
|
|
64
67
|
var fields = function fields(_ref4) {
|
|
65
68
|
var adapterClass = _ref4.adapterClass;
|
|
66
69
|
return function (_ref5) {
|
|
67
70
|
var filestore = _ref5.filestore,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
adapters = _ref5.adapters,
|
|
72
|
+
adapterProperties = _ref5.adapterProperties;
|
|
71
73
|
if (adapterProperties) {
|
|
72
|
-
var _buildPropertyFields = buildPropertyFields({
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
74
|
+
var _buildPropertyFields = (0, _Form.buildPropertyFields)({
|
|
75
|
+
isNew: !filestore,
|
|
76
|
+
properties: adapterProperties,
|
|
77
|
+
getName: function getName(property) {
|
|
78
|
+
return property.get('name');
|
|
79
|
+
},
|
|
80
|
+
getRequired: function getRequired(property) {
|
|
81
|
+
return property.get('required');
|
|
82
|
+
},
|
|
83
|
+
getSensitive: function getSensitive(property) {
|
|
84
|
+
return property.get('sensitive');
|
|
85
|
+
},
|
|
86
|
+
getOptions: function getOptions(property) {
|
|
87
|
+
return property.get('options');
|
|
88
|
+
},
|
|
89
|
+
getValue: function getValue(property) {
|
|
90
|
+
return (0, _immutable.getIn)(filestore, ['properties', property.get('name')], '');
|
|
91
|
+
}
|
|
92
|
+
}),
|
|
93
|
+
propertiesFields = _buildPropertyFields.propertiesFields,
|
|
94
|
+
propertiesSerialize = _buildPropertyFields.propertiesSerialize;
|
|
94
95
|
return [{
|
|
95
96
|
name: 'slug',
|
|
96
97
|
label: 'Filestore Slug',
|
|
97
98
|
type: 'text',
|
|
98
99
|
required: true,
|
|
99
|
-
initialValue: get(filestore, 'slug', ''),
|
|
100
|
+
initialValue: (0, _immutable.get)(filestore, 'slug', ''),
|
|
100
101
|
pattern: /^[a-z\d-]+$/,
|
|
101
102
|
patternMessage: 'File Store Slug may only contain letters, numbers, and dashes',
|
|
102
103
|
helpText: 'Unique name used in the bridge path.'
|
|
@@ -108,25 +109,25 @@ var fields = function fields(_ref4) {
|
|
|
108
109
|
required: false,
|
|
109
110
|
initialValue: filestore ? filestore.get('adapterClass') : adapterClass,
|
|
110
111
|
options: adapters.map(function (adapter) {
|
|
111
|
-
return Map({
|
|
112
|
+
return (0, _immutable.Map)({
|
|
112
113
|
value: adapter.get('class'),
|
|
113
114
|
label: adapter.get('name')
|
|
114
115
|
});
|
|
115
116
|
})
|
|
116
|
-
}].concat(
|
|
117
|
+
}].concat((0, _toConsumableArray2["default"])(propertiesFields), [{
|
|
117
118
|
name: 'properties',
|
|
118
119
|
visible: false,
|
|
119
|
-
initialValue: get(filestore, 'properties', {}),
|
|
120
|
+
initialValue: (0, _immutable.get)(filestore, 'properties', {}),
|
|
120
121
|
serialize: propertiesSerialize
|
|
121
122
|
}]);
|
|
122
123
|
}
|
|
123
124
|
};
|
|
124
125
|
};
|
|
125
|
-
|
|
126
|
-
export var FilestoreForm = generateForm({
|
|
126
|
+
var FilestoreForm = (0, _Form2.generateForm)({
|
|
127
127
|
formOptions: ['filestoreSlug', 'adapterClass', 'agentSlug'],
|
|
128
128
|
dataSources: dataSources,
|
|
129
129
|
fields: fields,
|
|
130
130
|
handleSubmit: handleSubmit
|
|
131
131
|
});
|
|
132
|
+
exports.FilestoreForm = FilestoreForm;
|
|
132
133
|
FilestoreForm.displayName = 'FilestoreForm';
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
import { fetchFilestores } from '../../../apis';
|
|
3
|
-
import { generateTable } from '../../table/Table';
|
|
4
|
-
var clientSide = defineFilter(true).startsWith('slug', 'slug').end();
|
|
1
|
+
"use strict";
|
|
5
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FilestoreTable = void 0;
|
|
7
|
+
var _helpers = require("../../../helpers");
|
|
8
|
+
var _apis = require("../../../apis");
|
|
9
|
+
var _Table = require("../../table/Table");
|
|
10
|
+
var clientSide = (0, _helpers.defineFilter)(true).startsWith('slug', 'slug').end();
|
|
6
11
|
var dataSource = function dataSource(_ref) {
|
|
7
12
|
var agentSlug = _ref.agentSlug;
|
|
8
13
|
return {
|
|
9
|
-
fn: fetchFilestores,
|
|
14
|
+
fn: _apis.fetchFilestores,
|
|
10
15
|
clientSide: clientSide,
|
|
11
16
|
params: function params() {
|
|
12
17
|
return [{
|
|
@@ -21,7 +26,6 @@ var dataSource = function dataSource(_ref) {
|
|
|
21
26
|
}
|
|
22
27
|
};
|
|
23
28
|
};
|
|
24
|
-
|
|
25
29
|
var filters = function filters() {
|
|
26
30
|
return function () {
|
|
27
31
|
return [{
|
|
@@ -31,7 +35,6 @@ var filters = function filters() {
|
|
|
31
35
|
}];
|
|
32
36
|
};
|
|
33
37
|
};
|
|
34
|
-
|
|
35
38
|
var columns = [{
|
|
36
39
|
value: 'slug',
|
|
37
40
|
title: 'Slug',
|
|
@@ -44,10 +47,11 @@ var columns = [{
|
|
|
44
47
|
return _value.split('.').pop().match(/[A-Z][a-z]+/g).join(' ');
|
|
45
48
|
}
|
|
46
49
|
}];
|
|
47
|
-
|
|
50
|
+
var FilestoreTable = (0, _Table.generateTable)({
|
|
48
51
|
tableOptions: ['agentSlug'],
|
|
49
52
|
columns: columns,
|
|
50
53
|
filters: filters,
|
|
51
54
|
dataSource: dataSource
|
|
52
55
|
});
|
|
56
|
+
exports.FilestoreTable = FilestoreTable;
|
|
53
57
|
FilestoreTable.displayName = 'FilestoreTable';
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import { generateForm } from '../../form/Form';
|
|
3
|
-
import { fetchAgentHandler, createAgentHandler, updateAgentHandler, fetchAdapters } from '../../../apis';
|
|
1
|
+
"use strict";
|
|
4
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AgentHandlerForm = void 0;
|
|
7
|
+
var _immutable = require("immutable");
|
|
8
|
+
var _Form = require("../../form/Form");
|
|
9
|
+
var _apis = require("../../../apis");
|
|
5
10
|
var dataSources = function dataSources(_ref) {
|
|
6
11
|
var handlerSlug = _ref.handlerSlug,
|
|
7
|
-
|
|
12
|
+
agentSlug = _ref.agentSlug;
|
|
8
13
|
return {
|
|
9
14
|
handler: {
|
|
10
|
-
fn: fetchAgentHandler,
|
|
15
|
+
fn: _apis.fetchAgentHandler,
|
|
11
16
|
params: handlerSlug && [{
|
|
12
17
|
agentSlug: agentSlug,
|
|
13
18
|
handlerSlug: handlerSlug,
|
|
@@ -18,7 +23,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
18
23
|
}
|
|
19
24
|
},
|
|
20
25
|
adapters: {
|
|
21
|
-
fn: fetchAdapters,
|
|
26
|
+
fn: _apis.fetchAdapters,
|
|
22
27
|
params: [{
|
|
23
28
|
include: 'details',
|
|
24
29
|
type: 'handler',
|
|
@@ -30,44 +35,38 @@ var dataSources = function dataSources(_ref) {
|
|
|
30
35
|
}
|
|
31
36
|
};
|
|
32
37
|
};
|
|
33
|
-
|
|
34
38
|
var handleSubmit = function handleSubmit(_ref2) {
|
|
35
39
|
var handlerSlug = _ref2.handlerSlug,
|
|
36
|
-
|
|
40
|
+
agentSlug = _ref2.agentSlug;
|
|
37
41
|
return function (values) {
|
|
38
|
-
return (handlerSlug ? updateAgentHandler : createAgentHandler)({
|
|
42
|
+
return (handlerSlug ? _apis.updateAgentHandler : _apis.createAgentHandler)({
|
|
39
43
|
agentSlug: agentSlug,
|
|
40
44
|
handlerSlug: handlerSlug,
|
|
41
45
|
handler: values.toJS()
|
|
42
46
|
}).then(function (_ref3) {
|
|
43
47
|
var handler = _ref3.handler,
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
error = _ref3.error;
|
|
46
49
|
if (error) {
|
|
47
50
|
throw error.statusCode === 400 && error.message || 'There was an error saving the handler';
|
|
48
51
|
}
|
|
49
|
-
|
|
50
52
|
return handler;
|
|
51
53
|
});
|
|
52
54
|
};
|
|
53
55
|
};
|
|
54
|
-
|
|
55
56
|
var HANDLER_FIELDS = ['slug', 'definitionId', 'properties'];
|
|
56
|
-
|
|
57
57
|
var fields = function fields(_ref4) {
|
|
58
58
|
var handlerSlug = _ref4.handlerSlug,
|
|
59
|
-
|
|
59
|
+
definitionId = _ref4.definitionId;
|
|
60
60
|
return function (_ref5) {
|
|
61
61
|
var handler = _ref5.handler,
|
|
62
|
-
|
|
62
|
+
adapters = _ref5.adapters;
|
|
63
63
|
var properties = [];
|
|
64
|
-
var initialDefinitionId = get(handler, 'definitionId', definitionId);
|
|
65
|
-
|
|
64
|
+
var initialDefinitionId = (0, _immutable.get)(handler, 'definitionId', definitionId);
|
|
66
65
|
if (adapters) {
|
|
67
66
|
var adapter = adapters.find(function (a) {
|
|
68
67
|
return a.get('definitionId') === initialDefinitionId;
|
|
69
68
|
});
|
|
70
|
-
var adapterProperties = adapter ? List(adapter.get('properties')) : List();
|
|
69
|
+
var adapterProperties = adapter ? (0, _immutable.List)(adapter.get('properties')) : (0, _immutable.List)();
|
|
71
70
|
properties = !adapterProperties.isEmpty() ? adapterProperties.map(function (property) {
|
|
72
71
|
return {
|
|
73
72
|
name: property.get('name'),
|
|
@@ -75,18 +74,17 @@ var fields = function fields(_ref4) {
|
|
|
75
74
|
type: property.get('sensitive') ? 'password' : 'text',
|
|
76
75
|
required: property.get('required'),
|
|
77
76
|
"transient": true,
|
|
78
|
-
initialValue: getIn(handler, ['properties', property.get('name')], '')
|
|
77
|
+
initialValue: (0, _immutable.getIn)(handler, ['properties', property.get('name')], '')
|
|
79
78
|
};
|
|
80
79
|
}).toArray() : [];
|
|
81
80
|
}
|
|
82
|
-
|
|
83
81
|
if (adapters && (!handlerSlug || handlerSlug && handler)) {
|
|
84
82
|
var _fields = adapters && (!handlerSlug || handlerSlug && handler) && [{
|
|
85
83
|
name: 'slug',
|
|
86
84
|
label: 'Agent Handler Slug',
|
|
87
85
|
type: 'text',
|
|
88
86
|
required: true,
|
|
89
|
-
initialValue: get(handler, 'slug', ''),
|
|
87
|
+
initialValue: (0, _immutable.get)(handler, 'slug', ''),
|
|
90
88
|
helpText: 'Unique name for the instance of this handler.'
|
|
91
89
|
}, {
|
|
92
90
|
name: 'definitionId',
|
|
@@ -96,7 +94,7 @@ var fields = function fields(_ref4) {
|
|
|
96
94
|
required: false,
|
|
97
95
|
initialValue: initialDefinitionId,
|
|
98
96
|
options: adapters.map(function (adapter) {
|
|
99
|
-
return Map({
|
|
97
|
+
return (0, _immutable.Map)({
|
|
100
98
|
value: adapter.get('definitionId'),
|
|
101
99
|
label: adapter.get('name')
|
|
102
100
|
});
|
|
@@ -104,7 +102,7 @@ var fields = function fields(_ref4) {
|
|
|
104
102
|
}, {
|
|
105
103
|
name: 'properties',
|
|
106
104
|
visible: false,
|
|
107
|
-
initialValue: get(handler, 'properties', {}),
|
|
105
|
+
initialValue: (0, _immutable.get)(handler, 'properties', {}),
|
|
108
106
|
serialize: function serialize(_ref6) {
|
|
109
107
|
var values = _ref6.values;
|
|
110
108
|
return values.filter(function (v, k) {
|
|
@@ -112,18 +110,17 @@ var fields = function fields(_ref4) {
|
|
|
112
110
|
}).toJS();
|
|
113
111
|
}
|
|
114
112
|
}].concat(properties);
|
|
115
|
-
|
|
116
113
|
return _fields;
|
|
117
114
|
} else {
|
|
118
115
|
return false;
|
|
119
116
|
}
|
|
120
117
|
};
|
|
121
118
|
};
|
|
122
|
-
|
|
123
|
-
export var AgentHandlerForm = generateForm({
|
|
119
|
+
var AgentHandlerForm = (0, _Form.generateForm)({
|
|
124
120
|
formOptions: ['agentSlug', 'handlerSlug', 'definitionId'],
|
|
125
121
|
dataSources: dataSources,
|
|
126
122
|
fields: fields,
|
|
127
123
|
handleSubmit: handleSubmit
|
|
128
124
|
});
|
|
125
|
+
exports.AgentHandlerForm = AgentHandlerForm;
|
|
129
126
|
AgentHandlerForm.displayName = 'AgentHandlerForm';
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
import { fetchAgentHandlers } from '../../../apis';
|
|
3
|
-
import { defineFilter } from '../../../helpers';
|
|
4
|
-
var clientSide = defineFilter(true).startsWith('slug', 'slug').startsWith('definitionId', 'definitionId').end();
|
|
1
|
+
"use strict";
|
|
5
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AgentHandlerTable = 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('slug', 'slug').startsWith('definitionId', 'definitionId').end();
|
|
6
11
|
var dataSource = function dataSource(_ref) {
|
|
7
12
|
var agentSlug = _ref.agentSlug;
|
|
8
13
|
return {
|
|
9
|
-
fn: fetchAgentHandlers,
|
|
14
|
+
fn: _apis.fetchAgentHandlers,
|
|
10
15
|
clientSide: clientSide,
|
|
11
16
|
params: function params() {
|
|
12
17
|
return [{
|
|
@@ -21,7 +26,6 @@ var dataSource = function dataSource(_ref) {
|
|
|
21
26
|
}
|
|
22
27
|
};
|
|
23
28
|
};
|
|
24
|
-
|
|
25
29
|
var filters = function filters() {
|
|
26
30
|
return function () {
|
|
27
31
|
return [{
|
|
@@ -35,7 +39,6 @@ var filters = function filters() {
|
|
|
35
39
|
}];
|
|
36
40
|
};
|
|
37
41
|
};
|
|
38
|
-
|
|
39
42
|
var columns = [{
|
|
40
43
|
value: 'slug',
|
|
41
44
|
title: 'Slug',
|
|
@@ -45,10 +48,11 @@ var columns = [{
|
|
|
45
48
|
title: 'Handler Adapter',
|
|
46
49
|
sortable: true
|
|
47
50
|
}];
|
|
48
|
-
|
|
51
|
+
var AgentHandlerTable = (0, _Table.generateTable)({
|
|
49
52
|
tableOptions: ['agentSlug'],
|
|
50
53
|
columns: columns,
|
|
51
54
|
filters: filters,
|
|
52
55
|
dataSource: dataSource
|
|
53
56
|
});
|
|
57
|
+
exports.AgentHandlerTable = AgentHandlerTable;
|
|
54
58
|
AgentHandlerTable.displayName = 'AgentHandlerTable';
|