-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#2698 Corrected cache pending events -
- Update cached pending events for only logged user; (Limiting the number of database queries) - added spring bean org.scada_lts.login.LoggedUsers; corrected update permission without logout user; added test suite: LoggedUserTestsSuite (LoggedUsersMultiThreadTest, LoggedUsersTest), extends MultiThreadEngine and TestConcurrentUtils; removed deprecated methods: MangoEvent/EventService.getPendingSimpleEventsForDataSource, MangoEvent/EventService.getPendingSimpleEvents; removed deprecated class EventDao; added enum AlarmLevelType; refactor: PendingEventsDAO, PendingEventService; - The current limited event analysis to the number of events within the limit, this has been corrected for cache mode; (Information about events could be false, e.g. an event that should have been displayed could be missing, on Alarm List Component) - added parameter event.pending.update.limit to env.properties, corrected AlarmListComponent, added method getEventPendingUpdateLimit in SystemSettingsUtils; - By default, the Pending event cache is enabled; (This setting can be changed from SystemSettings) - set abilit.cacheEnable=true in env.properties
- Loading branch information
Showing
24 changed files
with
1,448 additions
and
332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.serotonin.mango.rt.event.type; | ||
|
||
import com.serotonin.mango.rt.event.AlarmLevels; | ||
|
||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
import java.util.stream.Stream; | ||
|
||
public enum AlarmLevelType { | ||
|
||
NONE(AlarmLevels.NONE), | ||
INFORMATION(AlarmLevels.INFORMATION), | ||
URGENT(AlarmLevels.URGENT), | ||
CRITICAL(AlarmLevels.CRITICAL), | ||
LIFE_SAFETY(AlarmLevels.LIFE_SAFETY); | ||
private final int code; | ||
AlarmLevelType(int code) { | ||
this.code = code; | ||
} | ||
|
||
public int getCode() { | ||
return code; | ||
} | ||
|
||
public static List<AlarmLevelType> getAlarmLevels() { | ||
return Stream.of(AlarmLevelType.values()).collect(Collectors.toList()); | ||
} | ||
|
||
public static List<AlarmLevelType> getAlarmLevelsWithoutNone() { | ||
return Stream.of(AlarmLevelType.values()).filter(a -> a != AlarmLevelType.NONE).collect(Collectors.toList()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.