Skip to content

Commit 9311e81

Browse files
author
FalkWolsky
committed
Removing LowcoderAPI as AdHoc DataSource
1 parent e45d6cd commit 9311e81

File tree

6 files changed

+1
-58
lines changed

6 files changed

+1
-58
lines changed

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import type { PageType } from "../constants/pageConstants";
1515
import type { SizeType } from "antd/es/config-provider/SizeContext";
1616
import { Datasource } from "constants/datasourceConstants";
1717
import {
18-
LOWCODER_API_ID,
19-
LOWCODER_API_INFO,
2018
QUICK_GRAPHQL_ID,
2119
QUICK_REST_API_ID,
2220
} from "../constants/datasourceConstants";
@@ -179,15 +177,6 @@ const ResButton = (props: {
179177
dataSourceId: QUICK_GRAPHQL_ID,
180178
},
181179
},
182-
lowcoderApi: {
183-
icon: LOWCODER_API_INFO.icon,
184-
label: LOWCODER_API_INFO.name,
185-
type: BottomResTypeEnum.Query,
186-
extra: {
187-
compType: "lowcoderApi",
188-
dataSourceId: LOWCODER_API_ID,
189-
},
190-
},
191180
};
192181

193182
if (typeof props.identifier === "object") {
@@ -331,10 +320,6 @@ export function ResCreatePanel(props: ResCreateModalProps) {
331320
<ResButton size={buttonSize} identifier={"restApi"} onSelect={onSelect} />
332321
<ResButton size={buttonSize} identifier={"streamApi"} onSelect={onSelect} />
333322
<ResButton size={buttonSize} identifier={"graphql"} onSelect={onSelect} />
334-
{placement === "editor" && (
335-
<ResButton size={buttonSize} identifier={"lowcoderApi"} onSelect={onSelect} />
336-
)}
337-
338323
{datasource.map((i) => (
339324
<ResButton size={buttonSize} key={i.id} identifier={i} onSelect={onSelect} />
340325
))}

client/packages/lowcoder/src/comps/queries/queryComp/queryPropertyView.tsx

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { manualTriggerResource, ResourceType } from "@lowcoder-ee/constants/quer
33
import { PreparedStatementConfig } from "api/datasourceApi";
44
import { isCompWithPropertyView } from "comps/utils/propertyUtils";
55
import {
6-
LOWCODER_API_ID,
76
QUICK_GRAPHQL_ID,
87
QUICK_REST_API_ID,
98
} from "constants/datasourceConstants";
@@ -197,17 +196,6 @@ export const QueryGeneralPropertyView = (props: {
197196
)?.datasource.id,
198197
[datasource]
199198
);
200-
if (datasourceId === oldLowcoderId) {
201-
datasourceId = LOWCODER_API_ID;
202-
datasourceType = "lowcoderApi";
203-
dispatch(
204-
comp.changeValueAction({
205-
...comp.toJsonValue(),
206-
datasourceId: LOWCODER_API_ID,
207-
compType: "lowcoderApi",
208-
} as any)
209-
);
210-
}
211199

212200
return (
213201
<QueryPropertyViewWrapper>
@@ -445,8 +433,7 @@ function useDatasourceStatus(datasourceId: string, datasourceType: ResourceType)
445433
datasourceType === "streamApi" ||
446434
datasourceType === "libraryQuery" ||
447435
datasourceId === QUICK_REST_API_ID ||
448-
datasourceId === QUICK_GRAPHQL_ID ||
449-
datasourceId === LOWCODER_API_ID
436+
datasourceId === QUICK_GRAPHQL_ID
450437
) {
451438
return "";
452439
}

client/packages/lowcoder/src/comps/queries/resourceDropdown.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ import { getBottomResIcon } from "@lowcoder-ee/util/bottomResUtils";
1313
import { trans } from "i18n";
1414
import { DatasourceType, ResourceType } from "@lowcoder-ee/constants/queryConstants";
1515
import {
16-
LOWCODER_API_ID,
17-
LOWCODER_API_INFO,
1816
QUICK_GRAPHQL_ID,
1917
QUICK_REST_API_ID,
2018
} from "constants/datasourceConstants";
@@ -104,11 +102,6 @@ const QuickGraphqlValue: ResourceOptionValue = {
104102
type: "graphql",
105103
};
106104

107-
const LowcoderAPIValue: ResourceOptionValue = {
108-
id: LOWCODER_API_ID,
109-
type: "lowcoderApi",
110-
};
111-
112105
interface ResourceDropdownProps {
113106
changeResource: (datasourceId: string, value: string) => void;
114107
selectedResource: ResourceOptionValue;
@@ -286,17 +279,6 @@ export const ResourceDropdown = (props: ResourceDropdownProps) => {
286279

287280
{context?.placement !== "queryLibrary" && (
288281
<>
289-
<SelectOption
290-
key={JSON.stringify(LowcoderAPIValue)}
291-
label={LOWCODER_API_INFO.name}
292-
value={JSON.stringify(LowcoderAPIValue)}
293-
>
294-
<SelectOptionContains>
295-
{LOWCODER_API_INFO.icon}
296-
<SelectOptionLabel>{LOWCODER_API_INFO.name} </SelectOptionLabel>
297-
</SelectOptionContains>
298-
</SelectOption>
299-
300282
<SelectOption
301283
key={JSON.stringify(JSOptionValue)}
302284
label={trans("query.executeJSCode")}

client/packages/lowcoder/src/constants/datasourceConstants.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,4 @@ export interface Datasource {
4242

4343
export const QUICK_REST_API_ID = "#QUICK_REST_API";
4444
export const QUICK_GRAPHQL_ID = "#QUICK_GRAPHQL";
45-
export const LOWCODER_API_ID = "#LOWCODER_API";
46-
export const LOWCODER_API_INFO = {
47-
icon: getBottomResIcon("lowcoderApi"),
48-
name: trans("query.lowcoderAPI"),
49-
};
5045
export const OLD_LOWCODER_DATASOURCE: Partial<DatasourceType>[] = [];

client/packages/lowcoder/src/constants/queryConstants.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { SQLQuery } from "../comps/queries/sqlQuery/SQLQuery";
33
import { HttpQuery } from "../comps/queries/httpQuery/httpQuery";
44
import { StreamQuery } from "../comps/queries/httpQuery/streamQuery";
55
import { MongoQuery } from "../comps/queries/mongoQuery";
6-
import { LowcoderQuery } from "../comps/queries/lowcoderQuery";
76
import { RedisQuery } from "../comps/queries/redisQuery";
87
import { EsQuery } from "../comps/queries/esQuery";
98
import { SMTPQuery } from "../comps/queries/smtpQuery";
@@ -21,7 +20,6 @@ export type DatasourceType =
2120
| "restApi"
2221
| "streamApi"
2322
| "postgres"
24-
| "lowcoderApi"
2523
| "redis"
2624
| "es"
2725
| "mssql"
@@ -42,7 +40,6 @@ export const QueryMap = {
4240
streamApi: StreamQuery,
4341
mongodb: MongoQuery,
4442
postgres: SQLQuery,
45-
lowcoderApi: LowcoderQuery,
4643
redis: RedisQuery,
4744
es: EsQuery,
4845
mssql: SQLQuery,

client/packages/lowcoder/src/util/bottomResUtils.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
MongoIcon,
1616
MSSQLIcon,
1717
MysqlIcon,
18-
LowcoderQueryIcon,
1918
OptionsApiIcon,
2019
OracleIcon,
2120
PatchApiIcon,
@@ -131,8 +130,6 @@ export const getBottomResIcon = (
131130
return <GoogleSheetsIcon />;
132131
case "graphql":
133132
return <GraphqlIcon />;
134-
case "lowcoderApi":
135-
return <LowcoderQueryIcon />;
136133
case "snowflake":
137134
return <SnowflakeIcon />;
138135
case "mariadb":

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy