@lingk/sync 0.2.11 → 0.2.13

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.
@@ -327,7 +327,9 @@ module.exports =
327
327
  var Select = inputs.Select;
328
328
  var CodeMirror = codemirror && codemirror.Controlled;
329
329
 
330
- var databaseTypes = [{ name: 'Postgres' }, { name: 'MySQL' }];
330
+ var CloudSQLTypes = [{ name: 'Postgres' }, { name: 'MySQL' }];
331
+
332
+ var onlyJson = config.credentials && config.credentials.length === 1 && config.credentials[0] === 'json';
331
333
 
332
334
  return _react2.default.createElement(
333
335
  'div',
@@ -359,11 +361,12 @@ module.exports =
359
361
  'div',
360
362
  { style: { display: 'inline-block', width: credType !== 'databaseType' ? 300 : 164 } },
361
363
  credType !== 'databaseType' ? _react2.default.createElement(Input, { name: credType,
362
- value: creds[credType] || '', onChange: onChange }) : _react2.default.createElement(Select, { vals: databaseTypes, fieldPropLabel: 'name',
364
+ value: creds[credType] || '', onChange: onChange }) : _react2.default.createElement(Select, { vals: CloudSQLTypes, fieldPropLabel: 'name',
363
365
  label: creds[credType] || 'Database Types',
364
366
  onSelect: function onSelect(v) {
365
367
  return onChange({ target: { name: credType, value: v } });
366
- }
368
+ },
369
+ size: 'small', style: { width: 160, height: 31, textAlign: 'left' }
367
370
  })
368
371
  ) : _react2.default.createElement(CodeMirror, { value: creds[credType],
369
372
  className: 'env-creds-json-codemirror',
@@ -383,7 +386,9 @@ module.exports =
383
386
  onClick: function onClick() {
384
387
  return onCheck(creds);
385
388
  },
386
- style: { marginLeft: 8, marginBottom: 2, height: 30, lineHeight: '10px' },
389
+ style: { marginLeft: onlyJson ? 0 : 8, marginTop: onlyJson ? 8 : 0,
390
+ marginBottom: 2, height: 30, lineHeight: '10px'
391
+ },
387
392
  disabled: credsDisabledCheck },
388
393
  'Test Connection'
389
394
  )