feat: improve policy name display and fix policy ID handling#11
Draft
gabrielzepeda1 wants to merge 8 commits intomainfrom
Draft
feat: improve policy name display and fix policy ID handling#11gabrielzepeda1 wants to merge 8 commits intomainfrom
gabrielzepeda1 wants to merge 8 commits intomainfrom
Conversation
Using the "name" sent back from management-api/opa.service.ts to display a cleaner policy name, as the ID is already displaying the complete path.
… with other pages in PolicyList.tsx
that use this fn.
compilation errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves policy information display in the
management-cliandmanagement-uiand fixes policy ID handling issues. Additionally, minor updates in themanagement-uiwere made to adapt to these changes.Changes
apps/cli/management-cliREADME.md- Update documentation to use placeholder in examplessrc/services/api.service.ts- Encode policy IDs in API URLs to handle special characters (e.g., "/")apps/services/management-apisrc/services/opa.service.ts- Refactor getPolicies():apps/web/management-uiComponents:
src/components/PolicyCard.tsx- Refactor layout to better display a longer policy IDsrc/components/PolicyList.tsx- Replace "primary" color with "blue" for visual consistencysrc/components/CopyableId.tsx- Update import to use @utils/cn path aliassrc/components/ui/button.tsx- Update import to use @utils/cn path aliassrc/components/ui/card.tsx- Update import to use @utils/cn path aliassrc/components/ui/input.tsx- Update import to use @utils/cn path aliassrc/components/ui/label.tsx- Update import to use @utils/cn path aliassrc/components/ui/tooltip.tsx- Update import to use @utils/cn path aliasPages:
src/pages/PoliciesPage.tsx- Adjust padding for consistency across other pages.Utilities:
src/utils/cn.ts(new) - Add cn utility function for className merging (moved from src/lib)Types:
src/types/styra_highlightjs-rego.d.ts(new) - Add TypeScript declarations for @styra/highlightjs-rego packageScreenshots
Todos
cnutility function imported by components tosrc/utils/cn.tsto avoid errors in the web UI@utils/cn@styra/highlightjs-regopackage insrc/types/Steps to Validate