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

Fixed bug with "Loading..." message when SSH key is empty. #519

Merged
merged 1 commit into from
Mar 14, 2018

Conversation

bond95
Copy link
Contributor

@bond95 bond95 commented Mar 7, 2018

Bug: If there is no SSH key saved for user, then in OptionDialog "Loading..." message doesn't disappear
Fixes: #505


This change is Reviewable

@bond95 bond95 requested a review from jniederm March 7, 2018 11:33
Copy link
Contributor

@jniederm jniederm left a comment

Choose a reason for hiding this comment

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

otherwise LGTM, verified

@@ -10,8 +10,12 @@ function* saveSSHKey (sagas, action) {
function* getSSHKey (sagas, action) {
yield put(setUnloaded())
const result = yield sagas.callExternalAction('getSSHKey', Api.getSSHKey, action)
if (!result.error && result.ssh_public_key && result.ssh_public_key.length > 0) {
yield put(setSSHKey(Api.SSHKeyToInternal({ sshKey: result.ssh_public_key[0] })))
if (!result.error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we please use "return fast" approach.

if (result.error) {
  return
}
// ...

I believe it improves readability, and it certainly saves my mind stack.

Bug: If there is no SSH key saved for user, then in OptionDialog "Loading..." message doesn't disappear
Fixes: oVirt#505
@bond95
Copy link
Contributor Author

bond95 commented Mar 12, 2018

@jniederm Done.

Copy link
Contributor

@jniederm jniederm left a comment

Choose a reason for hiding this comment

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

LGTM, verified

@mareklibra mareklibra merged commit 32916e0 into oVirt:master Mar 14, 2018
mareklibra added a commit that referenced this pull request Mar 22, 2018
- VM networks editation - #517
- VM disks editation - #523
- ssh dialog UI fix - #519
- cloud-init VM name fix - #528
- minor UI fixs
- Translations updated
@mareklibra mareklibra mentioned this pull request Mar 22, 2018
mareklibra added a commit that referenced this pull request Mar 22, 2018
- VM networks editation - #517
- VM disks editation - #523
- ssh dialog UI fix - #519
- cloud-init VM name fix - #528
- minor UI fixes
- Translations updated
mareklibra added a commit that referenced this pull request Mar 22, 2018
- VM networks editation - #517
- VM disks editation - #523
- ssh dialog UI fix - #519
- cloud-init VM name fix - #528
- minor UI fixes
- Translations updated
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.

3 participants