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

Add Tenants tree to Catalog Item Edit page #5445

Merged
merged 10 commits into from
Jun 6, 2019

Conversation

hstastna
Copy link

@hstastna hstastna commented Apr 10, 2019

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

Tracking issue:
ManageIQ/manageiq#18553

How to test:

  1. Go to Services > Catalogs > Catalog Items accordion
  2. Configuration > Add a new Catalog Item
    or
    select some Item from the list and Configuration > Edit Selected Item
  3. Choose some Catalog Item Type from the drop down if you are creating a new Catalog Item
    => Catalog Item Edit page is displayed, with the new Additional Tenants option

TODO:

  • all PRs in In Service: select Tenants where the service will be available manageiq#18553 need to be merged/finished
  • generate the proper tree with just Tenants + checkboxes
  • add angular support for saving selected Tenants (Ansible Playbook Catalog Item type)
  • solve saving selected Tenants:
    • for angular screen
    • for non-angular screen
  • solve displaying created/edited Catalog Items with additional tenants
  • solve displaying checked Tenants in the tree while displaying the Catalog Item's info
  • make the tree unclickable while displaying the Catalog Item's info
  • tree for Catalog Item Type Ansible Playbook is not clickable :( (angular), while adding/editing the item
    (we need Allow angular in layouts/tree #5562 to be merged)
  • fix failing specs and add some more
  • fix issue regarding Save button while editing selected Tenants (while editing existing Catalog Item)
    (Save button does not respond properly)
  • make Save button responsive, in the angular screen (Ansible Playbook Catalog Item type)
  • make the tree work also for Catalog Bundles, when:
    • adding new Catalog Bundle
    • editing an existing Catalog Bundle
    • displaying Catalog Bundle's info

Before:
Adding Catalog Item of Catalog Item Type: Amazon
t1_before
Adding Catalog Item of Catalog Item Type: Ansible Playbook
t2_before
Displaying info for Catalog Item of Catalog Item Type: Amazon (checkboxes unclickable)
cat_item_old

After:
Adding Catalog Item of Catalog Item Type: Amazon
t1
Adding Catalog Item of Catalog Item Type: Ansible Playbook
t2
Displaying info for Catalog Item of Catalog Item Type: Amazon (checkboxes unclickable)
new_cat_display

@miq-bot miq-bot added the wip label Apr 10, 2019
@skateman
Copy link
Member

@miq-bot add_reviewer @ZitaNemeckova
@miq-bot add_reviewer @skateman

@hstastna hstastna force-pushed the Create_Service_select_Tenants branch 8 times, most recently from c990666 to 837fac6 Compare April 17, 2019 08:53
@hstastna hstastna force-pushed the Create_Service_select_Tenants branch 2 times, most recently from 745aa75 to a54ea19 Compare April 23, 2019 12:53
@hstastna hstastna force-pushed the Create_Service_select_Tenants branch 5 times, most recently from 55749a1 to e3f3760 Compare April 25, 2019 08:48
@h-kataria h-kataria requested a review from terezanovotna April 25, 2019 14:35
@hstastna hstastna force-pushed the Create_Service_select_Tenants branch 8 times, most recently from 62af2a3 to c3daf1c Compare April 29, 2019 15:21
Hilda Stastna added 5 commits June 4, 2019 15:42
Also update failing specs for st_set_form_vars method in catalog controller spec.
Update also specs for the two haml files, under spec/views/catalog.
Add another specs for saving selected tenants to @edit and for build_tenants_tree
method.
Add the component to init the tree for Ansible Playbook Catalog Item type.
Add support to catalogItemFormController, add new miqOnCheckTenantTree method,
use sendDataWithRx and listenToRx to get appropriate data in appropriate ctrl.
Also pass initial array of additional Tenants' ids to angular.
Make the button responsive in Ansible Playbook Catalog Item edit page.
@hstastna hstastna force-pushed the Create_Service_select_Tenants branch 3 times, most recently from 906e4f0 to ec0cf6e Compare June 4, 2019 14:59
Update the tests with additional tenants ids
@hstastna hstastna force-pushed the Create_Service_select_Tenants branch from ec0cf6e to 53e3e2e Compare June 4, 2019 15:16
@miq-bot
Copy link
Member

miq-bot commented Jun 4, 2019

Checked commits hstastna/manageiq-ui-classic@1721ffa~...53e3e2e with ruby 2.3.3, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
9 files checked, 1 offense detected

**

  • 💣 💥 🔥 🚒 - Linter/Haml - Linter::Haml STDERR:
warning: parser/current is loading parser/ruby23, which recognizes
warning: 2.3.8-compliant syntax, but you are running 2.3.3.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.

@hstastna hstastna changed the title [WIP] Add Tenants tree to Catalog Item Edit page Add Tenants tree to Catalog Item Edit page Jun 4, 2019
@miq-bot miq-bot removed the wip label Jun 4, 2019
@lpichler
Copy link
Contributor

lpichler commented Jun 6, 2019

@h-kataria @hstastna I tested creating and updating ansible playbook catalog and I am confirming that storing additional tenants work perfectly, If you want to test it also (It would be great) you can use this patch (not sure if it is best way but it is working locally)

index 6748df8631..cb5e527e95 100644
--- a/app/models/service_template_ansible_playbook.rb
+++ b/app/models/service_template_ansible_playbook.rb
@@ -63,7 +63,7 @@ class ServiceTemplateAnsiblePlaybook < ServiceTemplateGeneric
   def self.create_job_templates(service_name, description, config_info, auth_user, service_template = nil)
     [:provision, :retirement, :reconfigure].each_with_object({}) do |action, hash|
       next unless new_job_template_required?(config_info[action], action, service_template)
-      hash[action] = { :configuration_template => create_job_template(build_name(service_name, action), description, config_info[action], auth_user) }
+      hash[action] = { :configuration_template => ManageIQ::Providers::AnsibleTower::AutomationManager::ConfigurationScript.create }
     end
   end
   private_class_method :create_job_templates
@@ -216,7 +216,7 @@ class ServiceTemplateAnsiblePlaybook < ServiceTemplateGeneric
       next unless job_template
       if info.key?(:playbook_id)
         _tower, params = self.class.send(:build_parameter_list, self.class.send(:build_name, name, action), description, info)
-        job_template.update_in_provider_queue(params)
+        #job_template.update_in_provider_queue(params)
       else
         delete_job_templates([job_template], action)
       end
(END)

@h-kataria h-kataria self-assigned this Jun 6, 2019
@h-kataria h-kataria added this to the Sprint 113 Ending Jun 10, 2019 milestone Jun 6, 2019
@h-kataria h-kataria merged commit 1b624ef into ManageIQ:master Jun 6, 2019
ZitaNemeckova added a commit to ZitaNemeckova/manageiq-ui-classic that referenced this pull request Aug 8, 2019
h-kataria added a commit to h-kataria/manageiq-ui-classic that referenced this pull request Aug 12, 2019
Due to enhancement made in ManageIQ#5445 , Now list of tenant can be lot of tenant names and may not fit properly on the list view, so removing the column from list view as this information is available in a nice tree view on the details view of a Catalog Item.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1740172
gekorob pushed a commit to gekorob/manageiq-ui-classic that referenced this pull request Aug 13, 2019
gekorob pushed a commit to gekorob/manageiq-ui-classic that referenced this pull request Aug 13, 2019
Due to enhancement made in ManageIQ#5445 , Now list of tenant can be lot of tenant names and may not fit properly on the list view, so removing the column from list view as this information is available in a nice tree view on the details view of a Catalog Item.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1740172
pkomanek pushed a commit to pkomanek/manageiq-ui-classic that referenced this pull request Aug 20, 2019
pkomanek pushed a commit to pkomanek/manageiq-ui-classic that referenced this pull request Aug 20, 2019
Due to enhancement made in ManageIQ#5445 , Now list of tenant can be lot of tenant names and may not fit properly on the list view, so removing the column from list view as this information is available in a nice tree view on the details view of a Catalog Item.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1740172
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.

7 participants