Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
13b8386
chore: merge master into develop after 2.0.dev361 version tagging
admin-cloudforet May 21, 2025
cd267e4
fix: fixed time bug
skdud4659 May 21, 2025
4a3c1b6
Merge pull request #5870 from skdud4659/feature/req
skdud4659 May 21, 2025
7d233c1
feat: add filed at service account attached general accounts table
skdud4659 May 22, 2025
6997ff3
Merge pull request #5873 from skdud4659/feature/bug
skdud4659 May 22, 2025
140d19f
chore: merge master into develop after 2.0.dev362 version tagging
admin-cloudforet May 26, 2025
b7143e7
fix: status bar visibility bug fix
skdud4659 May 28, 2025
3d16634
fix: bug fix for missing domain
skdud4659 May 28, 2025
a3b0c05
fix: apply minor feedback (#5891)
skdud4659 May 29, 2025
b2e16aa
chore: remove subpages and display all components in the parent page …
yuda110 Apr 30, 2025
ec05dd9
chore: change structure of admin advanced settings page (#5834)
yuda110 May 8, 2025
cd561b9
refactor: use VueQuery rather than SpaceConnector (#5835)
yuda110 May 9, 2025
9a16afe
chore: markup "cost report configuration" section (#5838)
yuda110 May 9, 2025
c8997ed
feat: add 'Cost Report Adjustments' overlay (#5842)
yuda110 May 9, 2025
d5be600
feat: update model of report adjustment (#5843)
yuda110 May 12, 2025
84185ee
chore: markup adjustment form (#5844)
yuda110 May 12, 2025
213460e
refactor: move mutation logic from hook to page (#5846)
yuda110 May 13, 2025
16f6847
feat: update adjustment model (#5849)
yuda110 May 15, 2025
bf31ed3
feat: init adjustment data on overlay open & add advanced-settings-p…
yuda110 May 15, 2025
af5acb8
refactor: use vuequery rather than api list (#5856)
yuda110 May 16, 2025
e3be338
feat: implement confirmation date for report (#5861)
yuda110 May 19, 2025
bff281e
feat: add 'reissue' button (#5862)
yuda110 May 19, 2025
0483376
feat: set fields in adjustment form (#5864)
yuda110 May 20, 2025
fc6ea89
feat: add isAllWorkspaceSelected to policy data (#5869)
yuda110 May 21, 2025
a17860a
feat: apply CRUD for Adjustment Policy (#5872)
yuda110 May 22, 2025
b418567
feat: create/update/delete/change-order adjustment items (#5874)
yuda110 May 22, 2025
e904ea1
fix: fix promise bug when save adjustments (#5875)
yuda110 May 22, 2025
e8a555b
feat: update cost report detail page (#5882)
yuda110 May 26, 2025
f027558
feat: apply adjustment to report detail page (#5887)
yuda110 May 27, 2025
439e1aa
feat: set sort(created_at/asc) to cost-report-config/list (#5889)
yuda110 May 28, 2025
4d8c847
refactor: refactor code (#5890)
yuda110 May 28, 2025
e8c4503
feat: update provider section (#5892)
yuda110 May 28, 2025
16e0b26
fix: fix adjustment addition error (#5893)
yuda110 May 29, 2025
adc2746
feat: add 'Sync exchange rate' button (#5894)
yuda110 May 29, 2025
0398546
feat(scoped-infinite-query): create useScopedInfiniteQuery composable
piggggggggy May 29, 2025
a0b9a2c
fix(service-query-key): add pagination flag to useServiceQueryKey com…
piggggggggy May 29, 2025
32909b0
feat(use-pagination-query): create usePaginationQuery composable for …
piggggggggy May 29, 2025
6f04e62
chore: add pagination segment
piggggggggy May 29, 2025
6aaf9e0
feat(use-pagination-query): create `useScopedPaginationQuery` composa…
piggggggggy May 30, 2025
b12470c
Merge pull request #5898 from cloudforet-io/feature-cost-report
yuda110 May 30, 2025
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
16 changes: 16 additions & 0 deletions apps/web/src/api-clients/_common/constants/api-doc-constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,22 @@ export const API_DOC = {
'analyze',
'list',
],
'report-adjustment-policy': [
'create',
'delete',
'get',
'list',
'update',
'change-order',
],
'report-adjustment': [
'create',
'delete',
'get',
'list',
'update',
'change-order',
],
'data-source': [
'get',
'list',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@ import { SpaceConnector } from '@cloudforet/core-lib/space-connector';

import type { ListResponse } from '@/api-clients/_common/schema/api-verbs/list';
import type { CostReportConfigListParameters } from '@/api-clients/cost-analysis/cost-report-config/schema/api-verbs/list';
import type { CostReportConfigRunParameters } from '@/api-clients/cost-analysis/cost-report-config/schema/api-verbs/run';
import type { CostReportConfigUpdateParameters } from '@/api-clients/cost-analysis/cost-report-config/schema/api-verbs/update';
import type { CostReportConfigModel } from '@/api-clients/cost-analysis/cost-report-config/schema/model';


interface UseCostReportConfigApiReturn {
costReportConfigAPI: {
update: (params: CostReportConfigUpdateParameters) => Promise<CostReportConfigModel>;
list: (params: CostReportConfigListParameters) => Promise<ListResponse<CostReportConfigModel>>;
run: (params: CostReportConfigRunParameters) => Promise<void>;
}
}

export const useCostReportConfigApi = (): UseCostReportConfigApiReturn => {
const actions = {
update: SpaceConnector.clientV2.costAnalysis.costReportConfig.update<CostReportConfigUpdateParameters, CostReportConfigModel>,
list: SpaceConnector.clientV2.costAnalysis.costReportConfig.list<CostReportConfigListParameters, ListResponse<CostReportConfigModel>>,
run: SpaceConnector.clientV2.costAnalysis.costReportConfig.run<CostReportConfigRunParameters, void>,
};

return {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import type { Query } from '@cloudforet/core-lib/space-connector/type';

import type { CostReportConfigStatus } from '@/api-clients/cost-analysis/cost-report-config/schema/type';

export interface CostReportConfigListParameters {
query?: Query;
cost_report_config_id?: string;
state?: CostReportConfigStatus;
scope?: 'WORKSPACE'|'PROJECT';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export interface CostReportConfigRunParameters {
cost_report_config_id: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ export interface CostReportConfigUpdateParameters {
state: string;
data_sources: string[];
};
adjustment_options?: {
enabled: boolean;
period?: number;
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ export interface CostReportConfigModel {
data_sources: string[];
};
language?: LanguageCode;
scope: 'WORKSPACE'|'PROJECT';
adjustment_options?: {
enabled: boolean;
period: number;
};
domain_id: string;
created_at: string;
updated_at: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ export interface CostReportDataModel {
workspace_id: string;
domain_id: string;
created_at: string;
is_adjusted: boolean;
region_code: string;
region_key: string;
report_adjustment_policy_id: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import type { CostReportStatus } from '@/api-clients/cost-analysis/cost-report/s

export interface CostReportListParameters {
query?: Query;
cost_report_config_id?: string;
cost_report_id?: string;
status?: CostReportStatus;
issue_date?: string;
workspace_name?: string;
name?: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ export interface CostReportModel {
issue_date: string;
report_year: string;
report_month: string;
workspace_name: string;
name: string;
cost_report_config_id: string;
workspace_id: string;
project_id: string;
service_account_id: string;
is_adjusted: boolean;
domain_id: string;
bank_name: string;
currency_date: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export type CostReportStatus = 'IN_PROGRESS' | 'SUCCESS';
export type CostReportStatus = 'IN_PROGRESS' | 'ADJUSTING' | 'DONE';
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { SpaceConnector } from '@cloudforet/core-lib/space-connector';

import type { ListResponse } from '@/api-clients/_common/schema/api-verbs/list';
import type { ReportAdjustmentPolicyChangeOrderParameters } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/change-order';
import type { ReportAdjustmentPolicyCreateParameters } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/create';
import type { ReportAdjustmentPolicyDeleteParameters } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/delete';
import type { ReportAdjustmentPolicyGetParameters } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/get';
import type { ReportAdjustmentPolicyListParameters } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/list';
import type { ReportAdjustmentPolicySyncCurrencyParameters } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/sync-currency';
import type { ReportAdjustmentPolicyUpdateParameters } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/update';
import type { ReportAdjustmentPolicyModel } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/model';



interface UseReportAdjustmentPolicyApiReturn {
reportAdjustmentPolicyAPI: {
update: (params: ReportAdjustmentPolicyUpdateParameters) => Promise<ReportAdjustmentPolicyModel>;
list: (params: ReportAdjustmentPolicyListParameters) => Promise<ListResponse<ReportAdjustmentPolicyModel>>;
create: (params: ReportAdjustmentPolicyCreateParameters) => Promise<ReportAdjustmentPolicyModel>;
delete: (params: ReportAdjustmentPolicyDeleteParameters) => Promise<ReportAdjustmentPolicyModel>;
changeOrder: (params: ReportAdjustmentPolicyChangeOrderParameters) => Promise<ReportAdjustmentPolicyModel>;
get: (params: ReportAdjustmentPolicyGetParameters) => Promise<ReportAdjustmentPolicyModel>;
syncCurrency: (params: ReportAdjustmentPolicySyncCurrencyParameters) => Promise<ReportAdjustmentPolicyModel>;
}
}

export const useReportAdjustmentPolicyApi = (): UseReportAdjustmentPolicyApiReturn => {
const actions = {
update: SpaceConnector.clientV2.costAnalysis.reportAdjustmentPolicy.update<ReportAdjustmentPolicyUpdateParameters, ReportAdjustmentPolicyModel>,
list: SpaceConnector.clientV2.costAnalysis.reportAdjustmentPolicy.list<ReportAdjustmentPolicyListParameters, ListResponse<ReportAdjustmentPolicyModel>>,
create: SpaceConnector.clientV2.costAnalysis.reportAdjustmentPolicy.create<ReportAdjustmentPolicyCreateParameters, ReportAdjustmentPolicyModel>,
delete: SpaceConnector.clientV2.costAnalysis.reportAdjustmentPolicy.delete<ReportAdjustmentPolicyDeleteParameters, ReportAdjustmentPolicyModel>,
changeOrder: SpaceConnector.clientV2.costAnalysis.reportAdjustmentPolicy.changeOrder<ReportAdjustmentPolicyChangeOrderParameters, ReportAdjustmentPolicyModel>,
get: SpaceConnector.clientV2.costAnalysis.reportAdjustmentPolicy.get<ReportAdjustmentPolicyGetParameters, ReportAdjustmentPolicyModel>,
syncCurrency: SpaceConnector.clientV2.costAnalysis.reportAdjustmentPolicy.syncCurrency<ReportAdjustmentPolicySyncCurrencyParameters, ReportAdjustmentPolicyModel>,
};

return {
reportAdjustmentPolicyAPI: actions,
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface ReportAdjustmentPolicyChangeOrderParameters {
report_adjustment_policy_id: string;
order: number;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { Tags } from '@/api-clients/_common/schema/model';
import type { ReportAdjustmentPolicyFilter } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/type';


export interface ReportAdjustmentPolicyCreateParameters {
cost_report_config_id: string;
order?: number;
description?: string;
tags?: Tags;
policy_filter: ReportAdjustmentPolicyFilter;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export interface ReportAdjustmentPolicyDeleteParameters {
report_adjustment_policy_id: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export interface ReportAdjustmentPolicyGetParameters {
report_adjustment_policy_id: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import type { Query } from '@cloudforet/core-lib/space-connector/type';


export interface ReportAdjustmentPolicyListParameters {
query?: Query;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export interface ReportAdjustmentPolicySyncCurrencyParameters {
report_adjustment_policy_id: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { Tags } from '@/api-clients/_common/schema/model';
import type { ReportAdjustmentPolicyFilter } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/type';

export interface ReportAdjustmentPolicyUpdateParameters {
report_adjustment_policy_id: string;
description?: string;
policy_filter?: ReportAdjustmentPolicyFilter;
tags?: Tags;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { Tags } from '@/api-clients/_common/schema/model';
import type { ReportAdjustmentPolicyFilter, ReportAdjustmentPolicyScope } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/type';

export interface ReportAdjustmentPolicyModel {
report_adjustment_policy_id: string;
description: string;
scope: ReportAdjustmentPolicyScope;
order: number;
adjustments: string[];
tags: Tags;
policy_filter: ReportAdjustmentPolicyFilter;
cost_report_config_id: string;
domain_id: string;
workspace_id: string;
project_id: string;
created_at: string;
updated_at: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export type ReportAdjustmentPolicyScope = 'WORKSPACE'|'PROJECT'|'SERVICE_ACCOUNT';

export type ReportAdjustmentPolicyFilter = {
workspace_ids?: string[];
project_ids?: string[];
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { SpaceConnector } from '@cloudforet/core-lib/space-connector';

import type { ListResponse } from '@/api-clients/_common/schema/api-verbs/list';
import type { ReportAdjustmentChangeOrderParameters } from '@/api-clients/cost-analysis/report-adjustment/schema/api-verbs/change-order';
import type { ReportAdjustmentCreateParameters } from '@/api-clients/cost-analysis/report-adjustment/schema/api-verbs/create';
import type { ReportAdjustmentDeleteParameters } from '@/api-clients/cost-analysis/report-adjustment/schema/api-verbs/delete';
import type { ReportAdjustmentGetParameters } from '@/api-clients/cost-analysis/report-adjustment/schema/api-verbs/get';
import type { ReportAdjustmentListParameters } from '@/api-clients/cost-analysis/report-adjustment/schema/api-verbs/list';
import type { ReportAdjustmentUpdateParameters } from '@/api-clients/cost-analysis/report-adjustment/schema/api-verbs/update';
import type { ReportAdjustmentModel } from '@/api-clients/cost-analysis/report-adjustment/schema/model';

interface UseReportAdjustmentApiReturn {
reportAdjustmentAPI: {
update: (params: ReportAdjustmentUpdateParameters) => Promise<ReportAdjustmentModel>;
list: (params: ReportAdjustmentListParameters) => Promise<ListResponse<ReportAdjustmentModel>>;
create: (params: ReportAdjustmentCreateParameters) => Promise<ReportAdjustmentModel>;
delete: (params: ReportAdjustmentDeleteParameters) => Promise<ReportAdjustmentModel>;
changeOrder: (params: ReportAdjustmentChangeOrderParameters) => Promise<ReportAdjustmentModel>;
get: (params: ReportAdjustmentGetParameters) => Promise<ReportAdjustmentModel>;
}
}

export const useReportAdjustmentApi = (): UseReportAdjustmentApiReturn => {
const actions = {
update: SpaceConnector.clientV2.costAnalysis.reportAdjustment.update<ReportAdjustmentUpdateParameters, ReportAdjustmentModel>,
list: SpaceConnector.clientV2.costAnalysis.reportAdjustment.list<ReportAdjustmentListParameters, ListResponse<ReportAdjustmentModel>>,
create: SpaceConnector.clientV2.costAnalysis.reportAdjustment.create<ReportAdjustmentCreateParameters, ReportAdjustmentModel>,
delete: SpaceConnector.clientV2.costAnalysis.reportAdjustment.delete<ReportAdjustmentDeleteParameters, ReportAdjustmentModel>,
changeOrder: SpaceConnector.clientV2.costAnalysis.reportAdjustment.changeOrder<ReportAdjustmentChangeOrderParameters, ReportAdjustmentModel>,
get: SpaceConnector.clientV2.costAnalysis.reportAdjustment.get<ReportAdjustmentGetParameters, ReportAdjustmentModel>,
};

return {
reportAdjustmentAPI: actions,
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface ReportAdjustmentChangeOrderParameters {
report_adjustment_id: string;
order: number;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { ReportAdjustmentUnit } from '@/api-clients/cost-analysis/report-adjustment/schema/type';


export interface ReportAdjustmentCreateParameters {
name: string;
unit: ReportAdjustmentUnit;
value: number;
report_adjustment_policy_id: string;
provider: string;
description?: string;
currency?: string;
order?: number;
adjustment_filter?: Record<string, string>;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export interface ReportAdjustmentDeleteParameters {
report_adjustment_id: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export interface ReportAdjustmentGetParameters {
report_adjustment_id: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { Query } from '@cloudforet/core-lib/space-connector/type';


export interface ReportAdjustmentListParameters {
query?: Query;
provider?: string;
report_adjustment_id?: string;
report_adjustment_policy_id?: string;
cost_report_config_id?: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { ReportAdjustmentUnit } from '@/api-clients/cost-analysis/report-adjustment/schema/type';


export interface ReportAdjustmentUpdateParameters {
report_adjustment_id: string;
name?: string;
unit?: ReportAdjustmentUnit;
value?: number;
description?: string;
provider?: string;
adjustment_filter?: Record<string, string>;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { ReportAdjustmentUnit } from '@/api-clients/cost-analysis/report-adjustment/schema/type';

export interface ReportAdjustmentModel {
report_adjustment_id: string;
name: string;
unit: ReportAdjustmentUnit;
value: number;
description: string;
provider: string;
currency: string;
order: number;
adjustment_filter: Record<string, string>;
cost_report_config_id: string;
report_adjustment_policy_id: string;
domain_id: string;
workspace_id: string;
project_id: string;
created_at: string;
updated_at: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type ReportAdjustmentUnit = 'FIXED' | 'PERCENT';
Loading
Loading