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

Ansible Credential textual summary - show nicer error when credential class is missing API_ATTRIBUTES #5694

Closed
wants to merge 1 commit into from

Conversation

himdel
Copy link
Contributor

@himdel himdel commented Jun 12, 2019

Before:

badder

After:


(sans the green smudge)

It's a fatal error, it should be a fatal error, but since embedded ansible is in the process of being rewritten,
maybe it should not be a fatal error quite yet - comes from ManageIQ/manageiq#18687, Cc @NickLaMuro

Any credentials need the API_ATTRIBUTES class constant to tell the UI what fields are actually relevent,
but when it's missing, we would now show a full textual summary with missing credentials (and a non-flash warning),
instead of an error screen.

The main point of this PR is to fix travis. How we present the error .. this is a simple way, a flash message would be nicer but we have no mechanism for it on the textual summary endpoint yet.

… class is missing API_ATTRIBUTES

it's a fatal error, it should be a fatal error, but since embedded ansible is in the process of being rewritten,
maybe it should not be a fatal error quite yet

Any credentials need the API_ATTRIBUTES class constant to tell the UI what fields are actually relevent,
but when it's missing, we would now show a full textual summary with missing credentials (and a non-flash warning),
instead of an error screen.
@himdel
Copy link
Contributor Author

himdel commented Jun 12, 2019

(I don't know whether we should merge this or not, it's just something to fix travis, so that I can start working :).)

@miq-bot
Copy link
Member

miq-bot commented Jun 12, 2019

Checked commit https://github.com/himdel/manageiq-ui-classic/commit/348e09041ff38716381d986581c68a6c51974c41 with ruby 2.3.3, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 🍪

@himdel
Copy link
Contributor Author

himdel commented Jun 12, 2019

Closing in favor of ManageIQ/manageiq#18854

@himdel himdel closed this Jun 12, 2019
@himdel himdel deleted the travis-warn branch June 12, 2019 13:45
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.

2 participants