@lingk/sync 1.0.24 → 1.0.26
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/build/credentialSections.js.map +1 -1
- package/build/lightning.js.map +1 -1
- package/build/lightningStyles.js.map +1 -1
- package/build/lingk.js.map +1 -1
- package/build/lingkStyles.js.map +1 -1
- package/build/loadData.js +17 -12
- package/build/loadData.js.map +1 -1
- package/build/main.js +236 -153
- package/build/main.js.map +1 -1
- package/build/metadataFunctions.js.map +1 -1
- package/build/reducer.js.map +1 -1
- package/build/saveData.js.map +1 -1
- package/package.json +1 -1
package/build/main.js
CHANGED
|
@@ -3273,21 +3273,26 @@ module.exports =
|
|
|
3273
3273
|
var primaryKeyResourceName = null;
|
|
3274
3274
|
if (primaryDataSourceMetadata) {
|
|
3275
3275
|
if (rsc.primaryKeyName) {
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
return r.type === rsc.primaryKeyResource;
|
|
3276
|
+
(function () {
|
|
3277
|
+
//primaryKeyName coming from parameter (another resource)
|
|
3278
|
+
deNestedPrimaryKey = { property: rsc.primaryKeyName };
|
|
3279
|
+
primaryKeyResourceName = rsc.primaryKeyResource;
|
|
3280
|
+
|
|
3281
|
+
// primaryKeyName coming from resource IN THIS BUNDLE
|
|
3282
|
+
var primaryKeyResourceResource = bundle.resources.find(function (r) {
|
|
3283
|
+
return primaryResourceName === r.resourceLabel;
|
|
3285
3284
|
});
|
|
3286
|
-
if (
|
|
3287
|
-
|
|
3288
|
-
|
|
3285
|
+
if (primaryKeyResourceResource) {
|
|
3286
|
+
//if(primaryResourceName===rsc.primaryKeyResource){
|
|
3287
|
+
var rscPrimaryResource = primaryDataSourceMetadata.find(function (r) {
|
|
3288
|
+
return r.name === primaryKeyResourceResource.resourceLabel;
|
|
3289
|
+
});
|
|
3290
|
+
if (rscPrimaryResource) {
|
|
3291
|
+
deNestedPrimaryKey = deNest(rsc.primaryKeyName, rsc.primaryKeyParents, rscPrimaryResource);
|
|
3292
|
+
primaryKeyResourceName = rscPrimaryResource.name;
|
|
3293
|
+
}
|
|
3289
3294
|
}
|
|
3290
|
-
}
|
|
3295
|
+
})();
|
|
3291
3296
|
}
|
|
3292
3297
|
}
|
|
3293
3298
|
/*const primaryResourceProvider = bundle.resources[0].provider
|
|
@@ -17439,13 +17444,28 @@ module.exports =
|
|
|
17439
17444
|
};
|
|
17440
17445
|
}
|
|
17441
17446
|
|
|
17442
|
-
function callGetScenarioList(tenantId, appId, typeGuid) {
|
|
17447
|
+
function callGetScenarioList(tenantId, appId, typeGuid, isGlobal, isOrgAdmin) {
|
|
17443
17448
|
return function (dispatch, getState, api) {
|
|
17444
17449
|
var _getState9 = getState(),
|
|
17445
17450
|
config = _getState9.config;
|
|
17446
17451
|
|
|
17447
17452
|
return api.get(tenantId + '/' + appId + '/scenarios/' + typeGuid, {
|
|
17448
17453
|
endpoint: config.TRANS_API_URL
|
|
17454
|
+
}).then(function (r) {
|
|
17455
|
+
var scenarios = r;
|
|
17456
|
+
if (isGlobal) {
|
|
17457
|
+
scenarios = r.filter(function (s) {
|
|
17458
|
+
return s.tenantId === 2147483647;
|
|
17459
|
+
});
|
|
17460
|
+
}
|
|
17461
|
+
if (isOrgAdmin) {
|
|
17462
|
+
scenarios = r.filter(function (s) {
|
|
17463
|
+
return s.tenantId === parseInt(tenantId, 10);
|
|
17464
|
+
});
|
|
17465
|
+
}
|
|
17466
|
+
return scenarios.sort(function (a, b) {
|
|
17467
|
+
return a.orderNum - b.orderNum;
|
|
17468
|
+
});
|
|
17449
17469
|
});
|
|
17450
17470
|
};
|
|
17451
17471
|
}
|
|
@@ -17462,14 +17482,20 @@ module.exports =
|
|
|
17462
17482
|
};
|
|
17463
17483
|
}
|
|
17464
17484
|
|
|
17465
|
-
function callUpdateScenarioList(tenantId, appId, typeGuid,
|
|
17485
|
+
function callUpdateScenarioList(tenantId, appId, typeGuid, scenarios, isGlobal) {
|
|
17466
17486
|
return function (dispatch, getState, api) {
|
|
17467
17487
|
var _getState11 = getState(),
|
|
17468
17488
|
config = _getState11.config;
|
|
17469
17489
|
|
|
17470
|
-
return api.post(tenantId + '/' + appId + '/scenarios/' + typeGuid, {
|
|
17490
|
+
return api.post(tenantId + '/' + appId + '/scenarios/' + typeGuid + (isGlobal ? '/global' : ''), {
|
|
17471
17491
|
endpoint: config.TRANS_API_URL,
|
|
17472
|
-
data:
|
|
17492
|
+
data: scenarios.map(function (s, i) {
|
|
17493
|
+
return {
|
|
17494
|
+
id: s.id,
|
|
17495
|
+
orderNum: i,
|
|
17496
|
+
deleted: s.deleted ? 1 : 0 // all uints in the backend, easy
|
|
17497
|
+
};
|
|
17498
|
+
})
|
|
17473
17499
|
});
|
|
17474
17500
|
};
|
|
17475
17501
|
}
|
|
@@ -23307,7 +23333,7 @@ module.exports =
|
|
|
23307
23333
|
sourceSchema: sourceSchema, destinationSchema: destinationSchema })
|
|
23308
23334
|
) : null,
|
|
23309
23335
|
_react2.default.createElement('br', null),
|
|
23310
|
-
step.isFramework && _react2.default.createElement(
|
|
23336
|
+
(step.isFramework || step.isOrgAdmin) && _react2.default.createElement(
|
|
23311
23337
|
'div',
|
|
23312
23338
|
null,
|
|
23313
23339
|
' ',
|
|
@@ -23871,12 +23897,17 @@ module.exports =
|
|
|
23871
23897
|
return !o.isReverse;
|
|
23872
23898
|
});
|
|
23873
23899
|
|
|
23874
|
-
var
|
|
23900
|
+
var globalOptions = [{
|
|
23875
23901
|
id: '0',
|
|
23876
23902
|
title: 'Start From Scratch',
|
|
23877
23903
|
label: 'Get started without any automatic mappings.'
|
|
23878
|
-
}].concat(opts)
|
|
23879
|
-
|
|
23904
|
+
}].concat(opts.filter(function (o) {
|
|
23905
|
+
return o.tenantId === 2147483647;
|
|
23906
|
+
}));
|
|
23907
|
+
|
|
23908
|
+
var localOptions = opts.filter(function (o) {
|
|
23909
|
+
return o.tenantId === parseInt(_this3.props.tenantId, 10);
|
|
23910
|
+
});
|
|
23880
23911
|
|
|
23881
23912
|
return _react2.default.createElement(
|
|
23882
23913
|
'form',
|
|
@@ -23895,13 +23926,15 @@ module.exports =
|
|
|
23895
23926
|
'Each scenario is designed to get you started with new data-driven reports, dashboards and notifications. Extend the scenarios to include your own custom objects in the following steps.'
|
|
23896
23927
|
),
|
|
23897
23928
|
_react2.default.createElement('br', null),
|
|
23929
|
+
localOptions && localOptions.length > 0 && _react2.default.createElement(
|
|
23930
|
+
'div',
|
|
23931
|
+
{ style: { fontSize: '16px', marginBottom: 12 } },
|
|
23932
|
+
' Global Scenarios'
|
|
23933
|
+
),
|
|
23898
23934
|
_react2.default.createElement(
|
|
23899
23935
|
'div',
|
|
23900
23936
|
{ style: { marginLeft: 16 } },
|
|
23901
|
-
|
|
23902
|
-
var o = options.find(function (opt) {
|
|
23903
|
-
return String(opt.id) === s;
|
|
23904
|
-
});
|
|
23937
|
+
globalOptions && globalOptions.map(function (o, i) {
|
|
23905
23938
|
return o && _react2.default.createElement(
|
|
23906
23939
|
'div',
|
|
23907
23940
|
{ key: i },
|
|
@@ -23923,6 +23956,40 @@ module.exports =
|
|
|
23923
23956
|
})
|
|
23924
23957
|
),
|
|
23925
23958
|
_react2.default.createElement('br', null),
|
|
23959
|
+
localOptions && localOptions.length > 0 && _react2.default.createElement(
|
|
23960
|
+
'div',
|
|
23961
|
+
null,
|
|
23962
|
+
_react2.default.createElement(
|
|
23963
|
+
'div',
|
|
23964
|
+
{ style: { fontSize: '16px', marginBottom: 12 } },
|
|
23965
|
+
'Custom Scenarios'
|
|
23966
|
+
),
|
|
23967
|
+
_react2.default.createElement(
|
|
23968
|
+
'div',
|
|
23969
|
+
{ style: { marginLeft: 16 } },
|
|
23970
|
+
localOptions && localOptions.map(function (o, i) {
|
|
23971
|
+
return o && _react2.default.createElement(
|
|
23972
|
+
'div',
|
|
23973
|
+
{ key: i },
|
|
23974
|
+
_react2.default.createElement(Radio, { onChange: function onChange() {
|
|
23975
|
+
return _this3.select(o);
|
|
23976
|
+
},
|
|
23977
|
+
label: '' + o.title + (_this3.state.currentlyLoadingScenario === String(o.id) ? _this3.state.loadingDots : ''),
|
|
23978
|
+
checked: String(o.id) === scenario, style: { cursor: 'pointer' }
|
|
23979
|
+
}),
|
|
23980
|
+
_react2.default.createElement('br', null),
|
|
23981
|
+
_react2.default.createElement(
|
|
23982
|
+
'span',
|
|
23983
|
+
{ className: 'labelz' },
|
|
23984
|
+
o.label
|
|
23985
|
+
),
|
|
23986
|
+
_react2.default.createElement('br', null),
|
|
23987
|
+
_react2.default.createElement('br', null)
|
|
23988
|
+
);
|
|
23989
|
+
})
|
|
23990
|
+
)
|
|
23991
|
+
),
|
|
23992
|
+
_react2.default.createElement('br', null),
|
|
23926
23993
|
_react2.default.createElement(_navButtons2.default, { nextDisabled: !scenario || this.state.currentlyLoadingScenario || !(wizard.savedConfiguration && wizard.savedConfiguration.scenario) && !wizard.gotScenario ? true : false, handleSubmit: handleSubmit,
|
|
23927
23994
|
nav: nav, reset: reset, inputs: inputs, isAdmin: this.props.isAdmin }),
|
|
23928
23995
|
_react2.default.createElement('br', null),
|
|
@@ -24719,8 +24786,7 @@ module.exports =
|
|
|
24719
24786
|
title: '',
|
|
24720
24787
|
description: '',
|
|
24721
24788
|
loading: false,
|
|
24722
|
-
manageScenarios: false
|
|
24723
|
-
scenarioOrder: []
|
|
24789
|
+
manageScenarios: false
|
|
24724
24790
|
};
|
|
24725
24791
|
_this.submitModal = _this.submitModal.bind(_this);
|
|
24726
24792
|
_this.deleteScenario = _this.deleteScenario.bind(_this);
|
|
@@ -24741,10 +24807,7 @@ module.exports =
|
|
|
24741
24807
|
step = _props.step;
|
|
24742
24808
|
|
|
24743
24809
|
this.setState({ loading: true });
|
|
24744
|
-
|
|
24745
|
-
this.setState({ scenarioOrder: [].concat(_toConsumableArray(step.scenarioOrder)) });
|
|
24746
|
-
}
|
|
24747
|
-
actions.callGetScenarioList(tenantId, accountId, step.typeGuid).then(function (r) {
|
|
24810
|
+
actions.callGetScenarioList(tenantId, accountId, step.typeGuid, step.isFramework, step.isOrgAdmin).then(function (r) {
|
|
24748
24811
|
_this2.setState({ scenarios: r, loading: false });
|
|
24749
24812
|
});
|
|
24750
24813
|
}
|
|
@@ -24757,7 +24820,7 @@ module.exports =
|
|
|
24757
24820
|
title = _state.title,
|
|
24758
24821
|
description = _state.description,
|
|
24759
24822
|
manageScenarios = _state.manageScenarios,
|
|
24760
|
-
|
|
24823
|
+
scenarios = _state.scenarios;
|
|
24761
24824
|
var _props2 = this.props,
|
|
24762
24825
|
tenantId = _props2.tenantId,
|
|
24763
24826
|
accountId = _props2.accountId,
|
|
@@ -24769,10 +24832,10 @@ module.exports =
|
|
|
24769
24832
|
|
|
24770
24833
|
if (manageScenarios) {
|
|
24771
24834
|
this.setState({ loading: true });
|
|
24772
|
-
actions.callUpdateScenarioList(tenantId, accountId, step.typeGuid,
|
|
24835
|
+
actions.callUpdateScenarioList(tenantId, accountId, step.typeGuid, scenarios, step.isFramework).then(function (wizTypeGuid) {
|
|
24773
24836
|
actions.callGetScenarioList(tenantId, accountId, step.typeGuid).then(function (r) {
|
|
24774
24837
|
_this3.setState({ loading: false });
|
|
24775
|
-
_this3.props.done({
|
|
24838
|
+
_this3.props.done({ typeGuid: wizTypeGuid, scenarios: r });
|
|
24776
24839
|
});
|
|
24777
24840
|
});
|
|
24778
24841
|
} else {
|
|
@@ -24792,10 +24855,10 @@ module.exports =
|
|
|
24792
24855
|
var data = { bundles: bundles, mappings: mappings, title: title, label: description, typeGuid: step.typeGuid, isReverse: isReverse, isGlobal: step.isFramework };
|
|
24793
24856
|
|
|
24794
24857
|
// 2147483647 is MaxInt32, for global scenarios
|
|
24795
|
-
actions.callCreateScenario(tenantId, accountId, data).then(function (
|
|
24858
|
+
actions.callCreateScenario(tenantId, accountId, data).then(function (wizTypeGuid) {
|
|
24796
24859
|
actions.callGetScenarioList(tenantId, accountId, step.typeGuid).then(function (r) {
|
|
24797
24860
|
_this3.setState({ loading: false });
|
|
24798
|
-
_this3.props.done({
|
|
24861
|
+
_this3.props.done({ typeGuid: wizTypeGuid, scenarios: r });
|
|
24799
24862
|
});
|
|
24800
24863
|
});
|
|
24801
24864
|
/**/
|
|
@@ -24804,33 +24867,34 @@ module.exports =
|
|
|
24804
24867
|
}, {
|
|
24805
24868
|
key: 'deleteScenario',
|
|
24806
24869
|
value: function deleteScenario(id, i) {
|
|
24807
|
-
var
|
|
24808
|
-
|
|
24809
|
-
|
|
24810
|
-
|
|
24870
|
+
var scenarios = [].concat(_toConsumableArray(this.state.scenarios.filter(function (s) {
|
|
24871
|
+
return !s.deleted;
|
|
24872
|
+
})));
|
|
24873
|
+
scenarios[i].deleted = true;
|
|
24874
|
+
// put deleted ones on the end, to simplify updating order
|
|
24875
|
+
scenarios.splice(scenarios.length - 1, 0, scenarios.splice(i, 1)[0]);
|
|
24876
|
+
this.setState({ scenarios: scenarios });
|
|
24811
24877
|
}
|
|
24812
24878
|
}, {
|
|
24813
24879
|
key: 'moveUp',
|
|
24814
24880
|
value: function moveUp(id, i) {
|
|
24815
|
-
var
|
|
24816
|
-
|
|
24881
|
+
var scenarios = [].concat(_toConsumableArray(this.state.scenarios.filter(function (s) {
|
|
24882
|
+
return !s.deleted;
|
|
24883
|
+
})));
|
|
24817
24884
|
if (i !== 0) {
|
|
24818
|
-
|
|
24819
|
-
|
|
24820
|
-
scenarioOrder[i - 1] = temp;
|
|
24821
|
-
this.setState({ scenarioOrder: scenarioOrder });
|
|
24885
|
+
scenarios.splice(i - 1, 0, scenarios.splice(i, 1)[0]);
|
|
24886
|
+
this.setState({ scenarios: scenarios });
|
|
24822
24887
|
}
|
|
24823
24888
|
}
|
|
24824
24889
|
}, {
|
|
24825
24890
|
key: 'moveDown',
|
|
24826
24891
|
value: function moveDown(id, i) {
|
|
24827
|
-
var
|
|
24828
|
-
|
|
24829
|
-
|
|
24830
|
-
|
|
24831
|
-
|
|
24832
|
-
|
|
24833
|
-
this.setState({ scenarioOrder: scenarioOrder });
|
|
24892
|
+
var scenarios = [].concat(_toConsumableArray(this.state.scenarios.filter(function (s) {
|
|
24893
|
+
return !s.deleted;
|
|
24894
|
+
})));
|
|
24895
|
+
if (i !== scenarios.length - 1) {
|
|
24896
|
+
scenarios.splice(i + 1, 0, scenarios.splice(i, 1)[0]);
|
|
24897
|
+
this.setState({ scenarios: scenarios });
|
|
24834
24898
|
}
|
|
24835
24899
|
}
|
|
24836
24900
|
}, {
|
|
@@ -24846,15 +24910,16 @@ module.exports =
|
|
|
24846
24910
|
var _state2 = this.state,
|
|
24847
24911
|
title = _state2.title,
|
|
24848
24912
|
description = _state2.description,
|
|
24849
|
-
scenarios = _state2.scenarios,
|
|
24850
24913
|
manageScenarios = _state2.manageScenarios,
|
|
24851
|
-
loading = _state2.loading
|
|
24852
|
-
scenarioOrder = _state2.scenarioOrder;
|
|
24914
|
+
loading = _state2.loading;
|
|
24853
24915
|
|
|
24854
24916
|
var Modal = inputs.Modal;
|
|
24855
24917
|
var Input = inputs.Input;
|
|
24856
24918
|
var Spinner = inputs.Spinner;
|
|
24857
24919
|
var Textarea = inputs.Textarea;
|
|
24920
|
+
var scenarios = this.state.scenarios && this.state.scenarios.filter(function (s) {
|
|
24921
|
+
return !s.deleted;
|
|
24922
|
+
});
|
|
24858
24923
|
|
|
24859
24924
|
return _react2.default.createElement(
|
|
24860
24925
|
'div',
|
|
@@ -24864,7 +24929,7 @@ module.exports =
|
|
|
24864
24929
|
{ opened: opened, hideModal: hideModal, submitModal: this.submitModal, showCancel: true,
|
|
24865
24930
|
title: manageScenarios ? 'Manage Scenarios' : 'Create New Scenario',
|
|
24866
24931
|
submitLabel: manageScenarios ? 'Update Scenarios' : 'Save Scenario',
|
|
24867
|
-
submitDisabled: loading ||
|
|
24932
|
+
submitDisabled: loading || !manageScenarios && (!title || !description) },
|
|
24868
24933
|
_react2.default.createElement(
|
|
24869
24934
|
'div',
|
|
24870
24935
|
null,
|
|
@@ -24922,44 +24987,50 @@ module.exports =
|
|
|
24922
24987
|
{ style: { padding: 26 } },
|
|
24923
24988
|
loading ? _react2.default.createElement(Spinner, null) : _react2.default.createElement(
|
|
24924
24989
|
'div',
|
|
24925
|
-
|
|
24926
|
-
|
|
24927
|
-
|
|
24928
|
-
|
|
24929
|
-
|
|
24930
|
-
|
|
24931
|
-
|
|
24932
|
-
|
|
24933
|
-
|
|
24934
|
-
|
|
24935
|
-
|
|
24936
|
-
onClick: function onClick() {
|
|
24937
|
-
return _this4.moveUp(s.id, i);
|
|
24938
|
-
} },
|
|
24939
|
-
'\u25B2'
|
|
24940
|
-
),
|
|
24941
|
-
_react2.default.createElement(
|
|
24942
|
-
'span',
|
|
24943
|
-
{ style: i !== scenarioOrder.length - 1 ? { cursor: 'pointer' } : { color: '#DDD' }, onClick: function onClick() {
|
|
24944
|
-
return _this4.moveDown(s.id, i);
|
|
24945
|
-
} },
|
|
24946
|
-
'\u25BC'
|
|
24947
|
-
),
|
|
24948
|
-
_react2.default.createElement(
|
|
24949
|
-
'span',
|
|
24950
|
-
null,
|
|
24951
|
-
'\xA0\xA0',
|
|
24952
|
-
s.title
|
|
24953
|
-
),
|
|
24954
|
-
_react2.default.createElement(
|
|
24990
|
+
null,
|
|
24991
|
+
_react2.default.createElement(
|
|
24992
|
+
'div',
|
|
24993
|
+
{ style: { marginBottom: 10, fontSize: '16px' } },
|
|
24994
|
+
step.isFramework ? 'Global Scenarios' : 'Custom Scenarios'
|
|
24995
|
+
),
|
|
24996
|
+
_react2.default.createElement(
|
|
24997
|
+
'div',
|
|
24998
|
+
{ style: { padding: '10px 0', border: '1px solid #EEE' } },
|
|
24999
|
+
scenarios && scenarios.map(function (s, i) {
|
|
25000
|
+
return s ? _react2.default.createElement(
|
|
24955
25001
|
'div',
|
|
24956
|
-
{
|
|
24957
|
-
|
|
24958
|
-
|
|
24959
|
-
|
|
24960
|
-
|
|
24961
|
-
|
|
24962
|
-
|
|
25002
|
+
{ key: i, style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', position: 'relative', height: 19, width: '100%' } },
|
|
25003
|
+
_react2.default.createElement(
|
|
25004
|
+
'span',
|
|
25005
|
+
{ style: i !== 0 ? { cursor: 'pointer' } : { color: '#DDD' },
|
|
25006
|
+
onClick: function onClick() {
|
|
25007
|
+
return _this4.moveUp(s.id, i);
|
|
25008
|
+
} },
|
|
25009
|
+
'\u25B2'
|
|
25010
|
+
),
|
|
25011
|
+
_react2.default.createElement(
|
|
25012
|
+
'span',
|
|
25013
|
+
{ style: i !== scenarios.length - 1 ? { cursor: 'pointer' } : { color: '#DDD' }, onClick: function onClick() {
|
|
25014
|
+
return _this4.moveDown(s.id, i);
|
|
25015
|
+
} },
|
|
25016
|
+
'\u25BC'
|
|
25017
|
+
),
|
|
25018
|
+
_react2.default.createElement(
|
|
25019
|
+
'span',
|
|
25020
|
+
null,
|
|
25021
|
+
'\xA0\xA0',
|
|
25022
|
+
s.title
|
|
25023
|
+
),
|
|
25024
|
+
_react2.default.createElement(
|
|
25025
|
+
'div',
|
|
25026
|
+
{ onClick: function onClick() {
|
|
25027
|
+
return _this4.deleteScenario(s.id, i);
|
|
25028
|
+
}, style: { position: 'absolute', right: 9, top: 0, color: '#c23934', cursor: 'pointer' } },
|
|
25029
|
+
'x'
|
|
25030
|
+
)
|
|
25031
|
+
) : _react2.default.createElement('span', { key: i });
|
|
25032
|
+
})
|
|
25033
|
+
)
|
|
24963
25034
|
)
|
|
24964
25035
|
),
|
|
24965
25036
|
_react2.default.createElement('a', { ref: function ref(_ref) {
|
|
@@ -25526,74 +25597,28 @@ module.exports =
|
|
|
25526
25597
|
|
|
25527
25598
|
var _this = _possibleConstructorReturn(this, (LingkSync.__proto__ || Object.getPrototypeOf(LingkSync)).call(this));
|
|
25528
25599
|
|
|
25529
|
-
_this.
|
|
25530
|
-
|
|
25531
|
-
};
|
|
25532
|
-
//-----------------------------
|
|
25533
|
-
// 3 Types:
|
|
25534
|
-
// Point-to-point
|
|
25535
|
-
// Api creation
|
|
25536
|
-
// Event pub/sub
|
|
25537
|
-
//-----------------------------
|
|
25538
|
-
_this.allSteps = [
|
|
25539
|
-
// Point-to-point
|
|
25540
|
-
{
|
|
25541
|
-
type: 'name',
|
|
25542
|
-
title: 'Name'
|
|
25543
|
-
}, {
|
|
25544
|
-
type: 'env',
|
|
25545
|
-
title: 'Environments'
|
|
25546
|
-
}, {
|
|
25547
|
-
type: 'file',
|
|
25548
|
-
title: 'File Processing',
|
|
25549
|
-
mode: 'source'
|
|
25550
|
-
}, {
|
|
25551
|
-
type: 'scenario',
|
|
25552
|
-
title: 'Data Scenario'
|
|
25553
|
-
}, {
|
|
25554
|
-
type: 'schema',
|
|
25555
|
-
title: 'Object Mapping',
|
|
25556
|
-
mode: 'source'
|
|
25557
|
-
}, {
|
|
25558
|
-
type: 'map',
|
|
25559
|
-
title: 'Field Mapping'
|
|
25560
|
-
}, {
|
|
25561
|
-
type: 'deploy',
|
|
25562
|
-
title: 'Deploy'
|
|
25563
|
-
}];
|
|
25564
|
-
return _this;
|
|
25565
|
-
}
|
|
25566
|
-
|
|
25567
|
-
_createClass(LingkSync, [{
|
|
25568
|
-
key: 'componentWillUnmount',
|
|
25569
|
-
value: function componentWillUnmount() {
|
|
25570
|
-
this.props.actions.clearWizardFormData();
|
|
25571
|
-
}
|
|
25572
|
-
}, {
|
|
25573
|
-
key: 'componentWillMount',
|
|
25574
|
-
value: function componentWillMount() {
|
|
25575
|
-
var wizard = this.props.wizardConfig;
|
|
25600
|
+
_this.makeSteps = function (scenarios) {
|
|
25601
|
+
var wizard = _this.props.wizardConfig;
|
|
25576
25602
|
var stepList = [];
|
|
25577
|
-
for (var i = 0; i <
|
|
25578
|
-
var step =
|
|
25603
|
+
for (var i = 0; i < _this.allSteps.length; i++) {
|
|
25604
|
+
var step = _this.allSteps[i];
|
|
25579
25605
|
step.sourceConfig = wizard.source;
|
|
25580
25606
|
step.destinationConfig = wizard.destination;
|
|
25581
25607
|
step.sourceProvider = wizard.source.type;
|
|
25582
25608
|
step.destinationProvider = wizard.destination.type;
|
|
25583
|
-
step.isFramework =
|
|
25584
|
-
step.isOrgAdmin =
|
|
25609
|
+
step.isFramework = _this.props.isFramework;
|
|
25610
|
+
step.isOrgAdmin = _this.props.isOrgAdmin;
|
|
25585
25611
|
if (step.type === 'name') {
|
|
25586
25612
|
step.name = wizard.title;
|
|
25587
25613
|
stepList.push(step);
|
|
25588
25614
|
} else if (step.type === 'env') {
|
|
25589
|
-
step.previewToken =
|
|
25615
|
+
step.previewToken = _this.props.previewToken;
|
|
25590
25616
|
step.typeGuid = wizard.typeGuid;
|
|
25591
25617
|
stepList.push(step);
|
|
25592
25618
|
} else if (step.type === 'file' && wizard.source.type === 'SFTP') {
|
|
25593
25619
|
stepList.push(step);
|
|
25594
|
-
} else if (step.type === 'scenario' &&
|
|
25595
|
-
step.options =
|
|
25596
|
-
step.scenarioOrder = wizard.scenarioIds;
|
|
25620
|
+
} else if (step.type === 'scenario' && scenarios.length > 0) {
|
|
25621
|
+
step.options = scenarios;
|
|
25597
25622
|
step.magicNumber = '2147483647';
|
|
25598
25623
|
stepList.push(step);
|
|
25599
25624
|
} else if (step.type === 'environment') {
|
|
@@ -25604,7 +25629,7 @@ module.exports =
|
|
|
25604
25629
|
step.credentials = wizard.source.credentials || null;
|
|
25605
25630
|
step.metadataEndpoint = wizard.source.metadataEndpoint;
|
|
25606
25631
|
step.metadataApi = wizard.source.metadataApi;
|
|
25607
|
-
step.previewToken =
|
|
25632
|
+
step.previewToken = _this.props.previewToken;
|
|
25608
25633
|
step.bidirectional = wizard.source.bidirectional;
|
|
25609
25634
|
stepList.push(step);
|
|
25610
25635
|
} else if (step.mode === 'destination' && !wizard.destination.skipEnvStep) {
|
|
@@ -25613,7 +25638,7 @@ module.exports =
|
|
|
25613
25638
|
step.credentials = wizard.destination.credentials || null;
|
|
25614
25639
|
step.metadataEndpoint = wizard.destination.metadataEndpoint;
|
|
25615
25640
|
step.metadataApi = wizard.destination.metadataApi;
|
|
25616
|
-
step.previewToken =
|
|
25641
|
+
step.previewToken = _this.props.previewToken;
|
|
25617
25642
|
step.bidirectional = wizard.destination.bidirectional;
|
|
25618
25643
|
stepList.push(step);
|
|
25619
25644
|
}
|
|
@@ -25622,16 +25647,74 @@ module.exports =
|
|
|
25622
25647
|
} else if (step.type === 'map') {
|
|
25623
25648
|
step.customizable = wizard.destination.customizable;
|
|
25624
25649
|
step.typeGuid = wizard.typeGuid;
|
|
25625
|
-
step.scenarioOrder = wizard.scenarioIds;
|
|
25626
25650
|
stepList.push(step);
|
|
25627
25651
|
} else if (step.type === 'deploy') {
|
|
25628
25652
|
step.options = ['once', 'daily', 'repeating'];
|
|
25629
25653
|
stepList.push(step);
|
|
25630
25654
|
}
|
|
25631
25655
|
}
|
|
25632
|
-
|
|
25656
|
+
_this.setState({
|
|
25633
25657
|
steps: stepList
|
|
25634
25658
|
});
|
|
25659
|
+
};
|
|
25660
|
+
|
|
25661
|
+
_this.state = {
|
|
25662
|
+
steps: null
|
|
25663
|
+
};
|
|
25664
|
+
//-----------------------------
|
|
25665
|
+
// 3 Types:
|
|
25666
|
+
// Point-to-point
|
|
25667
|
+
// Api creation
|
|
25668
|
+
// Event pub/sub
|
|
25669
|
+
//-----------------------------
|
|
25670
|
+
_this.allSteps = [
|
|
25671
|
+
// Point-to-point
|
|
25672
|
+
{
|
|
25673
|
+
type: 'name',
|
|
25674
|
+
title: 'Name'
|
|
25675
|
+
}, {
|
|
25676
|
+
type: 'env',
|
|
25677
|
+
title: 'Environments'
|
|
25678
|
+
}, {
|
|
25679
|
+
type: 'file',
|
|
25680
|
+
title: 'File Processing',
|
|
25681
|
+
mode: 'source'
|
|
25682
|
+
}, {
|
|
25683
|
+
type: 'scenario',
|
|
25684
|
+
title: 'Data Scenario'
|
|
25685
|
+
}, {
|
|
25686
|
+
type: 'schema',
|
|
25687
|
+
title: 'Object Mapping',
|
|
25688
|
+
mode: 'source'
|
|
25689
|
+
}, {
|
|
25690
|
+
type: 'map',
|
|
25691
|
+
title: 'Field Mapping'
|
|
25692
|
+
}, {
|
|
25693
|
+
type: 'deploy',
|
|
25694
|
+
title: 'Deploy'
|
|
25695
|
+
}];
|
|
25696
|
+
return _this;
|
|
25697
|
+
}
|
|
25698
|
+
|
|
25699
|
+
_createClass(LingkSync, [{
|
|
25700
|
+
key: 'componentWillUnmount',
|
|
25701
|
+
value: function componentWillUnmount() {
|
|
25702
|
+
this.props.actions.clearWizardFormData();
|
|
25703
|
+
}
|
|
25704
|
+
}, {
|
|
25705
|
+
key: 'componentWillMount',
|
|
25706
|
+
value: function componentWillMount() {
|
|
25707
|
+
var _this2 = this;
|
|
25708
|
+
|
|
25709
|
+
var _props = this.props,
|
|
25710
|
+
tenantId = _props.tenantId,
|
|
25711
|
+
accountId = _props.accountId,
|
|
25712
|
+
actions = _props.actions,
|
|
25713
|
+
wizardConfig = _props.wizardConfig;
|
|
25714
|
+
|
|
25715
|
+
actions.callGetScenarioList(tenantId, accountId, wizardConfig.typeGuid).then(function (r) {
|
|
25716
|
+
return _this2.makeSteps(r);
|
|
25717
|
+
});
|
|
25635
25718
|
}
|
|
25636
25719
|
}, {
|
|
25637
25720
|
key: 'render',
|