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

Correct entry point for dynamic objects #2721

Merged
merged 4 commits into from
Nov 23, 2017

Conversation

romanblanco
Copy link
Member

@romanblanco romanblanco commented Nov 14, 2017

Has to be merged together with: ManageIQ/ui-components#201

This PR fixes incorrect entry point assigning in the Dialog Editor and ads a new method for displaying currently selected automate method.

Links

https://bugzilla.redhat.com/show_bug.cgi?id=1513159

Steps for Testing/QA

Create dynamic dialog and try to set entry point:

screencast from 2017-11-20 14-27-49

@miq-bot miq-bot added the wip label Nov 14, 2017
@romanblanco romanblanco changed the title [WIP] Correct entry point for dynamic objects Correct entry point for dynamic objects Nov 20, 2017
@romanblanco
Copy link
Member Author

@karelhala please review

Copy link
Contributor

@karelhala karelhala left a comment

Choose a reason for hiding this comment

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

Couple of nitpicks, but overall looks good.

vm.treeSelectorShow = false;
}

function showFullyQualifiedName(resourceAction) {
if (typeof resourceAction.ae_namespace == 'undefined' ||
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use tripple check ===

typeof resourceAction.ae_instance == 'undefined') {
return '';
}
var fqname = resourceAction.ae_namespace
Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to use lodash's reduce function here (if resourceAction contains only items which can be merged together)

return _.reduce(resourceAction,
  function (curr, item) {
    return item + '/' + curr;
  }, '');

Copy link
Member Author

Choose a reason for hiding this comment

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

@karelhala resourceAction contains more items than just these that I'm merging together in showFullyQualifiedName method.

@romanblanco
Copy link
Member Author

@karelhala Thanks, updated 👍

@martinpovolny
Copy link
Member

Travis failure is unrelated.

the whole 'fqname' was incorrectly assigned as 'ae_namespace' attribute, while 'ae_instance' and 'ae_class' stayed set as 'nil'
@miq-bot
Copy link
Member

miq-bot commented Nov 22, 2017

Checked commits romanblanco/manageiq-ui-classic@6b24119~...71f5fad with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. ⭐

@romanblanco
Copy link
Member Author

@martinpovolny Travis passed 🍏 👇 😊

@martinpovolny martinpovolny merged commit 7e8ba54 into ManageIQ:master Nov 23, 2017
@martinpovolny martinpovolny added this to the Sprint 74 Ending Nov 27, 2017 milestone Nov 23, 2017
@romanblanco romanblanco deleted the correct_ae_fqname branch November 23, 2017 10:36
@simaishi
Copy link
Contributor

Marking as conflict for now, as this requires a new version of ui-component.

simaishi pushed a commit that referenced this pull request Nov 27, 2017
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit 95eeffff337ae5a54b75b6ceb3915e4d786f6867
Author: Martin Povolny <mpovolny@redhat.com>
Date:   Thu Nov 23 06:56:40 2017 +0100

    Merge pull request #2721 from romanblanco/correct_ae_fqname
    
    Correct entry point for dynamic objects
    (cherry picked from commit 7e8ba540e6fbb27a3f6af12b32111180d57e37a5)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1517966

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.

6 participants