Skip to content

Comments

Assets Page Implementation using Carbon Design System#218

Open
Faisal77666 wants to merge 5 commits intoopencost:mainfrom
Faisal77666:lfx-assets-challenge
Open

Assets Page Implementation using Carbon Design System#218
Faisal77666 wants to merge 5 commits intoopencost:mainfrom
Faisal77666:lfx-assets-challenge

Conversation

@Faisal77666
Copy link

OpenCost UI: Assets Page Implementation using Carbon Design System

📋 Overview

This PR implements a comprehensive Assets Discovery page for the OpenCost UI using the Carbon Design System components. The page provides deep visibility into cloud infrastructure resources with real-time cost tracking, filtering, and detailed breakdowns.

📸 UI Preview

Screenshot 2026-02-11 211717

The screenshot above confirms the successful rendering of the Infrastructure Assets page, including the KPI tiles and the searchable Asset Inventory table.


✨ Key Features

1. Asset Inventory Table

  • Displays all infrastructure assets with core metrics: Name, Category, Type, Cluster, and Total Cost.

  • Deep Visibility: Expandable rows reveal detailed asset information:

    • Provider ID and Cluster identity.

    • Resource cost breakdown (CPU, RAM, Storage).

  • Organization: Sortable columns for efficient navigation of large datasets.

2. KPI Dashboard

  • Total Spend: Aggregate cost of all assets for the selected time window.

  • Active Assets: Real-time count of discovered resources.

  • Visual Hierarchy: Carbon Tiles provide a clean, scannable section for high-level metrics.

3. Advanced Search & Filtering

  • Real-time search across asset names, types, and clusters via the TableToolbarSearch component.

  • Instant filter feedback with automatic re-pagination of results.

4. Pagination & UX

  • Configurable page sizes (10, 20, 50 items per page).

  • Data Export: CSV export button to download the complete asset inventory for external analysis.

  • Currency Support: Respects the user's preferred currency (USD, etc.) using the existing toCurrency() utility.


🛠️ Design Decisions

Why Carbon Design System?

  • Consistency: Matches existing OpenCost UI aesthetics (Allocations, CloudCosts).

  • Accessibility: Built-in WCAG 2.1 AA compliance via Carbon components.

  • Maintainability: Reduces custom CSS and ensures a responsive grid-based layout across all screen sizes.

Component | Rationale -- | -- DataTable | Provides native sort and expand functionality. TableExpandRow | Shows details without modal overhead, keeping context visible. Pagination | Ensures smooth browsing for high asset counts. Tile | Provides visual distinction for key performance indicators (KPIs).

📁 Files Modified/Created

  • src/pages/Assets.js — Main page component containing the Carbon implementation.

  • src/services/assets.js — API service layer with fallback logic.

  • src/index.html — Updated entry point with styling hooks.

  • package.json / package-lock.json — Added @carbon/react and @parcel/transformer-sass to the build pipeline.


🚀 How to Use

  1. Navigate to the Assets page via the sidebar.

  2. Review the KPI summary at the top for a cost overview.

  3. Filter the inventory using the search bar in the table toolbar.

  4. Expand any row to view specific CPU/RAM cost compositions.

  5. Export the inventory to CSV if needed for reporting.

Related Issue: Closes #28

Design System: Carbon v11

Faisal Mehmood added 2 commits February 11, 2026 17:12
- Integrated Carbon Design System components for asset visualization.
- Fixed MUI Select out-of-range warnings with value fallbacks.
- Optimized provider injection to prevent MetaMask connection race conditions.
@netlify
Copy link

netlify bot commented Feb 12, 2026

Deploy Preview for opencost-ui ready!

Name Link
🔨 Latest commit 3fdbcd2
🔍 Latest deploy log https://app.netlify.com/projects/opencost-ui/deploys/698f2b81402d4d000849445f
😎 Deploy Preview https://deploy-preview-218--opencost-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Assets in the UI

1 participant