fix: start with data flow Rest api and graphql api in Apis section (#30799)
This commit is contained in:
parent
d1bf668f7d
commit
13c7af7bfc
|
|
@ -89,6 +89,7 @@ function CreateNewAPI({
|
||||||
active,
|
active,
|
||||||
history,
|
history,
|
||||||
isCreating,
|
isCreating,
|
||||||
|
isOnboardingScreen,
|
||||||
pageId,
|
pageId,
|
||||||
showUnsupportedPluginDialog,
|
showUnsupportedPluginDialog,
|
||||||
}: any) {
|
}: any) {
|
||||||
|
|
@ -114,6 +115,7 @@ function CreateNewAPI({
|
||||||
<NewApiScreen
|
<NewApiScreen
|
||||||
history={history}
|
history={history}
|
||||||
isCreating={isCreating}
|
isCreating={isCreating}
|
||||||
|
isOnboardingScreen={isOnboardingScreen}
|
||||||
location={location}
|
location={location}
|
||||||
pageId={pageId}
|
pageId={pageId}
|
||||||
showSaasAPIs={false}
|
showSaasAPIs={false}
|
||||||
|
|
@ -318,6 +320,7 @@ class CreateNewDatasourceTab extends React.Component<
|
||||||
active={false}
|
active={false}
|
||||||
history={history}
|
history={history}
|
||||||
isCreating={isCreating}
|
isCreating={isCreating}
|
||||||
|
isOnboardingScreen={!!isOnboardingScreen}
|
||||||
location={location}
|
location={location}
|
||||||
pageId={pageId}
|
pageId={pageId}
|
||||||
showUnsupportedPluginDialog={this.showUnsupportedPluginDialog}
|
showUnsupportedPluginDialog={this.showUnsupportedPluginDialog}
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,7 @@ interface ApiHomeScreenProps {
|
||||||
parentEntityType: ActionParentEntityTypeInterface,
|
parentEntityType: ActionParentEntityTypeInterface,
|
||||||
apiType: string,
|
apiType: string,
|
||||||
) => void;
|
) => void;
|
||||||
|
isOnboardingScreen?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
type Props = ApiHomeScreenProps;
|
type Props = ApiHomeScreenProps;
|
||||||
|
|
@ -154,7 +155,14 @@ export const API_ACTION = {
|
||||||
};
|
};
|
||||||
|
|
||||||
function NewApiScreen(props: Props) {
|
function NewApiScreen(props: Props) {
|
||||||
const { history, isCreating, pageId, plugins, showSaasAPIs } = props;
|
const {
|
||||||
|
history,
|
||||||
|
isCreating,
|
||||||
|
isOnboardingScreen,
|
||||||
|
pageId,
|
||||||
|
plugins,
|
||||||
|
showSaasAPIs,
|
||||||
|
} = props;
|
||||||
const editorType = useEditorType(location.pathname);
|
const editorType = useEditorType(location.pathname);
|
||||||
const { editorId, parentEntityId, parentEntityType } =
|
const { editorId, parentEntityId, parentEntityType } =
|
||||||
useParentEntityInfo(editorType);
|
useParentEntityInfo(editorType);
|
||||||
|
|
@ -190,7 +198,8 @@ function NewApiScreen(props: Props) {
|
||||||
props.createNewApiActionBasedOnEditorType(
|
props.createNewApiActionBasedOnEditorType(
|
||||||
editorType,
|
editorType,
|
||||||
editorId,
|
editorId,
|
||||||
parentEntityId,
|
// Set parentEntityId as (parentEntityId or if it is onboarding screen then set it as pageId) else empty string
|
||||||
|
parentEntityId || (isOnboardingScreen && pageId) || "",
|
||||||
parentEntityType,
|
parentEntityType,
|
||||||
source === API_ACTION.CREATE_NEW_GRAPHQL_API
|
source === API_ACTION.CREATE_NEW_GRAPHQL_API
|
||||||
? PluginPackageName.GRAPHQL
|
? PluginPackageName.GRAPHQL
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user