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

Change report data to be rendered using angular #26

Closed
wants to merge 37 commits into from

Conversation

karelhala
Copy link
Contributor

@karelhala karelhala commented Dec 23, 2016

Purpose or Intent

TODO before merge:

  • Change back to pull from main repo in before_install.sh script
  • Update bower.json to use newest version of manageiq-ui-components
  • Fix Tagging in explorer.

To have much more responsible UI, we have to rewrite GTL to angular. So no longer generating views on rendering page, but with AJAX request.

To enable these components all at once we have to include specific route to each controller, this is done in routes.rb with default actions. Each controller will then have these default routes and will be able to list all entities. With this also new method in application_controller.rb is introduced, which will take care of filtering current view.

New angular module is introduced in this PR with one controller for fetching these data.

selection_106
selection_107
peek 2016-12-23 23-17

@karelhala
Copy link
Contributor Author

@karelhala karelhala changed the title Change report data to be rendered using angular [WIP] Change report data to be rendered using angular Dec 23, 2016
@karelhala
Copy link
Contributor Author

@miq-bot add_label wip, ui, enhancment

@miq-bot
Copy link
Member

miq-bot commented Dec 23, 2016

@karelhala Cannot apply the following labels because they are not recognized: ui, enhancment

@miq-bot miq-bot added the wip label Dec 23, 2016
@karelhala karelhala force-pushed the report_data branch 4 times, most recently from c33a689 to 4639a44 Compare January 3, 2017 15:29
@karelhala
Copy link
Contributor Author

@martinpovolny @dclarizio @himdel tests are green and it's same as in ManageIQ/manageiq#11114, two things needs to be done before merge update bower.json to fetch newest verion of ManageIQ/ui-components and I had to change 2 files in main ManageIQ/manageiq repo to make it work ManageIQ/manageiq#13344.

@karelhala
Copy link
Contributor Author

@martinpovolny could you please look at this and ManageIQ/manageiq#13344

@karelhala karelhala force-pushed the report_data branch 2 times, most recently from dd60304 to 1d1a48d Compare January 9, 2017 12:18
end

# Private method for processing params.
# params can contain these oprions:
Copy link
Member

Choose a reason for hiding this comment

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

typo: "oprions"

@@ -297,21 +298,18 @@ def get_node_info(treenodeid)
end

case model
Copy link
Member

Choose a reason for hiding this comment

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

options = case...

@@ -554,22 +556,22 @@ def get_node_info(treenodeid)

case model
Copy link
Member

Choose a reason for hiding this comment

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

options = case ...

item.message
else
item.name
end
Copy link
Member

Choose a reason for hiding this comment

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

why this change?

Copy link
Contributor Author

@karelhala karelhala Jan 12, 2017

Choose a reason for hiding this comment

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

There's been a test which failed with empty name, when MiqProvisionRequest used quadicon.

sendDataWithRx({initController: {
name: 'reportDataController',
data: {
modelName: '#{CGI::escape(j_str(@display.nil? && current_model ? controller.class.model.to_s.tableize : @display))}',
Copy link
Member

Choose a reason for hiding this comment

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

really want to html escape javascript escaped data? if so, use h instead of CGI::escape

sortColIdx: '#{@sortcol}',
sortDir: '#{@sortdir}',
isExplorer: '#{@explorer}' === 'true' ? true : false,
showUrl: '#{view_to_url(@view) if !@view.nil? && !@view.db.nil?}'
Copy link
Member

Choose a reason for hiding this comment

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

if @view.present? && @view.db.present?

@martinpovolny
Copy link
Member

I get loads of CodeClimate warnings: missing ; and ,, stuff not declared as global etc. Can you, please, check the CC report? Some of the Rubocop issues also look relevant (and easy to fix).

…ort does not have downcase, do not return any image and show default image in report data
Change icon to check if it can be created via glyphicon

Show items in per page picker
… class for icon based on view.db and row

Use noSelectBox in bower
…rom string to integer, After clicking in configuration on GTL activete coresponding tree
Add correct policies in nested view

Add explorer when adding policy for simulation if explorer is in @edit
@miq-bot
Copy link
Member

miq-bot commented Mar 6, 2017

Checked commits karelhala/manageiq-ui-classic@6d4b184~...296c6e4 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
42 files checked, 59 offenses detected

app/controllers/application_controller.rb

app/controllers/automation_manager_controller.rb

app/controllers/catalog_controller.rb

app/controllers/chargeback_controller.rb

app/controllers/container_controller.rb

app/controllers/infra_networking_controller.rb

app/controllers/miq_ae_class_controller.rb

app/controllers/miq_policy_controller.rb

app/controllers/ops_controller.rb

app/controllers/provider_foreman_controller.rb

app/controllers/report_controller.rb

app/controllers/service_controller.rb

app/controllers/storage_controller.rb

app/controllers/vm_common.rb

app/helpers/application_helper.rb

spec/controllers/application_controller/report_data_spec.rb

@karelhala
Copy link
Contributor Author

Closing because travis is testing wrong commit. I will reopen this as new PR.

@karelhala karelhala closed this Mar 6, 2017
This was referenced Mar 6, 2017
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