Dashboard Management - Data Dictionary and Sequence Diagram

Dashboard Management

This section covers the dashboard management functionalities, including data visualization, user interactions, and performance metrics.

UI Component Hierarchy

graph TD %% Main Components Root[BorderPane: Root] Content[ScrollPane: Content] Stats[HBox: Statistics] Charts[VBox: Charts] Activities[VBox: Activities] %% Statistics Components UsersCard[VBox: UsersStats] ProjectsCard[VBox: ProjectStats] TeamsCard[VBox: TeamStats] %% Chart Components PieChart[PieChart: StatusDistribution] LineChart[LineChart: ActivityTrend] %% Activity Components ActivityTable[TableView: RecentActivities] ActivityFilter[ComboBox: Filter] RefreshBtn[Button: Refresh] %% Hierarchy Root --> Content Content --> Stats Content --> Charts Content --> Activities Stats --> UsersCard Stats --> ProjectsCard Stats --> TeamsCard Charts --> PieChart Charts --> LineChart Activities --> ActivityFilter Activities --> ActivityTable Activities --> RefreshBtn %% Styling classDef container fill:#e1f5fe,stroke:#01579b classDef component fill:#fff,stroke:#0288d1 classDef control fill:#e8f5e9,stroke:#2e7d32 class Root,Content container class Stats,Charts,Activities component class UsersCard,ProjectsCard,TeamsCard,PieChart,LineChart,ActivityTable control

Sequence Diagram

The following sequence diagram illustrates the interactions between the user interface, controllers, view models, services, and the database during dashboard management operations.

sequenceDiagram actor User participant UI as Dashboard View participant Controller as DashboardController participant ViewModel as DashboardViewModel participant Service as DashboardService participant Database as Database participant Notification as Notification System %% Initialize Dashboard User->>UI: Open Dashboard UI->>Controller: initialize() Controller->>Controller: bindProperties() Note right of Controller: Bind UI controls to ViewModel properties Controller->>Controller: setupRecentActivitiesTable() Note right of Controller: Configure table columns and cell factories %% Load Dashboard Data Controller->>ViewModel: loadDashboardData() par Load Statistics ViewModel->>Service: getTotalUsers() Service->>Database: Query Users Count Database-->>Service: Return Count Service-->>ViewModel: Update totalUsers and ViewModel->>Service: getTotalProjects() Service->>Database: Query Projects Count Database-->>Service: Return Count Service-->>ViewModel: Update totalProjects and ViewModel->>Service: getTotalTeams() Service->>Database: Query Teams Count Database-->>Service: Return Count Service-->>ViewModel: Update totalTeams end %% Load Charts and Activities par Load Project Status ViewModel->>Service: getProjectStatusDistribution() Service->>Database: Query Status Data Database-->>Service: Return Statistics Service-->>ViewModel: Update pieChart data and Load Activities ViewModel->>Service: getRecentActivities() Service->>Database: Query Activities Database-->>Service: Return Activities Service-->>ViewModel: Update activities list end %% Update UI ViewModel-->>Controller: Properties Updated Controller-->>UI: Refresh Display Note right of UI: Update statistics cards, charts, and table %% Real-time Updates loop Every 30 seconds Service->>Database: Poll for Changes Database-->>Service: Return Updates Service-->>ViewModel: Update Properties ViewModel-->>UI: Refresh Display end %% Error Handling alt Error Occurs Service-->>ViewModel: Throw Exception ViewModel-->>Controller: Log Error Controller-->>UI: Show Error Dialog end

Data Dictionary

The Data Dictionary below outlines the key data entities used within the Dashboard Management module, detailing their attributes, types, and descriptions.

DashboardStatistics

Attribute Type Description
totalUsers Integer Total number of users in the system.
totalProjects Integer Total number of projects.
totalTeams Integer Total number of teams.

ProjectStatus

Attribute Type Description
statusType Enum Project status (e.g., In Progress, Completed).
count Integer Number of projects in this status.
percentage Double Percentage of total projects.

RecentActivity

Attribute Type Description
activityId UUID Unique identifier for the activity.
timestamp DateTime When the activity occurred.
type Enum Type of activity (e.g., Create, Update, Delete).
description String Description of the activity.

PieChartData

Attribute Type Description
category String Category name for the pie chart slice.
value Double Numerical value representing the category.

Explanation

  • Dashboard Initialization: Loads and configures UI components, ensuring all elements are bound to the ViewModel.
  • Parallel Data Loading: Efficiently retrieves statistics, charts, and recent activities concurrently to optimize performance.
  • Real-time Updates: Maintains dashboard freshness by periodically polling the database for updates every 30 seconds.
  • Error Handling: Manages exceptions gracefully by logging errors and notifying the user through dialog boxes.