From 71cb74276874b750d4862ebb9b9b75886be49019 Mon Sep 17 00:00:00 2001 From: yuda Date: Wed, 8 May 2024 16:12:58 +0900 Subject: [PATCH] Revert "refactor: move `widgets` directory (#3707)" This reverts commit 89c1b55094695f76f627d7042eb9d5be553ac7a3. --- .../_constants/widget-components-constant.ts | 63 -------------- .../_constants/widget-config-list-constant.ts | 87 ------------------- .../components/DashboardCustomizeSidebar.vue | 4 +- .../DashboardVariablesMoreButton.vue | 2 +- .../components/DashboardWidgetAddModal.vue | 2 +- .../DashboardWidgetAddModalDefaultTab.vue | 4 +- .../components/DashboardWidgetContainer.vue | 8 +- .../components/DashboardWidgetEditModal.vue | 4 +- .../DashboardWidgetOptionDropdown.vue | 11 ++- .../components/WidgetFullModeModal.vue | 9 +- .../components/WidgetFullModeModalSidebar.vue | 4 +- .../use-reformed-widget-info-list.ts | 8 +- .../helpers/dashboard-template-generator.ts | 2 +- .../helpers/dashboard-widget-info-helper.ts | 6 +- .../dashboards/helpers/widget-theme-helper.ts | 4 +- .../widget-container-config.ts | 2 +- .../stores/dashboard-detail-info-store.ts | 5 +- .../dashboards/stores/widget-form-store.ts | 17 ++-- .../services/dashboards/types/widget-type.ts | 0 .../BaseCountOfFindingsWidget.vue | 17 ++-- .../base-count-of-findings/widget-config.ts | 0 .../_base-widgets/base-pie/BasePieWidget.vue | 32 +++---- .../_base-widgets/base-pie/widget-config.ts | 0 .../base-trend/BaseTrendWidget.vue | 32 +++---- .../_base-widgets/base-trend/widget-config.ts | 0 .../_components/WidgetChartNoDataOverlay.vue | 0 .../widgets/_components/WidgetDataTable.vue | 9 +- .../widgets/_components/WidgetFrame.vue | 2 +- .../_composables/use-widget-color-set.ts | 7 +- .../_composables/use-widget-lifecycle.ts | 7 +- .../_composables/use-widget-pagination.ts | 2 +- .../use-widget/merge-base-widget-state.ts | 10 +-- .../use-widget/use-base-widget-state.ts | 6 +- .../use-widget/use-widget-console-filters.ts | 6 +- .../use-widget/use-widget-date-range.ts | 6 +- .../use-widget/use-widget-frame.ts | 8 +- .../use-widget/use-widget-location.ts | 8 +- .../_composables/use-widget/use-widget.ts | 14 +-- .../widgets/_constants/compliance-constant.ts | 0 .../managed-widget-options-schema.ts | 0 .../_constants/widget-components-constant.ts | 63 ++++++++++++++ .../_constants/widget-config-list-constant.ts | 87 +++++++++++++++++++ .../widgets/_constants/widget-constant.ts | 0 .../widget-chart-data-helper.test.ts | 2 +- .../__tests__/widget-config-helper.test.ts | 6 +- .../widget-inherit-options-helper.test.ts | 2 +- .../widget-options-filters-helper.test.ts | 2 +- .../__tests__/widget-schema-helper.test.ts | 2 +- .../widget-value-label-helper.test.ts | 3 +- .../_helpers/widget-chart-data-helper.ts | 0 .../widgets/_helpers/widget-chart-helper.ts | 5 +- .../_helpers/widget-component-helper.ts | 4 +- .../widgets/_helpers/widget-config-helper.ts | 2 +- .../_helpers/widget-inherit-options-helper.ts | 0 .../_helpers/widget-location-helper.ts | 2 +- .../_helpers/widget-options-filters-helper.ts | 2 +- .../widgets/_helpers/widget-options-helper.ts | 2 +- .../widget-options-schema-generator.ts | 2 +- .../widgets/_helpers/widget-schema-helper.ts | 2 +- .../widgets/_helpers/widget-table-helper.ts | 3 +- .../_helpers/widget-validation-helper.ts | 9 +- .../_helpers/widget-value-label-helper.ts | 0 .../widgets/_types/compliance-type.ts | 2 +- .../widgets/_types/widget-data-table-type.ts | 0 .../widgets/_types/widget-list-type.ts | 2 +- .../dashboards}/widgets/_types/widget-type.ts | 0 .../ComplianceStatusWidget.vue | 13 +-- .../compliance-status/widget-config.ts | 2 +- .../count-of-fail-findings/widget-config.ts | 2 +- .../widget-config.ts | 2 +- .../SeverityStatusByServiceWidget.vue | 13 +-- .../widget-config.ts | 2 +- .../TotalFailFindingsHistoryWidget.vue | 17 ++-- .../widget-config.ts | 2 +- .../TotalFailFindingsStatusWidget.vue | 15 ++-- .../widget-config.ts | 2 +- .../TrendOfPassAndFailFindingsWidget.vue | 28 +++--- .../widget-config.ts | 2 +- .../budget-status/BudgetStatusWidget.vue | 13 +-- .../budget-status/widget-config.ts | 2 +- .../BudgetUsageByTargetWidget.vue | 15 ++-- .../budget-usage-by-target/widget-config.ts | 2 +- .../BudgetUsageSummaryWidget.vue | 11 +-- .../budget-usage-summary/widget-config.ts | 2 +- .../CostByRegionMultiFieldsWidget.vue | 28 +++--- .../widget-config.ts | 2 +- .../cost-by-region/CostByRegionWidget.vue | 23 ++--- .../cost-by-region-data-hleper.ts | 0 .../cost-by-region/widget-config.ts | 2 +- .../cost-widgets/cost-donut/widget-config.ts | 2 +- .../cost-widgets/cost-map/CostMapWidget.vue | 9 +- .../cost-map/costmap-chart-data-helper.ts | 0 .../cost-map/costmap-draw-chart-helper.ts | 7 +- .../cost-widgets/cost-map/widget-config.ts | 2 +- .../cost-widgets/cost-pie/widget-config.ts | 2 +- .../CostSummaryMultiFieldsWidget.vue | 32 +++---- .../widget-config.ts | 2 +- .../cost-trend-stacked/widget-config.ts | 2 +- .../cost-widgets/cost-trend/widget-config.ts | 2 +- .../monthly-cost/MonthlyCostWidget.vue | 21 ++--- .../monthly-cost/widget-config.ts | 2 +- 101 files changed, 443 insertions(+), 452 deletions(-) delete mode 100644 apps/web/src/common/modules/widgets/_constants/widget-components-constant.ts delete mode 100644 apps/web/src/common/modules/widgets/_constants/widget-config-list-constant.ts create mode 100644 apps/web/src/services/dashboards/types/widget-type.ts rename apps/web/src/{common/modules => services/dashboards}/widgets/_base-widgets/base-count-of-findings/BaseCountOfFindingsWidget.vue (93%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_base-widgets/base-count-of-findings/widget-config.ts (100%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_base-widgets/base-pie/BasePieWidget.vue (89%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_base-widgets/base-pie/widget-config.ts (100%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_base-widgets/base-trend/BaseTrendWidget.vue (93%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_base-widgets/base-trend/widget-config.ts (100%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_components/WidgetChartNoDataOverlay.vue (100%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_components/WidgetDataTable.vue (99%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_components/WidgetFrame.vue (99%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_composables/use-widget-color-set.ts (88%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_composables/use-widget-lifecycle.ts (95%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_composables/use-widget-pagination.ts (78%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_composables/use-widget/merge-base-widget-state.ts (89%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_composables/use-widget/use-base-widget-state.ts (93%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_composables/use-widget/use-widget-console-filters.ts (92%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_composables/use-widget/use-widget-date-range.ts (75%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_composables/use-widget/use-widget-frame.ts (90%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_composables/use-widget/use-widget-location.ts (92%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_composables/use-widget/use-widget.ts (80%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_constants/compliance-constant.ts (100%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_constants/managed-widget-options-schema.ts (100%) create mode 100644 apps/web/src/services/dashboards/widgets/_constants/widget-components-constant.ts create mode 100644 apps/web/src/services/dashboards/widgets/_constants/widget-config-list-constant.ts rename apps/web/src/{common/modules => services/dashboards}/widgets/_constants/widget-constant.ts (100%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/__tests__/widget-chart-data-helper.test.ts (97%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/__tests__/widget-config-helper.test.ts (83%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/__tests__/widget-inherit-options-helper.test.ts (99%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/__tests__/widget-options-filters-helper.test.ts (94%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/__tests__/widget-schema-helper.test.ts (99%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/__tests__/widget-value-label-helper.test.ts (97%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/widget-chart-data-helper.ts (100%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/widget-chart-helper.ts (97%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/widget-component-helper.ts (71%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/widget-config-helper.ts (94%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/widget-inherit-options-helper.ts (100%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/widget-location-helper.ts (94%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/widget-options-filters-helper.ts (92%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/widget-options-helper.ts (95%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/widget-options-schema-generator.ts (95%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/widget-schema-helper.ts (97%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/widget-table-helper.ts (97%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/widget-validation-helper.ts (97%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_helpers/widget-value-label-helper.ts (100%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_types/compliance-type.ts (74%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_types/widget-data-table-type.ts (100%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_types/widget-list-type.ts (73%) rename apps/web/src/{common/modules => services/dashboards}/widgets/_types/widget-type.ts (100%) rename apps/web/src/{common/modules => services/dashboards}/widgets/asset-widgets/compliance-status/ComplianceStatusWidget.vue (96%) rename apps/web/src/{common/modules => services/dashboards}/widgets/asset-widgets/compliance-status/widget-config.ts (89%) rename apps/web/src/{common/modules => services/dashboards}/widgets/asset-widgets/count-of-fail-findings/widget-config.ts (92%) rename apps/web/src/{common/modules => services/dashboards}/widgets/asset-widgets/count-of-pass-and-fail-findings/widget-config.ts (92%) rename apps/web/src/{common/modules => services/dashboards}/widgets/asset-widgets/severity-status-by-service/SeverityStatusByServiceWidget.vue (92%) rename apps/web/src/{common/modules => services/dashboards}/widgets/asset-widgets/severity-status-by-service/widget-config.ts (88%) rename apps/web/src/{common/modules => services/dashboards}/widgets/asset-widgets/total-fail-findings-history/TotalFailFindingsHistoryWidget.vue (95%) rename apps/web/src/{common/modules => services/dashboards}/widgets/asset-widgets/total-fail-findings-history/widget-config.ts (91%) rename apps/web/src/{common/modules => services/dashboards}/widgets/asset-widgets/total-fail-findings-status/TotalFailFindingsStatusWidget.vue (92%) rename apps/web/src/{common/modules => services/dashboards}/widgets/asset-widgets/total-fail-findings-status/widget-config.ts (89%) rename apps/web/src/{common/modules => services/dashboards}/widgets/asset-widgets/trend-of-pass-and-fail-findings/TrendOfPassAndFailFindingsWidget.vue (92%) rename apps/web/src/{common/modules => services/dashboards}/widgets/asset-widgets/trend-of-pass-and-fail-findings/widget-config.ts (91%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/budget-status/BudgetStatusWidget.vue (95%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/budget-status/widget-config.ts (89%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/budget-usage-by-target/BudgetUsageByTargetWidget.vue (91%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/budget-usage-by-target/widget-config.ts (92%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/budget-usage-summary/BudgetUsageSummaryWidget.vue (96%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/budget-usage-summary/widget-config.ts (89%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/cost-by-region-multi-fields/CostByRegionMultiFieldsWidget.vue (91%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/cost-by-region-multi-fields/widget-config.ts (94%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/cost-by-region/CostByRegionWidget.vue (90%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/cost-by-region/cost-by-region-data-hleper.ts (100%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/cost-by-region/widget-config.ts (93%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/cost-donut/widget-config.ts (92%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/cost-map/CostMapWidget.vue (94%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/cost-map/costmap-chart-data-helper.ts (100%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/cost-map/costmap-draw-chart-helper.ts (88%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/cost-map/widget-config.ts (92%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/cost-pie/widget-config.ts (92%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/cost-summary-multi-fields/CostSummaryMultiFieldsWidget.vue (92%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/cost-summary-multi-fields/widget-config.ts (94%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/cost-trend-stacked/widget-config.ts (93%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/cost-trend/widget-config.ts (93%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/monthly-cost/MonthlyCostWidget.vue (95%) rename apps/web/src/{common/modules => services/dashboards}/widgets/cost-widgets/monthly-cost/widget-config.ts (91%) diff --git a/apps/web/src/common/modules/widgets/_constants/widget-components-constant.ts b/apps/web/src/common/modules/widgets/_constants/widget-components-constant.ts deleted file mode 100644 index 3556054a82..0000000000 --- a/apps/web/src/common/modules/widgets/_constants/widget-components-constant.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { AsyncComponent } from 'vue'; - -import type { BaseWidgetConfigKey, WidgetConfigKey } from '@/common/modules/widgets/_types/widget-list-type'; - -const BASE_WIDGET_COMPONENTS: Record = { - baseTrend: () => ({ - component: import('@/common/modules/widgets/_base-widgets/base-trend/BaseTrendWidget.vue'), - }), - basePie: () => ({ - component: import('@/common/modules/widgets/_base-widgets/base-pie/BasePieWidget.vue'), - }), - baseCountOfFindings: () => ({ - component: import('@/common/modules/widgets/_base-widgets/base-count-of-findings/BaseCountOfFindingsWidget.vue'), - }), -}; - -export const WIDGET_COMPONENTS: Record = { - monthlyCost: () => ({ - component: import('@/common/modules/widgets/cost-widgets/monthly-cost/MonthlyCostWidget.vue'), - }), - budgetUsageSummary: () => ({ - component: import('@/common/modules/widgets/cost-widgets/budget-usage-summary/BudgetUsageSummaryWidget.vue'), - }), - costMap: () => ({ - component: import('@/common/modules/widgets/cost-widgets/cost-map/CostMapWidget.vue'), - }), - costTrend: BASE_WIDGET_COMPONENTS.baseTrend, - costTrendStacked: BASE_WIDGET_COMPONENTS.baseTrend, - costSummaryMultiFields: () => ({ - component: import('@/common/modules/widgets/cost-widgets/cost-summary-multi-fields/CostSummaryMultiFieldsWidget.vue'), - }), - costPie: BASE_WIDGET_COMPONENTS.basePie, - costDonut: BASE_WIDGET_COMPONENTS.basePie, - costByRegion: () => ({ - component: import('@/common/modules/widgets/cost-widgets/cost-by-region/CostByRegionWidget.vue'), - }), - costByRegionMultiFields: () => ({ - component: import('@/common/modules/widgets/cost-widgets/cost-by-region-multi-fields/CostByRegionMultiFieldsWidget.vue'), - }), - budgetStatus: () => ({ - component: import('@/common/modules/widgets/cost-widgets/budget-status/BudgetStatusWidget.vue'), - }), - budgetUsageByTarget: () => ({ - component: import('@/common/modules/widgets/cost-widgets/budget-usage-by-target/BudgetUsageByTargetWidget.vue'), - }), - severityStatusByService: () => ({ - component: import('@/common/modules/widgets/asset-widgets/severity-status-by-service/SeverityStatusByServiceWidget.vue'), - }), - countOfFailFindings: BASE_WIDGET_COMPONENTS.baseCountOfFindings, - countOfPassAndFailFindings: BASE_WIDGET_COMPONENTS.baseCountOfFindings, - trendOfPassAndFailFindings: () => ({ - component: import('@/common/modules/widgets/asset-widgets/trend-of-pass-and-fail-findings/TrendOfPassAndFailFindingsWidget.vue'), - }), - totalFailFindingsStatus: () => ({ - component: import('@/common/modules/widgets/asset-widgets/total-fail-findings-status/TotalFailFindingsStatusWidget.vue'), - }), - totalFailFindingsHistory: () => ({ - component: import('@/common/modules/widgets/asset-widgets/total-fail-findings-history/TotalFailFindingsHistoryWidget.vue'), - }), - complianceStatus: () => ({ - component: import('@/common/modules/widgets/asset-widgets/compliance-status/ComplianceStatusWidget.vue'), - }), -}; diff --git a/apps/web/src/common/modules/widgets/_constants/widget-config-list-constant.ts b/apps/web/src/common/modules/widgets/_constants/widget-config-list-constant.ts deleted file mode 100644 index 6005bb5f1f..0000000000 --- a/apps/web/src/common/modules/widgets/_constants/widget-config-list-constant.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* eslint-disable import/order */ -// base widgets -import baseCountOfFindings from '@/common/modules/widgets/_base-widgets/base-count-of-findings/widget-config'; -import basePie from '@/common/modules/widgets/_base-widgets/base-pie/widget-config'; -import baseTrend from '@/common/modules/widgets/_base-widgets/base-trend/widget-config'; - -// console widgets -import complianceStatus from '@/common/modules/widgets/asset-widgets/compliance-status/widget-config'; -import countOfFailFindings from '@/common/modules/widgets/asset-widgets/count-of-fail-findings/widget-config'; -import countOfPassAndFailFindings from '@/common/modules/widgets/asset-widgets/count-of-pass-and-fail-findings/widget-config'; -import severityStatusByService from '@/common/modules/widgets/asset-widgets/severity-status-by-service/widget-config'; -import totalFailFindingsHistory from '@/common/modules/widgets/asset-widgets/total-fail-findings-history/widget-config'; -import totalFailFindingsStatus from '@/common/modules/widgets/asset-widgets/total-fail-findings-status/widget-config'; -import trendOfPassAndFailFindings from '@/common/modules/widgets/asset-widgets/trend-of-pass-and-fail-findings/widget-config'; -import budgetStatus from '@/common/modules/widgets/cost-widgets/budget-status/widget-config'; -import budgetUsageByTarget from '@/common/modules/widgets/cost-widgets/budget-usage-by-target/widget-config'; -import budgetUsageSummary from '@/common/modules/widgets/cost-widgets/budget-usage-summary/widget-config'; -import costByRegionMultiFields from '@/common/modules/widgets/cost-widgets/cost-by-region-multi-fields/widget-config'; -import costByRegion from '@/common/modules/widgets/cost-widgets/cost-by-region/widget-config'; -import costDonut from '@/common/modules/widgets/cost-widgets/cost-donut/widget-config'; -import costMap from '@/common/modules/widgets/cost-widgets/cost-map/widget-config'; -import costPie from '@/common/modules/widgets/cost-widgets/cost-pie/widget-config'; -import costSummaryMultiFields from '@/common/modules/widgets/cost-widgets/cost-summary-multi-fields/widget-config'; -import costTrendStacked from '@/common/modules/widgets/cost-widgets/cost-trend-stacked/widget-config'; -import costTrend from '@/common/modules/widgets/cost-widgets/cost-trend/widget-config'; -import monthlyCost from '@/common/modules/widgets/cost-widgets/monthly-cost/widget-config'; - -import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import type { BaseWidgetConfigKey, WidgetConfigKey } from '@/common/modules/widgets/_types/widget-list-type'; - -export const BASE_WIDGET_CONFIG_KEYS = [ - 'baseTrend', - 'basePie', - 'baseCountOfFindings', -] as const; -export const CONSOLE_WIDGET_CONFIG_KEYS = [ - 'monthlyCost', - 'budgetUsageSummary', - 'costMap', - 'costTrend', - 'costTrendStacked', - 'costSummaryMultiFields', - 'costPie', - 'costDonut', - 'costByRegion', - 'costByRegionMultiFields', - 'budgetStatus', - 'budgetUsageByTarget', - 'severityStatusByService', - 'countOfFailFindings', - 'countOfPassAndFailFindings', - 'trendOfPassAndFailFindings', - 'totalFailFindingsStatus', - 'totalFailFindingsHistory', - 'complianceStatus', -] as const; - - -export const CONSOLE_WIDGET_CONFIGS: Record> = { - // Cost Widgets - monthlyCost, - budgetUsageSummary, - costMap, - costTrend, - costTrendStacked, - costSummaryMultiFields, - costPie, - costDonut, - costByRegion, - costByRegionMultiFields, - budgetStatus, - budgetUsageByTarget, - // Asset Widgets - severityStatusByService, - countOfFailFindings, - countOfPassAndFailFindings, - trendOfPassAndFailFindings, - totalFailFindingsStatus, - totalFailFindingsHistory, - complianceStatus, -}; - -export const BASE_WIDGET_CONFIGS: Record> = { - baseTrend, - basePie, - baseCountOfFindings, -}; diff --git a/apps/web/src/services/dashboards/components/DashboardCustomizeSidebar.vue b/apps/web/src/services/dashboards/components/DashboardCustomizeSidebar.vue index 7533c37aba..c3a9877bc6 100644 --- a/apps/web/src/services/dashboards/components/DashboardCustomizeSidebar.vue +++ b/apps/web/src/services/dashboards/components/DashboardCustomizeSidebar.vue @@ -16,13 +16,11 @@ import type { DashboardLayoutWidgetInfo } from '@/schema/dashboard/_types/dashbo import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; import { store } from '@/store'; -import { getWidgetConfig } from '@/common/modules/widgets/_helpers/widget-config-helper'; - import { red } from '@/styles/colors'; import DashboardWidgetAddModal from '@/services/dashboards/components/DashboardWidgetAddModal.vue'; import { useDashboardDetailInfoStore } from '@/services/dashboards/stores/dashboard-detail-info-store'; - +import { getWidgetConfig } from '@/services/dashboards/widgets/_helpers/widget-config-helper'; interface Props { loading?: boolean; diff --git a/apps/web/src/services/dashboards/components/DashboardVariablesMoreButton.vue b/apps/web/src/services/dashboards/components/DashboardVariablesMoreButton.vue index 88687cb92c..bcbd6cc143 100644 --- a/apps/web/src/services/dashboards/components/DashboardVariablesMoreButton.vue +++ b/apps/web/src/services/dashboards/components/DashboardVariablesMoreButton.vue @@ -16,11 +16,11 @@ import type { DashboardVariableSchemaProperty, DashboardVariablesSchema } from ' import DeleteModal from '@/common/components/modals/DeleteModal.vue'; import { useProperRouteLocation } from '@/common/composables/proper-route-location'; -import { getWidgetConfig } from '@/common/modules/widgets/_helpers/widget-config-helper'; import { MANAGE_VARIABLES_HASH_NAME } from '@/services/dashboards/constants/manage-variable-overlay-constant'; import { DASHBOARDS_ROUTE } from '@/services/dashboards/routes/route-constant'; import { useDashboardDetailInfoStore } from '@/services/dashboards/stores/dashboard-detail-info-store'; +import { getWidgetConfig } from '@/services/dashboards/widgets/_helpers/widget-config-helper'; interface Props { diff --git a/apps/web/src/services/dashboards/components/DashboardWidgetAddModal.vue b/apps/web/src/services/dashboards/components/DashboardWidgetAddModal.vue index fab052c1fe..b2d5828c33 100644 --- a/apps/web/src/services/dashboards/components/DashboardWidgetAddModal.vue +++ b/apps/web/src/services/dashboards/components/DashboardWidgetAddModal.vue @@ -12,10 +12,10 @@ import { i18n } from '@/translations'; import getRandomId from '@/lib/random-id-generator'; import { useProxyValue } from '@/common/composables/proxy-state'; -import { getWidgetConfig } from '@/common/modules/widgets/_helpers/widget-config-helper'; import DashboardWidgetAddModalDefaultTab from '@/services/dashboards/components/DashboardWidgetAddModalDefaultTab.vue'; import { useWidgetFormStore } from '@/services/dashboards/stores/widget-form-store'; +import { getWidgetConfig } from '@/services/dashboards/widgets/_helpers/widget-config-helper'; interface Props { diff --git a/apps/web/src/services/dashboards/components/DashboardWidgetAddModalDefaultTab.vue b/apps/web/src/services/dashboards/components/DashboardWidgetAddModalDefaultTab.vue index 07a3e74c8e..4f97736a33 100644 --- a/apps/web/src/services/dashboards/components/DashboardWidgetAddModalDefaultTab.vue +++ b/apps/web/src/services/dashboards/components/DashboardWidgetAddModalDefaultTab.vue @@ -9,12 +9,10 @@ import type { DashboardLayoutWidgetInfo } from '@/schema/dashboard/_types/dashbo import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; import { i18n } from '@/translations'; -import { CONSOLE_WIDGET_CONFIGS } from '@/common/modules/widgets/_constants/widget-config-list-constant'; - import DashboardWidgetForm from '@/services/dashboards/components/DashboardWidgetForm.vue'; import { DASHBOARD_TEMPLATES } from '@/services/dashboards/dashboard-template/template-list'; import { useDashboardDetailInfoStore } from '@/services/dashboards/stores/dashboard-detail-info-store'; - +import { CONSOLE_WIDGET_CONFIGS } from '@/services/dashboards/widgets/_constants/widget-config-list-constant'; interface TemplateWidgetConfig extends WidgetConfig { template_widget_id?: string diff --git a/apps/web/src/services/dashboards/components/DashboardWidgetContainer.vue b/apps/web/src/services/dashboards/components/DashboardWidgetContainer.vue index 2f0712c0bf..75fe014056 100644 --- a/apps/web/src/services/dashboards/components/DashboardWidgetContainer.vue +++ b/apps/web/src/services/dashboards/components/DashboardWidgetContainer.vue @@ -8,10 +8,6 @@ import { PDataLoader } from '@spaceone/design-system'; import { debounce } from 'lodash'; import DeleteModal from '@/common/components/modals/DeleteModal.vue'; -import type { - UpdatableWidgetInfo, - WidgetExpose, WidgetProps, -} from '@/common/modules/widgets/_types/widget-type'; import DashboardWidgetEditModal from '@/services/dashboards/components/DashboardWidgetEditModal.vue'; import WidgetFullModeModal from '@/services/dashboards/components/WidgetFullModeModal.vue'; @@ -25,6 +21,10 @@ import { import type { AllReferenceTypeInfo } from '@/services/dashboards/stores/all-reference-type-info-store'; import { useAllReferenceTypeInfoStore } from '@/services/dashboards/stores/all-reference-type-info-store'; import { useDashboardDetailInfoStore } from '@/services/dashboards/stores/dashboard-detail-info-store'; +import type { + UpdatableWidgetInfo, + WidgetExpose, WidgetProps, +} from '@/services/dashboards/widgets/_types/widget-type'; type WidgetComponent = ComponentPublicInstance; diff --git a/apps/web/src/services/dashboards/components/DashboardWidgetEditModal.vue b/apps/web/src/services/dashboards/components/DashboardWidgetEditModal.vue index 029d380765..e52391558a 100644 --- a/apps/web/src/services/dashboards/components/DashboardWidgetEditModal.vue +++ b/apps/web/src/services/dashboards/components/DashboardWidgetEditModal.vue @@ -5,13 +5,11 @@ import { PButtonModal, } from '@spaceone/design-system'; -import type { UpdatableWidgetInfo } from '@/common/modules/widgets/_types/widget-type'; - import DashboardWidgetForm from '@/services/dashboards/components/DashboardWidgetForm.vue'; import { useWidgetFormStore, } from '@/services/dashboards/stores/widget-form-store'; - +import type { UpdatableWidgetInfo } from '@/services/dashboards/widgets/_types/widget-type'; interface Props { visible: boolean; diff --git a/apps/web/src/services/dashboards/components/DashboardWidgetOptionDropdown.vue b/apps/web/src/services/dashboards/components/DashboardWidgetOptionDropdown.vue index 16ad24bfed..f492be6020 100644 --- a/apps/web/src/services/dashboards/components/DashboardWidgetOptionDropdown.vue +++ b/apps/web/src/services/dashboards/components/DashboardWidgetOptionDropdown.vue @@ -31,15 +31,14 @@ import { getVariableModelMenuHandler, } from '@/lib/variable-models/variable-model-menu-handler'; -import { - COST_VALUE_WIDGET_OPTION_CONFIGS, -} from '@/common/modules/widgets/_constants/managed-widget-options-schema.js'; -import { setFilterAndGetWidgetFiltersMap } from '@/common/modules/widgets/_helpers/widget-options-filters-helper'; -import { getWidgetOptionKeyByVariableKey } from '@/common/modules/widgets/_helpers/widget-schema-helper'; - import DashboardCostWidgetValueOptionDropdown from '@/services/dashboards/components/DashboardCostWidgetValueOptionDropdown.vue'; import { useWidgetFormStore } from '@/services/dashboards/stores/widget-form-store'; +import { + COST_VALUE_WIDGET_OPTION_CONFIGS, +} from '@/services/dashboards/widgets/_constants/managed-widget-options-schema.js'; +import { setFilterAndGetWidgetFiltersMap } from '@/services/dashboards/widgets/_helpers/widget-options-filters-helper'; +import { getWidgetOptionKeyByVariableKey } from '@/services/dashboards/widgets/_helpers/widget-schema-helper'; diff --git a/apps/web/src/services/dashboards/components/WidgetFullModeModal.vue b/apps/web/src/services/dashboards/components/WidgetFullModeModal.vue index 05f1af258c..aa33337048 100644 --- a/apps/web/src/services/dashboards/components/WidgetFullModeModal.vue +++ b/apps/web/src/services/dashboards/components/WidgetFullModeModal.vue @@ -17,11 +17,6 @@ import type { } from '@/schema/dashboard/_types/dashboard-type'; import type { WidgetSize } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetComponent } from '@/common/modules/widgets/_helpers/widget-component-helper'; -import type { - UpdatableWidgetInfo, WidgetExpose, WidgetProps, WidgetTheme, -} from '@/common/modules/widgets/_types/widget-type'; - import { gray } from '@/styles/colors'; import DashboardToolsetDateDropdown from '@/services/dashboards/components/DashboardToolsetDateDropdown.vue'; @@ -31,6 +26,10 @@ import { useAllReferenceTypeInfoStore } from '@/services/dashboards/stores/all-r import type { AllReferenceTypeInfo } from '@/services/dashboards/stores/all-reference-type-info-store'; import { useDashboardDetailInfoStore } from '@/services/dashboards/stores/dashboard-detail-info-store'; import { useWidgetFormStore } from '@/services/dashboards/stores/widget-form-store'; +import { getWidgetComponent } from '@/services/dashboards/widgets/_helpers/widget-component-helper'; +import type { + UpdatableWidgetInfo, WidgetExpose, WidgetProps, WidgetTheme, +} from '@/services/dashboards/widgets/_types/widget-type'; interface WidgetFullModeModalProps { diff --git a/apps/web/src/services/dashboards/components/WidgetFullModeModalSidebar.vue b/apps/web/src/services/dashboards/components/WidgetFullModeModalSidebar.vue index f94e8f3e4d..bed88557cd 100644 --- a/apps/web/src/services/dashboards/components/WidgetFullModeModalSidebar.vue +++ b/apps/web/src/services/dashboards/components/WidgetFullModeModalSidebar.vue @@ -10,13 +10,13 @@ import { import getRandomId from '@/lib/random-id-generator'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import { getNonInheritedWidgetOptionNamesAmongUsedVariables } from '@/common/modules/widgets/_helpers/widget-schema-helper'; -import type { UpdatableWidgetInfo } from '@/common/modules/widgets/_types/widget-type'; import DashboardWidgetForm from '@/services/dashboards/components/DashboardWidgetForm.vue'; import { useDashboardDetailInfoStore } from '@/services/dashboards/stores/dashboard-detail-info-store'; import { useWidgetFormStore } from '@/services/dashboards/stores/widget-form-store'; +import { getNonInheritedWidgetOptionNamesAmongUsedVariables } from '@/services/dashboards/widgets/_helpers/widget-schema-helper'; +import type { UpdatableWidgetInfo } from '@/services/dashboards/widgets/_types/widget-type'; interface Props { diff --git a/apps/web/src/services/dashboards/composables/use-reformed-widget-info-list.ts b/apps/web/src/services/dashboards/composables/use-reformed-widget-info-list.ts index 2ffe735593..5b2f04df9b 100644 --- a/apps/web/src/services/dashboards/composables/use-reformed-widget-info-list.ts +++ b/apps/web/src/services/dashboards/composables/use-reformed-widget-info-list.ts @@ -6,17 +6,15 @@ import { flattenDeep } from 'lodash'; import type { DashboardLayoutWidgetInfo } from '@/schema/dashboard/_types/dashboard-type'; import type { WidgetConfig, WidgetSize } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetComponent } from '@/common/modules/widgets/_helpers/widget-component-helper'; -import { getWidgetConfig } from '@/common/modules/widgets/_helpers/widget-config-helper'; -import type { WidgetTheme } from '@/common/modules/widgets/_types/widget-type'; - import { widgetThemeAssigner, } from '@/services/dashboards/helpers/widget-theme-helper'; import { widgetWidthAssigner, } from '@/services/dashboards/helpers/widget-width-helper'; - +import { getWidgetComponent } from '@/services/dashboards/widgets/_helpers/widget-component-helper'; +import { getWidgetConfig } from '@/services/dashboards/widgets/_helpers/widget-config-helper'; +import type { WidgetTheme } from '@/services/dashboards/widgets/_types/widget-type'; interface UseWidgetReformerOptions { dashboardWidgetInfoList: Ref; diff --git a/apps/web/src/services/dashboards/dashboard-template/helpers/dashboard-template-generator.ts b/apps/web/src/services/dashboards/dashboard-template/helpers/dashboard-template-generator.ts index 5c32ba8313..eab2b1c578 100644 --- a/apps/web/src/services/dashboards/dashboard-template/helpers/dashboard-template-generator.ts +++ b/apps/web/src/services/dashboards/dashboard-template/helpers/dashboard-template-generator.ts @@ -5,7 +5,7 @@ import type { import getRandomId from '@/lib/random-id-generator'; -import { getWidgetConfig } from '@/common/modules/widgets/_helpers/widget-config-helper'; +import { getWidgetConfig } from '@/services/dashboards/widgets/_helpers/widget-config-helper'; diff --git a/apps/web/src/services/dashboards/helpers/dashboard-widget-info-helper.ts b/apps/web/src/services/dashboards/helpers/dashboard-widget-info-helper.ts index f52c9680c8..490c1bb1b6 100644 --- a/apps/web/src/services/dashboards/helpers/dashboard-widget-info-helper.ts +++ b/apps/web/src/services/dashboards/helpers/dashboard-widget-info-helper.ts @@ -6,9 +6,9 @@ import type { InheritOptions, WidgetConfig, WidgetFiltersMap, WidgetOptions, } from '@/schema/dashboard/_types/widget-type'; -import { getInheritingOptionKeys } from '@/common/modules/widgets/_helpers/widget-inherit-options-helper'; -import { getWidgetOptionKeyByVariableKey } from '@/common/modules/widgets/_helpers/widget-schema-helper'; -import type { UpdatableWidgetInfo } from '@/common/modules/widgets/_types/widget-type'; +import { getInheritingOptionKeys } from '@/services/dashboards/widgets/_helpers/widget-inherit-options-helper'; +import { getWidgetOptionKeyByVariableKey } from '@/services/dashboards/widgets/_helpers/widget-schema-helper'; +import type { UpdatableWidgetInfo } from '@/services/dashboards/widgets/_types/widget-type'; /** * @description get updated widget info. if the property is not changed, it will be declared as undefined. diff --git a/apps/web/src/services/dashboards/helpers/widget-theme-helper.ts b/apps/web/src/services/dashboards/helpers/widget-theme-helper.ts index b586f28dbc..7031fb6faf 100644 --- a/apps/web/src/services/dashboards/helpers/widget-theme-helper.ts +++ b/apps/web/src/services/dashboards/helpers/widget-theme-helper.ts @@ -1,7 +1,5 @@ -import { WIDGET_THEMES } from '@/common/modules/widgets/_types/widget-type'; - import type { WidgetThemeOption, WidgetThemeAssignedList } from '@/services/dashboards/shared/dashboard-widget-container/widget-container-config'; - +import { WIDGET_THEMES } from '@/services/dashboards/widgets/_types/widget-type'; const WIDGET_THEME_LEN = WIDGET_THEMES.length; diff --git a/apps/web/src/services/dashboards/shared/dashboard-widget-container/widget-container-config.ts b/apps/web/src/services/dashboards/shared/dashboard-widget-container/widget-container-config.ts index acc2143f06..2fe174df08 100644 --- a/apps/web/src/services/dashboards/shared/dashboard-widget-container/widget-container-config.ts +++ b/apps/web/src/services/dashboards/shared/dashboard-widget-container/widget-container-config.ts @@ -1,6 +1,6 @@ import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import type { WidgetTheme } from '@/common/modules/widgets/_types/widget-type'; +import type { WidgetTheme } from '@/services/dashboards/widgets/_types/widget-type'; export const WIDGET_WIDTH_CRITERIA = 16; diff --git a/apps/web/src/services/dashboards/stores/dashboard-detail-info-store.ts b/apps/web/src/services/dashboards/stores/dashboard-detail-info-store.ts index 4da65711ae..dfda7faf76 100644 --- a/apps/web/src/services/dashboards/stores/dashboard-detail-info-store.ts +++ b/apps/web/src/services/dashboards/stores/dashboard-detail-info-store.ts @@ -21,15 +21,14 @@ import { useDashboardStore } from '@/store/dashboard/dashboard-store'; import getRandomId from '@/lib/random-id-generator'; -import { getWidgetConfig } from '@/common/modules/widgets/_helpers/widget-config-helper'; -import type { UpdatableWidgetInfo } from '@/common/modules/widgets/_types/widget-type'; - import { MANAGED_DASHBOARD_VARIABLES_SCHEMA } from '@/services/dashboards/constants/dashboard-managed-variables-schema'; import { DASHBOARD_TEMPLATES } from '@/services/dashboards/dashboard-template/template-list'; import type { CreateDashboardParameters, DashboardModel, UpdateDashboardParameters, GetDashboardParameters, } from '@/services/dashboards/types/dashboard-api-schema-type'; import type { DashboardScope } from '@/services/dashboards/types/dashboard-view-type'; +import { getWidgetConfig } from '@/services/dashboards/widgets/_helpers/widget-config-helper'; +import type { UpdatableWidgetInfo } from '@/services/dashboards/widgets/_types/widget-type'; interface WidgetValidMap { diff --git a/apps/web/src/services/dashboards/stores/widget-form-store.ts b/apps/web/src/services/dashboards/stores/widget-form-store.ts index 204e25c2ae..f5dde8ae86 100644 --- a/apps/web/src/services/dashboards/stores/widget-form-store.ts +++ b/apps/web/src/services/dashboards/stores/widget-form-store.ts @@ -11,20 +11,19 @@ import type { import { useAppContextStore } from '@/store/app-context/app-context-store'; -import type { MergedBaseWidgetState } from '@/common/modules/widgets/_composables/use-widget/merge-base-widget-state'; -import { mergeBaseWidgetState } from '@/common/modules/widgets/_composables/use-widget/merge-base-widget-state'; -import { getWidgetConfig } from '@/common/modules/widgets/_helpers/widget-config-helper'; -import { getInitialWidgetInheritOptions } from '@/common/modules/widgets/_helpers/widget-inherit-options-helper'; -import { getRefinedWidgetOptions } from '@/common/modules/widgets/_helpers/widget-options-helper'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; -import { getInitialSchemaProperties, getRefinedSchemaProperties } from '@/common/modules/widgets/_helpers/widget-schema-helper'; -import type { UpdatableWidgetInfo } from '@/common/modules/widgets/_types/widget-type'; - import { useWidgetTitleInput } from '@/services/dashboards/composables/use-widget-title-input'; import { DASHBOARD_TEMPLATES } from '@/services/dashboards/dashboard-template/template-list'; import { getUpdatedWidgetInfo } from '@/services/dashboards/helpers/dashboard-widget-info-helper'; import { useDashboardDetailInfoStore } from '@/services/dashboards/stores/dashboard-detail-info-store'; import type { DashboardScope } from '@/services/dashboards/types/dashboard-view-type'; +import type { MergedBaseWidgetState } from '@/services/dashboards/widgets/_composables/use-widget/merge-base-widget-state'; +import { mergeBaseWidgetState } from '@/services/dashboards/widgets/_composables/use-widget/merge-base-widget-state'; +import { getWidgetConfig } from '@/services/dashboards/widgets/_helpers/widget-config-helper'; +import { getInitialWidgetInheritOptions } from '@/services/dashboards/widgets/_helpers/widget-inherit-options-helper'; +import { getRefinedWidgetOptions } from '@/services/dashboards/widgets/_helpers/widget-options-helper'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; +import { getInitialSchemaProperties, getRefinedSchemaProperties } from '@/services/dashboards/widgets/_helpers/widget-schema-helper'; +import type { UpdatableWidgetInfo } from '@/services/dashboards/widgets/_types/widget-type'; /* Description diff --git a/apps/web/src/services/dashboards/types/widget-type.ts b/apps/web/src/services/dashboards/types/widget-type.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/apps/web/src/common/modules/widgets/_base-widgets/base-count-of-findings/BaseCountOfFindingsWidget.vue b/apps/web/src/services/dashboards/widgets/_base-widgets/base-count-of-findings/BaseCountOfFindingsWidget.vue similarity index 93% rename from apps/web/src/common/modules/widgets/_base-widgets/base-count-of-findings/BaseCountOfFindingsWidget.vue rename to apps/web/src/services/dashboards/widgets/_base-widgets/base-count-of-findings/BaseCountOfFindingsWidget.vue index f1badef4c2..751816e907 100644 --- a/apps/web/src/common/modules/widgets/_base-widgets/base-count-of-findings/BaseCountOfFindingsWidget.vue +++ b/apps/web/src/services/dashboards/widgets/_base-widgets/base-count-of-findings/BaseCountOfFindingsWidget.vue @@ -21,17 +21,18 @@ import type { ReferenceMap } from '@/store/reference/type'; import { useAmcharts5 } from '@/common/composables/amcharts5'; import { setXYSharedTooltipTextWithRate } from '@/common/composables/amcharts5/xy-chart-helper'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import WidgetChartNoDataOverlay from '@/common/modules/widgets/_components/WidgetChartNoDataOverlay.vue'; -import WidgetFrame from '@/common/modules/widgets/_components/WidgetFrame.vue'; -import { useWidgetLifecycle } from '@/common/modules/widgets/_composables/use-widget-lifecycle'; -import { useWidgetPagination } from '@/common/modules/widgets/_composables/use-widget-pagination'; -import { useWidget } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import { COMPLIANCE_STATUS_MAP } from '@/common/modules/widgets/_constants/compliance-constant'; + +import WidgetChartNoDataOverlay from '@/services/dashboards/widgets/_components/WidgetChartNoDataOverlay.vue'; +import WidgetFrame from '@/services/dashboards/widgets/_components/WidgetFrame.vue'; +import { useWidgetLifecycle } from '@/services/dashboards/widgets/_composables/use-widget-lifecycle'; +import { useWidgetPagination } from '@/services/dashboards/widgets/_composables/use-widget-pagination'; +import { useWidget } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import { COMPLIANCE_STATUS_MAP } from '@/services/dashboards/widgets/_constants/compliance-constant'; import type { WidgetEmit, WidgetExpose, WidgetProps, Legend, -} from '@/common/modules/widgets/_types/widget-type'; +} from '@/services/dashboards/widgets/_types/widget-type'; import countOfPassAndFailFindingsWidgetConfig - from '@/common/modules/widgets/asset-widgets/count-of-pass-and-fail-findings/widget-config'; + from '@/services/dashboards/widgets/asset-widgets/count-of-pass-and-fail-findings/widget-config'; interface Data { diff --git a/apps/web/src/common/modules/widgets/_base-widgets/base-count-of-findings/widget-config.ts b/apps/web/src/services/dashboards/widgets/_base-widgets/base-count-of-findings/widget-config.ts similarity index 100% rename from apps/web/src/common/modules/widgets/_base-widgets/base-count-of-findings/widget-config.ts rename to apps/web/src/services/dashboards/widgets/_base-widgets/base-count-of-findings/widget-config.ts diff --git a/apps/web/src/common/modules/widgets/_base-widgets/base-pie/BasePieWidget.vue b/apps/web/src/services/dashboards/widgets/_base-widgets/base-pie/BasePieWidget.vue similarity index 89% rename from apps/web/src/common/modules/widgets/_base-widgets/base-pie/BasePieWidget.vue rename to apps/web/src/services/dashboards/widgets/_base-widgets/base-pie/BasePieWidget.vue index 5527ca5211..1fe2f02086 100644 --- a/apps/web/src/common/modules/widgets/_base-widgets/base-pie/BasePieWidget.vue +++ b/apps/web/src/services/dashboards/widgets/_base-widgets/base-pie/BasePieWidget.vue @@ -19,26 +19,26 @@ import { CHART_TYPE, COST_DATA_FIELD_MAP } from '@/schema/dashboard/_constants/w import { useAmcharts5 } from '@/common/composables/amcharts5'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import WidgetDataTable from '@/common/modules/widgets/_components/WidgetDataTable.vue'; -import WidgetFrame from '@/common/modules/widgets/_components/WidgetFrame.vue'; -import { useWidgetColorSet } from '@/common/modules/widgets/_composables/use-widget-color-set'; -import { useWidgetLifecycle } from '@/common/modules/widgets/_composables/use-widget-lifecycle'; -import { useWidgetPagination } from '@/common/modules/widgets/_composables/use-widget-pagination'; -import { useWidget } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import { getRefinedPieChartData } from '@/common/modules/widgets/_helpers/widget-chart-data-helper'; -import { - getPieChartLegends, -} from '@/common/modules/widgets/_helpers/widget-chart-helper'; -import { getWidgetDataTableRowLocation } from '@/common/modules/widgets/_helpers/widget-location-helper'; -import { getReferenceTypeOfDataField } from '@/common/modules/widgets/_helpers/widget-table-helper'; -import type { Field, WidgetTableData } from '@/common/modules/widgets/_types/widget-data-table-type'; -import type { - WidgetExpose, WidgetProps, WidgetEmit, Legend, CostAnalyzeResponse, -} from '@/common/modules/widgets/_types/widget-type'; import { gray } from '@/styles/colors'; import type { ReferenceType } from '@/services/dashboards/stores/all-reference-type-info-store'; +import WidgetDataTable from '@/services/dashboards/widgets/_components/WidgetDataTable.vue'; +import WidgetFrame from '@/services/dashboards/widgets/_components/WidgetFrame.vue'; +import { useWidgetColorSet } from '@/services/dashboards/widgets/_composables/use-widget-color-set'; +import { useWidgetLifecycle } from '@/services/dashboards/widgets/_composables/use-widget-lifecycle'; +import { useWidgetPagination } from '@/services/dashboards/widgets/_composables/use-widget-pagination'; +import { useWidget } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import { getRefinedPieChartData } from '@/services/dashboards/widgets/_helpers/widget-chart-data-helper'; +import { + getPieChartLegends, +} from '@/services/dashboards/widgets/_helpers/widget-chart-helper'; +import { getWidgetDataTableRowLocation } from '@/services/dashboards/widgets/_helpers/widget-location-helper'; +import { getReferenceTypeOfDataField } from '@/services/dashboards/widgets/_helpers/widget-table-helper'; +import type { Field, WidgetTableData } from '@/services/dashboards/widgets/_types/widget-data-table-type'; +import type { + WidgetExpose, WidgetProps, WidgetEmit, Legend, CostAnalyzeResponse, +} from '@/services/dashboards/widgets/_types/widget-type'; interface SubData { diff --git a/apps/web/src/common/modules/widgets/_base-widgets/base-pie/widget-config.ts b/apps/web/src/services/dashboards/widgets/_base-widgets/base-pie/widget-config.ts similarity index 100% rename from apps/web/src/common/modules/widgets/_base-widgets/base-pie/widget-config.ts rename to apps/web/src/services/dashboards/widgets/_base-widgets/base-pie/widget-config.ts diff --git a/apps/web/src/common/modules/widgets/_base-widgets/base-trend/BaseTrendWidget.vue b/apps/web/src/services/dashboards/widgets/_base-widgets/base-trend/BaseTrendWidget.vue similarity index 93% rename from apps/web/src/common/modules/widgets/_base-widgets/base-trend/BaseTrendWidget.vue rename to apps/web/src/services/dashboards/widgets/_base-widgets/base-trend/BaseTrendWidget.vue index 44e58bb1bf..81e9eea0e1 100644 --- a/apps/web/src/common/modules/widgets/_base-widgets/base-trend/BaseTrendWidget.vue +++ b/apps/web/src/services/dashboards/widgets/_base-widgets/base-trend/BaseTrendWidget.vue @@ -31,34 +31,34 @@ import { import { useAmcharts5 } from '@/common/composables/amcharts5'; import ErrorHandler from '@/common/composables/error/errorHandler'; import { useProperRouteLocation } from '@/common/composables/proper-route-location'; -import WidgetDataTable from '@/common/modules/widgets/_components/WidgetDataTable.vue'; -import WidgetFrame from '@/common/modules/widgets/_components/WidgetFrame.vue'; -import { useWidgetColorSet } from '@/common/modules/widgets/_composables/use-widget-color-set'; -import { useWidgetLifecycle } from '@/common/modules/widgets/_composables/use-widget-lifecycle'; -import { useWidgetPagination } from '@/common/modules/widgets/_composables/use-widget-pagination'; -import { useWidget } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import { getRefinedXYChartData } from '@/common/modules/widgets/_helpers/widget-chart-data-helper'; + +import { DYNAMIC_COST_QUERY_SET_PARAMS } from '@/services/cost-explorer/constants/managed-cost-analysis-query-sets'; +import { COST_EXPLORER_ROUTE } from '@/services/cost-explorer/routes/route-constant'; +import WidgetDataTable from '@/services/dashboards/widgets/_components/WidgetDataTable.vue'; +import WidgetFrame from '@/services/dashboards/widgets/_components/WidgetFrame.vue'; +import { useWidgetColorSet } from '@/services/dashboards/widgets/_composables/use-widget-color-set'; +import { useWidgetLifecycle } from '@/services/dashboards/widgets/_composables/use-widget-lifecycle'; +import { useWidgetPagination } from '@/services/dashboards/widgets/_composables/use-widget-pagination'; +import { useWidget } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import { getRefinedXYChartData } from '@/services/dashboards/widgets/_helpers/widget-chart-data-helper'; import { getDateAxisSettings, getXYChartLegends, -} from '@/common/modules/widgets/_helpers/widget-chart-helper'; +} from '@/services/dashboards/widgets/_helpers/widget-chart-helper'; import { getWidgetDataTableRowLocation, getWidgetLocationFilters, -} from '@/common/modules/widgets/_helpers/widget-location-helper'; +} from '@/services/dashboards/widgets/_helpers/widget-location-helper'; import { getRefinedDateTableData, getWidgetTableDateFields, -} from '@/common/modules/widgets/_helpers/widget-table-helper'; -import { getWidgetValueLabel } from '@/common/modules/widgets/_helpers/widget-value-label-helper'; -import type { Field, WidgetTableData } from '@/common/modules/widgets/_types/widget-data-table-type'; +} from '@/services/dashboards/widgets/_helpers/widget-table-helper'; +import { getWidgetValueLabel } from '@/services/dashboards/widgets/_helpers/widget-value-label-helper'; +import type { Field, WidgetTableData } from '@/services/dashboards/widgets/_types/widget-data-table-type'; import type { WidgetExpose, WidgetProps, WidgetEmit, CostAnalyzeResponse, Legend, -} from '@/common/modules/widgets/_types/widget-type'; - -import { DYNAMIC_COST_QUERY_SET_PARAMS } from '@/services/cost-explorer/constants/managed-cost-analysis-query-sets'; -import { COST_EXPLORER_ROUTE } from '@/services/cost-explorer/routes/route-constant'; +} from '@/services/dashboards/widgets/_types/widget-type'; interface SubData { date: string; value: number } diff --git a/apps/web/src/common/modules/widgets/_base-widgets/base-trend/widget-config.ts b/apps/web/src/services/dashboards/widgets/_base-widgets/base-trend/widget-config.ts similarity index 100% rename from apps/web/src/common/modules/widgets/_base-widgets/base-trend/widget-config.ts rename to apps/web/src/services/dashboards/widgets/_base-widgets/base-trend/widget-config.ts diff --git a/apps/web/src/common/modules/widgets/_components/WidgetChartNoDataOverlay.vue b/apps/web/src/services/dashboards/widgets/_components/WidgetChartNoDataOverlay.vue similarity index 100% rename from apps/web/src/common/modules/widgets/_components/WidgetChartNoDataOverlay.vue rename to apps/web/src/services/dashboards/widgets/_components/WidgetChartNoDataOverlay.vue diff --git a/apps/web/src/common/modules/widgets/_components/WidgetDataTable.vue b/apps/web/src/services/dashboards/widgets/_components/WidgetDataTable.vue similarity index 99% rename from apps/web/src/common/modules/widgets/_components/WidgetDataTable.vue rename to apps/web/src/services/dashboards/widgets/_components/WidgetDataTable.vue index db78e4a0b8..8994d3c9f4 100644 --- a/apps/web/src/common/modules/widgets/_components/WidgetDataTable.vue +++ b/apps/web/src/services/dashboards/widgets/_components/WidgetDataTable.vue @@ -20,16 +20,15 @@ import { usageUnitFormatter } from '@/lib/helper/usage-formatter'; import { useProxyValue } from '@/common/composables/proxy-state'; import { useTextOverflowState } from '@/common/composables/text-overflow-state'; -import type { - Field, WidgetTableData, -} from '@/common/modules/widgets/_types/widget-data-table-type'; -import type { Legend } from '@/common/modules/widgets/_types/widget-type'; import { gray } from '@/styles/colors'; import { MASSIVE_CHART_COLORS, DISABLED_LEGEND_COLOR } from '@/styles/colorsets'; import type { AllReferenceTypeInfo } from '@/services/dashboards/stores/all-reference-type-info-store'; - +import type { + Field, WidgetTableData, +} from '@/services/dashboards/widgets/_types/widget-data-table-type'; +import type { Legend } from '@/services/dashboards/widgets/_types/widget-type'; type TableSize = 'sm' | 'md'; diff --git a/apps/web/src/common/modules/widgets/_components/WidgetFrame.vue b/apps/web/src/services/dashboards/widgets/_components/WidgetFrame.vue similarity index 99% rename from apps/web/src/common/modules/widgets/_components/WidgetFrame.vue rename to apps/web/src/services/dashboards/widgets/_components/WidgetFrame.vue index e98f5b339d..e41dfcac77 100644 --- a/apps/web/src/common/modules/widgets/_components/WidgetFrame.vue +++ b/apps/web/src/services/dashboards/widgets/_components/WidgetFrame.vue @@ -22,10 +22,10 @@ import type { Currency } from '@/store/modules/settings/type'; import getRandomId from '@/lib/random-id-generator'; import { useI18nDayjs } from '@/common/composables/i18n-dayjs'; -import type { WidgetTheme } from '@/common/modules/widgets/_types/widget-type'; import { red } from '@/styles/colors'; +import type { WidgetTheme } from '@/services/dashboards/widgets/_types/widget-type'; export interface WidgetFrameProps { diff --git a/apps/web/src/common/modules/widgets/_composables/use-widget-color-set.ts b/apps/web/src/services/dashboards/widgets/_composables/use-widget-color-set.ts similarity index 88% rename from apps/web/src/common/modules/widgets/_composables/use-widget-color-set.ts rename to apps/web/src/services/dashboards/widgets/_composables/use-widget-color-set.ts index 2d48181600..059ae02a65 100644 --- a/apps/web/src/common/modules/widgets/_composables/use-widget-color-set.ts +++ b/apps/web/src/services/dashboards/widgets/_composables/use-widget-color-set.ts @@ -1,12 +1,11 @@ import type { Ref } from 'vue'; import { computed, reactive } from 'vue'; - -import type { WidgetColorSetType, WidgetTheme } from '@/common/modules/widgets/_types/widget-type'; -import { WIDGET_THEMES } from '@/common/modules/widgets/_types/widget-type'; - import { palette } from '@/styles/colors'; +import type { WidgetColorSetType, WidgetTheme } from '@/services/dashboards/widgets/_types/widget-type'; +import { WIDGET_THEMES } from '@/services/dashboards/widgets/_types/widget-type'; + const getColorSet = (theme: WidgetTheme, colorSetType: WidgetColorSetType = 'basic'): string[] => { let colorSet = WIDGET_THEMES.map((d) => palette[d][400]); diff --git a/apps/web/src/common/modules/widgets/_composables/use-widget-lifecycle.ts b/apps/web/src/services/dashboards/widgets/_composables/use-widget-lifecycle.ts similarity index 95% rename from apps/web/src/common/modules/widgets/_composables/use-widget-lifecycle.ts rename to apps/web/src/services/dashboards/widgets/_composables/use-widget-lifecycle.ts index 6d2098f7ba..5848b1d921 100644 --- a/apps/web/src/common/modules/widgets/_composables/use-widget-lifecycle.ts +++ b/apps/web/src/services/dashboards/widgets/_composables/use-widget-lifecycle.ts @@ -16,13 +16,14 @@ import { i18n } from '@/translations'; import type { Currency } from '@/store/modules/settings/type'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import type { WidgetState } from '@/common/modules/widgets/_composables/use-widget/use-widget'; + +import type { WidgetState } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; import { validateWidgetByVariablesSchemaUpdate, -} from '@/common/modules/widgets/_helpers/widget-validation-helper'; +} from '@/services/dashboards/widgets/_helpers/widget-validation-helper'; import type { WidgetProps, WidgetEmit, -} from '@/common/modules/widgets/_types/widget-type'; +} from '@/services/dashboards/widgets/_types/widget-type'; interface UseWidgetLifecycleOptions { diff --git a/apps/web/src/common/modules/widgets/_composables/use-widget-pagination.ts b/apps/web/src/services/dashboards/widgets/_composables/use-widget-pagination.ts similarity index 78% rename from apps/web/src/common/modules/widgets/_composables/use-widget-pagination.ts rename to apps/web/src/services/dashboards/widgets/_composables/use-widget-pagination.ts index c21619a67e..99aa78ccfa 100644 --- a/apps/web/src/common/modules/widgets/_composables/use-widget-pagination.ts +++ b/apps/web/src/services/dashboards/widgets/_composables/use-widget-pagination.ts @@ -1,7 +1,7 @@ import type { UnwrapRef } from 'vue'; import { computed, ref } from 'vue'; -import type { MergedBaseWidgetState } from '@/common/modules/widgets/_composables/use-widget/merge-base-widget-state'; +import type { MergedBaseWidgetState } from '@/services/dashboards/widgets/_composables/use-widget/merge-base-widget-state'; export const useWidgetPagination = (mergedState: UnwrapRef) => { const thisPage = ref(1); diff --git a/apps/web/src/common/modules/widgets/_composables/use-widget/merge-base-widget-state.ts b/apps/web/src/services/dashboards/widgets/_composables/use-widget/merge-base-widget-state.ts similarity index 89% rename from apps/web/src/common/modules/widgets/_composables/use-widget/merge-base-widget-state.ts rename to apps/web/src/services/dashboards/widgets/_composables/use-widget/merge-base-widget-state.ts index 4fb96d496d..fb01170e4a 100644 --- a/apps/web/src/common/modules/widgets/_composables/use-widget/merge-base-widget-state.ts +++ b/apps/web/src/services/dashboards/widgets/_composables/use-widget/merge-base-widget-state.ts @@ -8,15 +8,15 @@ import type { } from '@/schema/dashboard/_types/dashboard-type'; import type { InheritOptions, WidgetConfig, WidgetOptions } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetConfig } from '@/common/modules/widgets/_helpers/widget-config-helper'; -import { getInitialWidgetInheritOptions } from '@/common/modules/widgets/_helpers/widget-inherit-options-helper'; +import { getWidgetConfig } from '@/services/dashboards/widgets/_helpers/widget-config-helper'; +import { getInitialWidgetInheritOptions } from '@/services/dashboards/widgets/_helpers/widget-inherit-options-helper'; import { getRefinedWidgetOptions, -} from '@/common/modules/widgets/_helpers/widget-options-helper'; +} from '@/services/dashboards/widgets/_helpers/widget-options-helper'; import { getInitialSchemaProperties, getRefinedSchemaProperties, -} from '@/common/modules/widgets/_helpers/widget-schema-helper'; -import { getWidgetInheritOptionsErrorMap } from '@/common/modules/widgets/_helpers/widget-validation-helper'; +} from '@/services/dashboards/widgets/_helpers/widget-schema-helper'; +import { getWidgetInheritOptionsErrorMap } from '@/services/dashboards/widgets/_helpers/widget-validation-helper'; export interface MergedBaseWidgetState { diff --git a/apps/web/src/common/modules/widgets/_composables/use-widget/use-base-widget-state.ts b/apps/web/src/services/dashboards/widgets/_composables/use-widget/use-base-widget-state.ts similarity index 93% rename from apps/web/src/common/modules/widgets/_composables/use-widget/use-base-widget-state.ts rename to apps/web/src/services/dashboards/widgets/_composables/use-widget/use-base-widget-state.ts index 462821cf10..6bf7cd0812 100644 --- a/apps/web/src/common/modules/widgets/_composables/use-widget/use-base-widget-state.ts +++ b/apps/web/src/services/dashboards/widgets/_composables/use-widget/use-base-widget-state.ts @@ -10,13 +10,13 @@ import type { import { CURRENCY } from '@/store/modules/settings/config'; import type { Currency } from '@/store/modules/settings/type'; -import type { MergedBaseWidgetState } from '@/common/modules/widgets/_composables/use-widget/merge-base-widget-state'; +import type { MergedBaseWidgetState } from '@/services/dashboards/widgets/_composables/use-widget/merge-base-widget-state'; import { mergeBaseWidgetState, -} from '@/common/modules/widgets/_composables/use-widget/merge-base-widget-state'; +} from '@/services/dashboards/widgets/_composables/use-widget/merge-base-widget-state'; import type { WidgetProps, -} from '@/common/modules/widgets/_types/widget-type'; +} from '@/services/dashboards/widgets/_types/widget-type'; /** * @description It returns states which is among the data generated by widget info and widget config through combination, diff --git a/apps/web/src/common/modules/widgets/_composables/use-widget/use-widget-console-filters.ts b/apps/web/src/services/dashboards/widgets/_composables/use-widget/use-widget-console-filters.ts similarity index 92% rename from apps/web/src/common/modules/widgets/_composables/use-widget/use-widget-console-filters.ts rename to apps/web/src/services/dashboards/widgets/_composables/use-widget/use-widget-console-filters.ts index 894e38d840..52c1f2429a 100644 --- a/apps/web/src/common/modules/widgets/_composables/use-widget/use-widget-console-filters.ts +++ b/apps/web/src/services/dashboards/widgets/_composables/use-widget/use-widget-console-filters.ts @@ -8,9 +8,9 @@ import type { ConsoleFilter } from '@cloudforet/core-lib/query/type'; import type { WidgetFiltersMap } from '@/schema/dashboard/_types/widget-type'; -import type { BaseWidgetState } from '@/common/modules/widgets/_composables/use-widget/use-base-widget-state'; -import type { OverridableWidgetState } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import type { WidgetProps } from '@/common/modules/widgets/_types/widget-type'; +import type { BaseWidgetState } from '@/services/dashboards/widgets/_composables/use-widget/use-base-widget-state'; +import type { OverridableWidgetState } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import type { WidgetProps } from '@/services/dashboards/widgets/_types/widget-type'; export const useWidgetConsoleFilters = (props: WidgetProps, widgetState: UnwrapRef, overrides: OverridableWidgetState = {}): ComputedRef => { const queryHelper = new QueryHelper(); diff --git a/apps/web/src/common/modules/widgets/_composables/use-widget/use-widget-date-range.ts b/apps/web/src/services/dashboards/widgets/_composables/use-widget/use-widget-date-range.ts similarity index 75% rename from apps/web/src/common/modules/widgets/_composables/use-widget/use-widget-date-range.ts rename to apps/web/src/services/dashboards/widgets/_composables/use-widget/use-widget-date-range.ts index 82c248db0d..2e5abc50d9 100644 --- a/apps/web/src/common/modules/widgets/_composables/use-widget/use-widget-date-range.ts +++ b/apps/web/src/services/dashboards/widgets/_composables/use-widget/use-widget-date-range.ts @@ -7,9 +7,9 @@ import dayjs from 'dayjs'; import { GRANULARITY } from '@/schema/dashboard/_constants/widget-constant'; import type { DateRange } from '@/schema/dashboard/_types/dashboard-type'; -import type { BaseWidgetState } from '@/common/modules/widgets/_composables/use-widget/use-base-widget-state'; -import type { OverridableWidgetState } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import type { WidgetProps } from '@/common/modules/widgets/_types/widget-type'; +import type { BaseWidgetState } from '@/services/dashboards/widgets/_composables/use-widget/use-base-widget-state'; +import type { OverridableWidgetState } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import type { WidgetProps } from '@/services/dashboards/widgets/_types/widget-type'; export const useWidgetDateRange = (props: WidgetProps, widgetState: UnwrapRef, overrides: OverridableWidgetState = {}): ComputedRef => { if (isRef(overrides.dateRange)) return overrides.dateRange; diff --git a/apps/web/src/common/modules/widgets/_composables/use-widget/use-widget-frame.ts b/apps/web/src/services/dashboards/widgets/_composables/use-widget/use-widget-frame.ts similarity index 90% rename from apps/web/src/common/modules/widgets/_composables/use-widget/use-widget-frame.ts rename to apps/web/src/services/dashboards/widgets/_composables/use-widget/use-widget-frame.ts index 888693c015..ad626a352c 100644 --- a/apps/web/src/common/modules/widgets/_composables/use-widget/use-widget-frame.ts +++ b/apps/web/src/services/dashboards/widgets/_composables/use-widget/use-widget-frame.ts @@ -10,10 +10,10 @@ import type { Currency } from '@/store/modules/settings/type'; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore -import type { WidgetFrameProps } from '@/common/modules/widgets/_components/WidgetFrame.vue'; -import type { WidgetState } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import { getNonInheritedWidgetOptionNamesAmongUsedVariables } from '@/common/modules/widgets/_helpers/widget-schema-helper'; -import type { WidgetEmit, WidgetProps } from '@/common/modules/widgets/_types/widget-type'; +import type { WidgetFrameProps } from '@/services/dashboards/widgets/_components/WidgetFrame.vue'; +import type { WidgetState } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import { getNonInheritedWidgetOptionNamesAmongUsedVariables } from '@/services/dashboards/widgets/_helpers/widget-schema-helper'; +import type { WidgetEmit, WidgetProps } from '@/services/dashboards/widgets/_types/widget-type'; export interface WidgetFrameOptions { dateRange?: DateRange|ComputedRef; diff --git a/apps/web/src/common/modules/widgets/_composables/use-widget/use-widget-location.ts b/apps/web/src/services/dashboards/widgets/_composables/use-widget/use-widget-location.ts similarity index 92% rename from apps/web/src/common/modules/widgets/_composables/use-widget/use-widget-location.ts rename to apps/web/src/services/dashboards/widgets/_composables/use-widget/use-widget-location.ts index 2bfcd2b30e..9fea416b38 100644 --- a/apps/web/src/common/modules/widgets/_composables/use-widget/use-widget-location.ts +++ b/apps/web/src/services/dashboards/widgets/_composables/use-widget/use-widget-location.ts @@ -11,14 +11,14 @@ import type { DateRange } from '@/schema/dashboard/_types/dashboard-type'; import { arrayToQueryString, objectToQueryString, primitiveToQueryString } from '@/lib/router-query-string'; import { useProperRouteLocation } from '@/common/composables/proper-route-location'; -import type { BaseWidgetState } from '@/common/modules/widgets/_composables/use-widget/use-base-widget-state'; -import type { OverridableWidgetState } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import { getWidgetLocationFilters } from '@/common/modules/widgets/_helpers/widget-location-helper'; -import type { WidgetProps } from '@/common/modules/widgets/_types/widget-type'; import { ASSET_INVENTORY_ROUTE } from '@/services/asset-inventory/routes/route-constant'; import { DYNAMIC_COST_QUERY_SET_PARAMS } from '@/services/cost-explorer/constants/managed-cost-analysis-query-sets'; import { COST_EXPLORER_ROUTE } from '@/services/cost-explorer/routes/route-constant'; +import type { BaseWidgetState } from '@/services/dashboards/widgets/_composables/use-widget/use-base-widget-state'; +import type { OverridableWidgetState } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import { getWidgetLocationFilters } from '@/services/dashboards/widgets/_helpers/widget-location-helper'; +import type { WidgetProps } from '@/services/dashboards/widgets/_types/widget-type'; export const useWidgetLocation = (props: WidgetProps, baseState: UnwrapRef, dateRange: ComputedRef, overrides: OverridableWidgetState = {}) => { diff --git a/apps/web/src/common/modules/widgets/_composables/use-widget/use-widget.ts b/apps/web/src/services/dashboards/widgets/_composables/use-widget/use-widget.ts similarity index 80% rename from apps/web/src/common/modules/widgets/_composables/use-widget/use-widget.ts rename to apps/web/src/services/dashboards/widgets/_composables/use-widget/use-widget.ts index 4e269fc485..64c9a286d1 100644 --- a/apps/web/src/common/modules/widgets/_composables/use-widget/use-widget.ts +++ b/apps/web/src/services/dashboards/widgets/_composables/use-widget/use-widget.ts @@ -14,13 +14,13 @@ import type { DateRange } from '@/schema/dashboard/_types/dashboard-type'; import type { BaseWidgetState, -} from '@/common/modules/widgets/_composables/use-widget/use-base-widget-state'; -import { useBaseWidgetState } from '@/common/modules/widgets/_composables/use-widget/use-base-widget-state'; -import { useWidgetConsoleFilters } from '@/common/modules/widgets/_composables/use-widget/use-widget-console-filters'; -import { useWidgetDateRange } from '@/common/modules/widgets/_composables/use-widget/use-widget-date-range'; -import { useWidgetFrame } from '@/common/modules/widgets/_composables/use-widget/use-widget-frame'; -import { useWidgetLocation } from '@/common/modules/widgets/_composables/use-widget/use-widget-location'; -import type { WidgetEmit, WidgetProps } from '@/common/modules/widgets/_types/widget-type'; +} from '@/services/dashboards/widgets/_composables/use-widget/use-base-widget-state'; +import { useBaseWidgetState } from '@/services/dashboards/widgets/_composables/use-widget/use-base-widget-state'; +import { useWidgetConsoleFilters } from '@/services/dashboards/widgets/_composables/use-widget/use-widget-console-filters'; +import { useWidgetDateRange } from '@/services/dashboards/widgets/_composables/use-widget/use-widget-date-range'; +import { useWidgetFrame } from '@/services/dashboards/widgets/_composables/use-widget/use-widget-frame'; +import { useWidgetLocation } from '@/services/dashboards/widgets/_composables/use-widget/use-widget-location'; +import type { WidgetEmit, WidgetProps } from '@/services/dashboards/widgets/_types/widget-type'; export interface OverridableWidgetState { dateRange?: DateRange|ComputedRef; // overrides dateRange diff --git a/apps/web/src/common/modules/widgets/_constants/compliance-constant.ts b/apps/web/src/services/dashboards/widgets/_constants/compliance-constant.ts similarity index 100% rename from apps/web/src/common/modules/widgets/_constants/compliance-constant.ts rename to apps/web/src/services/dashboards/widgets/_constants/compliance-constant.ts diff --git a/apps/web/src/common/modules/widgets/_constants/managed-widget-options-schema.ts b/apps/web/src/services/dashboards/widgets/_constants/managed-widget-options-schema.ts similarity index 100% rename from apps/web/src/common/modules/widgets/_constants/managed-widget-options-schema.ts rename to apps/web/src/services/dashboards/widgets/_constants/managed-widget-options-schema.ts diff --git a/apps/web/src/services/dashboards/widgets/_constants/widget-components-constant.ts b/apps/web/src/services/dashboards/widgets/_constants/widget-components-constant.ts new file mode 100644 index 0000000000..2e4eb03c2e --- /dev/null +++ b/apps/web/src/services/dashboards/widgets/_constants/widget-components-constant.ts @@ -0,0 +1,63 @@ +import type { AsyncComponent } from 'vue'; + +import type { BaseWidgetConfigKey, WidgetConfigKey } from '@/services/dashboards/widgets/_types/widget-list-type'; + +const BASE_WIDGET_COMPONENTS: Record = { + baseTrend: () => ({ + component: import('@/services/dashboards/widgets/_base-widgets/base-trend/BaseTrendWidget.vue'), + }), + basePie: () => ({ + component: import('@/services/dashboards/widgets/_base-widgets/base-pie/BasePieWidget.vue'), + }), + baseCountOfFindings: () => ({ + component: import('@/services/dashboards/widgets/_base-widgets/base-count-of-findings/BaseCountOfFindingsWidget.vue'), + }), +}; + +export const WIDGET_COMPONENTS: Record = { + monthlyCost: () => ({ + component: import('@/services/dashboards/widgets/cost-widgets/monthly-cost/MonthlyCostWidget.vue'), + }), + budgetUsageSummary: () => ({ + component: import('@/services/dashboards/widgets/cost-widgets/budget-usage-summary/BudgetUsageSummaryWidget.vue'), + }), + costMap: () => ({ + component: import('@/services/dashboards/widgets/cost-widgets/cost-map/CostMapWidget.vue'), + }), + costTrend: BASE_WIDGET_COMPONENTS.baseTrend, + costTrendStacked: BASE_WIDGET_COMPONENTS.baseTrend, + costSummaryMultiFields: () => ({ + component: import('@/services/dashboards/widgets/cost-widgets/cost-summary-multi-fields/CostSummaryMultiFieldsWidget.vue'), + }), + costPie: BASE_WIDGET_COMPONENTS.basePie, + costDonut: BASE_WIDGET_COMPONENTS.basePie, + costByRegion: () => ({ + component: import('@/services/dashboards/widgets/cost-widgets/cost-by-region/CostByRegionWidget.vue'), + }), + costByRegionMultiFields: () => ({ + component: import('@/services/dashboards/widgets/cost-widgets/cost-by-region-multi-fields/CostByRegionMultiFieldsWidget.vue'), + }), + budgetStatus: () => ({ + component: import('@/services/dashboards/widgets/cost-widgets/budget-status/BudgetStatusWidget.vue'), + }), + budgetUsageByTarget: () => ({ + component: import('@/services/dashboards/widgets/cost-widgets/budget-usage-by-target/BudgetUsageByTargetWidget.vue'), + }), + severityStatusByService: () => ({ + component: import('@/services/dashboards/widgets/asset-widgets/severity-status-by-service/SeverityStatusByServiceWidget.vue'), + }), + countOfFailFindings: BASE_WIDGET_COMPONENTS.baseCountOfFindings, + countOfPassAndFailFindings: BASE_WIDGET_COMPONENTS.baseCountOfFindings, + trendOfPassAndFailFindings: () => ({ + component: import('@/services/dashboards/widgets/asset-widgets/trend-of-pass-and-fail-findings/TrendOfPassAndFailFindingsWidget.vue'), + }), + totalFailFindingsStatus: () => ({ + component: import('@/services/dashboards/widgets/asset-widgets/total-fail-findings-status/TotalFailFindingsStatusWidget.vue'), + }), + totalFailFindingsHistory: () => ({ + component: import('@/services/dashboards/widgets/asset-widgets/total-fail-findings-history/TotalFailFindingsHistoryWidget.vue'), + }), + complianceStatus: () => ({ + component: import('@/services/dashboards/widgets/asset-widgets/compliance-status/ComplianceStatusWidget.vue'), + }), +}; diff --git a/apps/web/src/services/dashboards/widgets/_constants/widget-config-list-constant.ts b/apps/web/src/services/dashboards/widgets/_constants/widget-config-list-constant.ts new file mode 100644 index 0000000000..a874208c4f --- /dev/null +++ b/apps/web/src/services/dashboards/widgets/_constants/widget-config-list-constant.ts @@ -0,0 +1,87 @@ +/* eslint-disable import/order */ +// base widgets +import baseCountOfFindings from '@/services/dashboards/widgets/_base-widgets/base-count-of-findings/widget-config'; +import basePie from '@/services/dashboards/widgets/_base-widgets/base-pie/widget-config'; +import baseTrend from '@/services/dashboards/widgets/_base-widgets/base-trend/widget-config'; + +// console widgets +import complianceStatus from '@/services/dashboards/widgets/asset-widgets/compliance-status/widget-config'; +import countOfFailFindings from '@/services/dashboards/widgets/asset-widgets/count-of-fail-findings/widget-config'; +import countOfPassAndFailFindings from '@/services/dashboards/widgets/asset-widgets/count-of-pass-and-fail-findings/widget-config'; +import severityStatusByService from '@/services/dashboards/widgets/asset-widgets/severity-status-by-service/widget-config'; +import totalFailFindingsHistory from '@/services/dashboards/widgets/asset-widgets/total-fail-findings-history/widget-config'; +import totalFailFindingsStatus from '@/services/dashboards/widgets/asset-widgets/total-fail-findings-status/widget-config'; +import trendOfPassAndFailFindings from '@/services/dashboards/widgets/asset-widgets/trend-of-pass-and-fail-findings/widget-config'; +import budgetStatus from '@/services/dashboards/widgets/cost-widgets/budget-status/widget-config'; +import budgetUsageByTarget from '@/services/dashboards/widgets/cost-widgets/budget-usage-by-target/widget-config'; +import budgetUsageSummary from '@/services/dashboards/widgets/cost-widgets/budget-usage-summary/widget-config'; +import costByRegionMultiFields from '@/services/dashboards/widgets/cost-widgets/cost-by-region-multi-fields/widget-config'; +import costByRegion from '@/services/dashboards/widgets/cost-widgets/cost-by-region/widget-config'; +import costDonut from '@/services/dashboards/widgets/cost-widgets/cost-donut/widget-config'; +import costMap from '@/services/dashboards/widgets/cost-widgets/cost-map/widget-config'; +import costPie from '@/services/dashboards/widgets/cost-widgets/cost-pie/widget-config'; +import costSummaryMultiFields from '@/services/dashboards/widgets/cost-widgets/cost-summary-multi-fields/widget-config'; +import costTrendStacked from '@/services/dashboards/widgets/cost-widgets/cost-trend-stacked/widget-config'; +import costTrend from '@/services/dashboards/widgets/cost-widgets/cost-trend/widget-config'; +import monthlyCost from '@/services/dashboards/widgets/cost-widgets/monthly-cost/widget-config'; + +import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; +import type { BaseWidgetConfigKey, WidgetConfigKey } from '@/services/dashboards/widgets/_types/widget-list-type'; + +export const BASE_WIDGET_CONFIG_KEYS = [ + 'baseTrend', + 'basePie', + 'baseCountOfFindings', +] as const; +export const CONSOLE_WIDGET_CONFIG_KEYS = [ + 'monthlyCost', + 'budgetUsageSummary', + 'costMap', + 'costTrend', + 'costTrendStacked', + 'costSummaryMultiFields', + 'costPie', + 'costDonut', + 'costByRegion', + 'costByRegionMultiFields', + 'budgetStatus', + 'budgetUsageByTarget', + 'severityStatusByService', + 'countOfFailFindings', + 'countOfPassAndFailFindings', + 'trendOfPassAndFailFindings', + 'totalFailFindingsStatus', + 'totalFailFindingsHistory', + 'complianceStatus', +] as const; + + +export const CONSOLE_WIDGET_CONFIGS: Record> = { + // Cost Widgets + monthlyCost, + budgetUsageSummary, + costMap, + costTrend, + costTrendStacked, + costSummaryMultiFields, + costPie, + costDonut, + costByRegion, + costByRegionMultiFields, + budgetStatus, + budgetUsageByTarget, + // Asset Widgets + severityStatusByService, + countOfFailFindings, + countOfPassAndFailFindings, + trendOfPassAndFailFindings, + totalFailFindingsStatus, + totalFailFindingsHistory, + complianceStatus, +}; + +export const BASE_WIDGET_CONFIGS: Record> = { + baseTrend, + basePie, + baseCountOfFindings, +}; diff --git a/apps/web/src/common/modules/widgets/_constants/widget-constant.ts b/apps/web/src/services/dashboards/widgets/_constants/widget-constant.ts similarity index 100% rename from apps/web/src/common/modules/widgets/_constants/widget-constant.ts rename to apps/web/src/services/dashboards/widgets/_constants/widget-constant.ts diff --git a/apps/web/src/common/modules/widgets/_helpers/__tests__/widget-chart-data-helper.test.ts b/apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-chart-data-helper.test.ts similarity index 97% rename from apps/web/src/common/modules/widgets/_helpers/__tests__/widget-chart-data-helper.test.ts rename to apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-chart-data-helper.test.ts index c4c92fb185..bff438bbc3 100644 --- a/apps/web/src/common/modules/widgets/_helpers/__tests__/widget-chart-data-helper.test.ts +++ b/apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-chart-data-helper.test.ts @@ -1,7 +1,7 @@ import { range } from 'lodash'; import { describe, it, expect } from 'vitest'; -import { getRefinedXYChartData } from '@/common/modules/widgets/_helpers/widget-chart-data-helper'; +import { getRefinedXYChartData } from '@/services/dashboards/widgets/_helpers/widget-chart-data-helper'; interface SubData { date: string; diff --git a/apps/web/src/common/modules/widgets/_helpers/__tests__/widget-config-helper.test.ts b/apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-config-helper.test.ts similarity index 83% rename from apps/web/src/common/modules/widgets/_helpers/__tests__/widget-config-helper.test.ts rename to apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-config-helper.test.ts index 6bca236371..62c2d142c4 100644 --- a/apps/web/src/common/modules/widgets/_helpers/__tests__/widget-config-helper.test.ts +++ b/apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-config-helper.test.ts @@ -3,9 +3,9 @@ import { // expect, it } from 'vitest'; -// import basePieWidgetConfig from '@/common/modules/widgets/_base/base-pie/widget-config'; -// import { getWidgetConfig } from '@/common/modules/widgets/_helpers/widget-helper'; -// import costPieWidgetConfig from '@/common/modules/widgets/cost-widgets/cost-pie/widget-config'; +// import basePieWidgetConfig from '@/services/dashboards/widgets/_base/base-pie/widget-config'; +// import { getWidgetConfig } from '@/services/dashboards/widgets/_helpers/widget-helper'; +// import costPieWidgetConfig from '@/services/dashboards/widgets/cost-widgets/cost-pie/widget-config'; // const costPieConfigId = costPieWidgetConfig.widget_config_id; // const basePieConfigId = basePieWidgetConfig.widget_config_id; diff --git a/apps/web/src/common/modules/widgets/_helpers/__tests__/widget-inherit-options-helper.test.ts b/apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-inherit-options-helper.test.ts similarity index 99% rename from apps/web/src/common/modules/widgets/_helpers/__tests__/widget-inherit-options-helper.test.ts rename to apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-inherit-options-helper.test.ts index 649ca3fd9d..0ad7de6492 100644 --- a/apps/web/src/common/modules/widgets/_helpers/__tests__/widget-inherit-options-helper.test.ts +++ b/apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-inherit-options-helper.test.ts @@ -7,7 +7,7 @@ import type { InheritOptions, WidgetConfig, WidgetOptionsSchema } from '@/schema import { getInheritingOptionKeys, getInitialWidgetInheritOptions, -} from '@/common/modules/widgets/_helpers/widget-inherit-options-helper'; +} from '@/services/dashboards/widgets/_helpers/widget-inherit-options-helper'; diff --git a/apps/web/src/common/modules/widgets/_helpers/__tests__/widget-options-filters-helper.test.ts b/apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-options-filters-helper.test.ts similarity index 94% rename from apps/web/src/common/modules/widgets/_helpers/__tests__/widget-options-filters-helper.test.ts rename to apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-options-filters-helper.test.ts index 87ce5fb234..9eaa7af7e0 100644 --- a/apps/web/src/common/modules/widgets/_helpers/__tests__/widget-options-filters-helper.test.ts +++ b/apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-options-filters-helper.test.ts @@ -1,6 +1,6 @@ import type { WidgetFilterKey, WidgetFiltersMap } from '@/schema/dashboard/_types/widget-type'; -import { setFilterAndGetWidgetFiltersMap } from '@/common/modules/widgets/_helpers/widget-options-filters-helper'; +import { setFilterAndGetWidgetFiltersMap } from '@/services/dashboards/widgets/_helpers/widget-options-filters-helper'; describe('[Widget Options Filters Helper] setFilterAndGetWidgetFiltersMap', () => { diff --git a/apps/web/src/common/modules/widgets/_helpers/__tests__/widget-schema-helper.test.ts b/apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-schema-helper.test.ts similarity index 99% rename from apps/web/src/common/modules/widgets/_helpers/__tests__/widget-schema-helper.test.ts rename to apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-schema-helper.test.ts index 97d67544a9..a1fff9193d 100644 --- a/apps/web/src/common/modules/widgets/_helpers/__tests__/widget-schema-helper.test.ts +++ b/apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-schema-helper.test.ts @@ -6,7 +6,7 @@ import type { InheritOptions, WidgetConfig, WidgetOptions } from '@/schema/dashb import { getInitialSchemaProperties, getNonInheritedWidgetOptionNamesAmongUsedVariables, getRefinedSchemaProperties, getWidgetOptionKeyByVariableKey, -} from '@/common/modules/widgets/_helpers/widget-schema-helper'; +} from '@/services/dashboards/widgets/_helpers/widget-schema-helper'; const DEFAULT_WIDGET_CONFIG = { widget_config_id: 'test', diff --git a/apps/web/src/common/modules/widgets/_helpers/__tests__/widget-value-label-helper.test.ts b/apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-value-label-helper.test.ts similarity index 97% rename from apps/web/src/common/modules/widgets/_helpers/__tests__/widget-value-label-helper.test.ts rename to apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-value-label-helper.test.ts index 12713942c6..2f2235dbac 100644 --- a/apps/web/src/common/modules/widgets/_helpers/__tests__/widget-value-label-helper.test.ts +++ b/apps/web/src/services/dashboards/widgets/_helpers/__tests__/widget-value-label-helper.test.ts @@ -1,8 +1,7 @@ import { describe } from 'vitest'; -import { getWidgetValueLabel } from '@/common/modules/widgets/_helpers/widget-value-label-helper'; - import type { AllReferenceTypeInfo } from '@/services/dashboards/stores/all-reference-type-info-store'; +import { getWidgetValueLabel } from '@/services/dashboards/widgets/_helpers/widget-value-label-helper'; const mockAllReferenceTypeInfo: AllReferenceTypeInfo = { provider: { diff --git a/apps/web/src/common/modules/widgets/_helpers/widget-chart-data-helper.ts b/apps/web/src/services/dashboards/widgets/_helpers/widget-chart-data-helper.ts similarity index 100% rename from apps/web/src/common/modules/widgets/_helpers/widget-chart-data-helper.ts rename to apps/web/src/services/dashboards/widgets/_helpers/widget-chart-data-helper.ts diff --git a/apps/web/src/common/modules/widgets/_helpers/widget-chart-helper.ts b/apps/web/src/services/dashboards/widgets/_helpers/widget-chart-helper.ts similarity index 97% rename from apps/web/src/common/modules/widgets/_helpers/widget-chart-helper.ts rename to apps/web/src/services/dashboards/widgets/_helpers/widget-chart-helper.ts index d51fb85faa..38c1290959 100644 --- a/apps/web/src/common/modules/widgets/_helpers/widget-chart-helper.ts +++ b/apps/web/src/services/dashboards/widgets/_helpers/widget-chart-helper.ts @@ -6,11 +6,10 @@ import { COST_DATA_FIELD_MAP, GRANULARITY } from '@/schema/dashboard/_constants/ import type { DateRange } from '@/schema/dashboard/_types/dashboard-type'; import type { Granularity } from '@/schema/dashboard/_types/widget-type'; +import type { AllReferenceTypeInfo } from '@/services/dashboards/stores/all-reference-type-info-store'; import type { Legend, -} from '@/common/modules/widgets/_types/widget-type'; - -import type { AllReferenceTypeInfo } from '@/services/dashboards/stores/all-reference-type-info-store'; +} from '@/services/dashboards/widgets/_types/widget-type'; interface RawData { diff --git a/apps/web/src/common/modules/widgets/_helpers/widget-component-helper.ts b/apps/web/src/services/dashboards/widgets/_helpers/widget-component-helper.ts similarity index 71% rename from apps/web/src/common/modules/widgets/_helpers/widget-component-helper.ts rename to apps/web/src/services/dashboards/widgets/_helpers/widget-component-helper.ts index 71ceec2bf7..6b2d7c6b44 100644 --- a/apps/web/src/common/modules/widgets/_helpers/widget-component-helper.ts +++ b/apps/web/src/services/dashboards/widgets/_helpers/widget-component-helper.ts @@ -1,7 +1,7 @@ import type { AsyncComponent } from 'vue'; -import { WIDGET_COMPONENTS } from '@/common/modules/widgets/_constants/widget-components-constant'; -import { getWidgetConfig } from '@/common/modules/widgets/_helpers/widget-config-helper'; +import { WIDGET_COMPONENTS } from '@/services/dashboards/widgets/_constants/widget-components-constant'; +import { getWidgetConfig } from '@/services/dashboards/widgets/_helpers/widget-config-helper'; export const getWidgetComponent = (widgetConfigId: string): AsyncComponent => { const config = getWidgetConfig(widgetConfigId); diff --git a/apps/web/src/common/modules/widgets/_helpers/widget-config-helper.ts b/apps/web/src/services/dashboards/widgets/_helpers/widget-config-helper.ts similarity index 94% rename from apps/web/src/common/modules/widgets/_helpers/widget-config-helper.ts rename to apps/web/src/services/dashboards/widgets/_helpers/widget-config-helper.ts index d100c29c3b..3fec3e09e5 100644 --- a/apps/web/src/common/modules/widgets/_helpers/widget-config-helper.ts +++ b/apps/web/src/services/dashboards/widgets/_helpers/widget-config-helper.ts @@ -2,7 +2,7 @@ import { mergeWith } from 'lodash'; import type { WidgetConfig, BaseConfigInfo } from '@/schema/dashboard/_types/widget-type'; -import { BASE_WIDGET_CONFIGS, CONSOLE_WIDGET_CONFIGS } from '@/common/modules/widgets/_constants/widget-config-list-constant'; +import { BASE_WIDGET_CONFIGS, CONSOLE_WIDGET_CONFIGS } from '@/services/dashboards/widgets/_constants/widget-config-list-constant'; const _mergeCustomizer = (val1, val2) => { if (Array.isArray(val1)) return [...new Set(val1.concat(val2))]; diff --git a/apps/web/src/common/modules/widgets/_helpers/widget-inherit-options-helper.ts b/apps/web/src/services/dashboards/widgets/_helpers/widget-inherit-options-helper.ts similarity index 100% rename from apps/web/src/common/modules/widgets/_helpers/widget-inherit-options-helper.ts rename to apps/web/src/services/dashboards/widgets/_helpers/widget-inherit-options-helper.ts diff --git a/apps/web/src/common/modules/widgets/_helpers/widget-location-helper.ts b/apps/web/src/services/dashboards/widgets/_helpers/widget-location-helper.ts similarity index 94% rename from apps/web/src/common/modules/widgets/_helpers/widget-location-helper.ts rename to apps/web/src/services/dashboards/widgets/_helpers/widget-location-helper.ts index fb70f1b140..d7acb2ce1d 100644 --- a/apps/web/src/common/modules/widgets/_helpers/widget-location-helper.ts +++ b/apps/web/src/services/dashboards/widgets/_helpers/widget-location-helper.ts @@ -8,7 +8,7 @@ import type { WidgetFiltersMap } from '@/schema/dashboard/_types/widget-type'; import { arrayToQueryString, queryStringToArray } from '@/lib/router-query-string'; -import type { WidgetTableData } from '@/common/modules/widgets/_types/widget-data-table-type'; +import type { WidgetTableData } from '@/services/dashboards/widgets/_types/widget-data-table-type'; diff --git a/apps/web/src/common/modules/widgets/_helpers/widget-options-filters-helper.ts b/apps/web/src/services/dashboards/widgets/_helpers/widget-options-filters-helper.ts similarity index 92% rename from apps/web/src/common/modules/widgets/_helpers/widget-options-filters-helper.ts rename to apps/web/src/services/dashboards/widgets/_helpers/widget-options-filters-helper.ts index b4e9f2801b..8a77bbe360 100644 --- a/apps/web/src/common/modules/widgets/_helpers/widget-options-filters-helper.ts +++ b/apps/web/src/services/dashboards/widgets/_helpers/widget-options-filters-helper.ts @@ -4,7 +4,7 @@ import type { WidgetFiltersMap, WidgetFilterKey } from '@/schema/dashboard/_type import { MANAGED_VARIABLE_MODELS } from '@/lib/variable-models/managed-model-config/base-managed-model-config'; -import { MANAGED_WIDGET_FILTERS_SCHEMA_PROPERTIES } from '@/common/modules/widgets/_constants/managed-widget-options-schema'; +import { MANAGED_WIDGET_FILTERS_SCHEMA_PROPERTIES } from '@/services/dashboards/widgets/_constants/managed-widget-options-schema'; /** diff --git a/apps/web/src/common/modules/widgets/_helpers/widget-options-helper.ts b/apps/web/src/services/dashboards/widgets/_helpers/widget-options-helper.ts similarity index 95% rename from apps/web/src/common/modules/widgets/_helpers/widget-options-helper.ts rename to apps/web/src/services/dashboards/widgets/_helpers/widget-options-helper.ts index 4085b0060f..2fbcde928c 100644 --- a/apps/web/src/common/modules/widgets/_helpers/widget-options-helper.ts +++ b/apps/web/src/services/dashboards/widgets/_helpers/widget-options-helper.ts @@ -5,7 +5,7 @@ import type { InheritOptions, WidgetConfig, WidgetOptions, WidgetFilterKey, } from '@/schema/dashboard/_types/widget-type'; -import { setFilterAndGetWidgetFiltersMap } from '@/common/modules/widgets/_helpers/widget-options-filters-helper'; +import { setFilterAndGetWidgetFiltersMap } from '@/services/dashboards/widgets/_helpers/widget-options-filters-helper'; export const getRefinedWidgetOptions = ( diff --git a/apps/web/src/common/modules/widgets/_helpers/widget-options-schema-generator.ts b/apps/web/src/services/dashboards/widgets/_helpers/widget-options-schema-generator.ts similarity index 95% rename from apps/web/src/common/modules/widgets/_helpers/widget-options-schema-generator.ts rename to apps/web/src/services/dashboards/widgets/_helpers/widget-options-schema-generator.ts index 3a65e8eeaa..12e0f83870 100644 --- a/apps/web/src/common/modules/widgets/_helpers/widget-options-schema-generator.ts +++ b/apps/web/src/services/dashboards/widgets/_helpers/widget-options-schema-generator.ts @@ -3,7 +3,7 @@ import type { WidgetOptionKey, WidgetOptionsSchema, WidgetOptionsSchemaProperty import { MANAGED_WIDGET_FILTERS_SCHEMA_PROPERTIES, MANAGED_WIDGET_OPTIONS_SCHEMA_PROPERTIES, -} from '@/common/modules/widgets/_constants/managed-widget-options-schema'; +} from '@/services/dashboards/widgets/_constants/managed-widget-options-schema'; type CustomOptionTuple = [WidgetOptionKey, Partial]; export const getWidgetOptionsSchema = (options: (WidgetOptionKey|CustomOptionTuple)[]): WidgetOptionsSchema => { diff --git a/apps/web/src/common/modules/widgets/_helpers/widget-schema-helper.ts b/apps/web/src/services/dashboards/widgets/_helpers/widget-schema-helper.ts similarity index 97% rename from apps/web/src/common/modules/widgets/_helpers/widget-schema-helper.ts rename to apps/web/src/services/dashboards/widgets/_helpers/widget-schema-helper.ts index 85e06d30f5..e2954bcde6 100644 --- a/apps/web/src/common/modules/widgets/_helpers/widget-schema-helper.ts +++ b/apps/web/src/services/dashboards/widgets/_helpers/widget-schema-helper.ts @@ -5,7 +5,7 @@ import type { InheritOptions, WidgetConfig, WidgetFilterOptionKey, WidgetOptions, WidgetOptionsSchema, } from '@/schema/dashboard/_types/widget-type'; -import { MANAGED_WIDGET_FILTERS_SCHEMA_PROPERTIES, MANAGED_WIDGET_OPTIONS_SCHEMA_PROPERTIES } from '@/common/modules/widgets/_constants/managed-widget-options-schema'; +import { MANAGED_WIDGET_FILTERS_SCHEMA_PROPERTIES, MANAGED_WIDGET_OPTIONS_SCHEMA_PROPERTIES } from '@/services/dashboards/widgets/_constants/managed-widget-options-schema'; const VAR_KEY_TO_OPTION_KEY_MAP = {}; Object.entries(MANAGED_WIDGET_FILTERS_SCHEMA_PROPERTIES).forEach(([optionKey, property]) => { diff --git a/apps/web/src/common/modules/widgets/_helpers/widget-table-helper.ts b/apps/web/src/services/dashboards/widgets/_helpers/widget-table-helper.ts similarity index 97% rename from apps/web/src/common/modules/widgets/_helpers/widget-table-helper.ts rename to apps/web/src/services/dashboards/widgets/_helpers/widget-table-helper.ts index 021ba8ea3e..fc93bb3c5a 100644 --- a/apps/web/src/common/modules/widgets/_helpers/widget-table-helper.ts +++ b/apps/web/src/services/dashboards/widgets/_helpers/widget-table-helper.ts @@ -8,9 +8,8 @@ import type { Granularity } from '@/schema/dashboard/_types/widget-type'; import type { ManagedVariableModelKey } from '@/lib/variable-models/managed-model-config/base-managed-model-config'; -import type { Field } from '@/common/modules/widgets/_types/widget-data-table-type'; - import type { AllReferenceTypeInfo } from '@/services/dashboards/stores/all-reference-type-info-store'; +import type { Field } from '@/services/dashboards/widgets/_types/widget-data-table-type'; /** * @name getWidgetTableDateFields diff --git a/apps/web/src/common/modules/widgets/_helpers/widget-validation-helper.ts b/apps/web/src/services/dashboards/widgets/_helpers/widget-validation-helper.ts similarity index 97% rename from apps/web/src/common/modules/widgets/_helpers/widget-validation-helper.ts rename to apps/web/src/services/dashboards/widgets/_helpers/widget-validation-helper.ts index 13672b6b10..4a37e873cf 100644 --- a/apps/web/src/common/modules/widgets/_helpers/widget-validation-helper.ts +++ b/apps/web/src/services/dashboards/widgets/_helpers/widget-validation-helper.ts @@ -10,13 +10,12 @@ import type { WidgetOptionsSchema, } from '@/schema/dashboard/_types/widget-type'; -import { getInheritingOptionKeys } from '@/common/modules/widgets/_helpers/widget-inherit-options-helper'; +import { getUpdatedWidgetInfo } from '@/services/dashboards/helpers/dashboard-widget-info-helper'; +import { getInheritingOptionKeys } from '@/services/dashboards/widgets/_helpers/widget-inherit-options-helper'; import { getWidgetOptionKeyByVariableKey, -} from '@/common/modules/widgets/_helpers/widget-schema-helper'; -import type { UpdatableWidgetInfo } from '@/common/modules/widgets/_types/widget-type'; - -import { getUpdatedWidgetInfo } from '@/services/dashboards/helpers/dashboard-widget-info-helper'; +} from '@/services/dashboards/widgets/_helpers/widget-schema-helper'; +import type { UpdatableWidgetInfo } from '@/services/dashboards/widgets/_types/widget-type'; export const getWidgetInheritOptionsErrorMap = ( diff --git a/apps/web/src/common/modules/widgets/_helpers/widget-value-label-helper.ts b/apps/web/src/services/dashboards/widgets/_helpers/widget-value-label-helper.ts similarity index 100% rename from apps/web/src/common/modules/widgets/_helpers/widget-value-label-helper.ts rename to apps/web/src/services/dashboards/widgets/_helpers/widget-value-label-helper.ts diff --git a/apps/web/src/common/modules/widgets/_types/compliance-type.ts b/apps/web/src/services/dashboards/widgets/_types/compliance-type.ts similarity index 74% rename from apps/web/src/common/modules/widgets/_types/compliance-type.ts rename to apps/web/src/services/dashboards/widgets/_types/compliance-type.ts index dcaa88a8d6..481ca5530f 100644 --- a/apps/web/src/common/modules/widgets/_types/compliance-type.ts +++ b/apps/web/src/services/dashboards/widgets/_types/compliance-type.ts @@ -1,4 +1,4 @@ -import type { SEVERITY_STATUS_MAP, COMPLIANCE_STATUS_MAP } from '@/common/modules/widgets/_constants/compliance-constant'; +import type { SEVERITY_STATUS_MAP, COMPLIANCE_STATUS_MAP } from '@/services/dashboards/widgets/_constants/compliance-constant'; export type Severity = keyof typeof SEVERITY_STATUS_MAP; export type ComplianceStatus = keyof typeof COMPLIANCE_STATUS_MAP; diff --git a/apps/web/src/common/modules/widgets/_types/widget-data-table-type.ts b/apps/web/src/services/dashboards/widgets/_types/widget-data-table-type.ts similarity index 100% rename from apps/web/src/common/modules/widgets/_types/widget-data-table-type.ts rename to apps/web/src/services/dashboards/widgets/_types/widget-data-table-type.ts diff --git a/apps/web/src/common/modules/widgets/_types/widget-list-type.ts b/apps/web/src/services/dashboards/widgets/_types/widget-list-type.ts similarity index 73% rename from apps/web/src/common/modules/widgets/_types/widget-list-type.ts rename to apps/web/src/services/dashboards/widgets/_types/widget-list-type.ts index de7bfccf01..a6c62b1fb7 100644 --- a/apps/web/src/common/modules/widgets/_types/widget-list-type.ts +++ b/apps/web/src/services/dashboards/widgets/_types/widget-list-type.ts @@ -1,7 +1,7 @@ import type { BASE_WIDGET_CONFIG_KEYS, CONSOLE_WIDGET_CONFIG_KEYS, -} from '@/common/modules/widgets/_constants/widget-config-list-constant'; +} from '@/services/dashboards/widgets/_constants/widget-config-list-constant'; export type WidgetConfigKey = typeof CONSOLE_WIDGET_CONFIG_KEYS[number]; export type BaseWidgetConfigKey = typeof BASE_WIDGET_CONFIG_KEYS[number]; diff --git a/apps/web/src/common/modules/widgets/_types/widget-type.ts b/apps/web/src/services/dashboards/widgets/_types/widget-type.ts similarity index 100% rename from apps/web/src/common/modules/widgets/_types/widget-type.ts rename to apps/web/src/services/dashboards/widgets/_types/widget-type.ts diff --git a/apps/web/src/common/modules/widgets/asset-widgets/compliance-status/ComplianceStatusWidget.vue b/apps/web/src/services/dashboards/widgets/asset-widgets/compliance-status/ComplianceStatusWidget.vue similarity index 96% rename from apps/web/src/common/modules/widgets/asset-widgets/compliance-status/ComplianceStatusWidget.vue rename to apps/web/src/services/dashboards/widgets/asset-widgets/compliance-status/ComplianceStatusWidget.vue index eaac7f955f..b12adcf830 100644 --- a/apps/web/src/common/modules/widgets/asset-widgets/compliance-status/ComplianceStatusWidget.vue +++ b/apps/web/src/services/dashboards/widgets/asset-widgets/compliance-status/ComplianceStatusWidget.vue @@ -18,14 +18,15 @@ import { i18n } from '@/translations'; import { useAmcharts5 } from '@/common/composables/amcharts5'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import WidgetFrame from '@/common/modules/widgets/_components/WidgetFrame.vue'; -import { useWidgetLifecycle } from '@/common/modules/widgets/_composables/use-widget-lifecycle'; -import { useWidget } from '@/common/modules/widgets/_composables/use-widget/use-widget'; + +import WidgetFrame from '@/services/dashboards/widgets/_components/WidgetFrame.vue'; +import { useWidgetLifecycle } from '@/services/dashboards/widgets/_composables/use-widget-lifecycle'; +import { useWidget } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; import { COMPLIANCE_STATUS_MAP, SEVERITY_STATUS_MAP, -} from '@/common/modules/widgets/_constants/compliance-constant'; -import type { Severity } from '@/common/modules/widgets/_types/compliance-type'; -import type { WidgetExpose, WidgetProps, WidgetEmit } from '@/common/modules/widgets/_types/widget-type'; +} from '@/services/dashboards/widgets/_constants/compliance-constant'; +import type { Severity } from '@/services/dashboards/widgets/_types/compliance-type'; +import type { WidgetExpose, WidgetProps, WidgetEmit } from '@/services/dashboards/widgets/_types/widget-type'; interface SubData { diff --git a/apps/web/src/common/modules/widgets/asset-widgets/compliance-status/widget-config.ts b/apps/web/src/services/dashboards/widgets/asset-widgets/compliance-status/widget-config.ts similarity index 89% rename from apps/web/src/common/modules/widgets/asset-widgets/compliance-status/widget-config.ts rename to apps/web/src/services/dashboards/widgets/asset-widgets/compliance-status/widget-config.ts index b5fb6bd7be..86d55f5b6c 100644 --- a/apps/web/src/common/modules/widgets/asset-widgets/compliance-status/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/asset-widgets/compliance-status/widget-config.ts @@ -1,6 +1,6 @@ import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const complianceStatusWidgetConfig: WidgetConfig = { widget_config_id: 'complianceStatus', diff --git a/apps/web/src/common/modules/widgets/asset-widgets/count-of-fail-findings/widget-config.ts b/apps/web/src/services/dashboards/widgets/asset-widgets/count-of-fail-findings/widget-config.ts similarity index 92% rename from apps/web/src/common/modules/widgets/asset-widgets/count-of-fail-findings/widget-config.ts rename to apps/web/src/services/dashboards/widgets/asset-widgets/count-of-fail-findings/widget-config.ts index 7c05c2a3ca..d138286c09 100644 --- a/apps/web/src/common/modules/widgets/asset-widgets/count-of-fail-findings/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/asset-widgets/count-of-fail-findings/widget-config.ts @@ -1,7 +1,7 @@ import { ASSET_DATA_FIELD_MAP, GRANULARITY } from '@/schema/dashboard/_constants/widget-constant'; import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const countOfFailFindingsWidgetConfig: WidgetConfig = { widget_config_id: 'countOfFailFindings', diff --git a/apps/web/src/common/modules/widgets/asset-widgets/count-of-pass-and-fail-findings/widget-config.ts b/apps/web/src/services/dashboards/widgets/asset-widgets/count-of-pass-and-fail-findings/widget-config.ts similarity index 92% rename from apps/web/src/common/modules/widgets/asset-widgets/count-of-pass-and-fail-findings/widget-config.ts rename to apps/web/src/services/dashboards/widgets/asset-widgets/count-of-pass-and-fail-findings/widget-config.ts index 34a2e4fb48..7dab775eef 100644 --- a/apps/web/src/common/modules/widgets/asset-widgets/count-of-pass-and-fail-findings/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/asset-widgets/count-of-pass-and-fail-findings/widget-config.ts @@ -1,7 +1,7 @@ import { ASSET_DATA_FIELD_MAP, GRANULARITY } from '@/schema/dashboard/_constants/widget-constant'; import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const countOfPassAndFailFindingsWidgetConfig: WidgetConfig = { widget_config_id: 'countOfPassAndFailFindings', diff --git a/apps/web/src/common/modules/widgets/asset-widgets/severity-status-by-service/SeverityStatusByServiceWidget.vue b/apps/web/src/services/dashboards/widgets/asset-widgets/severity-status-by-service/SeverityStatusByServiceWidget.vue similarity index 92% rename from apps/web/src/common/modules/widgets/asset-widgets/severity-status-by-service/SeverityStatusByServiceWidget.vue rename to apps/web/src/services/dashboards/widgets/asset-widgets/severity-status-by-service/SeverityStatusByServiceWidget.vue index 7a52c285e4..8cad080da5 100644 --- a/apps/web/src/common/modules/widgets/asset-widgets/severity-status-by-service/SeverityStatusByServiceWidget.vue +++ b/apps/web/src/services/dashboards/widgets/asset-widgets/severity-status-by-service/SeverityStatusByServiceWidget.vue @@ -13,12 +13,13 @@ import { ApiQueryHelper } from '@cloudforet/core-lib/space-connector/helper'; import type { CloudServiceAnalyzeParameters } from '@/schema/inventory/cloud-service/api-verbs/analyze'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import WidgetFrame from '@/common/modules/widgets/_components/WidgetFrame.vue'; -import { useWidgetLifecycle } from '@/common/modules/widgets/_composables/use-widget-lifecycle'; -import { useWidget } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import { SEVERITY_STATUS_MAP } from '@/common/modules/widgets/_constants/compliance-constant'; -import type { ComplianceStatus, Severity } from '@/common/modules/widgets/_types/compliance-type'; -import type { WidgetExpose, WidgetProps, WidgetEmit } from '@/common/modules/widgets/_types/widget-type'; + +import WidgetFrame from '@/services/dashboards/widgets/_components/WidgetFrame.vue'; +import { useWidgetLifecycle } from '@/services/dashboards/widgets/_composables/use-widget-lifecycle'; +import { useWidget } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import { SEVERITY_STATUS_MAP } from '@/services/dashboards/widgets/_constants/compliance-constant'; +import type { ComplianceStatus, Severity } from '@/services/dashboards/widgets/_types/compliance-type'; +import type { WidgetExpose, WidgetProps, WidgetEmit } from '@/services/dashboards/widgets/_types/widget-type'; interface Data { diff --git a/apps/web/src/common/modules/widgets/asset-widgets/severity-status-by-service/widget-config.ts b/apps/web/src/services/dashboards/widgets/asset-widgets/severity-status-by-service/widget-config.ts similarity index 88% rename from apps/web/src/common/modules/widgets/asset-widgets/severity-status-by-service/widget-config.ts rename to apps/web/src/services/dashboards/widgets/asset-widgets/severity-status-by-service/widget-config.ts index 0bcbb3f235..3ddf62bd88 100644 --- a/apps/web/src/common/modules/widgets/asset-widgets/severity-status-by-service/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/asset-widgets/severity-status-by-service/widget-config.ts @@ -1,6 +1,6 @@ import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const severityStatusByServiceWidgetConfig: WidgetConfig = { widget_config_id: 'severityStatusByService', diff --git a/apps/web/src/common/modules/widgets/asset-widgets/total-fail-findings-history/TotalFailFindingsHistoryWidget.vue b/apps/web/src/services/dashboards/widgets/asset-widgets/total-fail-findings-history/TotalFailFindingsHistoryWidget.vue similarity index 95% rename from apps/web/src/common/modules/widgets/asset-widgets/total-fail-findings-history/TotalFailFindingsHistoryWidget.vue rename to apps/web/src/services/dashboards/widgets/asset-widgets/total-fail-findings-history/TotalFailFindingsHistoryWidget.vue index 141805f5ae..7bcc478c94 100644 --- a/apps/web/src/common/modules/widgets/asset-widgets/total-fail-findings-history/TotalFailFindingsHistoryWidget.vue +++ b/apps/web/src/services/dashboards/widgets/asset-widgets/total-fail-findings-history/TotalFailFindingsHistoryWidget.vue @@ -22,17 +22,18 @@ import { i18n } from '@/translations'; import { useAmcharts5 } from '@/common/composables/amcharts5'; import { setXYSharedTooltipTextWithRate } from '@/common/composables/amcharts5/xy-chart-helper'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import WidgetFrame from '@/common/modules/widgets/_components/WidgetFrame.vue'; -import { useWidgetColorSet } from '@/common/modules/widgets/_composables/use-widget-color-set'; -import { useWidgetLifecycle } from '@/common/modules/widgets/_composables/use-widget-lifecycle'; -import { useWidget } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import { SEVERITY_STATUS_MAP } from '@/common/modules/widgets/_constants/compliance-constant'; -import { getDateAxisSettings } from '@/common/modules/widgets/_helpers/widget-chart-helper'; -import type { Severity } from '@/common/modules/widgets/_types/compliance-type'; -import type { WidgetProps, WidgetExpose, WidgetEmit } from '@/common/modules/widgets/_types/widget-type'; import { red, green } from '@/styles/colors'; +import WidgetFrame from '@/services/dashboards/widgets/_components/WidgetFrame.vue'; +import { useWidgetColorSet } from '@/services/dashboards/widgets/_composables/use-widget-color-set'; +import { useWidgetLifecycle } from '@/services/dashboards/widgets/_composables/use-widget-lifecycle'; +import { useWidget } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import { SEVERITY_STATUS_MAP } from '@/services/dashboards/widgets/_constants/compliance-constant'; +import { getDateAxisSettings } from '@/services/dashboards/widgets/_helpers/widget-chart-helper'; +import type { Severity } from '@/services/dashboards/widgets/_types/compliance-type'; +import type { WidgetProps, WidgetExpose, WidgetEmit } from '@/services/dashboards/widgets/_types/widget-type'; + interface XYChartData { date?: string; [resourceName: string]: number | any; // AmazonCloudFront: 12333 diff --git a/apps/web/src/common/modules/widgets/asset-widgets/total-fail-findings-history/widget-config.ts b/apps/web/src/services/dashboards/widgets/asset-widgets/total-fail-findings-history/widget-config.ts similarity index 91% rename from apps/web/src/common/modules/widgets/asset-widgets/total-fail-findings-history/widget-config.ts rename to apps/web/src/services/dashboards/widgets/asset-widgets/total-fail-findings-history/widget-config.ts index 2743cf9a6e..dcfbf1569e 100644 --- a/apps/web/src/common/modules/widgets/asset-widgets/total-fail-findings-history/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/asset-widgets/total-fail-findings-history/widget-config.ts @@ -1,7 +1,7 @@ import { GRANULARITY } from '@/schema/dashboard/_constants/widget-constant'; import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const totalFailFindingsHistoryWidgetConfig: WidgetConfig = { widget_config_id: 'totalFailFindingsHistory', diff --git a/apps/web/src/common/modules/widgets/asset-widgets/total-fail-findings-status/TotalFailFindingsStatusWidget.vue b/apps/web/src/services/dashboards/widgets/asset-widgets/total-fail-findings-status/TotalFailFindingsStatusWidget.vue similarity index 92% rename from apps/web/src/common/modules/widgets/asset-widgets/total-fail-findings-status/TotalFailFindingsStatusWidget.vue rename to apps/web/src/services/dashboards/widgets/asset-widgets/total-fail-findings-status/TotalFailFindingsStatusWidget.vue index d327702c9b..571c13132b 100644 --- a/apps/web/src/common/modules/widgets/asset-widgets/total-fail-findings-status/TotalFailFindingsStatusWidget.vue +++ b/apps/web/src/services/dashboards/widgets/asset-widgets/total-fail-findings-status/TotalFailFindingsStatusWidget.vue @@ -16,13 +16,14 @@ import { getRGBFromHex, numberFormatter } from '@cloudforet/utils'; import type { CloudServiceAnalyzeParameters } from '@/schema/inventory/cloud-service/api-verbs/analyze'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import WidgetFrame from '@/common/modules/widgets/_components/WidgetFrame.vue'; -import { useWidgetColorSet } from '@/common/modules/widgets/_composables/use-widget-color-set'; -import { useWidgetLifecycle } from '@/common/modules/widgets/_composables/use-widget-lifecycle'; -import { useWidget } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import { SEVERITY_STATUS_MAP } from '@/common/modules/widgets/_constants/compliance-constant'; -import type { Severity } from '@/common/modules/widgets/_types/compliance-type'; -import type { WidgetProps, WidgetExpose, WidgetEmit } from '@/common/modules/widgets/_types/widget-type'; + +import WidgetFrame from '@/services/dashboards/widgets/_components/WidgetFrame.vue'; +import { useWidgetColorSet } from '@/services/dashboards/widgets/_composables/use-widget-color-set'; +import { useWidgetLifecycle } from '@/services/dashboards/widgets/_composables/use-widget-lifecycle'; +import { useWidget } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import { SEVERITY_STATUS_MAP } from '@/services/dashboards/widgets/_constants/compliance-constant'; +import type { Severity } from '@/services/dashboards/widgets/_types/compliance-type'; +import type { WidgetProps, WidgetExpose, WidgetEmit } from '@/services/dashboards/widgets/_types/widget-type'; interface SubData { diff --git a/apps/web/src/common/modules/widgets/asset-widgets/total-fail-findings-status/widget-config.ts b/apps/web/src/services/dashboards/widgets/asset-widgets/total-fail-findings-status/widget-config.ts similarity index 89% rename from apps/web/src/common/modules/widgets/asset-widgets/total-fail-findings-status/widget-config.ts rename to apps/web/src/services/dashboards/widgets/asset-widgets/total-fail-findings-status/widget-config.ts index 4e29aab582..d5fbb83351 100644 --- a/apps/web/src/common/modules/widgets/asset-widgets/total-fail-findings-status/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/asset-widgets/total-fail-findings-status/widget-config.ts @@ -1,6 +1,6 @@ import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const totalFailFindingsStatusWidgetConfig: WidgetConfig = { widget_config_id: 'totalFailFindingsStatus', diff --git a/apps/web/src/common/modules/widgets/asset-widgets/trend-of-pass-and-fail-findings/TrendOfPassAndFailFindingsWidget.vue b/apps/web/src/services/dashboards/widgets/asset-widgets/trend-of-pass-and-fail-findings/TrendOfPassAndFailFindingsWidget.vue similarity index 92% rename from apps/web/src/common/modules/widgets/asset-widgets/trend-of-pass-and-fail-findings/TrendOfPassAndFailFindingsWidget.vue rename to apps/web/src/services/dashboards/widgets/asset-widgets/trend-of-pass-and-fail-findings/TrendOfPassAndFailFindingsWidget.vue index 6a5f7dd45c..b44fd5b578 100644 --- a/apps/web/src/common/modules/widgets/asset-widgets/trend-of-pass-and-fail-findings/TrendOfPassAndFailFindingsWidget.vue +++ b/apps/web/src/services/dashboards/widgets/asset-widgets/trend-of-pass-and-fail-findings/TrendOfPassAndFailFindingsWidget.vue @@ -18,28 +18,28 @@ import type { DateRange } from '@/schema/dashboard/_types/dashboard-type'; import { useAmcharts5 } from '@/common/composables/amcharts5'; import { setXYSharedTooltipTextWithRate } from '@/common/composables/amcharts5/xy-chart-helper'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import WidgetChartNoDataOverlay from '@/common/modules/widgets/_components/WidgetChartNoDataOverlay.vue'; -import WidgetDataTable from '@/common/modules/widgets/_components/WidgetDataTable.vue'; -import WidgetFrame from '@/common/modules/widgets/_components/WidgetFrame.vue'; -import { useWidgetColorSet } from '@/common/modules/widgets/_composables/use-widget-color-set'; -import { useWidgetLifecycle } from '@/common/modules/widgets/_composables/use-widget-lifecycle'; -import { useWidgetPagination } from '@/common/modules/widgets/_composables/use-widget-pagination'; -import { useWidget } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import { COMPLIANCE_STATUS_MAP } from '@/common/modules/widgets/_constants/compliance-constant'; + +import type { ReferenceType } from '@/services/dashboards/stores/all-reference-type-info-store'; +import WidgetChartNoDataOverlay from '@/services/dashboards/widgets/_components/WidgetChartNoDataOverlay.vue'; +import WidgetDataTable from '@/services/dashboards/widgets/_components/WidgetDataTable.vue'; +import WidgetFrame from '@/services/dashboards/widgets/_components/WidgetFrame.vue'; +import { useWidgetColorSet } from '@/services/dashboards/widgets/_composables/use-widget-color-set'; +import { useWidgetLifecycle } from '@/services/dashboards/widgets/_composables/use-widget-lifecycle'; +import { useWidgetPagination } from '@/services/dashboards/widgets/_composables/use-widget-pagination'; +import { useWidget } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import { COMPLIANCE_STATUS_MAP } from '@/services/dashboards/widgets/_constants/compliance-constant'; import { getDateAxisSettings, -} from '@/common/modules/widgets/_helpers/widget-chart-helper'; +} from '@/services/dashboards/widgets/_helpers/widget-chart-helper'; import { getReferenceTypeOfDataField, getRefinedDateTableData, getWidgetTableDateFields, -} from '@/common/modules/widgets/_helpers/widget-table-helper'; -import type { Field } from '@/common/modules/widgets/_types/widget-data-table-type'; +} from '@/services/dashboards/widgets/_helpers/widget-table-helper'; +import type { Field } from '@/services/dashboards/widgets/_types/widget-data-table-type'; import type { WidgetExpose, WidgetProps, WidgetEmit, Legend, -} from '@/common/modules/widgets/_types/widget-type'; - -import type { ReferenceType } from '@/services/dashboards/stores/all-reference-type-info-store'; +} from '@/services/dashboards/widgets/_types/widget-type'; interface ChartDataResult { diff --git a/apps/web/src/common/modules/widgets/asset-widgets/trend-of-pass-and-fail-findings/widget-config.ts b/apps/web/src/services/dashboards/widgets/asset-widgets/trend-of-pass-and-fail-findings/widget-config.ts similarity index 91% rename from apps/web/src/common/modules/widgets/asset-widgets/trend-of-pass-and-fail-findings/widget-config.ts rename to apps/web/src/services/dashboards/widgets/asset-widgets/trend-of-pass-and-fail-findings/widget-config.ts index fd5a7ccd7a..7622979ce4 100644 --- a/apps/web/src/common/modules/widgets/asset-widgets/trend-of-pass-and-fail-findings/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/asset-widgets/trend-of-pass-and-fail-findings/widget-config.ts @@ -1,7 +1,7 @@ import { ASSET_DATA_FIELD_MAP, GRANULARITY } from '@/schema/dashboard/_constants/widget-constant'; import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const trendOfPassAndFailFindingsWidgetConfig: WidgetConfig = { widget_config_id: 'trendOfPassAndFailFindings', diff --git a/apps/web/src/common/modules/widgets/cost-widgets/budget-status/BudgetStatusWidget.vue b/apps/web/src/services/dashboards/widgets/cost-widgets/budget-status/BudgetStatusWidget.vue similarity index 95% rename from apps/web/src/common/modules/widgets/cost-widgets/budget-status/BudgetStatusWidget.vue rename to apps/web/src/services/dashboards/widgets/cost-widgets/budget-status/BudgetStatusWidget.vue index 1e14edead5..53abc93add 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/budget-status/BudgetStatusWidget.vue +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/budget-status/BudgetStatusWidget.vue @@ -13,15 +13,16 @@ import { ApiQueryHelper } from '@cloudforet/core-lib/space-connector/helper'; import { i18n } from '@/translations'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import WidgetFrame from '@/common/modules/widgets/_components/WidgetFrame.vue'; -import { useWidgetLifecycle } from '@/common/modules/widgets/_composables/use-widget-lifecycle'; -import { useWidget } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import type { - WidgetEmit, WidgetExpose, WidgetProps, Legend, BudgetUsageAnalyzeResponse, -} from '@/common/modules/widgets/_types/widget-type'; import { indigo, red, yellow } from '@/styles/colors'; +import WidgetFrame from '@/services/dashboards/widgets/_components/WidgetFrame.vue'; +import { useWidgetLifecycle } from '@/services/dashboards/widgets/_composables/use-widget-lifecycle'; +import { useWidget } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import type { + WidgetEmit, WidgetExpose, WidgetProps, Legend, BudgetUsageAnalyzeResponse, +} from '@/services/dashboards/widgets/_types/widget-type'; + interface Data { budget_id: string, diff --git a/apps/web/src/common/modules/widgets/cost-widgets/budget-status/widget-config.ts b/apps/web/src/services/dashboards/widgets/cost-widgets/budget-status/widget-config.ts similarity index 89% rename from apps/web/src/common/modules/widgets/cost-widgets/budget-status/widget-config.ts rename to apps/web/src/services/dashboards/widgets/cost-widgets/budget-status/widget-config.ts index f38f131071..82e3929fc2 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/budget-status/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/budget-status/widget-config.ts @@ -1,7 +1,7 @@ import { CHART_TYPE, GRANULARITY } from '@/schema/dashboard/_constants/widget-constant'; import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const budgetStatusWidgetConfig: WidgetConfig = { diff --git a/apps/web/src/common/modules/widgets/cost-widgets/budget-usage-by-target/BudgetUsageByTargetWidget.vue b/apps/web/src/services/dashboards/widgets/cost-widgets/budget-usage-by-target/BudgetUsageByTargetWidget.vue similarity index 91% rename from apps/web/src/common/modules/widgets/cost-widgets/budget-usage-by-target/BudgetUsageByTargetWidget.vue rename to apps/web/src/services/dashboards/widgets/cost-widgets/budget-usage-by-target/BudgetUsageByTargetWidget.vue index 2a1882ba31..69acfc8c6a 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/budget-usage-by-target/BudgetUsageByTargetWidget.vue +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/budget-usage-by-target/BudgetUsageByTargetWidget.vue @@ -15,15 +15,16 @@ import { ApiQueryHelper } from '@cloudforet/core-lib/space-connector/helper'; import { COST_DATA_FIELD_MAP } from '@/schema/dashboard/_constants/widget-constant'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import WidgetDataTable from '@/common/modules/widgets/_components/WidgetDataTable.vue'; -import WidgetFrame from '@/common/modules/widgets/_components/WidgetFrame.vue'; -import { useWidgetLifecycle } from '@/common/modules/widgets/_composables/use-widget-lifecycle'; -import { useWidgetPagination } from '@/common/modules/widgets/_composables/use-widget-pagination'; -import { useWidget } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import type { Field, WidgetTableData } from '@/common/modules/widgets/_types/widget-data-table-type'; + +import WidgetDataTable from '@/services/dashboards/widgets/_components/WidgetDataTable.vue'; +import WidgetFrame from '@/services/dashboards/widgets/_components/WidgetFrame.vue'; +import { useWidgetLifecycle } from '@/services/dashboards/widgets/_composables/use-widget-lifecycle'; +import { useWidgetPagination } from '@/services/dashboards/widgets/_composables/use-widget-pagination'; +import { useWidget } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import type { Field, WidgetTableData } from '@/services/dashboards/widgets/_types/widget-data-table-type'; import type { WidgetExpose, WidgetProps, WidgetEmit, BudgetUsageAnalyzeResponse, -} from '@/common/modules/widgets/_types/widget-type'; +} from '@/services/dashboards/widgets/_types/widget-type'; interface Data { diff --git a/apps/web/src/common/modules/widgets/cost-widgets/budget-usage-by-target/widget-config.ts b/apps/web/src/services/dashboards/widgets/cost-widgets/budget-usage-by-target/widget-config.ts similarity index 92% rename from apps/web/src/common/modules/widgets/cost-widgets/budget-usage-by-target/widget-config.ts rename to apps/web/src/services/dashboards/widgets/cost-widgets/budget-usage-by-target/widget-config.ts index 84295b9569..5649bb5956 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/budget-usage-by-target/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/budget-usage-by-target/widget-config.ts @@ -1,7 +1,7 @@ import { COST_DATA_FIELD_MAP, GRANULARITY } from '@/schema/dashboard/_constants/widget-constant'; import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const budgetUsageByTargetWidgetConfig: WidgetConfig = { widget_config_id: 'budgetUsageByTarget', diff --git a/apps/web/src/common/modules/widgets/cost-widgets/budget-usage-summary/BudgetUsageSummaryWidget.vue b/apps/web/src/services/dashboards/widgets/cost-widgets/budget-usage-summary/BudgetUsageSummaryWidget.vue similarity index 96% rename from apps/web/src/common/modules/widgets/cost-widgets/budget-usage-summary/BudgetUsageSummaryWidget.vue rename to apps/web/src/services/dashboards/widgets/cost-widgets/budget-usage-summary/BudgetUsageSummaryWidget.vue index f1b4ce3ecd..18cd26defd 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/budget-usage-summary/BudgetUsageSummaryWidget.vue +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/budget-usage-summary/BudgetUsageSummaryWidget.vue @@ -22,14 +22,15 @@ import { currencyMoneyFormatter } from '@/lib/helper/currency-helper'; import { useAmcharts5 } from '@/common/composables/amcharts5'; import { useDateRangeFormatter } from '@/common/composables/date-range-formatter'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import WidgetFrame from '@/common/modules/widgets/_components/WidgetFrame.vue'; -import { useWidgetLifecycle } from '@/common/modules/widgets/_composables/use-widget-lifecycle'; -import { useWidget } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import { getDateAxisSettings } from '@/common/modules/widgets/_helpers/widget-chart-helper'; -import type { WidgetExpose, WidgetProps, WidgetEmit } from '@/common/modules/widgets/_types/widget-type'; import { indigo, red, gray } from '@/styles/colors'; +import WidgetFrame from '@/services/dashboards/widgets/_components/WidgetFrame.vue'; +import { useWidgetLifecycle } from '@/services/dashboards/widgets/_composables/use-widget-lifecycle'; +import { useWidget } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import { getDateAxisSettings } from '@/services/dashboards/widgets/_helpers/widget-chart-helper'; +import type { WidgetExpose, WidgetProps, WidgetEmit } from '@/services/dashboards/widgets/_types/widget-type'; + interface Data { date: string; diff --git a/apps/web/src/common/modules/widgets/cost-widgets/budget-usage-summary/widget-config.ts b/apps/web/src/services/dashboards/widgets/cost-widgets/budget-usage-summary/widget-config.ts similarity index 89% rename from apps/web/src/common/modules/widgets/cost-widgets/budget-usage-summary/widget-config.ts rename to apps/web/src/services/dashboards/widgets/cost-widgets/budget-usage-summary/widget-config.ts index 9ab9d36f2a..f89eb24fda 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/budget-usage-summary/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/budget-usage-summary/widget-config.ts @@ -1,7 +1,7 @@ import { GRANULARITY } from '@/schema/dashboard/_constants/widget-constant'; import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const budgetUsageSummaryConfig: WidgetConfig = { widget_config_id: 'budgetUsageSummary', diff --git a/apps/web/src/common/modules/widgets/cost-widgets/cost-by-region-multi-fields/CostByRegionMultiFieldsWidget.vue b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-by-region-multi-fields/CostByRegionMultiFieldsWidget.vue similarity index 91% rename from apps/web/src/common/modules/widgets/cost-widgets/cost-by-region-multi-fields/CostByRegionMultiFieldsWidget.vue rename to apps/web/src/services/dashboards/widgets/cost-widgets/cost-by-region-multi-fields/CostByRegionMultiFieldsWidget.vue index 7325ed60ee..76814d0319 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/cost-by-region-multi-fields/CostByRegionMultiFieldsWidget.vue +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-by-region-multi-fields/CostByRegionMultiFieldsWidget.vue @@ -20,23 +20,23 @@ import type { RegionReferenceMap } from '@/store/reference/region-reference-stor import { useAmcharts5 } from '@/common/composables/amcharts5'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import WidgetDataTable from '@/common/modules/widgets/_components/WidgetDataTable.vue'; -import WidgetFrame from '@/common/modules/widgets/_components/WidgetFrame.vue'; -import { useWidgetColorSet } from '@/common/modules/widgets/_composables/use-widget-color-set'; -import { useWidgetLifecycle } from '@/common/modules/widgets/_composables/use-widget-lifecycle'; -import { useWidgetPagination } from '@/common/modules/widgets/_composables/use-widget-pagination'; -import { useWidget } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import { getPieChartLegends } from '@/common/modules/widgets/_helpers/widget-chart-helper'; -import { getWidgetDataTableRowLocation } from '@/common/modules/widgets/_helpers/widget-location-helper'; -import { getReferenceTypeOfDataField } from '@/common/modules/widgets/_helpers/widget-table-helper'; -import { getWidgetValueLabel } from '@/common/modules/widgets/_helpers/widget-value-label-helper'; -import type { Field, WidgetTableData } from '@/common/modules/widgets/_types/widget-data-table-type'; + +import type { ReferenceType } from '@/services/dashboards/stores/all-reference-type-info-store'; +import WidgetDataTable from '@/services/dashboards/widgets/_components/WidgetDataTable.vue'; +import WidgetFrame from '@/services/dashboards/widgets/_components/WidgetFrame.vue'; +import { useWidgetColorSet } from '@/services/dashboards/widgets/_composables/use-widget-color-set'; +import { useWidgetLifecycle } from '@/services/dashboards/widgets/_composables/use-widget-lifecycle'; +import { useWidgetPagination } from '@/services/dashboards/widgets/_composables/use-widget-pagination'; +import { useWidget } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import { getPieChartLegends } from '@/services/dashboards/widgets/_helpers/widget-chart-helper'; +import { getWidgetDataTableRowLocation } from '@/services/dashboards/widgets/_helpers/widget-location-helper'; +import { getReferenceTypeOfDataField } from '@/services/dashboards/widgets/_helpers/widget-table-helper'; +import { getWidgetValueLabel } from '@/services/dashboards/widgets/_helpers/widget-value-label-helper'; +import type { Field, WidgetTableData } from '@/services/dashboards/widgets/_types/widget-data-table-type'; import type { WidgetExpose, WidgetProps, WidgetEmit, Legend, CostAnalyzeResponse, -} from '@/common/modules/widgets/_types/widget-type'; - -import type { ReferenceType } from '@/services/dashboards/stores/all-reference-type-info-store'; +} from '@/services/dashboards/widgets/_types/widget-type'; interface SubData { diff --git a/apps/web/src/common/modules/widgets/cost-widgets/cost-by-region-multi-fields/widget-config.ts b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-by-region-multi-fields/widget-config.ts similarity index 94% rename from apps/web/src/common/modules/widgets/cost-widgets/cost-by-region-multi-fields/widget-config.ts rename to apps/web/src/services/dashboards/widgets/cost-widgets/cost-by-region-multi-fields/widget-config.ts index 9f46a43669..ca95b2abb5 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/cost-by-region-multi-fields/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-by-region-multi-fields/widget-config.ts @@ -1,7 +1,7 @@ import { CHART_TYPE, COST_DATA_FIELD_MAP, GRANULARITY } from '@/schema/dashboard/_constants/widget-constant'; import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const costByRegionMultiFieldsWidgetConfig: WidgetConfig = { widget_config_id: 'costByRegionMultiFields', diff --git a/apps/web/src/common/modules/widgets/cost-widgets/cost-by-region/CostByRegionWidget.vue b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-by-region/CostByRegionWidget.vue similarity index 90% rename from apps/web/src/common/modules/widgets/cost-widgets/cost-by-region/CostByRegionWidget.vue rename to apps/web/src/services/dashboards/widgets/cost-widgets/cost-by-region/CostByRegionWidget.vue index f6a33c0092..7dfd6dbf2e 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/cost-by-region/CostByRegionWidget.vue +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-by-region/CostByRegionWidget.vue @@ -23,24 +23,25 @@ import type { RegionReferenceMap } from '@/store/reference/region-reference-stor import { useAmcharts5 } from '@/common/composables/amcharts5'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import WidgetDataTable from '@/common/modules/widgets/_components/WidgetDataTable.vue'; -import WidgetFrame from '@/common/modules/widgets/_components/WidgetFrame.vue'; -import { useWidgetLifecycle } from '@/common/modules/widgets/_composables/use-widget-lifecycle'; -import { useWidgetPagination } from '@/common/modules/widgets/_composables/use-widget-pagination'; -import { useWidget } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import { getXYChartLegends } from '@/common/modules/widgets/_helpers/widget-chart-helper'; -import { getWidgetDataTableRowLocation } from '@/common/modules/widgets/_helpers/widget-location-helper'; -import type { Field, WidgetTableData } from '@/common/modules/widgets/_types/widget-data-table-type'; + +import WidgetDataTable from '@/services/dashboards/widgets/_components/WidgetDataTable.vue'; +import WidgetFrame from '@/services/dashboards/widgets/_components/WidgetFrame.vue'; +import { useWidgetLifecycle } from '@/services/dashboards/widgets/_composables/use-widget-lifecycle'; +import { useWidgetPagination } from '@/services/dashboards/widgets/_composables/use-widget-pagination'; +import { useWidget } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import { getXYChartLegends } from '@/services/dashboards/widgets/_helpers/widget-chart-helper'; +import { getWidgetDataTableRowLocation } from '@/services/dashboards/widgets/_helpers/widget-location-helper'; +import type { Field, WidgetTableData } from '@/services/dashboards/widgets/_types/widget-data-table-type'; import type { WidgetExpose, WidgetProps, WidgetEmit, Legend, CostAnalyzeResponse, -} from '@/common/modules/widgets/_types/widget-type'; +} from '@/services/dashboards/widgets/_types/widget-type'; import type { Data, MapChartData, -} from '@/common/modules/widgets/cost-widgets/cost-by-region/cost-by-region-data-hleper'; +} from '@/services/dashboards/widgets/cost-widgets/cost-by-region/cost-by-region-data-hleper'; import { getRefinedMapChartData, -} from '@/common/modules/widgets/cost-widgets/cost-by-region/cost-by-region-data-hleper'; +} from '@/services/dashboards/widgets/cost-widgets/cost-by-region/cost-by-region-data-hleper'; type FullData = CostAnalyzeResponse; diff --git a/apps/web/src/common/modules/widgets/cost-widgets/cost-by-region/cost-by-region-data-hleper.ts b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-by-region/cost-by-region-data-hleper.ts similarity index 100% rename from apps/web/src/common/modules/widgets/cost-widgets/cost-by-region/cost-by-region-data-hleper.ts rename to apps/web/src/services/dashboards/widgets/cost-widgets/cost-by-region/cost-by-region-data-hleper.ts diff --git a/apps/web/src/common/modules/widgets/cost-widgets/cost-by-region/widget-config.ts b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-by-region/widget-config.ts similarity index 93% rename from apps/web/src/common/modules/widgets/cost-widgets/cost-by-region/widget-config.ts rename to apps/web/src/services/dashboards/widgets/cost-widgets/cost-by-region/widget-config.ts index 919e8a17f1..5cdabd7159 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/cost-by-region/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-by-region/widget-config.ts @@ -1,7 +1,7 @@ import { CHART_TYPE, COST_DATA_FIELD_MAP, GRANULARITY } from '@/schema/dashboard/_constants/widget-constant'; import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const costByRegionWidgetConfig: WidgetConfig = { widget_config_id: 'costByRegion', diff --git a/apps/web/src/common/modules/widgets/cost-widgets/cost-donut/widget-config.ts b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-donut/widget-config.ts similarity index 92% rename from apps/web/src/common/modules/widgets/cost-widgets/cost-donut/widget-config.ts rename to apps/web/src/services/dashboards/widgets/cost-widgets/cost-donut/widget-config.ts index c1fd0a94d6..abbb9f235b 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/cost-donut/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-donut/widget-config.ts @@ -1,7 +1,7 @@ import { CHART_TYPE, COST_DATA_FIELD_MAP, GRANULARITY } from '@/schema/dashboard/_constants/widget-constant'; import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const costDonutWidgetConfig: Partial = { widget_config_id: 'costDonut', diff --git a/apps/web/src/common/modules/widgets/cost-widgets/cost-map/CostMapWidget.vue b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-map/CostMapWidget.vue similarity index 94% rename from apps/web/src/common/modules/widgets/cost-widgets/cost-map/CostMapWidget.vue rename to apps/web/src/services/dashboards/widgets/cost-widgets/cost-map/CostMapWidget.vue index 59cce74ba9..26bb219a2d 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/cost-map/CostMapWidget.vue +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-map/CostMapWidget.vue @@ -17,12 +17,13 @@ import type { CostDataField } from '@/schema/dashboard/_types/widget-type'; import { useAmcharts5 } from '@/common/composables/amcharts5'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import WidgetFrame from '@/common/modules/widgets/_components/WidgetFrame.vue'; -import { useWidgetLifecycle } from '@/common/modules/widgets/_composables/use-widget-lifecycle'; -import { useWidget } from '@/common/modules/widgets/_composables/use-widget/use-widget'; + +import WidgetFrame from '@/services/dashboards/widgets/_components/WidgetFrame.vue'; +import { useWidgetLifecycle } from '@/services/dashboards/widgets/_composables/use-widget-lifecycle'; +import { useWidget } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; import type { WidgetExpose, WidgetProps, WidgetEmit, -} from '@/common/modules/widgets/_types/widget-type'; +} from '@/services/dashboards/widgets/_types/widget-type'; import type { AnalyzeRawData, TreemapChartData, diff --git a/apps/web/src/common/modules/widgets/cost-widgets/cost-map/costmap-chart-data-helper.ts b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-map/costmap-chart-data-helper.ts similarity index 100% rename from apps/web/src/common/modules/widgets/cost-widgets/cost-map/costmap-chart-data-helper.ts rename to apps/web/src/services/dashboards/widgets/cost-widgets/cost-map/costmap-chart-data-helper.ts diff --git a/apps/web/src/common/modules/widgets/cost-widgets/cost-map/costmap-draw-chart-helper.ts b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-map/costmap-draw-chart-helper.ts similarity index 88% rename from apps/web/src/common/modules/widgets/cost-widgets/cost-map/costmap-draw-chart-helper.ts rename to apps/web/src/services/dashboards/widgets/cost-widgets/cost-map/costmap-draw-chart-helper.ts index e67b0c81cc..708871b383 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/cost-map/costmap-draw-chart-helper.ts +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-map/costmap-draw-chart-helper.ts @@ -1,11 +1,10 @@ - -import type { WidgetTheme } from '@/common/modules/widgets/_types/widget-type'; -import type { TreemapChartData } from '@/common/modules/widgets/cost-widgets/cost-map/costmap-chart-data-helper'; - import { gray, palette, transparent, white, } from '@/styles/colors'; +import type { WidgetTheme } from '@/services/dashboards/widgets/_types/widget-type'; +import type { TreemapChartData } from '@/services/dashboards/widgets/cost-widgets/cost-map/costmap-chart-data-helper'; + export const setThemeColorsToTreemapData = (treemapData: TreemapChartData['children'], theme?: WidgetTheme): TreemapChartData['children'] => { const themeColorName: WidgetTheme = theme || 'violet'; const results: TreemapChartData['children'] = []; diff --git a/apps/web/src/common/modules/widgets/cost-widgets/cost-map/widget-config.ts b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-map/widget-config.ts similarity index 92% rename from apps/web/src/common/modules/widgets/cost-widgets/cost-map/widget-config.ts rename to apps/web/src/services/dashboards/widgets/cost-widgets/cost-map/widget-config.ts index 44f52553db..3581ca88f0 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/cost-map/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-map/widget-config.ts @@ -1,7 +1,7 @@ import { COST_DATA_FIELD_MAP, GRANULARITY } from '@/schema/dashboard/_constants/widget-constant'; import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const costMapWidgetConfig: WidgetConfig = { widget_config_id: 'costMap', diff --git a/apps/web/src/common/modules/widgets/cost-widgets/cost-pie/widget-config.ts b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-pie/widget-config.ts similarity index 92% rename from apps/web/src/common/modules/widgets/cost-widgets/cost-pie/widget-config.ts rename to apps/web/src/services/dashboards/widgets/cost-widgets/cost-pie/widget-config.ts index 2528b396ff..93548b0cb8 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/cost-pie/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-pie/widget-config.ts @@ -1,7 +1,7 @@ import { CHART_TYPE, COST_DATA_FIELD_MAP, GRANULARITY } from '@/schema/dashboard/_constants/widget-constant'; import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const costPieWidgetConfig: Partial = { widget_config_id: 'costPie', diff --git a/apps/web/src/common/modules/widgets/cost-widgets/cost-summary-multi-fields/CostSummaryMultiFieldsWidget.vue b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-summary-multi-fields/CostSummaryMultiFieldsWidget.vue similarity index 92% rename from apps/web/src/common/modules/widgets/cost-widgets/cost-summary-multi-fields/CostSummaryMultiFieldsWidget.vue rename to apps/web/src/services/dashboards/widgets/cost-widgets/cost-summary-multi-fields/CostSummaryMultiFieldsWidget.vue index a17e8f2d66..92971ddf4c 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/cost-summary-multi-fields/CostSummaryMultiFieldsWidget.vue +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-summary-multi-fields/CostSummaryMultiFieldsWidget.vue @@ -22,26 +22,26 @@ import { usageUnitFormatter } from '@/lib/helper/usage-formatter'; import { useAmcharts5 } from '@/common/composables/amcharts5'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import WidgetDataTable from '@/common/modules/widgets/_components/WidgetDataTable.vue'; -import WidgetFrame from '@/common/modules/widgets/_components/WidgetFrame.vue'; -import { useWidgetColorSet } from '@/common/modules/widgets/_composables/use-widget-color-set'; -import { useWidgetLifecycle } from '@/common/modules/widgets/_composables/use-widget-lifecycle'; -import { useWidgetPagination } from '@/common/modules/widgets/_composables/use-widget-pagination'; -import { useWidget } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import { getRefinedXYChartData } from '@/common/modules/widgets/_helpers/widget-chart-data-helper'; -import { getXYChartLegends } from '@/common/modules/widgets/_helpers/widget-chart-helper'; -import { getWidgetDataTableRowLocation } from '@/common/modules/widgets/_helpers/widget-location-helper'; -import { getReferenceTypeOfDataField } from '@/common/modules/widgets/_helpers/widget-table-helper'; -import { getWidgetValueLabel } from '@/common/modules/widgets/_helpers/widget-value-label-helper'; -import type { Field, WidgetTableData } from '@/common/modules/widgets/_types/widget-data-table-type'; -import type { - WidgetEmit, WidgetExpose, WidgetProps, - CostAnalyzeResponse, Legend, -} from '@/common/modules/widgets/_types/widget-type'; import { gray } from '@/styles/colors'; import type { ReferenceType } from '@/services/dashboards/stores/all-reference-type-info-store'; +import WidgetDataTable from '@/services/dashboards/widgets/_components/WidgetDataTable.vue'; +import WidgetFrame from '@/services/dashboards/widgets/_components/WidgetFrame.vue'; +import { useWidgetColorSet } from '@/services/dashboards/widgets/_composables/use-widget-color-set'; +import { useWidgetLifecycle } from '@/services/dashboards/widgets/_composables/use-widget-lifecycle'; +import { useWidgetPagination } from '@/services/dashboards/widgets/_composables/use-widget-pagination'; +import { useWidget } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import { getRefinedXYChartData } from '@/services/dashboards/widgets/_helpers/widget-chart-data-helper'; +import { getXYChartLegends } from '@/services/dashboards/widgets/_helpers/widget-chart-helper'; +import { getWidgetDataTableRowLocation } from '@/services/dashboards/widgets/_helpers/widget-location-helper'; +import { getReferenceTypeOfDataField } from '@/services/dashboards/widgets/_helpers/widget-table-helper'; +import { getWidgetValueLabel } from '@/services/dashboards/widgets/_helpers/widget-value-label-helper'; +import type { Field, WidgetTableData } from '@/services/dashboards/widgets/_types/widget-data-table-type'; +import type { + WidgetEmit, WidgetExpose, WidgetProps, + CostAnalyzeResponse, Legend, +} from '@/services/dashboards/widgets/_types/widget-type'; interface SubData { diff --git a/apps/web/src/common/modules/widgets/cost-widgets/cost-summary-multi-fields/widget-config.ts b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-summary-multi-fields/widget-config.ts similarity index 94% rename from apps/web/src/common/modules/widgets/cost-widgets/cost-summary-multi-fields/widget-config.ts rename to apps/web/src/services/dashboards/widgets/cost-widgets/cost-summary-multi-fields/widget-config.ts index 29a6967649..b05460b032 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/cost-summary-multi-fields/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-summary-multi-fields/widget-config.ts @@ -1,7 +1,7 @@ import { CHART_TYPE, COST_DATA_FIELD_MAP, GRANULARITY } from '@/schema/dashboard/_constants/widget-constant'; import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const costSummaryMultiFieldsWidgetConfig: WidgetConfig = { widget_config_id: 'costSummaryMultiFields', diff --git a/apps/web/src/common/modules/widgets/cost-widgets/cost-trend-stacked/widget-config.ts b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-trend-stacked/widget-config.ts similarity index 93% rename from apps/web/src/common/modules/widgets/cost-widgets/cost-trend-stacked/widget-config.ts rename to apps/web/src/services/dashboards/widgets/cost-widgets/cost-trend-stacked/widget-config.ts index a1b4fdb99a..3ef7cc4286 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/cost-trend-stacked/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-trend-stacked/widget-config.ts @@ -1,7 +1,7 @@ import { CHART_TYPE, COST_DATA_FIELD_MAP, GRANULARITY } from '@/schema/dashboard/_constants/widget-constant'; import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const costTrendStackedWidgetConfig: Partial = { widget_config_id: 'costTrendStacked', diff --git a/apps/web/src/common/modules/widgets/cost-widgets/cost-trend/widget-config.ts b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-trend/widget-config.ts similarity index 93% rename from apps/web/src/common/modules/widgets/cost-widgets/cost-trend/widget-config.ts rename to apps/web/src/services/dashboards/widgets/cost-widgets/cost-trend/widget-config.ts index e4e757d12e..c32e77080b 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/cost-trend/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/cost-trend/widget-config.ts @@ -1,7 +1,7 @@ import { CHART_TYPE, COST_DATA_FIELD_MAP, GRANULARITY } from '@/schema/dashboard/_constants/widget-constant'; import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const costTrendWidgetConfig: Partial = { widget_config_id: 'costTrend', diff --git a/apps/web/src/common/modules/widgets/cost-widgets/monthly-cost/MonthlyCostWidget.vue b/apps/web/src/services/dashboards/widgets/cost-widgets/monthly-cost/MonthlyCostWidget.vue similarity index 95% rename from apps/web/src/common/modules/widgets/cost-widgets/monthly-cost/MonthlyCostWidget.vue rename to apps/web/src/services/dashboards/widgets/cost-widgets/monthly-cost/MonthlyCostWidget.vue index 8c25c0d1ed..7ee35ed3b2 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/monthly-cost/MonthlyCostWidget.vue +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/monthly-cost/MonthlyCostWidget.vue @@ -24,19 +24,20 @@ import { currencyMoneyFormatter } from '@/lib/helper/currency-helper'; import { useAmcharts5 } from '@/common/composables/amcharts5'; import { useDateRangeFormatter } from '@/common/composables/date-range-formatter'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import WidgetFrame from '@/common/modules/widgets/_components/WidgetFrame.vue'; -import { useWidgetColorSet } from '@/common/modules/widgets/_composables/use-widget-color-set'; -import { useWidgetLifecycle } from '@/common/modules/widgets/_composables/use-widget-lifecycle'; -import { useWidget } from '@/common/modules/widgets/_composables/use-widget/use-widget'; -import { getRefinedXYChartData } from '@/common/modules/widgets/_helpers/widget-chart-data-helper'; -import { getDateAxisSettings } from '@/common/modules/widgets/_helpers/widget-chart-helper'; -import { getRefinedDateTableData } from '@/common/modules/widgets/_helpers/widget-table-helper'; -import type { - WidgetExpose, WidgetProps, WidgetEmit, CostAnalyzeResponse, -} from '@/common/modules/widgets/_types/widget-type'; import { green, red, gray } from '@/styles/colors'; +import WidgetFrame from '@/services/dashboards/widgets/_components/WidgetFrame.vue'; +import { useWidgetColorSet } from '@/services/dashboards/widgets/_composables/use-widget-color-set'; +import { useWidgetLifecycle } from '@/services/dashboards/widgets/_composables/use-widget-lifecycle'; +import { useWidget } from '@/services/dashboards/widgets/_composables/use-widget/use-widget'; +import { getRefinedXYChartData } from '@/services/dashboards/widgets/_helpers/widget-chart-data-helper'; +import { getDateAxisSettings } from '@/services/dashboards/widgets/_helpers/widget-chart-helper'; +import { getRefinedDateTableData } from '@/services/dashboards/widgets/_helpers/widget-table-helper'; +import type { + WidgetExpose, WidgetProps, WidgetEmit, CostAnalyzeResponse, +} from '@/services/dashboards/widgets/_types/widget-type'; + const chartContext = ref(null); const chartHelper = useAmcharts5(chartContext); diff --git a/apps/web/src/common/modules/widgets/cost-widgets/monthly-cost/widget-config.ts b/apps/web/src/services/dashboards/widgets/cost-widgets/monthly-cost/widget-config.ts similarity index 91% rename from apps/web/src/common/modules/widgets/cost-widgets/monthly-cost/widget-config.ts rename to apps/web/src/services/dashboards/widgets/cost-widgets/monthly-cost/widget-config.ts index 2e6eb83ead..86a12d9556 100644 --- a/apps/web/src/common/modules/widgets/cost-widgets/monthly-cost/widget-config.ts +++ b/apps/web/src/services/dashboards/widgets/cost-widgets/monthly-cost/widget-config.ts @@ -1,7 +1,7 @@ import { GRANULARITY } from '@/schema/dashboard/_constants/widget-constant'; import type { WidgetConfig } from '@/schema/dashboard/_types/widget-type'; -import { getWidgetOptionsSchema } from '@/common/modules/widgets/_helpers/widget-options-schema-generator'; +import { getWidgetOptionsSchema } from '@/services/dashboards/widgets/_helpers/widget-options-schema-generator'; const monthlyCostWidgetConfig: WidgetConfig = {