Get rid of mjsonrpc dialogs. Put it to the console

Issue #209 closed
Andreas Suter created an issue

We would prefer that most of the popup dialogs of mjsonrpc (warning, errors, etc.) would go to the console.

Reason:

  • our standard user do not understand these messages
  • it sometime clutters the page when multiple error message are popping up

This information is very useful in the console log where we think it should belong to.

Comments (5)

  1. dd1

    There are several problems:

    • you should never see rpc failure error messages
    • if there was an rpc failure, the page will display wrong data, we need an indication to the user that the page they are looking at does not show correct information.

    Several ways to tell user something is wrong:

    • right now we throw an error message in their face, rude but gets the point across
    • we could shade the page in gray (or blank it out). there still should be some text somewhere in there telling the user what happened. “look in the javascript console” I think is not helpful. Even I cannot find the javascript console half of the time (firefox, thank you for moving all controls in each release).
    • I have one “nice” web app that on any rpc error redirects me to it’s status page. rude and counterproductive.

    So pick your poison.

    For now I will settle on a working recovery code, where after an RPC error, the page will retry the RPC and clear the error message if there is success.

    K.O.

  2. Zaher Salman

    Then let’s clean up the code. For example in messages.html you will always get a failed rpc from

      mjsonrpc_call("cm_msg_retrieve", { "facility": facility, "time" : first_tstamp, "min_messages" : 0 }).then(function(rpc) {
    

    this will always return an undefined value when you do not have new messages and spit and alert. To avoid that one needs to check whether the number of messages >0 before processing an undefined rpc result.

  3. dd1

    Thank you for reporting this problem. I have not seen it before. Do you have a way to reproduce it? Do you mind opening a separate issue for it, tracking two different problems in the same Bitbucket issue does not work well. K.O.

  4. dd1

    see bug 261, we will be adding automatic retry for all 500-series status codes and they will no longer generate popup error dialogs. K.O.

  5. Log in to comment