@lingk/sync 2.0.18 → 2.0.20
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 +2 -8
- 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.map +1 -1
- package/build/main.js +748 -559
- package/build/main.js.map +1 -1
- package/build/metadataDropdown.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
|
@@ -6658,20 +6658,14 @@ module.exports =
|
|
|
6658
6658
|
|
|
6659
6659
|
var _props2 = this.props,
|
|
6660
6660
|
config = _props2.config,
|
|
6661
|
-
onCheck = _props2.onCheck,
|
|
6662
6661
|
inputs = _props2.inputs,
|
|
6663
6662
|
creds = _props2.creds,
|
|
6664
6663
|
onChange = _props2.onChange,
|
|
6665
|
-
checking = _props2.checking,
|
|
6666
|
-
envCheckResult = _props2.envCheckResult,
|
|
6667
|
-
EnvCheckIcons = _props2.EnvCheckIcons,
|
|
6668
6664
|
onChangeCustomKey = _props2.onChangeCustomKey;
|
|
6669
6665
|
|
|
6670
|
-
var CodeMirror = codemirror && codemirror.Controlled;
|
|
6671
6666
|
var Button = inputs.Button;
|
|
6672
6667
|
var Input = inputs.Input;
|
|
6673
6668
|
var Toggle = inputs.ToggleButtonGroup;
|
|
6674
|
-
var Spinner = inputs.Spinner;
|
|
6675
6669
|
var bvaToken = {};
|
|
6676
6670
|
var credentials = config && config.credentials.filter(function (o) {
|
|
6677
6671
|
if (creds["authenticationType"] === "key") {
|
|
@@ -6698,10 +6692,10 @@ module.exports =
|
|
|
6698
6692
|
{ style: { display: "inline-block" } },
|
|
6699
6693
|
_react2.default.createElement(
|
|
6700
6694
|
"div",
|
|
6701
|
-
{ style: { display: "inline-block"
|
|
6695
|
+
{ style: { display: "inline-block" } },
|
|
6702
6696
|
_react2.default.createElement(
|
|
6703
6697
|
"div",
|
|
6704
|
-
{
|
|
6698
|
+
{ style: { marginBottom: 5, marginTop: -8 } },
|
|
6705
6699
|
_react2.default.createElement(Toggle, {
|
|
6706
6700
|
value: creds["authenticationType"],
|
|
6707
6701
|
options: ["OAuth", "key"],
|
|
@@ -51656,7 +51650,7 @@ module.exports =
|
|
|
51656
51650
|
/* 169 */
|
|
51657
51651
|
/***/ function(module, exports, __webpack_require__) {
|
|
51658
51652
|
|
|
51659
|
-
|
|
51653
|
+
"use strict";
|
|
51660
51654
|
|
|
51661
51655
|
Object.defineProperty(exports, "__esModule", {
|
|
51662
51656
|
value: true
|
|
@@ -51748,13 +51742,13 @@ module.exports =
|
|
|
51748
51742
|
*/
|
|
51749
51743
|
|
|
51750
51744
|
// isReload means that the "Check Connection" button was NOT clicked
|
|
51751
|
-
function callGetMetadata(tenantId, appId, mode, providerType, providerConfig, endpoint, isFramework, creds, environment, isReload, fileSchemaGuid, extraQuery) {
|
|
51745
|
+
function callGetMetadata(tenantId, appId, mode, providerType, providerConfig, endpoint, isFramework, creds, environment, isReload, fileSchemaGuid, extraQuery, connectionKey) {
|
|
51752
51746
|
var metadata = null;
|
|
51753
51747
|
var credentialType = providerConfig.credentialType,
|
|
51754
51748
|
metadataApi = providerConfig.metadataApi;
|
|
51755
51749
|
|
|
51756
|
-
var isOauth = credentialType ===
|
|
51757
|
-
var isLocalFile = credentialType ===
|
|
51750
|
+
var isOauth = credentialType === "SalesforceAuthCode";
|
|
51751
|
+
var isLocalFile = credentialType === "LocalFile";
|
|
51758
51752
|
return function (dispatch) {
|
|
51759
51753
|
dispatch({
|
|
51760
51754
|
type: types.START_WIZARD_ENV_CHECK,
|
|
@@ -51763,27 +51757,27 @@ module.exports =
|
|
|
51763
51757
|
return dispatch(
|
|
51764
51758
|
// some providers skip this and go straight for getProviderMetadata
|
|
51765
51759
|
// if their credentials are stored separately (like SF oauth or Adapter)
|
|
51766
|
-
tryCheckConnection(tenantId, appId, providerType, providerConfig, isFramework, creds, fileSchemaGuid)).then(function (r) {
|
|
51760
|
+
tryCheckConnection(tenantId, appId, providerType, providerConfig, isFramework, creds, fileSchemaGuid, environment, connectionKey)).then(function (r) {
|
|
51767
51761
|
var schemaGuid = creds.schemaGuid; // flat file schema (for browser upload guid is in creds)
|
|
51768
51762
|
if (fileSchemaGuid) {
|
|
51769
51763
|
schemaGuid = fileSchemaGuid; // for SFTP guid is in wiz config
|
|
51770
51764
|
}
|
|
51771
51765
|
/*let resFromCheckConnection = null
|
|
51772
51766
|
if(r && r.schema){ // currently only for SFTP check connection
|
|
51773
|
-
|
|
51767
|
+
resFromCheckConnection = r.schema // skip callGetProviderMetadata network call
|
|
51774
51768
|
}*/
|
|
51775
|
-
return dispatch(callGetProviderMetadata(tenantId, appId, providerConfig, mode, providerType, endpoint, isOauth, environment.name, schemaGuid, creds, extraQuery));
|
|
51769
|
+
return dispatch(callGetProviderMetadata(tenantId, appId, providerConfig, mode, providerType, endpoint, isOauth, environment.name, schemaGuid, creds, extraQuery, connectionKey));
|
|
51776
51770
|
}).then(function (m) {
|
|
51777
51771
|
metadata = m;
|
|
51778
51772
|
// FOR NOW ONLY ALLOW CSV FOR FLAT FILE
|
|
51779
51773
|
if (isLocalFile) {
|
|
51780
51774
|
metadata = metadata.filter(function (rsc) {
|
|
51781
|
-
var ext = rsc.name.substr(rsc.name.lastIndexOf(
|
|
51782
|
-
return ext ===
|
|
51775
|
+
var ext = rsc.name.substr(rsc.name.lastIndexOf(".") + 1, rsc.name.length);
|
|
51776
|
+
return ext === "csv";
|
|
51783
51777
|
});
|
|
51784
51778
|
}
|
|
51785
51779
|
//console.log(metadata)
|
|
51786
|
-
var isIntro = endpoint ===
|
|
51780
|
+
var isIntro = endpoint === "_blank";
|
|
51787
51781
|
var envId = environment.environmentId;
|
|
51788
51782
|
if (isOauth || isIntro || isReload || isLocalFile) {
|
|
51789
51783
|
return Promise.resolve(null);
|
|
@@ -51792,7 +51786,7 @@ module.exports =
|
|
|
51792
51786
|
}).then(function (res) {
|
|
51793
51787
|
dispatch({
|
|
51794
51788
|
type: types.FINISH_WIZARD_ENV_CHECK,
|
|
51795
|
-
data: { metadata: metadata, mode: mode, code:
|
|
51789
|
+
data: { metadata: metadata, mode: mode, code: "200 OK", providerType: providerType }
|
|
51796
51790
|
});
|
|
51797
51791
|
return metadata;
|
|
51798
51792
|
}).catch(function (error) {
|
|
@@ -51800,18 +51794,18 @@ module.exports =
|
|
|
51800
51794
|
if (error.response && error.response.data) {
|
|
51801
51795
|
err = error.response.data;
|
|
51802
51796
|
}
|
|
51803
|
-
if (metadataApi ===
|
|
51797
|
+
if (metadataApi === "TEST_CONN_API_URL") {
|
|
51804
51798
|
err = error.response.data.error;
|
|
51805
51799
|
}
|
|
51806
51800
|
dispatch({
|
|
51807
51801
|
type: types.FINISH_WIZARD_ENV_CHECK,
|
|
51808
|
-
data: { res: null, mode: mode, code:
|
|
51802
|
+
data: { res: null, mode: mode, code: "404 Error", providerType: providerType, err: err }
|
|
51809
51803
|
});
|
|
51810
51804
|
});
|
|
51811
51805
|
};
|
|
51812
51806
|
}
|
|
51813
51807
|
|
|
51814
|
-
function tryCheckConnection(tenantId, appId, providerType, providerConfig, isFramework, creds, fileSchemaGuid) {
|
|
51808
|
+
function tryCheckConnection(tenantId, appId, providerType, providerConfig, isFramework, creds, fileSchemaGuid, environment, connectionKey) {
|
|
51815
51809
|
return function (dispatch, getState, api) {
|
|
51816
51810
|
var credentialType = providerConfig.credentialType,
|
|
51817
51811
|
metadataApi = providerConfig.metadataApi,
|
|
@@ -51827,8 +51821,8 @@ module.exports =
|
|
|
51827
51821
|
var _getState = getState(),
|
|
51828
51822
|
config = _getState.config;
|
|
51829
51823
|
|
|
51830
|
-
if (metadataApi ===
|
|
51831
|
-
return api.post(tenantId +
|
|
51824
|
+
if (metadataApi === "TEST_CONN_API_URL") {
|
|
51825
|
+
return api.post(tenantId + "/" + appId + "/testconnection/" + providerType.toLowerCase(), {
|
|
51832
51826
|
endpoint: config.TEST_CONN_API_URL,
|
|
51833
51827
|
data: {
|
|
51834
51828
|
credentialType: credentialType,
|
|
@@ -51836,12 +51830,16 @@ module.exports =
|
|
|
51836
51830
|
providerLabel: providerType
|
|
51837
51831
|
},
|
|
51838
51832
|
headers: {
|
|
51839
|
-
|
|
51833
|
+
"Content-Type": "application/json"
|
|
51840
51834
|
}
|
|
51841
51835
|
});
|
|
51836
|
+
} else if (metadataApi === "SF_AGENT_API_URL") {
|
|
51837
|
+
return api.get(tenantId + "/" + appId + "/environments/" + environment.name + "/" + connectionKey + "/testconnection", {
|
|
51838
|
+
endpoint: config.SF_AGENT_API_URL
|
|
51839
|
+
});
|
|
51842
51840
|
}
|
|
51843
51841
|
|
|
51844
|
-
return api.post(tenantId +
|
|
51842
|
+
return api.post(tenantId + "/" + appId + "/testconnection/" + providerType.toLowerCase(), {
|
|
51845
51843
|
endpoint: config.TRANS_API_URL,
|
|
51846
51844
|
data: {
|
|
51847
51845
|
credentialType: credentialType,
|
|
@@ -51854,8 +51852,8 @@ module.exports =
|
|
|
51854
51852
|
|
|
51855
51853
|
function addLeadingSlashToSftpPath(credsJson) {
|
|
51856
51854
|
var creds = Object.assign({}, credsJson);
|
|
51857
|
-
if (creds.path && creds.path[0] !==
|
|
51858
|
-
creds.path =
|
|
51855
|
+
if (creds.path && creds.path[0] !== "/") {
|
|
51856
|
+
creds.path = "/" + creds.path;
|
|
51859
51857
|
}
|
|
51860
51858
|
if (creds.rootUrl) {
|
|
51861
51859
|
creds.endpoint = creds.rootUrl;
|
|
@@ -51866,13 +51864,13 @@ module.exports =
|
|
|
51866
51864
|
return creds;
|
|
51867
51865
|
}
|
|
51868
51866
|
|
|
51869
|
-
function callGetProviderMetadata(tenantId, appId, providerConfig, mode, providerType, endpoint, isOauth, envName, schemaGuid, creds, extraQuery) {
|
|
51867
|
+
function callGetProviderMetadata(tenantId, appId, providerConfig, mode, providerType, endpoint, isOauth, envName, schemaGuid, creds, extraQuery, connectionKey) {
|
|
51870
51868
|
// urlSuffix for getMetadata. If checkConnection returns meta, skip this one
|
|
51871
51869
|
var metadataEndpoint = providerConfig.metadataEndpoint,
|
|
51872
51870
|
metadataApi = providerConfig.metadataApi,
|
|
51873
51871
|
credentialType = providerConfig.credentialType;
|
|
51874
51872
|
|
|
51875
|
-
var isFlatFile = credentialType ===
|
|
51873
|
+
var isFlatFile = credentialType === "LocalFile";
|
|
51876
51874
|
if (!metadataEndpoint) {
|
|
51877
51875
|
return function () {
|
|
51878
51876
|
return Promise.resolve();
|
|
@@ -51883,18 +51881,18 @@ module.exports =
|
|
|
51883
51881
|
config = _getState2.config;
|
|
51884
51882
|
|
|
51885
51883
|
var isAdapter = false;
|
|
51886
|
-
if (metadataEndpoint ===
|
|
51887
|
-
metadataEndpoint =
|
|
51884
|
+
if (metadataEndpoint === "adaptermetadata") {
|
|
51885
|
+
metadataEndpoint = "adaptermetadata?url=" + endpoint;
|
|
51888
51886
|
isAdapter = true;
|
|
51889
51887
|
}
|
|
51890
51888
|
/*if(metadataEndpoint==='fileschema'){ // CHANGE FLAT FILE TO ALL IN ENV
|
|
51891
51889
|
metadataEndpoint = `fileschema?schemaGuid=${schemaGuid}`
|
|
51892
51890
|
}*/
|
|
51893
|
-
if (metadataEndpoint ===
|
|
51894
|
-
metadataEndpoint =
|
|
51891
|
+
if (metadataEndpoint === "schema/swagger/moodle" && creds.swaggerUrl) {
|
|
51892
|
+
metadataEndpoint = "schema/swagger/moodle?swaggerUrl=" + creds.swaggerUrl;
|
|
51895
51893
|
}
|
|
51896
|
-
if (metadataApi ===
|
|
51897
|
-
return api.post(tenantId +
|
|
51894
|
+
if (metadataApi === "TEST_CONN_API_URL") {
|
|
51895
|
+
return api.post(tenantId + "/" + appId + "/" + metadataEndpoint, {
|
|
51898
51896
|
endpoint: config[metadataApi],
|
|
51899
51897
|
data: {
|
|
51900
51898
|
credentialType: credentialType,
|
|
@@ -51902,16 +51900,20 @@ module.exports =
|
|
|
51902
51900
|
providerLabel: providerType
|
|
51903
51901
|
},
|
|
51904
51902
|
headers: {
|
|
51905
|
-
|
|
51903
|
+
"Content-Type": "application/json"
|
|
51906
51904
|
}
|
|
51907
51905
|
});
|
|
51908
51906
|
} else {
|
|
51909
|
-
if (isOauth
|
|
51910
|
-
return api.get(tenantId +
|
|
51907
|
+
if (isOauth) {
|
|
51908
|
+
return api.get(tenantId + "/" + appId + "/environments/" + envName + "/" + connectionKey + "/" + metadataEndpoint, {
|
|
51909
|
+
endpoint: config[metadataApi]
|
|
51910
|
+
});
|
|
51911
|
+
} else if (isAdapter || isFlatFile || providerType === "Ethos") {
|
|
51912
|
+
return api.get(tenantId + "/" + appId + "/environments/" + envName + "/" + metadataEndpoint + (extraQuery || ""), {
|
|
51911
51913
|
endpoint: config[metadataApi]
|
|
51912
51914
|
});
|
|
51913
51915
|
} else {
|
|
51914
|
-
return api.get(tenantId +
|
|
51916
|
+
return api.get(tenantId + "/" + appId + "/" + metadataEndpoint + (extraQuery || ""), {
|
|
51915
51917
|
endpoint: config[metadataApi]
|
|
51916
51918
|
});
|
|
51917
51919
|
}
|
|
@@ -51925,17 +51927,22 @@ module.exports =
|
|
|
51925
51927
|
var _getState3 = getState(),
|
|
51926
51928
|
config = _getState3.config;
|
|
51927
51929
|
|
|
51928
|
-
return api.post(tenantId +
|
|
51930
|
+
return api.post(tenantId + "/" + appId + "/" + envId + "/uploadpolicy", {
|
|
51929
51931
|
endpoint: config.TRANS_API_URL,
|
|
51930
|
-
data: { name:
|
|
51932
|
+
data: { name: "flatfile", resources: metadata, providerType: providerType, isSource: isSource }
|
|
51931
51933
|
}).then(function (data) {
|
|
51932
51934
|
d = data;
|
|
51933
51935
|
return dispatch(uploadFilesToS3(tenantKey, appKey, envId, metadata, data, contents));
|
|
51934
51936
|
}).then(function () {
|
|
51935
|
-
return dispatch(postCredentials(tenantId, appId, providerType, d.guids, mode, envId,
|
|
51937
|
+
return dispatch(postCredentials(tenantId, appId, providerType, d.guids, mode, envId, "LocalFile")).then(function () {
|
|
51936
51938
|
dispatch({
|
|
51937
51939
|
type: types.FINISH_WIZARD_ENV_CHECK,
|
|
51938
|
-
data: {
|
|
51940
|
+
data: {
|
|
51941
|
+
metadata: { resources: metadata },
|
|
51942
|
+
mode: mode,
|
|
51943
|
+
code: "200 OK",
|
|
51944
|
+
providerType: providerType
|
|
51945
|
+
}
|
|
51939
51946
|
});
|
|
51940
51947
|
return d.guids;
|
|
51941
51948
|
});
|
|
@@ -51950,7 +51957,7 @@ module.exports =
|
|
|
51950
51957
|
var _getState4 = getState(),
|
|
51951
51958
|
config = _getState4.config;
|
|
51952
51959
|
|
|
51953
|
-
return api.delete(tenantId +
|
|
51960
|
+
return api.delete(tenantId + "/" + appId + "/" + envId + "/deletefile/" + fileName, {
|
|
51954
51961
|
endpoint: config.TRANS_API_URL
|
|
51955
51962
|
}).catch(function (err) {
|
|
51956
51963
|
console.log(err);
|
|
@@ -51963,16 +51970,21 @@ module.exports =
|
|
|
51963
51970
|
var _getState5 = getState(),
|
|
51964
51971
|
wizard = _getState5.wizard;
|
|
51965
51972
|
|
|
51966
|
-
var metadata = [].concat(_toConsumableArray(wizard[mode +
|
|
51973
|
+
var metadata = [].concat(_toConsumableArray(wizard[mode + "Metadata"]));
|
|
51967
51974
|
var i = metadata.findIndex(function (rsc) {
|
|
51968
51975
|
return r.name === rsc.name && r.type === rsc.type;
|
|
51969
51976
|
});
|
|
51970
51977
|
if (i > -1) {
|
|
51971
51978
|
metadata.splice(i, 1);
|
|
51972
|
-
console.log(
|
|
51979
|
+
console.log("send now", { resources: metadata });
|
|
51973
51980
|
dispatch({
|
|
51974
51981
|
type: types.FINISH_WIZARD_ENV_CHECK,
|
|
51975
|
-
data: {
|
|
51982
|
+
data: {
|
|
51983
|
+
metadata: { resources: metadata },
|
|
51984
|
+
mode: mode,
|
|
51985
|
+
code: "200 OK",
|
|
51986
|
+
providerType: providerType
|
|
51987
|
+
}
|
|
51976
51988
|
});
|
|
51977
51989
|
}
|
|
51978
51990
|
};
|
|
@@ -51987,7 +51999,14 @@ module.exports =
|
|
|
51987
51999
|
|
|
51988
52000
|
function uploadFilesToS3(tenantKey, appKey, envId, metadata, d, contents) {
|
|
51989
52001
|
var args = contents.map(function (fileContent, i) {
|
|
51990
|
-
return {
|
|
52002
|
+
return {
|
|
52003
|
+
tenantKey: tenantKey,
|
|
52004
|
+
appKey: appKey,
|
|
52005
|
+
envId: envId,
|
|
52006
|
+
fileContent: fileContent,
|
|
52007
|
+
d: d,
|
|
52008
|
+
fileName: metadata[i].name
|
|
52009
|
+
};
|
|
51991
52010
|
});
|
|
51992
52011
|
return function (dispatch, getState, api) {
|
|
51993
52012
|
return Promise.all(args.map(singleFileToS3));
|
|
@@ -52012,20 +52031,20 @@ module.exports =
|
|
|
52012
52031
|
})[s];
|
|
52013
52032
|
};
|
|
52014
52033
|
var fd = new FormData();
|
|
52015
|
-
fd.append(
|
|
52016
|
-
fd.append(
|
|
52017
|
-
fd.append(
|
|
52018
|
-
fd.append(
|
|
52019
|
-
fd.append(
|
|
52020
|
-
fd.append(
|
|
52021
|
-
fd.append(
|
|
52022
|
-
fd.append(
|
|
52023
|
-
fd.append(
|
|
52034
|
+
fd.append("key", tenantKey + "/" + appKey + "/" + envId + "/" + fileName);
|
|
52035
|
+
fd.append("policy", d.policy);
|
|
52036
|
+
fd.append("acl", pFind("acl"));
|
|
52037
|
+
fd.append("success_action_status", pFind("success_action_status"));
|
|
52038
|
+
fd.append("x-amz-credential", pFind("x-amz-credential"));
|
|
52039
|
+
fd.append("x-amz-algorithm", pFind("x-amz-algorithm"));
|
|
52040
|
+
fd.append("x-amz-date", pFind("x-amz-date"));
|
|
52041
|
+
fd.append("x-amz-signature", d.signature);
|
|
52042
|
+
fd.append("file", fileContent);
|
|
52024
52043
|
return (0, _axios2.default)({
|
|
52025
|
-
method:
|
|
52026
|
-
url:
|
|
52044
|
+
method: "post",
|
|
52045
|
+
url: "https://" + pFind("bucket") + ".s3.amazonaws.com/",
|
|
52027
52046
|
data: fd,
|
|
52028
|
-
config: { headers: {
|
|
52047
|
+
config: { headers: { "Content-Type": "multipart/form-data" } }
|
|
52029
52048
|
});
|
|
52030
52049
|
}
|
|
52031
52050
|
|
|
@@ -52034,13 +52053,13 @@ module.exports =
|
|
|
52034
52053
|
var _getState6 = getState(),
|
|
52035
52054
|
config = _getState6.config;
|
|
52036
52055
|
|
|
52037
|
-
return api.get(tenantId +
|
|
52056
|
+
return api.get(tenantId + "/" + appId + "/" + envId + "/downloadpolicy/" + file.name, {
|
|
52038
52057
|
endpoint: config.TRANS_API_URL
|
|
52039
52058
|
}).then(function (d) {
|
|
52040
|
-
var element = document.createElement(
|
|
52041
|
-
element.setAttribute(
|
|
52042
|
-
element.setAttribute(
|
|
52043
|
-
element.style.display =
|
|
52059
|
+
var element = document.createElement("a");
|
|
52060
|
+
element.setAttribute("href", d);
|
|
52061
|
+
element.setAttribute("target", "_blank");
|
|
52062
|
+
element.style.display = "none";
|
|
52044
52063
|
document.body.appendChild(element);
|
|
52045
52064
|
element.click();
|
|
52046
52065
|
document.body.removeChild(element);
|
|
@@ -52088,9 +52107,9 @@ module.exports =
|
|
|
52088
52107
|
})[s];
|
|
52089
52108
|
};
|
|
52090
52109
|
return (0, _axios2.default)({
|
|
52091
|
-
method:
|
|
52092
|
-
url:
|
|
52093
|
-
config: { headers: {
|
|
52110
|
+
method: "get",
|
|
52111
|
+
url: "https://" + pFind("bucket") + ".s3.amazonaws.com/" + tenantKey + "/" + appKey + "/" + file.name,
|
|
52112
|
+
config: { headers: { "Content-Type": "multipart/form-data" } }
|
|
52094
52113
|
});
|
|
52095
52114
|
}
|
|
52096
52115
|
|
|
@@ -52098,11 +52117,11 @@ module.exports =
|
|
|
52098
52117
|
function isDemoCreds(creds, providerType) {
|
|
52099
52118
|
if (creds && providerType) {
|
|
52100
52119
|
switch (providerType) {
|
|
52101
|
-
case
|
|
52102
|
-
if (creds.key ===
|
|
52120
|
+
case "Blackboard":
|
|
52121
|
+
if (creds.key === "6c53d83209834b0e982c0984a5c11bdc" && creds.secret === "16d2ba71f8fa4f13a74f2264c47f6244") return true;
|
|
52103
52122
|
return false;
|
|
52104
|
-
case
|
|
52105
|
-
if (creds.accessToken ===
|
|
52123
|
+
case "Canvas":
|
|
52124
|
+
if (creds.accessToken === "7d4fb8b1afb540049ad2a7268b78da07") return true;
|
|
52106
52125
|
return false;
|
|
52107
52126
|
default:
|
|
52108
52127
|
return false;
|
|
@@ -52121,7 +52140,7 @@ module.exports =
|
|
|
52121
52140
|
var _getState7 = getState(),
|
|
52122
52141
|
config = _getState7.config;
|
|
52123
52142
|
|
|
52124
|
-
return api.get(tenantId +
|
|
52143
|
+
return api.get(tenantId + "/" + appId + "/environments/" + envName + "/oauthurl/9090b61412a74d97ad9ed02c5fx7e705/" + orgType, {
|
|
52125
52144
|
endpoint: config.SF_AGENT_API_URL
|
|
52126
52145
|
}).then(function (data) {
|
|
52127
52146
|
dispatch({
|
|
@@ -52142,12 +52161,12 @@ module.exports =
|
|
|
52142
52161
|
|
|
52143
52162
|
var TRANS_API_URL = config.TRANS_API_URL;
|
|
52144
52163
|
|
|
52145
|
-
return api.post(tenantId +
|
|
52164
|
+
return api.post(tenantId + "/" + accountId + "/credentials/AdapterSecret/environment/" + envName + "/generate", {
|
|
52146
52165
|
endpoint: TRANS_API_URL
|
|
52147
52166
|
}).then(function (data) {
|
|
52148
52167
|
dispatch({
|
|
52149
52168
|
type: types.SET_WIZARD_SAVED_CREDENTIALS,
|
|
52150
|
-
data: Object.assign({}, wizard.savedCredentials, _defineProperty({}, mode +
|
|
52169
|
+
data: Object.assign({}, wizard.savedCredentials, _defineProperty({}, mode + "AdapterSecret", data))
|
|
52151
52170
|
});
|
|
52152
52171
|
});
|
|
52153
52172
|
};
|
|
@@ -52161,13 +52180,13 @@ module.exports =
|
|
|
52161
52180
|
var externalIdlessObjects = [];
|
|
52162
52181
|
// only run for Salesforce
|
|
52163
52182
|
bundles && bundles.filter(function (b) {
|
|
52164
|
-
return b.provider.toLowerCase() ===
|
|
52183
|
+
return b.provider.toLowerCase() === "salesforce";
|
|
52165
52184
|
}).forEach(function (b) {
|
|
52166
52185
|
var rsc = metadata.find(function (r) {
|
|
52167
52186
|
return r.type === b.name;
|
|
52168
52187
|
});
|
|
52169
52188
|
var externalIdProp = rsc && rsc.properties && rsc.properties.find(function (p) {
|
|
52170
|
-
return p.name ===
|
|
52189
|
+
return p.name === "Lingk_External_Id__c";
|
|
52171
52190
|
});
|
|
52172
52191
|
// only add to the array if Lingk External Id does not already exist
|
|
52173
52192
|
if (!externalIdProp || externalIdProp.fake === true) {
|
|
@@ -52176,13 +52195,13 @@ module.exports =
|
|
|
52176
52195
|
});
|
|
52177
52196
|
|
|
52178
52197
|
if (externalIdlessObjects.length > 0) {
|
|
52179
|
-
console.log(
|
|
52180
|
-
return api.post(tenantId +
|
|
52198
|
+
console.log("Adding Lingk External Id field to: ", externalIdlessObjects);
|
|
52199
|
+
return api.post(tenantId + "/" + appId + "/environments/" + envName + "/salesforceschema/field", {
|
|
52181
52200
|
endpoint: config.SF_AGENT_API_URL,
|
|
52182
52201
|
data: externalIdlessObjects.map(function (o) {
|
|
52183
52202
|
return {
|
|
52184
52203
|
type: o,
|
|
52185
|
-
field:
|
|
52204
|
+
field: "Lingk_External_Id__c"
|
|
52186
52205
|
};
|
|
52187
52206
|
})
|
|
52188
52207
|
});
|
|
@@ -52197,7 +52216,7 @@ module.exports =
|
|
|
52197
52216
|
var _getState10 = getState(),
|
|
52198
52217
|
config = _getState10.config;
|
|
52199
52218
|
|
|
52200
|
-
return api.post(tenantId +
|
|
52219
|
+
return api.post(tenantId + "/" + appId + "/environments/" + envName + "/salesforceschema/field", {
|
|
52201
52220
|
endpoint: config.SF_AGENT_API_URL,
|
|
52202
52221
|
data: [{
|
|
52203
52222
|
type: objectType,
|
|
@@ -52266,7 +52285,7 @@ module.exports =
|
|
|
52266
52285
|
var _getState11 = getState(),
|
|
52267
52286
|
config = _getState11.config;
|
|
52268
52287
|
|
|
52269
|
-
return api.get(tenantId +
|
|
52288
|
+
return api.get(tenantId + "/" + appId + "/scenarios/" + typeGuid, {
|
|
52270
52289
|
endpoint: config.TRANS_API_URL
|
|
52271
52290
|
}).then(function (r) {
|
|
52272
52291
|
var scenarios = r;
|
|
@@ -52292,7 +52311,7 @@ module.exports =
|
|
|
52292
52311
|
var _getState12 = getState(),
|
|
52293
52312
|
config = _getState12.config;
|
|
52294
52313
|
|
|
52295
|
-
return api.post(tenantId +
|
|
52314
|
+
return api.post(tenantId + "/" + appId + "/scenario", {
|
|
52296
52315
|
endpoint: config.TRANS_API_URL,
|
|
52297
52316
|
data: data
|
|
52298
52317
|
});
|
|
@@ -52304,7 +52323,7 @@ module.exports =
|
|
|
52304
52323
|
var _getState13 = getState(),
|
|
52305
52324
|
config = _getState13.config;
|
|
52306
52325
|
|
|
52307
|
-
return api.post(tenantId +
|
|
52326
|
+
return api.post(tenantId + "/" + appId + "/scenarios/" + typeGuid + (isGlobal ? "/global" : ""), {
|
|
52308
52327
|
endpoint: config.TRANS_API_URL,
|
|
52309
52328
|
data: scenarios.map(function (s, i) {
|
|
52310
52329
|
return {
|
|
@@ -52325,11 +52344,11 @@ module.exports =
|
|
|
52325
52344
|
config = _getState14.config;
|
|
52326
52345
|
|
|
52327
52346
|
var data = { bundles: bundles };
|
|
52328
|
-
return api.post(tenantId +
|
|
52347
|
+
return api.post(tenantId + "/" + appId + "/bundle", {
|
|
52329
52348
|
endpoint: config.TRANS_API_URL,
|
|
52330
52349
|
data: data
|
|
52331
52350
|
}).catch(function (err) {
|
|
52332
|
-
onGenerationError(
|
|
52351
|
+
onGenerationError("There was an error in your Object Mapping. Please contact Lingk Support");
|
|
52333
52352
|
return Promise.reject(err);
|
|
52334
52353
|
});
|
|
52335
52354
|
};
|
|
@@ -52341,11 +52360,11 @@ module.exports =
|
|
|
52341
52360
|
config = _getState15.config;
|
|
52342
52361
|
|
|
52343
52362
|
var data = { mappings: mappings };
|
|
52344
|
-
return api.post(tenantId +
|
|
52363
|
+
return api.post(tenantId + "/" + appId + "/schemamappings", {
|
|
52345
52364
|
endpoint: config.TRANS_API_URL,
|
|
52346
52365
|
data: data
|
|
52347
52366
|
}).catch(function (err) {
|
|
52348
|
-
onGenerationError(
|
|
52367
|
+
onGenerationError("There was an error in your Field Mapping. Please contact Lingk Support");
|
|
52349
52368
|
return Promise.reject(err);
|
|
52350
52369
|
});
|
|
52351
52370
|
};
|
|
@@ -52362,12 +52381,12 @@ module.exports =
|
|
|
52362
52381
|
integrationTypeGuid: typeGuid,
|
|
52363
52382
|
name: title,
|
|
52364
52383
|
configuration: configuration
|
|
52365
|
-
}, piGuid && piGuid !==
|
|
52366
|
-
return api.post(tenantId +
|
|
52384
|
+
}, piGuid && piGuid !== "_" && { productizedIntegrationGuid: piGuid }, transformerBaseId && { transformerBaseId: transformerBaseId });
|
|
52385
|
+
return api.post(tenantId + "/" + appId + "/productizedintegrations", {
|
|
52367
52386
|
endpoint: config.TRANS_API_URL,
|
|
52368
52387
|
data: data
|
|
52369
52388
|
}).catch(function (err) {
|
|
52370
|
-
onGenerationError(
|
|
52389
|
+
onGenerationError("There was an error creating your Integration. Please contact Lingk Support");
|
|
52371
52390
|
return Promise.reject(err);
|
|
52372
52391
|
});
|
|
52373
52392
|
};
|
|
@@ -52386,11 +52405,11 @@ module.exports =
|
|
|
52386
52405
|
configuration: configuration,
|
|
52387
52406
|
id: updateWizardVersionId
|
|
52388
52407
|
}, transformerBaseId && { transformerBaseId: transformerBaseId });
|
|
52389
|
-
return api.put(tenantId +
|
|
52408
|
+
return api.put(tenantId + "/" + appId + "/productizedintegrations/" + piGuid, {
|
|
52390
52409
|
endpoint: config.TRANS_API_URL,
|
|
52391
52410
|
data: data
|
|
52392
52411
|
}).catch(function (err) {
|
|
52393
|
-
onGenerationError(
|
|
52412
|
+
onGenerationError("There was an error updating your Integration. Please contact Lingk Support");
|
|
52394
52413
|
return Promise.reject(err);
|
|
52395
52414
|
});
|
|
52396
52415
|
};
|
|
@@ -52401,16 +52420,16 @@ module.exports =
|
|
|
52401
52420
|
var _getState18 = getState(),
|
|
52402
52421
|
config = _getState18.config;
|
|
52403
52422
|
|
|
52404
|
-
return api.post(tenantId +
|
|
52423
|
+
return api.post(tenantId + "/" + appId + "/productizedintegrations/" + piGuid + "/generate", {
|
|
52405
52424
|
endpoint: config.TRANS_API_URL,
|
|
52406
52425
|
data: Object.assign({
|
|
52407
|
-
|
|
52408
|
-
|
|
52409
|
-
|
|
52410
|
-
|
|
52426
|
+
sourceSchema: sourceMetadata,
|
|
52427
|
+
destinationSchema: destinationMetadata,
|
|
52428
|
+
environment: envName,
|
|
52429
|
+
environmentId: String(envId)
|
|
52411
52430
|
}, updateWizardVersionId && { updateWizardVersionId: updateWizardVersionId })
|
|
52412
52431
|
}).catch(function (err) {
|
|
52413
|
-
onGenerationError(
|
|
52432
|
+
onGenerationError("There was an error generating the Integration. Please contact Lingk Support");
|
|
52414
52433
|
return Promise.reject(err);
|
|
52415
52434
|
});
|
|
52416
52435
|
};
|
|
@@ -52422,7 +52441,7 @@ module.exports =
|
|
|
52422
52441
|
config = _getState19.config;
|
|
52423
52442
|
|
|
52424
52443
|
if (schema && schema.resources) {
|
|
52425
|
-
return api.post(tenantId +
|
|
52444
|
+
return api.post(tenantId + "/" + appId + "/" + envId + "/fileschema", {
|
|
52426
52445
|
endpoint: config.TRANS_API_URL,
|
|
52427
52446
|
data: schema
|
|
52428
52447
|
});
|
|
@@ -52472,7 +52491,7 @@ module.exports =
|
|
|
52472
52491
|
if (r[3] && r[3].schemaGuid && r[3].schemaGuid.length > 0) {
|
|
52473
52492
|
configuration.destinationFileSchemaGuid = r[3].schemaGuid;
|
|
52474
52493
|
}
|
|
52475
|
-
if (piGuid && piGuid !==
|
|
52494
|
+
if (piGuid && piGuid !== "_" && updateWizardVersionId) {
|
|
52476
52495
|
// same version
|
|
52477
52496
|
return dispatch(callUpdateProductizedIntegration(tenantId, appId, map.schemaMappingGuid, bundle.bundlePackGuid, configuration, title, typeGuid, piGuid, onGenerationError, updateWizardVersionId, transformerBaseId));
|
|
52478
52497
|
} else {
|
|
@@ -52484,11 +52503,13 @@ module.exports =
|
|
|
52484
52503
|
dispatch(callGenerateRecipe(tenantId, appId, typeId, typeGuid, title, pi.productizedIntegrationGuid, map.schemaMappingGuid, sourceMetadata, destinationMetadata, isManagedPackage, onGenerationError, envName, envId, updateWizardVersionId)).then(function (generatedRecipe) {
|
|
52485
52504
|
onGenerate();
|
|
52486
52505
|
if (deployment && isFinishClick) {
|
|
52487
|
-
if (deployment.type ===
|
|
52488
|
-
dispatch(callPostEventContext({
|
|
52506
|
+
if (deployment.type === "once") {
|
|
52507
|
+
dispatch(callPostEventContext({
|
|
52508
|
+
eventData: {
|
|
52489
52509
|
environmentName: envName,
|
|
52490
52510
|
environmentId: String(envId)
|
|
52491
|
-
}
|
|
52511
|
+
}
|
|
52512
|
+
}, generatedRecipe.BaseId)).then(function () {
|
|
52492
52513
|
dispatch(callExecuteTransformer(generatedRecipe.Id)).then(function (response) {
|
|
52493
52514
|
dispatch(callLookupLogData(tenantId, response.externalExecutionId, 0, onFinish, generatedRecipe, pi));
|
|
52494
52515
|
});
|
|
@@ -52513,7 +52534,7 @@ module.exports =
|
|
|
52513
52534
|
|
|
52514
52535
|
var TRANS_API_URL = config.TRANS_API_URL;
|
|
52515
52536
|
|
|
52516
|
-
return api.post(
|
|
52537
|
+
return api.post("transformers/" + transBaseId + "/eventdata", {
|
|
52517
52538
|
endpoint: TRANS_API_URL,
|
|
52518
52539
|
data: data
|
|
52519
52540
|
});
|
|
@@ -52525,15 +52546,15 @@ module.exports =
|
|
|
52525
52546
|
var _getState21 = getState(),
|
|
52526
52547
|
config = _getState21.config;
|
|
52527
52548
|
|
|
52528
|
-
var query =
|
|
52549
|
+
var query = "";
|
|
52529
52550
|
var d = new Date();
|
|
52530
52551
|
var seconds = d.getTime() / 1000;
|
|
52531
52552
|
var externalExecutionId = Math.round(seconds);
|
|
52532
|
-
query +=
|
|
52553
|
+
query += "externalExecutionId=" + externalExecutionId;
|
|
52533
52554
|
|
|
52534
|
-
console.log(
|
|
52535
|
-
dispatch(setFaviconInWizard({ icon:
|
|
52536
|
-
return api.get(
|
|
52555
|
+
console.log("executing generated recipe", transId);
|
|
52556
|
+
dispatch(setFaviconInWizard({ icon: "wizard", alertCount: null }));
|
|
52557
|
+
return api.get("execute/" + transId + "?" + query, {
|
|
52537
52558
|
endpoint: config.TRANS_API_URL
|
|
52538
52559
|
}).then(function (data) {
|
|
52539
52560
|
return { done: data, externalExecutionId: externalExecutionId };
|
|
@@ -52546,7 +52567,7 @@ module.exports =
|
|
|
52546
52567
|
var _getState22 = getState(),
|
|
52547
52568
|
config = _getState22.config;
|
|
52548
52569
|
|
|
52549
|
-
return api.get(tenantId +
|
|
52570
|
+
return api.get(tenantId + "/logs/transformers/externalExecutionId/" + externalExecutionId, {
|
|
52550
52571
|
endpoint: config.TRANS_API_URL
|
|
52551
52572
|
}).then(function (data) {
|
|
52552
52573
|
console.log("LOG", data);
|
|
@@ -52556,7 +52577,10 @@ module.exports =
|
|
|
52556
52577
|
onFinish(generatedRecipe, pi);
|
|
52557
52578
|
} else {
|
|
52558
52579
|
dispatch(setOngoingExecutionLogCount(data[0].stepCount));
|
|
52559
|
-
dispatch(setFaviconInWizard({
|
|
52580
|
+
dispatch(setFaviconInWizard({
|
|
52581
|
+
icon: "wizard",
|
|
52582
|
+
alertCount: data[0].stepCount + 1
|
|
52583
|
+
}));
|
|
52560
52584
|
dispatch(callGetLogSteps(tenantId, externalExecutionId, 0, onFinish, generatedRecipe, pi));
|
|
52561
52585
|
}
|
|
52562
52586
|
} else {
|
|
@@ -52571,20 +52595,20 @@ module.exports =
|
|
|
52571
52595
|
}
|
|
52572
52596
|
}
|
|
52573
52597
|
/*if (!(data[0] && data[0].completed)) {
|
|
52574
|
-
|
|
52575
|
-
|
|
52576
|
-
|
|
52577
|
-
|
|
52578
|
-
|
|
52579
|
-
|
|
52580
|
-
} else {
|
|
52581
|
-
onFinish(generatedRecipe, pi)
|
|
52582
|
-
}
|
|
52598
|
+
if (index < 3600) {
|
|
52599
|
+
setTimeout(() => {
|
|
52600
|
+
dispatch(
|
|
52601
|
+
callLookupLogData(tenantId, externalExecutionId, index+1, onFinish, generatedRecipe, pi)
|
|
52602
|
+
);
|
|
52603
|
+
}, 1000);
|
|
52583
52604
|
} else {
|
|
52584
|
-
if (!(data[0] && data[0].succeeded)) {
|
|
52585
|
-
onFinish(generatedRecipe, pi)
|
|
52586
|
-
}
|
|
52587
52605
|
onFinish(generatedRecipe, pi)
|
|
52606
|
+
}
|
|
52607
|
+
} else {
|
|
52608
|
+
if (!(data[0] && data[0].succeeded)) {
|
|
52609
|
+
onFinish(generatedRecipe, pi)
|
|
52610
|
+
}
|
|
52611
|
+
onFinish(generatedRecipe, pi)
|
|
52588
52612
|
}*/
|
|
52589
52613
|
});
|
|
52590
52614
|
};
|
|
@@ -52620,7 +52644,7 @@ module.exports =
|
|
|
52620
52644
|
|
|
52621
52645
|
var TRANS_API_URL = config.TRANS_API_URL;
|
|
52622
52646
|
|
|
52623
|
-
return api.get(tenantId +
|
|
52647
|
+
return api.get(tenantId + "/logs/steps/externalExecutionId/" + externalExecutionId, {
|
|
52624
52648
|
endpoint: TRANS_API_URL
|
|
52625
52649
|
}).then(function (data) {
|
|
52626
52650
|
dispatch(setOngoingExecutionLogs(data));
|
|
@@ -52647,19 +52671,21 @@ module.exports =
|
|
|
52647
52671
|
isrecurring: true
|
|
52648
52672
|
//schedule: `${deployment.minutes || 0} ${deployment.hours || 0} ${deployment.days || 0} * ? *`
|
|
52649
52673
|
};
|
|
52650
|
-
if (deployment.type ===
|
|
52651
|
-
triggerData.dailySchedule = {
|
|
52652
|
-
|
|
52674
|
+
if (deployment.type === "daily") {
|
|
52675
|
+
triggerData.dailySchedule = {
|
|
52676
|
+
timeUTC: _moment2.default.utc(deployment.dailySchedule).format("HH:mm")
|
|
52677
|
+
};
|
|
52678
|
+
} else if (deployment.type === "repeating") {
|
|
52653
52679
|
triggerData.repeatingSchedule = {
|
|
52654
|
-
|
|
52655
|
-
|
|
52680
|
+
frequency: parseInt(deployment.frequency, 10),
|
|
52681
|
+
frequencyUnit: deployment.frequencyUnit.toLowerCase().substring(0, deployment.frequencyUnit.length - 1)
|
|
52656
52682
|
};
|
|
52657
52683
|
}
|
|
52658
52684
|
return function (dispatch, getState, api) {
|
|
52659
52685
|
var _getState24 = getState(),
|
|
52660
52686
|
config = _getState24.config;
|
|
52661
52687
|
|
|
52662
|
-
return api.post(tenantId +
|
|
52688
|
+
return api.post(tenantId + "/createtrigger", {
|
|
52663
52689
|
endpoint: config.TRANS_API_URL,
|
|
52664
52690
|
data: triggerData
|
|
52665
52691
|
}).then(function () {
|
|
@@ -52692,25 +52718,25 @@ module.exports =
|
|
|
52692
52718
|
var source = wiz.source,
|
|
52693
52719
|
destination = wiz.destination;
|
|
52694
52720
|
|
|
52695
|
-
if (piGuid && piGuid !==
|
|
52721
|
+
if (piGuid && piGuid !== "_") {
|
|
52696
52722
|
return function (dispatch, getState, api) {
|
|
52697
52723
|
var _getState25 = getState(),
|
|
52698
52724
|
config = _getState25.config;
|
|
52699
52725
|
|
|
52700
|
-
return api.get(tenantId +
|
|
52726
|
+
return api.get(tenantId + "/" + accountId + "/productizedintegrations/" + piGuid + "/versions", {
|
|
52701
52727
|
endpoint: config.TRANS_API_URL
|
|
52702
52728
|
}).then(function (pis) {
|
|
52703
52729
|
var pi = pis[parseInt(piIndex, 10)];
|
|
52704
52730
|
var piconfig = pi.configuration;
|
|
52705
|
-
piconfig[
|
|
52731
|
+
piconfig["title"] = pi.name;
|
|
52706
52732
|
dispatch({
|
|
52707
52733
|
type: types.SET_WIZARD_SAVED_CONFIGURATION,
|
|
52708
52734
|
data: piconfig
|
|
52709
52735
|
});
|
|
52710
|
-
var envName = piconfig[
|
|
52711
|
-
var sourceFileSchemaGuid = piconfig[
|
|
52712
|
-
var destinationFileSchemaGuid = piconfig[
|
|
52713
|
-
var includeSystemResources = piconfig[
|
|
52736
|
+
var envName = piconfig["environment"];
|
|
52737
|
+
var sourceFileSchemaGuid = piconfig["sourceFileSchemaGuid"];
|
|
52738
|
+
var destinationFileSchemaGuid = piconfig["destinationFileSchemaGuid"];
|
|
52739
|
+
var includeSystemResources = piconfig["includeSystemResources"] === "true";
|
|
52714
52740
|
return Promise.all([dispatch(callGetCredentials(tenantId, accountId, wiz, envName)), dispatch(callGetMapping(tenantId, accountId, pi.schemaMappingGuid)), dispatch(callGetBundles(tenantId, accountId, pi.bundlePackGuid)), dispatch(callGetTrigger(pi.transformerBaseId, piconfig.environmentId))]).then(function (res) {
|
|
52715
52741
|
var creds = res[0];
|
|
52716
52742
|
var sourceCreds = creds[0] && creds[0].credentialsJson;
|
|
@@ -52726,7 +52752,9 @@ module.exports =
|
|
|
52726
52752
|
});
|
|
52727
52753
|
var savedSourceEndpoint = sourceCreds && sourceCreds.rootUrl;
|
|
52728
52754
|
var savedDestinationEndpoint = destCreds && destCreds.rootUrl;
|
|
52729
|
-
|
|
52755
|
+
var sourceConnectionKey = creds[0] && creds[0].key;
|
|
52756
|
+
var destConnectionKey = creds[1] && creds[1].key;
|
|
52757
|
+
return Promise.all([dispatch(tryGetMetadataReload(tenantId, accountId, "source", source, savedSourceEndpoint, sourceCreds, envName, sourceFileSchemaGuid, includeSystemResources, sourceConnectionKey)), dispatch(tryGetMetadataReload(tenantId, accountId, "destination", destination, savedDestinationEndpoint, destCreds, envName, destinationFileSchemaGuid, includeSystemResources, destConnectionKey))]);
|
|
52730
52758
|
});
|
|
52731
52759
|
});
|
|
52732
52760
|
};
|
|
@@ -52755,11 +52783,11 @@ module.exports =
|
|
|
52755
52783
|
if (fromUI) {
|
|
52756
52784
|
dispatch({
|
|
52757
52785
|
type: types.START_WIZARD_ENV_CHECK,
|
|
52758
|
-
mode:
|
|
52786
|
+
mode: "source"
|
|
52759
52787
|
});
|
|
52760
52788
|
dispatch({
|
|
52761
52789
|
type: types.START_WIZARD_ENV_CHECK,
|
|
52762
|
-
mode:
|
|
52790
|
+
mode: "destination"
|
|
52763
52791
|
});
|
|
52764
52792
|
}
|
|
52765
52793
|
return Promise.all([dispatch(tryGetCredentials(tenantId, appId, source.type, source.credentials, envName)), dispatch(tryGetCredentials(tenantId, appId, destination.type, destination.credentials, envName)), dispatch(tryGetAdapterSecret(tenantId, appId, source.metadataEndpoint, envName)), dispatch(tryGetAdapterSecret(tenantId, appId, destination.metadataEndpoint, envName))]);
|
|
@@ -52788,14 +52816,14 @@ module.exports =
|
|
|
52788
52816
|
|
|
52789
52817
|
dispatch({
|
|
52790
52818
|
type: types.SET_WIZARD_SAVED_CREDENTIALS,
|
|
52791
|
-
data: Object.assign({}, wizard.savedCredentials, _defineProperty({}, mode +
|
|
52819
|
+
data: Object.assign({}, wizard.savedCredentials, _defineProperty({}, mode + "AdapterSecret", cred))
|
|
52792
52820
|
});
|
|
52793
52821
|
};
|
|
52794
52822
|
}
|
|
52795
52823
|
|
|
52796
52824
|
function getCredentialForEnvironment(tenantId, appId, credentialType, envName, mode) {
|
|
52797
52825
|
return function (dispatch, getState, api) {
|
|
52798
|
-
if (credentialType ===
|
|
52826
|
+
if (credentialType === "LocalFile") {
|
|
52799
52827
|
return Promise.resolve({
|
|
52800
52828
|
credentialType: "LocalFile",
|
|
52801
52829
|
credentials: "",
|
|
@@ -52807,7 +52835,7 @@ module.exports =
|
|
|
52807
52835
|
var _getState28 = getState(),
|
|
52808
52836
|
config = _getState28.config;
|
|
52809
52837
|
|
|
52810
|
-
return api.get(tenantId +
|
|
52838
|
+
return api.get(tenantId + "/" + appId + "/credentials/" + credentialType + "/" + envName + "/defaultConnection", {
|
|
52811
52839
|
endpoint: config.TRANS_API_URL
|
|
52812
52840
|
});
|
|
52813
52841
|
};
|
|
@@ -52826,29 +52854,29 @@ module.exports =
|
|
|
52826
52854
|
|
|
52827
52855
|
function tryGetAdapterSecret(tenantId, appId, metadataEndpoint, envName) {
|
|
52828
52856
|
return function (dispatch, getState, api) {
|
|
52829
|
-
var isAdapter = metadataEndpoint ===
|
|
52857
|
+
var isAdapter = metadataEndpoint === "adaptermetadata";
|
|
52830
52858
|
if (isAdapter) {
|
|
52831
|
-
return dispatch(getCredentialForEnvironment(tenantId, appId,
|
|
52859
|
+
return dispatch(getCredentialForEnvironment(tenantId, appId, "AdapterSecret", envName)).catch(function () {
|
|
52832
52860
|
return null;
|
|
52833
52861
|
});
|
|
52834
52862
|
} else return Promise.resolve(null);
|
|
52835
52863
|
};
|
|
52836
52864
|
}
|
|
52837
52865
|
|
|
52838
|
-
function tryGetMetadataReload(tenantId, appId, mode, wiz, savedEndpoint, actualCreds, envName, fileSchemaGuid, includeSystemResources) {
|
|
52866
|
+
function tryGetMetadataReload(tenantId, appId, mode, wiz, savedEndpoint, actualCreds, envName, fileSchemaGuid, includeSystemResources, connectionKey) {
|
|
52839
52867
|
return function (dispatch, getState, api) {
|
|
52840
52868
|
// if skipEnvStep (as in SF App), auto pull SF metadata
|
|
52841
52869
|
var type = wiz.type,
|
|
52842
52870
|
credentials = wiz.credentials;
|
|
52843
52871
|
|
|
52844
|
-
var isOauth = credentials && credentials[0] ===
|
|
52845
|
-
var extraQuery = isOauth && includeSystemResources ?
|
|
52846
|
-
var isFlatFile = credentials && credentials[0] ===
|
|
52847
|
-
var isSFTP = type ===
|
|
52872
|
+
var isOauth = credentials && credentials[0] === "Oauth";
|
|
52873
|
+
var extraQuery = isOauth && includeSystemResources ? "?all=true" : "";
|
|
52874
|
+
var isFlatFile = credentials && credentials[0] === "LocalFile";
|
|
52875
|
+
var isSFTP = type === "SFTP";
|
|
52848
52876
|
if (envName && (isOauth || isFlatFile || isSFTP || savedEndpoint && savedEndpoint.length > 8)) {
|
|
52849
52877
|
var isReload = true;
|
|
52850
52878
|
var environment = { name: envName };
|
|
52851
|
-
return dispatch(callGetMetadata(tenantId, appId, mode, type, wiz, savedEndpoint, null, actualCreds, environment, isReload, fileSchemaGuid, extraQuery));
|
|
52879
|
+
return dispatch(callGetMetadata(tenantId, appId, mode, type, wiz, savedEndpoint, null, actualCreds, environment, isReload, fileSchemaGuid, extraQuery, connectionKey));
|
|
52852
52880
|
} else return Promise.resolve(null);
|
|
52853
52881
|
};
|
|
52854
52882
|
}
|
|
@@ -52859,7 +52887,7 @@ module.exports =
|
|
|
52859
52887
|
var _getState29 = getState(),
|
|
52860
52888
|
config = _getState29.config;
|
|
52861
52889
|
|
|
52862
|
-
return api.get(tenantId +
|
|
52890
|
+
return api.get(tenantId + "/" + accountId + "/bundle/" + bundlePackGuid, {
|
|
52863
52891
|
endpoint: config.TRANS_API_URL
|
|
52864
52892
|
}).then(function (data) {
|
|
52865
52893
|
dispatch({
|
|
@@ -52877,7 +52905,7 @@ module.exports =
|
|
|
52877
52905
|
var _getState30 = getState(),
|
|
52878
52906
|
config = _getState30.config;
|
|
52879
52907
|
|
|
52880
|
-
return api.get(tenantId +
|
|
52908
|
+
return api.get(tenantId + "/" + accountId + "/schemamappings/" + mappingGuid, {
|
|
52881
52909
|
endpoint: config.TRANS_API_URL
|
|
52882
52910
|
}).then(function (data) {
|
|
52883
52911
|
dispatch({
|
|
@@ -52899,7 +52927,7 @@ module.exports =
|
|
|
52899
52927
|
var _getState31 = getState(),
|
|
52900
52928
|
config = _getState31.config;
|
|
52901
52929
|
|
|
52902
|
-
return api.post(tenantId +
|
|
52930
|
+
return api.post(tenantId + "/" + appId + "/environments/" + envId + "/credentials", {
|
|
52903
52931
|
endpoint: config.TRANS_API_URL,
|
|
52904
52932
|
data: {
|
|
52905
52933
|
credentialType: credType,
|
|
@@ -52915,7 +52943,7 @@ module.exports =
|
|
|
52915
52943
|
var _getState32 = getState(),
|
|
52916
52944
|
config = _getState32.config;
|
|
52917
52945
|
|
|
52918
|
-
return api.get(tenantId +
|
|
52946
|
+
return api.get(tenantId + "/" + appId + "/environments", {
|
|
52919
52947
|
endpoint: config.TRANS_API_URL
|
|
52920
52948
|
}).then(function (data) {
|
|
52921
52949
|
dispatch({
|
|
@@ -52937,7 +52965,7 @@ module.exports =
|
|
|
52937
52965
|
config = _getState33.config;
|
|
52938
52966
|
|
|
52939
52967
|
if (transBaseId) {
|
|
52940
|
-
return api.get(
|
|
52968
|
+
return api.get("gettriggers/" + transBaseId, {
|
|
52941
52969
|
endpoint: config.TRANS_API_URL
|
|
52942
52970
|
}).then(function (data) {
|
|
52943
52971
|
var trig = null;
|
|
@@ -52976,7 +53004,7 @@ module.exports =
|
|
|
52976
53004
|
function clearWizardFormData() {
|
|
52977
53005
|
return function (dispatch) {
|
|
52978
53006
|
dispatch(setFaviconInWizard({ icon: false, alertCount: null }));
|
|
52979
|
-
dispatch((0, _reduxForm.reset)(
|
|
53007
|
+
dispatch((0, _reduxForm.reset)("wizard"));
|
|
52980
53008
|
dispatch({
|
|
52981
53009
|
type: types.CLEAR_WIZARD
|
|
52982
53010
|
});
|
|
@@ -56521,7 +56549,7 @@ module.exports =
|
|
|
56521
56549
|
/* 179 */
|
|
56522
56550
|
/***/ function(module, exports, __webpack_require__) {
|
|
56523
56551
|
|
|
56524
|
-
|
|
56552
|
+
"use strict";
|
|
56525
56553
|
|
|
56526
56554
|
Object.defineProperty(exports, "__esModule", {
|
|
56527
56555
|
value: true
|
|
@@ -56589,11 +56617,11 @@ module.exports =
|
|
|
56589
56617
|
// set meta for File Schema step if needed
|
|
56590
56618
|
// set defaults of filename and delimiter
|
|
56591
56619
|
|
|
56592
|
-
var isSFTP = config.type ===
|
|
56620
|
+
var isSFTP = config.type === "SFTP";
|
|
56593
56621
|
if (isSFTP) {
|
|
56594
56622
|
var savedFileSchema = [];
|
|
56595
|
-
if (_this.props.formValues[mode +
|
|
56596
|
-
savedFileSchema = [].concat(_toConsumableArray(formValues[mode +
|
|
56623
|
+
if (_this.props.formValues[mode + "FileSchema"]) {
|
|
56624
|
+
savedFileSchema = [].concat(_toConsumableArray(formValues[mode + "FileSchema"]));
|
|
56597
56625
|
}
|
|
56598
56626
|
var fileSchema = metadata.resources && metadata.resources.map(function (r) {
|
|
56599
56627
|
var existing = savedFileSchema.find(function (rsc) {
|
|
@@ -56602,15 +56630,15 @@ module.exports =
|
|
|
56602
56630
|
if (existing) return existing;
|
|
56603
56631
|
return Object.assign({}, r, {
|
|
56604
56632
|
filePattern: r.name,
|
|
56605
|
-
delimiter:
|
|
56633
|
+
delimiter: ","
|
|
56606
56634
|
});
|
|
56607
56635
|
});
|
|
56608
|
-
change(mode +
|
|
56636
|
+
change(mode + "FileSchema", fileSchema);
|
|
56609
56637
|
}
|
|
56610
56638
|
|
|
56611
|
-
var isFlat = config.type ===
|
|
56639
|
+
var isFlat = config.type === "LocalFile";
|
|
56612
56640
|
if (isFlat) {
|
|
56613
|
-
change(mode +
|
|
56641
|
+
change(mode + "FileSchema", metadata);
|
|
56614
56642
|
}
|
|
56615
56643
|
};
|
|
56616
56644
|
|
|
@@ -56624,24 +56652,24 @@ module.exports =
|
|
|
56624
56652
|
wizard = _this$props2.wizard,
|
|
56625
56653
|
change = _this$props2.change;
|
|
56626
56654
|
|
|
56627
|
-
var config = step[mode +
|
|
56655
|
+
var config = step[mode + "Config"];
|
|
56628
56656
|
var env = wizard.environments.find(function (e) {
|
|
56629
|
-
return e.name === formValues[
|
|
56657
|
+
return e.name === formValues["environment"];
|
|
56630
56658
|
});
|
|
56631
|
-
if (phase ===
|
|
56632
|
-
var c = formValues[mode +
|
|
56633
|
-
change(mode +
|
|
56634
|
-
userName:
|
|
56659
|
+
if (phase === "start") {
|
|
56660
|
+
var c = formValues[mode + "Credentials"];
|
|
56661
|
+
change(mode + "Credentials", Object.assign({}, c.credentialsJson, {
|
|
56662
|
+
userName: "_" // this will make the dot dot show up
|
|
56635
56663
|
}));
|
|
56636
56664
|
} else {
|
|
56637
56665
|
actions.tryGetCredentials(tenantId, accountId, config.type, config.credentials, env.name).then(function (c) {
|
|
56638
|
-
change(mode +
|
|
56639
|
-
var extraQuery =
|
|
56666
|
+
change(mode + "Credentials", c.credentialsJson);
|
|
56667
|
+
var extraQuery = "";
|
|
56640
56668
|
if (formValues.includeSystemResources) {
|
|
56641
|
-
extraQuery =
|
|
56669
|
+
extraQuery = "?all=true";
|
|
56642
56670
|
}
|
|
56643
56671
|
var isReload = false; // skips posting creds again
|
|
56644
|
-
_this.check(mode, env, c.credentialsJson, isReload, extraQuery);
|
|
56672
|
+
_this.check(mode, env, c.credentialsJson, isReload, extraQuery, c.key);
|
|
56645
56673
|
});
|
|
56646
56674
|
}
|
|
56647
56675
|
};
|
|
@@ -56653,7 +56681,7 @@ module.exports =
|
|
|
56653
56681
|
accountId = _this$props3.accountId,
|
|
56654
56682
|
formValues = _this$props3.formValues;
|
|
56655
56683
|
|
|
56656
|
-
var envName = formValues[
|
|
56684
|
+
var envName = formValues["environment"];
|
|
56657
56685
|
actions.generateNewAdapterSecret(tenantId, accountId, envName, mode);
|
|
56658
56686
|
};
|
|
56659
56687
|
|
|
@@ -56664,9 +56692,9 @@ module.exports =
|
|
|
56664
56692
|
actions = _this$props4.actions,
|
|
56665
56693
|
formValues = _this$props4.formValues;
|
|
56666
56694
|
|
|
56667
|
-
return actions.deleteFlatFile(tenantId, accountId, formValues[
|
|
56695
|
+
return actions.deleteFlatFile(tenantId, accountId, formValues["environmentId"], fileName).then(function () {
|
|
56668
56696
|
var isReload = true;
|
|
56669
|
-
return _this.check(mode, null, {}, isReload,
|
|
56697
|
+
return _this.check(mode, null, {}, isReload, "");
|
|
56670
56698
|
});
|
|
56671
56699
|
};
|
|
56672
56700
|
|
|
@@ -56679,7 +56707,7 @@ module.exports =
|
|
|
56679
56707
|
actions = _this$props5.actions,
|
|
56680
56708
|
formValues = _this$props5.formValues;
|
|
56681
56709
|
|
|
56682
|
-
return actions.downloadFileFromAws(tenantId, accountId, tenantKey, accountKey, formValues[
|
|
56710
|
+
return actions.downloadFileFromAws(tenantId, accountId, tenantKey, accountKey, formValues["environmentId"], file);
|
|
56683
56711
|
};
|
|
56684
56712
|
|
|
56685
56713
|
_this.state = {
|
|
@@ -56694,7 +56722,7 @@ module.exports =
|
|
|
56694
56722
|
}
|
|
56695
56723
|
|
|
56696
56724
|
_createClass(EnvStep, [{
|
|
56697
|
-
key:
|
|
56725
|
+
key: "seeFields",
|
|
56698
56726
|
value: function seeFields(target, mode) {
|
|
56699
56727
|
var _props = this.props,
|
|
56700
56728
|
tenantId = _props.tenantId,
|
|
@@ -56703,16 +56731,16 @@ module.exports =
|
|
|
56703
56731
|
step = _props.step,
|
|
56704
56732
|
configUrls = _props.configUrls;
|
|
56705
56733
|
|
|
56706
|
-
var endpoint = formValues[mode +
|
|
56734
|
+
var endpoint = formValues[mode + "Credentials"].rootUrl;
|
|
56707
56735
|
var x = window.open();
|
|
56708
|
-
x.document.open(
|
|
56709
|
-
x.document.write((0, _previewTabContent.makeContent)(configUrls.TRANS_API_URL, tenantId, accountId, endpoint, target.endpointSuffix, target.name, step.previewToken, formValues[
|
|
56710
|
-
x.document.title =
|
|
56736
|
+
x.document.open("", "_blank");
|
|
56737
|
+
x.document.write((0, _previewTabContent.makeContent)(configUrls.TRANS_API_URL, tenantId, accountId, endpoint, target.endpointSuffix, target.name, step.previewToken, formValues["environment"]));
|
|
56738
|
+
x.document.title = "Preview Data (" + target.name + ")";
|
|
56711
56739
|
x.document.close();
|
|
56712
56740
|
x.focus();
|
|
56713
56741
|
}
|
|
56714
56742
|
}, {
|
|
56715
|
-
key:
|
|
56743
|
+
key: "componentWillMount",
|
|
56716
56744
|
value: function componentWillMount() {
|
|
56717
56745
|
var _props2 = this.props,
|
|
56718
56746
|
step = _props2.step,
|
|
@@ -56726,7 +56754,7 @@ module.exports =
|
|
|
56726
56754
|
}
|
|
56727
56755
|
}
|
|
56728
56756
|
}, {
|
|
56729
|
-
key:
|
|
56757
|
+
key: "componentDidMount",
|
|
56730
56758
|
value: function componentDidMount() {
|
|
56731
56759
|
var _this2 = this;
|
|
56732
56760
|
|
|
@@ -56738,14 +56766,14 @@ module.exports =
|
|
|
56738
56766
|
this.selectEnvironment(null, null, wizard.environments[0]);
|
|
56739
56767
|
}
|
|
56740
56768
|
// IF SAVED CONFIG, LOAD UP FLAT FILES INTO ENV
|
|
56741
|
-
var modes = [
|
|
56769
|
+
var modes = ["source", "destination"];
|
|
56742
56770
|
modes.forEach(function (mode) {
|
|
56743
|
-
_this2.updateFileSchema(mode, step[mode +
|
|
56771
|
+
_this2.updateFileSchema(mode, step[mode + "Config"], wizard[mode + "Metadata"]);
|
|
56744
56772
|
});
|
|
56745
56773
|
}
|
|
56746
56774
|
}, {
|
|
56747
|
-
key:
|
|
56748
|
-
value: function check(mode, environment, actualCreds, isReload, extraQuery) {
|
|
56775
|
+
key: "check",
|
|
56776
|
+
value: function check(mode, environment, actualCreds, isReload, extraQuery, connectionKey) {
|
|
56749
56777
|
var _this3 = this;
|
|
56750
56778
|
|
|
56751
56779
|
var _props4 = this.props,
|
|
@@ -56757,28 +56785,28 @@ module.exports =
|
|
|
56757
56785
|
change = _props4.change,
|
|
56758
56786
|
wizard = _props4.wizard;
|
|
56759
56787
|
|
|
56760
|
-
var config = step[mode +
|
|
56788
|
+
var config = step[mode + "Config"];
|
|
56761
56789
|
var credentials = actualCreds;
|
|
56762
56790
|
var endpoint = credentials && credentials.rootUrl;
|
|
56763
56791
|
//remove trailing slash if exists
|
|
56764
|
-
if (endpoint && endpoint[endpoint.length - 1] ===
|
|
56792
|
+
if (endpoint && endpoint[endpoint.length - 1] === "/" && endpoint.length > 8) {
|
|
56765
56793
|
endpoint = endpoint.slice(0, -1);
|
|
56766
|
-
change(mode +
|
|
56794
|
+
change(mode + "Credentials.rootUrl", endpoint);
|
|
56767
56795
|
}
|
|
56768
56796
|
|
|
56769
56797
|
var env = environment || wizard.environments.find(function (e) {
|
|
56770
|
-
return e.name === formValues[
|
|
56798
|
+
return e.name === formValues["environment"];
|
|
56771
56799
|
});
|
|
56772
56800
|
|
|
56773
|
-
change(mode +
|
|
56774
|
-
this.setState(_defineProperty({}, mode +
|
|
56775
|
-
actions.callGetMetadata(tenantId, accountId, mode, step[mode +
|
|
56776
|
-
_this3.setState(_defineProperty({}, mode +
|
|
56801
|
+
change(mode + "Credentials", credentials);
|
|
56802
|
+
this.setState(_defineProperty({}, mode + "EnvChecking", true));
|
|
56803
|
+
actions.callGetMetadata(tenantId, accountId, mode, step[mode + "Provider"], config, endpoint || "_blank", step.isFramework, credentials, env, isReload, null, extraQuery, connectionKey).then(function (metadata) {
|
|
56804
|
+
_this3.setState(_defineProperty({}, mode + "EnvChecking", false));
|
|
56777
56805
|
_this3.updateFileSchema(mode, config, metadata);
|
|
56778
56806
|
});
|
|
56779
56807
|
}
|
|
56780
56808
|
}, {
|
|
56781
|
-
key:
|
|
56809
|
+
key: "getOauthUrl",
|
|
56782
56810
|
value: function getOauthUrl(type, mode) {
|
|
56783
56811
|
var _props5 = this.props,
|
|
56784
56812
|
actions = _props5.actions,
|
|
@@ -56787,40 +56815,42 @@ module.exports =
|
|
|
56787
56815
|
step = _props5.step,
|
|
56788
56816
|
formValues = _props5.formValues;
|
|
56789
56817
|
|
|
56790
|
-
var envName = formValues[
|
|
56818
|
+
var envName = formValues["environment"];
|
|
56791
56819
|
actions.getOauthUrl(tenantId, accountId, step.typeGuid, type, mode, envName);
|
|
56792
56820
|
}
|
|
56793
56821
|
}, {
|
|
56794
|
-
key:
|
|
56822
|
+
key: "clickDirection",
|
|
56795
56823
|
value: function clickDirection() {
|
|
56796
56824
|
var _props6 = this.props,
|
|
56797
56825
|
change = _props6.change,
|
|
56798
56826
|
nav = _props6.nav;
|
|
56799
56827
|
|
|
56800
|
-
change(
|
|
56801
|
-
change(
|
|
56828
|
+
change("resourceGroups", []);
|
|
56829
|
+
change("scenario", null);
|
|
56802
56830
|
if (nav.limitBackToCurrentPage) {
|
|
56803
56831
|
nav.limitBackToCurrentPage();
|
|
56804
56832
|
}
|
|
56805
56833
|
}
|
|
56806
56834
|
}, {
|
|
56807
|
-
key:
|
|
56835
|
+
key: "selectProvider",
|
|
56808
56836
|
value: function selectProvider(provider) {
|
|
56809
56837
|
var selectedProvider = this.state.selectedProvider;
|
|
56810
56838
|
|
|
56811
|
-
this.setState({
|
|
56839
|
+
this.setState({
|
|
56840
|
+
selectedProvider: provider === selectedProvider ? null : provider
|
|
56841
|
+
});
|
|
56812
56842
|
}
|
|
56813
56843
|
}, {
|
|
56814
|
-
key:
|
|
56844
|
+
key: "selectEnvironment",
|
|
56815
56845
|
value: function selectEnvironment(v, i, env) {
|
|
56816
|
-
this.props.change(
|
|
56817
|
-
this.props.change(
|
|
56846
|
+
this.props.change("environment", env.name);
|
|
56847
|
+
this.props.change("environmentId", String(env.environmentId));
|
|
56818
56848
|
this.props.actions.clearAdapterSecrets();
|
|
56819
56849
|
this.setState({ selectedProvider: null });
|
|
56820
56850
|
this.tryGetCredentialAndCheck(env);
|
|
56821
56851
|
}
|
|
56822
56852
|
}, {
|
|
56823
|
-
key:
|
|
56853
|
+
key: "tryGetCredentialAndCheck",
|
|
56824
56854
|
value: function tryGetCredentialAndCheck(env) {
|
|
56825
56855
|
var _this4 = this;
|
|
56826
56856
|
|
|
@@ -56832,9 +56862,9 @@ module.exports =
|
|
|
56832
56862
|
change = _props7.change,
|
|
56833
56863
|
formValues = _props7.formValues;
|
|
56834
56864
|
|
|
56835
|
-
var modes = [
|
|
56836
|
-
change(
|
|
56837
|
-
change(
|
|
56865
|
+
var modes = ["source", "destination"];
|
|
56866
|
+
change("sourceCredentials", { rootUrl: "https://" });
|
|
56867
|
+
change("destinationCredentials", { rootUrl: "https://" });
|
|
56838
56868
|
this.setState({ sourceEnvChecking: true });
|
|
56839
56869
|
this.setState({ destinationEnvChecking: true });
|
|
56840
56870
|
var wiz = {
|
|
@@ -56849,15 +56879,15 @@ module.exports =
|
|
|
56849
56879
|
// main creds
|
|
56850
56880
|
if (cred && cred.credentialsJson) {
|
|
56851
56881
|
var modeCreds = cred.credentialsJson;
|
|
56852
|
-
change(m +
|
|
56882
|
+
change(m + "Credentials", modeCreds);
|
|
56853
56883
|
var isReload = true; // skips posting creds again
|
|
56854
|
-
var extraQuery =
|
|
56855
|
-
if (formValues.includeSystemResources && wiz[m].type ===
|
|
56856
|
-
extraQuery =
|
|
56884
|
+
var extraQuery = "";
|
|
56885
|
+
if (formValues.includeSystemResources && wiz[m].type === "Salesforce") {
|
|
56886
|
+
extraQuery = "?all=true";
|
|
56857
56887
|
}
|
|
56858
|
-
_this4.check(m, env, modeCreds, isReload, extraQuery);
|
|
56888
|
+
_this4.check(m, env, modeCreds, isReload, extraQuery, cred.key);
|
|
56859
56889
|
} else {
|
|
56860
|
-
_this4.setState(_defineProperty({}, m +
|
|
56890
|
+
_this4.setState(_defineProperty({}, m + "EnvChecking", false));
|
|
56861
56891
|
}
|
|
56862
56892
|
} else {
|
|
56863
56893
|
// adapter secret if exists
|
|
@@ -56869,7 +56899,7 @@ module.exports =
|
|
|
56869
56899
|
});
|
|
56870
56900
|
}
|
|
56871
56901
|
}, {
|
|
56872
|
-
key:
|
|
56902
|
+
key: "setCsvFields",
|
|
56873
56903
|
value: function setCsvFields(meta, contents, mode, providerType) {
|
|
56874
56904
|
var _this5 = this;
|
|
56875
56905
|
|
|
@@ -56883,19 +56913,19 @@ module.exports =
|
|
|
56883
56913
|
//let meta = wizard[`${mode}Metadata`] || []
|
|
56884
56914
|
//meta = meta.concat(metadata)
|
|
56885
56915
|
|
|
56886
|
-
return actions.setCsvFields(tenantId, accountId, tenantKey, accountKey, meta, contents, mode, providerType, mode ===
|
|
56916
|
+
return actions.setCsvFields(tenantId, accountId, tenantKey, accountKey, meta, contents, mode, providerType, mode === "source", formValues["environmentId"]).then(function (d) {
|
|
56887
56917
|
// get the new list of files
|
|
56888
56918
|
var isReload = true; // skip post creds
|
|
56889
|
-
return _this5.check(mode, null, d, isReload,
|
|
56919
|
+
return _this5.check(mode, null, d, isReload, "");
|
|
56890
56920
|
});
|
|
56891
56921
|
}
|
|
56892
56922
|
}, {
|
|
56893
|
-
key:
|
|
56923
|
+
key: "clearCsvFields",
|
|
56894
56924
|
value: function clearCsvFields(mode) {
|
|
56895
56925
|
return this.props.actions.clearCsvFields(mode);
|
|
56896
56926
|
}
|
|
56897
56927
|
}, {
|
|
56898
|
-
key:
|
|
56928
|
+
key: "createCustomSettings",
|
|
56899
56929
|
value: function createCustomSettings(mode) {
|
|
56900
56930
|
var _props9 = this.props,
|
|
56901
56931
|
wizard = _props9.wizard,
|
|
@@ -56903,23 +56933,26 @@ module.exports =
|
|
|
56903
56933
|
inputs = _props9.inputs,
|
|
56904
56934
|
formValues = _props9.formValues;
|
|
56905
56935
|
|
|
56906
|
-
var config = step[mode +
|
|
56936
|
+
var config = step[mode + "Config"];
|
|
56907
56937
|
var customSettings = null;
|
|
56908
|
-
var POSTS = wizard[mode +
|
|
56909
|
-
return m.method ===
|
|
56938
|
+
var POSTS = wizard[mode + "Metadata"] && wizard[mode + "Metadata"].filter(function (m) {
|
|
56939
|
+
return m.method === "POST" || m.method === "PUT";
|
|
56910
56940
|
});
|
|
56911
56941
|
|
|
56912
|
-
if (wizard[mode +
|
|
56913
|
-
customSettings = _react2.default.createElement(CustomAdapterSettings, {
|
|
56914
|
-
|
|
56915
|
-
|
|
56942
|
+
if (wizard[mode + "Metadata"] && mode === "source" && config.bidirectional && POSTS && POSTS.length > 0) {
|
|
56943
|
+
customSettings = _react2.default.createElement(CustomAdapterSettings, {
|
|
56944
|
+
provider: step[mode + "Provider"],
|
|
56945
|
+
clickDirection: this.clickDirection,
|
|
56946
|
+
inputs: inputs
|
|
56947
|
+
});
|
|
56948
|
+
} else if (config.type === "Salesforce") {
|
|
56916
56949
|
customSettings = _react2.default.createElement(CustomSalesforceSettings, { inputs: inputs, formValues: formValues });
|
|
56917
56950
|
}
|
|
56918
56951
|
|
|
56919
56952
|
return customSettings;
|
|
56920
56953
|
}
|
|
56921
56954
|
}, {
|
|
56922
|
-
key:
|
|
56955
|
+
key: "render",
|
|
56923
56956
|
value: function render() {
|
|
56924
56957
|
var _this6 = this;
|
|
56925
56958
|
|
|
@@ -56935,121 +56968,158 @@ module.exports =
|
|
|
56935
56968
|
accountKey = _props10.accountKey,
|
|
56936
56969
|
change = _props10.change;
|
|
56937
56970
|
|
|
56938
|
-
var modes = [
|
|
56971
|
+
var modes = ["source", "destination"];
|
|
56939
56972
|
var selectedProvider = this.state.selectedProvider;
|
|
56940
56973
|
|
|
56941
|
-
var notAllMetadata = !(wizard[
|
|
56974
|
+
var notAllMetadata = !(wizard["sourceMetadata"] && wizard["sourceMetadata"].length > 0) || !(wizard["destinationMetadata"] && wizard["destinationMetadata"].length > 0);
|
|
56942
56975
|
|
|
56943
56976
|
return _react2.default.createElement(
|
|
56944
|
-
|
|
56977
|
+
"form",
|
|
56945
56978
|
{ onKeyPress: function onKeyPress(e) {
|
|
56946
56979
|
return e.charCode === 13 ? e.preventDefault() : null;
|
|
56947
56980
|
} },
|
|
56948
56981
|
_react2.default.createElement(
|
|
56949
|
-
|
|
56950
|
-
{ style: { fontSize: 20, display:
|
|
56951
|
-
|
|
56982
|
+
"div",
|
|
56983
|
+
{ style: { fontSize: 20, display: "inline-block" } },
|
|
56984
|
+
"Connect to Data Environments"
|
|
56952
56985
|
),
|
|
56953
|
-
_react2.default.createElement(
|
|
56954
|
-
_react2.default.createElement(
|
|
56986
|
+
_react2.default.createElement("br", null),
|
|
56987
|
+
_react2.default.createElement("br", null),
|
|
56955
56988
|
_react2.default.createElement(
|
|
56956
|
-
|
|
56989
|
+
"p",
|
|
56957
56990
|
null,
|
|
56958
|
-
|
|
56991
|
+
"Connect to sources of data and inspect available resources. You can save data environments for later re-use."
|
|
56959
56992
|
),
|
|
56960
|
-
_react2.default.createElement(
|
|
56993
|
+
_react2.default.createElement("br", null),
|
|
56961
56994
|
_react2.default.createElement(
|
|
56962
|
-
|
|
56995
|
+
"div",
|
|
56963
56996
|
{ style: { height: 52 } },
|
|
56964
56997
|
_react2.default.createElement(
|
|
56965
|
-
|
|
56966
|
-
{
|
|
56967
|
-
|
|
56968
|
-
|
|
56969
|
-
|
|
56970
|
-
|
|
56998
|
+
"div",
|
|
56999
|
+
{
|
|
57000
|
+
style: {
|
|
57001
|
+
display: "inline-block",
|
|
57002
|
+
width: 196,
|
|
57003
|
+
verticalAlign: "top"
|
|
57004
|
+
}
|
|
57005
|
+
},
|
|
57006
|
+
_react2.default.createElement(_selectWrapper2.default, {
|
|
57007
|
+
type: "neutral",
|
|
57008
|
+
label: formValues["environment"] || "Existing Environments",
|
|
57009
|
+
minWidth: 260,
|
|
57010
|
+
fieldPropLabel: "name",
|
|
57011
|
+
style: { minWidth: 200, textAlign: "left" },
|
|
56971
57012
|
values: wizard.environments,
|
|
56972
|
-
title:
|
|
57013
|
+
title: "Choose Environment",
|
|
57014
|
+
inputs: inputs,
|
|
57015
|
+
sectionLabelSuffix: "",
|
|
56973
57016
|
onSelect: this.selectEnvironment.bind(this),
|
|
56974
|
-
selectedValues: [formValues[
|
|
57017
|
+
selectedValues: [formValues["environment"] ? { name: formValues["environment"] } : {}],
|
|
56975
57018
|
disabled: wizard.environments && wizard.environments.length > 0 ? false : true
|
|
56976
57019
|
})
|
|
56977
57020
|
)
|
|
56978
57021
|
),
|
|
56979
|
-
_react2.default.createElement(
|
|
57022
|
+
_react2.default.createElement("br", null),
|
|
56980
57023
|
_react2.default.createElement(
|
|
56981
57024
|
_CSSTransitionGroup2.default,
|
|
56982
|
-
{
|
|
56983
|
-
|
|
56984
|
-
|
|
56985
|
-
|
|
56986
|
-
|
|
56987
|
-
|
|
57025
|
+
{
|
|
57026
|
+
transitionName: "env-content",
|
|
57027
|
+
transitionEnterTimeout: 250,
|
|
57028
|
+
transitionLeaveTimeout: 250
|
|
57029
|
+
},
|
|
57030
|
+
formValues["environment"] && _react2.default.createElement(
|
|
57031
|
+
"div",
|
|
57032
|
+
{ className: "env-content" },
|
|
57033
|
+
_react2.default.createElement("br", null),
|
|
56988
57034
|
modes.map(function (m) {
|
|
56989
|
-
var isSelected = step[m +
|
|
56990
|
-
var checking = _this6.state[m +
|
|
56991
|
-
var adapterSecret = wizard.savedCredentials && wizard.savedCredentials[m +
|
|
57035
|
+
var isSelected = step[m + "Provider"] === selectedProvider;
|
|
57036
|
+
var checking = _this6.state[m + "EnvChecking"];
|
|
57037
|
+
var adapterSecret = wizard.savedCredentials && wizard.savedCredentials[m + "AdapterSecret"] && wizard.savedCredentials[m + "AdapterSecret"].credentials;
|
|
56992
57038
|
var customSettings = _this6.createCustomSettings(m);
|
|
56993
57039
|
return _react2.default.createElement(
|
|
56994
|
-
|
|
56995
|
-
{ key: m, className:
|
|
57040
|
+
"div",
|
|
57041
|
+
{ key: m, className: "env-section" },
|
|
56996
57042
|
_react2.default.createElement(
|
|
56997
|
-
|
|
56998
|
-
{
|
|
56999
|
-
|
|
57043
|
+
"div",
|
|
57044
|
+
{
|
|
57045
|
+
onClick: function onClick() {
|
|
57046
|
+
return _this6.selectProvider(step[m + "Provider"]);
|
|
57000
57047
|
},
|
|
57001
|
-
className:
|
|
57002
|
-
|
|
57048
|
+
className: "env-section-header"
|
|
57049
|
+
},
|
|
57050
|
+
_react2.default.createElement(EnvCheckIcons, {
|
|
57051
|
+
wizard: wizard,
|
|
57052
|
+
inputs: inputs,
|
|
57053
|
+
mode: m,
|
|
57054
|
+
checking: checking,
|
|
57055
|
+
isSelected: isSelected
|
|
57056
|
+
}),
|
|
57003
57057
|
_react2.default.createElement(
|
|
57004
|
-
|
|
57005
|
-
{ className:
|
|
57006
|
-
step[m +
|
|
57058
|
+
"div",
|
|
57059
|
+
{ className: "env-section-header-title" },
|
|
57060
|
+
step[m + "Config"].label || step[m + "Provider"]
|
|
57007
57061
|
)
|
|
57008
57062
|
),
|
|
57009
|
-
wizard[m +
|
|
57010
|
-
|
|
57011
|
-
{
|
|
57063
|
+
wizard[m + "Metadata"] && _react2.default.createElement(
|
|
57064
|
+
"div",
|
|
57065
|
+
{
|
|
57066
|
+
className: "env-inspect-button",
|
|
57012
57067
|
onClick: function onClick() {
|
|
57013
57068
|
return _this6.setState({ showResources: m });
|
|
57014
|
-
}
|
|
57069
|
+
}
|
|
57070
|
+
},
|
|
57015
57071
|
_react2.default.createElement(
|
|
57016
|
-
|
|
57072
|
+
"span",
|
|
57017
57073
|
null,
|
|
57018
|
-
|
|
57074
|
+
"View Resources"
|
|
57019
57075
|
),
|
|
57020
57076
|
_react2.default.createElement(
|
|
57021
|
-
|
|
57022
|
-
{
|
|
57023
|
-
|
|
57024
|
-
|
|
57077
|
+
"svg",
|
|
57078
|
+
{
|
|
57079
|
+
className: "env-inspect-eye",
|
|
57080
|
+
height: "24",
|
|
57081
|
+
viewBox: "0 0 24 24",
|
|
57082
|
+
width: "24"
|
|
57083
|
+
},
|
|
57084
|
+
_react2.default.createElement("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
57085
|
+
_react2.default.createElement("path", { d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z" })
|
|
57025
57086
|
)
|
|
57026
57087
|
),
|
|
57027
57088
|
_react2.default.createElement(
|
|
57028
57089
|
_CSSTransitionGroup2.default,
|
|
57029
|
-
{
|
|
57030
|
-
|
|
57090
|
+
{
|
|
57091
|
+
transitionName: "env-creds",
|
|
57092
|
+
transitionEnterTimeout: 250,
|
|
57093
|
+
transitionLeaveTimeout: 250
|
|
57094
|
+
},
|
|
57031
57095
|
isSelected && _react2.default.createElement(
|
|
57032
|
-
|
|
57033
|
-
{ className:
|
|
57034
|
-
wizard[m +
|
|
57035
|
-
|
|
57036
|
-
{ className:
|
|
57037
|
-
wizard[m +
|
|
57096
|
+
"div",
|
|
57097
|
+
{ className: "env-creds" },
|
|
57098
|
+
wizard[m + "CheckError"] && _react2.default.createElement(
|
|
57099
|
+
"div",
|
|
57100
|
+
{ className: "check-metadata-error" },
|
|
57101
|
+
wizard[m + "CheckError"]
|
|
57038
57102
|
),
|
|
57039
57103
|
_react2.default.createElement(
|
|
57040
57104
|
_credSections2.default,
|
|
57041
|
-
{
|
|
57042
|
-
|
|
57043
|
-
|
|
57105
|
+
{
|
|
57106
|
+
config: step[m + "Config"],
|
|
57107
|
+
checking: checking,
|
|
57108
|
+
wizard: wizard,
|
|
57109
|
+
getOauthUrl: _this6.getOauthUrl.bind(_this6),
|
|
57110
|
+
formValues: formValues,
|
|
57111
|
+
inputs: inputs,
|
|
57044
57112
|
generateNewAdapterSecret: function generateNewAdapterSecret() {
|
|
57045
57113
|
return _this6.generateNewAdapterSecret(m);
|
|
57046
57114
|
},
|
|
57047
57115
|
seeFields: _this6.seeFields.bind(_this6),
|
|
57048
|
-
fileSchema: formValues[m +
|
|
57116
|
+
fileSchema: formValues[m + "FileSchema"],
|
|
57049
57117
|
check: function check(actualCreds, extraQuery) {
|
|
57050
57118
|
_this6.check(m, null, actualCreds, null, extraQuery);
|
|
57051
|
-
},
|
|
57052
|
-
|
|
57119
|
+
},
|
|
57120
|
+
change: change,
|
|
57121
|
+
tenantKey: tenantKey,
|
|
57122
|
+
accountKey: accountKey,
|
|
57053
57123
|
setCsvFields: function setCsvFields(meta, contents, providerType) {
|
|
57054
57124
|
return _this6.setCsvFields(meta, contents, m, providerType);
|
|
57055
57125
|
},
|
|
@@ -57057,15 +57127,16 @@ module.exports =
|
|
|
57057
57127
|
clearCsvFields: function clearCsvFields() {
|
|
57058
57128
|
return _this6.clearCsvFields(m);
|
|
57059
57129
|
},
|
|
57060
|
-
creds: formValues[m +
|
|
57061
|
-
envCheckResult: wizard[m +
|
|
57130
|
+
creds: formValues[m + "Credentials"],
|
|
57131
|
+
envCheckResult: wizard[m + "CheckResult"],
|
|
57062
57132
|
adapterSecret: adapterSecret,
|
|
57063
57133
|
deleteFlatFile: function deleteFlatFile(fileName) {
|
|
57064
57134
|
return _this6.deleteFlatFile(fileName, m);
|
|
57065
57135
|
},
|
|
57066
57136
|
checkOauthCreds: function checkOauthCreds(phase) {
|
|
57067
57137
|
return _this6.checkOauthCreds(phase, m);
|
|
57068
|
-
}
|
|
57138
|
+
}
|
|
57139
|
+
},
|
|
57069
57140
|
_react2.default.isValidElement(customSettings) ? _react2.default.cloneElement(customSettings) : null
|
|
57070
57141
|
)
|
|
57071
57142
|
)
|
|
@@ -57078,18 +57149,25 @@ module.exports =
|
|
|
57078
57149
|
onHide: function onHide() {
|
|
57079
57150
|
return _this6.setState({ showResources: null });
|
|
57080
57151
|
},
|
|
57081
|
-
mode: this.state.showResources,
|
|
57082
|
-
|
|
57152
|
+
mode: this.state.showResources,
|
|
57153
|
+
wizard: wizard,
|
|
57154
|
+
step: step,
|
|
57155
|
+
inputs: inputs,
|
|
57083
57156
|
seeFields: this.seeFields.bind(this),
|
|
57084
|
-
isReverse: formValues.direction ===
|
|
57157
|
+
isReverse: formValues.direction === "reverse"
|
|
57085
57158
|
}),
|
|
57086
|
-
_react2.default.createElement(
|
|
57087
|
-
_react2.default.createElement(
|
|
57088
|
-
_react2.default.createElement(_navButtons2.default, {
|
|
57089
|
-
|
|
57090
|
-
|
|
57091
|
-
|
|
57092
|
-
|
|
57159
|
+
_react2.default.createElement("br", null),
|
|
57160
|
+
_react2.default.createElement("br", null),
|
|
57161
|
+
_react2.default.createElement(_navButtons2.default, {
|
|
57162
|
+
nextDisabled: notAllMetadata || !formValues["environmentId"],
|
|
57163
|
+
handleSubmit: handleSubmit,
|
|
57164
|
+
nav: nav,
|
|
57165
|
+
reset: reset,
|
|
57166
|
+
inputs: inputs,
|
|
57167
|
+
isAdmin: this.props.isAdmin
|
|
57168
|
+
}),
|
|
57169
|
+
_react2.default.createElement("br", null),
|
|
57170
|
+
_react2.default.createElement("br", null)
|
|
57093
57171
|
);
|
|
57094
57172
|
}
|
|
57095
57173
|
}]);
|
|
@@ -57107,87 +57185,107 @@ module.exports =
|
|
|
57107
57185
|
isReverse = _ref.isReverse;
|
|
57108
57186
|
|
|
57109
57187
|
var Modal = inputs.Modal;
|
|
57110
|
-
var config = step[mode +
|
|
57111
|
-
var POSTS = wizard[mode +
|
|
57112
|
-
return m.method ===
|
|
57188
|
+
var config = step[mode + "Config"];
|
|
57189
|
+
var POSTS = wizard[mode + "Metadata"] && wizard[mode + "Metadata"].filter(function (m) {
|
|
57190
|
+
return m.method === "POST" || m.method === "PUT";
|
|
57113
57191
|
});
|
|
57114
57192
|
|
|
57115
57193
|
var providerLabel = config.label;
|
|
57116
57194
|
|
|
57117
57195
|
// "testconnection" will be deprecated
|
|
57118
|
-
var isFromAdapter = config && (config.metadataEndpoint ===
|
|
57196
|
+
var isFromAdapter = config && (config.metadataEndpoint === "testconnection" || config.metadataEndpoint === "adaptermetadata");
|
|
57119
57197
|
|
|
57120
57198
|
return _react2.default.createElement(
|
|
57121
57199
|
Modal,
|
|
57122
|
-
{
|
|
57123
|
-
|
|
57200
|
+
{
|
|
57201
|
+
opened: mode ? true : false,
|
|
57202
|
+
hideModal: onHide,
|
|
57203
|
+
submitModal: onHide,
|
|
57204
|
+
title: "Available " + providerLabel + " Resources"
|
|
57205
|
+
},
|
|
57124
57206
|
_react2.default.createElement(
|
|
57125
|
-
|
|
57126
|
-
{
|
|
57127
|
-
|
|
57128
|
-
|
|
57207
|
+
"div",
|
|
57208
|
+
{
|
|
57209
|
+
style: { overflow: "scroll", maxHeight: "69vh", padding: "1em 2em" }
|
|
57210
|
+
},
|
|
57211
|
+
wizard[mode + "Metadata"] && !isReverse ? _react2.default.createElement(
|
|
57212
|
+
"div",
|
|
57129
57213
|
null,
|
|
57130
57214
|
_react2.default.createElement(
|
|
57131
|
-
|
|
57132
|
-
{ className:
|
|
57133
|
-
|
|
57134
|
-
step[mode +
|
|
57135
|
-
|
|
57215
|
+
"span",
|
|
57216
|
+
{ className: "labelz" },
|
|
57217
|
+
"Available ",
|
|
57218
|
+
step[mode + "Provider"],
|
|
57219
|
+
" Data Objects",
|
|
57136
57220
|
isFromAdapter && _react2.default.createElement(
|
|
57137
|
-
|
|
57221
|
+
"span",
|
|
57138
57222
|
null,
|
|
57139
|
-
|
|
57223
|
+
"\xA0(click to preview data):"
|
|
57140
57224
|
)
|
|
57141
57225
|
),
|
|
57142
57226
|
_react2.default.createElement(
|
|
57143
|
-
|
|
57144
|
-
{ style: { listStyle:
|
|
57145
|
-
wizard[mode +
|
|
57146
|
-
return m.method !==
|
|
57227
|
+
"ul",
|
|
57228
|
+
{ style: { listStyle: "none", paddingLeft: 5 } },
|
|
57229
|
+
wizard[mode + "Metadata"].filter(function (m) {
|
|
57230
|
+
return m.method !== "POST";
|
|
57147
57231
|
}).map(function (rsc, i) {
|
|
57148
57232
|
return _react2.default.createElement(
|
|
57149
|
-
|
|
57150
|
-
{
|
|
57233
|
+
"li",
|
|
57234
|
+
{
|
|
57235
|
+
key: i,
|
|
57236
|
+
style: {
|
|
57237
|
+
paddingLeft: rsc.parentRef ? rsc.parentRef.length * 12 + 10 : 10
|
|
57238
|
+
}
|
|
57239
|
+
},
|
|
57151
57240
|
isFromAdapter ? _react2.default.createElement(
|
|
57152
|
-
|
|
57153
|
-
{
|
|
57241
|
+
"a",
|
|
57242
|
+
{
|
|
57243
|
+
onClick: function onClick() {
|
|
57154
57244
|
return seeFields(rsc, mode);
|
|
57155
57245
|
},
|
|
57156
|
-
style: { textDecoration:
|
|
57246
|
+
style: { textDecoration: "none", cursor: "pointer" }
|
|
57247
|
+
},
|
|
57157
57248
|
rsc.name
|
|
57158
57249
|
) : _react2.default.createElement(
|
|
57159
|
-
|
|
57250
|
+
"div",
|
|
57160
57251
|
null,
|
|
57161
57252
|
rsc.name,
|
|
57162
|
-
rsc.sheetName ?
|
|
57253
|
+
rsc.sheetName ? " (" + rsc.sheetName + ")" : ""
|
|
57163
57254
|
)
|
|
57164
57255
|
);
|
|
57165
57256
|
})
|
|
57166
57257
|
)
|
|
57167
57258
|
) : null,
|
|
57168
|
-
wizard[mode +
|
|
57169
|
-
|
|
57259
|
+
wizard[mode + "Metadata"] && mode === "source" && POSTS && POSTS.length > 0 && _react2.default.createElement(
|
|
57260
|
+
"div",
|
|
57170
57261
|
null,
|
|
57171
57262
|
isReverse && _react2.default.createElement(
|
|
57172
|
-
|
|
57263
|
+
"div",
|
|
57173
57264
|
null,
|
|
57174
57265
|
_react2.default.createElement(
|
|
57175
|
-
|
|
57176
|
-
{ className:
|
|
57177
|
-
|
|
57178
|
-
step[mode +
|
|
57179
|
-
|
|
57266
|
+
"span",
|
|
57267
|
+
{ className: "labelz" },
|
|
57268
|
+
"Available ",
|
|
57269
|
+
step[mode + "Provider"],
|
|
57270
|
+
" Data Target Objects:"
|
|
57180
57271
|
),
|
|
57181
57272
|
_react2.default.createElement(
|
|
57182
|
-
|
|
57183
|
-
{ style: { listStyle:
|
|
57273
|
+
"ul",
|
|
57274
|
+
{ style: { listStyle: "none", paddingLeft: 5 } },
|
|
57184
57275
|
POSTS.map(function (rsc, i) {
|
|
57185
57276
|
return _react2.default.createElement(
|
|
57186
|
-
|
|
57187
|
-
{
|
|
57277
|
+
"li",
|
|
57278
|
+
{
|
|
57279
|
+
key: i,
|
|
57280
|
+
style: {
|
|
57281
|
+
paddingLeft: rsc.parentRef ? rsc.parentRef.length * 12 + 10 : 10
|
|
57282
|
+
}
|
|
57283
|
+
},
|
|
57188
57284
|
_react2.default.createElement(
|
|
57189
|
-
|
|
57190
|
-
{
|
|
57285
|
+
"a",
|
|
57286
|
+
{
|
|
57287
|
+
style: { textDecoration: "none", cursor: "default" }
|
|
57288
|
+
},
|
|
57191
57289
|
rsc.name
|
|
57192
57290
|
)
|
|
57193
57291
|
);
|
|
@@ -57206,37 +57304,62 @@ module.exports =
|
|
|
57206
57304
|
checking = _ref2.checking,
|
|
57207
57305
|
isSelected = _ref2.isSelected;
|
|
57208
57306
|
|
|
57209
|
-
var envCheckResult = wizard[mode +
|
|
57307
|
+
var envCheckResult = wizard[mode + "CheckResult"];
|
|
57210
57308
|
return _react2.default.createElement(
|
|
57211
|
-
|
|
57212
|
-
{ className:
|
|
57309
|
+
"div",
|
|
57310
|
+
{ className: "env-section-icon" },
|
|
57213
57311
|
checking && _react2.default.createElement(inputs.Spinner, null),
|
|
57214
57312
|
envCheckResult && !checking ? _react2.default.createElement(
|
|
57215
|
-
|
|
57313
|
+
"span",
|
|
57216
57314
|
null,
|
|
57217
|
-
envCheckResult ===
|
|
57218
|
-
|
|
57219
|
-
{
|
|
57220
|
-
|
|
57221
|
-
|
|
57315
|
+
envCheckResult === "200 OK" ? _react2.default.createElement(
|
|
57316
|
+
"svg",
|
|
57317
|
+
{
|
|
57318
|
+
fill: "#019644",
|
|
57319
|
+
height: "24",
|
|
57320
|
+
viewBox: "0 0 24 24",
|
|
57321
|
+
width: "24",
|
|
57322
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
57323
|
+
},
|
|
57324
|
+
_react2.default.createElement("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
57325
|
+
_react2.default.createElement("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" })
|
|
57222
57326
|
) : _react2.default.createElement(
|
|
57223
|
-
|
|
57224
|
-
{
|
|
57225
|
-
|
|
57226
|
-
|
|
57327
|
+
"svg",
|
|
57328
|
+
{
|
|
57329
|
+
fill: "#EA5A5A",
|
|
57330
|
+
height: "24",
|
|
57331
|
+
viewBox: "0 0 24 24",
|
|
57332
|
+
width: "24",
|
|
57333
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
57334
|
+
},
|
|
57335
|
+
_react2.default.createElement("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
57336
|
+
_react2.default.createElement("path", { d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" })
|
|
57227
57337
|
)
|
|
57228
57338
|
) : _react2.default.createElement(
|
|
57229
|
-
|
|
57339
|
+
"span",
|
|
57230
57340
|
null,
|
|
57231
57341
|
!checking && _react2.default.createElement(
|
|
57232
|
-
|
|
57233
|
-
{
|
|
57234
|
-
|
|
57235
|
-
|
|
57342
|
+
"svg",
|
|
57343
|
+
{
|
|
57344
|
+
x: "0px",
|
|
57345
|
+
y: "0px",
|
|
57346
|
+
viewBox: "0 0 1000 1000",
|
|
57347
|
+
height: "16",
|
|
57348
|
+
width: "16",
|
|
57349
|
+
style: {
|
|
57350
|
+
marginLeft: 4,
|
|
57351
|
+
marginTop: 3,
|
|
57352
|
+
transform: "rotate(" + (isSelected ? -90 : 0) + "deg)",
|
|
57353
|
+
transition: "all 0.1s"
|
|
57354
|
+
}
|
|
57355
|
+
},
|
|
57236
57356
|
_react2.default.createElement(
|
|
57237
|
-
|
|
57238
|
-
{ transform:
|
|
57239
|
-
_react2.default.createElement(
|
|
57357
|
+
"g",
|
|
57358
|
+
{ transform: "matrix(1 0 0 -1 1000 -536) rotate(180)" },
|
|
57359
|
+
_react2.default.createElement("path", {
|
|
57360
|
+
d: "M978.4,833.3L877.5,732.9c-7.7-7.7-16.8-11.5-27.4-11.5c-10.5,0-19.7,3.8-27.4,11.5L500,1055.8L177.2,732.9c-7.7-7.7-16.8-11.5-27.4-11.5s-19.7,3.8-27.4,11.5L21.6,833.3C13.9,841,10,850.2,10,860.9c0,10.7,3.9,20,11.6,27.7l451.1,450.5c7.7,7.7,16.8,11.6,27.4,11.6c10.5,0,19.7-3.9,27.4-11.6l451.1-450.5c7.7-7.7,11.6-16.9,11.6-27.7C990,850.2,986.1,841,978.4,833.3z",
|
|
57361
|
+
fill: "grey"
|
|
57362
|
+
})
|
|
57240
57363
|
)
|
|
57241
57364
|
)
|
|
57242
57365
|
)
|
|
@@ -57258,7 +57381,7 @@ module.exports =
|
|
|
57258
57381
|
}
|
|
57259
57382
|
|
|
57260
57383
|
_createClass(CustomSalesforceSettings, [{
|
|
57261
|
-
key:
|
|
57384
|
+
key: "componentWillMount",
|
|
57262
57385
|
value: function componentWillMount() {
|
|
57263
57386
|
var formValues = this.props.formValues;
|
|
57264
57387
|
|
|
@@ -57267,7 +57390,7 @@ module.exports =
|
|
|
57267
57390
|
}
|
|
57268
57391
|
}
|
|
57269
57392
|
}, {
|
|
57270
|
-
key:
|
|
57393
|
+
key: "render",
|
|
57271
57394
|
value: function render() {
|
|
57272
57395
|
var _this8 = this;
|
|
57273
57396
|
|
|
@@ -57276,36 +57399,43 @@ module.exports =
|
|
|
57276
57399
|
|
|
57277
57400
|
|
|
57278
57401
|
return _react2.default.createElement(
|
|
57279
|
-
|
|
57402
|
+
"div",
|
|
57280
57403
|
{ style: { marginTop: 23 } },
|
|
57281
57404
|
_react2.default.createElement(
|
|
57282
|
-
|
|
57283
|
-
{ className:
|
|
57284
|
-
|
|
57405
|
+
"label",
|
|
57406
|
+
{ className: "labelz", style: { fontWeight: "bold" } },
|
|
57407
|
+
"Bulk Upload Batch Size:"
|
|
57285
57408
|
),
|
|
57286
|
-
_react2.default.createElement(
|
|
57287
|
-
_react2.default.createElement(Radio, {
|
|
57409
|
+
_react2.default.createElement("br", null),
|
|
57410
|
+
_react2.default.createElement(Radio, {
|
|
57411
|
+
onChange: function onChange() {
|
|
57288
57412
|
return _this8.setState({ custom: false });
|
|
57289
57413
|
},
|
|
57290
|
-
label:
|
|
57414
|
+
label: "Default Batch Size (10,000)",
|
|
57291
57415
|
checked: this.state.custom === false,
|
|
57292
|
-
style: { cursor:
|
|
57416
|
+
style: { cursor: "pointer", fontWeight: "normal" }
|
|
57293
57417
|
}),
|
|
57294
|
-
_react2.default.createElement(
|
|
57295
|
-
_react2.default.createElement(Radio, {
|
|
57418
|
+
_react2.default.createElement("br", null),
|
|
57419
|
+
_react2.default.createElement(Radio, {
|
|
57420
|
+
onChange: function onChange() {
|
|
57296
57421
|
return _this8.setState({ custom: true });
|
|
57297
57422
|
},
|
|
57298
|
-
label:
|
|
57423
|
+
label: "Custom Batch Size",
|
|
57299
57424
|
checked: this.state.custom === true,
|
|
57300
|
-
style: { cursor:
|
|
57425
|
+
style: { cursor: "pointer", fontWeight: "normal" }
|
|
57301
57426
|
}),
|
|
57302
57427
|
this.state.custom === true && _react2.default.createElement(
|
|
57303
|
-
|
|
57428
|
+
"div",
|
|
57304
57429
|
null,
|
|
57305
|
-
_react2.default.createElement(
|
|
57306
|
-
_react2.default.createElement(_reduxForm.Field, {
|
|
57430
|
+
_react2.default.createElement("br", null),
|
|
57431
|
+
_react2.default.createElement(_reduxForm.Field, {
|
|
57432
|
+
name: "batchSize",
|
|
57433
|
+
type: "number",
|
|
57434
|
+
component: inputs.rfInput,
|
|
57307
57435
|
style: { width: 300 },
|
|
57308
|
-
label:
|
|
57436
|
+
label: "Set Batch Size:",
|
|
57437
|
+
placeholder: "Number of Records"
|
|
57438
|
+
})
|
|
57309
57439
|
)
|
|
57310
57440
|
);
|
|
57311
57441
|
}
|
|
@@ -57320,22 +57450,24 @@ module.exports =
|
|
|
57320
57450
|
inputs = _ref3.inputs;
|
|
57321
57451
|
|
|
57322
57452
|
return _react2.default.createElement(
|
|
57323
|
-
|
|
57453
|
+
"div",
|
|
57324
57454
|
null,
|
|
57325
|
-
_react2.default.createElement(
|
|
57326
|
-
_react2.default.createElement(_reduxForm.Field, {
|
|
57327
|
-
|
|
57455
|
+
_react2.default.createElement("br", null),
|
|
57456
|
+
_react2.default.createElement(_reduxForm.Field, {
|
|
57457
|
+
name: "direction",
|
|
57458
|
+
component: inputs.rfRadioGroup,
|
|
57459
|
+
label: "Integration Direction",
|
|
57328
57460
|
onClickOption: clickDirection,
|
|
57329
57461
|
options: {
|
|
57330
|
-
|
|
57331
|
-
|
|
57462
|
+
normal: "Read Data from " + provider,
|
|
57463
|
+
reverse: "Write Data to " + provider
|
|
57332
57464
|
}
|
|
57333
57465
|
})
|
|
57334
57466
|
);
|
|
57335
57467
|
};
|
|
57336
57468
|
|
|
57337
57469
|
exports.default = (0, _reduxForm.reduxForm)({
|
|
57338
|
-
form:
|
|
57470
|
+
form: "wizard",
|
|
57339
57471
|
destroyOnUnmount: false,
|
|
57340
57472
|
forceUnregisterOnUnmount: true,
|
|
57341
57473
|
touchOnBlur: false,
|
|
@@ -57346,7 +57478,7 @@ module.exports =
|
|
|
57346
57478
|
/* 180 */
|
|
57347
57479
|
/***/ function(module, exports, __webpack_require__) {
|
|
57348
57480
|
|
|
57349
|
-
|
|
57481
|
+
"use strict";
|
|
57350
57482
|
|
|
57351
57483
|
Object.defineProperty(exports, "__esModule", {
|
|
57352
57484
|
value: true
|
|
@@ -57387,15 +57519,15 @@ module.exports =
|
|
|
57387
57519
|
touched = _ref$meta.touched,
|
|
57388
57520
|
error = _ref$meta.error;
|
|
57389
57521
|
return touched && error ? _react2.default.createElement(
|
|
57390
|
-
|
|
57522
|
+
"div",
|
|
57391
57523
|
null,
|
|
57392
57524
|
_react2.default.createElement(
|
|
57393
|
-
|
|
57525
|
+
"span",
|
|
57394
57526
|
null,
|
|
57395
57527
|
error
|
|
57396
57528
|
),
|
|
57397
|
-
_react2.default.createElement(
|
|
57398
|
-
_react2.default.createElement(
|
|
57529
|
+
_react2.default.createElement("br", null),
|
|
57530
|
+
_react2.default.createElement("br", null)
|
|
57399
57531
|
) : false;
|
|
57400
57532
|
};
|
|
57401
57533
|
|
|
@@ -57413,7 +57545,7 @@ module.exports =
|
|
|
57413
57545
|
}
|
|
57414
57546
|
|
|
57415
57547
|
_createClass(EnvironmentStep, [{
|
|
57416
|
-
key:
|
|
57548
|
+
key: "seeFields",
|
|
57417
57549
|
value: function seeFields(target) {
|
|
57418
57550
|
var _props = this.props,
|
|
57419
57551
|
tenantId = _props.tenantId,
|
|
@@ -57422,16 +57554,16 @@ module.exports =
|
|
|
57422
57554
|
step = _props.step,
|
|
57423
57555
|
configUrls = _props.configUrls;
|
|
57424
57556
|
|
|
57425
|
-
var endpoint = formValues[step.mode +
|
|
57557
|
+
var endpoint = formValues[step.mode + "Endpoint"];
|
|
57426
57558
|
var x = window.open();
|
|
57427
|
-
x.document.open(
|
|
57559
|
+
x.document.open("", "_blank");
|
|
57428
57560
|
x.document.write((0, _previewTabContent.makeContent)(configUrls.TRANS_API_URL, tenantId, accountId, endpoint, target.endpointSuffix, target.name, step.previewToken));
|
|
57429
|
-
x.document.title =
|
|
57561
|
+
x.document.title = "Preview Data (" + target.name + ")";
|
|
57430
57562
|
x.document.close();
|
|
57431
57563
|
x.focus();
|
|
57432
57564
|
}
|
|
57433
57565
|
}, {
|
|
57434
|
-
key:
|
|
57566
|
+
key: "componentWillMount",
|
|
57435
57567
|
value: function componentWillMount() {
|
|
57436
57568
|
var _props2 = this.props,
|
|
57437
57569
|
step = _props2.step,
|
|
@@ -57445,7 +57577,7 @@ module.exports =
|
|
|
57445
57577
|
}
|
|
57446
57578
|
}
|
|
57447
57579
|
}, {
|
|
57448
|
-
key:
|
|
57580
|
+
key: "check",
|
|
57449
57581
|
value: function check() {
|
|
57450
57582
|
var _props3 = this.props,
|
|
57451
57583
|
actions = _props3.actions,
|
|
@@ -57455,44 +57587,43 @@ module.exports =
|
|
|
57455
57587
|
step = _props3.step,
|
|
57456
57588
|
change = _props3.change;
|
|
57457
57589
|
|
|
57458
|
-
var endpoint = formValues[step.mode +
|
|
57459
|
-
var credentials = formValues[step.mode +
|
|
57590
|
+
var endpoint = formValues[step.mode + "Endpoint"];
|
|
57591
|
+
var credentials = formValues[step.mode + "Credentials"];
|
|
57460
57592
|
//remove trailing slash if exists
|
|
57461
|
-
if (endpoint && endpoint[endpoint.length - 1] ===
|
|
57593
|
+
if (endpoint && endpoint[endpoint.length - 1] === "/" && endpoint.length > 8) {
|
|
57462
57594
|
endpoint = endpoint.slice(0, -1);
|
|
57463
|
-
change(step.mode +
|
|
57595
|
+
change(step.mode + "Endpoint", endpoint);
|
|
57464
57596
|
}
|
|
57465
|
-
|
|
57466
57597
|
if (credentials) {
|
|
57467
|
-
actions.postCredentials(tenantId, accountId, step[step.mode +
|
|
57468
|
-
actions.callGetMetadata(tenantId, accountId, step.mode, step[step.mode +
|
|
57598
|
+
actions.postCredentials(tenantId, accountId, step[step.mode + "Provider"], endpoint, credentials, step.mode).then(function () {
|
|
57599
|
+
actions.callGetMetadata(tenantId, accountId, step.mode, step[step.mode + "Provider"], step.metadataEndpoint, step.metadataApi, endpoint || "_blank", step.credentials, step.isFramework, credentials);
|
|
57469
57600
|
});
|
|
57470
57601
|
} else {
|
|
57471
|
-
actions.callGetMetadata(tenantId, accountId, step.mode, step[step.mode +
|
|
57602
|
+
actions.callGetMetadata(tenantId, accountId, step.mode, step[step.mode + "Provider"], step.metadataEndpoint, step.metadataApi, endpoint || "_blank", step.credentials, step.isFramework);
|
|
57472
57603
|
}
|
|
57473
57604
|
}
|
|
57474
57605
|
}, {
|
|
57475
|
-
key:
|
|
57606
|
+
key: "startOauth",
|
|
57476
57607
|
value: function startOauth() {
|
|
57477
57608
|
var width = 600;
|
|
57478
57609
|
var height = 600;
|
|
57479
57610
|
var left = window.screenX + (window.outerWidth - width) / 2;
|
|
57480
57611
|
var top = window.screenY + (window.outerHeight - height) / 2.5;
|
|
57481
|
-
var popup = window.open(this.props.wizard.oauthUrl,
|
|
57612
|
+
var popup = window.open(this.props.wizard.oauthUrl, "Oauth", "width=" + width + ",height=" + height + ",top=" + top + ",left=" + left);
|
|
57482
57613
|
popup.focus();
|
|
57483
57614
|
}
|
|
57484
57615
|
|
|
57485
57616
|
// turns camel-case cred names into human-readable
|
|
57486
57617
|
|
|
57487
57618
|
}, {
|
|
57488
|
-
key:
|
|
57619
|
+
key: "unCamelize",
|
|
57489
57620
|
value: function unCamelize(text) {
|
|
57490
|
-
return text.replace(/([A-Z])/g,
|
|
57621
|
+
return text.replace(/([A-Z])/g, " $1").replace(/^./, function (str) {
|
|
57491
57622
|
return str.toUpperCase();
|
|
57492
57623
|
});
|
|
57493
57624
|
}
|
|
57494
57625
|
}, {
|
|
57495
|
-
key:
|
|
57626
|
+
key: "render",
|
|
57496
57627
|
value: function render() {
|
|
57497
57628
|
var _this2 = this;
|
|
57498
57629
|
|
|
@@ -57512,113 +57643,127 @@ module.exports =
|
|
|
57512
57643
|
var Button = inputs.Button;
|
|
57513
57644
|
var Spinner = inputs.Spinner;
|
|
57514
57645
|
|
|
57515
|
-
var envCheckResult = wizard[step.mode +
|
|
57646
|
+
var envCheckResult = wizard[step.mode + "CheckResult"];
|
|
57516
57647
|
|
|
57517
|
-
var POSTS = wizard[step.mode +
|
|
57518
|
-
return m.method ===
|
|
57648
|
+
var POSTS = wizard[step.mode + "Metadata"] && wizard[step.mode + "Metadata"].filter(function (m) {
|
|
57649
|
+
return m.method === "POST" || m.method === "PUT";
|
|
57519
57650
|
});
|
|
57520
57651
|
|
|
57521
|
-
var hasEndpoint = formValues[step.mode +
|
|
57652
|
+
var hasEndpoint = formValues[step.mode + "Endpoint"] && formValues[step.mode + "Endpoint"].length > 8;
|
|
57522
57653
|
|
|
57523
|
-
var isOauth = step.credentials && step.credentials.length === 1 && step.credentials[0] ===
|
|
57654
|
+
var isOauth = step.credentials && step.credentials.length === 1 && step.credentials[0] === "Oauth";
|
|
57524
57655
|
|
|
57525
57656
|
return _react2.default.createElement(
|
|
57526
|
-
|
|
57657
|
+
"form",
|
|
57527
57658
|
{ onKeyPress: function onKeyPress(e) {
|
|
57528
57659
|
return e.charCode === 13 ? e.preventDefault() : null;
|
|
57529
57660
|
} },
|
|
57530
57661
|
_react2.default.createElement(
|
|
57531
|
-
|
|
57532
|
-
{ style: { fontSize: 20, display:
|
|
57533
|
-
|
|
57534
|
-
step[step.mode +
|
|
57535
|
-
|
|
57662
|
+
"div",
|
|
57663
|
+
{ style: { fontSize: 20, display: "inline-block" } },
|
|
57664
|
+
"Define ",
|
|
57665
|
+
step[step.mode + "Provider"],
|
|
57666
|
+
" Environment"
|
|
57536
57667
|
),
|
|
57537
|
-
_react2.default.createElement(
|
|
57538
|
-
_react2.default.createElement(
|
|
57668
|
+
_react2.default.createElement("br", null),
|
|
57669
|
+
_react2.default.createElement("br", null),
|
|
57539
57670
|
step.message && _react2.default.createElement(
|
|
57540
|
-
|
|
57671
|
+
"p",
|
|
57541
57672
|
null,
|
|
57542
57673
|
step.message
|
|
57543
57674
|
),
|
|
57544
|
-
_react2.default.createElement(
|
|
57675
|
+
_react2.default.createElement("br", null),
|
|
57545
57676
|
isOauth ? _react2.default.createElement(
|
|
57546
|
-
|
|
57677
|
+
"div",
|
|
57547
57678
|
null,
|
|
57548
57679
|
_react2.default.createElement(
|
|
57549
|
-
|
|
57680
|
+
"div",
|
|
57550
57681
|
null,
|
|
57551
|
-
|
|
57682
|
+
"Are you connecting to a Sandbox or Production Org?"
|
|
57552
57683
|
),
|
|
57553
57684
|
_react2.default.createElement(
|
|
57554
|
-
|
|
57685
|
+
"div",
|
|
57555
57686
|
{ style: { marginTop: 12 } },
|
|
57556
57687
|
_react2.default.createElement(
|
|
57557
57688
|
Button,
|
|
57558
|
-
{
|
|
57689
|
+
{
|
|
57690
|
+
type: "brand",
|
|
57559
57691
|
onClick: function onClick() {
|
|
57560
|
-
return actions.getOauthUrl(tenantId, accountId, step.typeGuid,
|
|
57561
|
-
}
|
|
57562
|
-
|
|
57692
|
+
return actions.getOauthUrl(tenantId, accountId, step.typeGuid, "sandbox", step.mode);
|
|
57693
|
+
}
|
|
57694
|
+
},
|
|
57695
|
+
"Sandbox"
|
|
57563
57696
|
),
|
|
57564
57697
|
_react2.default.createElement(
|
|
57565
57698
|
Button,
|
|
57566
|
-
{
|
|
57699
|
+
{
|
|
57700
|
+
type: "brand",
|
|
57701
|
+
style: { margin: "0 12px" },
|
|
57567
57702
|
onClick: function onClick() {
|
|
57568
|
-
return actions.getOauthUrl(tenantId, accountId, step.typeGuid,
|
|
57569
|
-
}
|
|
57570
|
-
|
|
57703
|
+
return actions.getOauthUrl(tenantId, accountId, step.typeGuid, "production", step.mode);
|
|
57704
|
+
}
|
|
57705
|
+
},
|
|
57706
|
+
"Production"
|
|
57571
57707
|
),
|
|
57572
57708
|
wizard.gettingOauthUrl && _react2.default.createElement(Spinner, null),
|
|
57573
57709
|
(wizard.oauthUrl || true) && _react2.default.createElement(
|
|
57574
|
-
|
|
57710
|
+
"div",
|
|
57575
57711
|
null,
|
|
57576
|
-
_react2.default.createElement(
|
|
57712
|
+
_react2.default.createElement("br", null),
|
|
57577
57713
|
_react2.default.createElement(
|
|
57578
|
-
|
|
57714
|
+
"div",
|
|
57579
57715
|
null,
|
|
57580
57716
|
_react2.default.createElement(
|
|
57581
|
-
|
|
57717
|
+
"strong",
|
|
57582
57718
|
null,
|
|
57583
57719
|
_react2.default.createElement(
|
|
57584
|
-
|
|
57720
|
+
"a",
|
|
57585
57721
|
{ onClick: this.startOauth },
|
|
57586
|
-
|
|
57722
|
+
"Click Here"
|
|
57587
57723
|
)
|
|
57588
57724
|
),
|
|
57589
|
-
|
|
57590
|
-
|
|
57591
|
-
|
|
57725
|
+
" ",
|
|
57726
|
+
"to authorize your ",
|
|
57727
|
+
step[step.mode + "Provider"],
|
|
57728
|
+
" Org."
|
|
57592
57729
|
),
|
|
57593
|
-
_react2.default.createElement(
|
|
57594
|
-
_react2.default.createElement(
|
|
57730
|
+
_react2.default.createElement("br", null),
|
|
57731
|
+
_react2.default.createElement("br", null),
|
|
57595
57732
|
_react2.default.createElement(
|
|
57596
|
-
|
|
57733
|
+
"div",
|
|
57597
57734
|
null,
|
|
57598
57735
|
_react2.default.createElement(
|
|
57599
|
-
|
|
57736
|
+
"span",
|
|
57600
57737
|
null,
|
|
57601
|
-
|
|
57602
|
-
|
|
57603
|
-
|
|
57738
|
+
"After you have completed the",
|
|
57739
|
+
" ",
|
|
57740
|
+
step[step.mode + "Provider"],
|
|
57741
|
+
" authorization process:",
|
|
57742
|
+
" "
|
|
57604
57743
|
),
|
|
57605
57744
|
_react2.default.createElement(
|
|
57606
57745
|
Button,
|
|
57607
57746
|
{
|
|
57608
|
-
icon:
|
|
57609
|
-
iconAlign:
|
|
57747
|
+
icon: "sync",
|
|
57748
|
+
iconAlign: "left",
|
|
57610
57749
|
onClick: function onClick() {
|
|
57611
57750
|
return _this2.check();
|
|
57612
57751
|
},
|
|
57613
|
-
style: {
|
|
57614
|
-
|
|
57752
|
+
style: {
|
|
57753
|
+
marginLeft: 8,
|
|
57754
|
+
marginBottom: 2,
|
|
57755
|
+
height: 30,
|
|
57756
|
+
lineHeight: "10px"
|
|
57757
|
+
}
|
|
57758
|
+
},
|
|
57759
|
+
"Test Connection"
|
|
57615
57760
|
),
|
|
57616
57761
|
_react2.default.createElement(
|
|
57617
|
-
|
|
57618
|
-
{ style: { display:
|
|
57762
|
+
"div",
|
|
57763
|
+
{ style: { display: "inline-block", marginLeft: 12 } },
|
|
57619
57764
|
wizard.envChecking && _react2.default.createElement(Spinner, null),
|
|
57620
57765
|
envCheckResult && _react2.default.createElement(
|
|
57621
|
-
|
|
57766
|
+
"span",
|
|
57622
57767
|
null,
|
|
57623
57768
|
envCheckResult
|
|
57624
57769
|
)
|
|
@@ -57627,37 +57772,48 @@ module.exports =
|
|
|
57627
57772
|
)
|
|
57628
57773
|
)
|
|
57629
57774
|
) : _react2.default.createElement(
|
|
57630
|
-
|
|
57775
|
+
"div",
|
|
57631
57776
|
null,
|
|
57632
57777
|
_react2.default.createElement(
|
|
57633
|
-
|
|
57778
|
+
"div",
|
|
57634
57779
|
{ style: { marginLeft: 16 } },
|
|
57635
57780
|
_react2.default.createElement(
|
|
57636
|
-
|
|
57781
|
+
"div",
|
|
57637
57782
|
null,
|
|
57638
57783
|
_react2.default.createElement(
|
|
57639
|
-
|
|
57640
|
-
{ style: { display:
|
|
57641
|
-
_react2.default.createElement(_reduxForm.Field, {
|
|
57784
|
+
"div",
|
|
57785
|
+
{ style: { display: "inline-block", width: 300 } },
|
|
57786
|
+
_react2.default.createElement(_reduxForm.Field, {
|
|
57787
|
+
name: step.mode + "Endpoint",
|
|
57788
|
+
type: "text",
|
|
57789
|
+
component: inputs.rfInput,
|
|
57790
|
+
label: "Data Source Endpoint"
|
|
57791
|
+
})
|
|
57642
57792
|
),
|
|
57643
57793
|
!step.credentials ? _react2.default.createElement(
|
|
57644
57794
|
Button,
|
|
57645
57795
|
{
|
|
57646
|
-
icon:
|
|
57647
|
-
iconAlign:
|
|
57796
|
+
icon: "sync",
|
|
57797
|
+
iconAlign: "left",
|
|
57648
57798
|
onClick: function onClick() {
|
|
57649
57799
|
return _this2.check();
|
|
57650
57800
|
},
|
|
57651
|
-
style: {
|
|
57652
|
-
|
|
57653
|
-
|
|
57801
|
+
style: {
|
|
57802
|
+
marginLeft: 8,
|
|
57803
|
+
marginBottom: 2,
|
|
57804
|
+
height: 30,
|
|
57805
|
+
lineHeight: "10px"
|
|
57806
|
+
},
|
|
57807
|
+
disabled: !hasEndpoint
|
|
57808
|
+
},
|
|
57809
|
+
"Test Connection"
|
|
57654
57810
|
) : null,
|
|
57655
57811
|
_react2.default.createElement(
|
|
57656
|
-
|
|
57657
|
-
{ style: { display:
|
|
57812
|
+
"div",
|
|
57813
|
+
{ style: { display: "inline-block", marginLeft: 12 } },
|
|
57658
57814
|
wizard.envChecking && _react2.default.createElement(Spinner, null),
|
|
57659
57815
|
envCheckResult && _react2.default.createElement(
|
|
57660
|
-
|
|
57816
|
+
"span",
|
|
57661
57817
|
null,
|
|
57662
57818
|
envCheckResult
|
|
57663
57819
|
)
|
|
@@ -57665,99 +57821,118 @@ module.exports =
|
|
|
57665
57821
|
)
|
|
57666
57822
|
),
|
|
57667
57823
|
step.credentials && _react2.default.createElement(
|
|
57668
|
-
|
|
57824
|
+
"div",
|
|
57669
57825
|
{ style: { marginLeft: 16 } },
|
|
57670
|
-
_react2.default.createElement(
|
|
57826
|
+
_react2.default.createElement("br", null),
|
|
57671
57827
|
_react2.default.createElement(
|
|
57672
|
-
|
|
57828
|
+
"label",
|
|
57673
57829
|
null,
|
|
57674
|
-
step[step.mode +
|
|
57675
|
-
|
|
57830
|
+
step[step.mode + "Provider"],
|
|
57831
|
+
" Credentials"
|
|
57676
57832
|
),
|
|
57677
|
-
_react2.default.createElement(
|
|
57833
|
+
_react2.default.createElement("br", null),
|
|
57678
57834
|
_react2.default.createElement(
|
|
57679
|
-
|
|
57680
|
-
{ style: { display:
|
|
57835
|
+
"div",
|
|
57836
|
+
{ style: { display: "inline-block", marginLeft: 16 } },
|
|
57681
57837
|
step.credentials.map(function (cred, index) {
|
|
57682
57838
|
return _react2.default.createElement(
|
|
57683
|
-
|
|
57839
|
+
"div",
|
|
57684
57840
|
{ key: index, style: { marginTop: 8 } },
|
|
57685
|
-
_react2.default.createElement(_reduxForm.Field, {
|
|
57686
|
-
|
|
57687
|
-
|
|
57841
|
+
_react2.default.createElement(_reduxForm.Field, {
|
|
57842
|
+
name: step.mode + "Credentials." + cred,
|
|
57843
|
+
label: step[step.mode + "Provider"] + " " + _this2.unCamelize(cred),
|
|
57844
|
+
type: "text",
|
|
57845
|
+
component: inputs.rfInput
|
|
57846
|
+
})
|
|
57688
57847
|
);
|
|
57689
57848
|
})
|
|
57690
57849
|
),
|
|
57691
57850
|
_react2.default.createElement(
|
|
57692
57851
|
Button,
|
|
57693
57852
|
{
|
|
57694
|
-
icon:
|
|
57695
|
-
iconAlign:
|
|
57853
|
+
icon: "sync",
|
|
57854
|
+
iconAlign: "left",
|
|
57696
57855
|
onClick: function onClick() {
|
|
57697
57856
|
return _this2.check();
|
|
57698
57857
|
},
|
|
57699
|
-
type:
|
|
57700
|
-
style: {
|
|
57858
|
+
type: "neutral",
|
|
57859
|
+
style: {
|
|
57860
|
+
marginLeft: 8,
|
|
57861
|
+
marginBottom: 2,
|
|
57862
|
+
height: 30,
|
|
57863
|
+
lineHeight: "10px"
|
|
57864
|
+
},
|
|
57701
57865
|
disabled: step.credentials.some(function (c) {
|
|
57702
|
-
var formCreds = formValues[step.mode +
|
|
57703
|
-
return !(formCreds && Object.keys(formCreds).includes(c.split(
|
|
57704
|
-
}) || !hasEndpoint
|
|
57705
|
-
|
|
57866
|
+
var formCreds = formValues[step.mode + "Credentials"];
|
|
57867
|
+
return !(formCreds && Object.keys(formCreds).includes(c.split(" ").join("")));
|
|
57868
|
+
}) || !hasEndpoint
|
|
57869
|
+
},
|
|
57870
|
+
"Test Connection"
|
|
57706
57871
|
)
|
|
57707
57872
|
)
|
|
57708
57873
|
),
|
|
57709
|
-
wizard[step.mode +
|
|
57710
|
-
|
|
57874
|
+
wizard[step.mode + "Metadata"] && step.mode === "source" && step.bidirectional && POSTS && POSTS.length > 0 && _react2.default.createElement(
|
|
57875
|
+
"div",
|
|
57711
57876
|
null,
|
|
57712
|
-
_react2.default.createElement(
|
|
57713
|
-
_react2.default.createElement(_reduxForm.Field, {
|
|
57714
|
-
|
|
57877
|
+
_react2.default.createElement("br", null),
|
|
57878
|
+
_react2.default.createElement(_reduxForm.Field, {
|
|
57879
|
+
name: "direction",
|
|
57880
|
+
component: inputs.rfRadioGroup,
|
|
57881
|
+
label: "Integration Direction",
|
|
57715
57882
|
onClickOption: function onClickOption(v) {
|
|
57716
|
-
change(
|
|
57717
|
-
change(
|
|
57883
|
+
change("resourceGroups", []);
|
|
57884
|
+
change("scenario", null);
|
|
57718
57885
|
if (_this2.props.nav.limitBackToCurrentPage) {
|
|
57719
57886
|
_this2.props.nav.limitBackToCurrentPage();
|
|
57720
57887
|
}
|
|
57721
57888
|
},
|
|
57722
57889
|
options: {
|
|
57723
|
-
|
|
57724
|
-
|
|
57890
|
+
normal: "Read Data from " + step[step.mode + "Provider"],
|
|
57891
|
+
reverse: "Write Data to " + step[step.mode + "Provider"]
|
|
57725
57892
|
}
|
|
57726
57893
|
})
|
|
57727
57894
|
),
|
|
57728
|
-
wizard[step.mode +
|
|
57729
|
-
|
|
57895
|
+
wizard[step.mode + "Metadata"] && formValues.direction === "normal" ? _react2.default.createElement(
|
|
57896
|
+
"div",
|
|
57730
57897
|
null,
|
|
57731
|
-
_react2.default.createElement(
|
|
57898
|
+
_react2.default.createElement("br", null),
|
|
57732
57899
|
_react2.default.createElement(
|
|
57733
|
-
|
|
57734
|
-
{ className:
|
|
57735
|
-
|
|
57736
|
-
step[step.mode +
|
|
57737
|
-
|
|
57738
|
-
step.metadataEndpoint ===
|
|
57739
|
-
|
|
57900
|
+
"span",
|
|
57901
|
+
{ className: "labelz" },
|
|
57902
|
+
"Available ",
|
|
57903
|
+
step[step.mode + "Provider"],
|
|
57904
|
+
" Data Objects",
|
|
57905
|
+
step.metadataEndpoint === "testconnection" && _react2.default.createElement(
|
|
57906
|
+
"span",
|
|
57740
57907
|
null,
|
|
57741
|
-
|
|
57908
|
+
"\xA0(click to preview data):"
|
|
57742
57909
|
)
|
|
57743
57910
|
),
|
|
57744
57911
|
_react2.default.createElement(
|
|
57745
|
-
|
|
57746
|
-
{ style: { listStyle:
|
|
57747
|
-
wizard[step.mode +
|
|
57748
|
-
return m.method !==
|
|
57912
|
+
"ul",
|
|
57913
|
+
{ style: { listStyle: "none", paddingLeft: 5 } },
|
|
57914
|
+
wizard[step.mode + "Metadata"].filter(function (m) {
|
|
57915
|
+
return m.method !== "POST";
|
|
57749
57916
|
}).map(function (rsc, i) {
|
|
57750
57917
|
return _react2.default.createElement(
|
|
57751
|
-
|
|
57752
|
-
{
|
|
57753
|
-
|
|
57754
|
-
|
|
57755
|
-
|
|
57918
|
+
"li",
|
|
57919
|
+
{
|
|
57920
|
+
key: i,
|
|
57921
|
+
style: {
|
|
57922
|
+
paddingLeft: rsc.parentRef ? rsc.parentRef.length * 12 + 10 : 10
|
|
57923
|
+
}
|
|
57924
|
+
},
|
|
57925
|
+
step.metadataEndpoint === "testconnection" ? _react2.default.createElement(
|
|
57926
|
+
"a",
|
|
57927
|
+
{
|
|
57928
|
+
onClick: function onClick() {
|
|
57756
57929
|
return _this2.seeFields(rsc);
|
|
57757
|
-
},
|
|
57930
|
+
},
|
|
57931
|
+
style: { textDecoration: "none", cursor: "pointer" }
|
|
57932
|
+
},
|
|
57758
57933
|
rsc.name
|
|
57759
57934
|
) : _react2.default.createElement(
|
|
57760
|
-
|
|
57935
|
+
"div",
|
|
57761
57936
|
null,
|
|
57762
57937
|
rsc.name
|
|
57763
57938
|
)
|
|
@@ -57765,30 +57940,37 @@ module.exports =
|
|
|
57765
57940
|
})
|
|
57766
57941
|
)
|
|
57767
57942
|
) : null,
|
|
57768
|
-
_react2.default.createElement(
|
|
57769
|
-
wizard[step.mode +
|
|
57770
|
-
|
|
57943
|
+
_react2.default.createElement("br", null),
|
|
57944
|
+
wizard[step.mode + "Metadata"] && step.mode === "source" && POSTS && POSTS.length > 0 && _react2.default.createElement(
|
|
57945
|
+
"div",
|
|
57771
57946
|
null,
|
|
57772
|
-
formValues.direction ===
|
|
57773
|
-
|
|
57947
|
+
formValues.direction === "reverse" && _react2.default.createElement(
|
|
57948
|
+
"div",
|
|
57774
57949
|
null,
|
|
57775
57950
|
_react2.default.createElement(
|
|
57776
|
-
|
|
57777
|
-
{ className:
|
|
57778
|
-
|
|
57779
|
-
step[step.mode +
|
|
57780
|
-
|
|
57951
|
+
"span",
|
|
57952
|
+
{ className: "labelz" },
|
|
57953
|
+
"Available ",
|
|
57954
|
+
step[step.mode + "Provider"],
|
|
57955
|
+
" Data Target Objects:"
|
|
57781
57956
|
),
|
|
57782
57957
|
_react2.default.createElement(
|
|
57783
|
-
|
|
57784
|
-
{ style: { listStyle:
|
|
57958
|
+
"ul",
|
|
57959
|
+
{ style: { listStyle: "none", paddingLeft: 5 } },
|
|
57785
57960
|
POSTS.map(function (rsc, i) {
|
|
57786
57961
|
return _react2.default.createElement(
|
|
57787
|
-
|
|
57788
|
-
{
|
|
57962
|
+
"li",
|
|
57963
|
+
{
|
|
57964
|
+
key: i,
|
|
57965
|
+
style: {
|
|
57966
|
+
paddingLeft: rsc.parentRef ? rsc.parentRef.length * 12 + 10 : 10
|
|
57967
|
+
}
|
|
57968
|
+
},
|
|
57789
57969
|
_react2.default.createElement(
|
|
57790
|
-
|
|
57791
|
-
{
|
|
57970
|
+
"a",
|
|
57971
|
+
{
|
|
57972
|
+
style: { textDecoration: "none", cursor: "default" }
|
|
57973
|
+
},
|
|
57792
57974
|
rsc.name
|
|
57793
57975
|
)
|
|
57794
57976
|
);
|
|
@@ -57796,11 +57978,18 @@ module.exports =
|
|
|
57796
57978
|
)
|
|
57797
57979
|
)
|
|
57798
57980
|
),
|
|
57799
|
-
_react2.default.createElement(
|
|
57800
|
-
_react2.default.createElement(_reduxForm.Field, { name: step.mode +
|
|
57801
|
-
_react2.default.createElement(_navButtons2.default, {
|
|
57802
|
-
|
|
57803
|
-
|
|
57981
|
+
_react2.default.createElement("br", null),
|
|
57982
|
+
_react2.default.createElement(_reduxForm.Field, { name: step.mode + "Environment", component: renderError }),
|
|
57983
|
+
_react2.default.createElement(_navButtons2.default, {
|
|
57984
|
+
nextDisabled: !wizard[step.mode + "Metadata"],
|
|
57985
|
+
handleSubmit: handleSubmit,
|
|
57986
|
+
nav: nav,
|
|
57987
|
+
reset: reset,
|
|
57988
|
+
inputs: inputs,
|
|
57989
|
+
isAdmin: this.props.isAdmin
|
|
57990
|
+
}),
|
|
57991
|
+
_react2.default.createElement("br", null),
|
|
57992
|
+
_react2.default.createElement("br", null)
|
|
57804
57993
|
);
|
|
57805
57994
|
}
|
|
57806
57995
|
}]);
|
|
@@ -57809,7 +57998,7 @@ module.exports =
|
|
|
57809
57998
|
}(_react.Component);
|
|
57810
57999
|
|
|
57811
58000
|
exports.default = (0, _reduxForm.reduxForm)({
|
|
57812
|
-
form:
|
|
58001
|
+
form: "wizard",
|
|
57813
58002
|
destroyOnUnmount: false,
|
|
57814
58003
|
forceUnregisterOnUnmount: true,
|
|
57815
58004
|
touchOnBlur: false,
|