uportal-project / notificationportlet Goto Github PK
View Code? Open in Web Editor NEWJSR-286 portlet implementing notifications in uPortal.
Home Page: https://wiki.jasig.org/pages/viewpage.action?pageId=47875986
License: Apache License 2.0
JSR-286 portlet implementing notifications in uPortal.
Home Page: https://wiki.jasig.org/pages/viewpage.action?pageId=47875986
License: Apache License 2.0
Code has been migrated to https://github.com/uPortal-contrib/notification-web-components
The remaining webcomponent code in this repository can now be safely removed.
Describe the bug
When the modal (web component) has ReadAction
as one of its available actions, clicking the button would send the user to /NotificationPortlet/api/v2/action/ReadAction/modal-005?_csrf=...
{
"categories": [
{
"title": "Portal Message",
"entries": [
{
"id": "modal-005",
"priority": 1,
"title": "Student Portal Updates",
"body": "Welcome to the new student portal based on <a href=\"https://apereo.org/projects/uPortal\">uPortal 5</a>. There are several exciting new features included with this update. Please take a moment to familiarize yourself with the new content & options.",
"source": "Demo Service",
"url": "http:\/\/library.university\/parking",
"availableActions": [
{
"label": "Acknowledge",
"clazz": "org.jasig.portlet.notice.action.read.ReadAction"
}
]
}
]
}
]
}
Expected behavior
Fire the action in the background and hide the modal
New UI components in the NotifificationPortlet project are Web Components (not portlets at all). They use the NotificationRestV2Controller
to access and interact with Notification data.
The NotificationRestV2Controller
interacts with data sources (beans that implement INotificationService
) using servlet-based methods, not portlet-based methods.
Most data sources have been updated to support this approach, but not this one (yet).
uPortal-web-components provides demo pages for most of it's components.
E.G.
Each demo comes with two parts.
It would be great to have similar demo pages for the notification web components.
The new NotificationRestV2Controller
provides Web Components with access to notifications, but not enough of the data sources with with it.
This ticket describes enhancements to the existing REST APIs, bot v1
& v2
. It includes a couple different but intertwined items:
/api/v1/**
configs in Spring Security so they recognize a form of access we actually haveTracked down an issue with a JPA call that is incompatible with Oracle CLOBs. This came to light with the new bell icon web component -- likely calling a JPA backed method that is not called for the normal portlet view
Previous to v4 (?), each component would load it's own set of notification sources. This allowed source distinctions between regular notices and those from emergency alerts, for example. With discoverable sources implemented in CacheNotificationService.java
, those will appear in all notification portlets, including Emergency Alerts.
One solution is to have an option to disable the discovery code when the bean is defined. This would allow configuration to revert this behavior.
Another approach may be to add more filter options.
The SIGNATURE_KEY_PROPERTY (org.apereo.portal.soffit.jwt.signatureKey) in SecurityConfiguration.java is never read from the uPortal.properties file so it always reverts to the default. This causes notifications to not be read into the notification icon if the signatureKey is changed in uPortal.properties.
It looks like the setup is sort of mimicking the way it's set up in the uPortal project (which works), using the AbstractJwtService, but in the uPortal project the AbstractJwtService is extended in other classes (like PortalRequestService) which are annotated with @βService.
Working with a client, we are seeing duplicate notifications from a custom source. This issue is not consistent and hard to duplicate. Will update after more testing/logging.
Graphic changes to a 'dot' when no notifications are present.
Originally reported by @bjagg
Scenario: notices are displayed in notification-banner with Acknowledge (Per Session) Action.
Sometimes, when the user acknowledges that notices after logging in, the notices are displayed again on second page refresh.
Student want a faster way to view priority notifications without navigating to a new page.
Provide the notification icon with a preview dropdown so students can see high priority notifications without leaving their current work flow
<notification-icon>
, that component can be in any framework.Integrate with uPortal-Project/uPortal#1162 and #69
This is an item of "tech debt."
These choices better match our current preferences (in the community).
I'm trying to build a jar to make some functionality (pull request #352) available but I'm unable to bring in notification-portlet-webapp-jar
as a dependency.
I see it at https://repo1.maven.org/maven2/org/jasig/portlet/notification/notification-portlet-webapp/4.6.1/ but I'm guessing that since a pom doesn't exist for it, Maven/Grade can't pull it in.
During testing for notification bell counts, discovered that notifications without IDs are not processed with default statuses, like READ status.
New UI components in the NotifificationPortlet project are Web Components (not portlets at all). They use the NotificationRestV2Controller
to access and interact with Notification data.
The NotificationRestV2Controller
interacts with data sources (beans that implement INotificationService
) using servlet-based methods, not portlet-based methods.
Most data sources have been updated to support this approach, but not this one (yet).
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
org.hibernate:hibernate-entitymanager
, org.hibernate:hibernate-ehcache
, org.hibernate:hibernate-core
)com.fasterxml.jackson.core:jackson-core
, com.fasterxml.jackson.core:jackson-annotations
)io.springfox:springfox-swagger-ui
, io.springfox:springfox-swagger2
)org.springframework:spring-tx
, org.springframework:spring-orm
, org.springframework:spring-jdbc
)io.springfox:springfox-swagger-ui
, io.springfox:springfox-swagger2
).github/workflows/CI.yml
actions/checkout v4
actions/setup-java v4
gradle.properties
org.apache.portals:portlet-api_2.1.0_spec 1.0
com.fasterxml.jackson.core:jackson-annotations 2.13.4
com.fasterxml.jackson.core:jackson-core 2.13.4
com.fasterxml.jackson.core:jackson-databind 2.14.2
commons-lang:commons-lang 2.6
org.slf4j:slf4j-api 1.7.36
javax.annotation:javax.annotation-api 1.3.2
javax.xml.bind:jaxb-api 2.3.1
org.projectlombok:lombok 1.18.32
javax.servlet:servlet-api 2.5
com.google.guava:guava 31.1-jre
com.jayway.jsonpath:json-path 2.7.0
commons-codec:commons-codec 1.16.1
commons-dbcp:commons-dbcp 1.4
io.springfox:springfox-swagger2 2.9.2
io.springfox:springfox-swagger-ui 2.9.2
javax.servlet:jstl 1.2
joda-time:joda-time 2.12.7
net.sf.dozer:dozer 5.5.1
net.sf.dozer:dozer-spring 5.5.1
org.ehcache:ehcache 3.9.0
org.apache.commons:commons-lang3 3.14.0
org.apache.httpcomponents:httpclient 4.5.14
org.aspectj:aspectjweaver 1.9.7
org.codehaus.janino:janino 3.1.12
org.hibernate:hibernate-core 5.4.26.Final
org.hibernate:hibernate-ehcache 5.4.26.Final
org.hibernate:hibernate-entitymanager 5.4.26.Final
org.jasig.resourceserver:resource-server-utils 1.5.0
org.jasig.portal:uPortal-soffit-renderer 5.16.1
org.jasig.portal:uPortal-spring 5.16.1
org.jasypt:jasypt-spring31 1.9.3
org.springframework:spring-jdbc 4.3.30.RELEASE
org.springframework:spring-orm 4.3.30.RELEASE
org.springframework:spring-tx 4.3.30.RELEASE
org.springframework:spring-webmvc-portlet 4.3.30.RELEASE
org.springframework.security.oauth:spring-security-oauth2 2.5.2.RELEASE
com.rometools:rome 1.19.0
org.hsqldb:hsqldb 2.5.0
settings.gradle
build.gradle
net.researchgate.release 2.8.1
junit:junit 4.13.2
org.junit.vintage:junit-vintage-engine 5.10.2
notification-portlet-api/build.gradle
notification-portlet-webapp/build.gradle
org.springframework.boot:spring-boot-gradle-plugin 1.5.22.RELEASE
com.github.node-gradle.node 5.0.0
gradle/wrapper/gradle-wrapper.properties
gradle 6.9.4
notification-portlet-webapp/package.json
clean-css-cli ^4.3.0
less ^3.11.3
uglifyjs-folder ^3.0.0
Allow attribute to notification bell web component to enable display count of all notifications rather than just unread.
Needs to...
Business need: to show some notices (such as holds) in the Notification Modal web component only once per session / login. The notices should still show in bell icon and list web components, but not display in a modal again for that session. However, the notices will display again in a modal on next login.
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.
Emergency Alerts uses a second instance of DemoNotificationService
. Because there are two beans of this type, each of them is reading notifications based on the DemoNotificationService.locations
and you end up with duplicates.
By default, notifications without actions have the MarkAsReadAndRedirectAction
added. This is not always desired by the implementer.
A configuration option should be added to disable this behavior.
There is a REST controller for managing notifications. In particular, there is a Get REST API endpoint for retrieving Notifications. Currently the notifications returned are unsorted.
It would be good to have them be sorted by the 'soonest expiring' notification.
For now, the order can be hard-coded.
When viewing portal in a small mobile size, cannot interact with bell
We don't have it quite right.
As far as we know...
When clicking on the links in the accordian view for All and Today there doesn't seem to be any change in which notifications are displayed to the user. It's not clear what should happen when the user clicks on either of those links.
ERROR Failed to compile with 1 errors 3:34:23 PM
error
notification-banner.min.js from Terser
TypeError: Cannot read property 'minify' of undefined
at minify (/home/christian/Projects/uPortal/Portlets/NotificationPortlet/notification-portlet-webcomponents/notification-banner/node_modules/terser-webpack-plugin/dist/minify.js:175:23)
at module.exports (/home/christian/Projects/uPortal/Portlets/NotificationPortlet/notification-portlet-webcomponents/notification-banner/node_modules/terser-webpack-plugin/dist/worker.js:13:40)
at handle (/home/christian/Projects/uPortal/Portlets/NotificationPortlet/notification-portlet-webcomponents/notification-banner/node_modules/worker-farm/lib/child/index.js:44:8)
at process.<anonymous> (/home/christian/Projects/uPortal/Portlets/NotificationPortlet/notification-portlet-webcomponents/notification-banner/node_modules/worker-farm/lib/child/index.js:51:3)
at process.emit (events.js:197:13)
at emit (internal/child_process.js:828:12)
at processTicksAndRejections (internal/process/next_tick.js:76:17)
This issue is the same as: vuejs/vue-cli#3407
and will be resolved when: terser/terser#254 is merged
Add ability to ignore some notifications based on regex against title or body.
Describe the bug
The Bootstrap stylesheet that is loaded for the icon web component is affecting the entire page as opposed to just the web component
To Reproduce
Steps to reproduce the behavior:
Platform:
In https://github.com/Jasig/NotificationPortlet/blob/master/notification-portlet-webcomponents/notification-icon/src/components/NotificationItem.vue#L2, the icon is currently showing the body of the notification
Would it be possible for this to be configurable?
To works with the https://uportal-project.github.io/NotificationPortlet the docs/README.md entry point is missing.
And maybe moving some docs from the old wiki here.
Describe the bug
A regeneratorRuntime is not defined
is preventing the modal notification from rendering
To Reproduce
Expected behavior
A notification modal
Platform:
Describe the bug
NotificationPortlet attempts to create tables that exceed the Oracle Object Name limit in versions previous to 12.2. Databases need to be configured with COMPATIBLE set to 12.2.
To Reproduce
Steps to reproduce the behavior:
./gradlew portalInit portalOpen
ORA-00972
Expected behavior
Tables successfully created.
Additional context
https://docs.oracle.com/en/database/oracle/oracle-database/12.2/sqlrf/Database-Object-Names-and-Qualifiers.html#GUID-75337742-67FD-4EC0-985F-741C93D918DA
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.