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,
|
||||
history,
|
||||
isCreating,
|
||||
isOnboardingScreen,
|
||||
pageId,
|
||||
showUnsupportedPluginDialog,
|
||||
}: any) {
|
||||
|
|
@ -114,6 +115,7 @@ function CreateNewAPI({
|
|||
<NewApiScreen
|
||||
history={history}
|
||||
isCreating={isCreating}
|
||||
isOnboardingScreen={isOnboardingScreen}
|
||||
location={location}
|
||||
pageId={pageId}
|
||||
showSaasAPIs={false}
|
||||
|
|
@ -318,6 +320,7 @@ class CreateNewDatasourceTab extends React.Component<
|
|||
active={false}
|
||||
history={history}
|
||||
isCreating={isCreating}
|
||||
isOnboardingScreen={!!isOnboardingScreen}
|
||||
location={location}
|
||||
pageId={pageId}
|
||||
showUnsupportedPluginDialog={this.showUnsupportedPluginDialog}
|
||||
|
|
|
|||
|
|
@ -141,6 +141,7 @@ interface ApiHomeScreenProps {
|
|||
parentEntityType: ActionParentEntityTypeInterface,
|
||||
apiType: string,
|
||||
) => void;
|
||||
isOnboardingScreen?: boolean;
|
||||
}
|
||||
|
||||
type Props = ApiHomeScreenProps;
|
||||
|
|
@ -154,7 +155,14 @@ export const API_ACTION = {
|
|||
};
|
||||
|
||||
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 { editorId, parentEntityId, parentEntityType } =
|
||||
useParentEntityInfo(editorType);
|
||||
|
|
@ -190,7 +198,8 @@ function NewApiScreen(props: Props) {
|
|||
props.createNewApiActionBasedOnEditorType(
|
||||
editorType,
|
||||
editorId,
|
||||
parentEntityId,
|
||||
// Set parentEntityId as (parentEntityId or if it is onboarding screen then set it as pageId) else empty string
|
||||
parentEntityId || (isOnboardingScreen && pageId) || "",
|
||||
parentEntityType,
|
||||
source === API_ACTION.CREATE_NEW_GRAPHQL_API
|
||||
? PluginPackageName.GRAPHQL
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user