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

WebUI: Size limit warning on details pages fixed #470

Closed
wants to merge 2 commits into from

Conversation

pvomacka
Copy link

@pvomacka pvomacka commented Feb 15, 2017

Entity select fields accepted globally set size limit and in situations when
there were more entries than global size limit allows then the "Truncated" warning
shows up. Also only subset of items was shown.
All entity select widgets now uses find methods with sizelimit set to 0
which says get all entries.

This setting is configurable using search_all_entries attribute.

https://fedorahosted.org/freeipa/ticket/6618

@pvoborni
Copy link
Member

Would it be better to suppress the warning and use sensible size limit. I.e. the entity select doesn't need to show all entries. I'm afraid that it might have negative performance impact.

Copy link
Member

@pvoborni pvoborni left a comment

Choose a reason for hiding this comment

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

I agreed with Pavel that the warning will be suppressed and size limit will be honored to avoid performance regression.

Copy link
Member

@pvoborni pvoborni left a comment

Choose a reason for hiding this comment

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

See the inline comment.

@@ -219,6 +225,7 @@ rpc.command = function(spec) {

for (var i=0,l=msgs.length; i<l; i++) {
var msg = lang.clone(msgs[i]);
if (that.suppress_warnings.indexOf(msg.code) > -1) break;
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it be continue instead of break? So that it will process also other possible msgs which you don't want to suppress.

Pavel Vomacka added 2 commits March 23, 2017 16:23
Each command can have specified an array of warning codes which will
be suppressed and won't be shown.

For specifying this it is necessary to set command property
'supressed_warnings: [codes_of_warning]'

Part of: https://pagure.io/freeipa/issue/6618
This widget is used on details pages and dialogs. When the size limit
is set to lower number the warning about truncation was shown every time
the details page was open.

Now, with support for suppressing warning messages from server according
to its code, we are able to disable warning with 13017 code (truncation
warning)

https://pagure.io/freeipa/issue/6618
@pvoborni pvoborni added the ack Pull Request approved, can be merged label Mar 24, 2017
@pvoborni
Copy link
Member

Code looks good and works fine, ACK.

@pvomacka pvomacka added the pushed Pull Request has already been pushed label Mar 27, 2017
@pvomacka
Copy link
Author

ipa-4-5:

  • 422c905 WebUI: Add support for suppressing warnings

  • 697a577 WebUI: suppress truncation warning in select widget
    master:

  • 7b3a10d WebUI: Add support for suppressing warnings

  • b9e6ad1 WebUI: suppress truncation warning in select widget

@pvomacka pvomacka closed this Mar 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
2 participants