openwisp-controller icon indicating copy to clipboard operation
openwisp-controller copied to clipboard

[feature] Trigger notification on update/create fuzzy location and show alert

Open DragnEmperor opened this issue 7 months ago • 5 comments

Whenever a fuzzy location is created/updated, a notification should be triggered to user as per the preferred mode (Web or Email or Both) with proper information. The fuzzy location page should also display an alert or use some UI indicator informing user of the fuzzy nature of location and encourage them to manually update/refine it.

Dependencies

  • [ ] https://github.com/openwisp/openwisp-controller/issues/1034

DragnEmperor avatar May 14 '25 13:05 DragnEmperor

Thinking out loud:

Writing down some questions to brainstorm about the UX

  • How often will this notification be sent?
  • Do we need to send an email notification for this operation?
  • Can we use the generic_message notification type for this notification which only sends web notification?

pandafy avatar May 20 '25 10:05 pandafy

Thinking out loud:

Writing down some questions to brainstorm about the UX

  • How often will this notification be sent?
  • Do we need to send an email notification for this operation?
  • Can we use the generic_message notification type for this notification which only sends web notification?

For first one, I think we can have something like threshold period, based on created/updated field of location to check if it is again modified within the threshold period then do not trigger.

For second one, yes sending email will seem like spam. But if it is required then we can send it for creation and not updation

For third one, yes we can use this for web only notifications.

DragnEmperor avatar May 21 '25 17:05 DragnEmperor

Instead of showing an alert, we can explore something along the side of django messages framework, to display a warning on the location admin page indicating the fuzzy nature.

https://docs.djangoproject.com/en/5.2/ref/contrib/messages/

DragnEmperor avatar Jun 03 '25 17:06 DragnEmperor

Instead of showing an alert, we can explore something along the side of django messages framework, to display a warning on the location admin page indicating the fuzzy nature.

What if the network administrator is not online when the fuzzy location is created? What shortcoming do you see with using notifications?

pandafy avatar Jun 05 '25 11:06 pandafy

Instead of showing an alert, we can explore something along the side of django messages framework, to display a warning on the location admin page indicating the fuzzy nature.

What if the network administrator is not online when the fuzzy location is created? What shortcoming do you see with using notifications?

Hi @pandafy , We are sending notifications whenever a fuzzy location is created/updated. The above is for when a user opens admin of a fuzzy location, in that case we must show some kind of warning/information indicating that the location is fuzzy and they should optimize it manually.

DragnEmperor avatar Jun 05 '25 14:06 DragnEmperor