Skip to content

Commit 08f785e

Browse files
authored
feat(frontend): remove initial datasource screen (#127)
Closes #64
1 parent a753340 commit 08f785e

File tree

1 file changed

+17
-102
lines changed

1 file changed

+17
-102
lines changed

nesis/frontend/client/src/pages/Settings/Datasources/DatasourcesDetailPage.js

Lines changed: 17 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -152,18 +152,22 @@ function DataSourceForm({
152152
/>
153153
<FormRow>
154154
<Column>
155-
<TextField
156-
type="text"
157-
id="name"
158-
label="Name*"
159-
placeholder="Name"
160-
name="name"
161-
validate={required}
162-
disabled={
163-
initialValues?.id !== null &&
164-
initialValues?.id !== undefined
165-
}
166-
/>
155+
{['s3', 'minio', 'windows_share', 'sharepoint'].includes(
156+
values?.type,
157+
) && (
158+
<TextField
159+
type="text"
160+
id="name"
161+
label="Name*"
162+
placeholder="Name"
163+
name="name"
164+
validate={required}
165+
disabled={
166+
initialValues?.id !== null &&
167+
initialValues?.id !== undefined
168+
}
169+
/>
170+
)}
167171
</Column>
168172
</FormRow>
169173
{values?.type == 's3' && s3Connection()}
@@ -172,96 +176,7 @@ function DataSourceForm({
172176
{values?.type == 'sharepoint' && sharepointConnection()}
173177
{!['s3', 'minio', 'windows_share', 'sharepoint'].includes(
174178
values?.type,
175-
) && (
176-
<StyledTable>
177-
<thead>
178-
<tr>
179-
<th>Attribute</th>
180-
<th>Value</th>
181-
</tr>
182-
</thead>
183-
<tbody>
184-
<tr>
185-
<td>Host *</td>
186-
<td>
187-
<TextField
188-
type="text"
189-
id="host"
190-
placeholder="Endpoint"
191-
name="connection.endpoint"
192-
validate={required}
193-
/>
194-
</td>
195-
</tr>
196-
<tr>
197-
<td>Port</td>
198-
<td>
199-
<TextField
200-
type="text"
201-
id="port"
202-
placeholder="Port"
203-
name="connection.port"
204-
/>
205-
</td>
206-
</tr>
207-
<tr>
208-
<td>Database</td>
209-
<td>
210-
<TextField
211-
type="text"
212-
id="database"
213-
placeholder="Database"
214-
name="connection.database"
215-
/>
216-
</td>
217-
</tr>
218-
<tr>
219-
<td>User</td>
220-
<td>
221-
<TextField
222-
type="text"
223-
id="user"
224-
placeholder="User"
225-
name="connection.user"
226-
/>
227-
</td>
228-
</tr>
229-
<tr>
230-
<td>Password</td>
231-
<td>
232-
<TextField
233-
type="password"
234-
id="password"
235-
placeholder="password"
236-
name="connection.password"
237-
/>
238-
</td>
239-
</tr>
240-
<tr>
241-
<td>Dataobjects</td>
242-
<td>
243-
<TextField
244-
type="text"
245-
id="dataobjects"
246-
placeholder="Dataobjects (comma separated)"
247-
name="connection.dataobjects"
248-
/>
249-
</td>
250-
</tr>
251-
<tr>
252-
<td>Schedule</td>
253-
<td>
254-
<TextField
255-
type="text"
256-
id="schedule"
257-
placeholder="Valid cron schedule"
258-
name="schedule"
259-
/>
260-
</td>
261-
</tr>
262-
</tbody>
263-
</StyledTable>
264-
)}
179+
) && <div></div>}
265180

266181
<FormControls
267182
centered

0 commit comments

Comments
 (0)