@kineticdata/react 6.0.5 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +110 -110
- package/assets/task/icons/defer.svg +12 -12
- package/assets/task/icons/drag-handle.svg +3 -3
- package/assets/task/icons/filter.svg +11 -11
- package/assets/task/icons/loop.svg +10 -10
- package/assets/task/icons/plus_small.svg +5 -5
- package/assets/task/icons/routine.svg +9 -9
- package/assets/task/icons/scale-minus.svg +11 -11
- package/assets/task/icons/scale-plus.svg +13 -13
- package/assets/task/icons/start.svg +11 -11
- package/assets/task/icons/stop.svg +8 -8
- package/lib/apis/core/activity.js +4 -4
- package/lib/apis/core/attributeDefinitions.js +64 -6
- package/lib/apis/core/attributeDefinitions.test.js +7 -4
- package/lib/apis/core/authentication.js +12 -1
- package/lib/apis/core/bridgeModels.test.js +46 -23
- package/lib/apis/core/bridgedresources.js +41 -41
- package/lib/apis/core/fileResources.js +2 -6
- package/lib/apis/core/forms.js +51 -2
- package/lib/apis/core/forms.test.js +32 -19
- package/lib/apis/core/integrations.js +61 -0
- package/lib/apis/core/kapps.js +49 -0
- package/lib/apis/core/kapps.test.js +16 -10
- package/lib/apis/core/notices.js +7 -0
- package/lib/apis/core/securityPolicyDefinitions.test.js +7 -4
- package/lib/apis/core/space.js +18 -0
- package/lib/apis/core/space.test.js +16 -10
- package/lib/apis/core/submissionActivities.js +38 -0
- package/lib/apis/core/submissions.js +114 -15
- package/lib/apis/core/translations.test.js +126 -55
- package/lib/apis/core/userPreferences.js +59 -0
- package/lib/apis/core/webApis.js +32 -2
- package/lib/apis/core/webhooks.test.js +7 -4
- package/lib/apis/http.js +30 -5
- package/lib/apis/index.js +48 -0
- package/lib/apis/integrator/index.js +337 -0
- package/lib/apis/system/index.js +64 -12
- package/lib/apis/task/index.js +9 -2
- package/lib/components/agent/filestore/FilestoreForm.js +1 -1
- package/lib/components/common/AttributeSelect.js +11 -2
- package/lib/components/common/BridgeSelect.js +3 -1
- package/lib/components/common/ConnectionSelect.js +73 -0
- package/lib/components/common/FormSelect.js +3 -1
- package/lib/components/common/NodeSelect.js +1 -0
- package/lib/components/common/StaticSelect.js +16 -6
- package/lib/components/common/TableInput.js +4 -1
- package/lib/components/common/TeamSelect.js +3 -1
- package/lib/components/common/ToastContainer.js +34 -10
- package/lib/components/common/Typeahead.js +62 -23
- package/lib/components/common/UserSelect.js +3 -1
- package/lib/components/common/authentication/AuthenticationContainer.js +121 -55
- package/lib/components/common/authentication/RequestInterceptor.js +1 -1
- package/lib/components/common/preferences/PreferencesProvider.js +461 -0
- package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +10 -7
- package/lib/components/core/bridge_model/BridgeModelTable.js +19 -0
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeForm.js +6 -9
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeTable.js +0 -4
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationForm.js +7 -10
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationTable.js +2 -15
- package/lib/components/core/category/CategoryForm.js +4 -1
- package/lib/components/core/category/CategoryTable.js +2 -2
- package/lib/components/core/core_form/CoreForm.js +18 -10
- package/lib/components/core/field_definition/FieldDefinitionForm.js +3 -3
- package/lib/components/core/file_resource/FileResourceForm.js +2 -1
- package/lib/components/core/file_resource/FileResourceTable.js +14 -7
- package/lib/components/core/form/FormForm.js +42 -19
- package/lib/components/core/form/FormTable.js +13 -14
- package/lib/components/core/form_type/FormTypeForm.js +3 -0
- package/lib/components/core/i18n/Moment.js +1 -0
- package/lib/components/core/integration/IntegrationForm.js +232 -0
- package/lib/components/core/integration/IntegrationTable.js +142 -0
- package/lib/components/core/kapp/KappForm.js +18 -5
- package/lib/components/core/kapp/KappTable.js +3 -3
- package/lib/components/core/log/LogTable.js +1 -1
- package/lib/components/core/security_definition/SecurityDefinitionForm.js +48 -10
- package/lib/components/core/space/SpaceForm.js +17 -36
- package/lib/components/core/submission/DatastoreSubmissionTable.js +4 -4
- package/lib/components/core/submission/FormSubmissionTable.js +12 -7
- package/lib/components/core/submission/KappSubmissionTable.js +4 -4
- package/lib/components/core/submission/SubmissionActivityForm.js +79 -0
- package/lib/components/core/submission/SubmissionForm.js +15 -3
- package/lib/components/core/team/TeamTable.js +17 -7
- package/lib/components/core/translation/EntryTable.js +8 -7
- package/lib/components/core/user/UserForm.js +2 -0
- package/lib/components/core/user/UserTable.js +22 -22
- package/lib/components/core/webapi/WebApiForm.js +5 -2
- package/lib/components/core/webapi/WebApiTable.js +2 -2
- package/lib/components/core/webhook/WebhookForm.js +43 -33
- package/lib/components/core/webhook/WebhookTable.js +16 -16
- package/lib/components/core/webhook_job/WebhookJobTable.js +17 -6
- package/lib/components/form/Form.helpers.js +10 -4
- package/lib/components/form/Form.js +264 -171
- package/lib/components/form/Form.models.js +6 -1
- package/lib/components/form/FormState.js +9 -5
- package/lib/components/form/SimpleForm.js +2 -2
- package/lib/components/form/defaults/CodeField.js +44 -1
- package/lib/components/index.js +152 -3
- package/lib/components/integrator/connection/ConnectionForm.js +156 -0
- package/lib/components/integrator/connection/ConnectionTable.js +82 -0
- package/lib/components/integrator/connection/config_fields/http.js +570 -0
- package/lib/components/integrator/connection/config_fields/sql.js +123 -0
- package/lib/components/integrator/integrationTypes.js +120 -0
- package/lib/components/integrator/operation/OperationForm.js +148 -0
- package/lib/components/integrator/operation/OperationTable.js +62 -0
- package/lib/components/integrator/operation/config_fields/http.js +185 -0
- package/lib/components/integrator/operation/config_fields/sql.js +81 -0
- package/lib/components/system/SystemSecurityForm.js +1 -1
- package/lib/components/system/SystemTaskAdapterForm.js +9 -9
- package/lib/components/system/SystemUserForm.js +2 -0
- package/lib/components/system/helpers.js +123 -100
- package/lib/components/system/spaces/SystemSpaceForm.js +9 -37
- package/lib/components/system/spaces/SystemTenantForm.js +276 -104
- package/lib/components/system/spaces/SystemTenantMigrateForm.js +449 -0
- package/lib/components/system/spaces/SystemTenantTable.js +20 -16
- package/lib/components/table/Table.js +75 -15
- package/lib/components/table/Table.redux.js +297 -73
- package/lib/components/table/defaults/FilterControl.js +24 -0
- package/lib/components/table/defaults/index.js +2 -0
- package/lib/components/table/tests/Table.test.js +22 -22
- package/lib/components/table/tests/components.js +9 -2
- package/lib/components/task/builder/Connector.js +51 -41
- package/lib/components/task/builder/ConnectorForm.js +11 -7
- package/lib/components/task/builder/Node.js +31 -35
- package/lib/components/task/builder/NodeForm.js +93 -22
- package/lib/components/task/builder/NodeParametersForm.js +29 -17
- package/lib/components/task/builder/SvgCanvas.js +3 -17
- package/lib/components/task/builder/TaskDefinitionConfigForm.js +18 -50
- package/lib/components/task/builder/TreeBuilder.js +23 -3
- package/lib/components/task/builder/builder.redux.js +342 -197
- package/lib/components/task/builder/constants.js +10 -2
- package/lib/components/task/builder/helpers.js +231 -81
- package/lib/components/task/builder/models.js +7 -6
- package/lib/components/task/category/TaskCategoryTable.js +3 -3
- package/lib/components/task/common/UsageTable.js +9 -2
- package/lib/components/task/handlers/HandlerTable.js +44 -37
- package/lib/components/task/policy_rule/PolicyRuleTable.js +3 -3
- package/lib/components/task/runs/CreateManualTriggerForm.js +2 -0
- package/lib/components/task/runs/RunTable.js +10 -14
- package/lib/components/task/runs/RunTaskTable.js +1 -1
- package/lib/components/task/sources/SourceTable.js +2 -2
- package/lib/components/task/triggers/TriggerTable.js +2 -2
- package/lib/components/task/workflows/LinkedWorkflowTable.js +16 -11
- package/lib/components/task/workflows/WorkflowForm.js +27 -8
- package/lib/components/task/workflows/WorkflowTable.js +27 -26
- package/lib/helpers/index.js +307 -74
- package/lib/index.js +2 -1
- package/lib/saga.js +4 -4
- package/lib/store.js +2 -1
- package/package.json +7 -6
- package/proxyhelper.js +201 -176
- package/CHANGELOG.md +0 -94
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.SystemTenantMigrateForm = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
11
|
+
var _objectSpread4 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
12
|
+
var _immutable = require("immutable");
|
|
13
|
+
var _Form = require("../../form/Form");
|
|
14
|
+
var _apis = require("../../../apis");
|
|
15
|
+
var _helpers = require("../helpers");
|
|
16
|
+
var _Form2 = require("../../form/Form.helpers");
|
|
17
|
+
var TENANT_INCLUDES = 'details';
|
|
18
|
+
var dataSources = function dataSources(_ref) {
|
|
19
|
+
var slug = _ref.slug;
|
|
20
|
+
return {
|
|
21
|
+
space: {
|
|
22
|
+
fn: _apis.fetchSpace,
|
|
23
|
+
params: slug && [{
|
|
24
|
+
slug: slug,
|
|
25
|
+
include: 'details,allowedIps'
|
|
26
|
+
}],
|
|
27
|
+
transform: function transform(result) {
|
|
28
|
+
return result.space;
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
tenant: {
|
|
32
|
+
fn: _apis.fetchTenant,
|
|
33
|
+
params: slug && [{
|
|
34
|
+
slug: slug,
|
|
35
|
+
include: TENANT_INCLUDES
|
|
36
|
+
}],
|
|
37
|
+
transform: function transform(result) {
|
|
38
|
+
return result.tenant;
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
defaultSQLDatabaseAdapter: {
|
|
42
|
+
fn: _apis.fetchSystemDefaultSQLDbAdapter,
|
|
43
|
+
params: [],
|
|
44
|
+
transform: function transform(result) {
|
|
45
|
+
return result.adapter;
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
fileFields: {
|
|
49
|
+
fn: function fn() {
|
|
50
|
+
return {
|
|
51
|
+
mssql: ['sslrootcert', 'sslcert'],
|
|
52
|
+
oracle: ['serverCert', 'clientCert'],
|
|
53
|
+
postgres: ['sslrootcert', 'sslcert', 'sslkey']
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
params: []
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
var handleSubmit = function handleSubmit(_ref2) {
|
|
61
|
+
var slug = _ref2.slug,
|
|
62
|
+
component = _ref2.component;
|
|
63
|
+
return function (values, _ref3) {
|
|
64
|
+
var fileFields = _ref3.fileFields,
|
|
65
|
+
rawValues = _ref3.values,
|
|
66
|
+
originalTenant = _ref3.tenant;
|
|
67
|
+
var taskEnabled = !!values.get('task_feature');
|
|
68
|
+
var integratorEnabled = !!values.get('integrator_feature');
|
|
69
|
+
var task = {},
|
|
70
|
+
integrator = {};
|
|
71
|
+
if (taskEnabled && (!component || component === 'task')) {
|
|
72
|
+
var type = values.get('task_databaseAdapter_type');
|
|
73
|
+
var fileFieldsForType = fileFields.get(type);
|
|
74
|
+
// Only include values for file fields if the toggle field is true
|
|
75
|
+
var filterFn = function filterFn(value, key) {
|
|
76
|
+
return !fileFieldsForType.includes(key) || !!rawValues.get("task_".concat(type, "_change_").concat(key));
|
|
77
|
+
};
|
|
78
|
+
// Get adapter properties to save
|
|
79
|
+
var properties = (0, _helpers.adapterProperties)(values, 'task', type, filterFn);
|
|
80
|
+
// If creating new, pass in file values from default adapter if not uploaded
|
|
81
|
+
if (!slug || originalTenant.getIn(['features', 'task']) === 'false') {
|
|
82
|
+
properties = fileFieldsForType.reduce(function (props, field) {
|
|
83
|
+
if (typeof props[field] === 'undefined' && !!rawValues.getIn(["task_".concat(type, "_current_").concat(field), 'pem'])) {
|
|
84
|
+
return (0, _objectSpread4["default"])((0, _objectSpread4["default"])({}, props), {}, (0, _defineProperty2["default"])({}, field, new File([rawValues.getIn(["task_".concat(type, "_current_").concat(field), 'pem'])], "".concat(field, ".crt"), {
|
|
85
|
+
type: 'text/plain'
|
|
86
|
+
})));
|
|
87
|
+
}
|
|
88
|
+
return props;
|
|
89
|
+
}, properties);
|
|
90
|
+
}
|
|
91
|
+
var authenticationSecret = values.get('task_authenticationSecret') ? {
|
|
92
|
+
authenticationSecret: values.get('task_authenticationSecret')
|
|
93
|
+
} : {};
|
|
94
|
+
task = {
|
|
95
|
+
task: (0, _objectSpread4["default"])((0, _objectSpread4["default"])({}, authenticationSecret), {}, {
|
|
96
|
+
deployment: {
|
|
97
|
+
image: values.get('task_image'),
|
|
98
|
+
replicas: parseInt(values.get('task_replicas'))
|
|
99
|
+
},
|
|
100
|
+
configuratorUser: {
|
|
101
|
+
username: values.get('configuratorUsername'),
|
|
102
|
+
password: values.get('configuratorPassword')
|
|
103
|
+
},
|
|
104
|
+
databaseAdapter: {
|
|
105
|
+
type: type,
|
|
106
|
+
properties: properties
|
|
107
|
+
},
|
|
108
|
+
autoCreateDatabase: (!!values.get('task_autoCreateDatabase')).toString()
|
|
109
|
+
})
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
if (integratorEnabled && (!component || component === 'integrator')) {
|
|
113
|
+
var _type = values.get('integrator_databaseAdapter_type');
|
|
114
|
+
var _fileFieldsForType = fileFields.get(_type);
|
|
115
|
+
// Only include values for file fields if the toggle field is true
|
|
116
|
+
var _filterFn = function _filterFn(value, key) {
|
|
117
|
+
return !_fileFieldsForType.includes(key) || !!rawValues.get("integrator_".concat(_type, "_change_").concat(key));
|
|
118
|
+
};
|
|
119
|
+
// Get adapter properties to save
|
|
120
|
+
var _properties = (0, _helpers.adapterProperties)(values, 'integrator', _type, _filterFn);
|
|
121
|
+
// If creating new, pass in file values from default adapter if not uploaded
|
|
122
|
+
if (!slug || originalTenant.getIn(['features', 'integrator']) === 'false') {
|
|
123
|
+
_properties = _fileFieldsForType.reduce(function (props, field) {
|
|
124
|
+
if (typeof props[field] === 'undefined' && !!rawValues.getIn(["integrator_".concat(_type, "_current_").concat(field), 'pem'])) {
|
|
125
|
+
return (0, _objectSpread4["default"])((0, _objectSpread4["default"])({}, props), {}, (0, _defineProperty2["default"])({}, field, new File([rawValues.getIn(["integrator_".concat(_type, "_current_").concat(field), 'pem'])], "".concat(field, ".crt"), {
|
|
126
|
+
type: 'text/plain'
|
|
127
|
+
})));
|
|
128
|
+
}
|
|
129
|
+
return props;
|
|
130
|
+
}, _properties);
|
|
131
|
+
}
|
|
132
|
+
integrator = {
|
|
133
|
+
integrator: {
|
|
134
|
+
deployment: {
|
|
135
|
+
image: values.get('integrator_image'),
|
|
136
|
+
replicas: parseInt(values.get('integrator_replicas'))
|
|
137
|
+
},
|
|
138
|
+
secretKeyBase: values.get('secretKeyBase'),
|
|
139
|
+
vaultKey: values.get('vaultKey'),
|
|
140
|
+
databaseAdapter: {
|
|
141
|
+
type: _type,
|
|
142
|
+
properties: _properties
|
|
143
|
+
},
|
|
144
|
+
autoCreateDatabase: (!!values.get('integrator_autoCreateDatabase')).toString()
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
var tenant = (0, _objectSpread4["default"])((0, _objectSpread4["default"])((0, _objectSpread4["default"])({
|
|
149
|
+
space: {
|
|
150
|
+
slug: values.get('slug'),
|
|
151
|
+
name: values.get('name')
|
|
152
|
+
},
|
|
153
|
+
features: {
|
|
154
|
+
task: taskEnabled.toString(),
|
|
155
|
+
integrator: integratorEnabled.toString()
|
|
156
|
+
},
|
|
157
|
+
integrationUser: {
|
|
158
|
+
username: values.get('integrationUsername'),
|
|
159
|
+
password: values.get('integrationPassword')
|
|
160
|
+
},
|
|
161
|
+
encryptionKey: values.get('encryptionKey'),
|
|
162
|
+
coreServiceName: values.get('coreServiceName'),
|
|
163
|
+
oasConsoleServiceName: 'oas-console',
|
|
164
|
+
spaceConsoleServiceName: 'space-console',
|
|
165
|
+
loghubServiceName: 'loghub'
|
|
166
|
+
}, task), integrator), {}, {
|
|
167
|
+
users: values.get('users')
|
|
168
|
+
});
|
|
169
|
+
var multipart = taskEnabled && (!component || component === 'task') && Object.entries(tenant.task.databaseAdapter.properties).some(function (_ref4) {
|
|
170
|
+
var _ref5 = (0, _slicedToArray2["default"])(_ref4, 2),
|
|
171
|
+
name = _ref5[0],
|
|
172
|
+
value = _ref5[1];
|
|
173
|
+
return value instanceof File;
|
|
174
|
+
}) || integratorEnabled && (!component || component === 'integrator') && Object.entries(tenant.integrator.databaseAdapter.properties).some(function (_ref6) {
|
|
175
|
+
var _ref7 = (0, _slicedToArray2["default"])(_ref6, 2),
|
|
176
|
+
name = _ref7[0],
|
|
177
|
+
value = _ref7[1];
|
|
178
|
+
return value instanceof File;
|
|
179
|
+
});
|
|
180
|
+
return (0, _apis.migrateTenant)({
|
|
181
|
+
slug: slug,
|
|
182
|
+
tenant: tenant,
|
|
183
|
+
multipart: multipart
|
|
184
|
+
}).then((0, _Form2.handleFormErrors)('space', 'There was an error migrating the Space.'));
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
var getSpaceValue = function getSpaceValue(tenant, key) {
|
|
188
|
+
return tenant ? (0, _immutable.getIn)(tenant, ['space', key], '') : '';
|
|
189
|
+
};
|
|
190
|
+
var fields = function fields(_ref8) {
|
|
191
|
+
var slug = _ref8.slug,
|
|
192
|
+
component = _ref8.component;
|
|
193
|
+
return function (_ref9) {
|
|
194
|
+
var tenant = _ref9.tenant,
|
|
195
|
+
defaultSQLDatabaseAdapter = _ref9.defaultSQLDatabaseAdapter;
|
|
196
|
+
return (tenant || !slug) && (defaultSQLDatabaseAdapter || defaultSQLDatabaseAdapter === null) && [
|
|
197
|
+
// Start - Migrate Space Fields
|
|
198
|
+
{
|
|
199
|
+
name: 'name',
|
|
200
|
+
label: 'Name',
|
|
201
|
+
type: 'text',
|
|
202
|
+
required: true,
|
|
203
|
+
enabled: false,
|
|
204
|
+
initialValue: getSpaceValue(tenant, 'name')
|
|
205
|
+
}, {
|
|
206
|
+
name: 'slug',
|
|
207
|
+
label: 'Slug',
|
|
208
|
+
type: 'text',
|
|
209
|
+
required: true,
|
|
210
|
+
enabled: false,
|
|
211
|
+
initialValue: getSpaceValue(tenant, 'slug')
|
|
212
|
+
}, {
|
|
213
|
+
name: 'integrationUsername',
|
|
214
|
+
label: 'Integration Username',
|
|
215
|
+
type: 'text',
|
|
216
|
+
required: true,
|
|
217
|
+
enabled: true
|
|
218
|
+
}, {
|
|
219
|
+
name: 'integrationPassword',
|
|
220
|
+
label: 'Integration Password',
|
|
221
|
+
type: 'password',
|
|
222
|
+
required: true
|
|
223
|
+
}, {
|
|
224
|
+
name: 'configuratorUsername',
|
|
225
|
+
label: 'Configurator Username',
|
|
226
|
+
type: 'text',
|
|
227
|
+
required: true,
|
|
228
|
+
enabled: true
|
|
229
|
+
}, {
|
|
230
|
+
name: 'configuratorPassword',
|
|
231
|
+
label: 'Configurator Password',
|
|
232
|
+
type: 'password',
|
|
233
|
+
required: true
|
|
234
|
+
}, {
|
|
235
|
+
name: 'encryptionKey',
|
|
236
|
+
label: 'Encryption Key',
|
|
237
|
+
type: 'password',
|
|
238
|
+
required: true
|
|
239
|
+
}, {
|
|
240
|
+
name: 'vaultKey',
|
|
241
|
+
label: 'Vault Key',
|
|
242
|
+
type: 'password',
|
|
243
|
+
required: true
|
|
244
|
+
}, {
|
|
245
|
+
name: 'coreServiceName',
|
|
246
|
+
label: 'Core Version',
|
|
247
|
+
type: 'text',
|
|
248
|
+
required: true
|
|
249
|
+
}, {
|
|
250
|
+
name: 'secretKeyBase',
|
|
251
|
+
label: 'Secret Key',
|
|
252
|
+
type: 'password',
|
|
253
|
+
required: true
|
|
254
|
+
},
|
|
255
|
+
// End - Migrate Space Fields
|
|
256
|
+
|
|
257
|
+
// Start - Feature Flags
|
|
258
|
+
{
|
|
259
|
+
name: 'task_feature',
|
|
260
|
+
label: 'Task Component',
|
|
261
|
+
type: 'checkbox',
|
|
262
|
+
initialValue: (0, _immutable.getIn)(tenant, ['features', 'task']) === 'true' || !slug,
|
|
263
|
+
onChange: function onChange(_ref10, _ref11) {
|
|
264
|
+
var values = _ref10.values;
|
|
265
|
+
var setValue = _ref11.setValue;
|
|
266
|
+
// When you toggle the feature, set or clear the adapter type value so
|
|
267
|
+
// that the downstream adapter fields can be automatically hidden
|
|
268
|
+
if (!!values.get('task_feature')) {
|
|
269
|
+
setValue('task_databaseAdapter_type', (0, _immutable.getIn)(tenant, ['task', 'databaseAdapter', 'type'], (0, _immutable.get)(defaultSQLDatabaseAdapter, 'type', '')));
|
|
270
|
+
} else {
|
|
271
|
+
setValue('task_databaseAdapter_type', '');
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}, {
|
|
275
|
+
name: 'integrator_feature',
|
|
276
|
+
label: 'Integrator Component',
|
|
277
|
+
type: 'checkbox',
|
|
278
|
+
initialValue: (0, _immutable.getIn)(tenant, ['features', 'integrator']) === 'true' || !slug,
|
|
279
|
+
onChange: function onChange(_ref12, _ref13) {
|
|
280
|
+
var values = _ref12.values;
|
|
281
|
+
var setValue = _ref13.setValue;
|
|
282
|
+
// When you toggle the feature, set or clear the adapter type value so
|
|
283
|
+
// that the downstream adapter fields can be automatically hidden
|
|
284
|
+
if (!!values.get('task_feature')) {
|
|
285
|
+
setValue('integrator_databaseAdapter_type', (0, _immutable.getIn)(tenant, ['integrator', 'databaseAdapter', 'type'], (0, _immutable.get)(defaultSQLDatabaseAdapter, 'type', '')));
|
|
286
|
+
} else {
|
|
287
|
+
setValue('task_databaseAdapter_type', '');
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}].concat((0, _toConsumableArray2["default"])(!component || component === 'task' ? [
|
|
291
|
+
// Start - Task fields
|
|
292
|
+
{
|
|
293
|
+
name: 'task_replicas',
|
|
294
|
+
label: 'Replica Count',
|
|
295
|
+
type: 'number',
|
|
296
|
+
initialValue: (0, _immutable.getIn)(tenant, ['task', 'deployment', 'specReplicas'], 1),
|
|
297
|
+
constraint: function constraint(_ref14) {
|
|
298
|
+
var values = _ref14.values;
|
|
299
|
+
return !values.get('task_feature') || typeof values.get('task_replicas') === 'number' && values.get('task_replicas') >= 0;
|
|
300
|
+
},
|
|
301
|
+
constraintMessage: 'Replica count must be a positive integer or zero.'
|
|
302
|
+
}, {
|
|
303
|
+
name: 'task_image',
|
|
304
|
+
label: 'Task Image',
|
|
305
|
+
type: 'text',
|
|
306
|
+
initialValue: (0, _immutable.getIn)(tenant, ['task', 'deployment', 'image'])
|
|
307
|
+
}, {
|
|
308
|
+
name: 'task_image',
|
|
309
|
+
label: 'Task Image',
|
|
310
|
+
type: 'text',
|
|
311
|
+
visible: function visible(_ref15) {
|
|
312
|
+
var values = _ref15.values;
|
|
313
|
+
return !values.get('task_imageToggle');
|
|
314
|
+
},
|
|
315
|
+
initialValue: (0, _immutable.getIn)(tenant, ['task', 'deployment', 'image']),
|
|
316
|
+
helpText: 'Optionally set the version of Kinetic Task to use for this space. Leave blank to use the default version.'
|
|
317
|
+
}, {
|
|
318
|
+
name: 'task_imageToggle',
|
|
319
|
+
label: 'Use Default Task Image',
|
|
320
|
+
type: 'checkbox',
|
|
321
|
+
"transient": true,
|
|
322
|
+
visible: !slug || (0, _immutable.getIn)(tenant, ['features', 'task']) === 'false',
|
|
323
|
+
initialValue: !(0, _immutable.getIn)(tenant, ['task', 'deployment', 'image']),
|
|
324
|
+
onChange: function onChange(_ref16, _ref17) {
|
|
325
|
+
var values = _ref16.values;
|
|
326
|
+
var setValue = _ref17.setValue;
|
|
327
|
+
if (!!values.get('task_imageToggle')) {
|
|
328
|
+
setValue('task_image', '');
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}, {
|
|
332
|
+
name: 'task_databaseAdapter_type',
|
|
333
|
+
label: 'Database Adapter',
|
|
334
|
+
required: function required(_ref18) {
|
|
335
|
+
var values = _ref18.values;
|
|
336
|
+
return values.get('task_feature');
|
|
337
|
+
},
|
|
338
|
+
type: 'select',
|
|
339
|
+
options: _helpers.VALIDATE_DB_ADAPTERS,
|
|
340
|
+
initialValue: (0, _immutable.getIn)(tenant, ['task', 'databaseAdapter', 'type'], (0, _immutable.get)(defaultSQLDatabaseAdapter, 'type', ''))
|
|
341
|
+
}, {
|
|
342
|
+
name: 'task_autoCreateDatabase',
|
|
343
|
+
label: 'Auto-Create Database',
|
|
344
|
+
type: 'checkbox',
|
|
345
|
+
visible: function visible(_ref19) {
|
|
346
|
+
var values = _ref19.values;
|
|
347
|
+
return (0, _immutable.getIn)(tenant, ['task', 'databaseAdapter', 'type']) !== 'postgres' && values.get('task_databaseAdapter_type') === 'postgres';
|
|
348
|
+
},
|
|
349
|
+
"transient": function transient(_ref20) {
|
|
350
|
+
var values = _ref20.values;
|
|
351
|
+
return values.get('task_databaseAdapter_type') !== 'postgres';
|
|
352
|
+
},
|
|
353
|
+
initialValue: !slug || (0, _immutable.getIn)(tenant, ['features', 'task']) === 'false'
|
|
354
|
+
}, {
|
|
355
|
+
name: 'task_authenticationSecret',
|
|
356
|
+
label: 'Authentication Secret',
|
|
357
|
+
type: 'password',
|
|
358
|
+
visible: function visible(_ref21) {
|
|
359
|
+
var values = _ref21.values;
|
|
360
|
+
return values.get('task_changeAuthenticationSecret');
|
|
361
|
+
},
|
|
362
|
+
"transient": function transient(_ref22) {
|
|
363
|
+
var values = _ref22.values;
|
|
364
|
+
return !values.get('task_changeAuthenticationSecret');
|
|
365
|
+
},
|
|
366
|
+
required: false
|
|
367
|
+
}, {
|
|
368
|
+
name: 'task_changeAuthenticationSecret',
|
|
369
|
+
label: 'Change Authentication Secret',
|
|
370
|
+
type: 'checkbox',
|
|
371
|
+
"transient": true,
|
|
372
|
+
initialValue: false,
|
|
373
|
+
onChange: function onChange(_ref23, _ref24) {
|
|
374
|
+
var values = _ref23.values;
|
|
375
|
+
var setValue = _ref24.setValue;
|
|
376
|
+
if (values.get('task_authenticationSecret') !== '') {
|
|
377
|
+
setValue('task_authenticationSecret', '');
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}].concat((0, _toConsumableArray2["default"])((0, _helpers.MSSQL_FIELDS)('task_databaseAdapter_type', tenant, ['task', 'databaseAdapter'], defaultSQLDatabaseAdapter)), (0, _toConsumableArray2["default"])((0, _helpers.ORACLE_FIELDS)('task_databaseAdapter_type', tenant, ['task', 'databaseAdapter'], defaultSQLDatabaseAdapter)), (0, _toConsumableArray2["default"])((0, _helpers.POSTGRES_FIELDS)('task_databaseAdapter_type', tenant, ['task', 'databaseAdapter'], defaultSQLDatabaseAdapter))) : []), (0, _toConsumableArray2["default"])(!component || component === 'integrator' ? [
|
|
381
|
+
// Start - Integrator fields
|
|
382
|
+
{
|
|
383
|
+
name: 'integrator_replicas',
|
|
384
|
+
label: 'Replica Count',
|
|
385
|
+
type: 'number',
|
|
386
|
+
initialValue: (0, _immutable.getIn)(tenant, ['integrator', 'deployment', 'specReplicas'], 1),
|
|
387
|
+
constraint: function constraint(_ref25) {
|
|
388
|
+
var values = _ref25.values;
|
|
389
|
+
return !values.get('integrator_feature') || typeof values.get('integrator_replicas') === 'number' && values.get('integrator_replicas') >= 0;
|
|
390
|
+
},
|
|
391
|
+
constraintMessage: 'Replica count must be a positive integer or zero.'
|
|
392
|
+
}, {
|
|
393
|
+
name: 'integrator_image',
|
|
394
|
+
label: 'Integrator Image',
|
|
395
|
+
type: 'text',
|
|
396
|
+
visible: function visible(_ref26) {
|
|
397
|
+
var values = _ref26.values;
|
|
398
|
+
return !values.get('integrator_imageToggle');
|
|
399
|
+
},
|
|
400
|
+
initialValue: (0, _immutable.getIn)(tenant, ['integrator', 'deployment', 'image']),
|
|
401
|
+
helpText: 'Optionally set the version of Kinetic Integrator to use for this space. Leave blank to use the default version.'
|
|
402
|
+
}, {
|
|
403
|
+
name: 'integrator_imageToggle',
|
|
404
|
+
label: 'Use Default Integrator Image',
|
|
405
|
+
type: 'checkbox',
|
|
406
|
+
"transient": true,
|
|
407
|
+
visible: !slug || (0, _immutable.getIn)(tenant, ['features', 'integrator']) === 'false',
|
|
408
|
+
initialValue: !(0, _immutable.getIn)(tenant, ['integrator', 'deployment', 'image']),
|
|
409
|
+
onChange: function onChange(_ref27, _ref28) {
|
|
410
|
+
var values = _ref27.values;
|
|
411
|
+
var setValue = _ref28.setValue;
|
|
412
|
+
if (!!values.get('integrator_imageToggle')) {
|
|
413
|
+
setValue('integrator_image', '');
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}, {
|
|
417
|
+
name: 'integrator_databaseAdapter_type',
|
|
418
|
+
label: 'Database Adapter',
|
|
419
|
+
required: function required(_ref29) {
|
|
420
|
+
var values = _ref29.values;
|
|
421
|
+
return values.get('integrator_feature');
|
|
422
|
+
},
|
|
423
|
+
type: 'select',
|
|
424
|
+
options: _helpers.VALIDATE_DB_ADAPTERS.filter(function (adapter) {
|
|
425
|
+
return adapter.value === 'postgres';
|
|
426
|
+
}),
|
|
427
|
+
initialValue: (0, _immutable.getIn)(tenant, ['integrator', 'databaseAdapter', 'type'], (0, _immutable.get)(defaultSQLDatabaseAdapter, 'type', ''))
|
|
428
|
+
}, {
|
|
429
|
+
name: 'integrator_autoCreateDatabase',
|
|
430
|
+
label: 'Auto-Create Database',
|
|
431
|
+
type: 'checkbox',
|
|
432
|
+
visible: function visible(_ref30) {
|
|
433
|
+
var values = _ref30.values;
|
|
434
|
+
return (0, _immutable.getIn)(tenant, ['integrator', 'databaseAdapter', 'type']) !== 'postgres' && values.get('integrator_databaseAdapter_type') === 'postgres';
|
|
435
|
+
},
|
|
436
|
+
"transient": function transient(_ref31) {
|
|
437
|
+
var values = _ref31.values;
|
|
438
|
+
return values.get('integrator_databaseAdapter_type') !== 'postgres';
|
|
439
|
+
},
|
|
440
|
+
initialValue: !slug || (0, _immutable.getIn)(tenant, ['features', 'integrator']) === 'false'
|
|
441
|
+
}].concat((0, _toConsumableArray2["default"])((0, _helpers.POSTGRES_FIELDS)('integrator_databaseAdapter_type', tenant, ['integrator', 'databaseAdapter'], defaultSQLDatabaseAdapter))) : []));
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
var SystemTenantMigrateForm = exports.SystemTenantMigrateForm = (0, _Form.generateForm)({
|
|
445
|
+
formOptions: ['slug', 'component'],
|
|
446
|
+
dataSources: dataSources,
|
|
447
|
+
fields: fields,
|
|
448
|
+
handleSubmit: handleSubmit
|
|
449
|
+
});
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.SystemTenantTable = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
7
9
|
var _Table = require("../../table/Table");
|
|
8
10
|
var _apis = require("../../../apis");
|
|
11
|
+
var _http = require("../../../apis/http");
|
|
9
12
|
var _helpers = require("../../../helpers");
|
|
10
|
-
var
|
|
13
|
+
var filterQuery = (0, _helpers.defineKqlQuery)().matches('name', 'name').matches('slug', 'slug').end();
|
|
11
14
|
var dataSource = function dataSource() {
|
|
12
15
|
return {
|
|
13
16
|
fn: _apis.fetchTenants,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
params: function params(paramData) {
|
|
18
|
+
return [(0, _objectSpread2["default"])((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _http.generateSortParams)(paramData)), (0, _http.generatePaginationParams)(paramData)), {}, {
|
|
19
|
+
q: filterQuery(paramData.filters.toJS())
|
|
20
|
+
})];
|
|
17
21
|
},
|
|
18
22
|
transform: function transform(result) {
|
|
19
23
|
return {
|
|
@@ -26,20 +30,27 @@ var dataSource = function dataSource() {
|
|
|
26
30
|
var filters = function filters() {
|
|
27
31
|
return function () {
|
|
28
32
|
return [{
|
|
29
|
-
name: '
|
|
30
|
-
label: '
|
|
33
|
+
name: 'name',
|
|
34
|
+
label: 'Name',
|
|
31
35
|
type: 'text'
|
|
32
36
|
}, {
|
|
33
|
-
name: '
|
|
34
|
-
label: '
|
|
37
|
+
name: 'slug',
|
|
38
|
+
label: 'Slug',
|
|
35
39
|
type: 'text'
|
|
36
40
|
}];
|
|
37
41
|
};
|
|
38
42
|
};
|
|
39
43
|
var columns = [{
|
|
44
|
+
value: 'name',
|
|
45
|
+
title: 'Name',
|
|
46
|
+
sortable: true,
|
|
47
|
+
valueTransform: function valueTransform(_value, row) {
|
|
48
|
+
return row.getIn(['space', 'name']);
|
|
49
|
+
}
|
|
50
|
+
}, {
|
|
40
51
|
value: 'slug',
|
|
41
52
|
title: 'Slug',
|
|
42
|
-
sortable:
|
|
53
|
+
sortable: true
|
|
43
54
|
}, {
|
|
44
55
|
value: 'task.deployment.namespace',
|
|
45
56
|
title: 'Namespace',
|
|
@@ -54,13 +65,6 @@ var columns = [{
|
|
|
54
65
|
valueTransform: function valueTransform(_value, row) {
|
|
55
66
|
return row.getIn(['task', 'deployment', 'image']);
|
|
56
67
|
}
|
|
57
|
-
}, {
|
|
58
|
-
value: 'space.name',
|
|
59
|
-
title: 'Name',
|
|
60
|
-
sortable: false,
|
|
61
|
-
valueTransform: function valueTransform(_value, row) {
|
|
62
|
-
return row.getIn(['space', 'name']);
|
|
63
|
-
}
|
|
64
68
|
}, {
|
|
65
69
|
value: 'space.status',
|
|
66
70
|
title: 'Status',
|
|
@@ -20,6 +20,7 @@ var _store = require("../../store");
|
|
|
20
20
|
var _Table = require("./Table.redux");
|
|
21
21
|
var _helpers = require("../../helpers");
|
|
22
22
|
var _Form = require("../form/Form");
|
|
23
|
+
var _FormState = require("../form/FormState");
|
|
23
24
|
var _excluded = ["components", "tableKey"];
|
|
24
25
|
var fromColumnSet = function fromColumnSet(columns, columnSet) {
|
|
25
26
|
return columnSet.map(function (cs) {
|
|
@@ -46,10 +47,19 @@ var TableComponent = function TableComponent(props) {
|
|
|
46
47
|
count = props.count,
|
|
47
48
|
extraData = props.extraData;
|
|
48
49
|
var columnControl = buildColumnControl(props);
|
|
50
|
+
var filterControl = buildFilterControl(props);
|
|
49
51
|
var table = buildTable((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, props), {}, {
|
|
50
52
|
columnControl: columnControl
|
|
51
53
|
}));
|
|
52
|
-
var filter = components.FilterForm ? buildFilterForm(
|
|
54
|
+
var filter = components.FilterForm ? buildFilterForm((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, props), {}, {
|
|
55
|
+
renderers: {
|
|
56
|
+
filterControl: function filterControl(args) {
|
|
57
|
+
return buildFilterControl((0, _objectSpread2["default"])({
|
|
58
|
+
args: args
|
|
59
|
+
}, props));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
})) : buildFilterLayout(props);
|
|
53
63
|
var pagination = buildPaginationControl(props);
|
|
54
64
|
return children({
|
|
55
65
|
tableKey: tableKey,
|
|
@@ -59,6 +69,7 @@ var TableComponent = function TableComponent(props) {
|
|
|
59
69
|
appliedFilters: appliedFilters,
|
|
60
70
|
pagination: pagination,
|
|
61
71
|
columnControl: columnControl,
|
|
72
|
+
filterControl: filterControl,
|
|
62
73
|
initializing: initializing,
|
|
63
74
|
loading: loading,
|
|
64
75
|
rows: rows,
|
|
@@ -143,6 +154,7 @@ var buildFilterForm = function buildFilterForm(props) {
|
|
|
143
154
|
formKey: props.filterFormKey,
|
|
144
155
|
tableKey: props.tableKey,
|
|
145
156
|
components: components,
|
|
157
|
+
renderers: props.renderers,
|
|
146
158
|
alterFields: props.alterFilters,
|
|
147
159
|
fieldSet: props.filterSet,
|
|
148
160
|
onSave: props.onSearch,
|
|
@@ -323,6 +335,41 @@ var buildColumnControl = function buildColumnControl(props) {
|
|
|
323
335
|
extraData: extraData
|
|
324
336
|
});
|
|
325
337
|
};
|
|
338
|
+
var buildFilterControl = function buildFilterControl(_ref4) {
|
|
339
|
+
var tableKey = _ref4.tableKey,
|
|
340
|
+
filterSet = _ref4.filterSet,
|
|
341
|
+
appliedFilters = _ref4.appliedFilters,
|
|
342
|
+
components = _ref4.components,
|
|
343
|
+
_ref4$args = _ref4.args,
|
|
344
|
+
args = _ref4$args === void 0 ? {} : _ref4$args;
|
|
345
|
+
var FilterControl = components.FilterControl;
|
|
346
|
+
return /*#__PURE__*/_react["default"].createElement(_FormState.FormState, {
|
|
347
|
+
formKey: (0, _Table.filterFormKey)(tableKey),
|
|
348
|
+
selector: function selector(formState) {
|
|
349
|
+
var _formState$fields, _formState$fields$map;
|
|
350
|
+
return {
|
|
351
|
+
filterFields: formState === null || formState === void 0 ? void 0 : (_formState$fields = formState.fields) === null || _formState$fields === void 0 ? void 0 : (_formState$fields$map = _formState$fields.map(function (field, name) {
|
|
352
|
+
return (0, _immutable.Map)({
|
|
353
|
+
name: name,
|
|
354
|
+
label: field.get('label'),
|
|
355
|
+
value: field.get('value'),
|
|
356
|
+
options: field.get('options'),
|
|
357
|
+
checked: filterSet === null || filterSet === void 0 ? void 0 : filterSet.includes(name),
|
|
358
|
+
toggle: onToggleFilter(tableKey, name)
|
|
359
|
+
});
|
|
360
|
+
})) === null || _formState$fields$map === void 0 ? void 0 : _formState$fields$map.toList()
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
}, function (_ref5) {
|
|
364
|
+
var _appliedFilters$filte;
|
|
365
|
+
var filterFields = _ref5.filterFields;
|
|
366
|
+
return /*#__PURE__*/_react["default"].createElement(FilterControl, Object.assign({}, args, {
|
|
367
|
+
tableKey: tableKey,
|
|
368
|
+
filterFields: filterFields,
|
|
369
|
+
filterCount: appliedFilters === null || appliedFilters === void 0 ? void 0 : (_appliedFilters$filte = appliedFilters.filter(Boolean)) === null || _appliedFilters$filte === void 0 ? void 0 : _appliedFilters$filte.size
|
|
370
|
+
}));
|
|
371
|
+
});
|
|
372
|
+
};
|
|
326
373
|
var buildTable = exports.buildTable = function buildTable(props) {
|
|
327
374
|
var TableLayout = props.components.TableLayout;
|
|
328
375
|
var header = buildTableHeader(props);
|
|
@@ -557,6 +604,17 @@ var onToggleColumn = function onToggleColumn(tableKey, column) {
|
|
|
557
604
|
});
|
|
558
605
|
};
|
|
559
606
|
};
|
|
607
|
+
var onToggleFilter = function onToggleFilter(tableKey) {
|
|
608
|
+
for (var _len = arguments.length, filters = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
609
|
+
filters[_key - 1] = arguments[_key];
|
|
610
|
+
}
|
|
611
|
+
return function () {
|
|
612
|
+
return (0, _store.dispatch)('TOGGLE_FILTER', {
|
|
613
|
+
tableKey: tableKey,
|
|
614
|
+
filters: filters
|
|
615
|
+
});
|
|
616
|
+
};
|
|
617
|
+
};
|
|
560
618
|
var mapStateToProps = function mapStateToProps() {
|
|
561
619
|
return function (state, props) {
|
|
562
620
|
return state.getIn(['tables', props.tableKey], (0, _immutable.Map)()).toObject();
|
|
@@ -635,18 +693,18 @@ var extractColumnComponents = exports.extractColumnComponents = function extract
|
|
|
635
693
|
return result.set(current.get('value'), current.get('components'));
|
|
636
694
|
}, (0, _immutable.Map)());
|
|
637
695
|
};
|
|
638
|
-
var generateTable = exports.generateTable = function generateTable(
|
|
639
|
-
var
|
|
640
|
-
tableOptions =
|
|
641
|
-
|
|
642
|
-
filterDataSources =
|
|
696
|
+
var generateTable = exports.generateTable = function generateTable(_ref6) {
|
|
697
|
+
var _ref6$tableOptions = _ref6.tableOptions,
|
|
698
|
+
tableOptions = _ref6$tableOptions === void 0 ? [] : _ref6$tableOptions,
|
|
699
|
+
_ref6$filterDataSourc = _ref6.filterDataSources,
|
|
700
|
+
filterDataSources = _ref6$filterDataSourc === void 0 ? function () {
|
|
643
701
|
return {};
|
|
644
|
-
} :
|
|
645
|
-
filters =
|
|
646
|
-
columns =
|
|
647
|
-
dataSource =
|
|
648
|
-
sortable =
|
|
649
|
-
onValidateFilters =
|
|
702
|
+
} : _ref6$filterDataSourc,
|
|
703
|
+
filters = _ref6.filters,
|
|
704
|
+
columns = _ref6.columns,
|
|
705
|
+
dataSource = _ref6.dataSource,
|
|
706
|
+
sortable = _ref6.sortable,
|
|
707
|
+
onValidateFilters = _ref6.onValidateFilters;
|
|
650
708
|
return function (props) {
|
|
651
709
|
var tableOptionProps = tableOptions ? tableOptions.reduce(function (to, opt) {
|
|
652
710
|
to[opt] = props[opt];
|
|
@@ -658,8 +716,8 @@ var generateTable = exports.generateTable = function generateTable(_ref4) {
|
|
|
658
716
|
dataSources: filterDataSources,
|
|
659
717
|
fields: filters,
|
|
660
718
|
formOptions: ['tableKey'].concat((0, _toConsumableArray2["default"])(tableOptions)),
|
|
661
|
-
handleSubmit: function handleSubmit(
|
|
662
|
-
var tableKey =
|
|
719
|
+
handleSubmit: function handleSubmit(_ref7) {
|
|
720
|
+
var tableKey = _ref7.tableKey;
|
|
663
721
|
return function (values) {
|
|
664
722
|
(0, _store.dispatch)('APPLY_FILTER_FORM', {
|
|
665
723
|
tableKey: tableKey,
|
|
@@ -712,7 +770,9 @@ var generateTable = exports.generateTable = function generateTable(_ref4) {
|
|
|
712
770
|
filterForm: !!filters,
|
|
713
771
|
initialFilterValues: props.initialFilterValues || {},
|
|
714
772
|
onSearch: props.onSearch,
|
|
715
|
-
onFetch: props.onFetch
|
|
773
|
+
onFetch: props.onFetch,
|
|
774
|
+
onColumnSort: props.onColumnSort,
|
|
775
|
+
onColumnToggle: props.onColumnToggle
|
|
716
776
|
};
|
|
717
777
|
return /*#__PURE__*/_react["default"].createElement(Table, setProps, props.children);
|
|
718
778
|
};
|