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

Event Explorer De-Explorization #7569

Merged
merged 6 commits into from
Feb 8, 2021

Conversation

h-kataria
Copy link
Contributor

@h-kataria h-kataria commented Jan 11, 2021

Dependent core PR & PR
Data Migration PR
Cross-Repo PR

@h-kataria h-kataria requested a review from skateman January 11, 2021 23:48
h-kataria added a commit to h-kataria/manageiq-schema that referenced this pull request Jan 12, 2021
If any of the users had their startpage set to Policy Events explorer screen, this migration sets it to non-explorer version screen of Policy Events list view.

UI PR ManageIQ/manageiq-ui-classic#7569
Core PR ManageIQ/manageiq#20947
@skateman
Copy link
Member

Just a rebase please, to catch RBAC issues...

@h-kataria h-kataria force-pushed the event_de-explorization branch from aef0794 to 930a5e8 Compare January 16, 2021 18:59
@skateman
Copy link
Member

Crashes on report_data:

[----] F, [2021-01-18T09:58:15.851647 #340101:3a78444] FATAL -- : Error caught: [ActiveRecord::StatementInvalid] PG::UndefinedColumn: ERROR:  column event_streams.description does not exist
LINE 1: ...reams" WHERE "event_streams"."type" = $1 ORDER BY "event_str...
                                                             ^

/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql_adapter.rb:744:in `prepare'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql_adapter.rb:744:in `block in prepare_statement'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql_adapter.rb:739:in `prepare_statement'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql_adapter.rb:684:in `exec_cache'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql_adapter.rb:658:in `execute_and_clear'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `exec_query'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:493:in `select_prepared'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:68:in `select_all'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:105:in `block in select_all'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:122:in `block in cache_sql'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:113:in `cache_sql'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:105:in `select_all'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/querying.rb:46:in `find_by_sql'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:821:in `block in exec_queries'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:839:in `skip_query_cache_if_necessary'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:808:in `exec_queries'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:626:in `load'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:250:in `records'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:245:in `to_ary'
/home/skateman/Repositories/ManageIQ/manageiq/app/models/miq_report/generator.rb:411:in `build_table'
/home/skateman/Repositories/ManageIQ/manageiq/app/models/miq_report/search.rb:127:in `paged_view_search'
/home/skateman/Repositories/ManageIQ/manageiq-ui-classic/app/controllers/application_controller.rb:1247:in `get_view'
/home/skateman/Repositories/ManageIQ/manageiq-ui-classic/app/controllers/application_controller.rb:363:in `report_data'

@h-kataria
Copy link
Contributor Author

Crashes on report_data:

[----] F, [2021-01-18T09:58:15.851647 #340101:3a78444] FATAL -- : Error caught: [ActiveRecord::StatementInvalid] PG::UndefinedColumn: ERROR:  column event_streams.description does not exist
LINE 1: ...reams" WHERE "event_streams"."type" = $1 ORDER BY "event_str...
                                                             ^

/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql_adapter.rb:744:in `prepare'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql_adapter.rb:744:in `block in prepare_statement'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql_adapter.rb:739:in `prepare_statement'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql_adapter.rb:684:in `exec_cache'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql_adapter.rb:658:in `execute_and_clear'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `exec_query'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:493:in `select_prepared'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:68:in `select_all'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:105:in `block in select_all'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:122:in `block in cache_sql'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:113:in `cache_sql'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:105:in `select_all'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/querying.rb:46:in `find_by_sql'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:821:in `block in exec_queries'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:839:in `skip_query_cache_if_necessary'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:808:in `exec_queries'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:626:in `load'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:250:in `records'
/home/skateman/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:245:in `to_ary'
/home/skateman/Repositories/ManageIQ/manageiq/app/models/miq_report/generator.rb:411:in `build_table'
/home/skateman/Repositories/ManageIQ/manageiq/app/models/miq_report/search.rb:127:in `paged_view_search'
/home/skateman/Repositories/ManageIQ/manageiq-ui-classic/app/controllers/application_controller.rb:1247:in `get_view'
/home/skateman/Repositories/ManageIQ/manageiq-ui-classic/app/controllers/application_controller.rb:363:in `report_data'

fixed

@gtanzillo
Copy link
Member

@h-kataria It looks like the back arrow is not working when viewing the details of an event. When I click it nothing happens. But it does make a trip to the server. I didn't see any errors in the log nor the web console.
image

@h-kataria
Copy link
Contributor Author

@h-kataria It looks like the back arrow is not working when viewing the details of an event. When I click it nothing happens. But it does make a trip to the server. I didn't see any errors in the log nor the web console.
image

Fixed. That button should not have been present on the summary screen.

Copy link
Member

@gtanzillo gtanzillo left a comment

Choose a reason for hiding this comment

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

I tested locally and everything is working as expected 👍

@h-kataria h-kataria removed the wip label Feb 2, 2021
@h-kataria h-kataria changed the title [WIP] - Event Explorer De-Explorization Event Explorer De-Explorization Feb 2, 2021
@h-kataria h-kataria force-pushed the event_de-explorization branch from d225ec2 to e451f38 Compare February 2, 2021 17:04
@h-kataria
Copy link
Contributor Author

@skateman please review

config/routes.rb Outdated Show resolved Hide resolved
@@ -15,25 +15,31 @@ title: Events
name: Event

# Main DB table report is based on
db: MiqEvent
db: MiqEventDefinition
Copy link
Member

Choose a reason for hiding this comment

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

Umm, it's a little confusing, the controller is miq_event but the model is miq_event_definition. Shouldn't we try to increase consistency?

@h-kataria h-kataria added the wip label Feb 5, 2021
h-kataria added a commit to h-kataria/manageiq-schema that referenced this pull request Feb 5, 2021
If any of the users had their startpage set to Policy Events explorer screen, this migration sets it to non-explorer version screen of Policy Events list view.

UI PR ManageIQ/manageiq-ui-classic#7569
Core PR ManageIQ/manageiq#20947
@h-kataria
Copy link
Contributor Author

@miq-bot cross_repo_tests manageiq-api, manageiq-ui-classic including manageiq-schema#550 manageiq#21016

miq-bot pushed a commit to ManageIQ/manageiq-cross_repo-tests that referenced this pull request Feb 5, 2021
Changes to support Events related screens as other normal screens in the product to help support direct linking.
Made changes to list view coe to expect and pass filter back to report_data method.

Pre work for ManageIQ#7401
- Back button is to go back to summary screen, is displayed on sub-screens that are linked from summary screen.

UI PR ManageIQ#7401

for ManageIQ#6819
- and some cleanup to show_list method
@h-kataria h-kataria force-pushed the event_de-explorization branch from 399c972 to c8983f1 Compare February 5, 2021 22:15
@h-kataria
Copy link
Contributor Author

@skateman please re-review

@h-kataria h-kataria force-pushed the event_de-explorization branch from c8983f1 to fbc1f7f Compare February 5, 2021 22:35
@miq-bot
Copy link
Member

miq-bot commented Feb 5, 2021

Checked commits h-kataria/manageiq-ui-classic@0c93992~...fbc1f7f with ruby 2.6.3, rubocop 0.82.0, haml-lint 0.35.0, and yamllint
14 files checked, 6 offenses detected

**

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

app/controllers/application_controller.rb

app/controllers/application_controller/report_data_additional_options.rb

app/controllers/miq_event_definition_controller.rb

app/presenters/menu/default_menu.rb

@skateman
Copy link
Member

skateman commented Feb 8, 2021

Code looks fine.

h-kataria added a commit to h-kataria/manageiq-schema that referenced this pull request Feb 8, 2021
If any of the users had their startpage set to Policy Events explorer screen, this migration sets it to non-explorer version screen of Policy Events list view.

UI PR ManageIQ/manageiq-ui-classic#7569
Core PR ManageIQ/manageiq#20947
@gtanzillo
Copy link
Member

I tested this locally, again and it looks good 👍

@h-kataria h-kataria closed this Feb 8, 2021
@h-kataria h-kataria reopened this Feb 8, 2021
@gtanzillo gtanzillo merged commit 6118b83 into ManageIQ:master Feb 8, 2021
@gtanzillo gtanzillo self-assigned this Feb 8, 2021
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.

4 participants