diff --git a/apps/web/src/api-clients/cost-analysis/budget-usage/schema/api-verbs/analyze.ts b/apps/web/src/api-clients/cost-analysis/budget-usage/schema/api-verbs/analyze.ts index 4c68386e74..65641c9de9 100644 --- a/apps/web/src/api-clients/cost-analysis/budget-usage/schema/api-verbs/analyze.ts +++ b/apps/web/src/api-clients/cost-analysis/budget-usage/schema/api-verbs/analyze.ts @@ -18,9 +18,9 @@ export interface BudgetUsageAnalyzeResult { project_id?: string; workspace_id?: string; data_source_id?: string; - provider_filter?: { - state?: string; - providers?: string[]; - }; + // provider_filter?: { + // state?: string; + // providers?: string[]; + // }; resource_group: Extract; } diff --git a/apps/web/src/api-clients/cost-analysis/budget-usage/schema/api-verbs/list.ts b/apps/web/src/api-clients/cost-analysis/budget-usage/schema/api-verbs/list.ts index 5a4111eaeb..0a082cdf65 100644 --- a/apps/web/src/api-clients/cost-analysis/budget-usage/schema/api-verbs/list.ts +++ b/apps/web/src/api-clients/cost-analysis/budget-usage/schema/api-verbs/list.ts @@ -9,4 +9,5 @@ export interface BudgetUsageListParameters { data_source_id?: string; workspace_id?: string; project_id?: string; + service_account_id?: string; } diff --git a/apps/web/src/api-clients/cost-analysis/budget-usage/schema/model.ts b/apps/web/src/api-clients/cost-analysis/budget-usage/schema/model.ts index 099704073c..7031ca1fdb 100644 --- a/apps/web/src/api-clients/cost-analysis/budget-usage/schema/model.ts +++ b/apps/web/src/api-clients/cost-analysis/budget-usage/schema/model.ts @@ -3,10 +3,10 @@ import type { ResourceGroupType } from '@/api-clients/_common/schema/type'; import type { Currency } from '@/store/display/type'; -interface ProviderFilter { - providers: string[]; - state: 'ENABLED' | 'DISABLED'; -} +// interface ProviderFilter { +// providers: string[]; +// state: 'ENABLED' | 'DISABLED'; +// } export interface BudgetUsageModel { budget_id: string; @@ -15,11 +15,11 @@ export interface BudgetUsageModel { cost: number; limit: number; currency: Currency; - provider_filter?: ProviderFilter; data_source_id: string; resource_group: Extract; project_id: string; workspace_id: string; + service_account_id: string; domain_id: string; updated_at: string; } diff --git a/apps/web/src/api-clients/cost-analysis/budget/schema/api-verbs/create.ts b/apps/web/src/api-clients/cost-analysis/budget/schema/api-verbs/create.ts index 23f7c15dfd..fcd2ec3583 100644 --- a/apps/web/src/api-clients/cost-analysis/budget/schema/api-verbs/create.ts +++ b/apps/web/src/api-clients/cost-analysis/budget/schema/api-verbs/create.ts @@ -1,21 +1,25 @@ import type { Tags } from '@/api-clients/_common/schema/model'; import type { ResourceGroupType } from '@/api-clients/_common/schema/type'; import type { - BudgetNotification, BudgetPlannedLimit, BudgetTimeUnit, ProviderFilter, + BudgetNotification, BudgetPlannedLimit, BudgetTimeUnit, } from '@/api-clients/cost-analysis/budget/schema/type'; +import type { Currency } from '@/store/display/type'; + export interface BudgetCreateParameters { - data_source_id: string; name?: string; limit?: number; planned_limits?: BudgetPlannedLimit[]; - provider_filter?: ProviderFilter; + currency: Currency; time_unit: BudgetTimeUnit; start: string; end: string; - notifications?: BudgetNotification[]; + notification?: BudgetNotification; tags?: Tags; resource_group: Extract; workspace_id?: string; project_id?: string; + service_account_id?: string; + budget_manager_id?: string; + budget_year?: string; } diff --git a/apps/web/src/api-clients/cost-analysis/budget/schema/api-verbs/set-notification.ts b/apps/web/src/api-clients/cost-analysis/budget/schema/api-verbs/set-notification.ts index 050fac8446..78a5737f97 100644 --- a/apps/web/src/api-clients/cost-analysis/budget/schema/api-verbs/set-notification.ts +++ b/apps/web/src/api-clients/cost-analysis/budget/schema/api-verbs/set-notification.ts @@ -2,5 +2,5 @@ import type { BudgetNotification } from '@/api-clients/cost-analysis/budget/sche export interface BudgetSetNotificationParameters { budget_id: string; - notifications: BudgetNotification[]; + notification: BudgetNotification; } diff --git a/apps/web/src/api-clients/cost-analysis/budget/schema/api-verbs/update.ts b/apps/web/src/api-clients/cost-analysis/budget/schema/api-verbs/update.ts index eebbefe2f3..a12da39dcf 100644 --- a/apps/web/src/api-clients/cost-analysis/budget/schema/api-verbs/update.ts +++ b/apps/web/src/api-clients/cost-analysis/budget/schema/api-verbs/update.ts @@ -6,5 +6,8 @@ export interface BudgetUpdateParameters { name?: string; limit?: number; planned_limits?: BudgetPlannedLimit[]; + start?: string; + end?: string; + utilization_rate?: number; tags?: Tags; } diff --git a/apps/web/src/api-clients/cost-analysis/budget/schema/model.ts b/apps/web/src/api-clients/cost-analysis/budget/schema/model.ts index 0ad8166b9d..a1973e32ae 100644 --- a/apps/web/src/api-clients/cost-analysis/budget/schema/model.ts +++ b/apps/web/src/api-clients/cost-analysis/budget/schema/model.ts @@ -1,29 +1,35 @@ + import type { Tags } from '@/api-clients/_common/schema/model'; import type { ResourceGroupType } from '@/api-clients/_common/schema/type'; import type { - BudgetNotification, BudgetPlannedLimit, BudgetTimeUnit, ProviderFilter, + BudgetNotification, + BudgetPlannedLimit, + BudgetTimeUnit, } from '@/api-clients/cost-analysis/budget/schema/type'; import type { Currency } from '@/store/display/type'; - export interface BudgetModel { - budget_id: string; - name: string; - limit: number; - planned_limits: BudgetPlannedLimit[]; - currency: Currency; - provider_filter: ProviderFilter; - time_unit: BudgetTimeUnit; - start: string; - end: string; - notifications: BudgetNotification[]; - tags: Tags; - data_source_id: string; - resource_group: Extract - project_id: string; - workspace_id: string; - domain_id: string; - created_at: string; - updated_at: string; + budget_id: string; + name: string; + limit: number; + planned_limits: BudgetPlannedLimit[]; + currency: Currency; + time_unit: BudgetTimeUnit; + start: string; + end: string; + notification: BudgetNotification; + tags: Tags; + data_source_id: string; + resource_group: Extract; + project_id: string; + workspace_id: string; + service_account_id: string; + budget_manager_id: string; + domain_id: string; + created_at: string; + updated_at: string; + budget_year: string; + notified_month: string; + utilization_rate: number; } diff --git a/apps/web/src/api-clients/cost-analysis/budget/schema/type.ts b/apps/web/src/api-clients/cost-analysis/budget/schema/type.ts index 65bd3a42cb..7c2ad9e8ba 100644 --- a/apps/web/src/api-clients/cost-analysis/budget/schema/type.ts +++ b/apps/web/src/api-clients/cost-analysis/budget/schema/type.ts @@ -1,11 +1,20 @@ export type BudgetTimeUnit = 'MONTHLY' | 'TOTAL'; -type BudgetNotificationType = 'CRITICAL' | 'WARNING'; -type BudgetNotificationUnit = 'PERCENT' | 'ACTUAL_COST'; +type BudgetNotificationUnit = 'PERCENT'; +type BudgetNotificationState = 'ENABLED' | 'DISABLED'; -export interface BudgetNotification { +interface BudgetNotificationPlan { threshold: number; unit: BudgetNotificationUnit; - notification_type: BudgetNotificationType; +} + +export interface BudgetNotificationRecipients { + users: string[]; +} + +export interface BudgetNotification { + state: BudgetNotificationState; + plans?: BudgetNotificationPlan[]; + recipients?: BudgetNotificationRecipients; } export interface BudgetPlannedLimit { diff --git a/apps/web/src/api-clients/identity/service-account/schema/api-verbs/create.ts b/apps/web/src/api-clients/identity/service-account/schema/api-verbs/create.ts index cef311f12b..a952cbcd76 100644 --- a/apps/web/src/api-clients/identity/service-account/schema/api-verbs/create.ts +++ b/apps/web/src/api-clients/identity/service-account/schema/api-verbs/create.ts @@ -7,6 +7,7 @@ export interface ServiceAccountCreateParameters { secret_schema_id?: string; secret_data?: Record; tags?: Tags; + service_account_mgr_id?: string; trusted_account_id?: string; project_id: string; } diff --git a/apps/web/src/api-clients/identity/service-account/schema/api-verbs/update.ts b/apps/web/src/api-clients/identity/service-account/schema/api-verbs/update.ts index ce80ea285e..5cdd4b676e 100644 --- a/apps/web/src/api-clients/identity/service-account/schema/api-verbs/update.ts +++ b/apps/web/src/api-clients/identity/service-account/schema/api-verbs/update.ts @@ -5,5 +5,6 @@ export interface ServiceAccountUpdateParameters { name?: string; data?: Record; tags?: Tags; + service_account_mgr_id?: string; project_id?: string; } diff --git a/apps/web/src/api-clients/identity/service-account/schema/model.ts b/apps/web/src/api-clients/identity/service-account/schema/model.ts index 4beb378887..8e264cf38b 100644 --- a/apps/web/src/api-clients/identity/service-account/schema/model.ts +++ b/apps/web/src/api-clients/identity/service-account/schema/model.ts @@ -20,6 +20,7 @@ export interface ServiceAccountModel { created_at: string; last_synced_at: string; state: ServiceAccountType; + service_account_mgr_id: string; // asset_info: ServiceAccountAssetInfoType; // cost_info: ServiceAccountCostInfoType; } diff --git a/apps/web/src/common/modules/project/ProjectSelectDropdown.vue b/apps/web/src/common/modules/project/ProjectSelectDropdown.vue index b7023f4846..266f1163e5 100644 --- a/apps/web/src/common/modules/project/ProjectSelectDropdown.vue +++ b/apps/web/src/common/modules/project/ProjectSelectDropdown.vue @@ -53,6 +53,7 @@ interface Props { styleType?: string; appearanceType?: 'stack'|'badge'; showDeleteAllButton?: boolean; + showDropdownLeftArea?: boolean; } const props = withDefaults(defineProps(), { @@ -73,6 +74,7 @@ const props = withDefaults(defineProps(), { styleType: undefined, appearanceType: undefined, showDeleteAllButton: undefined, + showDropdownLeftArea: false, }); const emit = defineEmits<{(e: 'select', value: ProjectTreeNodeData[]): void; @@ -321,6 +323,14 @@ watch(() => state._selectedProjectIds, (selectedProjectIds) => { @update:visible-menu="handleUpdateVisibleMenu" @delete-tag="handleDeleteTag" > + diff --git a/apps/web/src/common/modules/user/UserSelectDropdown.vue b/apps/web/src/common/modules/user/UserSelectDropdown.vue index 5770c65970..cb3faf3f51 100644 --- a/apps/web/src/common/modules/user/UserSelectDropdown.vue +++ b/apps/web/src/common/modules/user/UserSelectDropdown.vue @@ -52,6 +52,8 @@ const props = withDefaults(defineProps<{ showCategoryTitle?: boolean; placeholder?: string; excludedSelectedIds?: string[]; + size?: 'sm'|'md'; + pageSize?: number; }>(), { selectedId: undefined, selectedIds: undefined, @@ -71,6 +73,8 @@ const props = withDefaults(defineProps<{ showCategoryTitle: true, placeholder: 'Select', excludedSelectedIds: undefined, + size: 'md', + pageSize: 10, }); const emit = defineEmits<{(event: 'update:selected-id', value?: string): void; @@ -267,7 +271,6 @@ watch([() => props.selectedId, () => props.selectedIds], ([newUserId, newUserIds