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

Angular host editor #3859

Merged
merged 8 commits into from
Aug 20, 2015
Merged

Conversation

h-kataria
Copy link
Contributor

No description provided.

@h-kataria
Copy link
Contributor Author

@AparnaKarve can you review/test this, i still need to add more Jasmine tests to this PR and some further refactoring if possible, but i need someone to review this.

@h-kataria h-kataria force-pushed the angular_host_editor branch 4 times, most recently from 751d43a to 09c1fc5 Compare August 17, 2015 22:13
@AparnaKarve AparnaKarve force-pushed the angular_host_editor branch 4 times, most recently from 046d1a3 to b8c88ad Compare August 18, 2015 19:29
@h-kataria h-kataria force-pushed the angular_host_editor branch from b8c88ad to ffb1466 Compare August 18, 2015 21:11
h-kataria and others added 6 commits August 19, 2015 10:11
2. Used auth_credentials_angular haml for Default and Remote Tabs
- This commit handles any issues found during angular host editor testing.
- Further cleanup of controller code and fixed existing spec tests. Added Jasmine tests for host editor.
Also made a few other adjustments in the haml
@h-kataria h-kataria removed the wip label Aug 19, 2015
@h-kataria h-kataria changed the title [WIP] - Angular host editor Angular host editor Aug 19, 2015
@h-kataria h-kataria force-pushed the angular_host_editor branch 2 times, most recently from 52f3854 to 62a7442 Compare August 19, 2015 21:34
@h-kataria
Copy link
Contributor Author

@dclarizio this PR is ready for review/testing.

@miq-bot
Copy link
Member

miq-bot commented Aug 20, 2015

Checked commits h-kataria@aad7338 .. h-kataria@62a7442 with rubocop 0.32.1 and haml-lint 0.13.0
10 files checked, 110 offenses detected

app/controllers/host_controller.rb

app/views/host/_form.html.haml

  • 🔴 Warn - Line 1, Col - - Style/VariableName: Use snake_case for variable names.
  • 🔴 Warn - Line 39, Col - - Line is too long. [132/120]
  • 🔴 Warn - Line 43, Col - - Style/HashSyntax: Use hash rockets syntax.
  • 🔴 Warn - Line 44, Col - - Line is too long. [143/120]
  • 🔴 Warn - Line 86, Col - - The = symbol should have one space separating it from code
  • 🔴 Warn - Line 87, Col - - The = symbol should have one space separating it from code
  • 🔴 Warn - Line 98, Col - - Line is too long. [136/120]

app/views/layouts/_auth_credentials_form.html.haml

  • 🔴 Warn - Line 2, Col - - Style/SpaceAroundOperators: Operator ||= should be surrounded with a single space.
  • 🔴 Warn - Line 3, Col - - Style/SpaceAroundOperators: Operator ||= should be surrounded with a single space.
  • 🔴 Warn - Line 4, Col - - Style/SpaceAroundOperators: Operator ||= should be surrounded with a single space.
  • 🔴 Warn - Line 5, Col - - Style/SpaceAroundOperators: Operator ||= should be surrounded with a single space.
  • 🔴 Warn - Line 11, Col - - Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))
  • 🔴 Warn - Line 11, Col - - Style/BracesAroundHashParameters: Redundant curly braces around a hash parameter.
  • 🔴 Warn - Line 11, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 11, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 11, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 17, Col - - Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))
  • 🔴 Warn - Line 17, Col - - Style/BracesAroundHashParameters: Redundant curly braces around a hash parameter.
  • 🔴 Warn - Line 17, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 17, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 17, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 22, Col - - Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))
  • 🔴 Warn - Line 22, Col - - Style/BracesAroundHashParameters: Redundant curly braces around a hash parameter.
  • 🔴 Warn - Line 22, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 22, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 22, Col - - Style/SpaceAfterComma: Space missing after comma.

app/views/layouts/angular-bootstrap/_auth_credentials_angular_bootstrap.html.haml

  • 🔴 Warn - Line 1, Col - - Style/SpaceAroundOperators: Operator ||= should be surrounded with a single space.
  • 🔴 Warn - Line 2, Col - - Style/SpaceAroundOperators: Operator ||= should be surrounded with a single space.
  • 🔴 Warn - Line 3, Col - - Lint/UselessAssignment: Useless assignment to variable - uid_label.
  • 🔴 Warn - Line 3, Col - - Style/SpaceAroundOperators: Operator ||= should be surrounded with a single space.
  • 🔴 Warn - Line 4, Col - - Lint/UselessAssignment: Useless assignment to variable - pwd_label.
  • 🔴 Warn - Line 4, Col - - Style/SpaceAroundOperators: Operator ||= should be surrounded with a single space.
  • 🔴 Warn - Line 5, Col - - Style/SpaceAroundOperators: Operator ||= should be surrounded with a single space.
  • 🔴 Warn - Line 7, Col - - Style/SpaceAroundOperators: Operator ||= should be surrounded with a single space.
  • 🔴 Warn - Line 41, Col - - Line is too long. [173/120]
  • 🔴 Warn - Line 56, Col - - Line is too long. [165/120]

app/views/layouts/angular/_auth_credentials_angular.html.haml

  • 🔴 Warn - Line 1, Col - - Style/SpaceAroundOperators: Operator ||= should be surrounded with a single space.
  • 🔴 Warn - Line 2, Col - - Style/SpaceAroundOperators: Operator ||= should be surrounded with a single space.
  • 🔴 Warn - Line 3, Col - - Style/SpaceAroundOperators: Operator ||= should be surrounded with a single space.
  • 🔴 Warn - Line 4, Col - - Style/SpaceAroundOperators: Operator ||= should be surrounded with a single space.
  • 🔴 Warn - Line 5, Col - - Style/SpaceAroundOperators: Operator ||= should be surrounded with a single space.
  • 🔴 Warn - Line 7, Col - - Style/SpaceAroundOperators: Operator ||= should be surrounded with a single space.
  • 🔴 Warn - Line 9, Col - - Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))
  • 🔴 Warn - Line 9, Col - - Style/BracesAroundHashParameters: Redundant curly braces around a hash parameter.
  • 🔴 Warn - Line 9, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 13, Col - - Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))
  • 🔴 Warn - Line 13, Col - - Style/BracesAroundHashParameters: Redundant curly braces around a hash parameter.
  • 🔴 Warn - Line 13, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 13, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 13, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 13, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 13, Col - - Line is too long. [144/120]
  • 🔴 Warn - Line 15, Col - - Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))
  • 🔴 Warn - Line 15, Col - - Style/BracesAroundHashParameters: Redundant curly braces around a hash parameter.
  • 🔴 Warn - Line 15, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 19, Col - - Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))
  • 🔴 Warn - Line 19, Col - - Style/BracesAroundHashParameters: Redundant curly braces around a hash parameter.
  • 🔴 Warn - Line 19, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 19, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 19, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 19, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 19, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 19, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 19, Col - - Line is too long. [262/120]
  • 🔴 Warn - Line 21, Col - - Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))
  • 🔴 Warn - Line 21, Col - - Style/BracesAroundHashParameters: Redundant curly braces around a hash parameter.
  • 🔴 Warn - Line 21, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 25, Col - - Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))
  • 🔴 Warn - Line 25, Col - - Style/BracesAroundHashParameters: Redundant curly braces around a hash parameter.
  • 🔴 Warn - Line 25, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 25, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 25, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 25, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 25, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 25, Col - - Style/SpaceAfterComma: Space missing after comma.
  • 🔴 Warn - Line 25, Col - - Line is too long. [254/120]
  • 🔴 Warn - Line 27, Col - - Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))
  • 🔴 Warn - Line 27, Col - - Line is too long. [144/120]

app/views/layouts/angular/_form_buttons_verify_angular.html.haml

  • 🔴 Warn - Line 12, Col - - Style/SpaceInsideParens: Space inside parentheses detected.
  • 🔴 Warn - Line 17, Col - - Line is too long. [140/120]

app/views/layouts/angular/_multi_auth_credentials.html.haml

  • 🔴 Warn - Line 29, Col - - %div.style1 can be written as .style1 since %div is implicit
  • 🔴 Warn - Line 48, Col - - %div.style1 can be written as .style1 since %div is implicit
  • 🔴 Warn - Line 63, Col - - %div.style1 can be written as .style1 since %div is implicit
  • 🔴 Warn - Line 78, Col - - %div.style1 can be written as .style1 since %div is implicit
  • 🔴 Warn - Line 94, Col - - %div.style1 can be written as .style1 since %div is implicit
  • 🔴 Warn - Line 109, Col - - %div.style1 can be written as .style1 since %div is implicit
  • 🔴 Warn - Line 124, Col - - %div.style1 can be written as .style1 since %div is implicit
  • 🔴 Warn - Line 145, Col - - Style/HashSyntax: Use hash rockets syntax.
  • 🔴 Warn - Line 146, Col - - Line is too long. [137/120]

spec/controllers/host_controller_spec.rb

@h-kataria h-kataria force-pushed the angular_host_editor branch from 62a7442 to bf35a05 Compare August 20, 2015 13:23
@AparnaKarve
Copy link
Contributor

@dclarizio, @h-kataria and I worked together on this PR and have reviewed and tested each other's commits.
Also tested @epwinchell 's styling update commit.
This is good to go. 👍

dclarizio pushed a commit that referenced this pull request Aug 20, 2015
@dclarizio dclarizio merged commit 63be744 into ManageIQ:master Aug 20, 2015
@dclarizio dclarizio deleted the angular_host_editor branch August 20, 2015 22:45
@dclarizio dclarizio added this to the Sprint 28 Ending August 24, 2015 milestone Aug 20, 2015
@@ -10,7 +10,6 @@
//= require services/miq_db_backup_service
//= require directives/scheduler/updateDropdownForFilter
//= require directives/scheduler/updateDropdownForTimer
//= require directives/miq_calendar
Copy link
Contributor

Choose a reason for hiding this comment

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

@h-kataria any reason for this change? You've broken the retirement editor ;).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@himdel i don't recall why that was removed, maybe just an oversight or result of bad merge/rebase from master

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, just checking, Milan will add it back, thanks :).

content_tag(:li,
:class => "#{options[:class]} #{active == id ? 'active' : ''}",
:id => "#{id}_tab",
'ng-click' => "changeAuthTab('#{id}');") do
Copy link
Contributor

Choose a reason for hiding this comment

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

@h-kataria Do you remember why this change was needed please?

Because now it is putting that ng-click in every tab, everywhere ... which will break once those other screens are actually angular and try to call it.

I'll move it to options, and I'm assuming this is only needed in app/views/layouts/_multi_auth_credentials_form.html.haml but .. if you know more.. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@himdel It looks like this change was added to keep track of the current tab that user is on in the form, it was added by @AparnaKarve in 5b227b5 maybe she remembers if there was some other purpose behind adding that ng-click

Copy link
Contributor

Choose a reason for hiding this comment

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

@himdel Yeah, the main purpose was to handle tab-specific logic in the angular controller.
If there are tabs, there will be tab-specific logic, meaning we would always have changeAuthTab in every angular controller that deals with tabs and hence chances of something breaking probably don't exist.

Copy link
Contributor

Choose a reason for hiding this comment

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

Aah, thanks :) Ok, I'll move it to that template then, so that we explicitly pass {'ng-click' => "changeAuthTab('something')"} in there...

Copy link
Contributor

Choose a reason for hiding this comment

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

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