@kineticdata/react 6.0.4 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +116 -86
- package/lib/apis/core/attributeDefinitions.js +9 -6
- package/lib/apis/core/integrations.js +61 -0
- package/lib/apis/core/submissions.js +52 -15
- package/lib/apis/http.js +16 -2
- package/lib/apis/index.js +24 -0
- package/lib/apis/integrator/index.js +262 -0
- package/lib/apis/system/index.js +64 -12
- package/lib/apis/task/index.js +9 -2
- package/lib/components/agent/filestore/FilestoreForm.js +1 -1
- package/lib/components/common/AttributeSelect.js +10 -2
- package/lib/components/common/BridgeSelect.js +2 -1
- package/lib/components/common/ConnectionSelect.js +72 -0
- package/lib/components/common/FormSelect.js +2 -1
- package/lib/components/common/StaticSelect.js +15 -6
- package/lib/components/common/TableInput.js +4 -1
- package/lib/components/common/TeamSelect.js +2 -1
- package/lib/components/common/ToastContainer.js +34 -10
- package/lib/components/common/Typeahead.js +59 -23
- package/lib/components/common/UserSelect.js +2 -1
- package/lib/components/common/authentication/RequestInterceptor.js +1 -1
- package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +3 -0
- package/lib/components/core/bridge_model/BridgeModelTable.js +19 -0
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeForm.js +6 -9
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeTable.js +0 -4
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationForm.js +7 -10
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationTable.js +2 -15
- package/lib/components/core/category/CategoryForm.js +4 -1
- package/lib/components/core/category/CategoryTable.js +2 -2
- package/lib/components/core/core_form/CoreForm.js +18 -10
- package/lib/components/core/file_resource/FileResourceForm.js +2 -1
- package/lib/components/core/file_resource/FileResourceTable.js +14 -7
- package/lib/components/core/form/FormForm.js +42 -19
- package/lib/components/core/form/FormTable.js +14 -14
- package/lib/components/core/form_type/FormTypeForm.js +3 -0
- package/lib/components/core/i18n/Moment.js +1 -0
- package/lib/components/core/integration/IntegrationForm.js +232 -0
- package/lib/components/core/integration/IntegrationTable.js +139 -0
- package/lib/components/core/kapp/KappForm.js +56 -67
- 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 +97 -111
- package/lib/components/core/submission/DatastoreSubmissionTable.js +4 -4
- package/lib/components/core/submission/FormSubmissionTable.js +12 -7
- package/lib/components/core/submission/KappSubmissionTable.js +4 -4
- package/lib/components/core/submission/SubmissionForm.js +3 -1
- package/lib/components/core/team/TeamTable.js +17 -7
- package/lib/components/core/user/UserTable.js +18 -18
- package/lib/components/core/webapi/WebApiForm.js +5 -2
- package/lib/components/core/webapi/WebApiTable.js +2 -2
- package/lib/components/core/webhook/WebhookForm.js +43 -33
- package/lib/components/core/webhook/WebhookTable.js +16 -16
- package/lib/components/core/webhook_job/WebhookJobTable.js +17 -6
- package/lib/components/form/Form.helpers.js +10 -4
- package/lib/components/form/Form.js +250 -168
- package/lib/components/form/Form.models.js +6 -1
- package/lib/components/form/FormState.js +9 -5
- package/lib/components/form/defaults/CodeField.js +44 -1
- package/lib/components/index.js +84 -3
- package/lib/components/integrator/connection/ConnectionForm.js +112 -0
- package/lib/components/integrator/connection/ConnectionTable.js +80 -0
- package/lib/components/integrator/connection/config_fields/http.js +570 -0
- package/lib/components/integrator/integrationTypes.js +98 -0
- package/lib/components/integrator/operation/OperationForm.js +128 -0
- package/lib/components/integrator/operation/OperationTable.js +64 -0
- package/lib/components/integrator/operation/config_fields/http.js +184 -0
- package/lib/components/system/SystemSecurityForm.js +1 -1
- package/lib/components/system/SystemTaskAdapterForm.js +9 -9
- package/lib/components/system/helpers.js +123 -100
- package/lib/components/system/spaces/SystemSpaceForm.js +9 -37
- package/lib/components/system/spaces/SystemTenantForm.js +276 -104
- package/lib/components/system/spaces/SystemTenantMigrateForm.js +449 -0
- package/lib/components/system/spaces/SystemTenantTable.js +20 -16
- package/lib/components/table/Table.redux.js +1 -1
- package/lib/components/task/builder/ConnectorForm.js +11 -7
- package/lib/components/task/builder/Node.js +11 -2
- package/lib/components/task/builder/NodeForm.js +93 -22
- package/lib/components/task/builder/NodeParametersForm.js +29 -17
- package/lib/components/task/builder/TaskDefinitionConfigForm.js +18 -50
- package/lib/components/task/builder/TreeBuilder.js +32 -5
- package/lib/components/task/builder/builder.redux.js +399 -205
- package/lib/components/task/builder/constants.js +10 -2
- package/lib/components/task/builder/helpers.js +199 -79
- package/lib/components/task/builder/models.js +11 -9
- package/lib/components/task/category/TaskCategoryTable.js +3 -3
- package/lib/components/task/common/UsageTable.js +1 -1
- package/lib/components/task/handlers/HandlerTable.js +35 -19
- package/lib/components/task/policy_rule/PolicyRuleTable.js +3 -3
- package/lib/components/task/runs/CreateManualTriggerForm.js +2 -0
- package/lib/components/task/runs/RunTable.js +4 -4
- package/lib/components/task/runs/RunTaskTable.js +1 -1
- package/lib/components/task/sources/SourceTable.js +2 -2
- package/lib/components/task/triggers/TriggerTable.js +2 -2
- package/lib/components/task/workflows/LinkedWorkflowTable.js +2 -2
- package/lib/components/task/workflows/WorkflowForm.js +29 -9
- package/lib/components/task/workflows/WorkflowTable.js +2 -2
- package/lib/helpers/index.js +289 -72
- package/package.json +5 -3
- package/proxyhelper.js +28 -3
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.updateOperation = exports.updateConnection = exports.testConnection = exports.inspectOperation = exports.fetchOperations = exports.fetchOperation = exports.fetchIntegratorVersion = exports.fetchConnections = exports.fetchConnection = exports.fetchBulkOperations = exports.executeOperation = exports.deleteOperation = exports.deleteConnection = exports.createOperation = exports.createConnection = void 0;
|
|
8
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
+
var _axios = _interopRequireDefault(require("axios"));
|
|
11
|
+
var _http = require("../http");
|
|
12
|
+
var _helpers = require("../../helpers");
|
|
13
|
+
var _excluded = ["id"],
|
|
14
|
+
_excluded2 = ["id", "connection"],
|
|
15
|
+
_excluded3 = ["connection"],
|
|
16
|
+
_excluded4 = ["id"],
|
|
17
|
+
_excluded5 = ["connection", "connectionId"],
|
|
18
|
+
_excluded6 = ["connectionId"],
|
|
19
|
+
_excluded7 = ["connectionId", "id"],
|
|
20
|
+
_excluded8 = ["connectionId", "id", "operation"],
|
|
21
|
+
_excluded9 = ["connectionId", "operation"],
|
|
22
|
+
_excluded10 = ["connectionId", "id"],
|
|
23
|
+
_excluded11 = ["ids"],
|
|
24
|
+
_excluded12 = ["operation", "operationId"],
|
|
25
|
+
_excluded13 = ["connection", "connectionId", "operation", "operationId", "parameters"];
|
|
26
|
+
/******************************************************************************
|
|
27
|
+
* CONNECTIONS
|
|
28
|
+
******************************************************************************/
|
|
29
|
+
|
|
30
|
+
var fetchConnections = exports.fetchConnections = function fetchConnections() {
|
|
31
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
32
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/integrator/api/connections"), {
|
|
33
|
+
params: options
|
|
34
|
+
}).then(function (response) {
|
|
35
|
+
return {
|
|
36
|
+
connections: response.data
|
|
37
|
+
};
|
|
38
|
+
})["catch"](function (rawError) {
|
|
39
|
+
var _errorResponse$error;
|
|
40
|
+
var errorResponse = (0, _http.handleErrors)(rawError);
|
|
41
|
+
// If response statusCode is 404, then integrator isn't installed so we
|
|
42
|
+
// should return a better message.
|
|
43
|
+
if (((_errorResponse$error = errorResponse.error) === null || _errorResponse$error === void 0 ? void 0 : _errorResponse$error.statusCode) === 404) {
|
|
44
|
+
return {
|
|
45
|
+
error: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, errorResponse.error), {}, {
|
|
46
|
+
message: 'Integrator is unavailable.'
|
|
47
|
+
})
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return errorResponse;
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
var fetchConnection = exports.fetchConnection = function fetchConnection() {
|
|
54
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
55
|
+
(0, _http.validateOptions)('fetchConnection', ['id'], options);
|
|
56
|
+
var id = options.id,
|
|
57
|
+
params = (0, _objectWithoutProperties2["default"])(options, _excluded);
|
|
58
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/integrator/api/connections/").concat(id), {
|
|
59
|
+
params: params
|
|
60
|
+
}).then(function (response) {
|
|
61
|
+
return {
|
|
62
|
+
connection: response.data
|
|
63
|
+
};
|
|
64
|
+
})["catch"](_http.handleErrors);
|
|
65
|
+
};
|
|
66
|
+
var updateConnection = exports.updateConnection = function updateConnection() {
|
|
67
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
68
|
+
(0, _http.validateOptions)('updateConnection', ['id', 'connection'], options);
|
|
69
|
+
var id = options.id,
|
|
70
|
+
connection = options.connection,
|
|
71
|
+
params = (0, _objectWithoutProperties2["default"])(options, _excluded2);
|
|
72
|
+
return _axios["default"].put("".concat(_helpers.bundle.spaceLocation(), "/app/integrator/api/connections/").concat(id), connection, {
|
|
73
|
+
params: params
|
|
74
|
+
}).then(function (response) {
|
|
75
|
+
return {
|
|
76
|
+
connection: response.data
|
|
77
|
+
};
|
|
78
|
+
})["catch"](_http.handleErrors);
|
|
79
|
+
};
|
|
80
|
+
var createConnection = exports.createConnection = function createConnection() {
|
|
81
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
82
|
+
(0, _http.validateOptions)('createConnection', ['connection'], options);
|
|
83
|
+
var connection = options.connection,
|
|
84
|
+
params = (0, _objectWithoutProperties2["default"])(options, _excluded3);
|
|
85
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/integrator/api/connections"), connection, {
|
|
86
|
+
params: params
|
|
87
|
+
}).then(function (response) {
|
|
88
|
+
return {
|
|
89
|
+
connection: response.data
|
|
90
|
+
};
|
|
91
|
+
})["catch"](_http.handleErrors);
|
|
92
|
+
};
|
|
93
|
+
var deleteConnection = exports.deleteConnection = function deleteConnection() {
|
|
94
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
95
|
+
(0, _http.validateOptions)('deleteConnection', ['id'], options);
|
|
96
|
+
var id = options.id,
|
|
97
|
+
params = (0, _objectWithoutProperties2["default"])(options, _excluded4);
|
|
98
|
+
return _axios["default"]["delete"]("".concat(_helpers.bundle.spaceLocation(), "/app/integrator/api/connections/").concat(id), {
|
|
99
|
+
params: params
|
|
100
|
+
}).then(function (response) {
|
|
101
|
+
return {
|
|
102
|
+
connection: response.data
|
|
103
|
+
};
|
|
104
|
+
})["catch"](_http.handleErrors);
|
|
105
|
+
};
|
|
106
|
+
var testConnection = exports.testConnection = function testConnection() {
|
|
107
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
108
|
+
(0, _http.validateOptions)('testConnection', ['connection'], options);
|
|
109
|
+
var connection = options.connection,
|
|
110
|
+
connectionId = options.connectionId,
|
|
111
|
+
params = (0, _objectWithoutProperties2["default"])(options, _excluded5);
|
|
112
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/integrator/api").concat(connectionId ? "/connections/".concat(connectionId) : '', "/test"), connection, {
|
|
113
|
+
params: params
|
|
114
|
+
}).then(function (response) {
|
|
115
|
+
return {
|
|
116
|
+
data: response.data
|
|
117
|
+
};
|
|
118
|
+
})["catch"](_http.handleErrors);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/******************************************************************************
|
|
122
|
+
* OPERATIONS
|
|
123
|
+
******************************************************************************/
|
|
124
|
+
|
|
125
|
+
var fetchOperations = exports.fetchOperations = function fetchOperations() {
|
|
126
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
127
|
+
(0, _http.validateOptions)('fetchOperation', ['connectionId'], options);
|
|
128
|
+
var connectionId = options.connectionId,
|
|
129
|
+
params = (0, _objectWithoutProperties2["default"])(options, _excluded6);
|
|
130
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/integrator/api/connections/").concat(connectionId, "/operations"), {
|
|
131
|
+
params: params
|
|
132
|
+
}).then(function (response) {
|
|
133
|
+
return {
|
|
134
|
+
operations: response.data
|
|
135
|
+
};
|
|
136
|
+
})["catch"](_http.handleErrors);
|
|
137
|
+
};
|
|
138
|
+
var fetchOperation = exports.fetchOperation = function fetchOperation() {
|
|
139
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
140
|
+
(0, _http.validateOptions)('fetchOperation', ['connectionId', 'id'], options);
|
|
141
|
+
var connectionId = options.connectionId,
|
|
142
|
+
id = options.id,
|
|
143
|
+
params = (0, _objectWithoutProperties2["default"])(options, _excluded7);
|
|
144
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/integrator/api/connections/").concat(connectionId, "/operations/").concat(id), {
|
|
145
|
+
params: params
|
|
146
|
+
}).then(function (response) {
|
|
147
|
+
return {
|
|
148
|
+
operation: response.data
|
|
149
|
+
};
|
|
150
|
+
})["catch"](_http.handleErrors);
|
|
151
|
+
};
|
|
152
|
+
var updateOperation = exports.updateOperation = function updateOperation() {
|
|
153
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
154
|
+
(0, _http.validateOptions)('updateOperation', ['connectionId', 'id', 'operation'], options);
|
|
155
|
+
var connectionId = options.connectionId,
|
|
156
|
+
id = options.id,
|
|
157
|
+
operation = options.operation,
|
|
158
|
+
params = (0, _objectWithoutProperties2["default"])(options, _excluded8);
|
|
159
|
+
return _axios["default"].put("".concat(_helpers.bundle.spaceLocation(), "/app/integrator/api/connections/").concat(connectionId, "/operations/").concat(id), operation, {
|
|
160
|
+
params: params
|
|
161
|
+
}).then(function (response) {
|
|
162
|
+
return {
|
|
163
|
+
operation: response.data
|
|
164
|
+
};
|
|
165
|
+
})["catch"](_http.handleErrors);
|
|
166
|
+
};
|
|
167
|
+
var createOperation = exports.createOperation = function createOperation() {
|
|
168
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
169
|
+
(0, _http.validateOptions)('createOperation', ['connectionId', 'operation'], options);
|
|
170
|
+
var connectionId = options.connectionId,
|
|
171
|
+
operation = options.operation,
|
|
172
|
+
params = (0, _objectWithoutProperties2["default"])(options, _excluded9);
|
|
173
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/integrator/api/connections/").concat(connectionId, "/operations"), operation, {
|
|
174
|
+
params: params
|
|
175
|
+
}).then(function (response) {
|
|
176
|
+
return {
|
|
177
|
+
operation: response.data
|
|
178
|
+
};
|
|
179
|
+
})["catch"](_http.handleErrors);
|
|
180
|
+
};
|
|
181
|
+
var deleteOperation = exports.deleteOperation = function deleteOperation() {
|
|
182
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
183
|
+
(0, _http.validateOptions)('deleteOperation', ['connectionId', 'id'], options);
|
|
184
|
+
var connectionId = options.connectionId,
|
|
185
|
+
id = options.id,
|
|
186
|
+
params = (0, _objectWithoutProperties2["default"])(options, _excluded10);
|
|
187
|
+
return _axios["default"]["delete"]("".concat(_helpers.bundle.spaceLocation(), "/app/integrator/api/connections/").concat(connectionId, "/operations/").concat(id), {
|
|
188
|
+
params: params
|
|
189
|
+
}).then(function (response) {
|
|
190
|
+
return {
|
|
191
|
+
operation: response.data
|
|
192
|
+
};
|
|
193
|
+
})["catch"](_http.handleErrors);
|
|
194
|
+
};
|
|
195
|
+
var fetchBulkOperations = exports.fetchBulkOperations = function fetchBulkOperations() {
|
|
196
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
197
|
+
(0, _http.validateOptions)('fetchBulkOperations', ['ids'], options);
|
|
198
|
+
var ids = options.ids,
|
|
199
|
+
params = (0, _objectWithoutProperties2["default"])(options, _excluded11);
|
|
200
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/integrator/api/operations-search"), {
|
|
201
|
+
ids: ids
|
|
202
|
+
}, {
|
|
203
|
+
params: params
|
|
204
|
+
}).then(function (response) {
|
|
205
|
+
return {
|
|
206
|
+
operations: response.data
|
|
207
|
+
};
|
|
208
|
+
})["catch"](_http.handleErrors);
|
|
209
|
+
};
|
|
210
|
+
var inspectOperation = exports.inspectOperation = function inspectOperation() {
|
|
211
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
212
|
+
(0, _http.validateOptions)('inspectOperation', [['operation', 'operationId']], options);
|
|
213
|
+
var operation = options.operation,
|
|
214
|
+
operationId = options.operationId,
|
|
215
|
+
params = (0, _objectWithoutProperties2["default"])(options, _excluded12);
|
|
216
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/integrator/api/inspect"), {
|
|
217
|
+
operation: operation,
|
|
218
|
+
operationId: operationId
|
|
219
|
+
}, {
|
|
220
|
+
params: params
|
|
221
|
+
}).then(function (response) {
|
|
222
|
+
return {
|
|
223
|
+
detectedInputs: response.data.detectedInputs
|
|
224
|
+
};
|
|
225
|
+
})["catch"](_http.handleErrors);
|
|
226
|
+
};
|
|
227
|
+
var executeOperation = exports.executeOperation = function executeOperation() {
|
|
228
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
229
|
+
(0, _http.validateOptions)('executeOperation', [['connection', 'connectionId'], ['operation', 'operationId']], options);
|
|
230
|
+
var connection = options.connection,
|
|
231
|
+
connectionId = options.connectionId,
|
|
232
|
+
operation = options.operation,
|
|
233
|
+
operationId = options.operationId,
|
|
234
|
+
_options$parameters = options.parameters,
|
|
235
|
+
parameters = _options$parameters === void 0 ? {} : _options$parameters,
|
|
236
|
+
params = (0, _objectWithoutProperties2["default"])(options, _excluded13);
|
|
237
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/integrator/api/execute"), {
|
|
238
|
+
connection: connection,
|
|
239
|
+
connectionId: connectionId,
|
|
240
|
+
operation: operation,
|
|
241
|
+
operationId: operationId,
|
|
242
|
+
parameters: parameters
|
|
243
|
+
}, {
|
|
244
|
+
params: params
|
|
245
|
+
}).then(function (response) {
|
|
246
|
+
return {
|
|
247
|
+
data: response.data
|
|
248
|
+
};
|
|
249
|
+
})["catch"](_http.handleErrors);
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
/******************************************************************************
|
|
253
|
+
* METADATA
|
|
254
|
+
******************************************************************************/
|
|
255
|
+
|
|
256
|
+
var fetchIntegratorVersion = exports.fetchIntegratorVersion = function fetchIntegratorVersion() {
|
|
257
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/integrator/api/version")).then(function (response) {
|
|
258
|
+
return {
|
|
259
|
+
version: response.data.version
|
|
260
|
+
};
|
|
261
|
+
})["catch"](_http.handleErrors);
|
|
262
|
+
};
|
package/lib/apis/system/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.updateTenant = exports.updateSystemUser = exports.updateSystemSecurity = exports.updateSystemIngress = exports.updateSystemFilestore = exports.
|
|
7
|
+
exports.updateTenant = exports.updateSystemUser = exports.updateSystemSecurity = exports.updateSystemIngress = exports.updateSystemFilestore = exports.updateSystemDefaultSmtpAdapter = exports.updateSystemDefaultSQLDbAdapter = exports.updateSystem = exports.updateElasticSearchConfig = exports.updateCassandraConfig = exports.systemLogin = exports.rotateEncryptionKey = exports.restartTenantDeployments = exports.restartResources = exports.resetSystemLicense = exports.refreshSystemToken = exports.postPlatformComponentRestart = exports.migrateTenant = exports.importSystemLicense = exports.fetchTrustedCertificates = exports.fetchTenants = exports.fetchTenantDeploymentStatus = exports.fetchTenant = exports.fetchTaskDbAdapters = exports.fetchTaskDbAdapter = exports.fetchSystemUser = exports.fetchSystemSecurity = exports.fetchSystemLicenseStats = exports.fetchSystemLicenseCheck = exports.fetchSystemLicense = exports.fetchSystemIngress = exports.fetchSystemFilestore = exports.fetchSystemDefaultSmtpAdapter = exports.fetchSystemDefaultSQLDbAdapter = exports.fetchSystemBackgroundTasks = exports.fetchSystemBackgroundTask = exports.fetchSystem = exports.fetchPlatformComponentStatus = exports.fetchNotifications = exports.fetchNotificationLabels = exports.fetchElasticSearchConfig = exports.fetchCassandraConfig = exports.deleteTrustedCertificate = exports.deleteTenant = exports.deleteSystemLicense = exports.deleteSystemBackgroundTask = exports.createTrustedCertificate = exports.createTenant = void 0;
|
|
8
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
9
|
var _axios = _interopRequireDefault(require("axios"));
|
|
10
10
|
var _http = require("../http");
|
|
@@ -73,6 +73,26 @@ var createTenant = exports.createTenant = function createTenant() {
|
|
|
73
73
|
};
|
|
74
74
|
})["catch"](_http.handleErrors);
|
|
75
75
|
};
|
|
76
|
+
var migrateTenant = exports.migrateTenant = function migrateTenant() {
|
|
77
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
78
|
+
var slug = options.slug,
|
|
79
|
+
tenant = options.tenant,
|
|
80
|
+
multipart = options.multipart;
|
|
81
|
+
if (!tenant) {
|
|
82
|
+
throw new Error('migrateTenant failed! The option "tenant" is required.');
|
|
83
|
+
}
|
|
84
|
+
if (!slug) {
|
|
85
|
+
throw new Error('migrateTenant failed! The option "slug" is required.');
|
|
86
|
+
}
|
|
87
|
+
return _axios["default"].post("/app/system-coordinator/api/v1/tenants/".concat(slug), !multipart ? tenant : (0, _http.formDataBuilder)(tenant), {
|
|
88
|
+
params: (0, _http.paramBuilder)(options),
|
|
89
|
+
headers: (0, _http.headerBuilder)(options)
|
|
90
|
+
}).then(function (response) {
|
|
91
|
+
return {
|
|
92
|
+
tenant: response.data.tenant
|
|
93
|
+
};
|
|
94
|
+
})["catch"](_http.handleErrors);
|
|
95
|
+
};
|
|
76
96
|
var deleteTenant = exports.deleteTenant = function deleteTenant() {
|
|
77
97
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
78
98
|
var slug = options.slug;
|
|
@@ -90,6 +110,38 @@ var deleteTenant = exports.deleteTenant = function deleteTenant() {
|
|
|
90
110
|
};
|
|
91
111
|
})["catch"](_http.handleErrors);
|
|
92
112
|
};
|
|
113
|
+
var fetchTenantDeploymentStatus = exports.fetchTenantDeploymentStatus = function fetchTenantDeploymentStatus() {
|
|
114
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
115
|
+
var slug = options.slug,
|
|
116
|
+
deployment = options.deployment;
|
|
117
|
+
if (!slug) {
|
|
118
|
+
throw new Error('fetchTenantTaskStatus failed! The option "slug" is required.');
|
|
119
|
+
}
|
|
120
|
+
if (!deployment) {
|
|
121
|
+
throw new Error('fetchTenantTaskStatus failed! The option "deployment" is required.');
|
|
122
|
+
}
|
|
123
|
+
return _axios["default"].get("/app/system-coordinator/api/v1/tenants/".concat(slug, "/deployments/").concat(deployment, "/status")).then(function (_ref) {
|
|
124
|
+
var data = _ref.data;
|
|
125
|
+
return {
|
|
126
|
+
deployment: data
|
|
127
|
+
};
|
|
128
|
+
})["catch"](_http.handleErrors);
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
// Restarts deployments for tenant(s).
|
|
132
|
+
// If `slug` is omitted, all tenants will have their deployment(s) restarted.
|
|
133
|
+
// If `deployment` is omitted, all deployments will be restarted.
|
|
134
|
+
var restartTenantDeployments = exports.restartTenantDeployments = function restartTenantDeployments() {
|
|
135
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
136
|
+
var slug = options.slug,
|
|
137
|
+
deployment = options.deployment;
|
|
138
|
+
return _axios["default"].post("/app/system-coordinator/api/v1/tenants/".concat(slug ? "".concat(slug, "/") : '', "deployments/").concat(deployment ? "".concat(deployment, "/") : '', "restart"), {
|
|
139
|
+
params: (0, _http.paramBuilder)(options),
|
|
140
|
+
headers: (0, _http.headerBuilder)(options)
|
|
141
|
+
}).then(function (response) {
|
|
142
|
+
return response.data;
|
|
143
|
+
})["catch"](_http.handleErrors);
|
|
144
|
+
};
|
|
93
145
|
var fetchSystem = exports.fetchSystem = function fetchSystem() {
|
|
94
146
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
95
147
|
// Build URL and fetch the system config.
|
|
@@ -193,7 +245,7 @@ var fetchTaskDbAdapter = exports.fetchTaskDbAdapter = function fetchTaskDbAdapte
|
|
|
193
245
|
};
|
|
194
246
|
})["catch"](_http.handleErrors);
|
|
195
247
|
};
|
|
196
|
-
var
|
|
248
|
+
var fetchSystemDefaultSQLDbAdapter = exports.fetchSystemDefaultSQLDbAdapter = function fetchSystemDefaultSQLDbAdapter() {
|
|
197
249
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
198
250
|
// Build URL and fetch the space.
|
|
199
251
|
return _axios["default"].get("/app/system-coordinator/api/v1/platform/default-task-db-adapter", {
|
|
@@ -205,12 +257,12 @@ var fetchSystemDefaultTaskDbAdapter = exports.fetchSystemDefaultTaskDbAdapter =
|
|
|
205
257
|
};
|
|
206
258
|
})["catch"](_http.handleErrors);
|
|
207
259
|
};
|
|
208
|
-
var
|
|
260
|
+
var updateSystemDefaultSQLDbAdapter = exports.updateSystemDefaultSQLDbAdapter = function updateSystemDefaultSQLDbAdapter() {
|
|
209
261
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
210
262
|
var adapter = options.adapter,
|
|
211
263
|
multipart = options.multipart;
|
|
212
264
|
if (!adapter) {
|
|
213
|
-
throw new Error('
|
|
265
|
+
throw new Error('updateSystemDefaultSQLDbAdapter failed! The option "adapter" is required.');
|
|
214
266
|
}
|
|
215
267
|
return _axios["default"].put("/app/system-coordinator/api/v1/platform/default-task-db-adapter", !multipart ? adapter : (0, _http.formDataBuilder)(adapter), {
|
|
216
268
|
params: (0, _http.paramBuilder)(options),
|
|
@@ -279,8 +331,8 @@ var postPlatformComponentRestart = exports.postPlatformComponentRestart = functi
|
|
|
279
331
|
if (!options.component || !VALID_RESTARTABLE_COMPONENTS.includes(options.component)) {
|
|
280
332
|
throw new Error('postPlatformComponentRestart failed! The "component" option was missing or invalid.');
|
|
281
333
|
}
|
|
282
|
-
return _axios["default"].post("/app/system-coordinator/api/v1/platform/components/".concat(options.component, "/restart")).then(function (
|
|
283
|
-
var data =
|
|
334
|
+
return _axios["default"].post("/app/system-coordinator/api/v1/platform/components/".concat(options.component, "/restart")).then(function (_ref2) {
|
|
335
|
+
var data = _ref2.data;
|
|
284
336
|
return {
|
|
285
337
|
component: data.component,
|
|
286
338
|
message: data.message
|
|
@@ -289,8 +341,8 @@ var postPlatformComponentRestart = exports.postPlatformComponentRestart = functi
|
|
|
289
341
|
};
|
|
290
342
|
var fetchPlatformComponentStatus = exports.fetchPlatformComponentStatus = function fetchPlatformComponentStatus() {
|
|
291
343
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
292
|
-
return _axios["default"].get('/app/system-coordinator/api/v1/platform/components').then(function (
|
|
293
|
-
var data =
|
|
344
|
+
return _axios["default"].get('/app/system-coordinator/api/v1/platform/components').then(function (_ref3) {
|
|
345
|
+
var data = _ref3.data;
|
|
294
346
|
return {
|
|
295
347
|
components: data.components
|
|
296
348
|
};
|
|
@@ -582,10 +634,10 @@ var fetchNotificationLabels = exports.fetchNotificationLabels = function fetchNo
|
|
|
582
634
|
};
|
|
583
635
|
})["catch"](_http.handleErrors);
|
|
584
636
|
};
|
|
585
|
-
var restartResources = exports.restartResources = function restartResources(
|
|
586
|
-
var
|
|
587
|
-
options =
|
|
588
|
-
notification =
|
|
637
|
+
var restartResources = exports.restartResources = function restartResources(_ref4) {
|
|
638
|
+
var _ref4$options = _ref4.options,
|
|
639
|
+
options = _ref4$options === void 0 ? {} : _ref4$options,
|
|
640
|
+
notification = _ref4.notification;
|
|
589
641
|
return _axios["default"].post('/app/system-coordinator/api/v1/platform/restartResources', (0, _objectSpread2["default"])({}, notification), {
|
|
590
642
|
params: (0, _http.paramBuilder)(options),
|
|
591
643
|
headers: (0, _http.headerBuilder)(options)
|
package/lib/apis/task/index.js
CHANGED
|
@@ -435,11 +435,18 @@ var fetchHandlers = exports.fetchHandlers = function fetchHandlers() {
|
|
|
435
435
|
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/handlers"), {
|
|
436
436
|
params: {
|
|
437
437
|
include: options.include,
|
|
438
|
-
limit: options.limit
|
|
438
|
+
limit: options.limit,
|
|
439
|
+
offset: options.offset,
|
|
440
|
+
name: options.name || undefined,
|
|
441
|
+
status: options.status || undefined,
|
|
442
|
+
direction: options.direction || undefined,
|
|
443
|
+
orderBy: options.orderBy || undefined
|
|
439
444
|
}
|
|
440
445
|
}).then(function (response) {
|
|
441
446
|
return {
|
|
442
|
-
handlers: response.data.handlers
|
|
447
|
+
handlers: response.data.handlers,
|
|
448
|
+
count: response.data.count,
|
|
449
|
+
nextPageToken: generateNextPageToken(response.data)
|
|
443
450
|
};
|
|
444
451
|
})["catch"](_http.handleErrors);
|
|
445
452
|
};
|
|
@@ -99,7 +99,7 @@ var fields = function fields(_ref4) {
|
|
|
99
99
|
required: true,
|
|
100
100
|
initialValue: (0, _immutable.get)(filestore, 'slug', ''),
|
|
101
101
|
pattern: /^[a-z\d-]+$/,
|
|
102
|
-
patternMessage: '
|
|
102
|
+
patternMessage: 'Filestore Slug may only contain letters, numbers, and dashes',
|
|
103
103
|
helpText: 'Unique name used in the bridge path.'
|
|
104
104
|
}, {
|
|
105
105
|
name: 'adapterClass',
|
|
@@ -23,9 +23,15 @@ var optionToValue = function optionToValue(option) {
|
|
|
23
23
|
var getStatusProps = function getStatusProps(props) {
|
|
24
24
|
return {
|
|
25
25
|
info: props["short"] ? 'Type to find an attribute.' : props.pending ? 'Searching…' : null,
|
|
26
|
-
warning: props.error || props.empty || props.more ? props.error ? props.error : props.more ? 'Too many results, first 50 shown. Please refine your search.' : props.empty ? 'No
|
|
26
|
+
warning: props.error || props.empty || props.more ? props.error ? props.error : props.more ? 'Too many results, first 50 shown. Please refine your search.' : props.empty ? 'No matching attributes found.' : null : null
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
+
var actionOptions = function actionOptions(props) {
|
|
30
|
+
return props.onNew ? {
|
|
31
|
+
label: 'Add New Attribute Definition',
|
|
32
|
+
fn: props.onNew
|
|
33
|
+
} : undefined;
|
|
34
|
+
};
|
|
29
35
|
var AttributeSelect = exports.AttributeSelect = function AttributeSelect(props) {
|
|
30
36
|
return /*#__PURE__*/_react["default"].createElement(_Typeahead.Typeahead, {
|
|
31
37
|
components: props.components || {},
|
|
@@ -39,6 +45,8 @@ var AttributeSelect = exports.AttributeSelect = function AttributeSelect(props)
|
|
|
39
45
|
onBlur: props.onBlur,
|
|
40
46
|
placeholder: props.placeholder,
|
|
41
47
|
id: props.id,
|
|
42
|
-
form: props.form
|
|
48
|
+
form: props.form,
|
|
49
|
+
invalid: props.invalid,
|
|
50
|
+
action: actionOptions(props)
|
|
43
51
|
});
|
|
44
52
|
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ConnectionSelect = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _Typeahead = require("./Typeahead");
|
|
10
|
+
var _apis = require("../../apis");
|
|
11
|
+
var _immutable = require("immutable");
|
|
12
|
+
var searchConnections = function searchConnections(_ref) {
|
|
13
|
+
var _ref$search = _ref.search,
|
|
14
|
+
search = _ref$search === void 0 ? (0, _immutable.Map)() : _ref$search;
|
|
15
|
+
return function (field, value, callback) {
|
|
16
|
+
return (0, _apis.fetchConnections)({
|
|
17
|
+
type: search.get('type')
|
|
18
|
+
}).then(function (_ref2) {
|
|
19
|
+
var connections = _ref2.connections,
|
|
20
|
+
error = _ref2.error,
|
|
21
|
+
nextPageToken = _ref2.nextPageToken;
|
|
22
|
+
return {
|
|
23
|
+
suggestions: connections || [],
|
|
24
|
+
error: error,
|
|
25
|
+
nextPageToken: nextPageToken
|
|
26
|
+
};
|
|
27
|
+
}).then(callback);
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
var connectionToValue = function connectionToValue(connection) {
|
|
31
|
+
return connection && connection.get('id') || '';
|
|
32
|
+
};
|
|
33
|
+
var getStatusProps = function getStatusProps(_ref3) {
|
|
34
|
+
var _ref3$search = _ref3.search,
|
|
35
|
+
search = _ref3$search === void 0 ? (0, _immutable.Map)() : _ref3$search,
|
|
36
|
+
_ref3$messages = _ref3.messages,
|
|
37
|
+
_ref3$messages2 = _ref3$messages === void 0 ? {} : _ref3$messages,
|
|
38
|
+
_ref3$messages2$short = _ref3$messages2["short"],
|
|
39
|
+
_short = _ref3$messages2$short === void 0 ? 'Type to find a connection.' : _ref3$messages2$short,
|
|
40
|
+
_ref3$messages2$empty = _ref3$messages2.empty,
|
|
41
|
+
empty = _ref3$messages2$empty === void 0 ? 'No matching connections.' : _ref3$messages2$empty,
|
|
42
|
+
_ref3$messages2$pendi = _ref3$messages2.pending,
|
|
43
|
+
pending = _ref3$messages2$pendi === void 0 ? 'Searching...' : _ref3$messages2$pendi,
|
|
44
|
+
_ref3$messages2$more = _ref3$messages2.more,
|
|
45
|
+
more = _ref3$messages2$more === void 0 ? "Too many connections, first ".concat(search.get('limit') || 25, " shown. Please refine your search.") : _ref3$messages2$more,
|
|
46
|
+
_ref3$messages2$error = _ref3$messages2.error,
|
|
47
|
+
error = _ref3$messages2$error === void 0 ? 'There was an error fetching connections.' : _ref3$messages2$error;
|
|
48
|
+
return function (props) {
|
|
49
|
+
return {
|
|
50
|
+
info: props["short"] ? _short : props.pending ? pending : null,
|
|
51
|
+
warning: props.error || props.empty || props.more ? props.error ? error : props.more ? more : props.empty ? empty : null : null
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
var ConnectionSelect = exports.ConnectionSelect = function ConnectionSelect(props) {
|
|
56
|
+
return /*#__PURE__*/_react["default"].createElement(_Typeahead.Typeahead, {
|
|
57
|
+
components: props.components || {},
|
|
58
|
+
disabled: props.disabled,
|
|
59
|
+
multiple: props.multiple,
|
|
60
|
+
search: searchConnections(props),
|
|
61
|
+
minSearchLength: props.minSearchLength,
|
|
62
|
+
getSuggestionValue: connectionToValue,
|
|
63
|
+
getStatusProps: getStatusProps(props),
|
|
64
|
+
value: props.value,
|
|
65
|
+
onChange: props.onChange,
|
|
66
|
+
onFocus: props.onFocus,
|
|
67
|
+
onBlur: props.onBlur,
|
|
68
|
+
placeholder: props.placeholder,
|
|
69
|
+
id: props.id,
|
|
70
|
+
form: props.form
|
|
71
|
+
});
|
|
72
|
+
};
|
|
@@ -44,7 +44,8 @@ var searchOptions = function searchOptions(_ref3) {
|
|
|
44
44
|
var allowNew = _ref3.allowNew,
|
|
45
45
|
options = _ref3.options,
|
|
46
46
|
_ref3$search = _ref3.search,
|
|
47
|
-
search = _ref3$search === void 0 ? (0, _immutable.Map)() : _ref3$search
|
|
47
|
+
search = _ref3$search === void 0 ? (0, _immutable.Map)() : _ref3$search,
|
|
48
|
+
messages = _ref3.messages;
|
|
48
49
|
return function (field, value, callback) {
|
|
49
50
|
// Determine the fields config
|
|
50
51
|
var searchFields = _immutable.Map.isMap(search) && search.has('fields') && !search.get('fields').isEmpty() ? search.get('fields').toJS() : fields;
|
|
@@ -62,9 +63,9 @@ var searchOptions = function searchOptions(_ref3) {
|
|
|
62
63
|
nextPageToken: suggestions.length > limit
|
|
63
64
|
});
|
|
64
65
|
} else {
|
|
65
|
-
// If no options provided, return
|
|
66
|
+
// If no options provided, return empty message
|
|
66
67
|
return callback({
|
|
67
|
-
error: 'No options
|
|
68
|
+
error: messages.empty || 'No options found.',
|
|
68
69
|
suggestions: []
|
|
69
70
|
});
|
|
70
71
|
}
|
|
@@ -99,9 +100,9 @@ var getStatusProps = function getStatusProps(_ref7) {
|
|
|
99
100
|
_ref7$messages2$short = _ref7$messages2["short"],
|
|
100
101
|
_short = _ref7$messages2$short === void 0 ? 'Type to find an option.' : _ref7$messages2$short,
|
|
101
102
|
_ref7$messages2$empty = _ref7$messages2.empty,
|
|
102
|
-
empty = _ref7$messages2$empty === void 0 ? 'No
|
|
103
|
+
empty = _ref7$messages2$empty === void 0 ? 'No options found.' : _ref7$messages2$empty,
|
|
103
104
|
_ref7$messages2$custo = _ref7$messages2.custom,
|
|
104
|
-
custom = _ref7$messages2$custo === void 0 ? 'No
|
|
105
|
+
custom = _ref7$messages2$custo === void 0 ? 'No options found. Type to enter a custom option.' : _ref7$messages2$custo,
|
|
105
106
|
_ref7$messages2$pendi = _ref7$messages2.pending,
|
|
106
107
|
pending = _ref7$messages2$pendi === void 0 ? 'Searching...' : _ref7$messages2$pendi,
|
|
107
108
|
_ref7$messages2$more = _ref7$messages2.more,
|
|
@@ -113,6 +114,12 @@ var getStatusProps = function getStatusProps(_ref7) {
|
|
|
113
114
|
};
|
|
114
115
|
};
|
|
115
116
|
};
|
|
117
|
+
var actionOptions = function actionOptions(props) {
|
|
118
|
+
return props.onNew ? {
|
|
119
|
+
label: props.onNewLabel || 'Add New Option',
|
|
120
|
+
fn: props.onNew
|
|
121
|
+
} : undefined;
|
|
122
|
+
};
|
|
116
123
|
var StaticSelect = exports.StaticSelect = function StaticSelect(props) {
|
|
117
124
|
return /*#__PURE__*/_react["default"].createElement(_Typeahead.Typeahead, {
|
|
118
125
|
components: props.components || {},
|
|
@@ -129,6 +136,8 @@ var StaticSelect = exports.StaticSelect = function StaticSelect(props) {
|
|
|
129
136
|
onBlur: props.onBlur,
|
|
130
137
|
placeholder: props.placeholder,
|
|
131
138
|
id: props.id,
|
|
132
|
-
form: props.form
|
|
139
|
+
form: props.form,
|
|
140
|
+
invalid: props.invalid,
|
|
141
|
+
action: actionOptions(props)
|
|
133
142
|
});
|
|
134
143
|
};
|
|
@@ -31,6 +31,7 @@ var TextInput = function TextInput(props) {
|
|
|
31
31
|
form: props.form
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
|
+
var CodeInput = TextInput;
|
|
34
35
|
var SelectInput = function SelectInput(props) {
|
|
35
36
|
return /*#__PURE__*/_react["default"].createElement("select", {
|
|
36
37
|
id: props.id,
|
|
@@ -114,6 +115,7 @@ var RowLayout = function RowLayout(_ref3) {
|
|
|
114
115
|
}, "Delete")));
|
|
115
116
|
};
|
|
116
117
|
var typeToComponent = {
|
|
118
|
+
code: 'CodeInput',
|
|
117
119
|
drag: 'DragHandle',
|
|
118
120
|
display: 'TextDisplay',
|
|
119
121
|
checkbox: 'CheckboxInput',
|
|
@@ -127,7 +129,8 @@ var defaultComponents = {
|
|
|
127
129
|
TextDisplay: TextDisplay,
|
|
128
130
|
CheckboxInput: CheckboxInput,
|
|
129
131
|
SelectInput: SelectInput,
|
|
130
|
-
TextInput: TextInput
|
|
132
|
+
TextInput: TextInput,
|
|
133
|
+
CodeInput: CodeInput
|
|
131
134
|
};
|
|
132
135
|
var fieldFromConfig = function fieldFromConfig(config) {
|
|
133
136
|
var components = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|