fix: entity link in errors (#22641)
## Description > Fixes broken entity link to SAAS plugins Fixes #21816 #21289 ## Type of change > Please delete options that are not relevant. - Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? - Manual ### 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 - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag ### QA activity: - [ ] Test plan has been approved by relevant developers - [ ] Test plan has been peer reviewed by QA - [ ] Cypress test cases have been added and approved by either SDET or manual QA - [ ] Organized project review call with relevant stakeholders after Round 1/2 of QA - [ ] Added Test Plan Approved label after reveiwing all Cypress test
This commit is contained in:
parent
6b98a905f4
commit
a27abaf617
|
|
@ -21,6 +21,7 @@ import history, { NavigationMethod } from "utils/history";
|
|||
import { getQueryParams } from "utils/URLUtils";
|
||||
import { datasourcesEditorIdURL, jsCollectionIdURL } from "RouteBuilder";
|
||||
import type LOG_TYPE from "entities/AppsmithConsole/logtype";
|
||||
import type { Plugin } from "api/PluginApi";
|
||||
|
||||
function ActionLink(props: EntityLinkProps) {
|
||||
const applicationId = useSelector(getCurrentApplicationId);
|
||||
|
|
@ -30,7 +31,9 @@ function ActionLink(props: EntityLinkProps) {
|
|||
if (action) {
|
||||
const { id, pageId, pluginType } = action;
|
||||
const actionConfig = getActionConfig(pluginType);
|
||||
const url = applicationId && actionConfig?.getURL(pageId, id, pluginType);
|
||||
const url =
|
||||
applicationId &&
|
||||
actionConfig?.getURL(pageId, id, pluginType, props.plugin);
|
||||
if (!url) return;
|
||||
history.push(url);
|
||||
const actionType = action.pluginType === PluginType.API ? "API" : "QUERY";
|
||||
|
|
@ -199,6 +202,7 @@ function EntityLink(props: EntityLinkProps) {
|
|||
|
||||
type EntityLinkProps = {
|
||||
uiComponent: DebuggerLinkUI;
|
||||
plugin?: Plugin;
|
||||
errorType?: LOG_TYPE;
|
||||
errorSubType?: string;
|
||||
appsmithErrorCode?: string;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ export default function LogEntityLink(props: LogItemProps) {
|
|||
// this case is highly unlikely to happen.
|
||||
return <img alt="icon" src={undefined} />;
|
||||
};
|
||||
|
||||
const plugin = props.iconId ? pluginGroups[props.iconId] : undefined;
|
||||
return (
|
||||
<div>
|
||||
{props.source && (
|
||||
|
|
@ -95,6 +95,8 @@ export default function LogEntityLink(props: LogItemProps) {
|
|||
errorType={props.logType}
|
||||
id={props.source.id}
|
||||
name={props.source.name}
|
||||
plugin={plugin}
|
||||
pluginType={props.source.pluginType}
|
||||
type={props.source.type}
|
||||
uiComponent={DebuggerLinkUI.ENTITY_NAME}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user