Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Minor

Rich Turner09f2e3b83a28
diff --git a/client/src/main/java/org/openremote/app/client/OpenRemoteApp.java b/client/src/main/java/org/openremote/app/client/OpenRemoteApp.java
index 6f5975540..f1c73f5b5 100644
--- a/client/src/main/java/org/openremote/app/client/OpenRemoteApp.java
+++ b/client/src/main/java/org/openremote/app/client/OpenRemoteApp.java
@@ -7,7 +7,7 @@ import jsinterop.annotations.JsType;
import jsinterop.base.Any;
import org.openremote.app.client.rest.Requests;
import org.openremote.app.client.toast.Toasts;
-import java.util.function.Consumer;
+import org.openremote.model.interop.Consumer;
import org.openremote.model.security.Tenant;
import org.openremote.model.interop.Runnable;
diff --git a/client/src/main/java/org/openremote/app/client/app/HeaderViewImpl.ui.xml b/client/src/main/java/org/openremote/app/client/app/HeaderViewImpl.ui.xml
index 86d15c60a..01aad812e 100644
--- a/client/src/main/java/org/openremote/app/client/app/HeaderViewImpl.ui.xml
+++ b/client/src/main/java/org/openremote/app/client/app/HeaderViewImpl.ui.xml
@@ -31,7 +31,7 @@
<w:PushButton ui:field="notificationsButton"
addStyleNames="{widgetStyle.NavItem}"
- icon="chain"
+ icon="send"
text="{managerMessages.notifications}"/>
<w:PushButton ui:field="appsButton"
diff --git a/client/src/main/webapp/index.html b/client/src/main/webapp/index.html
index 881c008bf..69543949f 100644
--- a/client/src/main/webapp/index.html
+++ b/client/src/main/webapp/index.html
@@ -61,7 +61,7 @@
<body class="layout vertical">
-<or-app login="true"></or-app>
+<or-app login="true" console-name="Manager" console-version="1.0"></or-app>
<iframe src="javascript:''"
id="__gwt_historyFrame"
diff --git a/manager/src/main/java/org/openremote/manager/notification/NotificationService.java b/manager/src/main/java/org/openremote/manager/notification/NotificationService.java
index b577d94c4..e2d6f2ab7 100644
--- a/manager/src/main/java/org/openremote/manager/notification/NotificationService.java
+++ b/manager/src/main/java/org/openremote/manager/notification/NotificationService.java
@@ -418,7 +418,7 @@ public class NotificationService extends RouteBuilder implements ContainerServic
}
if (fromTimestamp != null) {
- builder.append(" AND n.sentOn <= ?")
+ builder.append(" AND n.sentOn >= ?")
.append(parameters.size() + 1);
parameters.add(new Date(fromTimestamp));
diff --git a/manager/src/main/resources/demo/rules/DemoConsoleLocation.groovy b/manager/src/main/resources/demo/rules/DemoConsoleLocation.groovy
index 089c22294..ee063b94b 100644
--- a/manager/src/main/resources/demo/rules/DemoConsoleLocation.groovy
+++ b/manager/src/main/resources/demo/rules/DemoConsoleLocation.groovy
@@ -1,7 +1,6 @@
package demo.rules
import org.openremote.manager.rules.RulesBuilder
-import org.openremote.manager.rules.facade.NotificationsFacade
import org.openremote.manager.setup.builtin.ManagerDemoSetup
import org.openremote.model.notification.Notification
import org.openremote.model.query.AssetQuery
diff --git a/test/src/test/groovy/org/openremote/test/notification/NotificationTest.groovy b/test/src/test/groovy/org/openremote/test/notification/NotificationTest.groovy
index 10d91e4cd..bdd34e749 100644
--- a/test/src/test/groovy/org/openremote/test/notification/NotificationTest.groovy
+++ b/test/src/test/groovy/org/openremote/test/notification/NotificationTest.groovy
@@ -367,7 +367,7 @@ class NotificationTest extends Specification implements ManagerContainerTrait {
ex.response.status == 403
when: "the admin user removes notifications by timestamp and the notifications are retrieved again"
- notifications = notifications.sort {n -> n.sentOn}
+ notifications = notifications.sort {n -> n.sentOn}.reverse(true)
adminNotificationResource.removeNotifications(null, null, PushNotificationMessage.TYPE, notifications[0].sentOn.getTime(), null, null, null, null)
notifications = []
notifications.addAll(adminNotificationResource.getNotifications(null, null, null, null, null, null, null, testuser2Console.id))
@@ -375,8 +375,8 @@ class NotificationTest extends Specification implements ManagerContainerTrait {
notifications.addAll(adminNotificationResource.getNotifications(null, null, null, null, null, null, null, testuser3Console2.id))
notifications.addAll(adminNotificationResource.getNotifications(null, null, null, null, null, null, null, anonymousConsole.id))
- then: "notifications sent before or at that time should have been removed"
- assert notifications.size() == 11
+ then: "notifications sent after or at that time should have been removed"
+ assert notifications.size() == 13
when: "the admin user removes notifications sent to specific console assets without other constraints and the notifications are retrieved again"
adminNotificationResource.removeNotifications(null, null, null, null, null, null, null, testuser3Console1.id)
@@ -388,7 +388,7 @@ class NotificationTest extends Specification implements ManagerContainerTrait {
notifications.addAll(adminNotificationResource.getNotifications(null, null, null, null, null, null, null, anonymousConsole.id))
then: "all notifications sent to those consoles should have been removed"
- assert notifications.size() == 5
+ assert notifications.size() == 7
assert notifications.count {n -> n.targetId == testuser3Console1.id || n.targetId == testuser3Console2.id} == 0
when: "the admin user removes notifications by type and the notifications are retrieved again"