[Freeipa-devel] [PATCH] 005 Show error in serial association
Petr Vobornik
pvoborni at redhat.com
Tue Aug 23 11:34:48 UTC 2011
On 08/22/2011 07:05 PM, Endi Sukma Dewata wrote:
> On 8/22/2011 10:06 AM, Petr Vobornik wrote:
>> 'Failed' moved to command. On 'failed' success is transformed to error -
>> can be change behaviour of serial associator in some commands
>> (previously some commands were executed even after 'failed' of
>> previous). It isn't probably big issue because they fail probably from
>> the same reason (consequent commands would fail to).
>
> This will be addressed in ticket #1688.
>
>> - 'failed' message is extended by related object (so user would know for
>> which command in the batch it is related to).
>
> Just to be consistent, I think we should format the message like this:
> "<primary key>: <error message>".
>
OK
>> - there is still the problem ('no modifications to be performed') I
>> wrote about on Aug 18. I think it should be fixed before commiting this
>> path.
>
> This will be addressed in ticket #1692.
>
> One more issue, a command could return multiple error messages in each
> failure, but right now the get_failed() only reads the first message in
> each failure. Try adding several users into a group, but remove some of
> them just before adding it, only the first missing user is reported. I
> think the code in ipa.js:395-401 should iterate through all messages.
>
Reworked.
I'm thinking that we should show only notification dialog (like in batch
error for 'failed' commands. The reason is that part of the command can
be successfully executed, so offering retry is wrong because it may
cause other error (try it in the example above). Second reason is that
if we want to show all errors we have to concatenate error messages with
some separator (quite easy, current implementation) or to pass array of
error messages to error dialog like in batch error (needs to add
suppor for it in command).
I'm thinking about dialog with this content:
<dialog-title>Operation Error</dialog-title>
<p>
Some parts of operation failed. Completed: $completed.
</p>
<show-hide-link />
<ul>
<li> $key: $message </li>
<li> $key2: $message2 </li>
</ul>
<ok-button>
The 'Completed' part would be shown only if present.
Other problem in error dialog is that there are used untranslated
strings. We should modify it to use translated and as fallback (like in
init method) untranslated.
--
Petr Vobornik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pvoborni-0005-2-Show-error-in-adding-associations.patch
Type: text/x-patch
Size: 8673 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110823/3e389e93/attachment.bin>
More information about the Freeipa-devel
mailing list