From 92df886a1a7a1501553eea5b60b03d39c8da0e75 Mon Sep 17 00:00:00 2001 From: Benjamin Weder Date: Tue, 25 Jul 2023 14:06:23 +0200 Subject: [PATCH] Add notifications on triggering/completing QRM update (#72) --- .../extensions/quantme/ui/QuantMEPluginButton.js | 6 ++++++ .../quantme/ui/control/QuantMEController.js | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/components/bpmn-q/modeler-component/extensions/quantme/ui/QuantMEPluginButton.js b/components/bpmn-q/modeler-component/extensions/quantme/ui/QuantMEPluginButton.js index 793d36e2..50cb22ea 100644 --- a/components/bpmn-q/modeler-component/extensions/quantme/ui/QuantMEPluginButton.js +++ b/components/bpmn-q/modeler-component/extensions/quantme/ui/QuantMEPluginButton.js @@ -12,6 +12,12 @@ export default function QuantMEPluginButton() { // trigger initial QRM update updateQRMs().then(response => { console.log('Update of QRMs completed: ', response); + NotificationHandler.getInstance().displayNotification({ + type: 'info', + title: 'Successfully updated QRMs', + content: 'Loaded ' + response.length + ' QRMs from configured repository!', + duration: 4000 + }); }).catch(e => { NotificationHandler.getInstance().displayNotification({ type: 'warning', diff --git a/components/bpmn-q/modeler-component/extensions/quantme/ui/control/QuantMEController.js b/components/bpmn-q/modeler-component/extensions/quantme/ui/control/QuantMEController.js index 39d12d9f..8a7aa194 100644 --- a/components/bpmn-q/modeler-component/extensions/quantme/ui/control/QuantMEController.js +++ b/components/bpmn-q/modeler-component/extensions/quantme/ui/control/QuantMEController.js @@ -165,8 +165,20 @@ export default class QuantMEController extends PureComponent { } updateQRMs() { + NotificationHandler.getInstance().displayNotification({ + type: 'info', + title: 'QRMs update triggered', + content: 'Triggered QRM update from configured repository!', + duration: 4000 + }); updateQRMs().then(response => { console.log('Update of QRMs completed: ', response); + NotificationHandler.getInstance().displayNotification({ + type: 'info', + title: 'Successfully updated QRMs', + content: 'Loaded ' + response.length + ' QRMs from configured repository!', + duration: 4000 + }); }).catch(e => { NotificationHandler.getInstance().displayNotification({ type: 'warning',