-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
chore(web,dashboard): remove legacy bundle from dashboard #7474
Changes from 2 commits
65c213e
4a6a6e4
166e007
4efaad7
64eaa74
bd523cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,9 @@ | |
"type": "module", | ||
"scripts": { | ||
"start": "vite", | ||
"start:static:build": "pm2 start proxy-server.js", | ||
"stop:static:build": "pm2 stop proxy-server.js", | ||
"start:static:build": "http-server dist -p 4201 --proxy http://127.0.0.1:4201?", | ||
"dev": "pnpm start", | ||
"build": "pnpm build:legacy && tsc -b && vite build", | ||
"build:legacy": "rimraf legacy/* && pnpm nx build:web:for-dashboard @novu/web", | ||
"build": "tsc -b && vite build", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are TSC and Vite required? I'd assume that vite build is enough. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You added the same comment when I initialized project :P it was generated by CLI like this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hahahaha, I will open a PR to vite! |
||
"lint": "eslint .", | ||
"preview": "vite preview", | ||
"test:e2e": "playwright test", | ||
|
@@ -121,6 +119,7 @@ | |
"express": "^4.21.0", | ||
"globals": "^15.9.0", | ||
"http-proxy-middleware": "^3.0.2", | ||
"http-server": "^0.13.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this still required? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, to run the dashboard as a static build |
||
"pm2": "^5.4.2", | ||
"postcss": "^8.4.47", | ||
"prettier": "^3.3.3", | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ import { useDeleteWorkflow } from '@/hooks/use-delete-workflow'; | |
import { usePatchWorkflow } from '@/hooks/use-patch-workflow'; | ||
import { useSyncWorkflow } from '@/hooks/use-sync-workflow'; | ||
import { WorkflowOriginEnum, WorkflowStatusEnum } from '@/utils/enums'; | ||
import { buildRoute, LEGACY_ROUTES, ROUTES } from '@/utils/routes'; | ||
import { buildRoute, ROUTES } from '@/utils/routes'; | ||
import { cn } from '@/utils/ui'; | ||
import { IEnvironment, WorkflowListResponseDto } from '@novu/shared'; | ||
import { ComponentProps, useState } from 'react'; | ||
|
@@ -42,6 +42,7 @@ import { CopyButton } from './primitives/copy-button'; | |
import { ToastIcon } from './primitives/sonner'; | ||
import { showToast } from './primitives/sonner-helpers'; | ||
import { TimeDisplayHoverCard } from './time-display-hover-card'; | ||
import { LEGACY_DASHBOARD_URL } from '@/config'; | ||
|
||
type WorkflowRowProps = { | ||
workflow: WorkflowListResponseDto; | ||
|
@@ -64,7 +65,7 @@ const WorkflowLinkTableCell = (props: WorkflowLinkTableCellProps) => { | |
const isV1Workflow = workflow.origin === WorkflowOriginEnum.NOVU_CLOUD_V1; | ||
|
||
const workflowLink = isV1Workflow | ||
? buildRoute(LEGACY_ROUTES.EDIT_WORKFLOW, { | ||
? buildRoute(`${LEGACY_DASHBOARD_URL}/workflows/edit/:workflowId`, { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use the legacy web app url to redirect instead of route on the current domain |
||
workflowId: workflow._id, | ||
}) | ||
: buildRoute(ROUTES.EDIT_WORKFLOW, { | ||
|
@@ -90,7 +91,7 @@ export const WorkflowRow = ({ workflow }: WorkflowRowProps) => { | |
|
||
const isV1Workflow = workflow.origin === WorkflowOriginEnum.NOVU_CLOUD_V1; | ||
const triggerWorkflowLink = isV1Workflow | ||
? buildRoute(LEGACY_ROUTES.TEST_WORKFLOW, { workflowId: workflow._id }) | ||
? buildRoute(`${LEGACY_DASHBOARD_URL}/workflows/edit/:workflowId/test-workflow`, { workflowId: workflow._id }) | ||
: buildRoute(ROUTES.TEST_WORKFLOW, { | ||
environmentSlug: currentEnvironment?.slug ?? '', | ||
workflowSlug: workflow.slug, | ||
|
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
serve the static dist folder with
http-server