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

fixes #4768 - various activation key page issues #3901

Merged
merged 1 commit into from
Mar 29, 2014

Conversation

jlsherrill
Copy link
Member

  • Default content View was not selectable (fixed across app)
  • Using a paged API for content view dropdown (fixed across the app)
  • Fixes environment selector on new activation key page, no disable option needed
  • Updated text slightly on activation key page to make it more user friendly

@bbuckingham
Copy link
Member

Tested out locally and below are some observations:

  1. When creating a view new key, we list env then view; however, on edit, list it view then env. It would be nice to be consistent and I'd prefer it to be env then view.
  2. When creating a new key with an env path of Library->dev->test->prod, the path line wraps; however, it doesn't on the edit view. It might be nice to use same styling on both to avoid the wrapping.
  3. On edit, if i select a new environment, content view and 'Save',it doesn't appear to save the new selection.

I realize these are not related to the changes in this PR; therefore, perhaps we can address them separately.

@bbuckingham
Copy link
Member

NOTE: We can now select Library+Default Organization view when creating an akey, so +1:)

@bbuckingham
Copy link
Member

ACK pending comments; however, redmine issues will be fine as well.

@jlsherrill
Copy link
Member Author

@bbuckingham I'll fix #3 and do issues for the rest, thanks!

@bbuckingham
Copy link
Member

@jlsherrill,Sounds good, thx!

@@ -28,7 +28,8 @@ angular.module('Bastion.content-views').factory('ContentView',
return $resource('/api/v2/content_views/:id/:action',
{id: '@id', 'organization_id': CurrentOrganization},
{
query: {method: 'GET', isArray: false, params: {nondefault: true}},
query: {method: 'GET', isArray: false},
nonPaged: {method: 'GET', isArray: false, params: {'full_result': true}},
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you see as the benefits of adding a new method as opposed to just passing {'full_result': true} when needed? Are we always going to want all the results? If so why not just change query to pass {'full_result': true}?

Copy link
Member

Choose a reason for hiding this comment

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

I tend to agree with @waldenraines with respect to just passing the parameter when you need to instead of creating a new method.

Copy link
Member Author

Choose a reason for hiding this comment

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

I started down that route initially but ended up adding it in 5 placesIIRC. It had been used everywhere for every single drop down. When thinking about how to keep this from occurring in the future a different action seemed more ideal than the params (not that either is fool poof).

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

@jlsherrill params tell a function how to configure itself which is sort of what you are doing here. I don't directly see what makes specifying 'full_result' different than specifying 'environment_id'. There's an inconsistency there in terms of what qualifies for it's own method and what doesn't to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

@waldenraines We're already adding query everywhere correct?

[jlsherri@centos bastion]$ grep query app/assets/javascripts/ -R | grep factory | wc -l
26

[jlsherri@centos bastion]$ find app/assets/javascripts/ | grep factory | wc -l
26

looks like it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, good point, you're right we are because of isArray: false since it returns an object.

Okay, I'm fine with going with queryPaged and queryUnpaged then.

Copy link
Member Author

Choose a reason for hiding this comment

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

@ehelms good with queryPaged and queryUnpaged ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Good with queryPaged and queryUnpaged because of the reasons stated (the fact that we already define query explicitly).

@ehelms
Copy link
Member

ehelms commented Mar 27, 2014

These two issues may be related to this and should either be marked as duplicates or added to the list of what's fixed in the commit message:

http://projects.theforeman.org/issues/4719
http://projects.theforeman.org/issues/4813

@jlsherrill
Copy link
Member Author

http://projects.theforeman.org/issues/4813 is not related at all and is related to showing the default CV in the CV list (see the first comment in the issue).

@jlsherrill
Copy link
Member Author

@bbuckingham actually i will file issues for all the rest

@thomasmckay
Copy link
Member

tested & ack

@waldenraines
Copy link
Contributor

ACK from me too.

<span class="help-block" ng-show="activationKey.environment !== undefined && contentViews.length === 0" translate>
The selected environment contains no Content Views, please select a different environment.
</span>
<span class="help-block" ng-show="activationKey.environment == undefined" translate>
Copy link
Member

Choose a reason for hiding this comment

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

=== for consistency and proper evaluation here.

@ehelms
Copy link
Member

ehelms commented Mar 28, 2014

APJ

* Default content View was not selectable
* Using a paged API for content view dropdown (fixed across the app)
* Fixes environment selector on new activation key page, no disable option needed
* Updated text slightly on activation key page to make it more user friendly
jlsherrill added a commit that referenced this pull request Mar 29, 2014
fixes #4768 - various activation key page issues
@jlsherrill jlsherrill merged commit 62ac968 into Katello:master Mar 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants