@lingk/sync 1.0.1 → 1.0.3
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 +135 -51
- 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 +347 -168
- package/build/main.js.map +1 -1
- package/build/metadataFunctions.js +4 -4
- package/build/metadataFunctions.js.map +1 -1
- package/build/reducer.js +4 -4
- package/build/reducer.js.map +1 -1
- package/build/saveData.js.map +1 -1
- package/package.json +1 -1
package/build/main.js
CHANGED
|
@@ -1908,6 +1908,8 @@ module.exports =
|
|
|
1908
1908
|
value: true
|
|
1909
1909
|
});
|
|
1910
1910
|
|
|
1911
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
1912
|
+
|
|
1911
1913
|
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
1912
1914
|
|
|
1913
1915
|
var _react = __webpack_require__(1);
|
|
@@ -1940,6 +1942,13 @@ module.exports =
|
|
|
1940
1942
|
|
|
1941
1943
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
1942
1944
|
|
|
1945
|
+
function formatBytes(a, b) {
|
|
1946
|
+
if (0 === a) return "0 Bytes";var c = 1024,
|
|
1947
|
+
d = b || 2,
|
|
1948
|
+
e = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
|
|
1949
|
+
f = Math.floor(Math.log(a) / Math.log(c));return parseFloat((a / Math.pow(c, f)).toFixed(d)) + " " + e[f];
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1943
1952
|
// SKIP ON SERVER-SIDE RENDERING
|
|
1944
1953
|
var codemirror = null;
|
|
1945
1954
|
if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
|
|
@@ -2011,6 +2020,7 @@ module.exports =
|
|
|
2011
2020
|
wizard = _props.wizard,
|
|
2012
2021
|
adapterSecret = _props.adapterSecret,
|
|
2013
2022
|
checkOauthCreds = _props.checkOauthCreds,
|
|
2023
|
+
metadata = _props.metadata,
|
|
2014
2024
|
getOauthUrl = _props.getOauthUrl,
|
|
2015
2025
|
generateNewAdapterSecret = _props.generateNewAdapterSecret,
|
|
2016
2026
|
setCsvFields = _props.setCsvFields,
|
|
@@ -2035,7 +2045,7 @@ module.exports =
|
|
|
2035
2045
|
|
|
2036
2046
|
var isOauth = config.credentials && config.credentials.length === 1 && config.credentials[0] === 'Oauth';
|
|
2037
2047
|
|
|
2038
|
-
var
|
|
2048
|
+
var isFlatFile = config.credentials && config.credentials.length === 1 && config.credentials[0] === 'FlatFile';
|
|
2039
2049
|
|
|
2040
2050
|
var isGoogle = config.type.startsWith('Google');
|
|
2041
2051
|
|
|
@@ -2057,9 +2067,10 @@ module.exports =
|
|
|
2057
2067
|
return getOauthUrl(urlType, providerType);
|
|
2058
2068
|
},
|
|
2059
2069
|
checkOauthCreds: checkOauthCreds, envCheckResult: envCheckResult,
|
|
2060
|
-
checking: checking, inputs: inputs }) :
|
|
2070
|
+
checking: checking, inputs: inputs }) : isFlatFile ? _react2.default.createElement(FlatFile, { wizard: wizard, onCheck: check, metadata: metadata,
|
|
2061
2071
|
checking: checking, setCsvFields: setCsvFields,
|
|
2062
|
-
providerType: providerType
|
|
2072
|
+
providerType: providerType, inputs: inputs,
|
|
2073
|
+
accountKey: accountKey, tenantKey: tenantKey }) : isGoogle ? _react2.default.createElement(Google, { config: config, creds: creds, onChange: this.onChange,
|
|
2063
2074
|
credsDisabledCheck: credsDisabledCheck, inputs: inputs,
|
|
2064
2075
|
onCheck: check }) : _react2.default.createElement(
|
|
2065
2076
|
'div',
|
|
@@ -2240,64 +2251,91 @@ module.exports =
|
|
|
2240
2251
|
);
|
|
2241
2252
|
};
|
|
2242
2253
|
|
|
2243
|
-
var
|
|
2244
|
-
_inherits(
|
|
2254
|
+
var FlatFile = function (_Component2) {
|
|
2255
|
+
_inherits(FlatFile, _Component2);
|
|
2245
2256
|
|
|
2246
2257
|
// react-dropzone
|
|
2247
2258
|
// papaparse
|
|
2248
2259
|
|
|
2249
|
-
function
|
|
2250
|
-
_classCallCheck(this,
|
|
2260
|
+
function FlatFile() {
|
|
2261
|
+
_classCallCheck(this, FlatFile);
|
|
2251
2262
|
|
|
2252
|
-
var _this3 = _possibleConstructorReturn(this, (
|
|
2263
|
+
var _this3 = _possibleConstructorReturn(this, (FlatFile.__proto__ || Object.getPrototypeOf(FlatFile)).call(this));
|
|
2253
2264
|
|
|
2254
2265
|
_this3.onDrop = function (fs) {
|
|
2255
|
-
var
|
|
2256
|
-
setCsvFields = _this3$props.setCsvFields,
|
|
2257
|
-
providerType = _this3$props.providerType,
|
|
2258
|
-
wizard = _this3$props.wizard;
|
|
2259
|
-
|
|
2260
|
-
var m = wizard['metadata'] || [];
|
|
2261
|
-
var files = [].concat(_toConsumableArray(_this3.state.files));
|
|
2266
|
+
var meta = [].concat(_toConsumableArray(_this3.state.meta));
|
|
2262
2267
|
var counter = 0;
|
|
2268
|
+
var fileContents = [].concat(_toConsumableArray(_this3.state.fileContents));
|
|
2269
|
+
var contentCounter = 0;
|
|
2263
2270
|
fs.forEach(function (file) {
|
|
2264
2271
|
_papaparse2.default.parse(file, {
|
|
2265
2272
|
header: true,
|
|
2273
|
+
dynamicTyping: true,
|
|
2266
2274
|
complete: function complete(result) {
|
|
2267
|
-
|
|
2268
|
-
name: file.name
|
|
2269
|
-
type: file.name.
|
|
2275
|
+
meta = meta.concat({
|
|
2276
|
+
name: file.name,
|
|
2277
|
+
type: file.name.substr(0, file.name.lastIndexOf('.')).split(' ').join(),
|
|
2278
|
+
byteSize: file.size,
|
|
2270
2279
|
properties: result.meta.fields.map(function (f) {
|
|
2271
2280
|
return {
|
|
2272
2281
|
label: f,
|
|
2273
|
-
name: f,
|
|
2274
|
-
type:
|
|
2282
|
+
name: f.split(' ').join(),
|
|
2283
|
+
type: result.data[0] && _typeof(result.data[0][f])
|
|
2275
2284
|
};
|
|
2276
|
-
})
|
|
2285
|
+
}),
|
|
2286
|
+
delimiter: result.meta.delimiter
|
|
2277
2287
|
});
|
|
2278
|
-
files = files.concat(file);
|
|
2279
2288
|
counter += 1;
|
|
2280
2289
|
if (counter === fs.length) {
|
|
2281
|
-
|
|
2282
|
-
|
|
2290
|
+
// after last one is done
|
|
2291
|
+
_this3.setState({ meta: meta });
|
|
2283
2292
|
}
|
|
2284
2293
|
}
|
|
2285
2294
|
});
|
|
2295
|
+
var reader = new FileReader();
|
|
2296
|
+
reader.addEventListener("loadend", function (event) {
|
|
2297
|
+
fileContents = fileContents.concat(event.target.result);
|
|
2298
|
+
contentCounter += 1;
|
|
2299
|
+
if (contentCounter === fs.length) {
|
|
2300
|
+
_this3.setState({ fileContents: fileContents });
|
|
2301
|
+
}
|
|
2302
|
+
});
|
|
2303
|
+
reader.readAsText(file);
|
|
2304
|
+
});
|
|
2305
|
+
};
|
|
2306
|
+
|
|
2307
|
+
_this3.upload = function () {
|
|
2308
|
+
var _this3$props = _this3.props,
|
|
2309
|
+
setCsvFields = _this3$props.setCsvFields,
|
|
2310
|
+
providerType = _this3$props.providerType;
|
|
2311
|
+
|
|
2312
|
+
_this3.setState({ uploading: true });
|
|
2313
|
+
setCsvFields(_this3.state.meta, _this3.state.fileContents, providerType).then(function () {
|
|
2314
|
+
_this3.setState({ meta: [], uploading: false });
|
|
2286
2315
|
});
|
|
2287
2316
|
};
|
|
2288
2317
|
|
|
2289
2318
|
_this3.state = {
|
|
2290
|
-
|
|
2319
|
+
meta: [],
|
|
2320
|
+
fileContents: [],
|
|
2321
|
+
uploading: false
|
|
2291
2322
|
};
|
|
2292
2323
|
return _this3;
|
|
2293
2324
|
}
|
|
2294
2325
|
|
|
2295
|
-
_createClass(
|
|
2326
|
+
_createClass(FlatFile, [{
|
|
2296
2327
|
key: 'render',
|
|
2297
2328
|
value: function render() {
|
|
2298
|
-
var
|
|
2329
|
+
var _state = this.state,
|
|
2330
|
+
meta = _state.meta,
|
|
2331
|
+
uploading = _state.uploading;
|
|
2332
|
+
var _props2 = this.props,
|
|
2333
|
+
metadata = _props2.metadata,
|
|
2334
|
+
inputs = _props2.inputs;
|
|
2299
2335
|
|
|
2300
|
-
var
|
|
2336
|
+
var Button = inputs.Button;
|
|
2337
|
+
var Spinner = inputs.Spinner;
|
|
2338
|
+
var hasFile = meta && meta.length > 0;
|
|
2301
2339
|
return _react2.default.createElement(
|
|
2302
2340
|
'div',
|
|
2303
2341
|
null,
|
|
@@ -2319,32 +2357,78 @@ module.exports =
|
|
|
2319
2357
|
'aside',
|
|
2320
2358
|
{ style: { marginLeft: 30, display: 'inline-block' } },
|
|
2321
2359
|
_react2.default.createElement(
|
|
2322
|
-
'
|
|
2323
|
-
|
|
2324
|
-
|
|
2360
|
+
'div',
|
|
2361
|
+
null,
|
|
2362
|
+
_react2.default.createElement(
|
|
2363
|
+
'h3',
|
|
2364
|
+
{ style: { marginTop: 10, display: 'inline-block', verticalAlign: 'top' } },
|
|
2365
|
+
'Dropped files'
|
|
2366
|
+
),
|
|
2367
|
+
_react2.default.createElement(
|
|
2368
|
+
Button,
|
|
2369
|
+
{
|
|
2370
|
+
onClick: this.upload,
|
|
2371
|
+
style: { marginTop: 4, marginLeft: 20, verticalAlign: 'top', height: 36 },
|
|
2372
|
+
disabled: uploading },
|
|
2373
|
+
_react2.default.createElement(
|
|
2374
|
+
'span',
|
|
2375
|
+
{ style: { display: 'inline-block', verticalAlign: 'top', marginTop: 3 } },
|
|
2376
|
+
'Upload'
|
|
2377
|
+
),
|
|
2378
|
+
'\xA0\xA0',
|
|
2379
|
+
_react2.default.createElement(UploadIcon, null)
|
|
2380
|
+
),
|
|
2381
|
+
uploading && _react2.default.createElement(
|
|
2382
|
+
'div',
|
|
2383
|
+
{ style: { paddingLeft: 12, paddingTop: 12, display: 'inline-block' } },
|
|
2384
|
+
_react2.default.createElement(Spinner, null)
|
|
2385
|
+
)
|
|
2325
2386
|
),
|
|
2326
2387
|
_react2.default.createElement(
|
|
2327
2388
|
'ul',
|
|
2328
2389
|
null,
|
|
2329
|
-
|
|
2390
|
+
meta.map(function (f, i) {
|
|
2330
2391
|
return _react2.default.createElement(
|
|
2331
2392
|
'li',
|
|
2332
2393
|
{ key: i },
|
|
2333
2394
|
f.name,
|
|
2334
2395
|
' - ',
|
|
2335
|
-
f.
|
|
2336
|
-
' bytes'
|
|
2396
|
+
formatBytes(f.byteSize)
|
|
2337
2397
|
);
|
|
2338
2398
|
})
|
|
2339
2399
|
)
|
|
2400
|
+
),
|
|
2401
|
+
!uploading && metadata && metadata.length > 0 && _react2.default.createElement(
|
|
2402
|
+
'div',
|
|
2403
|
+
{
|
|
2404
|
+
style: { marginLeft: 20, display: 'inline-block', marginTop: 13, verticalAlign: 'top' } },
|
|
2405
|
+
_react2.default.createElement(
|
|
2406
|
+
'strong',
|
|
2407
|
+
{ style: { marginRight: 5 } },
|
|
2408
|
+
metadata && metadata.length
|
|
2409
|
+
),
|
|
2410
|
+
_react2.default.createElement(
|
|
2411
|
+
'span',
|
|
2412
|
+
null,
|
|
2413
|
+
'file' + (metadata.length === 1 ? '' : 's') + ' uploaded'
|
|
2414
|
+
)
|
|
2340
2415
|
)
|
|
2341
2416
|
);
|
|
2342
2417
|
}
|
|
2343
2418
|
}]);
|
|
2344
2419
|
|
|
2345
|
-
return
|
|
2420
|
+
return FlatFile;
|
|
2346
2421
|
}(_react.Component);
|
|
2347
2422
|
|
|
2423
|
+
var UploadIcon = function UploadIcon() {
|
|
2424
|
+
return _react2.default.createElement(
|
|
2425
|
+
'svg',
|
|
2426
|
+
{ fill: '#666', height: '24', viewBox: '0 0 24 24', width: '24' },
|
|
2427
|
+
_react2.default.createElement('path', { d: 'M0 0h24v24H0z', fill: 'none' }),
|
|
2428
|
+
_react2.default.createElement('path', { d: 'M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z' })
|
|
2429
|
+
);
|
|
2430
|
+
};
|
|
2431
|
+
|
|
2348
2432
|
var Oauth = function (_Component3) {
|
|
2349
2433
|
_inherits(Oauth, _Component3);
|
|
2350
2434
|
|
|
@@ -2391,15 +2475,15 @@ module.exports =
|
|
|
2391
2475
|
}, {
|
|
2392
2476
|
key: 'render',
|
|
2393
2477
|
value: function render() {
|
|
2394
|
-
var
|
|
2395
|
-
wizard =
|
|
2396
|
-
onGenerateUrl =
|
|
2397
|
-
onCheck =
|
|
2398
|
-
providerType =
|
|
2399
|
-
checking =
|
|
2400
|
-
creds =
|
|
2401
|
-
inputs =
|
|
2402
|
-
envCheckResult =
|
|
2478
|
+
var _props3 = this.props,
|
|
2479
|
+
wizard = _props3.wizard,
|
|
2480
|
+
onGenerateUrl = _props3.onGenerateUrl,
|
|
2481
|
+
onCheck = _props3.onCheck,
|
|
2482
|
+
providerType = _props3.providerType,
|
|
2483
|
+
checking = _props3.checking,
|
|
2484
|
+
creds = _props3.creds,
|
|
2485
|
+
inputs = _props3.inputs,
|
|
2486
|
+
envCheckResult = _props3.envCheckResult;
|
|
2403
2487
|
|
|
2404
2488
|
var Spinner = inputs.Spinner;
|
|
2405
2489
|
var Button = inputs.Button;
|
|
@@ -2591,13 +2675,13 @@ module.exports =
|
|
|
2591
2675
|
value: function render() {
|
|
2592
2676
|
var _this8 = this;
|
|
2593
2677
|
|
|
2594
|
-
var
|
|
2595
|
-
generateNewAdapterSecret =
|
|
2596
|
-
tenantKey =
|
|
2597
|
-
accountKey =
|
|
2598
|
-
providerType =
|
|
2599
|
-
secret =
|
|
2600
|
-
inputs =
|
|
2678
|
+
var _props4 = this.props,
|
|
2679
|
+
generateNewAdapterSecret = _props4.generateNewAdapterSecret,
|
|
2680
|
+
tenantKey = _props4.tenantKey,
|
|
2681
|
+
accountKey = _props4.accountKey,
|
|
2682
|
+
providerType = _props4.providerType,
|
|
2683
|
+
secret = _props4.secret,
|
|
2684
|
+
inputs = _props4.inputs;
|
|
2601
2685
|
|
|
2602
2686
|
var Spinner = inputs.Spinner;
|
|
2603
2687
|
var Button = inputs.Button;
|
|
@@ -16688,6 +16772,8 @@ module.exports =
|
|
|
16688
16772
|
});
|
|
16689
16773
|
exports.callGetMetadata = callGetMetadata;
|
|
16690
16774
|
exports.setCsvFields = setCsvFields;
|
|
16775
|
+
exports.uploadFilesToS3 = uploadFilesToS3;
|
|
16776
|
+
exports.singleFileToS3 = singleFileToS3;
|
|
16691
16777
|
exports.tryCheckConnection = tryCheckConnection;
|
|
16692
16778
|
exports.callGetProviderMetadata = callGetProviderMetadata;
|
|
16693
16779
|
exports.getOauthUrl = getOauthUrl;
|
|
@@ -16735,6 +16821,10 @@ module.exports =
|
|
|
16735
16821
|
|
|
16736
16822
|
var _moment2 = _interopRequireDefault(_moment);
|
|
16737
16823
|
|
|
16824
|
+
var _axios = __webpack_require__(218);
|
|
16825
|
+
|
|
16826
|
+
var _axios2 = _interopRequireDefault(_axios);
|
|
16827
|
+
|
|
16738
16828
|
var _reduxForm = __webpack_require__(2);
|
|
16739
16829
|
|
|
16740
16830
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -16752,7 +16842,8 @@ module.exports =
|
|
|
16752
16842
|
mode: mode
|
|
16753
16843
|
});
|
|
16754
16844
|
return dispatch(tryCheckConnection(tenantId, appId, providerType, credsConfig, isFramework, creds, urlSuffix)).then(function (r) {
|
|
16755
|
-
|
|
16845
|
+
var schemaGuid = creds.schemaGuid; // for flat file schema
|
|
16846
|
+
return dispatch(callGetProviderMetadata(tenantId, appId, urlSuffix, apiUrl, mode, providerType, endpoint, isOauth, environment.name, schemaGuid));
|
|
16756
16847
|
}).then(function (m) {
|
|
16757
16848
|
metadata = m;
|
|
16758
16849
|
var isIntro = endpoint === '_blank';
|
|
@@ -16775,13 +16866,76 @@ module.exports =
|
|
|
16775
16866
|
};
|
|
16776
16867
|
}
|
|
16777
16868
|
|
|
16778
|
-
function setCsvFields(metadata, mode, providerType) {
|
|
16779
|
-
|
|
16780
|
-
|
|
16781
|
-
|
|
16869
|
+
function setCsvFields(tenantId, appId, tenantKey, appKey, metadata, contents, mode, providerType, isSource, envId) {
|
|
16870
|
+
var d = null;
|
|
16871
|
+
return function (dispatch, getState, api) {
|
|
16872
|
+
var _getState = getState(),
|
|
16873
|
+
config = _getState.config;
|
|
16874
|
+
|
|
16875
|
+
return api.post(tenantId + '/' + appId + '/fileschema', {
|
|
16876
|
+
endpoint: config.TRANS_API_URL,
|
|
16877
|
+
data: { name: 'flatfile', resources: metadata, providerType: providerType, isSource: isSource }
|
|
16878
|
+
}).then(function (data) {
|
|
16879
|
+
d = data;
|
|
16880
|
+
return dispatch(uploadFilesToS3(tenantKey, appKey, metadata, data, contents));
|
|
16881
|
+
}).then(function () {
|
|
16882
|
+
return dispatch(postCredentials(tenantId, appId, providerType, d.guids, mode, envId)).then(function () {
|
|
16883
|
+
dispatch({
|
|
16884
|
+
type: types.FINISH_WIZARD_ENV_CHECK,
|
|
16885
|
+
data: { metadata: { resources: metadata }, mode: mode, code: '200 OK', providerType: providerType }
|
|
16886
|
+
});
|
|
16887
|
+
});
|
|
16888
|
+
}).catch(function (err) {
|
|
16889
|
+
console.log(err);
|
|
16890
|
+
});
|
|
16782
16891
|
};
|
|
16783
16892
|
}
|
|
16784
16893
|
|
|
16894
|
+
function uploadFilesToS3(tenantKey, appKey, metadata, d, contents) {
|
|
16895
|
+
var args = contents.map(function (fileContent, i) {
|
|
16896
|
+
return { tenantKey: tenantKey, appKey: appKey, fileContent: fileContent, d: d, fileName: metadata[i].name };
|
|
16897
|
+
});
|
|
16898
|
+
return function (dispatch, getState, api) {
|
|
16899
|
+
return Promise.all(args.map(singleFileToS3));
|
|
16900
|
+
};
|
|
16901
|
+
}
|
|
16902
|
+
|
|
16903
|
+
function singleFileToS3(_ref) {
|
|
16904
|
+
var tenantKey = _ref.tenantKey,
|
|
16905
|
+
appKey = _ref.appKey,
|
|
16906
|
+
d = _ref.d,
|
|
16907
|
+
fileContent = _ref.fileContent,
|
|
16908
|
+
fileName = _ref.fileName;
|
|
16909
|
+
|
|
16910
|
+
if (!d.guids.files[fileName]) {
|
|
16911
|
+
return function () {
|
|
16912
|
+
return Promise.resolve(null);
|
|
16913
|
+
};
|
|
16914
|
+
}
|
|
16915
|
+
var p = JSON.parse(atob(d.policy));
|
|
16916
|
+
var pFind = function pFind(s) {
|
|
16917
|
+
return p.conditions.find(function (pf) {
|
|
16918
|
+
return Object.keys(pf).includes(s);
|
|
16919
|
+
})[s];
|
|
16920
|
+
};
|
|
16921
|
+
var fd = new FormData();
|
|
16922
|
+
fd.append('key', tenantKey + '/' + appKey + '/' + d.guids.files[fileName]);
|
|
16923
|
+
fd.append('policy', d.policy);
|
|
16924
|
+
fd.append('acl', pFind('acl'));
|
|
16925
|
+
fd.append('success_action_status', pFind('success_action_status'));
|
|
16926
|
+
fd.append('x-amz-credential', pFind('x-amz-credential'));
|
|
16927
|
+
fd.append('x-amz-algorithm', pFind('x-amz-algorithm'));
|
|
16928
|
+
fd.append('x-amz-date', pFind('x-amz-date'));
|
|
16929
|
+
fd.append('x-amz-signature', d.signature);
|
|
16930
|
+
fd.append('file', fileContent);
|
|
16931
|
+
return (0, _axios2.default)({
|
|
16932
|
+
method: 'post',
|
|
16933
|
+
url: 'https://' + pFind('bucket') + '.s3.amazonaws.com/',
|
|
16934
|
+
data: fd,
|
|
16935
|
+
config: { headers: { 'Content-Type': 'multipart/form-data' } }
|
|
16936
|
+
});
|
|
16937
|
+
}
|
|
16938
|
+
|
|
16785
16939
|
// "fake" credentials for demo purposes
|
|
16786
16940
|
function isDemoCreds(creds, providerType) {
|
|
16787
16941
|
if (creds && providerType) {
|
|
@@ -16803,8 +16957,8 @@ module.exports =
|
|
|
16803
16957
|
var isOauth = credsConfig && credsConfig[0] === 'Oauth';
|
|
16804
16958
|
var isAdapter = urlSuffix === 'testconnection' || urlSuffix === 'adaptermetadata';
|
|
16805
16959
|
|
|
16806
|
-
var
|
|
16807
|
-
config =
|
|
16960
|
+
var _getState2 = getState(),
|
|
16961
|
+
config = _getState2.config;
|
|
16808
16962
|
// if demo creds are entered, skip this
|
|
16809
16963
|
// ADD: OR IF adaptermetadata SKIP THIS
|
|
16810
16964
|
|
|
@@ -16821,7 +16975,7 @@ module.exports =
|
|
|
16821
16975
|
};
|
|
16822
16976
|
}
|
|
16823
16977
|
|
|
16824
|
-
function callGetProviderMetadata(tenantId, appId, urlSuffix, apiUrl, mode, providerType, endpoint, isOauth, envName) {
|
|
16978
|
+
function callGetProviderMetadata(tenantId, appId, urlSuffix, apiUrl, mode, providerType, endpoint, isOauth, envName, schemaGuid) {
|
|
16825
16979
|
if (!urlSuffix) {
|
|
16826
16980
|
// for new providers that dont have metadata endpoint yet
|
|
16827
16981
|
return function () {
|
|
@@ -16829,9 +16983,9 @@ module.exports =
|
|
|
16829
16983
|
};
|
|
16830
16984
|
}
|
|
16831
16985
|
return function (dispatch, getState, api) {
|
|
16832
|
-
var
|
|
16833
|
-
config =
|
|
16834
|
-
// 'testconnection
|
|
16986
|
+
var _getState3 = getState(),
|
|
16987
|
+
config = _getState3.config;
|
|
16988
|
+
// 'testconnection' GET route is for adapter. Should be called 'adaptermetadata'
|
|
16835
16989
|
|
|
16836
16990
|
|
|
16837
16991
|
var isAdapter = false;
|
|
@@ -16843,6 +16997,9 @@ module.exports =
|
|
|
16843
16997
|
urlSuffix = 'adaptermetadata?url=' + endpoint;
|
|
16844
16998
|
isAdapter = true;
|
|
16845
16999
|
}
|
|
17000
|
+
if (urlSuffix === 'fileschema') {
|
|
17001
|
+
urlSuffix = 'fileschema?schemaGuid=' + schemaGuid;
|
|
17002
|
+
}
|
|
16846
17003
|
if (isOauth || isAdapter) {
|
|
16847
17004
|
// USE ONLY ENVS!!!
|
|
16848
17005
|
return api.get(tenantId + '/' + appId + '/environments/' + envName + '/' + urlSuffix, {
|
|
@@ -16864,8 +17021,8 @@ module.exports =
|
|
|
16864
17021
|
mode: mode
|
|
16865
17022
|
});
|
|
16866
17023
|
|
|
16867
|
-
var
|
|
16868
|
-
config =
|
|
17024
|
+
var _getState4 = getState(),
|
|
17025
|
+
config = _getState4.config;
|
|
16869
17026
|
|
|
16870
17027
|
return api.get(tenantId + '/' + appId + '/environments/' + envName + '/oauthurl/' + typeGuid + '/' + orgType, {
|
|
16871
17028
|
endpoint: config.SF_AGENT_API_URL
|
|
@@ -16883,9 +17040,9 @@ module.exports =
|
|
|
16883
17040
|
|
|
16884
17041
|
function generateNewAdapterSecret(tenantId, accountId, envName, mode) {
|
|
16885
17042
|
return function (dispatch, getState, api) {
|
|
16886
|
-
var
|
|
16887
|
-
config =
|
|
16888
|
-
wizard =
|
|
17043
|
+
var _getState5 = getState(),
|
|
17044
|
+
config = _getState5.config,
|
|
17045
|
+
wizard = _getState5.wizard;
|
|
16889
17046
|
|
|
16890
17047
|
var TRANS_API_URL = config.TRANS_API_URL;
|
|
16891
17048
|
|
|
@@ -16902,13 +17059,13 @@ module.exports =
|
|
|
16902
17059
|
|
|
16903
17060
|
function createLingkExternalIds(tenantId, appId, bundles, mappings, metadata, envName) {
|
|
16904
17061
|
return function (dispatch, getState, api) {
|
|
16905
|
-
var
|
|
16906
|
-
config =
|
|
17062
|
+
var _getState6 = getState(),
|
|
17063
|
+
config = _getState6.config;
|
|
16907
17064
|
|
|
16908
17065
|
var externalIdlessObjects = [];
|
|
16909
17066
|
// only run for Salesforce
|
|
16910
17067
|
bundles && bundles.filter(function (b) {
|
|
16911
|
-
return b.provider === '
|
|
17068
|
+
return b.provider.toLowerCase() === 'salesforce';
|
|
16912
17069
|
}).forEach(function (b) {
|
|
16913
17070
|
var rsc = metadata.find(function (r) {
|
|
16914
17071
|
return r.type === b.name;
|
|
@@ -16941,8 +17098,8 @@ module.exports =
|
|
|
16941
17098
|
|
|
16942
17099
|
function callAddCustomField(tenantId, appId, objectType, fieldName, completedCallback, envName) {
|
|
16943
17100
|
return function (dispatch, getState, api) {
|
|
16944
|
-
var
|
|
16945
|
-
config =
|
|
17101
|
+
var _getState7 = getState(),
|
|
17102
|
+
config = _getState7.config;
|
|
16946
17103
|
|
|
16947
17104
|
return api.post(tenantId + '/' + appId + '/environments/' + envName + '/salesforceschema/field', {
|
|
16948
17105
|
endpoint: config.SF_AGENT_API_URL,
|
|
@@ -16994,8 +17151,8 @@ module.exports =
|
|
|
16994
17151
|
|
|
16995
17152
|
function callGetScenarioList(tenantId, appId, typeGuid) {
|
|
16996
17153
|
return function (dispatch, getState, api) {
|
|
16997
|
-
var
|
|
16998
|
-
config =
|
|
17154
|
+
var _getState8 = getState(),
|
|
17155
|
+
config = _getState8.config;
|
|
16999
17156
|
|
|
17000
17157
|
return api.get(tenantId + '/' + appId + '/scenarios/' + typeGuid, {
|
|
17001
17158
|
endpoint: config.TRANS_API_URL
|
|
@@ -17005,8 +17162,8 @@ module.exports =
|
|
|
17005
17162
|
|
|
17006
17163
|
function callCreateScenario(tenantId, appId, data) {
|
|
17007
17164
|
return function (dispatch, getState, api) {
|
|
17008
|
-
var
|
|
17009
|
-
config =
|
|
17165
|
+
var _getState9 = getState(),
|
|
17166
|
+
config = _getState9.config;
|
|
17010
17167
|
|
|
17011
17168
|
return api.post(tenantId + '/' + appId + '/scenario', {
|
|
17012
17169
|
endpoint: config.TRANS_API_URL,
|
|
@@ -17017,8 +17174,8 @@ module.exports =
|
|
|
17017
17174
|
|
|
17018
17175
|
function callUpdateScenarioList(tenantId, appId, typeGuid, scenarioIds) {
|
|
17019
17176
|
return function (dispatch, getState, api) {
|
|
17020
|
-
var
|
|
17021
|
-
config =
|
|
17177
|
+
var _getState10 = getState(),
|
|
17178
|
+
config = _getState10.config;
|
|
17022
17179
|
|
|
17023
17180
|
return api.post(tenantId + '/' + appId + '/scenarios/' + typeGuid, {
|
|
17024
17181
|
endpoint: config.TRANS_API_URL,
|
|
@@ -17031,8 +17188,8 @@ module.exports =
|
|
|
17031
17188
|
|
|
17032
17189
|
function callPostBundles(tenantId, appId, bundles, onGenerationError) {
|
|
17033
17190
|
return function (dispatch, getState, api) {
|
|
17034
|
-
var
|
|
17035
|
-
config =
|
|
17191
|
+
var _getState11 = getState(),
|
|
17192
|
+
config = _getState11.config;
|
|
17036
17193
|
|
|
17037
17194
|
var data = { bundles: bundles };
|
|
17038
17195
|
return api.post(tenantId + '/' + appId + '/bundle', {
|
|
@@ -17047,8 +17204,8 @@ module.exports =
|
|
|
17047
17204
|
|
|
17048
17205
|
function callPostMapping(tenantId, appId, mappings, onGenerationError) {
|
|
17049
17206
|
return function (dispatch, getState, api) {
|
|
17050
|
-
var
|
|
17051
|
-
config =
|
|
17207
|
+
var _getState12 = getState(),
|
|
17208
|
+
config = _getState12.config;
|
|
17052
17209
|
|
|
17053
17210
|
var data = { mappings: mappings };
|
|
17054
17211
|
return api.post(tenantId + '/' + appId + '/schemamappings', {
|
|
@@ -17063,8 +17220,8 @@ module.exports =
|
|
|
17063
17220
|
|
|
17064
17221
|
function callPostProductizedIntegration(tenantId, appId, schemaMappingGuid, bundlePackGuid, configuration, title, typeGuid, piGuid, onGenerationError) {
|
|
17065
17222
|
return function (dispatch, getState, api) {
|
|
17066
|
-
var
|
|
17067
|
-
config =
|
|
17223
|
+
var _getState13 = getState(),
|
|
17224
|
+
config = _getState13.config;
|
|
17068
17225
|
|
|
17069
17226
|
var data = Object.assign({
|
|
17070
17227
|
schemaMappingGuid: schemaMappingGuid,
|
|
@@ -17085,8 +17242,8 @@ module.exports =
|
|
|
17085
17242
|
|
|
17086
17243
|
function callUpdateProductizedIntegration(tenantId, appId, schemaMappingGuid, bundlePackGuid, configuration, title, typeGuid, piGuid, onGenerationError) {
|
|
17087
17244
|
return function (dispatch, getState, api) {
|
|
17088
|
-
var
|
|
17089
|
-
config =
|
|
17245
|
+
var _getState14 = getState(),
|
|
17246
|
+
config = _getState14.config;
|
|
17090
17247
|
|
|
17091
17248
|
var data = {
|
|
17092
17249
|
schemaMappingGuid: schemaMappingGuid,
|
|
@@ -17107,8 +17264,8 @@ module.exports =
|
|
|
17107
17264
|
|
|
17108
17265
|
function callGenerateRecipe(tenantId, appId, typeId, typeGuid, title, piGuid, mappingGuid, sourceMetadata, destinationMetadata, isManagedPackage, onGenerationError, envName, envId) {
|
|
17109
17266
|
return function (dispatch, getState, api) {
|
|
17110
|
-
var
|
|
17111
|
-
config =
|
|
17267
|
+
var _getState15 = getState(),
|
|
17268
|
+
config = _getState15.config;
|
|
17112
17269
|
|
|
17113
17270
|
return api.post(tenantId + '/' + appId + '/productizedintegrations/' + piGuid + '/generate', {
|
|
17114
17271
|
endpoint: config.TRANS_API_URL,
|
|
@@ -17125,7 +17282,7 @@ module.exports =
|
|
|
17125
17282
|
};
|
|
17126
17283
|
}
|
|
17127
17284
|
|
|
17128
|
-
function submitWizardData(tenantId, appId, bundles, mappings, configuration, title, deployment, typeId, typeGuid, piGuid, onPiPost, onGenerate, onFinish, sourceMetadata, destinationMetadata, isManagedPackage, onGenerationError, envName, envId) {
|
|
17285
|
+
function submitWizardData(tenantId, appId, bundles, mappings, configuration, title, deployment, typeId, typeGuid, piGuid, onPiPost, onGenerate, onFinish, sourceMetadata, destinationMetadata, isManagedPackage, onGenerationError, envName, envId, isFinishClick) {
|
|
17129
17286
|
return function (dispatch) {
|
|
17130
17287
|
var map = {};
|
|
17131
17288
|
return Promise.all([dispatch(callPostBundles(tenantId, appId, bundles, onGenerationError)), dispatch(callPostMapping(tenantId, appId, mappings, onGenerationError)),
|
|
@@ -17143,7 +17300,7 @@ module.exports =
|
|
|
17143
17300
|
if (map.mappings && map.mappings.length > 0 && deployment) {
|
|
17144
17301
|
dispatch(callGenerateRecipe(tenantId, appId, typeId, typeGuid, title, pi.productizedIntegrationGuid, map.schemaMappingGuid, sourceMetadata, destinationMetadata, isManagedPackage, onGenerationError, envName, envId)).then(function (generatedRecipe) {
|
|
17145
17302
|
onGenerate();
|
|
17146
|
-
if (deployment) {
|
|
17303
|
+
if (deployment && isFinishClick) {
|
|
17147
17304
|
if (deployment.type === 'once') {
|
|
17148
17305
|
dispatch(callPostEventContext({ eventData: {
|
|
17149
17306
|
environmentName: envName,
|
|
@@ -17168,8 +17325,8 @@ module.exports =
|
|
|
17168
17325
|
|
|
17169
17326
|
function callPostEventContext(data, transBaseId) {
|
|
17170
17327
|
return function (dispatch, getState, api) {
|
|
17171
|
-
var
|
|
17172
|
-
config =
|
|
17328
|
+
var _getState16 = getState(),
|
|
17329
|
+
config = _getState16.config;
|
|
17173
17330
|
|
|
17174
17331
|
var TRANS_API_URL = config.TRANS_API_URL;
|
|
17175
17332
|
|
|
@@ -17182,8 +17339,8 @@ module.exports =
|
|
|
17182
17339
|
|
|
17183
17340
|
function callExecuteTransformer(transId) {
|
|
17184
17341
|
return function (dispatch, getState, api) {
|
|
17185
|
-
var
|
|
17186
|
-
config =
|
|
17342
|
+
var _getState17 = getState(),
|
|
17343
|
+
config = _getState17.config;
|
|
17187
17344
|
|
|
17188
17345
|
var query = '';
|
|
17189
17346
|
var d = new Date();
|
|
@@ -17203,8 +17360,8 @@ module.exports =
|
|
|
17203
17360
|
|
|
17204
17361
|
function callLookupLogData(tenantId, externalExecutionId, index, onFinish, generatedRecipe, pi) {
|
|
17205
17362
|
return function (dispatch, getState, api) {
|
|
17206
|
-
var
|
|
17207
|
-
config =
|
|
17363
|
+
var _getState18 = getState(),
|
|
17364
|
+
config = _getState18.config;
|
|
17208
17365
|
|
|
17209
17366
|
return api.get(tenantId + '/logs/transformers/externalExecutionId/' + externalExecutionId, {
|
|
17210
17367
|
endpoint: config.TRANS_API_URL
|
|
@@ -17248,8 +17405,8 @@ module.exports =
|
|
|
17248
17405
|
};
|
|
17249
17406
|
}
|
|
17250
17407
|
return function (dispatch, getState, api) {
|
|
17251
|
-
var
|
|
17252
|
-
config =
|
|
17408
|
+
var _getState19 = getState(),
|
|
17409
|
+
config = _getState19.config;
|
|
17253
17410
|
|
|
17254
17411
|
return api.post(tenantId + '/createtrigger', {
|
|
17255
17412
|
endpoint: config.TRANS_API_URL,
|
|
@@ -17287,8 +17444,8 @@ module.exports =
|
|
|
17287
17444
|
|
|
17288
17445
|
if (piGuid && piGuid !== '_') {
|
|
17289
17446
|
return function (dispatch, getState, api) {
|
|
17290
|
-
var
|
|
17291
|
-
config =
|
|
17447
|
+
var _getState20 = getState(),
|
|
17448
|
+
config = _getState20.config;
|
|
17292
17449
|
|
|
17293
17450
|
return api.get(tenantId + '/' + accountId + '/productizedintegrations/' + piGuid + '/versions', {
|
|
17294
17451
|
endpoint: config.TRANS_API_URL
|
|
@@ -17358,8 +17515,8 @@ module.exports =
|
|
|
17358
17515
|
|
|
17359
17516
|
function clearAdapterSecrets() {
|
|
17360
17517
|
return function (dispatch, getState, api) {
|
|
17361
|
-
var
|
|
17362
|
-
wizard =
|
|
17518
|
+
var _getState21 = getState(),
|
|
17519
|
+
wizard = _getState21.wizard;
|
|
17363
17520
|
|
|
17364
17521
|
dispatch({
|
|
17365
17522
|
type: types.SET_WIZARD_SAVED_CREDENTIALS,
|
|
@@ -17373,8 +17530,8 @@ module.exports =
|
|
|
17373
17530
|
|
|
17374
17531
|
function setLoadedAdapterSecret(cred, mode) {
|
|
17375
17532
|
return function (dispatch, getState, api) {
|
|
17376
|
-
var
|
|
17377
|
-
wizard =
|
|
17533
|
+
var _getState22 = getState(),
|
|
17534
|
+
wizard = _getState22.wizard;
|
|
17378
17535
|
|
|
17379
17536
|
dispatch({
|
|
17380
17537
|
type: types.SET_WIZARD_SAVED_CREDENTIALS,
|
|
@@ -17385,8 +17542,8 @@ module.exports =
|
|
|
17385
17542
|
|
|
17386
17543
|
function getCredentialForEnvironment(tenantId, appId, credentialType, envName, mode) {
|
|
17387
17544
|
return function (dispatch, getState, api) {
|
|
17388
|
-
var
|
|
17389
|
-
config =
|
|
17545
|
+
var _getState23 = getState(),
|
|
17546
|
+
config = _getState23.config;
|
|
17390
17547
|
|
|
17391
17548
|
return api.get(tenantId + '/' + appId + '/credentials/' + credentialType + '/' + envName, {
|
|
17392
17549
|
endpoint: config.TRANS_API_URL
|
|
@@ -17436,8 +17593,8 @@ module.exports =
|
|
|
17436
17593
|
function callGetBundles(tenantId, accountId, bundlePackGuid) {
|
|
17437
17594
|
if (bundlePackGuid) {
|
|
17438
17595
|
return function (dispatch, getState, api) {
|
|
17439
|
-
var
|
|
17440
|
-
config =
|
|
17596
|
+
var _getState24 = getState(),
|
|
17597
|
+
config = _getState24.config;
|
|
17441
17598
|
|
|
17442
17599
|
return api.get(tenantId + '/' + accountId + '/bundle/' + bundlePackGuid, {
|
|
17443
17600
|
endpoint: config.TRANS_API_URL
|
|
@@ -17454,8 +17611,8 @@ module.exports =
|
|
|
17454
17611
|
function callGetMapping(tenantId, accountId, mappingGuid) {
|
|
17455
17612
|
if (mappingGuid) {
|
|
17456
17613
|
return function (dispatch, getState, api) {
|
|
17457
|
-
var
|
|
17458
|
-
config =
|
|
17614
|
+
var _getState25 = getState(),
|
|
17615
|
+
config = _getState25.config;
|
|
17459
17616
|
|
|
17460
17617
|
return api.get(tenantId + '/' + accountId + '/schemamappings/' + mappingGuid, {
|
|
17461
17618
|
endpoint: config.TRANS_API_URL
|
|
@@ -17476,8 +17633,8 @@ module.exports =
|
|
|
17476
17633
|
mode: mode
|
|
17477
17634
|
});
|
|
17478
17635
|
|
|
17479
|
-
var
|
|
17480
|
-
config =
|
|
17636
|
+
var _getState26 = getState(),
|
|
17637
|
+
config = _getState26.config;
|
|
17481
17638
|
|
|
17482
17639
|
return api.post(tenantId + '/' + appId + '/environments/' + envId + '/credentials', {
|
|
17483
17640
|
endpoint: config.TRANS_API_URL,
|
|
@@ -17491,8 +17648,8 @@ module.exports =
|
|
|
17491
17648
|
|
|
17492
17649
|
function getEnvironments(tenantId, appId) {
|
|
17493
17650
|
return function (dispatch, getState, api) {
|
|
17494
|
-
var
|
|
17495
|
-
config =
|
|
17651
|
+
var _getState27 = getState(),
|
|
17652
|
+
config = _getState27.config;
|
|
17496
17653
|
|
|
17497
17654
|
return api.get(tenantId + '/' + appId + '/environments', {
|
|
17498
17655
|
endpoint: config.TRANS_API_URL
|
|
@@ -17512,8 +17669,8 @@ module.exports =
|
|
|
17512
17669
|
|
|
17513
17670
|
function callGetTrigger(transBaseId, envId) {
|
|
17514
17671
|
return function (dispatch, getState, api) {
|
|
17515
|
-
var
|
|
17516
|
-
config =
|
|
17672
|
+
var _getState28 = getState(),
|
|
17673
|
+
config = _getState28.config;
|
|
17517
17674
|
|
|
17518
17675
|
if (transBaseId) {
|
|
17519
17676
|
return api.get('gettriggers/' + transBaseId, {
|
|
@@ -20688,7 +20845,7 @@ module.exports =
|
|
|
20688
20845
|
|
|
20689
20846
|
var _moment2 = _interopRequireDefault(_moment);
|
|
20690
20847
|
|
|
20691
|
-
__webpack_require__(
|
|
20848
|
+
__webpack_require__(219);
|
|
20692
20849
|
|
|
20693
20850
|
__webpack_require__(178);
|
|
20694
20851
|
|
|
@@ -21141,14 +21298,10 @@ module.exports =
|
|
|
21141
21298
|
change = _props6.change;
|
|
21142
21299
|
|
|
21143
21300
|
var modes = ['source', 'destination'];
|
|
21144
|
-
//const config = step[`${m}Config`]
|
|
21145
|
-
//const {credentials} = config
|
|
21146
|
-
//dont load creds for oauth, since there are none
|
|
21147
21301
|
change('sourceCredentials', { rootUrl: 'https://' });
|
|
21148
21302
|
change('destinationCredentials', { rootUrl: 'https://' });
|
|
21149
21303
|
this.setState({ sourceEnvChecking: true });
|
|
21150
21304
|
this.setState({ destinationEnvChecking: true });
|
|
21151
|
-
//if(!isOauth){
|
|
21152
21305
|
var wiz = {
|
|
21153
21306
|
source: step.sourceConfig,
|
|
21154
21307
|
destination: step.destinationConfig
|
|
@@ -21160,24 +21313,23 @@ module.exports =
|
|
|
21160
21313
|
if (resIndex === 0 || resIndex === 1) {
|
|
21161
21314
|
// main creds
|
|
21162
21315
|
if (cred && cred.credentialsJson) {
|
|
21163
|
-
|
|
21164
|
-
|
|
21165
|
-
|
|
21166
|
-
|
|
21167
|
-
|
|
21168
|
-
|
|
21169
|
-
|
|
21170
|
-
|
|
21171
|
-
|
|
21172
|
-
|
|
21173
|
-
|
|
21174
|
-
|
|
21175
|
-
|
|
21176
|
-
|
|
21177
|
-
|
|
21178
|
-
|
|
21179
|
-
|
|
21180
|
-
})();
|
|
21316
|
+
var modeCreds = cred.credentialsJson;
|
|
21317
|
+
// WHY DID I HAVE THIS?
|
|
21318
|
+
/*const {credentials} = wiz[m]
|
|
21319
|
+
const isOauth = credentials && credentials.length===1 && credentials[0]==='Oauth'
|
|
21320
|
+
const isFlatFile = credentials && credentials.length===1 && credentials[0]==='FlatFile'
|
|
21321
|
+
if(isOauth || isFlatFile){
|
|
21322
|
+
modeCreds = cred.credentialsJson
|
|
21323
|
+
} else {
|
|
21324
|
+
modeCreds['rootUrl'] = cred.credentialsJson.rootUrl
|
|
21325
|
+
credentials && credentials.length>0 && credentials.forEach(credType=>{
|
|
21326
|
+
if(cred.credentialsJson[credType]){
|
|
21327
|
+
modeCreds[credType] = cred.credentialsJson[credType]
|
|
21328
|
+
}
|
|
21329
|
+
})
|
|
21330
|
+
}*/
|
|
21331
|
+
change(m + 'Credentials', modeCreds);
|
|
21332
|
+
_this3.check(m, env, modeCreds);
|
|
21181
21333
|
} else {
|
|
21182
21334
|
_this3.setState(_defineProperty({}, m + 'EnvChecking', false));
|
|
21183
21335
|
}
|
|
@@ -21192,17 +21344,28 @@ module.exports =
|
|
|
21192
21344
|
}
|
|
21193
21345
|
}, {
|
|
21194
21346
|
key: 'setCsvFields',
|
|
21195
|
-
value: function setCsvFields(metadata, mode, providerType) {
|
|
21196
|
-
this.props
|
|
21347
|
+
value: function setCsvFields(metadata, contents, mode, providerType) {
|
|
21348
|
+
var _props7 = this.props,
|
|
21349
|
+
tenantId = _props7.tenantId,
|
|
21350
|
+
accountId = _props7.accountId,
|
|
21351
|
+
tenantKey = _props7.tenantKey,
|
|
21352
|
+
accountKey = _props7.accountKey,
|
|
21353
|
+
wizard = _props7.wizard,
|
|
21354
|
+
actions = _props7.actions,
|
|
21355
|
+
formValues = _props7.formValues;
|
|
21356
|
+
|
|
21357
|
+
var meta = wizard[mode + 'Metadata'] || [];
|
|
21358
|
+
meta = meta.concat(metadata);
|
|
21359
|
+
return actions.setCsvFields(tenantId, accountId, tenantKey, accountKey, meta, contents, mode, providerType, mode === 'source', formValues['environmentId']);
|
|
21197
21360
|
}
|
|
21198
21361
|
}, {
|
|
21199
21362
|
key: 'createCustomSettings',
|
|
21200
21363
|
value: function createCustomSettings(mode) {
|
|
21201
|
-
var
|
|
21202
|
-
wizard =
|
|
21203
|
-
step =
|
|
21204
|
-
inputs =
|
|
21205
|
-
formValues =
|
|
21364
|
+
var _props8 = this.props,
|
|
21365
|
+
wizard = _props8.wizard,
|
|
21366
|
+
step = _props8.step,
|
|
21367
|
+
inputs = _props8.inputs,
|
|
21368
|
+
formValues = _props8.formValues;
|
|
21206
21369
|
|
|
21207
21370
|
var config = step[mode + 'Config'];
|
|
21208
21371
|
var customSettings = null;
|
|
@@ -21224,16 +21387,16 @@ module.exports =
|
|
|
21224
21387
|
value: function render() {
|
|
21225
21388
|
var _this4 = this;
|
|
21226
21389
|
|
|
21227
|
-
var
|
|
21228
|
-
inputs =
|
|
21229
|
-
step =
|
|
21230
|
-
handleSubmit =
|
|
21231
|
-
nav =
|
|
21232
|
-
reset =
|
|
21233
|
-
wizard =
|
|
21234
|
-
formValues =
|
|
21235
|
-
tenantKey =
|
|
21236
|
-
accountKey =
|
|
21390
|
+
var _props9 = this.props,
|
|
21391
|
+
inputs = _props9.inputs,
|
|
21392
|
+
step = _props9.step,
|
|
21393
|
+
handleSubmit = _props9.handleSubmit,
|
|
21394
|
+
nav = _props9.nav,
|
|
21395
|
+
reset = _props9.reset,
|
|
21396
|
+
wizard = _props9.wizard,
|
|
21397
|
+
formValues = _props9.formValues,
|
|
21398
|
+
tenantKey = _props9.tenantKey,
|
|
21399
|
+
accountKey = _props9.accountKey;
|
|
21237
21400
|
|
|
21238
21401
|
var modes = ['source', 'destination'];
|
|
21239
21402
|
var selectedProvider = this.state.selectedProvider;
|
|
@@ -21341,11 +21504,14 @@ module.exports =
|
|
|
21341
21504
|
return _this4.generateNewAdapterSecret(m);
|
|
21342
21505
|
},
|
|
21343
21506
|
seeFields: _this4.seeFields.bind(_this4),
|
|
21507
|
+
metadata: wizard[m + 'Metadata'],
|
|
21344
21508
|
check: function check(actualCreds) {
|
|
21345
21509
|
return _this4.check(m, null, actualCreds);
|
|
21346
21510
|
},
|
|
21347
21511
|
tenantKey: tenantKey, accountKey: accountKey,
|
|
21348
|
-
setCsvFields:
|
|
21512
|
+
setCsvFields: function setCsvFields(meta, contents, providerType) {
|
|
21513
|
+
return _this4.setCsvFields(meta, contents, m, providerType);
|
|
21514
|
+
},
|
|
21349
21515
|
creds: formValues[m + 'Credentials'],
|
|
21350
21516
|
envCheckResult: wizard[m + 'CheckResult'],
|
|
21351
21517
|
adapterSecret: adapterSecret,
|
|
@@ -24443,6 +24609,8 @@ module.exports =
|
|
|
24443
24609
|
_createClass(WizardForm, [{
|
|
24444
24610
|
key: 'onSubmit',
|
|
24445
24611
|
value: function onSubmit(values) {
|
|
24612
|
+
var _this2 = this;
|
|
24613
|
+
|
|
24446
24614
|
var formValues = Object.assign({}, values);
|
|
24447
24615
|
//resources: Type is the real value, Name is the displayed value
|
|
24448
24616
|
//properties: Name is the real value, Label is the displayed value
|
|
@@ -24479,6 +24647,7 @@ module.exports =
|
|
|
24479
24647
|
onSubmit = _props2.onSubmit,
|
|
24480
24648
|
accountId = _props2.accountId,
|
|
24481
24649
|
tenantId = _props2.tenantId,
|
|
24650
|
+
steps = _props2.steps,
|
|
24482
24651
|
wizardConfig = _props2.wizardConfig,
|
|
24483
24652
|
onPiPost = _props2.onPiPost,
|
|
24484
24653
|
piGuid = _props2.piGuid,
|
|
@@ -24486,8 +24655,12 @@ module.exports =
|
|
|
24486
24655
|
isManagedPackage = _props2.isManagedPackage,
|
|
24487
24656
|
onGenerationError = _props2.onGenerationError;
|
|
24488
24657
|
|
|
24658
|
+
var step = steps.find(function (s, i) {
|
|
24659
|
+
return i + 1 === _this2.state.currentPage;
|
|
24660
|
+
});
|
|
24661
|
+
var isFinishClick = step.type === 'deploy';
|
|
24489
24662
|
if (true) {
|
|
24490
|
-
actions.submitWizardData(tenantId, accountId, bundles, mappings, configuration, formValues.title || wizardConfig.title || 'LingkSync', formValues.deployment || null, wizardConfig.typeId, wizardConfig.typeGuid, piGuid, onPiPost, onGenerate, onFinish, wizard.sourceMetadata || [], wizard.destinationMetadata || [], isManagedPackage, onGenerationError, formValues['environment'], formValues['environmentId']);
|
|
24663
|
+
actions.submitWizardData(tenantId, accountId, bundles, mappings, configuration, formValues.title || wizardConfig.title || 'LingkSync', formValues.deployment || null, wizardConfig.typeId, wizardConfig.typeGuid, piGuid, onPiPost, onGenerate, onFinish, wizard.sourceMetadata || [], wizard.destinationMetadata || [], isManagedPackage, onGenerationError, formValues['environment'], formValues['environmentId'], isFinishClick);
|
|
24491
24664
|
onSubmit({ complete: formValues.hasOwnProperty('deployment') });
|
|
24492
24665
|
}
|
|
24493
24666
|
}
|
|
@@ -24530,7 +24703,7 @@ module.exports =
|
|
|
24530
24703
|
}, {
|
|
24531
24704
|
key: 'render',
|
|
24532
24705
|
value: function render() {
|
|
24533
|
-
var
|
|
24706
|
+
var _this3 = this;
|
|
24534
24707
|
|
|
24535
24708
|
var currentPage = this.state.currentPage;
|
|
24536
24709
|
var _props3 = this.props,
|
|
@@ -24572,7 +24745,7 @@ module.exports =
|
|
|
24572
24745
|
_react2.default.createElement(
|
|
24573
24746
|
'div',
|
|
24574
24747
|
{ className: 'wizard-sidebar' },
|
|
24575
|
-
_react2.default.createElement(Sidebar, { steps: steps, currentPage: page, goToPage:
|
|
24748
|
+
_react2.default.createElement(Sidebar, { steps: steps, currentPage: page, goToPage: _this3.goToPage, highestPage: _this3.state.highestPage })
|
|
24576
24749
|
),
|
|
24577
24750
|
_react2.default.createElement(
|
|
24578
24751
|
'div',
|
|
@@ -24580,14 +24753,14 @@ module.exports =
|
|
|
24580
24753
|
steps.filter(function (s, i) {
|
|
24581
24754
|
return i + 1 === page;
|
|
24582
24755
|
}).map(function (step, index) {
|
|
24583
|
-
var StepComponent =
|
|
24756
|
+
var StepComponent = _this3.possibleSteps[step.type];
|
|
24584
24757
|
var nav = {
|
|
24585
24758
|
first: page === 1,
|
|
24586
24759
|
last: page === steps.length,
|
|
24587
|
-
previousPage:
|
|
24588
|
-
nextPage:
|
|
24589
|
-
exitWithoutSaving:
|
|
24590
|
-
limitBackToCurrentPage:
|
|
24760
|
+
previousPage: _this3.previousPage,
|
|
24761
|
+
nextPage: _this3.nextPage,
|
|
24762
|
+
exitWithoutSaving: _this3.exitWithoutSaving,
|
|
24763
|
+
limitBackToCurrentPage: _this3.limitBackToCurrentPage
|
|
24591
24764
|
};
|
|
24592
24765
|
return _react2.default.createElement(
|
|
24593
24766
|
'div',
|
|
@@ -24596,7 +24769,7 @@ module.exports =
|
|
|
24596
24769
|
step: step,
|
|
24597
24770
|
actions: actions,
|
|
24598
24771
|
wizard: wizard,
|
|
24599
|
-
onSubmit:
|
|
24772
|
+
onSubmit: _this3.onSubmit,
|
|
24600
24773
|
formValues: formValues,
|
|
24601
24774
|
inputs: inputs,
|
|
24602
24775
|
nav: nav,
|
|
@@ -24668,7 +24841,7 @@ module.exports =
|
|
|
24668
24841
|
|
|
24669
24842
|
var _react2 = _interopRequireDefault(_react);
|
|
24670
24843
|
|
|
24671
|
-
var _redux = __webpack_require__(
|
|
24844
|
+
var _redux = __webpack_require__(220);
|
|
24672
24845
|
|
|
24673
24846
|
var _reactRedux = __webpack_require__(75);
|
|
24674
24847
|
|
|
@@ -30183,10 +30356,16 @@ module.exports =
|
|
|
30183
30356
|
/* 218 */
|
|
30184
30357
|
/***/ function(module, exports) {
|
|
30185
30358
|
|
|
30186
|
-
module.exports = require("
|
|
30359
|
+
module.exports = require("axios");
|
|
30187
30360
|
|
|
30188
30361
|
/***/ },
|
|
30189
30362
|
/* 219 */
|
|
30363
|
+
/***/ function(module, exports) {
|
|
30364
|
+
|
|
30365
|
+
module.exports = require("moment-timezone");
|
|
30366
|
+
|
|
30367
|
+
/***/ },
|
|
30368
|
+
/* 220 */
|
|
30190
30369
|
/***/ function(module, exports) {
|
|
30191
30370
|
|
|
30192
30371
|
module.exports = require("redux");
|