Skip to content

Commit

Permalink
chore: Remove unused services (#30292)
Browse files Browse the repository at this point in the history
I've been doing this in pieces bit by bit, not to rock the boat too much
too fast, but it's taking too long, and too much effort. Instead opting
for a rip-the-bandaid style, hopefully without the pain.
  • Loading branch information
sharat87 authored Jan 23, 2024
1 parent 3a65d5a commit 92993cc
Show file tree
Hide file tree
Showing 125 changed files with 14 additions and 4,565 deletions.
5 changes: 0 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ APPSMITH_SIGNUP_DISABLED=
# Segment
APPSMITH_SEGMENT_KEY=

# RapidAPI
APPSMITH_RAPID_API_KEY_VALUE=
APPSMITH_MARKETPLACE_ENABLED=


# Algolia Search (Docs)
APPSMITH_ALGOLIA_API_ID=
APPSMITH_ALGOLIA_API_KEY=
Expand Down
2 changes: 0 additions & 2 deletions app/client/cypress/locators/apiWidgetslocator.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
"createApiOnSideBar": "button:contains('Create new API')",
"saveButton": "button:contains('Save')",
"addHeader": ".t--addApiHeader svg",
"marketPlaceapi": ".t--eachProviderCard p",
"addPageButton": ".t--addToPageBtn",
"apidocumentaionLink": ".t--apiDocumentationLink",
"postbody": "(//div[contains(@class,'CodeMirror-wrap')]//textarea)[2]",
"paginationTab": "//span[text()='Pagination']",
Expand Down
12 changes: 0 additions & 12 deletions app/client/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -923,10 +923,6 @@ Cypress.Commands.add("startServerAndRoutes", () => {
"getAppPageEdit",
);
cy.intercept("GET", "/api/v1/actions*").as("getActions");
cy.intercept("GET", "api/v1/providers/categories").as("getCategories");
cy.intercept("GET", "api/v1/import/templateCollections").as(
"getTemplateCollections",
);
cy.intercept("PUT", "/api/v1/pages/*").as("updatePage");
cy.intercept("PUT", "api/v1/applications/*/page/*/makeDefault").as(
"makePageDefault",
Expand Down Expand Up @@ -966,14 +962,6 @@ Cypress.Commands.add("startServerAndRoutes", () => {
"curlImport",
);
cy.intercept("DELETE", "/api/v1/actions/*").as("deleteAction");
cy.intercept(
"GET",
"/api/v1/marketplace/providers?category=*&page=*&size=*",
).as("get3PProviders");
cy.intercept("GET", "/api/v1/marketplace/templates?providerId=*").as(
"get3PProviderTemplates",
);
cy.intercept("POST", "/api/v1/items/addToPage").as("add3PApiToPage");

cy.intercept("GET", "/api/v1/plugins/*/form").as("getPluginForm");
cy.intercept("DELETE", "/api/v1/applications/*").as("deleteApplication");
Expand Down
1 change: 0 additions & 1 deletion app/client/docker/templates/nginx-app.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ server {
proxy_pass __APPSMITH_CLIENT_PROXY_PASS__;
sub_filter __APPSMITH_SENTRY_DSN__ '${APPSMITH_SENTRY_DSN}';
sub_filter __APPSMITH_SMART_LOOK_ID__ '${APPSMITH_SMART_LOOK_ID}';
sub_filter __APPSMITH_MARKETPLACE_ENABLED__ '${APPSMITH_MARKETPLACE_ENABLED}';
sub_filter __APPSMITH_SEGMENT_KEY__ '${APPSMITH_SEGMENT_KEY}';
sub_filter __APPSMITH_ALGOLIA_API_ID__ '${APPSMITH_ALGOLIA_API_ID}';
sub_filter __APPSMITH_ALGOLIA_SEARCH_INDEX_NAME__ '${APPSMITH_ALGOLIA_SEARCH_INDEX_NAME}';
Expand Down
1 change: 0 additions & 1 deletion app/client/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ module.exports = {
smartLook: {
id: parseConfig("__APPSMITH_SMART_LOOK_ID__"),
},
enableRapidAPI: parseConfig("__APPSMITH_MARKETPLACE_ENABLED__"),
segment: {
apiKey: parseConfig("__APPSMITH_SEGMENT_KEY__"),
ceKey: parseConfig("__APPSMITH_SEGMENT_CE_KEY__"),
Expand Down
13 changes: 6 additions & 7 deletions app/client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
config.indexOf("%") === 0
)
return "";

const result = config.trim();
if (result.toLowerCase() === "false" || result === "") {
return false;
} else if (result.toLowerCase() === "true") {
return true;
}

return result;
};
const CLOUD_HOSTING = parseConfig("__APPSMITH_CLOUD_HOSTING__");
Expand All @@ -44,7 +44,7 @@
NREUM = undefined
</script>
<script>

const enableNewRelic=parseConfig("__APPSMITH_NEW_RELIC_ACCOUNT_ENABLE__");
//only when newRelic is enabled do we load the browser agent script
if (!!enableNewRelic) {
Expand All @@ -55,8 +55,8 @@
//we load the new relic browser agent script from our CDN.
script.src = "https://assets.appsmith.com/newRelicBrowserAgent1.js";
script.onload = () => {
// we have defined and init function within the Browser agent script.
// This init fn gets assigned to a global var called NEW_RELIC_BROWSER_AGENT, when the script tag element loads
// we have defined and init function within the Browser agent script.
// This init fn gets assigned to a global var called NEW_RELIC_BROWSER_AGENT, when the script tag element loads
// we call the init fn with all env vars. Through this step browser agent has the required license key to push telemetry info to new relic.
NEW_RELIC_BROWSER_AGENT && NEW_RELIC_BROWSER_AGENT.init([accountId,applicationId,browserAgentlicenseKey]);
};
Expand Down Expand Up @@ -265,7 +265,6 @@
smartLook: {
id: parseConfig("__APPSMITH_SMART_LOOK_ID__"),
},
enableRapidAPI: parseConfig("__APPSMITH_MARKETPLACE_ENABLED__"),
segment: {
apiKey: parseConfig("__APPSMITH_SEGMENT_KEY__"),
ceKey: parseConfig("__APPSMITH_SEGMENT_CE_KEY__"),
Expand All @@ -278,7 +277,7 @@
otlpLicenseKey: parseConfig("__APPSMITH_NEW_RELIC_OTLP_LICENSE_KEY__"),
//OTLP following the naming convention of Sdk initialisation
otlpServiceName: parseConfig("__APPSMITH_NEW_RELIC_OTEL_SERVICE_NAME__"),
otlpEndpoint:parseConfig("__APPSMITH_NEW_RELIC_OTEL_EXPORTER_OTLP_ENDPOINT__"),
otlpEndpoint:parseConfig("__APPSMITH_NEW_RELIC_OTEL_EXPORTER_OTLP_ENDPOINT__"),

},
fusioncharts: {
Expand Down
7 changes: 0 additions & 7 deletions app/client/src/actions/collectionAction.ts

This file was deleted.

61 changes: 0 additions & 61 deletions app/client/src/actions/providerActions.ts

This file was deleted.

14 changes: 0 additions & 14 deletions app/client/src/api/CollectionApi.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/client/src/api/PluginApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export enum UIComponentTypes {
DbEditorForm = "DbEditorForm",
UQIDbEditorForm = "UQIDbEditorForm",
ApiEditorForm = "ApiEditorForm",
RapidApiEditorForm = "RapidApiEditorForm",
JsEditorForm = "JsEditorForm",
}

Expand Down
118 changes: 0 additions & 118 deletions app/client/src/api/ProvidersApi.ts

This file was deleted.

10 changes: 0 additions & 10 deletions app/client/src/ce/RouteBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,6 @@ export const curlImportPageURL = (props: URLBuilderParams): string =>
suffix: "api/curl/curl-import",
});

export const providerTemplatesURL = (
props: URLBuilderParams & {
providerId: string;
},
): string =>
urlBuilder.build({
...props,
suffix: `api/provider/${props.providerId}`,
});

export const saasEditorDatasourceIdURL = (
props: URLBuilderParams & {
pluginPackageName: string;
Expand Down
1 change: 0 additions & 1 deletion app/client/src/ce/api/ApiUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const appsmithConfig = getAppsmithConfigs();

export const BLOCKED_ROUTES = [
"v1/app-templates",
"v1/marketplace",
"v1/datasources/mocks",
"v1/usage-pulse",
"v1/applications/releaseItems",
Expand Down
8 changes: 0 additions & 8 deletions app/client/src/ce/configs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export interface INJECTED_CONFIGS {
smartLook: {
id: string;
};
enableRapidAPI: boolean;
segment: {
apiKey: string;
ceKey: string;
Expand Down Expand Up @@ -103,9 +102,6 @@ export const getConfigsFromEnvVars = (): INJECTED_CONFIGS => {
| "debug"
| "error"
| undefined) || "error",
enableRapidAPI: process.env.REACT_APP_MARKETPLACE_URL
? process.env.REACT_APP_MARKETPLACE_URL.length > 0
: false,
cloudHosting: process.env.REACT_APP_CLOUD_HOSTING
? process.env.REACT_APP_CLOUD_HOSTING.length > 0
: false,
Expand Down Expand Up @@ -284,10 +280,6 @@ export const getAppsmithConfigs = (): AppsmithUIConfigs => {
enabled: googleRecaptchaSiteKey.enabled,
apiKey: googleRecaptchaSiteKey.value,
},
enableRapidAPI:
ENV_CONFIG.enableRapidAPI ||
APPSMITH_FEATURE_CONFIGS?.enableRapidAPI ||
false,
enableMixpanel:
ENV_CONFIG.enableMixpanel ||
APPSMITH_FEATURE_CONFIGS?.enableMixpanel ||
Expand Down
1 change: 0 additions & 1 deletion app/client/src/ce/configs/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export interface AppsmithUIConfigs {
snippetIndex: string;
};

enableRapidAPI: boolean;
enableMixpanel: boolean;

cloudHosting: boolean;
Expand Down
Loading

0 comments on commit 92993cc

Please sign in to comment.