ToolJet/frontend/src/Editor/DataSourceManager/Postgresql.jsx

51 lines
2.3 KiB
React
Raw Normal View History

2021-04-06 03:45:11 +00:00
import React from 'react';
import Button from 'react-bootstrap/Button';
export const Postgresql = ({ optionchanged, createDataSource, options }) => {
return (
<div>
<div className="row">
<div className="col-md-9">
2021-04-09 15:59:27 +00:00
<label className="form-label">Host</label>
<input type="text" className="form-control" onChange={(e) => optionchanged('host', e.target.value)} value={options.host} />
2021-04-06 03:45:11 +00:00
</div>
<div className="col-md-3">
2021-04-09 15:59:27 +00:00
<label className="form-label">Port</label>
<input type="text" className="form-control" onChange={(e) => optionchanged('port', e.target.value)} value={options.port} />
2021-04-06 03:45:11 +00:00
</div>
</div>
<div className="row mt-3">
<div className="col-md-4">
2021-04-09 15:59:27 +00:00
<label className="form-label">Database Name</label>
<input type="text" className="form-control" onChange={(e) => optionchanged('database', e.target.value)} value={options.database} />
2021-04-06 03:45:11 +00:00
</div>
<div className="col-md-4">
2021-04-09 15:59:27 +00:00
<label className="form-label">Username</label>
<input type="text" className="form-control" onChange={(e) => optionchanged('username', e.target.value)} value={options.username} />
2021-04-06 03:45:11 +00:00
</div>
<div className="col-md-4">
2021-04-09 15:59:27 +00:00
<label className="form-label">Password</label>
<input type="text" className="form-control" onChange={(e) => optionchanged('password', e.target.value)} value={options.password} />
2021-04-06 03:45:11 +00:00
</div>
</div>
<div className="row mt-3">
2021-04-06 10:01:05 +00:00
<div className="col">
2021-04-06 03:45:11 +00:00
</div>
2021-04-06 10:01:05 +00:00
<div className="col-auto">
2021-04-06 03:45:11 +00:00
<Button className="m-2" variant="light" onClick={() => hideModal()} >
Cancel
</Button>
<Button className="m-2" variant="success" onClick={() => hideModal()} >
Test
</Button>
<Button className="m-2" variant="primary" onClick={createDataSource}>
Save
</Button>
</div>
</div>
</div>
);
}