@@ -13,6 +13,7 @@ import { DatasourceType } from "@lowcoder-ee/constants/queryConstants";
13
13
import { getDatasourceTutorial } from "@lowcoder-ee/util/tutorialUtils" ;
14
14
import { getDataSourceFormManifest } from "./getDataSourceFormManifest" ;
15
15
import DataSourceIcon from "components/DataSourceIcon" ;
16
+ import { Helmet } from "react-helmet" ;
16
17
17
18
const Wrapper = styled . div `
18
19
display: flex;
@@ -190,7 +191,7 @@ export const DatasourceEditPage = () => {
190
191
const DatasourceForm = formManifest ?. form ;
191
192
192
193
return (
193
- < Wrapper >
194
+ < > < Helmet > { < title > { trans ( "home.datasource" ) } | { finalDataSourceType } </ title > } </ Helmet > < Wrapper >
194
195
< ContentWrapper >
195
196
< Header >
196
197
< BackBtn onClick = { ( ) => history . push ( DATASOURCE_URL ) } >
@@ -223,8 +224,7 @@ export const DatasourceEditPage = () => {
223
224
onFormReadyStatusChange = { handleFormReadyStatusChange }
224
225
dataSourceTypeInfo = { dataSourceTypeInfo }
225
226
datasource = { datasourceInfo ?. datasource ! }
226
- size = { "middle" }
227
- />
227
+ size = { "middle" } />
228
228
) }
229
229
230
230
{ formManifest && (
@@ -233,14 +233,12 @@ export const DatasourceEditPage = () => {
233
233
< TacoButton
234
234
buttonType = "link"
235
235
loading = { testLoading }
236
- onClick = { ( ) =>
237
- resolveTest (
238
- genRequest ( {
239
- datasourceId : datasourceId ,
240
- datasourceType : datasourceType ?? datasourceInfo ?. datasource . type ,
241
- } )
242
- )
243
- }
236
+ onClick = { ( ) => resolveTest (
237
+ genRequest ( {
238
+ datasourceId : datasourceId ,
239
+ datasourceType : datasourceType ?? datasourceInfo ?. datasource . type ,
240
+ } )
241
+ ) }
244
242
>
245
243
{ trans ( "query.testConnection" ) }
246
244
</ TacoButton >
@@ -250,16 +248,14 @@ export const DatasourceEditPage = () => {
250
248
buttonType = "primary"
251
249
loading = { createLoading }
252
250
disabled = { ! isReady }
253
- onClick = { ( ) =>
254
- resolveCreate ( {
251
+ onClick = { ( ) => resolveCreate ( {
252
+ datasourceId : datasourceId ,
253
+ request : genRequest ( {
255
254
datasourceId : datasourceId ,
256
- request : genRequest ( {
257
- datasourceId : datasourceId ,
258
- datasourceType : datasourceType ?? datasourceInfo ?. datasource . type ,
259
- } ) ,
260
- afterCreate : ( ) => history . push ( DATASOURCE_URL ) ,
261
- } )
262
- }
255
+ datasourceType : datasourceType ?? datasourceInfo ?. datasource . type ,
256
+ } ) ,
257
+ afterCreate : ( ) => history . push ( DATASOURCE_URL ) ,
258
+ } ) }
263
259
>
264
260
{ ! createLoading && trans ( "query.save" ) }
265
261
</ TacoButton >
@@ -290,6 +286,6 @@ export const DatasourceEditPage = () => {
290
286
) }
291
287
</ Body >
292
288
</ ContentWrapper >
293
- </ Wrapper >
289
+ </ Wrapper > </ >
294
290
) ;
295
291
} ;
0 commit comments