Skip to content

Commit

Permalink
fix: edit file, name, etc.. (metirc explorer -> asset analysis)
Browse files Browse the repository at this point in the history
Signed-off-by: samuel.park <[email protected]>
  • Loading branch information
piggggggggy committed May 8, 2024
1 parent 70f65b5 commit b6decf3
Show file tree
Hide file tree
Showing 39 changed files with 544 additions and 544 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const state = reactive({
if (state.favoriteMetricItems.length) {
if (results.length !== 0) results.push({ type: 'divider' });
results.push({
name: 'title', label: i18n.t('MENU.ASSET_INVENTORY_METRIC_EXPLORER'), type: 'header', itemType: FAVORITE_TYPE.METRIC,
name: 'title', label: i18n.t('MENU.ASSET_INVENTORY_ASSET_ANALYSIS'), type: 'header', itemType: FAVORITE_TYPE.METRIC,
});
results.push(...state.favoriteMetricItems.slice(0, FAVORITE_LIMIT));
}
Expand Down Expand Up @@ -208,7 +208,7 @@ const state = reactive({
) : [];
}),
favoriteMetricItems: computed<FavoriteItem[]>(() => {
const isUserAccessible = isUserAccessibleToMenu(MENU_ID.METRIC_EXPLORER, store.getters['user/pageAccessPermissionList']);
const isUserAccessible = isUserAccessibleToMenu(MENU_ID.ASSET_ANALYSIS, store.getters['user/pageAccessPermissionList']);
if (!isUserAccessible) return [];
const favoriteMetricItems = convertMetricConfigToReferenceData(favoriteGetters.metricItems ?? [], storeState.metrics);
const favoriteMetricExampleItems = convertMetricExampleConfigToReferenceData(favoriteGetters.metricExampleItems ?? [], storeState.metricExamples);
Expand Down Expand Up @@ -297,7 +297,7 @@ const handleSelect = (item: FavoriteMenuItem) => {
}).catch(() => {});
} else if (item.itemType === FAVORITE_TYPE.METRIC) {
router.push({
name: ASSET_INVENTORY_ROUTE.METRIC_EXPLORER.DETAIL._NAME,
name: ASSET_INVENTORY_ROUTE.ASSET_ANALYSIS.DETAIL._NAME,
params: {
metricId: item.name || '',
},
Expand All @@ -306,7 +306,7 @@ const handleSelect = (item: FavoriteMenuItem) => {
const metricId = storeState.metricExamples.find((example) => example.example_id === item.name)?.metric_id;
if (!metricId) return;
router.push({
name: ASSET_INVENTORY_ROUTE.METRIC_EXPLORER.DETAIL.EXAMPLE._NAME,
name: ASSET_INVENTORY_ROUTE.ASSET_ANALYSIS.DETAIL.EXAMPLE._NAME,
params: {
metricId,
metricExampleId: item.name || '',
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/common/modules/navigations/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const RECENT_TYPE = {
CLOUD_SERVICE: 'CLOUD_SERVICE',
CLOUD_SERVICE_TYPE: 'CLOUD_SERVICE_TYPE',
COST_ANALYSIS: 'COST_ANALYSIS',
METRIC_EXPLORER: 'METRIC_EXPLORER',
ASSET_ANALYSIS: 'ASSET_ANALYSIS',
} as const;
export type RecentType = typeof RECENT_TYPE[keyof typeof RECENT_TYPE];
export const recentNSearchTabMap = {
Expand All @@ -22,7 +22,7 @@ export const recentNSearchTabMap = {
cloudService: RECENT_TYPE.CLOUD_SERVICE,
cloudServiceType: RECENT_TYPE.CLOUD_SERVICE_TYPE,
costAnalysis: RECENT_TYPE.COST_ANALYSIS,
metricExplorer: RECENT_TYPE.METRIC_EXPLORER,
assetAnalysis: RECENT_TYPE.ASSET_ANALYSIS,
} as const;

export type RecentItem = UserConfigModel<{
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/lib/access-control/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const WORKSPACE_OWNER_DEFAULT_PERMISSIONS: MenuId[] = [
MENU_ID.ASSET_INVENTORY,
MENU_ID.CLOUD_SERVICE,
MENU_ID.SERVER,
MENU_ID.METRIC_EXPLORER,
MENU_ID.ASSET_ANALYSIS,
MENU_ID.SECURITY,
MENU_ID.COLLECTOR,
MENU_ID.SERVICE_ACCOUNT,
Expand Down Expand Up @@ -48,7 +48,7 @@ export const WORKSPACE_MEMBER_DEFAULT_PERMISSIONS: MenuId[] = [
MENU_ID.ASSET_INVENTORY,
MENU_ID.CLOUD_SERVICE,
MENU_ID.SERVER,
MENU_ID.METRIC_EXPLORER,
MENU_ID.ASSET_ANALYSIS,
MENU_ID.SECURITY,
MENU_ID.SERVICE_ACCOUNT,
MENU_ID.COST_EXPLORER,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/lib/excel-export/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ export const FILE_NAME_PREFIX = Object.freeze({
budget: 'budget',
policy: 'policy',
cloudServiceLog: 'cloud_service_log',
metricExplorer: 'metric_explorer',
assetAnalysis: 'asset_analysis',
});
// export type FILE_NAME_PREFIX = typeof FILE_NAME_PREFIX[keyof typeof FILE_NAME_PREFIX]
4 changes: 2 additions & 2 deletions apps/web/src/lib/helper/router-recent-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ export const getRecentConfig = (to: Route): RecentConfig | undefined => {
return { itemType: RECENT_TYPE.COST_ANALYSIS, workspaceId, itemId: costQuerySetId };
}

if (to.name === ASSET_INVENTORY_ROUTE.METRIC_EXPLORER.DETAIL._NAME) {
if (to.name === ASSET_INVENTORY_ROUTE.ASSET_ANALYSIS.DETAIL._NAME) {
const metricId = to?.params?.metricId;
if (!metricId) return undefined;
return { itemType: RECENT_TYPE.METRIC_EXPLORER, workspaceId, itemId: metricId };
return { itemType: RECENT_TYPE.ASSET_ANALYSIS, workspaceId, itemId: metricId };
}

/* MENU */
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/lib/menu/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const MENU_ID = Object.freeze({
NOTIFICATIONS: 'notifications',
INFO: 'info',
NOTICE: 'notice',
METRIC_EXPLORER: 'metric_explorer',
ASSET_ANALYSIS: 'asset_analysis',
} as const);

export type MenuId = typeof MENU_ID[keyof typeof MENU_ID];
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/lib/menu/menu-architecture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const MENU_LIST: Menu[] = [
{ id: MENU_ID.CLOUD_SERVICE, needPermissionByRole: true },
{ id: MENU_ID.SERVER, needPermissionByRole: true },
{ id: MENU_ID.SECURITY, needPermissionByRole: true },
{ id: MENU_ID.METRIC_EXPLORER, needPermissionByRole: true },
{ id: MENU_ID.ASSET_ANALYSIS, needPermissionByRole: true },
{ id: MENU_ID.COLLECTOR, needPermissionByRole: true },
{ id: MENU_ID.SERVICE_ACCOUNT, needPermissionByRole: true },
],
Expand Down
8 changes: 4 additions & 4 deletions apps/web/src/lib/menu/menu-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ export const MENU_INFO_MAP: Record<MenuId, MenuInfo> = Object.freeze({
translationId: 'MENU.INFO_NOTICE',
icon: 'ic_gnb_bell',
},
[MENU_ID.METRIC_EXPLORER]: {
menuId: MENU_ID.METRIC_EXPLORER,
routeName: ASSET_INVENTORY_ROUTE.METRIC_EXPLORER._NAME,
translationId: 'MENU.ASSET_INVENTORY_METRIC_EXPLORER',
[MENU_ID.ASSET_ANALYSIS]: {
menuId: MENU_ID.ASSET_ANALYSIS,
routeName: ASSET_INVENTORY_ROUTE.ASSET_ANALYSIS._NAME,
translationId: 'MENU.ASSET_INVENTORY_ASSET_ANALYSIS',
highlightTag: 'new',
icon: 'ic_service_metric-explorer',
},
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/services/asset-inventory/AssetInventoryLSB.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { clone } from 'lodash';
import { MENU_ID } from '@/lib/menu/config.js';
import AssetAnalysisLSB from '@/services/asset-inventory/components/AssetAnalysisLSB.vue';
import CloudServiceLSB from '@/services/asset-inventory/components/CloudServiceLSB.vue';
import MetricExplorerLSB from '@/services/asset-inventory/components/MetricExplorerLSB.vue';
import SecurityLSB from '@/services/asset-inventory/components/SecurityLSB.vue';
const route = useRoute();
Expand All @@ -24,7 +24,7 @@ const state = reactive({
<template>
<fragment>
<cloud-service-l-s-b v-if="state.menuId === MENU_ID.CLOUD_SERVICE" />
<metric-explorer-l-s-b v-else-if="state.menuId === MENU_ID.METRIC_EXPLORER" />
<asset-analysis-l-s-b v-else-if="state.menuId === MENU_ID.ASSET_ANALYSIS" />
<security-l-s-b v-else-if="state.menuId === MENU_ID.SECURITY" />
</fragment>
</template>
Loading

0 comments on commit b6decf3

Please sign in to comment.