Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "refactor: move widgets directory (#3707)" #3712

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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<WidgetProps, WidgetExpose>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<DashboardLayoutWidgetInfo[]>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading
Loading