Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(frontend): remove initial datasource screen #127

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,18 +152,22 @@ function DataSourceForm({
/>
<FormRow>
<Column>
<TextField
type="text"
id="name"
label="Name*"
placeholder="Name"
name="name"
validate={required}
disabled={
initialValues?.id !== null &&
initialValues?.id !== undefined
}
/>
{['s3', 'minio', 'windows_share', 'sharepoint'].includes(
values?.type,
) && (
<TextField
type="text"
id="name"
label="Name*"
placeholder="Name"
name="name"
validate={required}
disabled={
initialValues?.id !== null &&
initialValues?.id !== undefined
}
/>
)}
</Column>
</FormRow>
{values?.type == 's3' && s3Connection()}
Expand All @@ -172,96 +176,7 @@ function DataSourceForm({
{values?.type == 'sharepoint' && sharepointConnection()}
{!['s3', 'minio', 'windows_share', 'sharepoint'].includes(
values?.type,
) && (
<StyledTable>
<thead>
<tr>
<th>Attribute</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Host *</td>
<td>
<TextField
type="text"
id="host"
placeholder="Endpoint"
name="connection.endpoint"
validate={required}
/>
</td>
</tr>
<tr>
<td>Port</td>
<td>
<TextField
type="text"
id="port"
placeholder="Port"
name="connection.port"
/>
</td>
</tr>
<tr>
<td>Database</td>
<td>
<TextField
type="text"
id="database"
placeholder="Database"
name="connection.database"
/>
</td>
</tr>
<tr>
<td>User</td>
<td>
<TextField
type="text"
id="user"
placeholder="User"
name="connection.user"
/>
</td>
</tr>
<tr>
<td>Password</td>
<td>
<TextField
type="password"
id="password"
placeholder="password"
name="connection.password"
/>
</td>
</tr>
<tr>
<td>Dataobjects</td>
<td>
<TextField
type="text"
id="dataobjects"
placeholder="Dataobjects (comma separated)"
name="connection.dataobjects"
/>
</td>
</tr>
<tr>
<td>Schedule</td>
<td>
<TextField
type="text"
id="schedule"
placeholder="Valid cron schedule"
name="schedule"
/>
</td>
</tr>
</tbody>
</StyledTable>
)}
) && <div></div>}

<FormControls
centered
Expand Down