diff --git a/.eslintrc.json b/.eslintrc.json index dd2f000d..713dd1e4 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,33 +1,22 @@ { "extends": [ - "airbnb/base", - "airbnb-typescript/base", + "prettier", + "plugin:vue/vue3-essential", "plugin:vue/vue3-recommended", - "@nuxtjs/eslint-config-typescript", "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:@typescript-eslint/eslint-recommended", - "prettier", - "plugin:nuxt/recommended", - "plugin:@conarti/feature-sliced/recommended", - "plugin:storybook/recommended" + "@vue/eslint-config-typescript", + "plugin:storybook/recommended", + "plugin:@conarti/feature-sliced/recommended" ], - "parser": "vue-eslint-parser", - "plugins": ["@typescript-eslint"], - "root": true, "ignorePatterns": [ "package.json", "postcss.config.js", "tailwind.config.js", - "src/shared/lib/vendor/" + "src/shared/lib/vendor/", + "index.html" ], "parserOptions": { - "project": "./tsconfig.json", - "extraFileExtensions": [".vue"], - "parser": { - "ts": "@typescript-eslint/parser", - " + + diff --git a/src/shared/ui/email-preview/index.ts b/src/shared/ui/email-preview/index.ts new file mode 100644 index 00000000..1816eb27 --- /dev/null +++ b/src/shared/ui/email-preview/index.ts @@ -0,0 +1,2 @@ +export { default as EmailPreview } from './email-preview.vue' +export { Device as EmailPreviewDevice } from './types' diff --git a/src/shared/ui/email-preview/types.ts b/src/shared/ui/email-preview/types.ts new file mode 100644 index 00000000..3449887a --- /dev/null +++ b/src/shared/ui/email-preview/types.ts @@ -0,0 +1,5 @@ +export enum Device { + Mobile = 'mobile', + Tablet = 'tablet', + Desktop = 'desktop', +} diff --git a/src/shared/ui/file-attachment/file-attachment.stories.ts b/src/shared/ui/file-attachment/file-attachment.stories.ts index 5c321a51..bb673556 100644 --- a/src/shared/ui/file-attachment/file-attachment.stories.ts +++ b/src/shared/ui/file-attachment/file-attachment.stories.ts @@ -11,11 +11,11 @@ export const Default: StoryObj = { args: { eventId: 'cbdd3296-1e25-4191-9f52-0e2d7e7d6aae', attachment: { - id: 'cbdd3296-1e25-4191-9f52-0e2d7e7d6aae', + uuid: 'cbdd3296-1e25-4191-9f52-0e2d7e7d6aae', name: 'attachment.txt', size: 234234, mime: "text/plain", - uri: 'example.com/attachment.txt', + path: 'example.com/attachment.txt', }, } } diff --git a/src/shared/ui/file-attachment/file-attachment.vue b/src/shared/ui/file-attachment/file-attachment.vue index 7ff0c0fe..6a758227 100644 --- a/src/shared/ui/file-attachment/file-attachment.vue +++ b/src/shared/ui/file-attachment/file-attachment.vue @@ -1,19 +1,18 @@ diff --git a/src/shared/ui/stat-board/types.ts b/src/shared/ui/stat-board/types.ts new file mode 100644 index 00000000..794084e9 --- /dev/null +++ b/src/shared/ui/stat-board/types.ts @@ -0,0 +1,13 @@ +import type {StatsBase} from "../../types"; + +export type StatBoardCost = StatsBase & { + p_cpu?: number; + p_wt?: number; + p_mu?: number; + p_pmu?: number; +} + +export enum StatBoardSize { + Small= 'sm', + Medium = 'md', +} diff --git a/src/shared/ui/table-base/table-base-row.vue b/src/shared/ui/table-base/table-base-row.vue index 67eb14e6..28b994a9 100644 --- a/src/shared/ui/table-base/table-base-row.vue +++ b/src/shared/ui/table-base/table-base-row.vue @@ -1,13 +1,13 @@ diff --git a/src/widgets/ui/layout-preview-events/index.ts b/src/widgets/ui/layout-preview-events/index.ts new file mode 100644 index 00000000..49a392dc --- /dev/null +++ b/src/widgets/ui/layout-preview-events/index.ts @@ -0,0 +1 @@ +export { default as LayoutPreviewEvents } from './layout-preview-events.vue'; diff --git a/src/widgets/ui/layout-preview-events/layout-preview-events.stories.ts b/src/widgets/ui/layout-preview-events/layout-preview-events.stories.ts new file mode 100644 index 00000000..a25315bc --- /dev/null +++ b/src/widgets/ui/layout-preview-events/layout-preview-events.stories.ts @@ -0,0 +1,15 @@ +import type { Meta, StoryObj } from "@storybook/vue3"; +import { ALL_EVENT_TYPES } from "@/shared/constants"; +import LayoutPreviewEvents from "./layout-preview-events.vue"; + +export default { + title: "Widgets/LayoutPreviewEvents", + component: LayoutPreviewEvents, +} as Meta; + +export const Default: StoryObj = { + args: { + title: "Page Title", + type: ALL_EVENT_TYPES + } +}; diff --git a/src/widgets/ui/layout-preview-events/layout-preview-events.vue b/src/widgets/ui/layout-preview-events/layout-preview-events.vue new file mode 100644 index 00000000..0edb1830 --- /dev/null +++ b/src/widgets/ui/layout-preview-events/layout-preview-events.vue @@ -0,0 +1,107 @@ + + + + + diff --git a/src/widgets/ui/layout-sidebar/constants.ts b/src/widgets/ui/layout-sidebar/constants.ts index b706e5ef..64de3e65 100644 --- a/src/widgets/ui/layout-sidebar/constants.ts +++ b/src/widgets/ui/layout-sidebar/constants.ts @@ -1,64 +1,12 @@ -import {PAGE_TYPES} from "~/src/shared/constants"; -import {EVENT_TYPES} from "~/src/shared/types"; +import {EventTypes} from "@/shared/types"; -export const EVENTS_NAV_ORDER: EVENT_TYPES[] = [ - PAGE_TYPES.SENTRY, - PAGE_TYPES.PROFILER, - PAGE_TYPES.SMTP, - PAGE_TYPES.HTTP_DUMP, - PAGE_TYPES.INSPECTOR, - PAGE_TYPES.VAR_DUMP, - PAGE_TYPES.MONOLOG, - PAGE_TYPES.RAY_DUMP, +export const EVENTS_NAV_ORDER: EventTypes[] = [ + EventTypes.Sentry, + EventTypes.Profiler, + EventTypes.Smtp, + EventTypes.HttpDump, + EventTypes.Inspector, + EventTypes.VarDump, + EventTypes.Monolog, + EventTypes.RayDump, ] - -export const EVENTS_LINKS_MAP: { [key in EVENT_TYPES ]: { title: string, iconName: string, path: `/${string}`, eventType: EVENT_TYPES }} = { - [PAGE_TYPES.SENTRY]: { - title: 'Sentry logs', - iconName: 'sentry', - path: '/sentry', - eventType: EVENT_TYPES.SENTRY, - }, - [PAGE_TYPES.PROFILER]: { - title: 'Profiler', - iconName: 'profiler', - path: '/profiler', - eventType: EVENT_TYPES.PROFILER, - }, - [PAGE_TYPES.SMTP]: { - title: 'SMTP mails', - iconName: 'smtp', - path: '/smtp', - eventType: EVENT_TYPES.SMTP, - }, - [PAGE_TYPES.HTTP_DUMP]: { - title: 'Http dumps', - iconName: 'http-dump', - path: '/http-dump', - eventType: EVENT_TYPES.HTTP_DUMP, - }, - [PAGE_TYPES.INSPECTOR]: { - title: 'Inspector logs', - iconName: 'inspector', - path: '/inspector', - eventType: EVENT_TYPES.INSPECTOR, - }, - [PAGE_TYPES.VAR_DUMP]: { - title: 'Var dump logs', - iconName: 'var-dump', - path: '/var-dump', - eventType: EVENT_TYPES.VAR_DUMP, - }, - [PAGE_TYPES.MONOLOG]: { - title: 'Monolog logs', - iconName: 'monolog', - path: '/monolog', - eventType: EVENT_TYPES.MONOLOG, - }, - [PAGE_TYPES.RAY_DUMP]: { - title: 'Ray dump logs', - iconName: 'ray', - path: '/ray', - eventType: EVENT_TYPES.RAY_DUMP, - } -} diff --git a/src/widgets/ui/layout-sidebar/layout-sidebar.vue b/src/widgets/ui/layout-sidebar/layout-sidebar.vue index 50529604..cd0e9020 100644 --- a/src/widgets/ui/layout-sidebar/layout-sidebar.vue +++ b/src/widgets/ui/layout-sidebar/layout-sidebar.vue @@ -1,147 +1,128 @@