Review main Merged

44766[BUGFIX] Restore clear cache menu icon if clearing fatals

Andreas Kienast CR +2 V +2 Easy +2 −2 updated 11/18/15, 16:02

Commit message

Currently, the clear cache icon in the top menu only gets restored when
the clearing process was successful. If the call fails for whatever
reason, the spinner is shown until the backend is reloaded.

Change the "success" handler to "complete" to always restore the
original icon.

Review

  • Code review CR +2
    • Markus Klein +2
    • Daniel L +1
    • Christian Kuhn +1
  • Verified V +2
    • Markus Klein +2
    • Christian Kuhn +1

Issues 1

Files 1

Review log 10

  1. Andreas Kienast uploaded patch set 1 11/18/15, 07:57

  2. Wouter Wolters voted on patch set 1 CR +1 11/18/15, 08:00

  3. Josef Glatz commented on patch set 1 11/18/15, 08:08

    ClearCacheMenu.js:51

    what about adding some information, that the icon is restored also if the cache clearing fails?
  4. Andreas Kienast commented on patch set 2 11/18/15, 08:10

    Published edit on patch set 1
  5. Christian Kuhn commented on patch set 2 11/18/15, 12:58

    hey. in general +1 (did not really test it though). However, there is one thing that i find specifically annoying: If a clear-cache isn't successful for instance if a session expired, there is no message what so ever. It would be MUCH better if a message (callout? / flash message?) is created in this case wiht "hey, your clear cache did not work out!". Would something like that be do-able Andreas? Maybe with a different patch?
  6. Christian Kuhn voted on patch set 2 CR +1 V +1 11/18/15, 13:00

  7. Daniel L voted on patch set 2 CR +1 11/18/15, 13:31

  8. Andreas Kienast commented on patch set 2 11/18/15, 15:45

    @Christian: As discussed in Slack: It's possible, but that requires that I can identify the reason for the failed request in the response. I'd rather add a generic failure handler for all requests that simply prints a notification why the AJAX request failed.
  9. Markus Klein commented on patch set 2 CR +2 V +2 11/18/15, 16:02

    +1 for the additional error handling!
  10. Gerrit merged patch set 2 11/18/15, 16:02