From 6d21eb4f9eb7ec05932a8393a9036ffb2fae0436 Mon Sep 17 00:00:00 2001 From: Pablo Pazos Gutierrez Date: Sat, 12 Oct 2019 21:25:55 -0300 Subject: [PATCH] platform notifications working closes #1050 --- .gradle/3.5/fileContent/fileContent.lock | Bin 38 -> 17 bytes .gradle/3.5/taskHistory/fileHashes.bin | Bin 292419 -> 293669 bytes .gradle/3.5/taskHistory/fileSnapshots.bin | Bin 6816601 -> 7344688 bytes .gradle/3.5/taskHistory/taskHistory.bin | Bin 48951 -> 48951 bytes .gradle/3.5/taskHistory/taskHistory.lock | Bin 38 -> 17 bytes grails-app/assets/javascripts/notification.js | 97 +++++++++--------- grails-app/conf/logback.groovy | 1 + .../NotificationController.groovy | 2 +- .../cabolabs/security/AuthController.groovy | 8 +- .../notification/Notification.groovy | 24 +++-- .../notification/NotificationJob.groovy | 60 +++++++++++ grails-app/views/notification/index.gsp | 2 +- 12 files changed, 137 insertions(+), 57 deletions(-) create mode 100644 grails-app/jobs/com/cabolabs/ehrserver/notification/NotificationJob.groovy diff --git a/.gradle/3.5/fileContent/fileContent.lock b/.gradle/3.5/fileContent/fileContent.lock index 29862e68f957e157b916bfebb79e7b8473fd6e02..b7184fb420119ba194dc52abfbf51b57ccd37a08 100644 GIT binary patch literal 17 UcmZQpXE?LpC%)oF^fl={zAn$gccm@^|3nOy|1^~dV2=4#@ diff --git a/.gradle/3.5/taskHistory/fileHashes.bin b/.gradle/3.5/taskHistory/fileHashes.bin index bf9667487e1cf1cbfc516da1b05f762f8f80b96e..39f69a03532fdb9ffccebfc66432433ff21e981e 100644 GIT binary patch delta 19014 zcmZu(30%$D7x$LX`g$s!msEB_vXi8-CP}gksU*voG|3*4#x^ENepA;{5?PZx;Ta)W z#*!wD!H}e}FG*xc=zo5{-#Ne6%=~>m#`m0iwtMdSyZ631_foyQ9^^9~*v)MNiak-0c8JI=OJt9o6XUpoKp1d+MOD0_a- zw+&=5*}DFvDYENa!ri7S`KNkjAD z`t>VhYD-njtF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pt_2g${QP7|aSOPh)0t#RaY``Qi z8Q20lU=JLCBX9!FU0znW628%!lSPXs#LO~c<0+xbs5CN8fNbn|D4pxAbU=@f0(I5uIg4G}n ltO0AmIuH-m10_fR8$cpR0xGZ(B!f*r4K|~o!4x~Ie*>g3_)P!+ diff --git a/.gradle/3.5/taskHistory/taskHistory.bin b/.gradle/3.5/taskHistory/taskHistory.bin index a8b90ced0100681255564185de3c432b395fe131..9e51e9d766afe1e1d197f93b896ee8db6e2e0e2c 100644 GIT binary patch delta 731 zcmdn~k7@fqrVZgq^|lH!mVaCiGxQea=a&Q*q$aBvsu;ewlPR}+9lIT}pwar?Kbn8H zgsngpG`4;dc(wdA>pf&a6Ayvy^|5K&loJ zc8-nw*t|2pXmV3^&Ss}%QP%p+tMoUE?Vqy;*(Ad^vM=8)%i67uENH~IB=dQv9q%n< zLF0{D@?NQl+r^LtO)h1at^I~2U zvPp)2cQEL`F<+jIENJA|w3%I5-?|1_(0G*z!xi4^752!2CP~J9w|8q;zejh7+|}dv zZmd!IVxE$jcl*4u9NZ!KPPPgYK16Rj`rFxXLOL*R$|{|65{ruq5=%19d`_6OQ+pG` z7&1x^sFD*(=ot0Y2YdGC!Cb~tF!;ktZE?+GeeR%!j82isAlRr+b z-TbTFgH^#Y&Mf1c)4k{Dw(yzmi#epUpA&4$!-e|))k`0%LTzc`2(6udaPoR|TPnXS z`nFwHX6d9t7F9O>*Rlv(RyozxG`ikbK({5~z0Y62`fZM2TQ;pU(*6~*uMujC*T2Kd lS2A0iLARye^=E%i*s`y)E^YoEZM5kJ)D~M-76t~P695fgLP-Ds delta 730 zcmdn~k7@fqrVZgq^^<*mZ)|uf9NJrypI;JOkeaMwsABkNa(!KllIC7yL8DD?JzJ}$ zU4DTqXgq)YWi#JA4tZojlXp*&i{>q36k_a8Ni8nP%u6iE%+GVlEb3Z2m1&Xeyh9e^ z&#X>`1v2f-FPhv`owL~~S(LT@HTS)QYgMyXA)92le!`ZmJztLZAqyHM%PyXj9>&9l zENFb`-$|3tGlWke3z|e-X`Q$2;n7NThp>yvpSj(p|Hw2;xSsizv;m4kNDwj2mAVcW54+S 0) - { - $('#top-notifications-menu > a').append(''+ new_nts_count +''); - } - - notifications = ''; - $.each( data, function( i, nstatus ) { - - // TODO: add class="dismissed" to the LIs of notifications that were dismissed - if (nstatus.status == 'new') - $('#top-notifications-menu .drop-content').append('
  • '+ nstatus.notification.text +'
    '+ nstatus.notification.dateCreated +'
  • '); - else - $('#top-notifications-menu .drop-content').append('
  • '+ nstatus.notification.text +'
    '+ nstatus.notification.dateCreated +'
  • '); - }); - - - $('.dismiss').on('click', function (evn) { - //console.log('id', $(this).data('id')); - - // dismiss with the new notifications on the menu - var notif_dom = $(this).closest('li'); - - $.get( dismiss_url, { id: $(this).data('id') }, 'json') - .done(function(data) { - console.log(data); - // TODO: update the DOM adding the dismissed class to the LI - console.log(notif_dom); - notif_dom.addClass('dismissed'); - }) - .fail(function() { - //alert( "error" ); - }) - .always(function() { - //alert( "finished" ); - }); - }); - }) - .fail(function() { - //alert( "error" ); - }) - .always(function() { - //alert( "finished" ); + // why are we sending the section if the section is null for remote notifications? + $.get(get_not_url, { forSection: forSection }, 'json') + .done(function(data) { + //console.log(data); + + var new_nts_count = data.filter(function(sts) { return sts.status == 'new'; }).length; + + if (new_nts_count > 0) + { + $('#top-notifications-menu > a').append(''+ new_nts_count +''); + } + + notifications = ''; + $.each( data, function( i, nstatus ) { + + // TODO: add class="dismissed" to the LIs of notifications that were dismissed + if (nstatus.status == 'new') + $('#top-notifications-menu .drop-content').append('
  • '+ nstatus.notification.text +'
    '+ nstatus.notification.timestamp +'
  • '); + else + $('#top-notifications-menu .drop-content').append('
  • '+ nstatus.notification.text +'
    '+ nstatus.notification.timestamp +'
  • '); }); + + + $('.dismiss').on('click', function (evn) { + //console.log('id', $(this).data('id')); + + // dismiss with the new notifications on the menu + var notif_dom = $(this).closest('li'); + + $.get( dismiss_url, { id: $(this).data('id') }, 'json') + .done(function(data) { + console.log(data); + // TODO: update the DOM adding the dismissed class to the LI + console.log(notif_dom); + notif_dom.addClass('dismissed'); + }) + .fail(function() { + //alert( "error" ); + }) + .always(function() { + //alert( "finished" ); + }); + }); + }) + .fail(function() { + //alert( "error" ); + }) + .always(function() { + //alert( "finished" ); + }); } diff --git a/grails-app/conf/logback.groovy b/grails-app/conf/logback.groovy index 300ce8fc6..908024d5c 100644 --- a/grails-app/conf/logback.groovy +++ b/grails-app/conf/logback.groovy @@ -41,3 +41,4 @@ logger("com.cabolabs.security.stateless", DEBUG) logger("com.cabolabs.ehrserver.i18n", DEBUG) logger("com.cabolabs.ehrserver.indexing", INFO) logger("com.cabolabs.ehrserver.account", INFO) +logger("com.cabolabs.ehrserver.notification", INFO) diff --git a/grails-app/controllers/com/cabolabs/ehrserver/notification/NotificationController.groovy b/grails-app/controllers/com/cabolabs/ehrserver/notification/NotificationController.groovy index e9c3c3b8a..b953769ca 100644 --- a/grails-app/controllers/com/cabolabs/ehrserver/notification/NotificationController.groovy +++ b/grails-app/controllers/com/cabolabs/ehrserver/notification/NotificationController.groovy @@ -90,7 +90,7 @@ class NotificationController { // List def notifications = Notification.lastNotifications(forSection, session.organization.uid, loggedInUser.uid, session.lang) - notifications = notifications.collect{ [status: it.status, notification: [text: it.notification.text, dateCreated: it.notification.dateCreated, id: it.notification.id]] } + notifications = notifications.collect{ [status: it.status, notification: [text: it.notification.text, timestamp: it.notification.timestamp, id: it.notification.id]] } render (contentType: "application/json", text: notifications as JSON, encoding:"UTF-8") } diff --git a/grails-app/controllers/com/cabolabs/security/AuthController.groovy b/grails-app/controllers/com/cabolabs/security/AuthController.groovy index 07c5988f2..0c3e640cf 100644 --- a/grails-app/controllers/com/cabolabs/security/AuthController.groovy +++ b/grails-app/controllers/com/cabolabs/security/AuthController.groovy @@ -62,7 +62,13 @@ class AuthController { def notifications = remoteNotificationsService.getNotifications('ehrserver', session.lang, from) notifications.each { notification -> - new Notification(name:'remote', language:session.lang, text:notification.nt, forUser:User.findByEmail(email).id).save() + new Notification( + name: 'remote', + language: session.lang, + text: notification.nt, + forUser: User.findByEmail(email).id, + timestamp: Date.parse("yyyy-MM-dd'T'HH:mm:ss'Z'", notification.ts) + ).save() } // Mark current read of the remote notifications diff --git a/grails-app/domain/com/cabolabs/ehrserver/notification/Notification.groovy b/grails-app/domain/com/cabolabs/ehrserver/notification/Notification.groovy index 3b75080fd..7b2fc311e 100644 --- a/grails-app/domain/com/cabolabs/ehrserver/notification/Notification.groovy +++ b/grails-app/domain/com/cabolabs/ehrserver/notification/Notification.groovy @@ -33,7 +33,7 @@ class Notification { String forOrganization String forUser // user.uid - Date dateCreated + Date timestamp = new Date() boolean sent = false // used by the job that creates the notification statuses @@ -53,8 +53,14 @@ class Notification { } if (forUser) { - user { - eq('uid', forUser) + or + { + user { + eq('uid', forUser) + } + notification { + isNull('forUser') + } } } if (forOrganization) // forOrganization alwas comes, but it should match also when it is null on the notification @@ -81,7 +87,7 @@ class Notification { } maxResults(last) notification { - order("dateCreated", "desc") + order("timestamp", "desc") } } @@ -98,8 +104,14 @@ class Notification { } if (forUser) { - user { - eq('uid', forUser) + or + { + user { + eq('uid', forUser) + } + notification { + isNull('forUser') + } } } if (forOrganization) // forOrganization alwas comes, but it should match also when it is null on the notification diff --git a/grails-app/jobs/com/cabolabs/ehrserver/notification/NotificationJob.groovy b/grails-app/jobs/com/cabolabs/ehrserver/notification/NotificationJob.groovy new file mode 100644 index 000000000..db1f54a92 --- /dev/null +++ b/grails-app/jobs/com/cabolabs/ehrserver/notification/NotificationJob.groovy @@ -0,0 +1,60 @@ +package com.cabolabs.ehrserver.notification + +import com.cabolabs.security.User +import com.cabolabs.security.UserRole + +class NotificationJob { + + static concurrent = false + + static triggers = { + simple repeatInterval: 60000l, startDelay: 120000l // execute job once in 5 seconds + } + + def execute() + { + log.info "Notification Job Executing" + + Notification.findAllBySent(false).each { notificationInstance -> + + //println "send notification "+ notificationInstance.id + + def statuses = [] + if (!notificationInstance.forUser) + { + def users + if (notificationInstance.forOrganization) + { + def urs = UserRole.withCriteria { + organization { + eq('uid', notificationInstance.forOrganization) + } + user { + eq('isVirtual', false) + } + } + users = urs.user.unique() // unique avoids the same notif to go to a user that has 2 roles in the same org + } + else + { + users = User.list() + } + + users.each { user -> + statuses << new NotificationStatus(user:user, notification:notificationInstance) + } + } + else + { + statuses << new NotificationStatus(user:User.get(notificationInstance.forUser), notification:notificationInstance) + } + + statuses.each { status -> + status.save(failOnError: true) + } + + notificationInstance.sent = true + notificationInstance.save(failOnError: true) + } + } +} diff --git a/grails-app/views/notification/index.gsp b/grails-app/views/notification/index.gsp index cb11b39ae..2f24bc2f9 100644 --- a/grails-app/views/notification/index.gsp +++ b/grails-app/views/notification/index.gsp @@ -37,7 +37,7 @@ - +