Skip to content

Conversation

@shaohuzhang1
Copy link
Contributor

fix: [Application] An application that adds interface parameters, clicks on the application list page to initiate a conversation, but does not carry interface parameters

…cks on the application list page to initiate a conversation, but does not carry interface parameters
@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Sep 26, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Sep 26, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

window.open(application.location + res?.data?.access_token + apiParams)
})
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code appears syntactically correct and generally efficient for its purpose. However, there's one potential issue related to asynchronous operations and error handling. The Promise.all method is not used in your code, which means that if multiple API calls are made concurrently, you may end up with race conditions.

Additionally, the loading variable is referenced within the .then() callback, but it doesn't appear to be declared anywhere in the provided snippet. You should ensure that loading is properly initialized before being used.

Furthermore, the last line of else condition inside the .then() block will cause an error because application.location might not exist or could lead to unexpected behavior due to the undefined nature of aips. It would be better to handle this case more gracefully.

Here’s a revised version of the last part of the code:

if (!aips || !aips.length) {
  ApplicationApi.getAccessToken(row.id, loading).then((res: any) => {
    // Assuming application location exists here
    const accessTokenEndpoint = `${application.location}api/auth/access-token`;
    const urlParams = '?';
    window.open(`${accessTokenEndpoint}${urlParams}accesstoken=${encodeURIComponent(res.data.accessToken)}${apiParams}`);
    // Reset input parameters to initial state since no valid inputs were found
    search_form.value = { name: '', create_user: '' };
  });
}

Also, make sure that all necessary variables like search_form, row.id, ApplicationApi, and mapToUrlParams are defined elsewhere in the code or imported correctly according to their usage context.

@shaohuzhang1 shaohuzhang1 merged commit 8d4bad5 into v2 Sep 26, 2025
4 of 6 checks passed
@shaohuzhang1 shaohuzhang1 deleted the pr@v2@fix_application branch September 26, 2025 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants