Skip to content

Commit

Permalink
fix: add unified-cost option to group by list
Browse files Browse the repository at this point in the history
Signed-off-by: sulmo <[email protected]>
  • Loading branch information
sulmoJ committed Nov 15, 2024
1 parent 297a970 commit 7107b86
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ export const useCostAnalysisPageStore = defineStore('page-cost-analysis', () =>
const adminManagedGroupByItems = state.isAllWorkspaceSelected ? groupByItemValueList : workspaceRemovedGroupByItems;

const _managedGroupByItems = _state.isAdminMode ? adminManagedGroupByItems : workspaceRemovedGroupByItems;
return [..._managedGroupByItems, ..._additionalInfoGroupBy];
return getters.isUnifiedCost ? _managedGroupByItems : [..._managedGroupByItems, ..._additionalInfoGroupBy];
}),
metadataAdditionalInfoItems: computed<GroupByItem[]>(() => {
if (!costQuerySetState.selectedDataSourceId) return [];
const targetDataSource = allReferenceStore.getters.costDataSource[costQuerySetState.selectedDataSourceId ?? ''];
if (!targetDataSource) return [];
if (!targetDataSource || getters.isUnifiedCost) return [];
const metadataAdditionalInfo = targetDataSource?.data?.plugin_info?.metadata?.additional_info;
if (!metadataAdditionalInfo) return [];
return Object.entries(metadataAdditionalInfo)
Expand Down

0 comments on commit 7107b86

Please sign in to comment.