Skip to content

Commit

Permalink
Remove initial datasource screen
Browse files Browse the repository at this point in the history
  • Loading branch information
mawandm committed Jun 19, 2024
1 parent a753340 commit 88e93ce
Showing 1 changed file with 17 additions and 102 deletions.
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

0 comments on commit 88e93ce

Please sign in to comment.