UNPKG

@parseable/backstage-plugin-datasets

Version:

Backstage plugin for viewing and searching Parseable datasets and logs with support for both legacy and new frontend systems

117 lines (76 loc) 2.84 kB
# @parseable/backstage-plugin-datasets A Backstage plugin for viewing and searching Parseable datasets and logs. ## 🎉 New Frontend System Support This plugin now supports **both** the legacy Backstage system and the **new frontend system**! See [MIGRATION.md](./MIGRATION.md) for details. ## Features - View all available Parseable datasets - Search and filter logs within datasets - Dynamic column generation based on log structure - Pagination and sorting support - Expandable view for long log entries - Real-time log fetching -**Dual system support** - works with both legacy and new Backstage frontend systems ## Installation Add the plugin to your Backstage app: ```bash yarn add @parseable/backstage-plugin-datasets ``` ## Setup ### Legacy System (Current) #### 1. Add the plugin to your app In your `packages/app/src/App.tsx`: ```tsx import { ParseableDatasetsPage } from '@parseable/backstage-plugin-datasets'; // Add to your routes <Route path="/parseable-datasets" element={<ParseableDatasetsPage />} /> ``` ### New Frontend System (Optional) If your app uses the new frontend system: ```typescript // In your app's features array import parseablePlugin from '@parseable/backstage-plugin-datasets'; const app = createApp({ features: [ parseablePlugin, // ... other plugins ], }); ``` The plugin will automatically register its route at `/parseable-datasets`. > **Note**: See [MIGRATION.md](./MIGRATION.md) for complete migration instructions. ### 2. Add navigation In your `packages/app/src/components/Root/Root.tsx`: ```tsx import StorageIcon from '@material-ui/icons/Storage'; // Add to your sidebar <SidebarItem icon={StorageIcon} to="parseable-datasets" text="Parseable Datasets" /> ``` ### 3. Configure the API The plugin connects to Parseable at `https://demo.parseable.com` by default. To configure a different endpoint, you can modify the base URL in the component or extend the API client. ## Usage 1. Navigate to "Parseable Datasets" in your Backstage sidebar 2. Select a dataset from the dropdown 3. View and search through the logs 4. Click "See more" on truncated entries to view full content 5. Use the table's built-in search, sort, and pagination features ## Development ```bash # Install dependencies yarn install # Run in development yarn start # Build the plugin yarn build # Run tests yarn test ``` ## API The plugin provides the following API: - `parseableApiRef` - Reference to the Parseable API client - `ParseableClient` - API client implementation - `getUserInfo(baseUrl)` - Fetch user info and available datasets - `getLogs(baseUrl, dataset, limit)` - Fetch logs from a specific dataset ## Contributing Contributions are welcome! Please feel free to submit a Pull Request. ## License This project is licensed under the Apache-2.0 License.