Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): show association error in association dialog #3802

Closed
wants to merge 1 commit into from

Conversation

robertsLando
Copy link
Member

Fixes #3801

@coveralls
Copy link

Pull Request Test Coverage Report for Build 9854501189

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 21.08%

Totals Coverage Status
Change from base Build 9853888758: 0.0%
Covered Lines: 3899
Relevant Lines: 19672

💛 - Coveralls

@robertsLando robertsLando requested a review from AlCalzone July 9, 2024 09:32
Comment on lines +193 to +206
allowedAssociation() {
const mainNode = this.node
const targetNode = this.group.target

if (!mainNode || !targetNode) {
return true
}

if (mainNode.security !== targetNode.security) {
return `Association not allowed, "${targetNode._name}" security is different from "${mainNode._name}"`
}

return true
},
Copy link
Member

Choose a reason for hiding this comment

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

No, use Controller.checkAssociation to figure out if the association is allowed and if not, why not. Then display a different message for each reason.

Copy link
Member

Choose a reason for hiding this comment

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

The screenshot in the issue was just one example.

Copy link
Member Author

@robertsLando robertsLando Jul 9, 2024

Choose a reason for hiding this comment

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

Is that actually exported from safe somewhere? Also is that only available in v13?

Copy link
Member

Choose a reason for hiding this comment

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

The idea is to make a backend api call, the backend calls driver.controller.checkAssociation and passes the result back.

This requires v13 because the method and AssociationCheckResult was only added there.

@robertsLando
Copy link
Member Author

Supersided by #3804

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show in the association dialog if and why an association is now allowed
3 participants