UNPKG

@parseable/backstage-plugin-datasets

Version:

Backstage plugin for viewing and searching Parseable datasets and logs

90 lines (58 loc) 2.09 kB
# @parseable/backstage-plugin-datasets A Backstage plugin for viewing and searching Parseable datasets and logs. ## 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 ## Installation Add the plugin to your Backstage app: ```bash yarn add @parseable/backstage-plugin-datasets ``` ## Setup ### 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 />} /> ``` ### 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.