fix: Airgap instance issues (#30924)
## Description - 30919 : Since airgap instance doesn't allow saas and ai datasources hence the dividers with no datasources were present - 30920 : The members link is removed from individual app settings #### PR fixes following issue(s) Fixes #30919 Fixes #30920 > if no issue exists, please create an issue and ask the maintainers about this first > > #### Media > A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video > > #### Type of change > Please delete options that are not relevant. - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) - Breaking change (fix or feature that would cause existing functionality to not work as expected) - Chore (housekeeping or task changes that don't impact user perception) - This change requires a documentation update > > > ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [ ] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Improved the visual layout and organization in the creation of new SaaS and AI integrations interface. - Simplified logic and removed unused functions in the ApplicationCard component. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
70d1e33542
commit
39b7d4bb66
|
|
@ -1,16 +1,5 @@
|
|||
import type { MenuItemProps } from "design-system-old";
|
||||
import _ from "lodash";
|
||||
|
||||
export const addItemsInContextMenu = (
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
args: boolean[],
|
||||
history: any,
|
||||
workspaceId: string,
|
||||
moreActionItems: MenuItemProps[],
|
||||
) => {
|
||||
return moreActionItems;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export const getHtmlPageTitle = (instanceName: string) => {
|
||||
return "Appsmith";
|
||||
|
|
|
|||
|
|
@ -49,15 +49,11 @@ import { builderURL, viewerURL } from "@appsmith/RouteBuilder";
|
|||
import history from "utils/history";
|
||||
import urlBuilder from "@appsmith/entities/URLRedirect/URLAssembly";
|
||||
import { toast } from "design-system";
|
||||
import { getAppsmithConfigs } from "@appsmith/configs";
|
||||
import { addItemsInContextMenu } from "@appsmith/utils";
|
||||
import { getCurrentUser } from "actions/authActions";
|
||||
import Card, { ContextMenuTrigger } from "components/common/Card";
|
||||
import { generateEditedByText } from "./helpers";
|
||||
import { noop } from "lodash";
|
||||
|
||||
const { cloudHosting } = getAppsmithConfigs();
|
||||
|
||||
interface ApplicationCardProps {
|
||||
application: ApplicationPayload;
|
||||
share?: (applicationId: string) => void;
|
||||
|
|
@ -161,18 +157,7 @@ export function ApplicationCard(props: ApplicationCardProps) {
|
|||
"data-testid": "t--export-app",
|
||||
});
|
||||
}
|
||||
const updatedMoreActionItems: ModifiedMenuItemProps[] =
|
||||
addItemsInContextMenu(
|
||||
[
|
||||
props.permissions?.hasManageWorkspacePermissions || false,
|
||||
props.permissions?.canInviteToWorkspace || false,
|
||||
!cloudHosting,
|
||||
],
|
||||
history,
|
||||
props.workspaceId,
|
||||
moreActionItems,
|
||||
);
|
||||
setMoreActionItems(updatedMoreActionItems);
|
||||
setMoreActionItems(moreActionItems);
|
||||
addDeleteOption();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
|
|
|||
|
|
@ -194,17 +194,20 @@ function CreateNewSaasIntegration({
|
|||
}
|
||||
}, [active]);
|
||||
return !isAirgappedInstance ? (
|
||||
<div id="new-saas-api" ref={newSaasAPIRef}>
|
||||
<Text kind="heading-m">SaaS Integrations</Text>
|
||||
<NewApiScreen
|
||||
history={history}
|
||||
isCreating={isCreating}
|
||||
location={location}
|
||||
pageId={pageId}
|
||||
showSaasAPIs
|
||||
showUnsupportedPluginDialog={showUnsupportedPluginDialog}
|
||||
/>
|
||||
</div>
|
||||
<>
|
||||
<StyledDivider />
|
||||
<div id="new-saas-api" ref={newSaasAPIRef}>
|
||||
<Text kind="heading-m">SaaS Integrations</Text>
|
||||
<NewApiScreen
|
||||
history={history}
|
||||
isCreating={isCreating}
|
||||
location={location}
|
||||
pageId={pageId}
|
||||
showSaasAPIs
|
||||
showUnsupportedPluginDialog={showUnsupportedPluginDialog}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
) : null;
|
||||
}
|
||||
|
||||
|
|
@ -217,17 +220,20 @@ function CreateNewAIIntegration({
|
|||
const isAirgappedInstance = isAirgapped();
|
||||
|
||||
return !isAirgappedInstance ? (
|
||||
<div id="new-ai-query">
|
||||
<Text kind="heading-m">AI Integrations</Text>
|
||||
<AIDataSources
|
||||
history={history}
|
||||
isCreating={isCreating}
|
||||
location={location}
|
||||
pageId={pageId}
|
||||
showSaasAPIs
|
||||
showUnsupportedPluginDialog={showUnsupportedPluginDialog}
|
||||
/>
|
||||
</div>
|
||||
<>
|
||||
<StyledDivider />
|
||||
<div id="new-ai-query">
|
||||
<Text kind="heading-m">AI Integrations</Text>
|
||||
<AIDataSources
|
||||
history={history}
|
||||
isCreating={isCreating}
|
||||
location={location}
|
||||
pageId={pageId}
|
||||
showSaasAPIs
|
||||
showUnsupportedPluginDialog={showUnsupportedPluginDialog}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
) : null;
|
||||
}
|
||||
|
||||
|
|
@ -325,7 +331,6 @@ class CreateNewDatasourceTab extends React.Component<
|
|||
pageId={pageId}
|
||||
showUnsupportedPluginDialog={this.showUnsupportedPluginDialog}
|
||||
/>
|
||||
<StyledDivider />
|
||||
<CreateNewSaasIntegration
|
||||
active={false}
|
||||
history={history}
|
||||
|
|
@ -334,7 +339,6 @@ class CreateNewDatasourceTab extends React.Component<
|
|||
pageId={pageId}
|
||||
showUnsupportedPluginDialog={this.showUnsupportedPluginDialog}
|
||||
/>
|
||||
<StyledDivider />
|
||||
<CreateNewAIIntegration
|
||||
history={history}
|
||||
isCreating={isCreating}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user