Skip to content

Create Comprehensive MDX Documentation for Dashboard - Unified Overview #2288

@btwshivam

Description

@btwshivam

Overview

Create detailed MDX documentation for the Dashboard component, covering the unified overview interface, metrics cards, statistics visualization, quick actions, and navigation to other features.

File to Create

File: docs/dashboard-overview.mdx

Features to Document

1. Dashboard Layout

Grid Layout

  • Responsive card grid
  • Mobile, tablet, desktop layouts
  • Card sizing and spacing
  • Visual hierarchy
  • Color scheme

Sections

  1. Welcome section
  2. Cluster metrics section
  3. Workload statistics section
  4. Policy overview section
  5. Quick actions section
  6. Recent activity section (if applicable)

2. Cluster Metrics

Total Clusters Card

  • Metrics Displayed:

    • Total cluster count
    • Active clusters count
    • Available clusters count
    • Pending/Offline clusters count
  • Visual Elements:

    • Large number display
    • Icon (cluster symbol)
    • Trend indicator (↑ ↓)
    • Color coding by status
    • Percentage breakdown
    • Mini chart (optional)

Cluster Health Status

  • Health percentage
  • Status breakdown pie chart
  • Visual indicators:
    • 🟢 Green: Healthy
    • 🟡 Yellow: Warning
    • 🔴 Red: Critical
  • Click to view details in ITS

Recent Cluster Activities

  • Last imported cluster
  • Recently updated clusters
  • Status changes
  • Timestamp display
  • Quick link to cluster

3. Workload Statistics

Total Workloads Card

  • Metrics:

    • Total workload count
    • By type breakdown:
      • Deployments
      • Services
      • StatefulSets
      • DaemonSets
      • Jobs
      • CronJobs
    • Running vs Pending vs Failed
  • Visual Elements:

    • Large number display
    • Workload icon
    • Pie/donut chart
    • Status colors
    • Trend over time

Workload Status Distribution

  • Running: Count and percentage
  • Pending: Count and percentage
  • Failed: Count and percentage
  • Succeeded: Count and percentage
  • Stacked bar chart or pie chart

Namespace Distribution

  • Top 5 namespaces by workload count
  • Horizontal bar chart
  • Namespace names
  • Resource count per namespace
  • Click to filter in WDS

Recent Workload Activities

  • Recently created workloads
  • Recently updated workloads
  • Failed deployments alert
  • Timestamp display
  • Quick link to workload

4. Policy Overview

Binding Policies Card

  • Metrics:

    • Total active policies
    • Total inactive policies
    • Pending policies
    • Average clusters per policy
    • Average workloads per policy
  • Visual Elements:

    • Large number display
    • Policy icon
    • Status breakdown
    • List of recent policies
    • Health indicator

Policy Distribution

  • Policies by status (Active/Inactive)
  • Pie chart
  • Click to view in BP

Top Policies

  • Most used policies (by cluster/workload count)
  • Policy name
  • Cluster count
  • Workload count
  • Click to view details

5. Resource Summary

Top Resource Types Card

  • Metrics:

    • Pods count
    • Services count
    • ConfigMaps count
    • Secrets count
    • PVCs count
  • Visual Elements:

    • Horizontal bar chart
    • Resource type icons
    • Count display
    • Click to filter in Object Explorer

Resource Health

  • Overall health score (%)
  • Resource availability
  • Resource utilization (if available)
  • Warning indicators

6. Quick Actions

Action Buttons

  1. Import Cluster Button

    • Large prominent button
    • Icon + text
    • Opens ITS import dialog
    • Tooltip on hover
  2. Create Workload Button

    • Secondary button
    • Icon + text
    • Opens WDS create dialog
    • Tooltip on hover
  3. Create Policy Button

    • Secondary button
    • Icon + text
    • Opens BP create interface
    • Tooltip on hover
  4. Browse Resources Button

    • Secondary button
    • Icon + text
    • Navigate to Object Explorer
    • Tooltip on hover
  5. View Monitoring Button

    • Secondary button
    • Icon + text
    • Navigate to WECS
    • Tooltip on hover

Quick Links Section

  • Link to ITS (Manage Clusters)
  • Link to WDS (Manage Workloads)
  • Link to BP (Manage Policies)
  • Link to WECS (Monitor Clusters)
  • Link to Object Explorer
  • Link to Galaxy Marketplace
  • Link to Documentation
  • Link to Settings

7. Additional Dashboard Features

Refresh Functionality

  • Manual refresh button
  • Auto-refresh toggle
  • Refresh interval selector
  • Last updated timestamp
  • Loading states on refresh

Health Indicators- maybe take from grafana

  • Overall system health
  • Component status:
    • Backend API: 🟢
    • Database: 🟢
    • Redis: 🟢
    • Monitoring: 🟢
  • Click for detailed status

Visual Content Requirements

Screenshots Needed (5+ screenshots)

  1. Full Dashboard View - Desktop

    • All cards visible
    • Annotated sections
    • Clean, professional look
  2. Full Dashboard View - Mobile

    • Responsive layout
    • Stacked cards
    • Touch-friendly buttons
  3. Cluster Metrics Card - Close-up

    • Number displays
    • Status breakdown
    • Trend indicators
    • Annotated elements
  4. Workload Statistics Card - Close-up

    • Total count
    • Pie chart
    • Status distribution
    • Type breakdown
  5. Policy Overview Card - Close-up

    • Active policies count
    • Status pie chart
    • Recent policies list
  6. Quick Actions Section

    • All action buttons
    • Hover states
    • Icons and labels
  7. Resource Summary Card

    • Bar chart
    • Resource counts
    • Visual icons
  8. Recent Activity Feed

    • Activity list
    • Timestamps
    • Quick links
  9. Health Indicators

    • System health
    • Component status
    • Color-coded indicators
  10. Alerts Banner

    • Critical alert example
    • Warning example
    • Dismiss button

Diagrams Required

  1. Dashboard Layout Structure
┌─────────────────────────────────────┐
│  Welcome / Alerts                    │
├──────────┬──────────┬──────────────┤
│ Clusters │Workloads │  Policies    │
│  Card    │  Card    │   Card       │
├──────────┴──────────┴──────────────┤
│      Resource Summary                │
├─────────────────────────────────────┤
│      Quick Actions                   │
└─────────────────────────────────────┘
  1. Navigation Flow
Dashboard
├─ Click "Import Cluster" → ITS Import Dialog
├─ Click "Create Workload" → WDS Create Dialog
├─ Click "Create Policy" → BP Builder
├─ Click Cluster Metrics → ITS Page
├─ Click Workload Stats → WDS Page
├─ Click Policy Overview → BP Page
└─ Click Resource Summary → Object Explorer
  1. Data Flow to Dashboard
ITS API → Cluster Metrics
WDS API → Workload Statistics
BP API → Policy Overview
K8s API → Resource Summary
       ↓
   Dashboard (aggregated view)

Documentation Structure

1. Introduction (200 words)

  • What is the Dashboard?
  • Purpose: Unified overview of platform
  • When to use: Getting started, daily overview
  • Key benefits:
    • At-a-glance metrics
    • Quick access to all features
    • Recent activity tracking
    • Fast navigation

2. Prerequisites

  • KubeStellar UI access
  • At least one cluster imported (for meaningful data)
  • Workloads and policies (optional, for full view)

3. Feature Overview

  • Dashboard philosophy
  • Card-based layout
  • Metric aggregation
  • Real-time updates

4. Step-by-Step Guides

Guide 1: Understanding Dashboard Metrics

  1. Open Dashboard (landing page or navigation)
  2. Review cluster metrics
  3. Check workload statistics
  4. View policy overview
  5. Review resource summary
  6. Identify any alerts

Guide 2: Using Quick Actions

  1. Locate Quick Actions section
  2. Click "Import Cluster"
  3. Follow import workflow (ITS)
  4. Return to Dashboard
  5. See updated cluster count
  6. Try other quick actions

Guide 3: Navigating from Dashboard

  1. Click on Cluster Metrics card
  2. Navigate to ITS
  3. Return to Dashboard (breadcrumb)
  4. Click on Workload Statistics
  5. Navigate to WDS
  6. Use navigation menu

Guide 4: Refreshing Dashboard Data

  1. Locate refresh button
  2. Click to refresh
  3. Observe loading states
  4. View updated metrics
  5. Enable auto-refresh
  6. Set refresh interval

5. Use Cases

Use Case 1: Morning Platform Check

Scenario: Daily health check of multi-cluster platform
Solution:

  • Open Dashboard
  • Review cluster health (all green?)
  • Check workload status (any failures?)
  • Verify active policies
  • Check for alerts
  • Total time: < 1 minute

Use Case 2: Onboarding New User

Scenario: Show new user the platform capabilities
Solution:

  • Start at Dashboard
  • Point out cluster, workload, policy counts
  • Use quick actions to demonstrate features
  • Click cards to navigate to each section
  • Dashboard as "home base"

Use Case 3: Incident Response

Scenario: Alert received about platform issue
Solution:

  • Check Dashboard for red indicators
  • Identify affected area (clusters/workloads/policies)
  • Click relevant card to navigate
  • Drill down to specific resource
  • Use quick actions to remediate

6. API/Integration Reference

Backend Endpoints

  • GET /api/dashboard/metrics - Get all metrics
  • GET /api/clusters/count - Cluster count
  • GET /api/wds/count - Workload count
  • GET /api/bp/count - Policy count
  • GET /api/dashboard/health - Health status
  • GET /api/dashboard/recent - Recent activities

Data Refresh

  • Initial load: All APIs called in parallel
  • Auto-refresh: Periodic polling
  • Manual refresh: On-demand re-fetch

7. Troubleshooting

Issue 1: Metrics not loading

Solutions:

  • Check backend connectivity
  • Verify API endpoints
  • Check browser console
  • Refresh page
  • Check permissions

Issue 2: Incorrect counts

Solutions:

  • Hard refresh page (Ctrl+Shift+R)
  • Clear browser cache
  • Verify data in source pages (ITS, WDS, BP)
  • Check for sync delays
  • Review backend logs

Issue 3: Slow loading

Solutions:

  • Check network latency
  • Optimize query filters
  • Enable caching (Redis)
  • Reduce auto-refresh frequency

8. Related Features

  • Cluster data from ITS
  • Workload data from WDS
  • Policy data from BP
  • Resource data from Object Explorer
  • Monitoring data from WECS

Acceptance Criteria

  • All features documented
  • 5+ screenshots
  • 4 step-by-step guides
  • 3 use cases
  • All metric cards explained
  • Quick actions documented
  • Navigation flow clear
  • Both desktop and mobile views
  • Technical review complete

📚 References

  • Code: /frontend/src/pages/Dashboard.tsx
  • E2E Tests: /frontend/e2e/Dashboard.spec.ts

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions