integr8ly / tutorial-web-app

Solution Explorer provides the front door into the Integreatly initiative. It hosts the various Solution Patterns, as well as providing a dashboard of installed applications/products/services.
Apache License 2.0
36 stars 54 forks source link

APPDUX-380: Prevent duplicate backup and maintenance schedule times #612

Closed mfrances17 closed 3 years ago

mfrances17 commented 3 years ago

Motivation

https://issues.redhat.com/browse/APPDUX-380

What

The backup and maintenance window times should not be the same time as they would conflict with each other. In the current UI, this is prevented if you try to select the time that is already set. However, if you change both the backup time and the maintenance window time, the UI will allow you to save new duplicate times. This fix checks for that and if they both new values are the same, prevents the save, disables the Save button, and pops up a notification message.

Why

To be more consistent with the design, and to prevent users from saving duplicate backup and maintenance window times.

Verification Steps

  1. Go to Settings > Managed Integration schedule tab.
  2. Select a time in the Start time for your backups dropdown.
  3. Select the same time in the Day and start time for your maintenance dropdown.
  4. Verify that you stay on the same page (don't navigate back to Home), the Save button is disabled, and a notification displays and explains that you cannot set the same time for both.

Checklist:

Progress

Additional Notes

You may use my cluster to verify: https://solution-explorer.apps.cluster-uxddev-9f0b.uxddev-9f0b.example.opentlc.com/

Or add the following docker image of the solution explorer to your own cluster: docker.io/mfrances17/tutorial-web-app:appdux-380

Screen cap: conflict

phcox commented 3 years ago

This is definitely working as designed, but I've noticed an issue - because the user has to scroll to the bottom of the page to save the updated schedule, it's possible that he/she will simply hit the adjacent Cancel button without seeing the error alert at the top of the page, and thereby exit the Settings thinking that the times have been scheduled as desired. This might be a small probability scenario, but could have a non-trivial impact. Can you force a scroll up to the top of the page on Save if there's a scheduling overlap?

mfrances17 commented 3 years ago

Can you force a scroll up to the top of the page on Save if there's a scheduling overlap?

@phcox i've added a scroll up to the alert, and i've tested it in chrome and firefox, seems to do the trick. please verify on my test cluster that it meets your design expectations.