@kineticdata/react 6.0.0 → 6.0.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/lib/apis/http.js +33 -1
- package/lib/apis/http.test.js +100 -0
- package/lib/apis/system/index.js +141 -10
- package/lib/apis/task/index.js +15 -1
- package/lib/components/agent/bridge/BridgeTable.js +4 -1
- package/lib/components/agent/filestore/FilestoreTable.js +4 -1
- package/lib/components/agent/handler/AgentHandlerTable.js +5 -2
- package/lib/components/common/ToastContainer.js +170 -0
- package/lib/components/common/defaults/Toast.js +26 -0
- package/lib/components/common/defaults/index.js +13 -0
- package/lib/components/core/attribute_definition/AttributeDefinitionTable.js +7 -3
- package/lib/components/core/bridge_model/BridgeModelTable.js +5 -2
- package/lib/components/core/category/CategoryTable.js +13 -6
- package/lib/components/core/field_definition/FieldDefinitionTable.js +11 -5
- package/lib/components/core/form/FormTable.js +22 -11
- package/lib/components/core/form_type/FormTypeTable.js +3 -1
- package/lib/components/core/index_definition/IndexDefinitionTable.js +12 -5
- package/lib/components/core/kapp/KappTable.js +17 -32
- package/lib/components/core/log/LogTable.js +8 -2
- package/lib/components/core/security_definition/SecurityDefinitionTable.js +9 -4
- package/lib/components/core/submission/FormSubmissionTable.js +37 -19
- package/lib/components/core/submission/KappSubmissionTable.js +37 -19
- package/lib/components/core/team/TeamForm.js +1 -1
- package/lib/components/core/team/TeamTable.js +11 -5
- package/lib/components/core/user/UserTable.js +23 -5
- package/lib/components/core/webapi/WebApiForm.js +49 -30
- package/lib/components/core/webapi/WebApiTable.js +14 -7
- package/lib/components/core/webhook/WebhookTable.js +19 -9
- package/lib/components/core/webhook_job/WebhookJobTable.js +39 -19
- package/lib/components/form/Form.helpers.js +81 -19
- package/lib/components/form/Form.models.js +1 -0
- package/lib/components/index.js +53 -0
- package/lib/components/system/SystemCassandraForm.js +98 -0
- package/lib/components/system/SystemElasticSearchForm.js +98 -0
- package/lib/components/system/SystemFilestoreForm.js +10 -5
- package/lib/components/system/SystemIngressForm.js +77 -29
- package/lib/components/system/SystemTaskAdapterForm.js +29 -5
- package/lib/components/system/SystemTrustedCertificateForm.js +40 -0
- package/lib/components/system/SystemTrustedCertificatesTable.js +74 -0
- package/lib/components/system/helpers.js +226 -45
- package/lib/components/system/spaces/SystemTenantForm.js +75 -34
- package/lib/components/table/Table.js +88 -7
- package/lib/components/table/Table.redux.js +68 -47
- package/lib/components/table/Table.test.js +39 -0
- package/lib/components/table/defaults/ColumnControl.js +26 -0
- package/lib/components/table/defaults/index.js +3 -1
- package/lib/components/task/errors/RunErrorTable.js +33 -14
- package/lib/components/task/handlers/HandlerTable.js +23 -11
- package/lib/components/task/runs/RunTable.js +22 -9
- package/lib/components/task/sources/SourceTable.js +15 -7
- package/lib/components/task/triggers/TriggerTable.js +50 -23
- package/lib/components/task/workflows/LinkedWorkflowTable.js +32 -16
- package/lib/components/task/workflows/WorkflowTable.js +30 -15
- package/lib/index.js +4 -3
- package/package.json +17 -4
- package/proxyhelper.js +17 -11
|
@@ -77,27 +77,44 @@ var BooleanYesNoCell = function BooleanYesNoCell(props) {
|
|
|
77
77
|
var columns = [{
|
|
78
78
|
value: 'username',
|
|
79
79
|
title: 'Username',
|
|
80
|
-
sortable: true
|
|
80
|
+
sortable: true,
|
|
81
|
+
toggleable: false,
|
|
82
|
+
columnOrder: 'first'
|
|
81
83
|
}, {
|
|
82
84
|
value: 'email',
|
|
83
85
|
title: 'Email',
|
|
84
|
-
sortable: true
|
|
86
|
+
sortable: true,
|
|
87
|
+
toggleable: true
|
|
85
88
|
}, {
|
|
86
89
|
value: 'displayName',
|
|
87
90
|
title: 'Display Name',
|
|
88
|
-
sortable: true
|
|
91
|
+
sortable: true,
|
|
92
|
+
toggleable: true
|
|
89
93
|
}, {
|
|
90
94
|
value: 'createdAt',
|
|
91
95
|
title: 'Created',
|
|
92
|
-
sortable: true
|
|
96
|
+
sortable: true,
|
|
97
|
+
toggleable: true
|
|
98
|
+
}, {
|
|
99
|
+
value: 'createdBy',
|
|
100
|
+
title: 'Created By',
|
|
101
|
+
sortable: true,
|
|
102
|
+
toggleable: true
|
|
93
103
|
}, {
|
|
94
104
|
value: 'updatedAt',
|
|
95
105
|
title: 'Updated',
|
|
96
|
-
sortable: true
|
|
106
|
+
sortable: true,
|
|
107
|
+
toggleable: true
|
|
108
|
+
}, {
|
|
109
|
+
value: 'updatedBy',
|
|
110
|
+
title: 'Updated By',
|
|
111
|
+
sortable: true,
|
|
112
|
+
toggleable: true
|
|
97
113
|
}, {
|
|
98
114
|
value: 'enabled',
|
|
99
115
|
title: 'Enabled?',
|
|
100
116
|
sortable: false,
|
|
117
|
+
toggleable: true,
|
|
101
118
|
components: {
|
|
102
119
|
BodyCell: BooleanYesNoCell
|
|
103
120
|
}
|
|
@@ -105,6 +122,7 @@ var columns = [{
|
|
|
105
122
|
value: 'spaceAdmin',
|
|
106
123
|
title: 'Space Admin?',
|
|
107
124
|
sortable: false,
|
|
125
|
+
toggleable: true,
|
|
108
126
|
components: {
|
|
109
127
|
BodyCell: BooleanYesNoCell
|
|
110
128
|
}
|
|
@@ -23,7 +23,12 @@ var securityEndpoints = {
|
|
|
23
23
|
};
|
|
24
24
|
var dataSources = function dataSources(_ref) {
|
|
25
25
|
var kappSlug = _ref.kappSlug,
|
|
26
|
-
webApi = _ref.webApi
|
|
26
|
+
webApi = _ref.webApi,
|
|
27
|
+
cloneParams = _ref.cloneParams;
|
|
28
|
+
var _ref2 = cloneParams || {},
|
|
29
|
+
cloneWebApi = _ref2.cloneWebApi,
|
|
30
|
+
sourceGroup = _ref2.sourceGroup,
|
|
31
|
+
sourceName = _ref2.sourceName;
|
|
27
32
|
return {
|
|
28
33
|
securityPolicyDefinitions: {
|
|
29
34
|
fn: _apis.fetchSecurityPolicyDefinitions,
|
|
@@ -33,16 +38,29 @@ var dataSources = function dataSources(_ref) {
|
|
|
33
38
|
transform: function transform(result) {
|
|
34
39
|
return result.securityPolicyDefinitions;
|
|
35
40
|
}
|
|
41
|
+
},
|
|
42
|
+
tree: {
|
|
43
|
+
// if cloneWebApi is falsy fetchTree will not run
|
|
44
|
+
fn: _apis.fetchTree,
|
|
45
|
+
params: cloneWebApi && [{
|
|
46
|
+
name: cloneWebApi.get('slug'),
|
|
47
|
+
sourceGroup: sourceGroup,
|
|
48
|
+
sourceName: sourceName,
|
|
49
|
+
include: 'details,treeJson'
|
|
50
|
+
}],
|
|
51
|
+
transform: function transform(results) {
|
|
52
|
+
return results.tree;
|
|
53
|
+
}
|
|
36
54
|
}
|
|
37
55
|
};
|
|
38
56
|
};
|
|
39
|
-
var handleSubmit = function handleSubmit(
|
|
40
|
-
var slug =
|
|
41
|
-
kappSlug =
|
|
42
|
-
webApi =
|
|
57
|
+
var handleSubmit = function handleSubmit(_ref3) {
|
|
58
|
+
var slug = _ref3.slug,
|
|
59
|
+
kappSlug = _ref3.kappSlug,
|
|
60
|
+
webApi = _ref3.webApi;
|
|
43
61
|
return /*#__PURE__*/function () {
|
|
44
|
-
var
|
|
45
|
-
var _yield$fetchSpace, space, sourceName, sourceGroup,
|
|
62
|
+
var _ref4 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee(values, bindings) {
|
|
63
|
+
var _yield$fetchSpace, space, sourceName, sourceGroup, _ref5, _webApi, error1, _ref6, tree, error2;
|
|
46
64
|
return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
|
|
47
65
|
while (1) {
|
|
48
66
|
switch (_context.prev = _context.next) {
|
|
@@ -85,9 +103,9 @@ var handleSubmit = function handleSubmit(_ref2) {
|
|
|
85
103
|
case 15:
|
|
86
104
|
_context.t0 = _context.sent;
|
|
87
105
|
case 16:
|
|
88
|
-
|
|
89
|
-
_webApi =
|
|
90
|
-
error1 =
|
|
106
|
+
_ref5 = _context.t0;
|
|
107
|
+
_webApi = _ref5.webApi;
|
|
108
|
+
error1 = _ref5.error;
|
|
91
109
|
if (!error1) {
|
|
92
110
|
_context.next = 21;
|
|
93
111
|
break;
|
|
@@ -119,15 +137,16 @@ var handleSubmit = function handleSubmit(_ref2) {
|
|
|
119
137
|
tree: {
|
|
120
138
|
sourceGroup: sourceGroup,
|
|
121
139
|
sourceName: sourceName,
|
|
122
|
-
name: values.get('slug')
|
|
140
|
+
name: values.get('slug'),
|
|
141
|
+
treeJson: bindings.tree && bindings.tree.get('treeJson') // used when the tree is cloned
|
|
123
142
|
}
|
|
124
143
|
});
|
|
125
144
|
case 29:
|
|
126
145
|
_context.t1 = _context.sent;
|
|
127
146
|
case 30:
|
|
128
|
-
|
|
129
|
-
tree =
|
|
130
|
-
error2 =
|
|
147
|
+
_ref6 = _context.t1;
|
|
148
|
+
tree = _ref6.tree;
|
|
149
|
+
error2 = _ref6.error;
|
|
131
150
|
if (!error2) {
|
|
132
151
|
_context.next = 35;
|
|
133
152
|
break;
|
|
@@ -147,16 +166,16 @@ var handleSubmit = function handleSubmit(_ref2) {
|
|
|
147
166
|
}
|
|
148
167
|
}, _callee);
|
|
149
168
|
}));
|
|
150
|
-
return function (_x) {
|
|
151
|
-
return
|
|
169
|
+
return function (_x, _x2) {
|
|
170
|
+
return _ref4.apply(this, arguments);
|
|
152
171
|
};
|
|
153
172
|
}();
|
|
154
173
|
};
|
|
155
|
-
var fields = function fields(
|
|
156
|
-
var webApi =
|
|
157
|
-
tree =
|
|
158
|
-
return function (
|
|
159
|
-
var securityPolicyDefinitions =
|
|
174
|
+
var fields = function fields(_ref7) {
|
|
175
|
+
var webApi = _ref7.webApi,
|
|
176
|
+
tree = _ref7.tree;
|
|
177
|
+
return function (_ref8) {
|
|
178
|
+
var securityPolicyDefinitions = _ref8.securityPolicyDefinitions;
|
|
160
179
|
return securityPolicyDefinitions && [{
|
|
161
180
|
name: 'slug',
|
|
162
181
|
label: 'Slug',
|
|
@@ -175,16 +194,16 @@ var fields = function fields(_ref6) {
|
|
|
175
194
|
};
|
|
176
195
|
}),
|
|
177
196
|
initialValue: (0, _immutable.get)(webApi, 'method') || ''
|
|
178
|
-
}].concat((0, _toConsumableArray2["default"])(Object.entries(securityEndpoints).map(function (
|
|
179
|
-
var
|
|
180
|
-
endpointFieldName =
|
|
181
|
-
endpoint =
|
|
197
|
+
}].concat((0, _toConsumableArray2["default"])(Object.entries(securityEndpoints).map(function (_ref9) {
|
|
198
|
+
var _ref10 = (0, _slicedToArray2["default"])(_ref9, 2),
|
|
199
|
+
endpointFieldName = _ref10[0],
|
|
200
|
+
endpoint = _ref10[1];
|
|
182
201
|
return {
|
|
183
202
|
name: endpointFieldName,
|
|
184
203
|
label: endpoint.label,
|
|
185
204
|
type: 'select',
|
|
186
|
-
options: function options(
|
|
187
|
-
var securityPolicyDefinitions =
|
|
205
|
+
options: function options(_ref11) {
|
|
206
|
+
var securityPolicyDefinitions = _ref11.securityPolicyDefinitions;
|
|
188
207
|
return securityPolicyDefinitions ? securityPolicyDefinitions.filter(function (definition) {
|
|
189
208
|
return endpoint.types.includes(definition.get('type'));
|
|
190
209
|
}).map(function (definition) {
|
|
@@ -204,8 +223,8 @@ var fields = function fields(_ref6) {
|
|
|
204
223
|
label: 'Security Policies',
|
|
205
224
|
type: null,
|
|
206
225
|
visible: false,
|
|
207
|
-
serialize: function serialize(
|
|
208
|
-
var values =
|
|
226
|
+
serialize: function serialize(_ref12) {
|
|
227
|
+
var values = _ref12.values;
|
|
209
228
|
return (0, _immutable.Map)(securityEndpoints).map(function (policy, endpointFieldName) {
|
|
210
229
|
return (0, _immutable.Map)({
|
|
211
230
|
endpoint: policy.endpoint,
|
|
@@ -226,7 +245,7 @@ var fields = function fields(_ref6) {
|
|
|
226
245
|
};
|
|
227
246
|
};
|
|
228
247
|
var WebApiForm = (0, _Form.generateForm)({
|
|
229
|
-
formOptions: ['kappSlug', 'slug', 'webApi', 'tree'],
|
|
248
|
+
formOptions: ['kappSlug', 'slug', 'webApi', 'tree', 'cloneParams'],
|
|
230
249
|
dataSources: dataSources,
|
|
231
250
|
fields: fields,
|
|
232
251
|
handleSubmit: handleSubmit
|
|
@@ -17,7 +17,7 @@ var dataSource = function dataSource(_ref) {
|
|
|
17
17
|
params: function params() {
|
|
18
18
|
return [{
|
|
19
19
|
kappSlug: kappSlug,
|
|
20
|
-
include: 'details'
|
|
20
|
+
include: 'details,securityPolicies'
|
|
21
21
|
}];
|
|
22
22
|
},
|
|
23
23
|
transform: function transform(result) {
|
|
@@ -51,25 +51,32 @@ var filters = function filters() {
|
|
|
51
51
|
var columns = [{
|
|
52
52
|
value: 'slug',
|
|
53
53
|
title: 'Slug',
|
|
54
|
-
sortable: true
|
|
54
|
+
sortable: true,
|
|
55
|
+
toggleable: false,
|
|
56
|
+
columnOrder: 'first'
|
|
55
57
|
}, {
|
|
56
58
|
value: 'method',
|
|
57
59
|
title: 'Method',
|
|
58
|
-
sortable: true
|
|
60
|
+
sortable: true,
|
|
61
|
+
toggleable: true
|
|
59
62
|
}, {
|
|
60
63
|
value: 'createdAt',
|
|
61
64
|
title: 'Created',
|
|
62
|
-
sortable: true
|
|
65
|
+
sortable: true,
|
|
66
|
+
toggleable: true
|
|
63
67
|
}, {
|
|
64
68
|
value: 'createdBy',
|
|
65
|
-
title: 'Created By'
|
|
69
|
+
title: 'Created By',
|
|
70
|
+
toggleable: true
|
|
66
71
|
}, {
|
|
67
72
|
value: 'updatedAt',
|
|
68
73
|
title: 'Updated',
|
|
69
|
-
sortable: true
|
|
74
|
+
sortable: true,
|
|
75
|
+
toggleable: true
|
|
70
76
|
}, {
|
|
71
77
|
value: 'updatedBy',
|
|
72
|
-
title: 'Updated By'
|
|
78
|
+
title: 'Updated By',
|
|
79
|
+
toggleable: true
|
|
73
80
|
}];
|
|
74
81
|
var WebApiTable = (0, _Table.generateTable)({
|
|
75
82
|
tableOptions: ['kappSlug'],
|
|
@@ -88,31 +88,41 @@ var filters = function filters() {
|
|
|
88
88
|
};
|
|
89
89
|
var columns = [{
|
|
90
90
|
value: 'createdAt',
|
|
91
|
-
title: 'Created'
|
|
91
|
+
title: 'Created',
|
|
92
|
+
toggleable: true
|
|
92
93
|
}, {
|
|
93
94
|
value: 'createdBy',
|
|
94
|
-
title: 'Created By'
|
|
95
|
+
title: 'Created By',
|
|
96
|
+
toggleable: true
|
|
95
97
|
}, {
|
|
96
98
|
value: 'event',
|
|
97
|
-
title: 'Event'
|
|
99
|
+
title: 'Event',
|
|
100
|
+
toggleable: true
|
|
98
101
|
}, {
|
|
99
102
|
value: 'filter',
|
|
100
|
-
title: 'Filter'
|
|
103
|
+
title: 'Filter',
|
|
104
|
+
toggleable: true
|
|
101
105
|
}, {
|
|
102
106
|
value: 'name',
|
|
103
|
-
title: 'Name'
|
|
107
|
+
title: 'Name',
|
|
108
|
+
toggleable: false,
|
|
109
|
+
columnOrder: 'first'
|
|
104
110
|
}, {
|
|
105
111
|
value: 'type',
|
|
106
|
-
title: 'Type'
|
|
112
|
+
title: 'Type',
|
|
113
|
+
toggleable: true
|
|
107
114
|
}, {
|
|
108
115
|
value: 'updatedAt',
|
|
109
|
-
title: 'Updated'
|
|
116
|
+
title: 'Updated',
|
|
117
|
+
toggleable: true
|
|
110
118
|
}, {
|
|
111
119
|
value: 'updatedBy',
|
|
112
|
-
title: 'Updated By'
|
|
120
|
+
title: 'Updated By',
|
|
121
|
+
toggleable: true
|
|
113
122
|
}, {
|
|
114
123
|
value: 'url',
|
|
115
|
-
title: 'URL'
|
|
124
|
+
title: 'URL',
|
|
125
|
+
toggleable: true
|
|
116
126
|
}];
|
|
117
127
|
var WebhookTable = (0, _Table.generateTable)({
|
|
118
128
|
tableOptions: ['scope', 'kappSlug'],
|
|
@@ -71,61 +71,81 @@ var filters = function filters() {
|
|
|
71
71
|
};
|
|
72
72
|
var columns = [{
|
|
73
73
|
value: 'createdAt',
|
|
74
|
-
title: 'Created'
|
|
74
|
+
title: 'Created',
|
|
75
|
+
toggleable: true
|
|
75
76
|
}, {
|
|
76
77
|
value: 'createdBy',
|
|
77
|
-
title: 'Created By'
|
|
78
|
+
title: 'Created By',
|
|
79
|
+
toggleable: true
|
|
78
80
|
}, {
|
|
79
81
|
value: 'event',
|
|
80
|
-
title: 'Event'
|
|
82
|
+
title: 'Event',
|
|
83
|
+
toggleable: true
|
|
81
84
|
}, {
|
|
82
85
|
value: 'id',
|
|
83
|
-
title: 'ID'
|
|
86
|
+
title: 'ID',
|
|
87
|
+
toggleable: true
|
|
84
88
|
}, {
|
|
85
89
|
value: 'name',
|
|
86
|
-
title: 'Name'
|
|
90
|
+
title: 'Name',
|
|
91
|
+
toggleable: true
|
|
87
92
|
}, {
|
|
88
93
|
value: 'parentId',
|
|
89
|
-
title: 'Parent ID'
|
|
94
|
+
title: 'Parent ID',
|
|
95
|
+
toggleable: true
|
|
90
96
|
}, {
|
|
91
97
|
value: 'requestContent',
|
|
92
|
-
title: 'Request Content'
|
|
98
|
+
title: 'Request Content',
|
|
99
|
+
toggleable: true
|
|
93
100
|
}, {
|
|
94
101
|
value: 'responseContent',
|
|
95
|
-
title: 'Response Content'
|
|
102
|
+
title: 'Response Content',
|
|
103
|
+
toggleable: true
|
|
96
104
|
}, {
|
|
97
105
|
value: 'retryCount',
|
|
98
|
-
title: 'Retry Count'
|
|
106
|
+
title: 'Retry Count',
|
|
107
|
+
toggleable: true
|
|
99
108
|
}, {
|
|
100
109
|
value: 'scheduledAt',
|
|
101
|
-
title: 'Scheduled At'
|
|
110
|
+
title: 'Scheduled At',
|
|
111
|
+
toggleable: false,
|
|
112
|
+
columnOrder: 'first'
|
|
102
113
|
}, {
|
|
103
114
|
value: 'scopeId',
|
|
104
|
-
title: 'Scope ID'
|
|
115
|
+
title: 'Scope ID',
|
|
116
|
+
toggleable: true
|
|
105
117
|
}, {
|
|
106
118
|
value: 'scopeType',
|
|
107
|
-
title: 'Scope Type'
|
|
119
|
+
title: 'Scope Type',
|
|
120
|
+
toggleable: true
|
|
108
121
|
}, {
|
|
109
122
|
value: 'status',
|
|
110
|
-
title: 'Status'
|
|
123
|
+
title: 'Status',
|
|
124
|
+
toggleable: true
|
|
111
125
|
}, {
|
|
112
126
|
value: 'summary',
|
|
113
|
-
title: 'Summary'
|
|
127
|
+
title: 'Summary',
|
|
128
|
+
toggleable: true
|
|
114
129
|
}, {
|
|
115
130
|
value: 'type',
|
|
116
|
-
title: 'Type'
|
|
131
|
+
title: 'Type',
|
|
132
|
+
toggleable: true
|
|
117
133
|
}, {
|
|
118
134
|
value: 'updatedAt',
|
|
119
|
-
title: 'Updated'
|
|
135
|
+
title: 'Updated',
|
|
136
|
+
toggleable: true
|
|
120
137
|
}, {
|
|
121
138
|
value: 'updatedBy',
|
|
122
|
-
title: 'Updated By'
|
|
139
|
+
title: 'Updated By',
|
|
140
|
+
toggleable: true
|
|
123
141
|
}, {
|
|
124
142
|
value: 'url',
|
|
125
|
-
title: 'URL'
|
|
143
|
+
title: 'URL',
|
|
144
|
+
toggleable: true
|
|
126
145
|
}, {
|
|
127
146
|
value: 'webhookId',
|
|
128
|
-
title: 'Webhook ID'
|
|
147
|
+
title: 'Webhook ID',
|
|
148
|
+
toggleable: true
|
|
129
149
|
}];
|
|
130
150
|
var WebhookJobTable = (0, _Table.generateTable)({
|
|
131
151
|
tableOptions: ['scope', 'kappSlug', 'status'],
|
|
@@ -188,60 +188,122 @@ var buildPropertyFields = function buildPropertyFields(_ref5) {
|
|
|
188
188
|
var isNew = _ref5.isNew,
|
|
189
189
|
properties = _ref5.properties,
|
|
190
190
|
getName = _ref5.getName,
|
|
191
|
+
getLabel = _ref5.getLabel,
|
|
191
192
|
getOptions = _ref5.getOptions,
|
|
192
193
|
getRequired = _ref5.getRequired,
|
|
193
194
|
getSensitive = _ref5.getSensitive,
|
|
195
|
+
getCertificate = _ref5.getCertificate,
|
|
196
|
+
getHelpText = _ref5.getHelpText,
|
|
194
197
|
getValue = _ref5.getValue;
|
|
195
198
|
return {
|
|
196
199
|
propertiesFields: properties.flatMap(function (property) {
|
|
197
200
|
var name = getName(property);
|
|
201
|
+
var label = (0, _lodashEs.isFunction)(getLabel) && getLabel(property) || name;
|
|
198
202
|
var options = (0, _lodashEs.isFunction)(getOptions) && getOptions(property);
|
|
199
203
|
var required = (0, _lodashEs.isFunction)(getRequired) && getRequired(property);
|
|
200
204
|
var sensitive = (0, _lodashEs.isFunction)(getSensitive) && getSensitive(property);
|
|
205
|
+
var certificate = (0, _lodashEs.isFunction)(getCertificate) && getCertificate(property);
|
|
206
|
+
var helpText = (0, _lodashEs.isFunction)(getHelpText) && getHelpText(property);
|
|
201
207
|
var value = getValue(property);
|
|
202
|
-
return
|
|
208
|
+
return !!certificate ? [{
|
|
203
209
|
name: "property_".concat(name),
|
|
204
|
-
label:
|
|
210
|
+
label: label,
|
|
211
|
+
type: 'certificate',
|
|
212
|
+
required: required,
|
|
213
|
+
"transient": true,
|
|
214
|
+
options: options,
|
|
215
|
+
helpText: helpText,
|
|
216
|
+
initialValue: certificate,
|
|
217
|
+
visible: function visible(_ref6) {
|
|
218
|
+
var values = _ref6.values;
|
|
219
|
+
return !values.get("changeProperty_".concat(name));
|
|
220
|
+
}
|
|
221
|
+
}, {
|
|
222
|
+
name: "property_new_".concat(name),
|
|
223
|
+
label: label,
|
|
224
|
+
type: 'file',
|
|
225
|
+
required: required,
|
|
226
|
+
"transient": true,
|
|
227
|
+
helpText: helpText,
|
|
228
|
+
visible: function visible(_ref7) {
|
|
229
|
+
var values = _ref7.values;
|
|
230
|
+
return values.get("changeProperty_".concat(name));
|
|
231
|
+
}
|
|
232
|
+
}, {
|
|
233
|
+
name: "changeProperty_".concat(name),
|
|
234
|
+
label: "Change ".concat(label),
|
|
235
|
+
type: 'toggle',
|
|
236
|
+
"transient": true,
|
|
237
|
+
initialValue: false,
|
|
238
|
+
onChange: function onChange(_ref8, _ref9) {
|
|
239
|
+
var values = _ref8.values;
|
|
240
|
+
var setValue = _ref9.setValue;
|
|
241
|
+
if (!_immutable.List.isList(values.get("property_new_".concat(name))) || values.get("property_new_".concat(name)).size > 0) {
|
|
242
|
+
setValue("property_new_".concat(name), (0, _immutable.List)());
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}] : !sensitive || isNew ? [{
|
|
246
|
+
name: "property_".concat(name),
|
|
247
|
+
label: label,
|
|
205
248
|
type: sensitive ? 'password' : options ? 'select' : 'text',
|
|
206
249
|
required: required,
|
|
207
250
|
"transient": true,
|
|
208
251
|
options: options,
|
|
252
|
+
helpText: helpText,
|
|
209
253
|
initialValue: value
|
|
210
254
|
}] : [{
|
|
211
255
|
name: "property_".concat(name),
|
|
212
|
-
label:
|
|
213
|
-
type: '
|
|
214
|
-
required: required ? function (
|
|
215
|
-
var values =
|
|
256
|
+
label: label,
|
|
257
|
+
type: 'secret',
|
|
258
|
+
required: required ? function (_ref10) {
|
|
259
|
+
var values = _ref10.values;
|
|
216
260
|
return values.get("changeProperty_".concat(name));
|
|
217
261
|
} : false,
|
|
218
262
|
"transient": true,
|
|
263
|
+
helpText: helpText,
|
|
219
264
|
initialValue: '',
|
|
220
|
-
visible: function visible(
|
|
221
|
-
var values =
|
|
265
|
+
visible: function visible(_ref11) {
|
|
266
|
+
var values = _ref11.values;
|
|
222
267
|
return values.get("changeProperty_".concat(name));
|
|
223
268
|
}
|
|
224
269
|
}, {
|
|
225
270
|
name: "changeProperty_".concat(name),
|
|
226
|
-
label: "Change ".concat(
|
|
227
|
-
type: '
|
|
271
|
+
label: "Change ".concat(label),
|
|
272
|
+
type: 'toggle',
|
|
228
273
|
"transient": true,
|
|
229
274
|
initialValue: false,
|
|
230
|
-
onChange: function onChange(
|
|
231
|
-
var values =
|
|
232
|
-
var setValue =
|
|
275
|
+
onChange: function onChange(_ref12, _ref13) {
|
|
276
|
+
var values = _ref12.values;
|
|
277
|
+
var setValue = _ref13.setValue;
|
|
233
278
|
if (values.get("property_".concat(name)) !== '') {
|
|
234
279
|
setValue("property_".concat(name), '');
|
|
235
280
|
}
|
|
236
281
|
}
|
|
237
282
|
}];
|
|
238
283
|
}).toArray(),
|
|
239
|
-
propertiesSerialize: function propertiesSerialize(
|
|
240
|
-
var values =
|
|
241
|
-
return properties.
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
284
|
+
propertiesSerialize: function propertiesSerialize(_ref14) {
|
|
285
|
+
var values = _ref14.values;
|
|
286
|
+
return properties.reduce(function (reduction, property) {
|
|
287
|
+
var name = getName(property);
|
|
288
|
+
var sensitive = (0, _lodashEs.isFunction)(getSensitive) && getSensitive(property);
|
|
289
|
+
var certificate = (0, _lodashEs.isFunction)(getCertificate) && getCertificate(property);
|
|
290
|
+
if (certificate) {
|
|
291
|
+
// If certificate field, serialize value if the corresponding
|
|
292
|
+
// changeProperty field has a value. Set to the new uploaded file, or
|
|
293
|
+
// an empty string if no file uploaded.
|
|
294
|
+
if (values.get("changeProperty_".concat(name))) {
|
|
295
|
+
return reduction.set(name, values.getIn(["property_new_".concat(name), 0]) || '');
|
|
296
|
+
}
|
|
297
|
+
} else if (sensitive) {
|
|
298
|
+
// If sensitive field, serialize value if the corresponding
|
|
299
|
+
// changeProperty field has a value. Set to the new provided value.
|
|
300
|
+
if (isNew || values.get("changeProperty_".concat(name))) {
|
|
301
|
+
return reduction.set(name, values.get("property_".concat(name)));
|
|
302
|
+
}
|
|
303
|
+
} else {
|
|
304
|
+
return reduction.set(name, values.get("property_".concat(name)));
|
|
305
|
+
}
|
|
306
|
+
return reduction;
|
|
245
307
|
}, (0, _immutable.Map)()).toObject();
|
|
246
308
|
}
|
|
247
309
|
};
|
package/lib/components/index.js
CHANGED
|
@@ -483,6 +483,18 @@ Object.defineProperty(exports, "SystemBackgroundTasksTable", {
|
|
|
483
483
|
return _SystemBackgroundTasksTable.SystemBackgroundTasksTable;
|
|
484
484
|
}
|
|
485
485
|
});
|
|
486
|
+
Object.defineProperty(exports, "SystemCassandraForm", {
|
|
487
|
+
enumerable: true,
|
|
488
|
+
get: function get() {
|
|
489
|
+
return _SystemCassandraForm.SystemCassandraForm;
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
Object.defineProperty(exports, "SystemElasticSearchForm", {
|
|
493
|
+
enumerable: true,
|
|
494
|
+
get: function get() {
|
|
495
|
+
return _SystemElasticSearchForm.SystemElasticSearchForm;
|
|
496
|
+
}
|
|
497
|
+
});
|
|
486
498
|
Object.defineProperty(exports, "SystemErrorsTable", {
|
|
487
499
|
enumerable: true,
|
|
488
500
|
get: function get() {
|
|
@@ -543,6 +555,18 @@ Object.defineProperty(exports, "SystemTenantTable", {
|
|
|
543
555
|
return _SystemTenantTable.SystemTenantTable;
|
|
544
556
|
}
|
|
545
557
|
});
|
|
558
|
+
Object.defineProperty(exports, "SystemTrustedCertificateForm", {
|
|
559
|
+
enumerable: true,
|
|
560
|
+
get: function get() {
|
|
561
|
+
return _SystemTrustedCertificateForm.SystemTrustedCertificateForm;
|
|
562
|
+
}
|
|
563
|
+
});
|
|
564
|
+
Object.defineProperty(exports, "SystemTrustedCertificatesTable", {
|
|
565
|
+
enumerable: true,
|
|
566
|
+
get: function get() {
|
|
567
|
+
return _SystemTrustedCertificatesTable.SystemTrustedCertificatesTable;
|
|
568
|
+
}
|
|
569
|
+
});
|
|
546
570
|
Object.defineProperty(exports, "SystemUserForm", {
|
|
547
571
|
enumerable: true,
|
|
548
572
|
get: function get() {
|
|
@@ -603,6 +627,12 @@ Object.defineProperty(exports, "TeamTable", {
|
|
|
603
627
|
return _TeamTable.TeamTable;
|
|
604
628
|
}
|
|
605
629
|
});
|
|
630
|
+
Object.defineProperty(exports, "ToastContainer", {
|
|
631
|
+
enumerable: true,
|
|
632
|
+
get: function get() {
|
|
633
|
+
return _ToastContainer.ToastContainer;
|
|
634
|
+
}
|
|
635
|
+
});
|
|
606
636
|
Object.defineProperty(exports, "TreeBuilder", {
|
|
607
637
|
enumerable: true,
|
|
608
638
|
get: function get() {
|
|
@@ -687,6 +717,12 @@ Object.defineProperty(exports, "clearFilters", {
|
|
|
687
717
|
return _Table.clearFilters;
|
|
688
718
|
}
|
|
689
719
|
});
|
|
720
|
+
Object.defineProperty(exports, "clearToasts", {
|
|
721
|
+
enumerable: true,
|
|
722
|
+
get: function get() {
|
|
723
|
+
return _ToastContainer.clearToasts;
|
|
724
|
+
}
|
|
725
|
+
});
|
|
690
726
|
Object.defineProperty(exports, "formPropertyName", {
|
|
691
727
|
enumerable: true,
|
|
692
728
|
get: function get() {
|
|
@@ -741,6 +777,12 @@ Object.defineProperty(exports, "getToken", {
|
|
|
741
777
|
return _AuthenticationContainer.getToken;
|
|
742
778
|
}
|
|
743
779
|
});
|
|
780
|
+
Object.defineProperty(exports, "hideToast", {
|
|
781
|
+
enumerable: true,
|
|
782
|
+
get: function get() {
|
|
783
|
+
return _ToastContainer.hideToast;
|
|
784
|
+
}
|
|
785
|
+
});
|
|
744
786
|
Object.defineProperty(exports, "importLocale", {
|
|
745
787
|
enumerable: true,
|
|
746
788
|
get: function get() {
|
|
@@ -825,6 +867,12 @@ Object.defineProperty(exports, "serializeForm", {
|
|
|
825
867
|
return _Form.serializeForm;
|
|
826
868
|
}
|
|
827
869
|
});
|
|
870
|
+
Object.defineProperty(exports, "showToast", {
|
|
871
|
+
enumerable: true,
|
|
872
|
+
get: function get() {
|
|
873
|
+
return _ToastContainer.showToast;
|
|
874
|
+
}
|
|
875
|
+
});
|
|
828
876
|
Object.defineProperty(exports, "submitForm", {
|
|
829
877
|
enumerable: true,
|
|
830
878
|
get: function get() {
|
|
@@ -873,6 +921,7 @@ var _FormSelect = require("./common/FormSelect");
|
|
|
873
921
|
var _Scroller = require("./common/Scroller");
|
|
874
922
|
var _StaticSelect = require("./common/StaticSelect");
|
|
875
923
|
var _AuthenticationContainer = require("./common/authentication/AuthenticationContainer");
|
|
924
|
+
var _ToastContainer = require("./common/ToastContainer");
|
|
876
925
|
var _Form = require("./form/Form");
|
|
877
926
|
var _FormState = require("./form/FormState");
|
|
878
927
|
var _KitchenSinkForm = require("./form/KitchenSinkForm");
|
|
@@ -950,8 +999,12 @@ var _SystemSmtpForm = require("./system/SystemSmtpForm");
|
|
|
950
999
|
var _SystemTaskAdapterForm = require("./system/SystemTaskAdapterForm");
|
|
951
1000
|
var _SystemIngressForm = require("./system/SystemIngressForm");
|
|
952
1001
|
var _SystemSecurityForm = require("./system/SystemSecurityForm");
|
|
1002
|
+
var _SystemCassandraForm = require("./system/SystemCassandraForm");
|
|
1003
|
+
var _SystemElasticSearchForm = require("./system/SystemElasticSearchForm");
|
|
953
1004
|
var _SystemForm = require("./system/SystemForm");
|
|
954
1005
|
var _SystemBackgroundTasksTable = require("./system/SystemBackgroundTasksTable");
|
|
1006
|
+
var _SystemTrustedCertificateForm = require("./system/SystemTrustedCertificateForm");
|
|
1007
|
+
var _SystemTrustedCertificatesTable = require("./system/SystemTrustedCertificatesTable");
|
|
955
1008
|
var _helpers2 = require("./system/helpers");
|
|
956
1009
|
var _TreeBuilder = require("./task/builder/TreeBuilder");
|
|
957
1010
|
var _ConnectorForm = require("./task/builder/ConnectorForm");
|