feat(service-account): add new service account (Azure) management group mapping method #6023
Conversation
…or azure account (azure management group) feat(trusted-account-auto-sync): apply new auto-sync mapping method for azure account (azure management group)
…thod (#6017) * feat(azure-account): apply changed azure account workspace mapping method Signed-off-by: samuel.park <samuel.park@megazone.com> * chore: apply review Signed-off-by: samuel.park <samuel.park@megazone.com> --------- Signed-off-by: samuel.park <samuel.park@megazone.com>
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
|
✅ Why it is requiredThe Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO. Contributors sign-off that they adhere to these requirements by adding a Git even has a |
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for Azure Management Group mapping methods to the service account auto-sync functionality. The implementation introduces new mapping options specifically for Azure accounts to handle management groups at both top-level and leaf-level configurations.
Key changes include:
- Added new Azure Management Group mapping types and constants
- Extended service account form state to include Azure-specific mapping configuration
- Updated auto-sync mapping UI to support Azure Management Group options
- Enhanced API schema to support the new Azure mapping parameters
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| service-account-page-store.ts | Extended form state interface and added Azure management group mapping type field |
| ServiceAccountAddPage.vue | Updated account creation to include Azure management group mapping parameter |
| auto-sync-options-contant.ts | Added comprehensive mapping options configuration for all CSP providers including Azure |
| ServiceAccountAutoSyncMappingMethod.vue | Major refactor to support Azure management group mapping with new utility functions |
| ServiceAccountAutoSync.vue | Updated sync options to include Azure management group mapping type |
| InfoTooltip.vue | New reusable tooltip component for providing additional information |
| trusted-account schema files | Added Azure management group mapping type definitions and API parameter support |
| @@ -0,0 +1,83 @@ | |||
| import { AZURE_MANAGEMENT_GROUP_MAPPING_TYPE } from '@/api-clients/identity/trusted-account/schema/constant'; | |||
There was a problem hiding this comment.
The filename contains a typo: 'auto-sync-options-contant.ts' should be 'auto-sync-options-constant.ts'
| /* Utils */ | ||
| /* | ||
| * This functions are used to convert the mapping method form data to the service account form data. | ||
| * And also, convert the service account form data to the mapping method form data. | ||
| * | ||
| * 1. convertToMappingMethodDTO | ||
| * 2. convertToMappingMethodClientEntity | ||
| * | ||
| * Azure Account has additional mapping method options (Top Node Management Group, Leaf Node Management Group). | ||
| */ |
There was a problem hiding this comment.
[nitpick] The comment block starting with '/* Utils /' should use proper JSDoc format or be more descriptive. Consider using '/* Utility Functions */' for better documentation standards.
| /* Utils */ | |
| /* | |
| * This functions are used to convert the mapping method form data to the service account form data. | |
| * And also, convert the service account form data to the mapping method form data. | |
| * | |
| * 1. convertToMappingMethodDTO | |
| * 2. convertToMappingMethodClientEntity | |
| * | |
| * Azure Account has additional mapping method options (Top Node Management Group, Leaf Node Management Group). | |
| */ | |
| /** | |
| * Utility Functions | |
| * | |
| * These functions are used to convert the mapping method form data to the service account form data, | |
| * and vice versa. They handle the transformation of data between the mapping method and the service | |
| * account forms. | |
| * | |
| * Functions included: | |
| * 1. convertToMappingMethodDTO | |
| * 2. convertToMappingMethodClientEntity | |
| * | |
| * Note: Azure Account has additional mapping method options (Top Node Management Group, Leaf Node Management Group). | |
| */ |
| /* | ||
| * This functions are used to convert the mapping method form data to the service account form data. | ||
| * And also, convert the service account form data to the mapping method form data. | ||
| * | ||
| * 1. convertToMappingMethodDTO | ||
| * 2. convertToMappingMethodClientEntity | ||
| * | ||
| * Azure Account has additional mapping method options (Top Node Management Group, Leaf Node Management Group). | ||
| */ |
There was a problem hiding this comment.
[nitpick] Multi-line comments should use JSDoc format (/** ... */) for better documentation consistency, especially for function descriptions.
| /* | |
| * This functions are used to convert the mapping method form data to the service account form data. | |
| * And also, convert the service account form data to the mapping method form data. | |
| * | |
| * 1. convertToMappingMethodDTO | |
| * 2. convertToMappingMethodClientEntity | |
| * | |
| * Azure Account has additional mapping method options (Top Node Management Group, Leaf Node Management Group). | |
| */ | |
| /** | |
| * Utility functions for converting mapping method form data to service account form data, | |
| * and vice versa. These functions handle specific cases for Azure accounts, which have | |
| * additional mapping method options (e.g., Top Node Management Group, Leaf Node Management Group). | |
| * | |
| * Functions: | |
| * 1. `convertToMappingMethodDTO`: Converts mapping method form data to service account form data. | |
| * 2. `convertToMappingMethodClientEntity`: Converts service account form data to mapping method form data. | |
| */ |
|
|
||
|
|
||
|
|
||
| /* Event */ |
There was a problem hiding this comment.
[nitpick] The comment '/* Event /' should be more descriptive, such as '/* Event Handlers */' and use JSDoc format.
| /* Event */ | |
| /** | |
| * Event Handlers | |
| * | |
| * These functions handle user interactions and update the application state accordingly. | |
| */ |
| export const AZURE_MANAGEMENT_GROUP_MAPPING_TYPE = { | ||
| TOP_MANAGEMENT_GROUP: 'Top Management Group', | ||
| LEAF_MANAGEMENT_GROUP: 'Leaf Management Group', |
There was a problem hiding this comment.
The constant values 'Top Management Group' and 'Leaf Management Group' are human-readable strings but should ideally be machine-readable constants (e.g., 'TOP_MANAGEMENT_GROUP', 'LEAF_MANAGEMENT_GROUP') to avoid potential issues with string comparisons and internationalization.
| export const AZURE_MANAGEMENT_GROUP_MAPPING_TYPE = { | |
| TOP_MANAGEMENT_GROUP: 'Top Management Group', | |
| LEAF_MANAGEMENT_GROUP: 'Leaf Management Group', | |
| export const TOP_MANAGEMENT_GROUP_LABEL = 'Top Management Group'; | |
| export const LEAF_MANAGEMENT_GROUP_LABEL = 'Leaf Management Group'; | |
| export const AZURE_MANAGEMENT_GROUP_MAPPING_TYPE = { | |
| TOP_MANAGEMENT_GROUP: TOP_MANAGEMENT_GROUP_LABEL, | |
| LEAF_MANAGEMENT_GROUP: LEAF_MANAGEMENT_GROUP_LABEL, |
Skip Review (optional)
style,chore,ci,test,docs)Description (optional)
SSIA
Things to Talk About (optional)