Skip to content

feat: Service mappings feature#147

Open
sandornagy517 wants to merge 8 commits intonextfrom
service_mappigns_feature
Open

feat: Service mappings feature#147
sandornagy517 wants to merge 8 commits intonextfrom
service_mappigns_feature

Conversation

@sandornagy517
Copy link
Copy Markdown
Contributor

Description

This PR is needed to merge the feature into next before releasing it altogether.

Affected plugin

  • backstage-plugin
  • backstage-plugin-backend
  • backstage-plugin-scaffolder-actions
  • backstage-plugin-entity-processor

Type of change

  • New feature (non-breaking change which adds functionality)
  • Fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have performed a self-review of this change
  • Changes have been tested
  • Changes have been tested in dark theme
  • Changes are documented
  • Changes generate no new warnings
  • PR title follows conventional commit semantics

If this is a breaking change 👇

  • I have documented the migration process
  • I have implemented necessary warnings (if it can live side by side)

Acknowledgement

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@sandornagy517 sandornagy517 requested a review from a team as a code owner March 11, 2026 15:25
@sandornagy517 sandornagy517 changed the base branch from main to next March 11, 2026 15:25
sandornagy517 and others added 8 commits March 11, 2026 15:35
* feat: Swap service mapping direction

* feat: Get rid of the old MappingTable

* feat: Use a different API for retrieving PD services

* fix: Revert entity mappings

* fix: Resolve conflicts

* fix: Service mapping creation and update

* feat: Add unit tests

* fix: Remove unused import

* fix: Add proper expects for router unit tests

* fix: Get rid of redundant unit test expects

* fix: Mock catalog api the backstage way
* feat: Add the automatic mapping dialog

* feat: Add remove mapping options after calculation is done

* feat: Only retrieve best only matches

* feat: Add the account column to the mappings table

* feat: Refactor the hooks used in the MappingsTable
* feat: add filtering capabilities to service mapping table

- Add backend support for filtering by name, service name, and status
- Update API client and types to include filters parameter
- Implement filter UI with toggle button and filter row
- Add name and service filters using SearchField components
- Add status filter using Select dropdown
- Ensure pagination resets when filters change
- Update all tests to include filters parameter
- Add new test cases for filter functionality

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

refactor frontend work

refactor backend work

clean up code

team name filter

* add team name filter to UI

* add account filter

* feat: add sorting capabilities to service mapping table (#136)

* feat: add sorting capabilities to service mapping table

Implement comprehensive sorting functionality for the service mapping table,
allowing users to sort by name, team, service name, status, and account.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address pr comments for filtering capabilities

- Optimize service filtering by using PagerDuty API query parameter
  instead of fetching all services and filtering client-side
- Extract magic number 10000 to named constant MAX_ENTITIES_FOR_POST_PROCESSING
- Remove CatalogApi | undefined type and add guard to ensure catalogApi is required

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: remove redundant comments from pagerduty api

Remove redundant "set account" comments that simply restated the code logic.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat: Add mappings table loading states

* feat: Update loading unit tests

* fix: Unit tests and empty table state props refactor
* feat: Add account selector to the service mappings table

* fix: Revert app-config.yaml

* fix: Revert app-config.yaml

* fix: Revert app-config.yaml

* refactor: Use oneline if
…ing (#139)

* feat: enhance mapping dialog UI with team filtering and improved styling

This commit adds comprehensive improvements to the mapping dialog:

Backend changes:
- Add getAllTeams endpoint to fetch all PagerDuty teams
- Add getFilteredServices endpoint with team_id and query filters
- Add PagerDutyTeam type to common types

Frontend changes:
- Add team filtering dropdown to filter services by PagerDuty team
- Add service search with debounced input (500ms)
- Replace read-only text displays with TextField components for visual consistency
- Add border container styling to RadioGroup matching TextField appearance
- Add enhanced radio button styling with interactive states

Radio button improvements:
- Individual padding on each option (12px all sides)
- Bottom border dividers between options
- Hover effect with gray background
- Selected state with blue background, bold text, and 3px left accent bar

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: address PR feedback - remove comments and refactor styles

- Remove redundant comments from pagerduty.ts functions (getAllTeams, getFilteredServices)
- Remove redundant comments from MappingsDialog.tsx
- Refactor inline <style> tag to use makeStyles from @material-ui/core
- Refactor inline Box styles to use makeStyles pattern
- Follow established codebase pattern for styling (StatusCell, AutoMappingsButton)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: Add account selector to the service mappings table (#142)

* feat: Add account selector to the service mappings table

* fix: Revert app-config.yaml

* fix: Revert app-config.yaml

* fix: Revert app-config.yaml

* refactor: Use oneline if

* fix: improve account filtering and error handling in service mapping

- Pass account parameter through entire mapping flow (frontend → API → backend → PagerDuty)
- Add proper error handling for non-HttpError exceptions in POST /mapping/entity endpoint to prevent indefinite request hangs
- Filter out currently-mapped service from mapping dialog service list
- Remove unused useEffect import from MappingsTable
- Update mock API signatures to match new account parameter requirements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: address PR feedback for MappingsDialog improvements

- Replace manual debounce logic with useDebounce hook
- Simplify team selection from array to single string value
- Fix radio list styling inconsistencies (spacing, padding, borders)
- Override RadioGroupContent default gap for consistent item spacing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: sandornagy517 <67263678+sandornagy517@users.noreply.github.com>
* feat: Add sorting for match scores

* fix: Separate MappingsTableContent to a new file
* feat: Update styling according the designs

* fix: Adjust dark theme

* fix: Remove backstage theme template for makeStyles where its not neccessary
@sandornagy517 sandornagy517 force-pushed the service_mappigns_feature branch from bac2f4a to 41d5095 Compare March 11, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants