@kineticdata/react 5.1.1 → 5.1.2
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/core/bridgeModelAttributes.js +1 -1
- package/lib/apis/core/bridgeModels.js +8 -2
- package/lib/apis/core/bridgedresources.js +2 -1
- package/lib/apis/core/bridgedresources.test.js +1 -1
- package/lib/apis/core/forms.js +2 -1
- package/lib/apis/core/platformItems.js +21 -0
- package/lib/apis/core/submissions.js +24 -3
- package/lib/apis/core/submissions.test.js +46 -19
- package/lib/apis/core/workflows.js +56 -0
- package/lib/apis/index.js +3 -1
- package/lib/apis/task/index.js +7 -3
- package/lib/components/index.js +2 -0
- package/lib/components/table/Table.js +14 -7
- package/lib/components/table/Table.redux.js +16 -8
- package/lib/components/task/builder/TaskDefinitionConfigForm.js +1 -1
- package/lib/components/task/builder/builder.redux.js +65 -28
- package/lib/components/task/builder/models.js +19 -0
- package/lib/components/task/workflows/LinkedWorkflowForm.js +255 -0
- package/lib/components/task/workflows/LinkedWorkflowTable.js +133 -0
- package/lib/components/task/workflows/WorkflowForm.js +12 -2
- package/package.json +3 -3
- package/proxyhelper.js +1 -2
|
@@ -7,7 +7,7 @@ var buildEndpoint = function buildEndpoint(_ref) {
|
|
|
7
7
|
attributeName = _ref.attributeName;
|
|
8
8
|
var an = encodeURIComponent(attributeName);
|
|
9
9
|
var mn = encodeURIComponent(modelName);
|
|
10
|
-
return attributeName ? "".concat(bundle.apiLocation(), "/models/").concat(mn, "/attributes") : "".concat(bundle.apiLocation(), "/models/").concat(mn, "/attributes
|
|
10
|
+
return attributeName ? "".concat(bundle.apiLocation(), "/models/").concat(mn, "/attributes/").concat(an) : "".concat(bundle.apiLocation(), "/models/").concat(mn, "/attributes");
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export var fetchBridgeModelAttributes = function fetchBridgeModelAttributes() {
|
|
@@ -3,9 +3,15 @@ import axios from 'axios';
|
|
|
3
3
|
import { bundle } from '../../helpers';
|
|
4
4
|
import { handleErrors, headerBuilder, paramBuilder, validateOptions } from '../http';
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var buildRuntimeEndpoint = function buildRuntimeEndpoint(_ref) {
|
|
7
7
|
var modelName = _ref.modelName;
|
|
8
8
|
var mn = encodeURIComponent(modelName);
|
|
9
|
+
return modelName ? "".concat(bundle.spaceLocation(), "/app/models/").concat(mn) : "".concat(bundle.spaceLocation(), "/app/models");
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
var buildEndpoint = function buildEndpoint(_ref2) {
|
|
13
|
+
var modelName = _ref2.modelName;
|
|
14
|
+
var mn = encodeURIComponent(modelName);
|
|
9
15
|
return modelName ? "".concat(bundle.apiLocation(), "/models/").concat(mn) : "".concat(bundle.apiLocation(), "/models");
|
|
10
16
|
};
|
|
11
17
|
|
|
@@ -44,7 +50,7 @@ export var testBridgeModel = function testBridgeModel() {
|
|
|
44
50
|
params["parameters[".concat(parameter.name, "]")] = parameter.value;
|
|
45
51
|
return params;
|
|
46
52
|
}, {});
|
|
47
|
-
return axios.post("".concat(
|
|
53
|
+
return axios.post("".concat(buildRuntimeEndpoint(options), "/qualifications/").concat(encodeURIComponent(qualificationName), "/").concat(encodeURIComponent(method)), null, {
|
|
48
54
|
params: _objectSpread(_objectSpread({}, paramBuilder(options)), {}, {
|
|
49
55
|
attributes: attributes.join(',')
|
|
50
56
|
}, parameters),
|
|
@@ -35,7 +35,8 @@ export var bridgedResourceUrl = function bridgedResourceUrl(options) {
|
|
|
35
35
|
|
|
36
36
|
var brn = encodeURIComponent(options.bridgedResourceName); // build the url
|
|
37
37
|
|
|
38
|
-
var url = datastore ? "".concat(bundle.spaceLocation(), "/
|
|
38
|
+
var url = !datastore ? "".concat(bundle.spaceLocation(), "/").concat(kappSlug, "/").concat(formSlug, "/bridgedResources/").concat(brn) // Default kapp to 'datastore' if not provided to support deprecated datastore functionality
|
|
39
|
+
: "".concat(bundle.spaceLocation(), "/datastore/").concat(formSlug, "/bridgedResources/").concat(brn); // append any attributes if they were specified
|
|
39
40
|
|
|
40
41
|
if (counting) {
|
|
41
42
|
url += '/count';
|
|
@@ -55,7 +55,7 @@ describe('bridged resource api', function () {
|
|
|
55
55
|
test('datastore form', function () {
|
|
56
56
|
expect(bridgedResourceUrl(_objectSpread(_objectSpread({}, options), {}, {
|
|
57
57
|
datastore: true
|
|
58
|
-
}))).toBe('user/
|
|
58
|
+
}))).toBe('user/datastore/formslug/bridgedResources/Collection');
|
|
59
59
|
});
|
|
60
60
|
test('default the kapp option', function () {
|
|
61
61
|
delete options.kappSlug;
|
package/lib/apis/core/forms.js
CHANGED
|
@@ -4,7 +4,8 @@ import { handleErrors, paramBuilder, headerBuilder } from '../http';
|
|
|
4
4
|
|
|
5
5
|
var getPath = function getPath(kappSlug, formSlug) {
|
|
6
6
|
var formSuffix = formSlug ? "/".concat(formSlug) : '';
|
|
7
|
-
return kappSlug ? "".concat(bundle.apiLocation(), "/kapps/").concat(kappSlug, "/forms").concat(formSuffix)
|
|
7
|
+
return kappSlug ? "".concat(bundle.apiLocation(), "/kapps/").concat(kappSlug, "/forms").concat(formSuffix) // Default kapp to 'datastore' if not provided to support deprecated datastore functionality
|
|
8
|
+
: "".concat(bundle.apiLocation(), "/kapps/datastore/forms").concat(formSuffix);
|
|
8
9
|
}; // TODO: datastore is deprecated, remove datastore routes from paths.
|
|
9
10
|
|
|
10
11
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import { bundle } from '../../helpers';
|
|
4
|
+
import { handleErrors, headerBuilder, paramBuilder, validateOptions } from '../http';
|
|
5
|
+
export var fetchPlatformItem = function fetchPlatformItem(options) {
|
|
6
|
+
validateOptions('fetchPlatformItem', ['type', 'id'], options);
|
|
7
|
+
var path = options.type === 'Space' ? "".concat(bundle.apiLocation(), "/space") : "".concat(bundle.apiLocation(), "/items/").concat(options.type, "/").concat(options.id);
|
|
8
|
+
var include = options.type === 'Form' ? 'kapp,kapp.space' : options.type === 'Kapp' ? 'space' : '';
|
|
9
|
+
return axios.get(path, {
|
|
10
|
+
params: paramBuilder(_objectSpread(_objectSpread({}, options), {}, {
|
|
11
|
+
include: include
|
|
12
|
+
})),
|
|
13
|
+
headers: headerBuilder(options)
|
|
14
|
+
}).then(function (response) {
|
|
15
|
+
return {
|
|
16
|
+
platformItem: response.data.space || response.data.kapp || response.data.form
|
|
17
|
+
};
|
|
18
|
+
}) // Clean up any errors we receive. Make sure this the last thing so that it
|
|
19
|
+
// cleans up any errors.
|
|
20
|
+
["catch"](handleErrors);
|
|
21
|
+
};
|
|
@@ -412,8 +412,13 @@ export var SubmissionSearch = /*#__PURE__*/function () {
|
|
|
412
412
|
export var searchSubmissions = function searchSubmissions(options) {
|
|
413
413
|
var kapp = options.kapp,
|
|
414
414
|
form = options.form,
|
|
415
|
-
search = options.search
|
|
416
|
-
|
|
415
|
+
search = options.search,
|
|
416
|
+
_options$get = options.get,
|
|
417
|
+
get = _options$get === void 0 ? false : _options$get;
|
|
418
|
+
var endpoint = !get ? 'submissions-search' : 'submissions'; // Default kapp to 'datastore' if not provided to support deprecated datastore functionality
|
|
419
|
+
|
|
420
|
+
var kappSlug = kapp || 'datastore';
|
|
421
|
+
var path = form ? "".concat(bundle.apiLocation(), "/kapps/").concat(kappSlug, "/forms/").concat(form, "/").concat(endpoint) : "".concat(bundle.apiLocation(), "/kapps/").concat(kappSlug, "/").concat(endpoint);
|
|
417
422
|
|
|
418
423
|
var meta = _objectSpread({}, search); // Format includes.
|
|
419
424
|
|
|
@@ -429,7 +434,9 @@ export var searchSubmissions = function searchSubmissions(options) {
|
|
|
429
434
|
} // Fetch the submissions.
|
|
430
435
|
|
|
431
436
|
|
|
432
|
-
var promise = axios.
|
|
437
|
+
var promise = !get ? axios.post(path, _objectSpread(_objectSpread({}, meta), paramBuilder(options)), {
|
|
438
|
+
headers: headerBuilder(options)
|
|
439
|
+
}) : axios.get(path, {
|
|
433
440
|
paramsSerializer: function paramsSerializer(params) {
|
|
434
441
|
return qs.stringify(params);
|
|
435
442
|
},
|
|
@@ -606,6 +613,20 @@ var modeToFn = function modeToFn(mode) {
|
|
|
606
613
|
return mode === MODE_BULK ? 'post' : 'patch';
|
|
607
614
|
};
|
|
608
615
|
|
|
616
|
+
export var importSubmissionStatus = function importSubmissionStatus(options) {
|
|
617
|
+
var kappSlug = options.kappSlug,
|
|
618
|
+
formSlug = options.formSlug,
|
|
619
|
+
jobId = options.jobId;
|
|
620
|
+
var path = "".concat(bundle.apiLocation(), "/kapps/").concat(kappSlug, "/forms/").concat(formSlug, "/submission-import/").concat(jobId);
|
|
621
|
+
return axios.get(path, {
|
|
622
|
+
params: paramBuilder(options),
|
|
623
|
+
headers: headerBuilder(options)
|
|
624
|
+
}).then(function (response) {
|
|
625
|
+
return {
|
|
626
|
+
backgroundJob: response.data.backgroundJob
|
|
627
|
+
};
|
|
628
|
+
})["catch"](handleErrors);
|
|
629
|
+
};
|
|
609
630
|
export var importSubmissions = function importSubmissions(options) {
|
|
610
631
|
var kappSlug = options.kappSlug,
|
|
611
632
|
formSlug = options.formSlug,
|
|
@@ -224,7 +224,7 @@ describe('#searchSubmissions', function () {
|
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
226
|
search = new SubmissionSearch().build();
|
|
227
|
-
axios.
|
|
227
|
+
axios.post = resolvePromiseWith(response);
|
|
228
228
|
});
|
|
229
229
|
test('does not return errors', function () {
|
|
230
230
|
expect.assertions(1);
|
|
@@ -265,6 +265,33 @@ describe('#searchSubmissions', function () {
|
|
|
265
265
|
});
|
|
266
266
|
});
|
|
267
267
|
});
|
|
268
|
+
describe('when successful - get', function () {
|
|
269
|
+
var response;
|
|
270
|
+
var search;
|
|
271
|
+
beforeEach(function () {
|
|
272
|
+
response = {
|
|
273
|
+
status: 200,
|
|
274
|
+
data: {
|
|
275
|
+
submissions: [],
|
|
276
|
+
messages: [],
|
|
277
|
+
nextPageToken: 'page-token'
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
search = new SubmissionSearch().build();
|
|
281
|
+
axios.get = resolvePromiseWith(response);
|
|
282
|
+
});
|
|
283
|
+
test('does return submissions', function () {
|
|
284
|
+
expect.assertions(2);
|
|
285
|
+
return searchSubmissions({
|
|
286
|
+
search: search,
|
|
287
|
+
get: true
|
|
288
|
+
}).then(function (_ref5) {
|
|
289
|
+
var submissions = _ref5.submissions;
|
|
290
|
+
expect(submissions).toBeDefined();
|
|
291
|
+
expect(submissions).toBeInstanceOf(Array);
|
|
292
|
+
});
|
|
293
|
+
});
|
|
294
|
+
});
|
|
268
295
|
});
|
|
269
296
|
describe('#fetchSubmission', function () {
|
|
270
297
|
describe('when successful', function () {
|
|
@@ -287,8 +314,8 @@ describe('#fetchSubmission', function () {
|
|
|
287
314
|
expect.assertions(1);
|
|
288
315
|
return fetchSubmission({
|
|
289
316
|
id: id
|
|
290
|
-
}).then(function (
|
|
291
|
-
var errors =
|
|
317
|
+
}).then(function (_ref6) {
|
|
318
|
+
var errors = _ref6.errors;
|
|
292
319
|
expect(errors).toBeUndefined();
|
|
293
320
|
});
|
|
294
321
|
});
|
|
@@ -296,8 +323,8 @@ describe('#fetchSubmission', function () {
|
|
|
296
323
|
expect.assertions(1);
|
|
297
324
|
return fetchSubmission({
|
|
298
325
|
id: id
|
|
299
|
-
}).then(function (
|
|
300
|
-
var submission =
|
|
326
|
+
}).then(function (_ref7) {
|
|
327
|
+
var submission = _ref7.submission;
|
|
301
328
|
expect(submission).toMatchObject({
|
|
302
329
|
id: id,
|
|
303
330
|
values: values
|
|
@@ -323,8 +350,8 @@ describe('#fetchSubmission', function () {
|
|
|
323
350
|
expect.assertions(1);
|
|
324
351
|
return fetchSubmission({
|
|
325
352
|
id: 'fake'
|
|
326
|
-
}).then(function (
|
|
327
|
-
var error =
|
|
353
|
+
}).then(function (_ref8) {
|
|
354
|
+
var error = _ref8.error;
|
|
328
355
|
expect(error).toEqual({
|
|
329
356
|
statusCode: 500,
|
|
330
357
|
key: null,
|
|
@@ -359,8 +386,8 @@ describe('#createSubmission', function () {
|
|
|
359
386
|
kappSlug: kappSlug,
|
|
360
387
|
formSlug: formSlug,
|
|
361
388
|
values: values
|
|
362
|
-
}).then(function (
|
|
363
|
-
var errors =
|
|
389
|
+
}).then(function (_ref9) {
|
|
390
|
+
var errors = _ref9.errors;
|
|
364
391
|
expect(errors).toBeUndefined();
|
|
365
392
|
});
|
|
366
393
|
});
|
|
@@ -370,8 +397,8 @@ describe('#createSubmission', function () {
|
|
|
370
397
|
kappSlug: kappSlug,
|
|
371
398
|
formSlug: formSlug,
|
|
372
399
|
values: values
|
|
373
|
-
}).then(function (
|
|
374
|
-
var submission =
|
|
400
|
+
}).then(function (_ref10) {
|
|
401
|
+
var submission = _ref10.submission;
|
|
375
402
|
expect(submission).toMatchObject({
|
|
376
403
|
id: id,
|
|
377
404
|
values: values
|
|
@@ -443,8 +470,8 @@ describe('#createSubmission', function () {
|
|
|
443
470
|
return createSubmission({
|
|
444
471
|
formSlug: formSlug,
|
|
445
472
|
values: values
|
|
446
|
-
}).then(function (
|
|
447
|
-
var error =
|
|
473
|
+
}).then(function (_ref11) {
|
|
474
|
+
var error = _ref11.error;
|
|
448
475
|
expect(error).toEqual({
|
|
449
476
|
statusCode: 500,
|
|
450
477
|
key: null,
|
|
@@ -475,8 +502,8 @@ describe('#deleteSubmission', function () {
|
|
|
475
502
|
expect.assertions(1);
|
|
476
503
|
return deleteSubmission({
|
|
477
504
|
id: id
|
|
478
|
-
}).then(function (
|
|
479
|
-
var errors =
|
|
505
|
+
}).then(function (_ref12) {
|
|
506
|
+
var errors = _ref12.errors;
|
|
480
507
|
expect(errors).toBeUndefined();
|
|
481
508
|
});
|
|
482
509
|
});
|
|
@@ -484,8 +511,8 @@ describe('#deleteSubmission', function () {
|
|
|
484
511
|
expect.assertions(1);
|
|
485
512
|
return deleteSubmission({
|
|
486
513
|
id: id
|
|
487
|
-
}).then(function (
|
|
488
|
-
var submission =
|
|
514
|
+
}).then(function (_ref13) {
|
|
515
|
+
var submission = _ref13.submission;
|
|
489
516
|
expect(submission).toMatchObject({
|
|
490
517
|
id: id,
|
|
491
518
|
values: values
|
|
@@ -511,8 +538,8 @@ describe('#deleteSubmission', function () {
|
|
|
511
538
|
expect.assertions(1);
|
|
512
539
|
return deleteSubmission({
|
|
513
540
|
id: 'fake'
|
|
514
|
-
}).then(function (
|
|
515
|
-
var error =
|
|
541
|
+
}).then(function (_ref14) {
|
|
542
|
+
var error = _ref14.error;
|
|
516
543
|
expect(error).toEqual({
|
|
517
544
|
statusCode: 500,
|
|
518
545
|
key: null,
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { apiGroup, handleErrors, headerBuilder, paramBuilder } from '../http';
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import { bundle } from '../../helpers';
|
|
4
|
+
|
|
5
|
+
var _apiGroup = apiGroup({
|
|
6
|
+
name: 'Workflow',
|
|
7
|
+
dataOption: 'workflow',
|
|
8
|
+
plural: {
|
|
9
|
+
requiredOptions: [],
|
|
10
|
+
url: function url(_ref) {
|
|
11
|
+
var kappSlug = _ref.kappSlug,
|
|
12
|
+
formSlug = _ref.formSlug;
|
|
13
|
+
return formSlug ? "/kapps/".concat(kappSlug, "/forms/").concat(formSlug, "/workflows") : kappSlug ? "/kapps/".concat(kappSlug, "/workflows") : "/workflows";
|
|
14
|
+
},
|
|
15
|
+
transform: function transform(response) {
|
|
16
|
+
return response.data;
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
singular: {
|
|
20
|
+
requiredOptions: ['workflowId'],
|
|
21
|
+
url: function url(_ref2) {
|
|
22
|
+
var workflowId = _ref2.workflowId,
|
|
23
|
+
kappSlug = _ref2.kappSlug,
|
|
24
|
+
formSlug = _ref2.formSlug;
|
|
25
|
+
return formSlug ? "/kapps/".concat(kappSlug, "/forms/").concat(formSlug, "/workflows/").concat(workflowId) : kappSlug ? "/kapps/".concat(kappSlug, "/workflows/").concat(workflowId) : "/workflows/".concat(workflowId);
|
|
26
|
+
},
|
|
27
|
+
transform: function transform(response) {
|
|
28
|
+
return {
|
|
29
|
+
workflow: response.data
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}),
|
|
34
|
+
fetchWorkflows = _apiGroup.fetchWorkflows,
|
|
35
|
+
fetchWorkflow = _apiGroup.fetchWorkflow,
|
|
36
|
+
createWorkflow = _apiGroup.createWorkflow,
|
|
37
|
+
updateWorkflow = _apiGroup.updateWorkflow,
|
|
38
|
+
deleteWorkflow = _apiGroup.deleteWorkflow;
|
|
39
|
+
|
|
40
|
+
export { fetchWorkflows, fetchWorkflow, createWorkflow, updateWorkflow, deleteWorkflow };
|
|
41
|
+
|
|
42
|
+
var repairPath = function repairPath(_ref3) {
|
|
43
|
+
var kappSlug = _ref3.kappSlug,
|
|
44
|
+
formSlug = _ref3.formSlug;
|
|
45
|
+
return kappSlug && formSlug ? "".concat(bundle.apiLocation(), "/kapps/").concat(kappSlug, "/forms/").concat(formSlug, "/workflows/repair") : kappSlug ? "".concat(bundle.apiLocation(), "/kapps/").concat(kappSlug, "/workflows/repair") : "".concat(bundle.apiLocation(), "/workflows/repair");
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export var repairWorkflows = function repairWorkflows() {
|
|
49
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
50
|
+
return axios.post(repairPath(options), {
|
|
51
|
+
params: paramBuilder(options),
|
|
52
|
+
headers: headerBuilder(options)
|
|
53
|
+
}).then(function (response) {
|
|
54
|
+
return response.data;
|
|
55
|
+
})["catch"](handleErrors);
|
|
56
|
+
};
|
package/lib/apis/index.js
CHANGED
|
@@ -22,6 +22,7 @@ export * from './core/meta';
|
|
|
22
22
|
export * from './core/notices';
|
|
23
23
|
export * from './core/oauthClients';
|
|
24
24
|
export * from './core/platformComponents';
|
|
25
|
+
export * from './core/platformItems';
|
|
25
26
|
export * from './core/profile';
|
|
26
27
|
export * from './core/securityPolicyDefinitions';
|
|
27
28
|
export * from './core/space';
|
|
@@ -32,7 +33,8 @@ export * from './core/users';
|
|
|
32
33
|
export * from './core/version';
|
|
33
34
|
export * from './core/webApis';
|
|
34
35
|
export * from './core/webhooks';
|
|
35
|
-
export * from './core/webhooksJobs';
|
|
36
|
+
export * from './core/webhooksJobs';
|
|
37
|
+
export * from './core/workflows'; // Discussions
|
|
36
38
|
|
|
37
39
|
export * from './discussions'; // Http
|
|
38
40
|
|
package/lib/apis/task/index.js
CHANGED
|
@@ -42,9 +42,12 @@ export var fetchTrees = function fetchTrees() {
|
|
|
42
42
|
};
|
|
43
43
|
export var fetchTree = function fetchTree() {
|
|
44
44
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
|
|
46
|
+
if (!options.guid) {
|
|
47
|
+
validateOptions('fetchTree', ['name'], options);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return axios.get(options.guid ? "".concat(bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/guid/").concat(options.guid) : "".concat(bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/").concat(buildTreeId(options)), {
|
|
48
51
|
params: {
|
|
49
52
|
include: options.include
|
|
50
53
|
}
|
|
@@ -635,6 +638,7 @@ export var fetchTaskRuns = function fetchTaskRuns() {
|
|
|
635
638
|
return {
|
|
636
639
|
runs: response.data.runs,
|
|
637
640
|
count: response.data.count,
|
|
641
|
+
more: response.data.more,
|
|
638
642
|
nextPageToken: generateNextPageToken(response.data)
|
|
639
643
|
};
|
|
640
644
|
})["catch"](handleErrors);
|
package/lib/components/index.js
CHANGED
|
@@ -119,6 +119,8 @@ export { TriggerTable } from './task/triggers/TriggerTable';
|
|
|
119
119
|
export { RunErrorTable } from './task/errors/RunErrorTable';
|
|
120
120
|
export { SystemErrorsTable } from './task/errors/SystemErrorsTable';
|
|
121
121
|
export { WorkflowTable } from './task/workflows/WorkflowTable';
|
|
122
|
+
export { LinkedWorkflowTable } from './task/workflows/LinkedWorkflowTable';
|
|
123
|
+
export { LinkedWorkflowForm } from './task/workflows/LinkedWorkflowForm';
|
|
122
124
|
export { MissingRoutineTable } from './task/workflows/MissingRoutineTable';
|
|
123
125
|
export { WorkflowForm } from './task/workflows/WorkflowForm';
|
|
124
126
|
export { SourceTable } from './task/sources/SourceTable';
|
|
@@ -38,7 +38,8 @@ var TableComponent = function TableComponent(props) {
|
|
|
38
38
|
components = props.components,
|
|
39
39
|
tableKey = props.tableKey,
|
|
40
40
|
_filterFormKey = props.filterFormKey,
|
|
41
|
-
count = props.count
|
|
41
|
+
count = props.count,
|
|
42
|
+
extraData = props.extraData;
|
|
42
43
|
var table = buildTable(props);
|
|
43
44
|
var filter = components.FilterForm ? buildFilterForm(props) : buildFilterLayout(props);
|
|
44
45
|
var pagination = buildPaginationControl(props);
|
|
@@ -53,7 +54,8 @@ var TableComponent = function TableComponent(props) {
|
|
|
53
54
|
loading: loading,
|
|
54
55
|
rows: rows,
|
|
55
56
|
count: count,
|
|
56
|
-
error: error
|
|
57
|
+
error: error,
|
|
58
|
+
extraData: extraData
|
|
57
59
|
});
|
|
58
60
|
}
|
|
59
61
|
|
|
@@ -266,7 +268,8 @@ var buildPaginationControl = function buildPaginationControl(props) {
|
|
|
266
268
|
count = props.count,
|
|
267
269
|
components = props.components,
|
|
268
270
|
loading = props.loading,
|
|
269
|
-
renderOptions = props.renderOptions
|
|
271
|
+
renderOptions = props.renderOptions,
|
|
272
|
+
extraData = props.extraData;
|
|
270
273
|
var PaginationControl = components.PaginationControl;
|
|
271
274
|
var prevPage = hasPrevPage(data, dataSource, tableOptions, pageTokens, pageOffset) ? onPrevPage(tableKey) : null;
|
|
272
275
|
var nextPage = hasNextPage(data, dataSource, tableOptions, pageOffset, pageSize, currentPageToken, rows) ? onNextPage(tableKey) : null;
|
|
@@ -286,7 +289,8 @@ var buildPaginationControl = function buildPaginationControl(props) {
|
|
|
286
289
|
endIndex: endIndex,
|
|
287
290
|
count: count,
|
|
288
291
|
renderOptions: renderOptions,
|
|
289
|
-
tableOptions: tableOptions
|
|
292
|
+
tableOptions: tableOptions,
|
|
293
|
+
extraData: extraData
|
|
290
294
|
});
|
|
291
295
|
};
|
|
292
296
|
|
|
@@ -306,7 +310,8 @@ export var buildTable = function buildTable(props) {
|
|
|
306
310
|
error: props.error,
|
|
307
311
|
empty: props.rows.isEmpty(),
|
|
308
312
|
renderOptions: props.renderOptions,
|
|
309
|
-
tableOptions: props.tableOptions
|
|
313
|
+
tableOptions: props.tableOptions,
|
|
314
|
+
extraData: props.extraData
|
|
310
315
|
});
|
|
311
316
|
};
|
|
312
317
|
export var buildTableHeader = function buildTableHeader(props) {
|
|
@@ -412,7 +417,8 @@ export var buildTableBodyCells = function buildTableBodyCells(props, row, rowInd
|
|
|
412
417
|
columnComponents = props.columnComponents,
|
|
413
418
|
appliedFilters = props.appliedFilters,
|
|
414
419
|
renderOptions = props.renderOptions,
|
|
415
|
-
tableOptions = props.tableOptions
|
|
420
|
+
tableOptions = props.tableOptions,
|
|
421
|
+
extraData = props.extraData;
|
|
416
422
|
return fromColumnSet(columns, columnSet).map(function (column, index) {
|
|
417
423
|
var BodyCell = columnComponents.getIn([column.get('value'), 'BodyCell'], components.BodyCell);
|
|
418
424
|
var value = row.get(column.get('value'));
|
|
@@ -428,7 +434,8 @@ export var buildTableBodyCells = function buildTableBodyCells(props, row, rowInd
|
|
|
428
434
|
column: column,
|
|
429
435
|
filters: appliedFilters,
|
|
430
436
|
renderOptions: renderOptions,
|
|
431
|
-
tableOptions: tableOptions
|
|
437
|
+
tableOptions: tableOptions,
|
|
438
|
+
extraData: extraData
|
|
432
439
|
}));
|
|
433
440
|
});
|
|
434
441
|
};
|
|
@@ -138,6 +138,7 @@ regHandlers({
|
|
|
138
138
|
onFetch = _ref3$payload.onFetch;
|
|
139
139
|
return !state.getIn(['tables', tableKey, 'mounted']) ? state : state.hasIn(['tables', tableKey, 'configured']) ? state.setIn(['tables', tableKey, 'initialize'], false) : state.mergeIn(['tables', tableKey], Map({
|
|
140
140
|
data: hasData(data) ? fromJS(data) : data,
|
|
141
|
+
extraData: null,
|
|
141
142
|
dataSource: dataSource,
|
|
142
143
|
tableOptions: tableOptions,
|
|
143
144
|
columns: columns,
|
|
@@ -170,12 +171,14 @@ regHandlers({
|
|
|
170
171
|
tableKey = _ref4$payload.tableKey,
|
|
171
172
|
rows = _ref4$payload.rows,
|
|
172
173
|
data = _ref4$payload.data,
|
|
174
|
+
_ref4$payload$extraDa = _ref4$payload.extraData,
|
|
175
|
+
extraData = _ref4$payload$extraDa === void 0 ? null : _ref4$payload$extraDa,
|
|
173
176
|
nextPageToken = _ref4$payload.nextPageToken,
|
|
174
177
|
count = _ref4$payload.count,
|
|
175
178
|
_ref4$payload$error = _ref4$payload.error,
|
|
176
179
|
error = _ref4$payload$error === void 0 ? null : _ref4$payload$error;
|
|
177
180
|
return state.updateIn(['tables', tableKey], function (table) {
|
|
178
|
-
return table && table.set('rows', rows).set('data', data).set('currentPageToken', nextPageToken).set('nextPageToken', null).set('count', count).set('error', error).set('initializing', false).set('loading', false);
|
|
181
|
+
return table && table.set('rows', rows).set('data', data).set('extraData', extraData).set('currentPageToken', nextPageToken).set('nextPageToken', null).set('count', count).set('error', error).set('initializing', false).set('loading', false);
|
|
179
182
|
});
|
|
180
183
|
},
|
|
181
184
|
NEXT_PAGE: function NEXT_PAGE(state, _ref5) {
|
|
@@ -250,7 +253,7 @@ regHandlers({
|
|
|
250
253
|
});
|
|
251
254
|
|
|
252
255
|
function calculateRowsTask(_ref15) {
|
|
253
|
-
var payload, tableKey, tableData, response, rows, data, nextPageToken, count, error, onFetch;
|
|
256
|
+
var payload, tableKey, tableData, response, rows, data, nextPageToken, count, error, extraData, onFetch;
|
|
254
257
|
return _regeneratorRuntime.wrap(function calculateRowsTask$(_context) {
|
|
255
258
|
while (1) {
|
|
256
259
|
switch (_context.prev = _context.next) {
|
|
@@ -279,7 +282,7 @@ function calculateRowsTask(_ref15) {
|
|
|
279
282
|
|
|
280
283
|
case 10:
|
|
281
284
|
response = _context.sent;
|
|
282
|
-
rows = response.rows, data = response.data, nextPageToken = response.nextPageToken, count = response.count, error = response.error;
|
|
285
|
+
rows = response.rows, data = response.data, nextPageToken = response.nextPageToken, count = response.count, error = response.error, extraData = response.extraData;
|
|
283
286
|
onFetch = tableData.get('onFetch');
|
|
284
287
|
|
|
285
288
|
if (!error) {
|
|
@@ -296,7 +299,8 @@ function calculateRowsTask(_ref15) {
|
|
|
296
299
|
rows: List(),
|
|
297
300
|
data: List(),
|
|
298
301
|
nextPageToken: null,
|
|
299
|
-
count: null
|
|
302
|
+
count: null,
|
|
303
|
+
extraData: extraData
|
|
300
304
|
}
|
|
301
305
|
});
|
|
302
306
|
|
|
@@ -313,7 +317,8 @@ function calculateRowsTask(_ref15) {
|
|
|
313
317
|
rows: rows,
|
|
314
318
|
data: data,
|
|
315
319
|
nextPageToken: nextPageToken,
|
|
316
|
-
count: count
|
|
320
|
+
count: count,
|
|
321
|
+
extraData: extraData
|
|
317
322
|
}
|
|
318
323
|
});
|
|
319
324
|
|
|
@@ -328,7 +333,8 @@ function calculateRowsTask(_ref15) {
|
|
|
328
333
|
tableKey: tableKey,
|
|
329
334
|
rows: rows,
|
|
330
335
|
count: count,
|
|
331
|
-
error: error
|
|
336
|
+
error: error,
|
|
337
|
+
extraData: extraData
|
|
332
338
|
});
|
|
333
339
|
|
|
334
340
|
case 23:
|
|
@@ -647,7 +653,8 @@ var calculateRows = function calculateRows(tableData) {
|
|
|
647
653
|
var _transform = transform(response, paramData),
|
|
648
654
|
nextPageToken = _transform.nextPageToken,
|
|
649
655
|
responseData = _transform.data,
|
|
650
|
-
count = _transform.count
|
|
656
|
+
count = _transform.count,
|
|
657
|
+
extraData = _transform.extraData;
|
|
651
658
|
|
|
652
659
|
var data = fromJS(responseData);
|
|
653
660
|
var transformedRows = transformData(data, tableData);
|
|
@@ -656,7 +663,8 @@ var calculateRows = function calculateRows(tableData) {
|
|
|
656
663
|
nextPageToken: nextPageToken,
|
|
657
664
|
count: dataSource.clientSideSearch || dataSource.clientSide ? rows.size : count,
|
|
658
665
|
data: data,
|
|
659
|
-
rows: rows
|
|
666
|
+
rows: rows,
|
|
667
|
+
extraData: extraData
|
|
660
668
|
};
|
|
661
669
|
});
|
|
662
670
|
} else {
|
|
@@ -11,7 +11,7 @@ export var checkOmittedParameters = function checkOmittedParameters(node, parame
|
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
export var generateTaskDefinition = function generateTaskDefinition(taskDefinition) {
|
|
14
|
-
if (taskDefinition.definitionName === 'system_submission_create') {
|
|
14
|
+
if (taskDefinition && taskDefinition.definitionName === 'system_submission_create') {
|
|
15
15
|
return function (_ref) {
|
|
16
16
|
var form = _ref.form;
|
|
17
17
|
return _objectSpread(_objectSpread({}, taskDefinition), {}, {
|
|
@@ -7,7 +7,7 @@ import { List, OrderedMap } from 'immutable';
|
|
|
7
7
|
import { isFunction } from 'lodash-es';
|
|
8
8
|
import { action, dispatch, regHandlers, regSaga } from '../../../store';
|
|
9
9
|
import { deserializeTree, serializeTree, Connector, TreeBuilderState, deserializeWebApi } from './models';
|
|
10
|
-
import {
|
|
10
|
+
import { createWorkflow, createTree, fetchPlatformItem, fetchTaskCategories, fetchTree, fetchWebApi, updateTree, updateWebApi } from '../../../apis';
|
|
11
11
|
import { renameDependencies, treeReturnTask } from './helpers';
|
|
12
12
|
export var mountTreeBuilder = function mountTreeBuilder(treeKey) {
|
|
13
13
|
return dispatch('TREE_MOUNT', {
|
|
@@ -34,7 +34,7 @@ var remember = function remember(state, treeKey) {
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
regSaga(takeEvery('TREE_CONFIGURE', /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
|
37
|
-
var payload, name, sourceGroup, sourceName, treeKey, webApiProps, _yield$all, _yield$all2, tree, categories, webApi;
|
|
37
|
+
var payload, name, sourceGroup, sourceName, treeKey, webApiProps, _yield$all, _yield$all2, tree, categories, webApi, platformItem, result;
|
|
38
38
|
|
|
39
39
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
40
40
|
while (1) {
|
|
@@ -62,33 +62,62 @@ regSaga(takeEvery('TREE_CONFIGURE', /*#__PURE__*/_regeneratorRuntime.mark(functi
|
|
|
62
62
|
tree = _yield$all2[0].tree;
|
|
63
63
|
categories = _yield$all2[1].categories;
|
|
64
64
|
webApi = _yield$all2[2].webApi;
|
|
65
|
-
|
|
65
|
+
platformItem = null;
|
|
66
|
+
|
|
67
|
+
if (!tree.event) {
|
|
68
|
+
_context.next = 17;
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
_context.next = 15;
|
|
73
|
+
return call(fetchPlatformItem, {
|
|
74
|
+
type: tree.platformItemType,
|
|
75
|
+
id: tree.platformItemId
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
case 15:
|
|
79
|
+
result = _context.sent;
|
|
80
|
+
platformItem = result.platformItem;
|
|
81
|
+
|
|
82
|
+
case 17:
|
|
83
|
+
_context.next = 19;
|
|
66
84
|
return put(action('TREE_LOADED', {
|
|
67
85
|
categories: categories,
|
|
68
86
|
kappSlug: webApiProps && webApiProps.kappSlug,
|
|
87
|
+
platformItem: platformItem,
|
|
69
88
|
treeKey: treeKey,
|
|
70
89
|
tree: deserializeTree(tree),
|
|
71
90
|
webApi: webApiProps && deserializeWebApi(webApi, webApiProps.kappSlug)
|
|
72
91
|
}));
|
|
73
92
|
|
|
74
|
-
case
|
|
75
|
-
_context.next =
|
|
93
|
+
case 19:
|
|
94
|
+
_context.next = 24;
|
|
76
95
|
break;
|
|
77
96
|
|
|
78
|
-
case
|
|
79
|
-
_context.prev =
|
|
97
|
+
case 21:
|
|
98
|
+
_context.prev = 21;
|
|
80
99
|
_context.t0 = _context["catch"](1);
|
|
81
100
|
console.error('Caught error loading tree', _context.t0);
|
|
82
101
|
|
|
83
|
-
case
|
|
102
|
+
case 24:
|
|
84
103
|
case "end":
|
|
85
104
|
return _context.stop();
|
|
86
105
|
}
|
|
87
106
|
}
|
|
88
|
-
}, _callee, null, [[1,
|
|
107
|
+
}, _callee, null, [[1, 21]]);
|
|
89
108
|
})));
|
|
109
|
+
|
|
110
|
+
var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
|
|
111
|
+
return platformItem.kapp ? {
|
|
112
|
+
formSlug: platformItem.slug,
|
|
113
|
+
kappSlug: platformItem.kapp.slug
|
|
114
|
+
} : platformItem.space ? {
|
|
115
|
+
kappSlug: platformItem.slug
|
|
116
|
+
} : {};
|
|
117
|
+
};
|
|
118
|
+
|
|
90
119
|
regSaga(takeEvery('TREE_SAVE', /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref2) {
|
|
91
|
-
var payload, newName, onError, onSave, overwrite, treeKey, _yield$select, kappSlug, lastSave, lastWebApi, tree, webApi, name, sourceGroup, sourceName, _yield, error1, newTree, _yield2, error2, error;
|
|
120
|
+
var payload, newName, onError, onSave, overwrite, treeKey, _yield$select, kappSlug, lastSave, lastWebApi, platformItem, tree, webApi, name, sourceGroup, sourceName, _yield, error1, newTree, newWorkflow, _yield2, error2, error;
|
|
92
121
|
|
|
93
122
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
94
123
|
while (1) {
|
|
@@ -109,19 +138,23 @@ regSaga(takeEvery('TREE_SAVE', /*#__PURE__*/_regeneratorRuntime.mark(function _c
|
|
|
109
138
|
kappSlug = _yield$select.kappSlug;
|
|
110
139
|
lastSave = _yield$select.lastSave;
|
|
111
140
|
lastWebApi = _yield$select.lastWebApi;
|
|
141
|
+
platformItem = _yield$select.platformItem;
|
|
112
142
|
tree = _yield$select.tree;
|
|
113
143
|
webApi = _yield$select.webApi;
|
|
114
144
|
name = lastSave.name, sourceGroup = lastSave.sourceGroup, sourceName = lastSave.sourceName; // if a newName was passed we will be creating a new tree with the builder
|
|
115
145
|
// contents, otherwise just an update
|
|
146
|
+
// additionally, if the tree is a linked workflow then we call a core
|
|
147
|
+
// endpoint to create the workflow
|
|
116
148
|
|
|
117
|
-
_context2.next =
|
|
118
|
-
return newName ? call(
|
|
119
|
-
|
|
120
|
-
sourceGroup: sourceGroup,
|
|
121
|
-
sourceName: sourceName,
|
|
122
|
-
tree: _objectSpread({
|
|
149
|
+
_context2.next = 15;
|
|
150
|
+
return newName ? tree.event ? call(createWorkflow, _objectSpread({
|
|
151
|
+
workflow: _objectSpread(_objectSpread({}, serializeTree(tree)), {}, {
|
|
123
152
|
name: newName
|
|
124
|
-
}
|
|
153
|
+
})
|
|
154
|
+
}, getPlatformItemSlugs(platformItem))) : call(createTree, {
|
|
155
|
+
tree: _objectSpread(_objectSpread({}, serializeTree(tree, true)), {}, {
|
|
156
|
+
name: newName
|
|
157
|
+
})
|
|
125
158
|
}) : call(updateTree, {
|
|
126
159
|
name: name,
|
|
127
160
|
sourceGroup: sourceGroup,
|
|
@@ -129,23 +162,24 @@ regSaga(takeEvery('TREE_SAVE', /*#__PURE__*/_regeneratorRuntime.mark(function _c
|
|
|
129
162
|
tree: serializeTree(tree, overwrite)
|
|
130
163
|
});
|
|
131
164
|
|
|
132
|
-
case
|
|
165
|
+
case 15:
|
|
133
166
|
_yield = _context2.sent;
|
|
134
167
|
error1 = _yield.error;
|
|
135
168
|
newTree = _yield.tree;
|
|
136
|
-
|
|
169
|
+
newWorkflow = _yield.workflow;
|
|
170
|
+
_context2.next = 21;
|
|
137
171
|
return webApi && !error1 ? call(updateWebApi, {
|
|
138
172
|
slug: lastWebApi.get('slug'),
|
|
139
173
|
kappSlug: kappSlug,
|
|
140
174
|
webApi: webApi
|
|
141
175
|
}) : {};
|
|
142
176
|
|
|
143
|
-
case
|
|
177
|
+
case 21:
|
|
144
178
|
_yield2 = _context2.sent;
|
|
145
179
|
error2 = _yield2.error;
|
|
146
180
|
error = error1 || error2; // dispatch the appropriate action based on the result of the call above
|
|
147
181
|
|
|
148
|
-
_context2.next =
|
|
182
|
+
_context2.next = 26;
|
|
149
183
|
return put(error ? action('TREE_SAVE_ERROR', {
|
|
150
184
|
treeKey: treeKey,
|
|
151
185
|
error: error.message || error,
|
|
@@ -153,26 +187,26 @@ regSaga(takeEvery('TREE_SAVE', /*#__PURE__*/_regeneratorRuntime.mark(function _c
|
|
|
153
187
|
}) : action('TREE_SAVE_SUCCESS', {
|
|
154
188
|
previousTree: lastSave,
|
|
155
189
|
treeKey: treeKey,
|
|
156
|
-
tree: newTree,
|
|
190
|
+
tree: newTree || newWorkflow,
|
|
157
191
|
webApi: webApi,
|
|
158
192
|
onSave: onSave
|
|
159
193
|
}));
|
|
160
194
|
|
|
161
|
-
case
|
|
162
|
-
_context2.next =
|
|
195
|
+
case 26:
|
|
196
|
+
_context2.next = 31;
|
|
163
197
|
break;
|
|
164
198
|
|
|
165
|
-
case
|
|
166
|
-
_context2.prev =
|
|
199
|
+
case 28:
|
|
200
|
+
_context2.prev = 28;
|
|
167
201
|
_context2.t0 = _context2["catch"](1);
|
|
168
202
|
console.error(_context2.t0);
|
|
169
203
|
|
|
170
|
-
case
|
|
204
|
+
case 31:
|
|
171
205
|
case "end":
|
|
172
206
|
return _context2.stop();
|
|
173
207
|
}
|
|
174
208
|
}
|
|
175
|
-
}, _callee2, null, [[1,
|
|
209
|
+
}, _callee2, null, [[1, 28]]);
|
|
176
210
|
})));
|
|
177
211
|
regSaga(takeEvery('TREE_SAVE_ERROR', /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref3) {
|
|
178
212
|
var _ref3$payload, error, onError;
|
|
@@ -269,6 +303,7 @@ regHandlers({
|
|
|
269
303
|
var _ref8$payload = _ref8.payload,
|
|
270
304
|
categories = _ref8$payload.categories,
|
|
271
305
|
kappSlug = _ref8$payload.kappSlug,
|
|
306
|
+
platformItem = _ref8$payload.platformItem,
|
|
272
307
|
treeKey = _ref8$payload.treeKey,
|
|
273
308
|
tree = _ref8$payload.tree,
|
|
274
309
|
webApi = _ref8$payload.webApi;
|
|
@@ -277,6 +312,7 @@ regHandlers({
|
|
|
277
312
|
lastSave: tree,
|
|
278
313
|
lastWebApi: webApi,
|
|
279
314
|
loading: false,
|
|
315
|
+
platformItem: platformItem,
|
|
280
316
|
tasks: List(categories).map(function (category) {
|
|
281
317
|
return category.name === 'System Controls' ? _objectSpread(_objectSpread({}, category), {}, {
|
|
282
318
|
handlers: [].concat(_toConsumableArray(category.handlers), [treeReturnTask(tree)])
|
|
@@ -314,6 +350,7 @@ regHandlers({
|
|
|
314
350
|
webApi = _ref11$payload.webApi;
|
|
315
351
|
var newTree = state.getIn(['trees', treeKey, 'tree']).merge({
|
|
316
352
|
name: tree.name,
|
|
353
|
+
sourceGroup: tree.sourceGroup,
|
|
317
354
|
versionId: tree.versionId
|
|
318
355
|
});
|
|
319
356
|
return state.mergeIn(['trees', treeKey], {
|
|
@@ -24,6 +24,8 @@ export var Tree = Record({
|
|
|
24
24
|
categories: List(),
|
|
25
25
|
connectors: OrderedMap(),
|
|
26
26
|
definitionId: null,
|
|
27
|
+
event: null,
|
|
28
|
+
guid: null,
|
|
27
29
|
inputs: null,
|
|
28
30
|
name: '',
|
|
29
31
|
nextNodeId: 0,
|
|
@@ -32,6 +34,8 @@ export var Tree = Record({
|
|
|
32
34
|
notes: '',
|
|
33
35
|
outputs: null,
|
|
34
36
|
ownerEmail: '',
|
|
37
|
+
platformItemId: null,
|
|
38
|
+
platformItemType: null,
|
|
35
39
|
schemaVersion: '',
|
|
36
40
|
sourceGroup: '',
|
|
37
41
|
sourceName: '',
|
|
@@ -81,6 +85,7 @@ export var TreeBuilderState = Record({
|
|
|
81
85
|
lastSave: null,
|
|
82
86
|
lastWebApi: null,
|
|
83
87
|
loading: true,
|
|
88
|
+
platformItem: null,
|
|
84
89
|
redoStack: List(),
|
|
85
90
|
saving: false,
|
|
86
91
|
tasks: OrderedMap(),
|
|
@@ -166,11 +171,15 @@ export var deserializeTree = function deserializeTree(_ref4) {
|
|
|
166
171
|
var bindings = _ref4.bindings,
|
|
167
172
|
categories = _ref4.categories,
|
|
168
173
|
definitionId = _ref4.definitionId,
|
|
174
|
+
event = _ref4.event,
|
|
175
|
+
guid = _ref4.guid,
|
|
169
176
|
inputs = _ref4.inputs,
|
|
170
177
|
name = _ref4.name,
|
|
171
178
|
notes = _ref4.notes,
|
|
172
179
|
outputs = _ref4.outputs,
|
|
173
180
|
ownerEmail = _ref4.ownerEmail,
|
|
181
|
+
platformItemId = _ref4.platformItemId,
|
|
182
|
+
platformItemType = _ref4.platformItemType,
|
|
174
183
|
sourceGroup = _ref4.sourceGroup,
|
|
175
184
|
sourceName = _ref4.sourceName,
|
|
176
185
|
status = _ref4.status,
|
|
@@ -186,11 +195,15 @@ export var deserializeTree = function deserializeTree(_ref4) {
|
|
|
186
195
|
return [c.id, c];
|
|
187
196
|
})),
|
|
188
197
|
definitionId: definitionId,
|
|
198
|
+
event: event,
|
|
199
|
+
guid: guid,
|
|
189
200
|
inputs: List(inputs).map(Map),
|
|
190
201
|
name: name,
|
|
191
202
|
notes: notes,
|
|
192
203
|
outputs: List(outputs).map(Map),
|
|
193
204
|
ownerEmail: ownerEmail,
|
|
205
|
+
platformItemId: platformItemId,
|
|
206
|
+
platformItemType: platformItemType,
|
|
194
207
|
nextNodeId: treeJson.lastId + 1,
|
|
195
208
|
nextConnectorId: treeJson.connectors.length,
|
|
196
209
|
nodes: OrderedMap(treeJson.nodes.map(deserializeNode).map(function (n) {
|
|
@@ -208,6 +221,7 @@ export var serializeTree = function serializeTree(_ref5) {
|
|
|
208
221
|
var connectors = _ref5.connectors,
|
|
209
222
|
categories = _ref5.categories,
|
|
210
223
|
definitionId = _ref5.definitionId,
|
|
224
|
+
event = _ref5.event,
|
|
211
225
|
inputs = _ref5.inputs,
|
|
212
226
|
name = _ref5.name,
|
|
213
227
|
nextNodeId = _ref5.nextNodeId,
|
|
@@ -215,6 +229,8 @@ export var serializeTree = function serializeTree(_ref5) {
|
|
|
215
229
|
notes = _ref5.notes,
|
|
216
230
|
outputs = _ref5.outputs,
|
|
217
231
|
ownerEmail = _ref5.ownerEmail,
|
|
232
|
+
platformItemId = _ref5.platformItemId,
|
|
233
|
+
platformItemType = _ref5.platformItemType,
|
|
218
234
|
schemaVersion = _ref5.schemaVersion,
|
|
219
235
|
sourceGroup = _ref5.sourceGroup,
|
|
220
236
|
sourceName = _ref5.sourceName,
|
|
@@ -224,11 +240,14 @@ export var serializeTree = function serializeTree(_ref5) {
|
|
|
224
240
|
return {
|
|
225
241
|
categories: categories,
|
|
226
242
|
definitionId: definitionId,
|
|
243
|
+
event: event,
|
|
227
244
|
inputs: inputs,
|
|
228
245
|
name: name,
|
|
229
246
|
notes: notes,
|
|
230
247
|
outputs: outputs,
|
|
231
248
|
ownerEmail: ownerEmail,
|
|
249
|
+
platformItemId: platformItemId,
|
|
250
|
+
platformItemType: platformItemType,
|
|
232
251
|
sourceGroup: sourceGroup,
|
|
233
252
|
sourceName: sourceName,
|
|
234
253
|
status: status,
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import { get, List, Map } from 'immutable';
|
|
2
|
+
import { generateForm } from '../../form/Form';
|
|
3
|
+
import { createWorkflow, fetchForms, fetchKapps, fetchKappWebhookEvents, fetchSpaceWebhookEvents, fetchTree, fetchWorkflow, updateWorkflow } from '../../../apis';
|
|
4
|
+
|
|
5
|
+
var spaceTrees = function spaceTrees(spaceWebhookEvents) {
|
|
6
|
+
return spaceWebhookEvents.filter(function (_v, key) {
|
|
7
|
+
return key !== 'Discussion';
|
|
8
|
+
}).map(function (events, key) {
|
|
9
|
+
return events.map(function (event) {
|
|
10
|
+
return "".concat(key, " ").concat(event);
|
|
11
|
+
});
|
|
12
|
+
}).toList().flatten();
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
var kappTrees = function kappTrees(kappWebhookEvents) {
|
|
16
|
+
return kappWebhookEvents.map(function (events, key) {
|
|
17
|
+
return events.map(function (event) {
|
|
18
|
+
return "".concat(key, " ").concat(event);
|
|
19
|
+
});
|
|
20
|
+
}).toList().flatten();
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var formTrees = function formTrees(webhookEvents) {
|
|
24
|
+
return webhookEvents.get('Submission').map(function (event) {
|
|
25
|
+
return "Submission ".concat(event);
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
var getPossibleTrees = function getPossibleTrees(_ref) {
|
|
30
|
+
var kappSlug = _ref.kappSlug,
|
|
31
|
+
formSlug = _ref.formSlug,
|
|
32
|
+
spaceWebhookEvents = _ref.spaceWebhookEvents,
|
|
33
|
+
kappWebhookEvents = _ref.kappWebhookEvents;
|
|
34
|
+
return kappSlug && formSlug ? formTrees(kappWebhookEvents) : !kappSlug && formSlug ? formTrees(spaceWebhookEvents) : kappSlug ? kappTrees(kappWebhookEvents) : spaceTrees(spaceWebhookEvents);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var dataSources = function dataSources(_ref2) {
|
|
38
|
+
var workflowId = _ref2.workflowId,
|
|
39
|
+
kappSlug = _ref2.kappSlug,
|
|
40
|
+
formSlug = _ref2.formSlug,
|
|
41
|
+
cloneGuid = _ref2.cloneGuid;
|
|
42
|
+
return {
|
|
43
|
+
workflow: {
|
|
44
|
+
fn: fetchWorkflow,
|
|
45
|
+
params: workflowId && [{
|
|
46
|
+
kappSlug: kappSlug,
|
|
47
|
+
formSlug: formSlug,
|
|
48
|
+
workflowId: workflowId,
|
|
49
|
+
include: 'details'
|
|
50
|
+
}],
|
|
51
|
+
transform: function transform(result) {
|
|
52
|
+
return result.workflow;
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
cloneTree: {
|
|
56
|
+
fn: fetchTree,
|
|
57
|
+
params: cloneGuid && [{
|
|
58
|
+
include: 'details,treeJson',
|
|
59
|
+
guid: cloneGuid
|
|
60
|
+
}],
|
|
61
|
+
transform: function transform(result) {
|
|
62
|
+
return result.tree;
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
kapps: {
|
|
66
|
+
fn: fetchKapps,
|
|
67
|
+
params: cloneGuid && [],
|
|
68
|
+
transform: function transform(result) {
|
|
69
|
+
return result.kapps;
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
forms: {
|
|
73
|
+
fn: fetchForms,
|
|
74
|
+
params: function params(_ref3) {
|
|
75
|
+
var values = _ref3.values;
|
|
76
|
+
return cloneGuid && values && values.get('newKappSlug') && [{
|
|
77
|
+
kappSlug: values.get('newKappSlug')
|
|
78
|
+
}];
|
|
79
|
+
},
|
|
80
|
+
transform: function transform(result) {
|
|
81
|
+
return result.forms;
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
// The requests and data manipulation needed to determine available
|
|
85
|
+
// `events` for the dropdown options.
|
|
86
|
+
kappWebhookEvents: {
|
|
87
|
+
fn: fetchKappWebhookEvents,
|
|
88
|
+
params: [],
|
|
89
|
+
transform: function transform(result) {
|
|
90
|
+
return result;
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
spaceWebhookEvents: {
|
|
94
|
+
fn: fetchSpaceWebhookEvents,
|
|
95
|
+
params: [],
|
|
96
|
+
transform: function transform(result) {
|
|
97
|
+
return result;
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
possibleEvents: {
|
|
101
|
+
fn: getPossibleTrees,
|
|
102
|
+
params: function params(_ref4) {
|
|
103
|
+
var spaceWebhookEvents = _ref4.spaceWebhookEvents,
|
|
104
|
+
kappWebhookEvents = _ref4.kappWebhookEvents;
|
|
105
|
+
return spaceWebhookEvents && kappWebhookEvents && [{
|
|
106
|
+
kappSlug: kappSlug,
|
|
107
|
+
formSlug: formSlug,
|
|
108
|
+
spaceWebhookEvents: spaceWebhookEvents,
|
|
109
|
+
kappWebhookEvents: kappWebhookEvents
|
|
110
|
+
}];
|
|
111
|
+
},
|
|
112
|
+
transform: function transform(result) {
|
|
113
|
+
return result;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
var NON_CLONABLE_KEYS = ['createdAt', 'createdBy', 'updatedAt', 'updatedBy', 'sourceGroup', 'sourceName', 'name', 'event', 'title', 'id', 'guid', 'platformItemType', 'platformItemId', 'versionId'];
|
|
120
|
+
|
|
121
|
+
var handleSubmit = function handleSubmit(_ref5) {
|
|
122
|
+
var kappSlug = _ref5.kappSlug,
|
|
123
|
+
formSlug = _ref5.formSlug,
|
|
124
|
+
workflowId = _ref5.workflowId,
|
|
125
|
+
cloneGuid = _ref5.cloneGuid;
|
|
126
|
+
return function (values, _ref6) {
|
|
127
|
+
var cloneTree = _ref6.cloneTree;
|
|
128
|
+
var submitFn = workflowId ? updateWorkflow : createWorkflow;
|
|
129
|
+
var workflow = cloneGuid ? cloneTree.filter(function (_v, key) {
|
|
130
|
+
return !NON_CLONABLE_KEYS.includes(key);
|
|
131
|
+
}).set('name', values.get('name')).set('event', values.get('event')).toJS() : values.toJS();
|
|
132
|
+
var targetKappSlug = cloneGuid ? values.get('newKappSlug') : kappSlug;
|
|
133
|
+
var targetFormSlug = cloneGuid ? values.get('newFormSlug') : formSlug;
|
|
134
|
+
return submitFn({
|
|
135
|
+
kappSlug: targetKappSlug,
|
|
136
|
+
formSlug: targetFormSlug,
|
|
137
|
+
workflowId: workflowId,
|
|
138
|
+
workflow: workflow
|
|
139
|
+
}).then(function (_ref7) {
|
|
140
|
+
var workflow = _ref7.workflow,
|
|
141
|
+
error = _ref7.error;
|
|
142
|
+
|
|
143
|
+
if (error) {
|
|
144
|
+
throw error.statusCode === 400 && error.message || 'There was an error saving the workflow';
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return {
|
|
148
|
+
workflow: workflow,
|
|
149
|
+
targetKappSlug: targetKappSlug,
|
|
150
|
+
targetFormSlug: targetFormSlug
|
|
151
|
+
};
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
var isCloneReady = function isCloneReady(cloneTree, kapps, scope) {
|
|
157
|
+
return cloneTree && (scope !== 'Space' ? kapps : true);
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
var initialEvent = function initialEvent(cloneGuid, cloneTree, workflow, possibleEvents) {
|
|
161
|
+
var cloneEvent = get(cloneTree, 'event', '');
|
|
162
|
+
|
|
163
|
+
if (!cloneGuid) {
|
|
164
|
+
// If we're not cloning (editing or new).
|
|
165
|
+
return get(workflow, 'event', '') || '';
|
|
166
|
+
} else if (cloneGuid && cloneEvent) {
|
|
167
|
+
// If we're cloning a linked workflow.
|
|
168
|
+
return cloneEvent || '';
|
|
169
|
+
} // Otherwise we have to calculate it depending on the sourceGroup and name
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
var type = get(cloneTree, 'sourceGroup', '').split(' > ')[0].replace(/s?$/, '');
|
|
173
|
+
var name = cloneTree.get('name');
|
|
174
|
+
var event = "".concat(type, " ").concat(name);
|
|
175
|
+
var legacyEvent = possibleEvents.find(function (e) {
|
|
176
|
+
return e === event;
|
|
177
|
+
});
|
|
178
|
+
return legacyEvent || '';
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
var fields = function fields(_ref8) {
|
|
182
|
+
var kappSlug = _ref8.kappSlug,
|
|
183
|
+
formSlug = _ref8.formSlug,
|
|
184
|
+
cloneGuid = _ref8.cloneGuid,
|
|
185
|
+
scope = _ref8.scope;
|
|
186
|
+
return function (_ref9) {
|
|
187
|
+
var workflow = _ref9.workflow,
|
|
188
|
+
cloneTree = _ref9.cloneTree,
|
|
189
|
+
possibleEvents = _ref9.possibleEvents,
|
|
190
|
+
kapps = _ref9.kapps;
|
|
191
|
+
return possibleEvents && (!cloneGuid || isCloneReady(cloneTree, kapps, scope)) && [{
|
|
192
|
+
name: 'name',
|
|
193
|
+
label: 'Name',
|
|
194
|
+
type: 'text',
|
|
195
|
+
required: true,
|
|
196
|
+
initialValue: cloneGuid ? '' : get(workflow, 'name') || ''
|
|
197
|
+
}, {
|
|
198
|
+
name: 'event',
|
|
199
|
+
label: 'Event',
|
|
200
|
+
type: 'select',
|
|
201
|
+
required: true,
|
|
202
|
+
enabled: !cloneGuid || !get(cloneTree, 'event', ''),
|
|
203
|
+
options: possibleEvents.map(function (event) {
|
|
204
|
+
return Map({
|
|
205
|
+
label: event,
|
|
206
|
+
value: event
|
|
207
|
+
});
|
|
208
|
+
}),
|
|
209
|
+
initialValue: initialEvent(cloneGuid, cloneTree, workflow, possibleEvents)
|
|
210
|
+
}, {
|
|
211
|
+
name: 'newKappSlug',
|
|
212
|
+
label: 'Kapp',
|
|
213
|
+
type: 'select',
|
|
214
|
+
required: cloneGuid && scope !== 'Space',
|
|
215
|
+
options: function options(_ref10) {
|
|
216
|
+
var kapps = _ref10.kapps;
|
|
217
|
+
return cloneGuid && scope !== 'Space' && kapps && kapps.map(function (kapp) {
|
|
218
|
+
return Map({
|
|
219
|
+
label: kapp.get('name'),
|
|
220
|
+
value: kapp.get('slug')
|
|
221
|
+
});
|
|
222
|
+
});
|
|
223
|
+
},
|
|
224
|
+
initialValue: kappSlug || ''
|
|
225
|
+
}, {
|
|
226
|
+
name: 'newFormSlug',
|
|
227
|
+
label: 'Form',
|
|
228
|
+
type: 'select',
|
|
229
|
+
required: cloneGuid && scope === 'Form',
|
|
230
|
+
options: function options(_ref11) {
|
|
231
|
+
var forms = _ref11.forms;
|
|
232
|
+
return forms ? forms.map(function (form) {
|
|
233
|
+
return Map({
|
|
234
|
+
label: form.get('name'),
|
|
235
|
+
value: form.get('slug')
|
|
236
|
+
});
|
|
237
|
+
}) : List();
|
|
238
|
+
},
|
|
239
|
+
initialValue: formSlug || ''
|
|
240
|
+
}, {
|
|
241
|
+
name: 'treeXml',
|
|
242
|
+
label: 'Tree XML',
|
|
243
|
+
type: 'text',
|
|
244
|
+
required: false,
|
|
245
|
+
initialValue: ''
|
|
246
|
+
}];
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
export var LinkedWorkflowForm = generateForm({
|
|
251
|
+
formOptions: ['kappSlug', 'formSlug', 'workflowId', 'cloneGuid', 'scope'],
|
|
252
|
+
dataSources: dataSources,
|
|
253
|
+
handleSubmit: handleSubmit,
|
|
254
|
+
fields: fields
|
|
255
|
+
});
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { generateTable } from '../../table/Table';
|
|
2
|
+
import { fetchWorkflows } from '../../../apis';
|
|
3
|
+
import { defineFilter } from '../../../helpers';
|
|
4
|
+
var STATUS_OPTIONS = ['Active', 'Inactive', 'Paused'].map(function (v) {
|
|
5
|
+
return {
|
|
6
|
+
label: v,
|
|
7
|
+
value: v
|
|
8
|
+
};
|
|
9
|
+
});
|
|
10
|
+
var clientSide = defineFilter(true).equals('name', 'name').startsWith('event', 'event').equals('status', 'status').end();
|
|
11
|
+
|
|
12
|
+
var dataSource = function dataSource(_ref) {
|
|
13
|
+
var formSlug = _ref.formSlug,
|
|
14
|
+
kappSlug = _ref.kappSlug;
|
|
15
|
+
return {
|
|
16
|
+
clientSide: clientSide,
|
|
17
|
+
fn: fetchWorkflows,
|
|
18
|
+
params: function params(paramData) {
|
|
19
|
+
return [{
|
|
20
|
+
kappSlug: kappSlug,
|
|
21
|
+
formSlug: formSlug,
|
|
22
|
+
include: 'details',
|
|
23
|
+
name: paramData.filters.get('name'),
|
|
24
|
+
event: paramData.filters.get('event'),
|
|
25
|
+
status: paramData.filters.get('status')
|
|
26
|
+
}];
|
|
27
|
+
},
|
|
28
|
+
transform: function transform(result) {
|
|
29
|
+
var extraData = {
|
|
30
|
+
migratable: result.migratable,
|
|
31
|
+
missing: result.missing,
|
|
32
|
+
orphaned: result.orphaned
|
|
33
|
+
};
|
|
34
|
+
return {
|
|
35
|
+
data: result.workflows,
|
|
36
|
+
nextPageToken: result.nextPageToken,
|
|
37
|
+
extraData: extraData
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
var filters = function filters() {
|
|
44
|
+
return function (_ref2) {
|
|
45
|
+
var sourceTypes = _ref2.sourceTypes;
|
|
46
|
+
return sourceTypes && [{
|
|
47
|
+
name: 'name',
|
|
48
|
+
label: 'Name',
|
|
49
|
+
type: 'text'
|
|
50
|
+
}, {
|
|
51
|
+
name: 'event',
|
|
52
|
+
label: 'Event',
|
|
53
|
+
type: 'text'
|
|
54
|
+
}, {
|
|
55
|
+
name: 'status',
|
|
56
|
+
label: 'Status',
|
|
57
|
+
type: 'select',
|
|
58
|
+
options: STATUS_OPTIONS
|
|
59
|
+
}];
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
var columns = [{
|
|
64
|
+
value: 'id',
|
|
65
|
+
title: 'ID',
|
|
66
|
+
sortable: false
|
|
67
|
+
}, {
|
|
68
|
+
value: 'name',
|
|
69
|
+
title: 'Name',
|
|
70
|
+
sortable: true
|
|
71
|
+
}, {
|
|
72
|
+
value: 'event',
|
|
73
|
+
title: 'Event',
|
|
74
|
+
sortable: true
|
|
75
|
+
}, {
|
|
76
|
+
value: 'notes',
|
|
77
|
+
title: 'Notes',
|
|
78
|
+
sortable: false
|
|
79
|
+
}, {
|
|
80
|
+
value: 'definitionId',
|
|
81
|
+
title: 'Definition ID',
|
|
82
|
+
sortable: true
|
|
83
|
+
}, {
|
|
84
|
+
value: 'ownerEmail',
|
|
85
|
+
title: 'Owner EMail',
|
|
86
|
+
sortable: false
|
|
87
|
+
}, {
|
|
88
|
+
value: 'sourceGroup',
|
|
89
|
+
title: 'Source Group',
|
|
90
|
+
sortable: true
|
|
91
|
+
}, {
|
|
92
|
+
value: 'sourceName',
|
|
93
|
+
title: 'Source Name',
|
|
94
|
+
sortable: true
|
|
95
|
+
}, {
|
|
96
|
+
value: 'status',
|
|
97
|
+
title: 'Status',
|
|
98
|
+
sortable: true,
|
|
99
|
+
options: function options() {
|
|
100
|
+
return STATUS_OPTIONS;
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
value: 'title',
|
|
104
|
+
title: 'Title',
|
|
105
|
+
sortable: false
|
|
106
|
+
}, {
|
|
107
|
+
value: 'type',
|
|
108
|
+
title: 'type',
|
|
109
|
+
sortable: false
|
|
110
|
+
}, {
|
|
111
|
+
value: 'createdAt',
|
|
112
|
+
title: 'Created',
|
|
113
|
+
sortable: false
|
|
114
|
+
}, {
|
|
115
|
+
value: 'createdBy',
|
|
116
|
+
title: 'Created By',
|
|
117
|
+
sortable: false
|
|
118
|
+
}, {
|
|
119
|
+
value: 'updatedAt',
|
|
120
|
+
title: 'Updated',
|
|
121
|
+
sortable: true
|
|
122
|
+
}, {
|
|
123
|
+
value: 'updatedBy',
|
|
124
|
+
title: 'Updated By',
|
|
125
|
+
sortable: false
|
|
126
|
+
}];
|
|
127
|
+
export var LinkedWorkflowTable = generateTable({
|
|
128
|
+
tableOptions: ['kappSlug', 'formSlug'],
|
|
129
|
+
columns: columns,
|
|
130
|
+
filters: filters,
|
|
131
|
+
dataSource: dataSource
|
|
132
|
+
});
|
|
133
|
+
LinkedWorkflowTable.displayName = 'LinkedWorkflowTable';
|
|
@@ -85,7 +85,8 @@ var fields = function fields(_ref4) {
|
|
|
85
85
|
return sources;
|
|
86
86
|
},
|
|
87
87
|
initialValue: workflow ? workflow.get('sourceName') : workflowType === 'routines' ? '-' : '',
|
|
88
|
-
helpText: 'The application that is calling and getting the results back from the workflow.'
|
|
88
|
+
helpText: 'The application that is calling and getting the results back from the workflow.',
|
|
89
|
+
visible: !workflow || !workflow.get('event')
|
|
89
90
|
}, {
|
|
90
91
|
name: 'sourceGroup',
|
|
91
92
|
label: 'Source Group',
|
|
@@ -101,7 +102,16 @@ var fields = function fields(_ref4) {
|
|
|
101
102
|
}) : List();
|
|
102
103
|
},
|
|
103
104
|
initialValue: workflow ? workflow.get('sourceGroup') : workflowType === 'routines' ? '-' : '',
|
|
104
|
-
helpText: "Categorization of the workflow based on rules provided by the Source. For Request CE it's the combination of the type (submission of form), Kapp Slug and the Form Slug separated by a greater than sign ( > ). Example: Submissions > services > onboarding."
|
|
105
|
+
helpText: "Categorization of the workflow based on rules provided by the Source. For Request CE it's the combination of the type (submission of form), Kapp Slug and the Form Slug separated by a greater than sign ( > ). Example: Submissions > services > onboarding.",
|
|
106
|
+
visible: !workflow || !workflow.get('event')
|
|
107
|
+
}, {
|
|
108
|
+
name: 'event',
|
|
109
|
+
label: 'Event',
|
|
110
|
+
type: 'text',
|
|
111
|
+
initialValue: workflow ? workflow.get('event') : '',
|
|
112
|
+
required: workflow && !!workflow.get('event'),
|
|
113
|
+
visible: workflow && !!workflow.get('event'),
|
|
114
|
+
enabled: false
|
|
105
115
|
}, {
|
|
106
116
|
name: 'name',
|
|
107
117
|
label: 'Name',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kineticdata/react",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.2",
|
|
4
4
|
"description": "A React library for the Kinetic Platform",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"main:src": "src/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"lodash.isplainobject": "^4.0.6",
|
|
33
33
|
"lodash.isstring": "^4.0.1",
|
|
34
34
|
"modularscale-sass": "^3.0.8",
|
|
35
|
-
"moment": "^2.
|
|
35
|
+
"moment": "^2.29.4",
|
|
36
36
|
"prismjs": "1.23.0",
|
|
37
37
|
"prop-types": "^15.7.2",
|
|
38
38
|
"react-autosuggest": "^9.4.3",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"eslintConfig": {
|
|
93
93
|
"extends": "react-app"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "08d318b36f6e8922fdbfe2875a1d1d1a0b2552b4"
|
|
96
96
|
}
|
package/proxyhelper.js
CHANGED
|
@@ -67,7 +67,6 @@ module.exports = (
|
|
|
67
67
|
secure: true,
|
|
68
68
|
changeOrigin: true,
|
|
69
69
|
ws: true,
|
|
70
|
-
xfwd: true,
|
|
71
70
|
onProxyReq: (proxyRequest, originalRequest) => {
|
|
72
71
|
// Browsers may send Origin headers even with same-origin
|
|
73
72
|
// requests. To prevent CORS issues, we have to change
|
|
@@ -78,7 +77,7 @@ module.exports = (
|
|
|
78
77
|
|
|
79
78
|
if (
|
|
80
79
|
process.env.REACT_APP_PROXY_SUBDOMAIN &&
|
|
81
|
-
(!proxyRequest.path.endsWith('pack')
|
|
80
|
+
(!proxyRequest.path.endsWith('pack') &&
|
|
82
81
|
!proxyRequest.path.endsWith('favicon.ico'))
|
|
83
82
|
) {
|
|
84
83
|
proxyRequest.setHeader(
|