Skip to content

Commit

Permalink
Leaderbordcommoncode (#6939)
Browse files Browse the repository at this point in the history
* add more data to views

* refactor/cleanup leaderbord
  • Loading branch information
pethers authored Jan 5, 2025
1 parent 5e86c9e commit 7629a01
Show file tree
Hide file tree
Showing 142 changed files with 1,112 additions and 1,203 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.hack23.cia.model.internal.application.data.impl.DataAgentTarget;
import com.hack23.cia.model.internal.application.system.impl.ApplicationEventGroup;
import com.hack23.cia.web.impl.ui.application.action.ViewAction;
import com.hack23.cia.web.impl.ui.application.views.common.pagemode.CardInfoRowUtil;
import com.hack23.cia.web.impl.ui.application.views.common.rows.RowUtil;
import com.hack23.cia.web.impl.ui.application.views.common.sizing.ContentRatio;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.AdminViews;
Expand Down Expand Up @@ -74,7 +75,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina

getMenuItemFactory().createMainPageMenuBar(menuBar);

createPageHeader(panel, content, "Admin Agent Operation Overview", "Admin Agent Operation", "Overview of administrative agent operations and tasks.");
CardInfoRowUtil.createPageHeader(panel, content, "Admin Agent Operation Overview", "Admin Agent Operation", "Overview of administrative agent operations and tasks.");

final HorizontalLayout horizontalLayout = new HorizontalLayout();
horizontalLayout.setSizeFull();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import com.hack23.cia.model.internal.application.data.audit.impl.ViewAuditAuthorSummary;
import com.hack23.cia.service.api.DataContainer;
import com.hack23.cia.web.impl.ui.application.views.common.pagemode.CardInfoRowUtil;
import com.hack23.cia.web.impl.ui.application.views.common.sizing.ContentRatio;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.AdminViews;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.DataSummaryPageMode;
Expand Down Expand Up @@ -62,7 +63,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina

getMenuItemFactory().createMainPageMenuBar(menuBar);

createPageHeader(panel, content, "Admin Author Summary", "Author Overview", "Detailed summary of authors and their contributions to data records.");
CardInfoRowUtil.createPageHeader(panel, content, "Admin Author Summary", "Author Overview", "Detailed summary of authors and their contributions to data records.");

final HorizontalLayout horizontalLayout = new HorizontalLayout();
horizontalLayout.setSizeFull();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.hack23.cia.service.api.action.admin.RefreshDataViewsRequest;
import com.hack23.cia.service.api.action.admin.RemoveDataRequest;
import com.hack23.cia.service.api.action.admin.UpdateSearchIndexRequest;
import com.hack23.cia.web.impl.ui.application.views.common.pagemode.CardInfoRowUtil;
import com.hack23.cia.web.impl.ui.application.views.common.rows.RowUtil;
import com.hack23.cia.web.impl.ui.application.views.common.sizing.ContentRatio;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.AdminViews;
Expand Down Expand Up @@ -95,7 +96,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina

getMenuItemFactory().createMainPageMenuBar(menuBar);

createPageHeader(panel, content, "Admin Data Summary Overview", "Data Summary Overview", "Comprehensive overview of data summaries for administrative review.");
CardInfoRowUtil.createPageHeader(panel, content, "Admin Data Summary Overview", "Data Summary Overview", "Comprehensive overview of data summaries for administrative review.");

final HorizontalLayout horizontalLayout = new HorizontalLayout();
horizontalLayout.setSizeFull();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.hack23.cia.service.api.DataContainer;
import com.hack23.cia.web.impl.ui.application.action.ViewAction;
import com.hack23.cia.web.impl.ui.application.views.common.converters.ListPropertyConverter;
import com.hack23.cia.web.impl.ui.application.views.common.pagemode.CardInfoRowUtil;
import com.hack23.cia.web.impl.ui.application.views.common.sizing.ContentRatio;
import com.hack23.cia.web.impl.ui.application.views.common.sizing.ContentSize;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.AdminViews;
Expand Down Expand Up @@ -101,7 +102,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina

getMenuItemFactory().createMainPageMenuBar(menuBar);

createPageHeader(panel, content, "Admin Agency Management", "Agency Overview",
CardInfoRowUtil.createPageHeader(panel, content, "Admin Agency Management", "Agency Overview",
"Manage and review details of agencies, including organizational data and performance metrics.");

final DataContainer<Agency, Long> dataContainer = getApplicationManager().getDataContainer(Agency.class);
Expand Down Expand Up @@ -148,7 +149,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina

leftLayout.addComponent(cardPanel);

createCardHeader(cardContent, "Agency Details");
CardInfoRowUtil.createCardHeader(cardContent, "Agency Details");

// Attributes layout
final VerticalLayout attributesLayout = new VerticalLayout();
Expand All @@ -157,8 +158,8 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina
cardContent.addComponent(attributesLayout);

// Display fields in a card layout (skipping null or empty ones)
addInfoRowIfNotNull(attributesLayout, "Agency Name:", agency.getAgencyName(), VaadinIcons.FLAG);
addInfoRowIfNotNull(attributesLayout, "Description:", agency.getDescription(), VaadinIcons.FILE_TEXT);
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Agency Name:", agency.getAgencyName(), VaadinIcons.FLAG);
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Description:", agency.getDescription(), VaadinIcons.FILE_TEXT);

// Right layout: portals grid
getGridFactory().createBasicBeanItemGrid(rightLayout, Portal.class, agency.getPortals(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.hack23.cia.service.api.DataContainer;
import com.hack23.cia.service.api.action.admin.UpdateApplicationConfigurationRequest;
import com.hack23.cia.web.impl.ui.application.action.ViewAction;
import com.hack23.cia.web.impl.ui.application.views.common.pagemode.CardInfoRowUtil;
import com.hack23.cia.web.impl.ui.application.views.common.sizing.ContentSize;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.AdminViews;
import com.hack23.cia.web.impl.ui.application.views.pageclicklistener.PageItemPropertyClickListener;
Expand Down Expand Up @@ -85,7 +86,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina

getMenuItemFactory().createMainPageMenuBar(menuBar);

createPageHeader(panel, content, "Admin Application Configuration", "Application Configuration",
CardInfoRowUtil.createPageHeader(panel, content, "Admin Application Configuration", "Application Configuration",
"View and edit application settings and configurations for optimal performance.");

final DataContainer<ApplicationConfiguration, Long> dataContainer = getApplicationManager()
Expand Down Expand Up @@ -142,7 +143,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina

leftLayout.addComponent(cardPanel);

createCardHeader(cardContent,"Application Configuration Details");
CardInfoRowUtil.createCardHeader(cardContent,"Application Configuration Details");

// Attributes layout
final VerticalLayout attributesLayout = new VerticalLayout();
Expand All @@ -151,19 +152,19 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina
cardContent.addComponent(attributesLayout);

// Display relevant fields using info rows, skipping null or empty
addInfoRowIfNotNull(attributesLayout, "Configuration Group:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Configuration Group:",
applicationConfiguration.getConfigurationGroup().toString(), VaadinIcons.GROUP);
addInfoRowIfNotNull(attributesLayout, "Component:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Component:",
applicationConfiguration.getComponent(), VaadinIcons.TOOLS);
addInfoRowIfNotNull(attributesLayout, "Config Title:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Config Title:",
applicationConfiguration.getConfigTitle(), VaadinIcons.FILE_TEXT);
addInfoRowIfNotNull(attributesLayout, "Config Description:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Config Description:",
applicationConfiguration.getConfigDescription(), VaadinIcons.FILE_O);
addInfoRowIfNotNull(attributesLayout, "Property Value:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Property Value:",
applicationConfiguration.getPropertyValue(), VaadinIcons.PASTE);
addInfoRowIfNotNull(attributesLayout, "Created Date:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Created Date:",
String.valueOf(applicationConfiguration.getCreatedDate()), VaadinIcons.CALENDAR);
addInfoRowIfNotNull(attributesLayout, "Updated Date:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Updated Date:",
String.valueOf(applicationConfiguration.getUpdatedDate()), VaadinIcons.CALENDAR_CLOCK);

// Right side: Form for updating the application configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import com.hack23.cia.model.internal.application.system.impl.ApplicationEventGroup;
import com.hack23.cia.web.impl.ui.application.action.ViewAction;
import com.hack23.cia.web.impl.ui.application.views.common.pagemode.CardInfoRowUtil;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.AdminViews;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode;
import com.vaadin.ui.Layout;
Expand Down Expand Up @@ -57,7 +58,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina

getMenuItemFactory().createMainPageMenuBar(menuBar);

createPageHeader(panel, content, "Admin Application Event Charts", "Event Analysis", "Visualize and analyze application events using interactive charts and graphs.");
CardInfoRowUtil.createPageHeader(panel, content, "Admin Application Event Charts", "Event Analysis", "Visualize and analyze application events using interactive charts and graphs.");

getAdminChartDataManager().createApplicationActionEventPageDailySummaryChart(content);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.hack23.cia.model.internal.application.system.impl.ApplicationEventGroup;
import com.hack23.cia.service.api.DataContainer;
import com.hack23.cia.web.impl.ui.application.action.ViewAction;
import com.hack23.cia.web.impl.ui.application.views.common.pagemode.CardInfoRowUtil;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.AdminViews;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode;
import com.hack23.cia.web.impl.ui.application.views.pageclicklistener.PageItemPropertyClickListener;
Expand Down Expand Up @@ -72,7 +73,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina

getMenuItemFactory().createMainPageMenuBar(menuBar);

createPageHeader(panel, content, "Admin Application Events", "Event Details",
CardInfoRowUtil.createPageHeader(panel, content, "Admin Application Events", "Event Details",
"Review a comprehensive list of application events, including timestamps and statuses.");

final DataContainer<ApplicationActionEvent, Long> dataContainer = getApplicationManager()
Expand Down Expand Up @@ -105,35 +106,35 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina

content.addComponent(cardPanel);

createCardHeader(cardContent,"Application Event Details");
CardInfoRowUtil.createCardHeader(cardContent,"Application Event Details");

// Attributes layout
final VerticalLayout attributesLayout = new VerticalLayout();
attributesLayout.setSpacing(true);
attributesLayout.setWidth("100%");
cardContent.addComponent(attributesLayout);

addInfoRowIfNotNull(attributesLayout, "Created Date:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Created Date:",
String.valueOf(applicationActionEvent.getCreatedDate()), VaadinIcons.CALENDAR);
addInfoRowIfNotNull(attributesLayout, "Event Group:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Event Group:",
String.valueOf(applicationActionEvent.getEventGroup()), VaadinIcons.INFO);
addInfoRowIfNotNull(attributesLayout, "Application Operation:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Application Operation:",
String.valueOf(applicationActionEvent.getApplicationOperation()), VaadinIcons.TOOLS);
addInfoRowIfNotNull(attributesLayout, "Page:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Page:",
String.valueOf(applicationActionEvent.getPage()), VaadinIcons.FILE_TEXT);
addInfoRowIfNotNull(attributesLayout, "Page Mode:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Page Mode:",
String.valueOf(applicationActionEvent.getPageMode()), VaadinIcons.LIST);
addInfoRowIfNotNull(attributesLayout, "Element Id:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Element Id:",
String.valueOf(applicationActionEvent.getElementId()), VaadinIcons.POINTER);
addInfoRowIfNotNull(attributesLayout, "Action Name:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Action Name:",
String.valueOf(applicationActionEvent.getActionName()), VaadinIcons.PLAY_CIRCLE);
addInfoRowIfNotNull(attributesLayout, "User Id:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "User Id:",
String.valueOf(applicationActionEvent.getUserId()), VaadinIcons.USER);
addInfoRowIfNotNull(attributesLayout, "Session Id:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Session Id:",
String.valueOf(applicationActionEvent.getSessionId()), VaadinIcons.KEY);
addInfoRowIfNotNull(attributesLayout, "Error Message:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Error Message:",
String.valueOf(applicationActionEvent.getErrorMessage()), VaadinIcons.WARNING);
addInfoRowIfNotNull(attributesLayout, "Application Message:",
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Application Message:",
String.valueOf(applicationActionEvent.getApplicationMessage()), VaadinIcons.INFO_CIRCLE);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import com.hack23.cia.model.internal.application.system.impl.ApplicationEventGroup;
import com.hack23.cia.web.impl.ui.application.action.ViewAction;
import com.hack23.cia.web.impl.ui.application.views.common.pagemode.CardInfoRowUtil;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.AdminViews;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode;
import com.vaadin.ui.Layout;
Expand Down Expand Up @@ -56,7 +57,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina

getMenuItemFactory().createMainPageMenuBar(menuBar);

createPageHeader(panel, content, "Admin Application Session Charts", "Session Analysis", "Analyze user sessions using graphical insights to track usage patterns.");
CardInfoRowUtil.createPageHeader(panel, content, "Admin Application Session Charts", "Session Analysis", "Analyze user sessions using graphical insights to track usage patterns.");

getAdminChartDataManager().createApplicationSessionPageDailySummaryChart(content);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.hack23.cia.service.api.DataContainer;
import com.hack23.cia.web.impl.ui.application.action.ViewAction;
import com.hack23.cia.web.impl.ui.application.views.common.converters.ListPropertyConverter;
import com.hack23.cia.web.impl.ui.application.views.common.pagemode.CardInfoRowUtil;
import com.hack23.cia.web.impl.ui.application.views.common.sizing.ContentRatio;
import com.hack23.cia.web.impl.ui.application.views.common.sizing.ContentSize;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.AdminViews;
Expand Down Expand Up @@ -116,7 +117,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina

getMenuItemFactory().createMainPageMenuBar(menuBar);

createPageHeader(
CardInfoRowUtil.createPageHeader(
panel,
content,
"Admin Application Sessions",
Expand Down Expand Up @@ -179,7 +180,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina
horizontalLayout.addComponent(cardPanel);
horizontalLayout.setExpandRatio(cardPanel, ContentRatio.GRID);

createCardHeader(cardContent,"Application Session Details");
CardInfoRowUtil.createCardHeader(cardContent,"Application Session Details");

// Attributes layout
final VerticalLayout attributesLayout = new VerticalLayout();
Expand All @@ -188,14 +189,14 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina
cardContent.addComponent(attributesLayout);

// Display each field if not null or empty
addInfoRowIfNotNull(attributesLayout, "Created Date:", String.valueOf(applicationSession.getCreatedDate()), VaadinIcons.CALENDAR);
addInfoRowIfNotNull(attributesLayout, "Session Type:", applicationSession.getSessionType().toString(), VaadinIcons.CONNECT);
addInfoRowIfNotNull(attributesLayout, "User Id:", applicationSession.getUserId(), VaadinIcons.USER);
addInfoRowIfNotNull(attributesLayout, "Session Id:", applicationSession.getSessionId(), VaadinIcons.KEY);
addInfoRowIfNotNull(attributesLayout, "Operating System:", applicationSession.getOperatingSystem(), VaadinIcons.DESKTOP);
addInfoRowIfNotNull(attributesLayout, "Locale:", applicationSession.getLocale(), VaadinIcons.GLOBE);
addInfoRowIfNotNull(attributesLayout, "IP Information:", applicationSession.getIpInformation(), VaadinIcons.INFO);
addInfoRowIfNotNull(attributesLayout, "User Agent:", applicationSession.getUserAgentInformation(), VaadinIcons.BROWSER);
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Created Date:", String.valueOf(applicationSession.getCreatedDate()), VaadinIcons.CALENDAR);
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Session Type:", applicationSession.getSessionType().toString(), VaadinIcons.CONNECT);
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "User Id:", applicationSession.getUserId(), VaadinIcons.USER);
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Session Id:", applicationSession.getSessionId(), VaadinIcons.KEY);
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Operating System:", applicationSession.getOperatingSystem(), VaadinIcons.DESKTOP);
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "Locale:", applicationSession.getLocale(), VaadinIcons.GLOBE);
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "IP Information:", applicationSession.getIpInformation(), VaadinIcons.INFO);
CardInfoRowUtil.addInfoRowIfNotNull(attributesLayout, "User Agent:", applicationSession.getUserAgentInformation(), VaadinIcons.BROWSER);

// Right side: grid for ApplicationActionEvent (session events)
final VerticalLayout rightLayout = new VerticalLayout();
Expand Down
Loading

0 comments on commit 7629a01

Please sign in to comment.