Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Tags } from '@/api-clients/_common/schema/model';
import type { ResourceGroupType } from '@/api-clients/_common/schema/type';
import type { AzureManagementGroupMappingType } from '@/api-clients/identity/trusted-account/schema/type';

export interface TrustedAccountCreateParameters {
name: string;
Expand All @@ -14,6 +15,7 @@ export interface TrustedAccountCreateParameters {
sync_options?: {
skip_project_group: boolean;
single_workspace_id: string;
azure_management_group_mapping_type?: AzureManagementGroupMappingType; // only for Azure
};
plugin_options?: Record<string, any>;
tags?: Tags;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Tags } from '@/api-clients/_common/schema/model';
import type { AzureManagementGroupMappingType } from '@/api-clients/identity/trusted-account/schema/type';

export interface TrustedAccountUpdateParameters {
trusted_account_id: string;
Expand All @@ -11,6 +12,7 @@ export interface TrustedAccountUpdateParameters {
sync_options?: {
skip_project_group: boolean;
single_workspace_id: string;
azure_management_group_mapping_type?: AzureManagementGroupMappingType; // only for Azure
};
plugin_options?: Record<string, any>;
tags?: Tags;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const AZURE_MANAGEMENT_GROUP_MAPPING_TYPE = {
TOP_MANAGEMENT_GROUP: 'Top Management Group',
LEAF_MANAGEMENT_GROUP: 'Leaf Management Group',
Comment on lines +1 to +3
Copy link

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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,

Copilot uses AI. Check for mistakes.
} as const;
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Tags } from '@/api-clients/_common/schema/model';
import type { ResourceGroupType } from '@/api-clients/_common/schema/type';
import type { AzureManagementGroupMappingType } from '@/api-clients/identity/trusted-account/schema/type';

export interface TrustedAccountModel {
trusted_account_id: string;
Expand All @@ -13,6 +14,8 @@ export interface TrustedAccountModel {
sync_options?: {
skip_project_group: boolean;
single_workspace_id: string;
use_management_group_as_workspace?: boolean; // only for Azure
azure_management_group_mapping_type?: AzureManagementGroupMappingType; // only for Azure
};
plugin_options?: Record<string, any>;
tags: Tags;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import type { AZURE_MANAGEMENT_GROUP_MAPPING_TYPE } from '@/api-clients/identity/trusted-account/schema/constant';

export type AzureManagementGroupMappingType = (typeof AZURE_MANAGEMENT_GROUP_MAPPING_TYPE)[keyof typeof AZURE_MANAGEMENT_GROUP_MAPPING_TYPE];
35 changes: 35 additions & 0 deletions apps/web/src/common/components/info-tooltip/InfoTooltip.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<script setup lang="ts">
import { PTooltip, PI } from '@cloudforet/mirinae';
import type { TooltipPosition } from '@cloudforet/mirinae/types/data-display/tooltips/type';

interface Props {
tooltipContents: string;
tooltipPosition?: TooltipPosition;
width?: string;
height?: string;
color?: string;
iconName?: string;
}

const props = withDefaults(defineProps<Props>(), {
tooltipPosition: 'bottom',
width: '0.75rem',
height: '0.75rem',
color: 'inherit',
iconName: 'ic_info-circle',
});
</script>

<template>
<p-tooltip class="info-tooltip"
:contents="props.tooltipContents"
:position="props.tooltipPosition"
>
<p-i :name="props.iconName"
:height="props.height"
:width="props.width"
:color="props.color"
class="info-tooltip-icon"
/>
</p-tooltip>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const handleClickSaveButton = async () => {
sync_options: {
skip_project_group: serviceAccountPageFormState.skipProjectGroup,
single_workspace_id: serviceAccountPageFormState.selectedSingleWorkspace ?? undefined,
azure_management_group_mapping_type: serviceAccountPageFormState.azureManagementGroupMappingType ?? undefined,
},
plugin_options: serviceAccountPageFormState.additionalOptions,
});
Expand Down
Loading
Loading