Skip to content

Commit 56e5247

Browse files
iamfaranraheeliftikhar5
authored andcommitted
setup sse http query
1 parent 75e635a commit 56e5247

File tree

6 files changed

+453
-1
lines changed

6 files changed

+453
-1
lines changed

client/packages/lowcoder/src/components/ResCreatePanel.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { BottomResTypeEnum } from "types/bottomRes";
1313
import { LargeBottomResIconWrapper } from "util/bottomResUtils";
1414
import type { PageType } from "../constants/pageConstants";
1515
import type { SizeType } from "antd/es/config-provider/SizeContext";
16-
import { Datasource } from "constants/datasourceConstants";
16+
import { Datasource, QUICK_SSE_HTTP_API_ID } from "constants/datasourceConstants";
1717
import {
1818
QUICK_GRAPHQL_ID,
1919
QUICK_REST_API_ID,
@@ -172,13 +172,22 @@ const ResButton = (props: {
172172
compType: "streamApi",
173173
},
174174
},
175+
175176
alasql: {
176177
label: trans("query.quickAlasql"),
177178
type: BottomResTypeEnum.Query,
178179
extra: {
179180
compType: "alasql",
180181
},
181182
},
183+
sseHttpApi: {
184+
label: trans("query.quickSseHttpAPI"),
185+
type: BottomResTypeEnum.Query,
186+
extra: {
187+
compType: "sseHttpApi",
188+
dataSourceId: QUICK_SSE_HTTP_API_ID,
189+
},
190+
},
182191
graphql: {
183192
label: trans("query.quickGraphql"),
184193
type: BottomResTypeEnum.Query,
@@ -339,6 +348,7 @@ export function ResCreatePanel(props: ResCreateModalProps) {
339348
<DataSourceListWrapper $placement={placement}>
340349
<ResButton size={buttonSize} identifier={"restApi"} onSelect={onSelect} />
341350
<ResButton size={buttonSize} identifier={"streamApi"} onSelect={onSelect} />
351+
<ResButton size={buttonSize} identifier={"sseHttpApi"} onSelect={onSelect} />
342352
<ResButton size={buttonSize} identifier={"alasql"} onSelect={onSelect} />
343353
<ResButton size={buttonSize} identifier={"graphql"} onSelect={onSelect} />
344354
<DataSourceButton size={buttonSize} onClick={() => setCurlModalVisible(true)}>

0 commit comments

Comments
 (0)