api,server,ui: allow listing events by state#11355
api,server,ui: allow listing events by state#11355sureshanaparti merged 2 commits intoapache:mainfrom
Conversation
This change allows listing events by a particular state - Created, Scheduled, Started, Completed. A new parameter - state has been added to the listEvents API and corresponding changes have been added in the UI. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #11355 +/- ##
============================================
+ Coverage 17.17% 17.35% +0.17%
- Complexity 14993 15189 +196
============================================
Files 5869 5883 +14
Lines 521728 524514 +2786
Branches 63506 64007 +501
============================================
+ Hits 89604 91009 +1405
- Misses 422053 423219 +1166
- Partials 10071 10286 +215
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| eventSearchBuilder.and("createDateB", eventSearchBuilder.entity().getCreateDate(), SearchCriteria.Op.BETWEEN); | ||
| eventSearchBuilder.and("createDateG", eventSearchBuilder.entity().getCreateDate(), SearchCriteria.Op.GTEQ); | ||
| eventSearchBuilder.and("createDateL", eventSearchBuilder.entity().getCreateDate(), SearchCriteria.Op.LTEQ); | ||
| eventSearchBuilder.and("state", eventSearchBuilder.entity().getState(), SearchCriteria.Op.NEQ); |
There was a problem hiding this comment.
hm, are we sure we never depend on a search for states except for…? It seems strange just reversing the condition.
There was a problem hiding this comment.
"state" was not being used in the search criteria before this. So I think it is fine to do so.
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14489 |
api/src/main/java/org/apache/cloudstack/api/command/user/event/ListEventsCmd.java
Outdated
Show resolved
Hide resolved
…/ListEventsCmd.java
* api,server,ui: allow listing events by state This change allows listing events by a particular state - Created, Scheduled, Started, Completed. A new parameter - state has been added to the listEvents API and corresponding changes have been added in the UI. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com> * Update api/src/main/java/org/apache/cloudstack/api/command/user/event/ListEventsCmd.java --------- Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com> Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>







Description
This change allows listing events by a particular state - Created, Scheduled, Started, Completed.
A new parameter - state has been added to the listEvents API and corresponding changes have been added in the UI.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?