From 2a7a063aece124fa4fa2cc5375f095d860897e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=8A=B9=EC=97=B0?= <165753731+seungyeoneeee@users.noreply.github.com> Date: Wed, 19 Mar 2025 11:33:02 +0900 Subject: [PATCH 001/233] feat: update languages (#5703) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 이승연 --- .../console-translation-2.8.babel | 425 ++++++++++++++++++ packages/language-pack/en.json | 22 + packages/language-pack/ja.json | 22 + packages/language-pack/ko.json | 22 + 4 files changed, 491 insertions(+) diff --git a/packages/language-pack/console-translation-2.8.babel b/packages/language-pack/console-translation-2.8.babel index 543581d0e5..b2e7e90ec6 100644 --- a/packages/language-pack/console-translation-2.8.babel +++ b/packages/language-pack/console-translation-2.8.babel @@ -11680,6 +11680,32 @@ + + BUDGET_DETAILS + + + TITLE + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + CANCEL false @@ -11790,6 +11816,27 @@ MAIN + + ALL + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + AMOUNT_PAID false @@ -11916,6 +11963,27 @@ + + BUDGET_CYCLE + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + BUDGET_NAME false @@ -11937,6 +12005,27 @@ + + BUDGET_STATUS + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + COST_TYPE false @@ -12000,6 +12089,27 @@ + + CUSTOM + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + DATA_SOURCE false @@ -12021,6 +12131,27 @@ + + DELETE + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + DESC false @@ -12042,6 +12173,174 @@ + + EDIT + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + EXCEEDED_BUDGET + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + FIXED_TERM + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + LAST_12_MONTHS + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + LAST_3_MONTHS + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + LAST_6_MONTHS + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + LAST_MONTH + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + LAST_YEAR + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + MANAGED_BY_ADMIN false @@ -12063,6 +12362,48 @@ + + MONTH + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + MONTHLY + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + NO_BUDGET false @@ -12126,6 +12467,27 @@ + + PROJECT + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + PROVIDER false @@ -12147,6 +12509,48 @@ + + SELECT_MONTH + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + SERVICE_ACCOUNT + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + SINGLE_BUDGET false @@ -12189,6 +12593,27 @@ + + THIS_YEAR + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + TOTAL false diff --git a/packages/language-pack/en.json b/packages/language-pack/en.json index 8778e7fcb9..7dc3897aaa 100644 --- a/packages/language-pack/en.json +++ b/packages/language-pack/en.json @@ -616,6 +616,9 @@ "SPECIFIC_PROVIDER": "Specific Provider", "WORKSPACE": "Workspace" }, + "BUDGET_DETAILS": { + "TITLE": "Budget Details" + }, "CANCEL": "Cancel", "CONFIRM": "Confirm", "CREATE_BUDGET": "Create Budget", @@ -623,25 +626,44 @@ "UPDATE_BUDGET": "Update Budget" }, "MAIN": { + "ALL": "All", "AMOUNT_PAID": "Budget Usage Rate({symbol})", "AMOUNT_SPENT": "Amount Spent", "AMOUNT_USED": "Budget Usage Amount{symbol})", "ASC": "Asc", "BUDGET": "Budget", "BUDGETED": "Budgeted", + "BUDGET_CYCLE": "Budget Cycle", "BUDGET_NAME": "Budget Name", + "BUDGET_STATUS": "Budget Status", "COST_TYPE": "Cost Type", "CREATE": "Create", "CREATE_BUDGET": "Create Budget", + "CUSTOM": "Custom", "DATA_SOURCE": "Data Source", + "DELETE": "Delete", "DESC": "Desc", + "EDIT": "Edit", + "EXCEEDED_BUDGET": "Exceeded Budget", + "FIXED_TERM": "Fixed-term", + "LAST_12_MONTHS": "Last 12 Months", + "LAST_3_MONTHS": "Last 3 Months", + "LAST_6_MONTHS": "Last 6 Months", + "LAST_MONTH": "Last Month", + "LAST_YEAR": "Last Year", "MANAGED_BY_ADMIN": "Managed by admins", + "MONTH": "Month", + "MONTHLY": "Monthly", "NO_BUDGET": "No Budget", "OVERSPENT": "Overspent", "PERIOD": "Period", + "PROJECT": "Project", "PROVIDER": "Provider", + "SELECT_MONTH": "Select Month", + "SERVICE_ACCOUNT": "Service Account", "SINGLE_BUDGET": "Single Budget", "THIS_MONTH": "This Month", + "THIS_YEAR": "This Year", "TOTAL": "Total", "UPDATE_BUDGET": "Update Budget", "USAGE": "Budget Usage Rate({symbol})" diff --git a/packages/language-pack/ja.json b/packages/language-pack/ja.json index be5be3652f..0eb67d8350 100644 --- a/packages/language-pack/ja.json +++ b/packages/language-pack/ja.json @@ -616,6 +616,9 @@ "SPECIFIC_PROVIDER": "特定プロバイダ", "WORKSPACE": "ワークスペース" }, + "BUDGET_DETAILS": { + "TITLE": "" + }, "CANCEL": "取消", "CONFIRM": "確認", "CREATE_BUDGET": "予算作成", @@ -623,25 +626,44 @@ "UPDATE_BUDGET": "予算の更新" }, "MAIN": { + "ALL": "合計", "AMOUNT_PAID": "使用料({symbol})", "AMOUNT_SPENT": "使用金額", "AMOUNT_USED": "使用金額({symbol})", "ASC": "昇順", "BUDGET": "予算", "BUDGETED": "予算", + "BUDGET_CYCLE": "", "BUDGET_NAME": "予算名", + "BUDGET_STATUS": "", "COST_TYPE": "コストタイプ", "CREATE": "予算作成", "CREATE_BUDGET": "予算作成", + "CUSTOM": "カスタム", "DATA_SOURCE": "データソース", + "DELETE": "削除", "DESC": "降順", + "EDIT": "編集", + "EXCEEDED_BUDGET": "", + "FIXED_TERM": "", + "LAST_12_MONTHS": "過去12ヶ月間", + "LAST_3_MONTHS": "過去3ヶ月間", + "LAST_6_MONTHS": "過去6ヶ月間", + "LAST_MONTH": "直近の月", + "LAST_YEAR": "昨年", "MANAGED_BY_ADMIN": "管理者管理", + "MONTH": "月", + "MONTHLY": "", "NO_BUDGET": "予算なし", "OVERSPENT": "予算超過", "PERIOD": "期間", + "PROJECT": "", "PROVIDER": "プロバイダー", + "SELECT_MONTH": "月を選択", + "SERVICE_ACCOUNT": "サービスアカウント", "SINGLE_BUDGET": "単一予算", "THIS_MONTH": "今月", + "THIS_YEAR": "本年", "TOTAL": "合計", "UPDATE_BUDGET": "予算修正", "USAGE": "使用料({symbol})" diff --git a/packages/language-pack/ko.json b/packages/language-pack/ko.json index 19bb936ef5..41d313b872 100644 --- a/packages/language-pack/ko.json +++ b/packages/language-pack/ko.json @@ -616,6 +616,9 @@ "SPECIFIC_PROVIDER": "특정 프로바이더", "WORKSPACE": "워크스페이스" }, + "BUDGET_DETAILS": { + "TITLE": "" + }, "CANCEL": "취소", "CONFIRM": "확인", "CREATE_BUDGET": "예산 생성", @@ -623,25 +626,44 @@ "UPDATE_BUDGET": "예산 수정 " }, "MAIN": { + "ALL": "전체", "AMOUNT_PAID": "사용량({symbol})", "AMOUNT_SPENT": "사용 금액", "AMOUNT_USED": "사용금액({symbol})", "ASC": "오름차순", "BUDGET": "예산", "BUDGETED": "책정된 예산", + "BUDGET_CYCLE": "", "BUDGET_NAME": "예산명", + "BUDGET_STATUS": "", "COST_TYPE": "비용 발생 기준", "CREATE": "예산 생성", "CREATE_BUDGET": "예산 생성", + "CUSTOM": "기간 선택", "DATA_SOURCE": "데이터 소스", + "DELETE": "삭제", "DESC": "내림차순", + "EDIT": "편집", + "EXCEEDED_BUDGET": "", + "FIXED_TERM": "", + "LAST_12_MONTHS": "지난 12개월", + "LAST_3_MONTHS": "지난 3개월", + "LAST_6_MONTHS": "지난 6개월", + "LAST_MONTH": "지난달", + "LAST_YEAR": "지난해", "MANAGED_BY_ADMIN": "Admin에 의해 관리됨", + "MONTH": "월", + "MONTHLY": "", "NO_BUDGET": "예산 없음", "OVERSPENT": "예산초과", "PERIOD": "기준 기간", + "PROJECT": "", "PROVIDER": "프로바이더", + "SELECT_MONTH": "월 선택", + "SERVICE_ACCOUNT": "서비스 어카운트", "SINGLE_BUDGET": "단일 예산", "THIS_MONTH": "이번 달", + "THIS_YEAR": "올해", "TOTAL": "전체", "UPDATE_BUDGET": "예산 수정", "USAGE": "사용량({symbol})" From cec9679a79233f0f9c954e36f2184f73540b561f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=8A=B9=EC=97=B0?= <165753731+seungyeoneeee@users.noreply.github.com> Date: Mon, 24 Mar 2025 10:20:23 +0900 Subject: [PATCH 002/233] Feat: add features related to service account manager (#5707) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: update languages Signed-off-by: 이승연 * feat: add features related to service account manager Signed-off-by: 이승연 --------- Signed-off-by: 이승연 --- .../schema/api-verbs/create.ts | 1 + .../schema/api-verbs/update.ts | 1 + .../identity/service-account/schema/model.ts | 1 + .../ServiceAccountBaseInformation.vue | 1 + .../ServiceAccountBaseInformationForm.vue | 25 +++++++++++++++++++ .../dynamic-layout-schema-template.ts | 10 ++++++++ .../pages/ServiceAccountAddPage.vue | 1 + .../types/service-account-page-type.ts | 1 + .../console-translation-2.8.babel | 21 ++++++++++++++++ packages/language-pack/en.json | 1 + packages/language-pack/ja.json | 1 + packages/language-pack/ko.json | 1 + 12 files changed, 65 insertions(+) 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/services/asset-inventory/components/ServiceAccountBaseInformation.vue b/apps/web/src/services/asset-inventory/components/ServiceAccountBaseInformation.vue index 13ebdec81e..a333c604d9 100644 --- a/apps/web/src/services/asset-inventory/components/ServiceAccountBaseInformation.vue +++ b/apps/web/src/services/asset-inventory/components/ServiceAccountBaseInformation.vue @@ -79,6 +79,7 @@ const updateServiceAccount = async () => { } else { await SpaceConnector.clientV2.identity.serviceAccount.update({ service_account_id: props.serviceAccountId ?? '', + service_account_mgr_id: state.baseInformationForm.serviceAccountManagerId, name: state.baseInformationForm.accountName, data: state.baseInformationForm.customSchemaForm, tags: state.baseInformationForm.tags, diff --git a/apps/web/src/services/asset-inventory/components/ServiceAccountBaseInformationForm.vue b/apps/web/src/services/asset-inventory/components/ServiceAccountBaseInformationForm.vue index 134c5143eb..d04dfbea74 100644 --- a/apps/web/src/services/asset-inventory/components/ServiceAccountBaseInformationForm.vue +++ b/apps/web/src/services/asset-inventory/components/ServiceAccountBaseInformationForm.vue @@ -19,6 +19,7 @@ import { useUserStore } from '@/store/user/user-store'; import TagsInput from '@/common/components/inputs/TagsInput.vue'; import { useFormValidator } from '@/common/composables/form-validator'; import type { Tag } from '@/common/modules/tags/type'; +import UserSelectDropdown from '@/common/modules/user/UserSelectDropdown.vue'; import ServiceAccountProjectForm from '@/services/asset-inventory/components/ServiceAccountProjectForm.vue'; import { useServiceAccountPageStore } from '@/services/asset-inventory/stores/service-account-page-store'; @@ -65,6 +66,7 @@ const state = reactive({ accountName: state.originServiceAccountData?.name, customSchemaForm: state.originServiceAccountData?.data, tags: state.originServiceAccountData?.tags, + serviceAccountManagerId: state.originServiceAccountData?.service_account_mgr_id, ...((!serviceAccountPageGetters.isTrustedAccount && state.originServiceAccountData && ('project_id' in state.originServiceAccountData)) && { projectForm: { selectedProjectId: state.originServiceAccountData?.project_id ?? '' }, }), @@ -75,10 +77,12 @@ const state = reactive({ tags: {}, isTagsValid: true, projectForm: {} as ProjectForm, + serviceAccountManagerId: '', isProjectFormValid: false, formData: computed(() => ({ accountName: serviceAccountName.value, customSchemaForm: state.customSchemaForm, + serviceAccountManagerId: state.serviceAccountManagerId, ...(!serviceAccountPageGetters.isTrustedAccount && { projectForm: state.projectForm }), tags: state.tags, })), @@ -99,6 +103,7 @@ const initFormData = (originForm: Partial) => { // init validation state.isCustomSchemaFormValid = true; state.projectForm.selectedProjectId = originForm?.projectForm?.selectedProjectId; + state.serviceAccountManagerId = originForm?.serviceAccountManagerId; }; /* Api */ @@ -127,6 +132,10 @@ const handleUpdateServiceAccountName = (value: string) => { setForm('serviceAccountName', value); }; +const handleServiceAccountManagerId = (value: string) => { + state.serviceAccountManagerId = value; +}; + /* Init */ (async () => { await listServiceAccounts(); @@ -166,6 +175,16 @@ watch(() => state.originForm, (originForm) => { /> + + state.originForm, (originForm) => { margin-bottom: 1.5rem; } + /* custom design-system component - p-select-dropdown */ + :deep(.dropdown-button-component) { + max-width: 30rem; + width: 100%; + } + /* custom design-system component - p-json-schema-form */ :deep(.p-json-schema-form) { .p-field-group { diff --git a/apps/web/src/services/asset-inventory/helpers/dynamic-ui-schema-generator/dynamic-layout-schema-template.ts b/apps/web/src/services/asset-inventory/helpers/dynamic-ui-schema-generator/dynamic-layout-schema-template.ts index 34a65d475a..79f7c16a91 100644 --- a/apps/web/src/services/asset-inventory/helpers/dynamic-ui-schema-generator/dynamic-layout-schema-template.ts +++ b/apps/web/src/services/asset-inventory/helpers/dynamic-ui-schema-generator/dynamic-layout-schema-template.ts @@ -53,6 +53,11 @@ export const getDefaultDetailSchema = (fields: DynamicField[], options: { type: 'text', })), ...((!options.isTrustedAccount && [ + { + key: 'service_account_mgr_id', + name: 'Service Account Manager', + type: 'text', + }, { key: 'state', name: 'State', @@ -160,6 +165,11 @@ export const getDefaultTableSchema = (dynamicFields: DynamicField[], options: { reference_key: 'project_id', }, }, + { + key: 'service_account_mgr_id', + name: 'Service Account Manager', + type: 'text', + }, { key: 'state', name: 'State', diff --git a/apps/web/src/services/asset-inventory/pages/ServiceAccountAddPage.vue b/apps/web/src/services/asset-inventory/pages/ServiceAccountAddPage.vue index 24caee2b4f..18dfff7dfd 100644 --- a/apps/web/src/services/asset-inventory/pages/ServiceAccountAddPage.vue +++ b/apps/web/src/services/asset-inventory/pages/ServiceAccountAddPage.vue @@ -148,6 +148,7 @@ const createAccount = async (): Promise => { secret_schema_id: formState.credentialForm?.selectedSecretSchema?.schema_id, secret_data: secretData, tags: formState.baseInformationForm.tags, + service_account_mgr_id: formState.baseInformationForm.serviceAccountManagerId, trusted_account_id: attachedTrustedAccountId, project_id: formState.baseInformationForm.projectForm?.selectedProjectId ?? '', }); diff --git a/apps/web/src/services/asset-inventory/types/service-account-page-type.ts b/apps/web/src/services/asset-inventory/types/service-account-page-type.ts index 0b5f5b4497..e46b826db0 100644 --- a/apps/web/src/services/asset-inventory/types/service-account-page-type.ts +++ b/apps/web/src/services/asset-inventory/types/service-account-page-type.ts @@ -8,6 +8,7 @@ export type PageMode = 'CREATE' | 'UPDATE' | 'READ'; export interface BaseInformationForm { accountName: string; customSchemaForm: { [key: string]: any; }; + serviceAccountManagerId?: string; tags: Tag; projectForm?: ProjectForm; } diff --git a/packages/language-pack/console-translation-2.8.babel b/packages/language-pack/console-translation-2.8.babel index b2e7e90ec6..dfcad6ccaf 100644 --- a/packages/language-pack/console-translation-2.8.babel +++ b/packages/language-pack/console-translation-2.8.babel @@ -63167,6 +63167,27 @@ + + SERVICE_ACCOUNT_MANAGER + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + TAB_INPUT false diff --git a/packages/language-pack/en.json b/packages/language-pack/en.json index 7dc3897aaa..33a4c5e2bb 100644 --- a/packages/language-pack/en.json +++ b/packages/language-pack/en.json @@ -3451,6 +3451,7 @@ "SECRET_TYPE_LABEL": "Secret Type", "SEE_MORE": "See more", "SERVICE_ACCOUNT": "Service Account", + "SERVICE_ACCOUNT_MANAGER": "Service Account Manager", "TAB_INPUT": "Input Form", "TAB_JSON": "Json Code", "TAG_ADD": "Add Tag", diff --git a/packages/language-pack/ja.json b/packages/language-pack/ja.json index 0eb67d8350..fda2512a10 100644 --- a/packages/language-pack/ja.json +++ b/packages/language-pack/ja.json @@ -3451,6 +3451,7 @@ "SECRET_TYPE_LABEL": "暗号化キーのタイプ", "SEE_MORE": "詳細はこちら", "SERVICE_ACCOUNT": "サービスアカウント", + "SERVICE_ACCOUNT_MANAGER": "", "TAB_INPUT": "直接入力", "TAB_JSON": "JSONで入力", "TAG_ADD": "タグ追加", diff --git a/packages/language-pack/ko.json b/packages/language-pack/ko.json index 41d313b872..5a10462084 100644 --- a/packages/language-pack/ko.json +++ b/packages/language-pack/ko.json @@ -3451,6 +3451,7 @@ "SECRET_TYPE_LABEL": "암호화 키 유형", "SEE_MORE": "더 알아보기", "SERVICE_ACCOUNT": "서비스 어카운트", + "SERVICE_ACCOUNT_MANAGER": "서비스 어카운트 담당자", "TAB_INPUT": "직접 입력", "TAB_JSON": "JSON으로 입력", "TAG_ADD": "태그 추가", From 017d290017f999f28b4d4a0a32830261ccc666f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=8A=B9=EC=97=B0?= <165753731+seungyeoneeee@users.noreply.github.com> Date: Thu, 27 Mar 2025 12:58:00 +0900 Subject: [PATCH 003/233] Feat: update budget landing page & create page initial mark-up and api connection (#5718) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: update languages Signed-off-by: 이승연 * feat: update budget model of latest version Signed-off-by: 이승연 * feat: update budget landing page & create page (dev) Signed-off-by: 이승연 --------- Signed-off-by: 이승연 --- .../budget-usage/schema/api-verbs/analyze.ts | 8 +- .../budget-usage/schema/api-verbs/list.ts | 1 + .../budget-usage/schema/model.ts | 10 +- .../budget/schema/api-verbs/create.ts | 10 +- .../cost-analysis/budget/schema/model.ts | 6 +- .../cost-analysis/budget/schema/type.ts | 21 +- .../components/BudgetCreateFormAmountPlan.vue | 2 +- .../components/BudgetCreateManagerSelect.vue | 96 ++ .../components/BudgetCreateScopeSelect.vue | 72 + .../components/BudgetCreateStep1.vue | 122 ++ .../components/BudgetCreateStep2.vue | 314 ++++ .../components/BudgetCreateStep3.vue | 129 ++ .../components/BudgetDeleteCheckModal.vue | 20 + .../BudgetListPeriodCustomModal.vue | 75 + .../components/BudgetMainList.vue | 506 +++++-- .../components/BudgetMainToolset.vue | 187 +++ .../budget-usage-analyze-api-query-helper.ts | 4 +- .../cost-explorer/pages/BudgetCreatePage.vue | 97 +- .../BudgetLastThreeMonthCostTrendBarChart.vue | 11 + .../cost-explorer/pages/BudgetMainPage.vue | 62 +- .../stores/budget-create-page-store.ts | 123 ++ .../console-translation-2.8.babel | 1257 ++++++++++++++++- packages/language-pack/en.json | 56 + packages/language-pack/ja.json | 58 +- packages/language-pack/ko.json | 58 +- 25 files changed, 3057 insertions(+), 248 deletions(-) create mode 100644 apps/web/src/services/cost-explorer/components/BudgetCreateManagerSelect.vue create mode 100644 apps/web/src/services/cost-explorer/components/BudgetCreateScopeSelect.vue create mode 100644 apps/web/src/services/cost-explorer/components/BudgetCreateStep1.vue create mode 100644 apps/web/src/services/cost-explorer/components/BudgetCreateStep2.vue create mode 100644 apps/web/src/services/cost-explorer/components/BudgetCreateStep3.vue create mode 100644 apps/web/src/services/cost-explorer/components/BudgetDeleteCheckModal.vue create mode 100644 apps/web/src/services/cost-explorer/components/BudgetListPeriodCustomModal.vue create mode 100644 apps/web/src/services/cost-explorer/components/BudgetMainToolset.vue create mode 100644 apps/web/src/services/cost-explorer/pages/BudgetLastThreeMonthCostTrendBarChart.vue create mode 100644 apps/web/src/services/cost-explorer/stores/budget-create-page-store.ts 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..93af9ebd25 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,23 @@ 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[]; + notifications?: BudgetNotification; tags?: Tags; resource_group: Extract; workspace_id?: string; project_id?: string; + service_account_id?: string; } 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..9b19738848 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,7 +1,7 @@ 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'; @@ -13,16 +13,16 @@ export interface BudgetModel { limit: number; planned_limits: BudgetPlannedLimit[]; currency: Currency; - provider_filter: ProviderFilter; time_unit: BudgetTimeUnit; start: string; end: string; - notifications: BudgetNotification[]; + notifications: BudgetNotification; tags: Tags; data_source_id: string; resource_group: Extract project_id: string; workspace_id: string; + service_account_id: string; domain_id: string; created_at: string; updated_at: string; 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..e19d513b31 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,22 @@ -export type BudgetTimeUnit = 'MONTHLY' | 'TOTAL'; -type BudgetNotificationType = 'CRITICAL' | 'WARNING'; -type BudgetNotificationUnit = 'PERCENT' | 'ACTUAL_COST'; +export type BudgetTimeUnit = 'MONTHLY' | 'FIXED_TERM'; +type BudgetNotificationUnit = 'PERCENT'; +type BudgetNotificationState = 'ENABLED' | 'DISABLED'; -export interface BudgetNotification { +interface BudgetNotificationPlan { threshold: number; unit: BudgetNotificationUnit; - notification_type: BudgetNotificationType; +} + +export interface BudgetNotificationRecipients { + role_types: string[]; + users: string[]; + service_account_manager: string; +} + +export interface BudgetNotification { + state: BudgetNotificationState; + plans: BudgetNotificationPlan[]; + recipients: BudgetNotificationRecipients; } export interface BudgetPlannedLimit { diff --git a/apps/web/src/services/cost-explorer/components/BudgetCreateFormAmountPlan.vue b/apps/web/src/services/cost-explorer/components/BudgetCreateFormAmountPlan.vue index a142221bc4..0b94359de4 100644 --- a/apps/web/src/services/cost-explorer/components/BudgetCreateFormAmountPlan.vue +++ b/apps/web/src/services/cost-explorer/components/BudgetCreateFormAmountPlan.vue @@ -99,7 +99,7 @@ watch([() => state.amountPlanInfo, () => state.isAllValid], ([amountPlanInfo, is
+import { reactive, watch } from 'vue'; + +import { + PFieldGroup, PCheckboxGroup, PCheckbox, PSelectDropdown, PLink, +} from '@cloudforet/mirinae'; +import type { SelectDropdownMenuItem } from '@cloudforet/mirinae/types/controls/dropdown/select-dropdown/type'; + +import { ROLE_TYPE } from '@/api-clients/identity/role/constant'; +import { i18n } from '@/translations'; + +import { useBudgetCreatePageStore } from '../stores/budget-create-page-store'; + +interface BudgetCreateManagerSelectState { + budgetManagerList: SelectDropdownMenuItem[]; + selectedBudgetManagerList: string[]; +} + +interface Props { + scope: string; +} + +const props = withDefaults(defineProps(), { + scope: '', +}); + +const budgetCreatePageStore = useBudgetCreatePageStore(); +const budgetCreatePageState = budgetCreatePageStore.state; + +const state = reactive({ + budgetManagerList: [ + { name: 'workspaceOwners', label: i18n.t('BILLING.COST_MANAGEMENT.BUDGET.FORM.CREATE.WORKSPACE_OWNERS') }, + { name: 'projectMember', label: i18n.t('BILLING.COST_MANAGEMENT.BUDGET.FORM.CREATE.PROJECT_MEMBER') }, + { name: 'serviceAccountManagers', label: i18n.t('BILLING.COST_MANAGEMENT.BUDGET.FORM.CREATE.SERVICE_ACCOUNT_MANAGERS') }, + { name: 'others', label: i18n.t('BILLING.COST_MANAGEMENT.BUDGET.FORM.CREATE.OTHERS') }, + ], + selectedBudgetManagerList: [], +}); + +watch(() => budgetCreatePageState.selectedBudgetManagerList, () => { + budgetCreatePageStore.$patch((_state) => { + if (budgetCreatePageState.selectedBudgetManagerList.includes('workspaceOwners')) { + _state.state.recipients.role_types.push(ROLE_TYPE.WORKSPACE_OWNER); + } if (budgetCreatePageState.selectedBudgetManagerList.includes('projectMember') + || budgetCreatePageState.selectedBudgetManagerList.includes('serviceAccountManagers') + || budgetCreatePageState.selectedBudgetManagerList.includes('others')) { + _state.state.recipients.role_types.push(ROLE_TYPE.WORKSPACE_MEMBER); + } if (!budgetCreatePageState.selectedBudgetManagerList.includes('workspaceOwners')) { + _state.state.recipients.role_types = _state.state.recipients.role_types.filter((role_type) => role_type !== ROLE_TYPE.WORKSPACE_OWNER); + } if (!budgetCreatePageState.selectedBudgetManagerList.includes('projectMember') + && !budgetCreatePageState.selectedBudgetManagerList.includes('serviceAccountManagers') + && !budgetCreatePageState.selectedBudgetManagerList.includes('others')) { + _state.state.recipients.role_types = _state.state.recipients.role_types.filter((role_type) => role_type !== ROLE_TYPE.WORKSPACE_MEMBER); + } + _state.state.recipients.role_types = [...new Set(_state.state.recipients.role_types)]; + // _state.state.selectedBudgetManagerList = state.selectedBudgetManagerList; + }); +}, { deep: true, immediate: true }); + +// watch(() => budgetCreatePageState.recipients, () => { + +// }) + +// watch(() => budgetCreatePageState.selectedBudgetManagerList, () => { +// state.selectedBudgetManagerList = budgetCreatePageState.selectedBudgetManagerList; +// }, { deep: true, immediate: true }); + + + diff --git a/apps/web/src/services/cost-explorer/components/BudgetCreateScopeSelect.vue b/apps/web/src/services/cost-explorer/components/BudgetCreateScopeSelect.vue new file mode 100644 index 0000000000..c87a63f3c6 --- /dev/null +++ b/apps/web/src/services/cost-explorer/components/BudgetCreateScopeSelect.vue @@ -0,0 +1,72 @@ + + + diff --git a/apps/web/src/services/cost-explorer/components/BudgetCreateStep1.vue b/apps/web/src/services/cost-explorer/components/BudgetCreateStep1.vue new file mode 100644 index 0000000000..213d16551b --- /dev/null +++ b/apps/web/src/services/cost-explorer/components/BudgetCreateStep1.vue @@ -0,0 +1,122 @@ + + + diff --git a/apps/web/src/services/cost-explorer/components/BudgetCreateStep2.vue b/apps/web/src/services/cost-explorer/components/BudgetCreateStep2.vue new file mode 100644 index 0000000000..3a9cb2a3da --- /dev/null +++ b/apps/web/src/services/cost-explorer/components/BudgetCreateStep2.vue @@ -0,0 +1,314 @@ + + + + + diff --git a/apps/web/src/services/cost-explorer/components/BudgetCreateStep3.vue b/apps/web/src/services/cost-explorer/components/BudgetCreateStep3.vue new file mode 100644 index 0000000000..7d4e830a23 --- /dev/null +++ b/apps/web/src/services/cost-explorer/components/BudgetCreateStep3.vue @@ -0,0 +1,129 @@ + + + diff --git a/apps/web/src/services/cost-explorer/components/BudgetDeleteCheckModal.vue b/apps/web/src/services/cost-explorer/components/BudgetDeleteCheckModal.vue new file mode 100644 index 0000000000..256db25a8d --- /dev/null +++ b/apps/web/src/services/cost-explorer/components/BudgetDeleteCheckModal.vue @@ -0,0 +1,20 @@ + + + diff --git a/apps/web/src/services/cost-explorer/components/BudgetListPeriodCustomModal.vue b/apps/web/src/services/cost-explorer/components/BudgetListPeriodCustomModal.vue new file mode 100644 index 0000000000..9085d0825e --- /dev/null +++ b/apps/web/src/services/cost-explorer/components/BudgetListPeriodCustomModal.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/apps/web/src/services/cost-explorer/components/BudgetMainList.vue b/apps/web/src/services/cost-explorer/components/BudgetMainList.vue index 6884206ac7..675c9e6089 100644 --- a/apps/web/src/services/cost-explorer/components/BudgetMainList.vue +++ b/apps/web/src/services/cost-explorer/components/BudgetMainList.vue @@ -1,86 +1,202 @@ - - - diff --git a/apps/web/src/services/cost-explorer/components/BudgetMainToolset.vue b/apps/web/src/services/cost-explorer/components/BudgetMainToolset.vue new file mode 100644 index 0000000000..d1f151906d --- /dev/null +++ b/apps/web/src/services/cost-explorer/components/BudgetMainToolset.vue @@ -0,0 +1,187 @@ + + + diff --git a/apps/web/src/services/cost-explorer/helpers/budget-usage-analyze-api-query-helper.ts b/apps/web/src/services/cost-explorer/helpers/budget-usage-analyze-api-query-helper.ts index dd0f50012c..05800b2076 100644 --- a/apps/web/src/services/cost-explorer/helpers/budget-usage-analyze-api-query-helper.ts +++ b/apps/web/src/services/cost-explorer/helpers/budget-usage-analyze-api-query-helper.ts @@ -12,7 +12,7 @@ import type { Period } from '@/services/cost-explorer/types/cost-explorer-query- type BudgetUsageAnalyzeRequestGroupBy = Partial; const BUDGET_USAGE_ANALYZE_REQUEST_GROUP_BY: BudgetUsageAnalyzeRequestGroupBy[] = [ - 'budget_id', 'name', 'project_id', 'data_source_id', 'provider_filter', 'resource_group', 'workspace_id', + 'budget_id', 'name', 'project_id', 'data_source_id', 'resource_group', 'workspace_id', ]; type BudgetUsageAnalyzeRequestSelect = Record; @@ -23,7 +23,7 @@ const BUDGET_USAGE_ANALYZE_REQUEST_SELECT: BudgetUsageAnalyzeRequestSelect = { workspace_id: 'workspace_id', resource_group: 'resource_group', data_source_id: 'data_source_id', - provider_filter: 'provider_filter', + // provider_filter: 'provider_filter', total_spent: 'total_spent', total_budget: 'total_budget', budget_usage: 'budget_usage', diff --git a/apps/web/src/services/cost-explorer/pages/BudgetCreatePage.vue b/apps/web/src/services/cost-explorer/pages/BudgetCreatePage.vue index b85e863dc7..6673dc61af 100644 --- a/apps/web/src/services/cost-explorer/pages/BudgetCreatePage.vue +++ b/apps/web/src/services/cost-explorer/pages/BudgetCreatePage.vue @@ -1,16 +1,97 @@ + + diff --git a/apps/web/src/services/cost-explorer/pages/BudgetLastThreeMonthCostTrendBarChart.vue b/apps/web/src/services/cost-explorer/pages/BudgetLastThreeMonthCostTrendBarChart.vue new file mode 100644 index 0000000000..8ba0f9b65d --- /dev/null +++ b/apps/web/src/services/cost-explorer/pages/BudgetLastThreeMonthCostTrendBarChart.vue @@ -0,0 +1,11 @@ + + + diff --git a/apps/web/src/services/cost-explorer/pages/BudgetMainPage.vue b/apps/web/src/services/cost-explorer/pages/BudgetMainPage.vue index cb22839858..d88d7a97b8 100644 --- a/apps/web/src/services/cost-explorer/pages/BudgetMainPage.vue +++ b/apps/web/src/services/cost-explorer/pages/BudgetMainPage.vue @@ -1,5 +1,5 @@ diff --git a/apps/web/src/services/cost-explorer/stores/budget-create-page-store.ts b/apps/web/src/services/cost-explorer/stores/budget-create-page-store.ts new file mode 100644 index 0000000000..c7523c34fe --- /dev/null +++ b/apps/web/src/services/cost-explorer/stores/budget-create-page-store.ts @@ -0,0 +1,123 @@ +import { reactive } from 'vue'; + +import { defineStore } from 'pinia'; + +import type { BudgetNotificationRecipients } from '@/api-clients/cost-analysis/budget/schema/type'; + +import type { Currency } from '@/store/display/type'; + +interface BudgetCreatePageState { + loading: boolean; + currentStep: number; + name: string; + project: string; + scope: { + type: number; + serviceAccount: string|undefined; + }; + selectedBudgetManagerList: string[]; + recipients: BudgetNotificationRecipients; + currency: Currency | undefined; + time_unit: 'fixedTerm' | 'monthly'; + startMonth: string, + endMonth: string, + temp: string; + limit: number; + planned_limits: { + date: string; + limit: number; + }[] | undefined; +} + +export const useBudgetCreatePageStore = defineStore('page-budget-create', () => { + const state = reactive({ + loading: false, + currentStep: 1, + name: '', + project: '', + scope: { + type: 0, + serviceAccount: '', + }, + selectedBudgetManagerList: [], + recipients: { + role_types: [], + users: [], + service_account_manager: '', + }, + currency: undefined, + time_unit: 'fixedTerm', + startMonth: '', + endMonth: '', + temp: '', + limit: 0, + planned_limits: [], + }); + const setName = (name: string) => { + state.name = name; + }; + const setCurrentStep = (step: number) => { + state.currentStep = step; + }; + const setProject = (projectId: string) => { + state.project = projectId; + }; + const setScope = (value: any) => { + state.scope = value; + }; + const setCurrency = (currency: any) => { + state.currency = currency; + }; + const setStart = (startMonth: string) => { + state.startMonth = startMonth; + }; + const setEnd = (endMonth: string) => { + state.endMonth = endMonth; + }; + const setTimeUnit = (time_unit) => { + state.time_unit = time_unit; + }; + const setPlannedLimits = (planned_limit) => { + state.planned_limits = planned_limit; + }; + const setTemp = (t) => { state.temp = t; }; + const setLimit = (limit: number) => { state.limit = limit; }; + const mutations = { + setName, + setCurrentStep, + setProject, + setScope, + setCurrency, + setStart, + setEnd, + setTimeUnit, + setTemp, + setLimit, + setPlannedLimits, + }; + + const reset = () => { + state.name = ''; + state.currentStep = 1; + state.project = ''; + // state.scope = { + // type: '', + // serviceAccount: '', + // }, + // recipients = { + // role_types: [], + // users: [], + // }; + }; + + const getters = reactive({ }); + + + + return { + state, + getters, + ...mutations, + reset, + }; +}); diff --git a/packages/language-pack/console-translation-2.8.babel b/packages/language-pack/console-translation-2.8.babel index dfcad6ccaf..5893fb2e51 100644 --- a/packages/language-pack/console-translation-2.8.babel +++ b/packages/language-pack/console-translation-2.8.babel @@ -11748,8 +11748,1005 @@ + + CREATE + + + ADD_THRESHOLD + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + APPLY_THE_SAME_AMOUNT + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + BUDGET_AMOUNT + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + BUDGET_CYCLE + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + BUDGET_CYCLE_DESCRIPTION + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + BUDGET_MANAGER + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + BUDGET_MANAGER_DESCRIPTION + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + CANCEL + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + CONTINUE + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + CURRENCY + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + EDIT_BUDGET_MANAGER + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + END_MONTH + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + ENTER_MANUALLY + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + EXCEEDS_AMOUNT + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + EXCEEDS_AMOUNT_DESCRIPTION + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + EXCHANGE_RATE_SOURCE + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + FIXED_TERM + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + INCRASE_BY_SPECIFIC_PERCENTAGE + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + INITIAL_AMOUNT + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + MONTHLY + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + MONTHLY_BUDGET_ALLOCATION + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + MONTHLY_GROWTH_RATE + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + OTHERS + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + PREVIOUS + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + PROJECT + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + PROJECT_MEMBER + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + REQUIRED_NAME + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + SCOPE + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + SELECT_MONTH + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + SERVICE_ACCOUNT + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + SERVICE_ACCOUNT_MANAGERS + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + SET + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + SET_BUDGET_ALERTS + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + SHOW_THE_LIST + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + SKIP_FOR_LATER + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + START_MONTH + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + STEP + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + STEP1_DESC + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + STEP2_DESCRIPTION + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + STEP3_DESCRIPTION + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + WORKSPACE_OWNERS + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + + + CREATE_BUDGET + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + DELETE_BUDGET + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + UPDATE_BUDGET + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + + + MAIN + + + ALL + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + AMOUNT_PAID + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + AMOUNT_SPENT + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + - CREATE_BUDGET + AMOUNT_USED false @@ -11770,7 +12767,7 @@ - DELETE_BUDGET + ASC false @@ -11791,7 +12788,7 @@ - UPDATE_BUDGET + BUDGET false @@ -11811,13 +12808,8 @@ - - - - MAIN - - ALL + BUDGETED false @@ -11838,7 +12830,49 @@ - AMOUNT_PAID + BUDGET_CYCLE + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + BUDGET_EXCEEDED + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + BUDGET_NAME false @@ -11859,7 +12893,28 @@ - AMOUNT_SPENT + BUDGET_STATUS + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + + + COST_TYPE false @@ -11880,7 +12935,7 @@ - AMOUNT_USED + CREATE false @@ -11901,7 +12956,7 @@ - ASC + CREATE_BUDGET false @@ -11922,7 +12977,7 @@ - BUDGET + CUSTOM false @@ -11943,7 +12998,7 @@ - BUDGETED + DATA_SOURCE false @@ -11964,7 +13019,7 @@ - BUDGET_CYCLE + DELETE false @@ -11976,16 +13031,16 @@ ja-JP - false + true ko-KR - false + true - BUDGET_NAME + DESC false @@ -12006,7 +13061,7 @@ - BUDGET_STATUS + EDIT false @@ -12018,16 +13073,16 @@ ja-JP - false + true ko-KR - false + true - COST_TYPE + EXCEEDED false @@ -12048,7 +13103,7 @@ - CREATE + EXCEEDED_BUDGET false @@ -12060,16 +13115,58 @@ ja-JP + false + + + ko-KR + false + + + + + FIXED_TERM + false + + + + + + en-US true + + ja-JP + false + ko-KR + false + + + + + HIDE_EXPIRED_BUDGETS + false + + + + + + en-US true + + ja-JP + false + + + ko-KR + false + - CREATE_BUDGET + LAST_12_MONTHS false @@ -12090,7 +13187,7 @@ - CUSTOM + LAST_3_MONTHS false @@ -12111,7 +13208,7 @@ - DATA_SOURCE + LAST_6_MONTHS false @@ -12132,7 +13229,7 @@ - DELETE + LAST_MONTH false @@ -12153,7 +13250,7 @@ - DESC + LAST_YEAR false @@ -12174,7 +13271,7 @@ - EDIT + MANAGED_BY_ADMIN false @@ -12195,7 +13292,7 @@ - EXCEEDED_BUDGET + MONTH false @@ -12207,16 +13304,16 @@ ja-JP - false + true ko-KR - false + true - FIXED_TERM + MONTHLY false @@ -12237,7 +13334,7 @@ - LAST_12_MONTHS + NO_BUDGET false @@ -12258,7 +13355,7 @@ - LAST_3_MONTHS + OVERSPENT false @@ -12279,7 +13376,7 @@ - LAST_6_MONTHS + OVER_EIGHTY_PERCENT_SPENT false @@ -12291,16 +13388,16 @@ ja-JP - true + false ko-KR - true + false - LAST_MONTH + OVER_FIFTY_PERCENT_SPENT false @@ -12312,16 +13409,16 @@ ja-JP - true + false ko-KR - true + false - LAST_YEAR + OVER_FOURTY_PERCENT_SPENT false @@ -12333,16 +13430,16 @@ ja-JP - true + false ko-KR - true + false - MANAGED_BY_ADMIN + OVER_NINTY_PERCENT_SPENT false @@ -12354,16 +13451,16 @@ ja-JP - true + false ko-KR - true + false - MONTH + OVER_SEVENTY_PERCENT_SPENT false @@ -12375,16 +13472,16 @@ ja-JP - true + false ko-KR - true + false - MONTHLY + OVER_SIXTY_PERCENT_SPENT false @@ -12405,7 +13502,7 @@ - NO_BUDGET + OVER_TEN_PERCENT_SPENT false @@ -12417,16 +13514,16 @@ ja-JP - true + false ko-KR - true + false - OVERSPENT + OVER_THIRTY_PERCENT_SPENT false @@ -12438,12 +13535,33 @@ ja-JP - true + false ko-KR + false + + + + + OVER_TWENTY_PERCENT_SPENT + false + + + + + + en-US true + + ja-JP + false + + + ko-KR + false + @@ -12480,11 +13598,11 @@ ja-JP - false + true ko-KR - false + true @@ -12509,6 +13627,27 @@ + + REMAINED + false + + + + + + en-US + true + + + ja-JP + false + + + ko-KR + false + + + SELECT_MONTH false diff --git a/packages/language-pack/en.json b/packages/language-pack/en.json index 33a4c5e2bb..b447aa4810 100644 --- a/packages/language-pack/en.json +++ b/packages/language-pack/en.json @@ -621,6 +621,49 @@ }, "CANCEL": "Cancel", "CONFIRM": "Confirm", + "CREATE": { + "ADD_THRESHOLD": "Add Threshold", + "APPLY_THE_SAME_AMOUNT": "Apply the same amount each month", + "BUDGET_AMOUNT": "Budget Amount", + "BUDGET_CYCLE": "Budget Cycle", + "BUDGET_CYCLE_DESCRIPTION": "First, set the start month and end month in the section above.", + "BUDGET_MANAGER": "Budget Manager", + "BUDGET_MANAGER_DESCRIPTION": "Budget managers will receive notifications if alerts are enabled", + "CANCEL": "Cancel", + "CONTINUE": "Continue", + "CURRENCY": "Currency", + "EDIT_BUDGET_MANAGER": "Edit Budget Manager", + "END_MONTH": "End Month", + "ENTER_MANUALLY": "Enter Manually", + "EXCEEDS_AMOUNT": "Exceeds amount", + "EXCEEDS_AMOUNT_DESCRIPTION": "Enter the threshold amount at which alerts will be sent to be the budget manager when your actual spend exceeds the set limit.", + "EXCHANGE_RATE_SOURCE": "Exchange Rate Source", + "FIXED_TERM": "Fixed term", + "INCRASE_BY_SPECIFIC_PERCENTAGE": "Increase by a specific % each month", + "INITIAL_AMOUNT": "Initial Amount", + "MONTHLY": "Monthly", + "MONTHLY_BUDGET_ALLOCATION": "Monthly Budget Allocation", + "MONTHLY_GROWTH_RATE": "Monthly Growth Rate", + "OTHERS": "Others", + "PREVIOUS": "Previous", + "PROJECT": "Project", + "PROJECT_MEMBER": "Project Member", + "REQUIRED_NAME": "Please enter name.", + "SCOPE": "Scope", + "SELECT_MONTH": "Select Month", + "SERVICE_ACCOUNT": "Service Account", + "SERVICE_ACCOUNT_MANAGERS": "Service Account Managers", + "SET": "Set", + "SET_BUDGET_ALERTS": "Set Budget Alerts", + "SHOW_THE_LIST": "Show the List", + "SKIP_FOR_LATER": "Skip for Later", + "START_MONTH": "Start Month", + "STEP": "Step", + "STEP1_DESC": "Set up a budget easily to track and manage your spending.", + "STEP2_DESCRIPTION": "Create a budget by setting the currency and budget cycle.", + "STEP3_DESCRIPTION": "Receive alerts when 'Actual Spend' exceeds the threshold.", + "WORKSPACE_OWNERS": "Workspace Owners" + }, "CREATE_BUDGET": "Create Budget", "DELETE_BUDGET": "Delete Budget", "UPDATE_BUDGET": "Update Budget" @@ -634,6 +677,7 @@ "BUDGET": "Budget", "BUDGETED": "Budgeted", "BUDGET_CYCLE": "Budget Cycle", + "BUDGET_EXCEEDED": "Budget Exceeded", "BUDGET_NAME": "Budget Name", "BUDGET_STATUS": "Budget Status", "COST_TYPE": "Cost Type", @@ -644,8 +688,10 @@ "DELETE": "Delete", "DESC": "Desc", "EDIT": "Edit", + "EXCEEDED": "exceeded", "EXCEEDED_BUDGET": "Exceeded Budget", "FIXED_TERM": "Fixed-term", + "HIDE_EXPIRED_BUDGETS": "Hide EXPIRED Budgets", "LAST_12_MONTHS": "Last 12 Months", "LAST_3_MONTHS": "Last 3 Months", "LAST_6_MONTHS": "Last 6 Months", @@ -656,9 +702,19 @@ "MONTHLY": "Monthly", "NO_BUDGET": "No Budget", "OVERSPENT": "Overspent", + "OVER_EIGHTY_PERCENT_SPENT": "Over 80% Spent", + "OVER_FIFTY_PERCENT_SPENT": "Over 50% Spent", + "OVER_FOURTY_PERCENT_SPENT": "Over 40% Spent", + "OVER_NINTY_PERCENT_SPENT": "Over 90% Spent", + "OVER_SEVENTY_PERCENT_SPENT": "Over 70% Spent", + "OVER_SIXTY_PERCENT_SPENT": "Over 60% Spent", + "OVER_TEN_PERCENT_SPENT": "Over 10% Spent", + "OVER_THIRTY_PERCENT_SPENT": "Over 30% Spent", + "OVER_TWENTY_PERCENT_SPENT": "Over 20% Spent", "PERIOD": "Period", "PROJECT": "Project", "PROVIDER": "Provider", + "REMAINED": "remained", "SELECT_MONTH": "Select Month", "SERVICE_ACCOUNT": "Service Account", "SINGLE_BUDGET": "Single Budget", diff --git a/packages/language-pack/ja.json b/packages/language-pack/ja.json index fda2512a10..27b84ed85c 100644 --- a/packages/language-pack/ja.json +++ b/packages/language-pack/ja.json @@ -621,6 +621,49 @@ }, "CANCEL": "取消", "CONFIRM": "確認", + "CREATE": { + "ADD_THRESHOLD": "", + "APPLY_THE_SAME_AMOUNT": "", + "BUDGET_AMOUNT": "", + "BUDGET_CYCLE": "", + "BUDGET_CYCLE_DESCRIPTION": "", + "BUDGET_MANAGER": "", + "BUDGET_MANAGER_DESCRIPTION": "", + "CANCEL": "取消", + "CONTINUE": "次へ", + "CURRENCY": "通貨", + "EDIT_BUDGET_MANAGER": "", + "END_MONTH": "終了月", + "ENTER_MANUALLY": "", + "EXCEEDS_AMOUNT": "", + "EXCEEDS_AMOUNT_DESCRIPTION": "", + "EXCHANGE_RATE_SOURCE": "為替基準", + "FIXED_TERM": "", + "INCRASE_BY_SPECIFIC_PERCENTAGE": "", + "INITIAL_AMOUNT": "", + "MONTHLY": "", + "MONTHLY_BUDGET_ALLOCATION": "", + "MONTHLY_GROWTH_RATE": "", + "OTHERS": "", + "PREVIOUS": "前へ", + "PROJECT": "プロジェクト", + "PROJECT_MEMBER": "", + "REQUIRED_NAME": "名前を入力してください", + "SCOPE": "スコープ", + "SELECT_MONTH": "月を選択", + "SERVICE_ACCOUNT": "サービスアカウント", + "SERVICE_ACCOUNT_MANAGERS": "", + "SET": "設定", + "SET_BUDGET_ALERTS": "", + "SHOW_THE_LIST": "", + "SKIP_FOR_LATER": "後で収集", + "START_MONTH": "開始月", + "STEP": "ステップ", + "STEP1_DESC": "", + "STEP2_DESCRIPTION": "", + "STEP3_DESCRIPTION": "", + "WORKSPACE_OWNERS": "" + }, "CREATE_BUDGET": "予算作成", "DELETE_BUDGET": "予算削除", "UPDATE_BUDGET": "予算の更新" @@ -634,6 +677,7 @@ "BUDGET": "予算", "BUDGETED": "予算", "BUDGET_CYCLE": "", + "BUDGET_EXCEEDED": "", "BUDGET_NAME": "予算名", "BUDGET_STATUS": "", "COST_TYPE": "コストタイプ", @@ -644,8 +688,10 @@ "DELETE": "削除", "DESC": "降順", "EDIT": "編集", + "EXCEEDED": "を超えています", "EXCEEDED_BUDGET": "", "FIXED_TERM": "", + "HIDE_EXPIRED_BUDGETS": "", "LAST_12_MONTHS": "過去12ヶ月間", "LAST_3_MONTHS": "過去3ヶ月間", "LAST_6_MONTHS": "過去6ヶ月間", @@ -656,9 +702,19 @@ "MONTHLY": "", "NO_BUDGET": "予算なし", "OVERSPENT": "予算超過", + "OVER_EIGHTY_PERCENT_SPENT": "", + "OVER_FIFTY_PERCENT_SPENT": "", + "OVER_FOURTY_PERCENT_SPENT": "", + "OVER_NINTY_PERCENT_SPENT": "", + "OVER_SEVENTY_PERCENT_SPENT": "", + "OVER_SIXTY_PERCENT_SPENT": "", + "OVER_TEN_PERCENT_SPENT": "", + "OVER_THIRTY_PERCENT_SPENT": "", + "OVER_TWENTY_PERCENT_SPENT": "", "PERIOD": "期間", - "PROJECT": "", + "PROJECT": "プロジェクト", "PROVIDER": "プロバイダー", + "REMAINED": "", "SELECT_MONTH": "月を選択", "SERVICE_ACCOUNT": "サービスアカウント", "SINGLE_BUDGET": "単一予算", diff --git a/packages/language-pack/ko.json b/packages/language-pack/ko.json index 5a10462084..c61899ca89 100644 --- a/packages/language-pack/ko.json +++ b/packages/language-pack/ko.json @@ -621,6 +621,49 @@ }, "CANCEL": "취소", "CONFIRM": "확인", + "CREATE": { + "ADD_THRESHOLD": "", + "APPLY_THE_SAME_AMOUNT": "", + "BUDGET_AMOUNT": "", + "BUDGET_CYCLE": "", + "BUDGET_CYCLE_DESCRIPTION": "", + "BUDGET_MANAGER": "", + "BUDGET_MANAGER_DESCRIPTION": "", + "CANCEL": "취소", + "CONTINUE": "계속하기", + "CURRENCY": "통화", + "EDIT_BUDGET_MANAGER": "", + "END_MONTH": "종료 월", + "ENTER_MANUALLY": "", + "EXCEEDS_AMOUNT": "", + "EXCEEDS_AMOUNT_DESCRIPTION": "", + "EXCHANGE_RATE_SOURCE": "환율 기준", + "FIXED_TERM": "", + "INCRASE_BY_SPECIFIC_PERCENTAGE": "", + "INITIAL_AMOUNT": "", + "MONTHLY": "", + "MONTHLY_BUDGET_ALLOCATION": "", + "MONTHLY_GROWTH_RATE": "", + "OTHERS": "", + "PREVIOUS": "뒤로가기", + "PROJECT": "프로젝트", + "PROJECT_MEMBER": "", + "REQUIRED_NAME": "이름을 입력하세요.", + "SCOPE": "범위", + "SELECT_MONTH": "월 선택", + "SERVICE_ACCOUNT": "서비스 어카운트", + "SERVICE_ACCOUNT_MANAGERS": "", + "SET": "설정", + "SET_BUDGET_ALERTS": "", + "SHOW_THE_LIST": "", + "SKIP_FOR_LATER": "다음에 진행", + "START_MONTH": "시작 월", + "STEP": "단계", + "STEP1_DESC": "", + "STEP2_DESCRIPTION": "", + "STEP3_DESCRIPTION": "", + "WORKSPACE_OWNERS": "" + }, "CREATE_BUDGET": "예산 생성", "DELETE_BUDGET": "예산 삭제", "UPDATE_BUDGET": "예산 수정 " @@ -634,6 +677,7 @@ "BUDGET": "예산", "BUDGETED": "책정된 예산", "BUDGET_CYCLE": "", + "BUDGET_EXCEEDED": "", "BUDGET_NAME": "예산명", "BUDGET_STATUS": "", "COST_TYPE": "비용 발생 기준", @@ -644,8 +688,10 @@ "DELETE": "삭제", "DESC": "내림차순", "EDIT": "편집", + "EXCEEDED": "초과됨", "EXCEEDED_BUDGET": "", "FIXED_TERM": "", + "HIDE_EXPIRED_BUDGETS": "", "LAST_12_MONTHS": "지난 12개월", "LAST_3_MONTHS": "지난 3개월", "LAST_6_MONTHS": "지난 6개월", @@ -656,9 +702,19 @@ "MONTHLY": "", "NO_BUDGET": "예산 없음", "OVERSPENT": "예산초과", + "OVER_EIGHTY_PERCENT_SPENT": "", + "OVER_FIFTY_PERCENT_SPENT": "", + "OVER_FOURTY_PERCENT_SPENT": "", + "OVER_NINTY_PERCENT_SPENT": "", + "OVER_SEVENTY_PERCENT_SPENT": "", + "OVER_SIXTY_PERCENT_SPENT": "", + "OVER_TEN_PERCENT_SPENT": "", + "OVER_THIRTY_PERCENT_SPENT": "", + "OVER_TWENTY_PERCENT_SPENT": "", "PERIOD": "기준 기간", - "PROJECT": "", + "PROJECT": "프로젝트", "PROVIDER": "프로바이더", + "REMAINED": "", "SELECT_MONTH": "월 선택", "SERVICE_ACCOUNT": "서비스 어카운트", "SINGLE_BUDGET": "단일 예산", From 3b070ccb25da44367d9b09e1047a193eff742f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=8A=B9=EC=97=B0?= <165753731+seungyeoneeee@users.noreply.github.com> Date: Sun, 30 Mar 2025 02:58:33 +0900 Subject: [PATCH 004/233] Feat: update budget create page with reactivity chart (#5728) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: update budget create page with reactivity chart Signed-off-by: 이승연 * fix: fix lint error Signed-off-by: 이승연 --------- Signed-off-by: 이승연 --- .../cost-analysis/budget/schema/type.ts | 2 +- .../modules/user/UserSelectDropdown.vue | 3 + .../components/BudgetCreateManagerSelect.vue | 92 +++++++--- .../components/BudgetCreateScopeSelect.vue | 38 +++-- .../components/BudgetCreateStep1.vue | 87 ++++++++-- .../components/BudgetCreateStep2.vue | 111 +++++++++--- .../components/BudgetCreateStep3.vue | 53 ++++-- .../components/BudgetDeleteCheckModal.vue | 33 ++++ .../cost-explorer/pages/BudgetCreatePage.vue | 22 ++- .../BudgetLastThreeMonthCostTrendBarChart.vue | 160 +++++++++++++++++- .../stores/budget-create-page-store.ts | 57 +++++-- 11 files changed, 537 insertions(+), 121 deletions(-) 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 e19d513b31..e2f081d2db 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,4 +1,4 @@ -export type BudgetTimeUnit = 'MONTHLY' | 'FIXED_TERM'; +export type BudgetTimeUnit = 'MONTHLY' | 'TOTAL'; type BudgetNotificationUnit = 'PERCENT'; type BudgetNotificationState = 'ENABLED' | 'DISABLED'; diff --git a/apps/web/src/common/modules/user/UserSelectDropdown.vue b/apps/web/src/common/modules/user/UserSelectDropdown.vue index 5770c65970..f35bd7d03a 100644 --- a/apps/web/src/common/modules/user/UserSelectDropdown.vue +++ b/apps/web/src/common/modules/user/UserSelectDropdown.vue @@ -52,6 +52,7 @@ const props = withDefaults(defineProps<{ showCategoryTitle?: boolean; placeholder?: string; excludedSelectedIds?: string[]; + size?: 'sm'|'md'; }>(), { selectedId: undefined, selectedIds: undefined, @@ -71,6 +72,7 @@ const props = withDefaults(defineProps<{ showCategoryTitle: true, placeholder: 'Select', excludedSelectedIds: undefined, + size: 'md', }); const emit = defineEmits<{(event: 'update:selected-id', value?: string): void; @@ -283,6 +285,7 @@ watch([() => props.selectedId, () => props.selectedIds], ([newUserId, newUserIds :style-type="props.styleType" :placeholder="props.placeholder" :block="props.block" + :size="props.size" @update:selected="handleUpdateSelectedUserItems" >