Document legacy workflows and stabilize migrated services
This commit is contained in:
@@ -63,8 +63,14 @@ public class DashboardView extends VerticalLayout {
|
||||
|
||||
// Today's jobs count
|
||||
try {
|
||||
Object[] todayJobs = restClient.get("/jobs/today", Object[].class);
|
||||
cards.add(createInfoCard("Heutige Auftraege", String.valueOf(todayJobs != null ? todayJobs.length : 0)));
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> result = restClient.get(
|
||||
"/jobs/today/count",
|
||||
LinkedHashMap.class
|
||||
);
|
||||
Object rawCount = result != null ? result.get("count") : null;
|
||||
long count = rawCount instanceof Number ? ((Number) rawCount).longValue() : 0L;
|
||||
cards.add(createInfoCard("Heutige Auftraege", String.valueOf(count)));
|
||||
} catch (Exception e) {
|
||||
cards.add(createInfoCard("Heutige Auftraege", "N/A"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user