-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GEN-2224] add "mutable" and "profileName" fields to InstrumentationR…
…ule model (#2236) This pull request introduces several changes to the `frontend/graph` and `frontend/webapp` directories to add new fields and functionality related to `InstrumentationRule`. The most important changes include adding the `mutable` and `profileName` fields to the `InstrumentationRule` type, updating the GraphQL schema and queries, and modifying the frontend components to handle these new fields. ### GraphQL Schema and Model Updates: * Added `mutable` and `profileName` fields to the `InstrumentationRule` struct in `frontend/graph/model/models_gen.go` and updated the GraphQL schema in `frontend/graph/schema.graphqls`. [[1]](diffhunk://#diff-642ccd7ed71fdfa394bd7f7fd99c9c33e20ff18c876a91cb989d379a44390469R292-R293) [[2]](diffhunk://#diff-bc07b91dedd1782d9ddbbb6374ad97c7604f9a267de5174645723d863c732f80R120-R121) ### Backend Logic Updates: * Updated the `ListInstrumentationRules` function in `frontend/services/instrumentationrule.go` to populate the new fields based on annotations. * Modified the `Complexity` and `executionContext` functions in `frontend/graph/generated.go` to handle the new fields. [[1]](diffhunk://#diff-4bacf1f13939a5c243f3f83d21f4560b331d13667d81ea5945ed1f57ddb205f2R1391-R1397) [[2]](diffhunk://#diff-4bacf1f13939a5c243f3f83d21f4560b331d13667d81ea5945ed1f57ddb205f2R1412-R1418) [[3]](diffhunk://#diff-4bacf1f13939a5c243f3f83d21f4560b331d13667d81ea5945ed1f57ddb205f2R4536-R4539) [[4]](diffhunk://#diff-4bacf1f13939a5c243f3f83d21f4560b331d13667d81ea5945ed1f57ddb205f2R8712-R8799) [[5]](diffhunk://#diff-4bacf1f13939a5c243f3f83d21f4560b331d13667d81ea5945ed1f57ddb205f2R10538-R10541) [[6]](diffhunk://#diff-4bacf1f13939a5c243f3f83d21f4560b331d13667d81ea5945ed1f57ddb205f2R10613-R10616) [[7]](diffhunk://#diff-4bacf1f13939a5c243f3f83d21f4560b331d13667d81ea5945ed1f57ddb205f2R20133-R20142) ### Frontend Component Updates: * Updated the `RuleDrawer` component in `frontend/webapp/containers/main/instrumentation-rules/rule-drawer/index.tsx` to handle the `mutable` field and restrict editing or deleting system-managed rules. [[1]](diffhunk://#diff-759940924dd4ee0c6895f60e21ca040542d9cf1d3f69162677c9983d62b12f8cL74-R74) [[2]](diffhunk://#diff-759940924dd4ee0c6895f60e21ca040542d9cf1d3f69162677c9983d62b12f8cR94-R105) * Added `mutable` and `profileName` fields to the `GET_INSTRUMENTATION_RULES` GraphQL query in `frontend/webapp/graphql/queries/compute-platform.ts`. * Updated the `InstrumentationRuleSpec` interface in `frontend/webapp/types/instrumentation-rules.ts` to include the new fields. * Enhanced the `FORM_ALERTS` constants in `frontend/webapp/utils/constants/string.tsx` to include new alert messages for system-managed rules.
- Loading branch information
1 parent
c875968
commit 3cbb117
Showing
10 changed files
with
161 additions
and
5 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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