diff --git a/apps/meteor/client/views/admin/routes.tsx b/apps/meteor/client/views/admin/routes.tsx index da25cc764471..f52fd2d1e1d2 100644 --- a/apps/meteor/client/views/admin/routes.tsx +++ b/apps/meteor/client/views/admin/routes.tsx @@ -126,12 +126,12 @@ registerAdminRoute('/sounds/:context?/:id?', { /** @deprecated in favor of `/workspace` route, this is a fallback to work in Mobile app, should be removed in the next major */ registerAdminRoute('/info', { name: 'info', - component: lazy(() => import('./workspaceStatus/WorkspaceStatusRoute')), + component: lazy(() => import('./workspace/WorkspaceRoute')), }); registerAdminRoute('/workspace', { name: 'workspace', - component: lazy(() => import('./workspaceStatus/WorkspaceStatusRoute')), + component: lazy(() => import('./workspace/WorkspaceRoute')), }); registerAdminRoute('/import', { diff --git a/apps/meteor/client/views/admin/workspaceStatus/DeploymentCard/DeploymentCard.stories.tsx b/apps/meteor/client/views/admin/workspace/DeploymentCard/DeploymentCard.stories.tsx similarity index 100% rename from apps/meteor/client/views/admin/workspaceStatus/DeploymentCard/DeploymentCard.stories.tsx rename to apps/meteor/client/views/admin/workspace/DeploymentCard/DeploymentCard.stories.tsx diff --git a/apps/meteor/client/views/admin/workspaceStatus/DeploymentCard/DeploymentCard.tsx b/apps/meteor/client/views/admin/workspace/DeploymentCard/DeploymentCard.tsx similarity index 100% rename from apps/meteor/client/views/admin/workspaceStatus/DeploymentCard/DeploymentCard.tsx rename to apps/meteor/client/views/admin/workspace/DeploymentCard/DeploymentCard.tsx diff --git a/apps/meteor/client/views/admin/workspaceStatus/DeploymentCard/components/InstancesModal/DescriptionList.stories.tsx b/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/DescriptionList.stories.tsx similarity index 100% rename from apps/meteor/client/views/admin/workspaceStatus/DeploymentCard/components/InstancesModal/DescriptionList.stories.tsx rename to apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/DescriptionList.stories.tsx diff --git a/apps/meteor/client/views/admin/workspaceStatus/DeploymentCard/components/InstancesModal/DescriptionList.tsx b/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/DescriptionList.tsx similarity index 100% rename from apps/meteor/client/views/admin/workspaceStatus/DeploymentCard/components/InstancesModal/DescriptionList.tsx rename to apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/DescriptionList.tsx diff --git a/apps/meteor/client/views/admin/workspaceStatus/DeploymentCard/components/InstancesModal/DescriptionListEntry.tsx b/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/DescriptionListEntry.tsx similarity index 100% rename from apps/meteor/client/views/admin/workspaceStatus/DeploymentCard/components/InstancesModal/DescriptionListEntry.tsx rename to apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/DescriptionListEntry.tsx diff --git a/apps/meteor/client/views/admin/workspaceStatus/DeploymentCard/components/InstancesModal/InstancesModal.stories.tsx b/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/InstancesModal.stories.tsx similarity index 100% rename from apps/meteor/client/views/admin/workspaceStatus/DeploymentCard/components/InstancesModal/InstancesModal.stories.tsx rename to apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/InstancesModal.stories.tsx diff --git a/apps/meteor/client/views/admin/workspaceStatus/DeploymentCard/components/InstancesModal/InstancesModal.tsx b/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/InstancesModal.tsx similarity index 100% rename from apps/meteor/client/views/admin/workspaceStatus/DeploymentCard/components/InstancesModal/InstancesModal.tsx rename to apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/InstancesModal.tsx diff --git a/apps/meteor/client/views/admin/workspaceStatus/DeploymentCard/components/InstancesModal/index.ts b/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/index.ts similarity index 100% rename from apps/meteor/client/views/admin/workspaceStatus/DeploymentCard/components/InstancesModal/index.ts rename to apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/index.ts diff --git a/apps/meteor/client/views/admin/workspaceStatus/MessagesRoomsCard/MessagesRoomsCard.stories.tsx b/apps/meteor/client/views/admin/workspace/MessagesRoomsCard/MessagesRoomsCard.stories.tsx similarity index 100% rename from apps/meteor/client/views/admin/workspaceStatus/MessagesRoomsCard/MessagesRoomsCard.stories.tsx rename to apps/meteor/client/views/admin/workspace/MessagesRoomsCard/MessagesRoomsCard.stories.tsx diff --git a/apps/meteor/client/views/admin/workspaceStatus/MessagesRoomsCard/MessagesRoomsCard.tsx b/apps/meteor/client/views/admin/workspace/MessagesRoomsCard/MessagesRoomsCard.tsx similarity index 100% rename from apps/meteor/client/views/admin/workspaceStatus/MessagesRoomsCard/MessagesRoomsCard.tsx rename to apps/meteor/client/views/admin/workspace/MessagesRoomsCard/MessagesRoomsCard.tsx diff --git a/apps/meteor/client/views/admin/workspaceStatus/UsagePieGraph.stories.tsx b/apps/meteor/client/views/admin/workspace/UsagePieGraph.stories.tsx similarity index 100% rename from apps/meteor/client/views/admin/workspaceStatus/UsagePieGraph.stories.tsx rename to apps/meteor/client/views/admin/workspace/UsagePieGraph.stories.tsx diff --git a/apps/meteor/client/views/admin/workspaceStatus/UsagePieGraph.tsx b/apps/meteor/client/views/admin/workspace/UsagePieGraph.tsx similarity index 100% rename from apps/meteor/client/views/admin/workspaceStatus/UsagePieGraph.tsx rename to apps/meteor/client/views/admin/workspace/UsagePieGraph.tsx diff --git a/apps/meteor/client/views/admin/workspaceStatus/UsersUploadsCard/UsersUploadsCard.tsx b/apps/meteor/client/views/admin/workspace/UsersUploadsCard/UsersUploadsCard.tsx similarity index 100% rename from apps/meteor/client/views/admin/workspaceStatus/UsersUploadsCard/UsersUploadsCard.tsx rename to apps/meteor/client/views/admin/workspace/UsersUploadsCard/UsersUploadsCard.tsx diff --git a/apps/meteor/client/views/admin/workspaceStatus/VersionCard/VersionCard.tsx b/apps/meteor/client/views/admin/workspace/VersionCard/VersionCard.tsx similarity index 98% rename from apps/meteor/client/views/admin/workspaceStatus/VersionCard/VersionCard.tsx rename to apps/meteor/client/views/admin/workspace/VersionCard/VersionCard.tsx index 4fa9f2226cbc..ab4996a5c4dc 100644 --- a/apps/meteor/client/views/admin/workspaceStatus/VersionCard/VersionCard.tsx +++ b/apps/meteor/client/views/admin/workspace/VersionCard/VersionCard.tsx @@ -40,7 +40,7 @@ const VersionCard = ({ serverInfo }: VersionCardProps): ReactElement => { const formatDate = useFormatDate(); - const { data: licenseData, isLoading } = useLicense(); + const { data: licenseData, isLoading, refetch: refetchLicense } = useLicense(); const { data: regStatus } = useRegistrationStatus(); const [actionItems, setActionItems] = useState([]); @@ -201,7 +201,7 @@ const VersionCard = ({ serverInfo }: VersionCardProps): ReactElement => { {actionItems && } - {actionButton && } + {actionButton && } ) : ( diff --git a/apps/meteor/client/views/admin/workspaceStatus/VersionCard/components/VersionCardActionButton.tsx b/apps/meteor/client/views/admin/workspace/VersionCard/components/VersionCardActionButton.tsx similarity index 88% rename from apps/meteor/client/views/admin/workspaceStatus/VersionCard/components/VersionCardActionButton.tsx rename to apps/meteor/client/views/admin/workspace/VersionCard/components/VersionCardActionButton.tsx index 6c0adeb31ce5..67982d638092 100644 --- a/apps/meteor/client/views/admin/workspaceStatus/VersionCard/components/VersionCardActionButton.tsx +++ b/apps/meteor/client/views/admin/workspace/VersionCard/components/VersionCardActionButton.tsx @@ -8,6 +8,7 @@ import RegisterWorkspaceModal from '../../../cloud/modals/RegisterWorkspaceModal type VersionCardActionButtonProps = { actionButton: VersionActionButton; + refetch: () => void; }; export type VersionActionButton = { @@ -15,7 +16,7 @@ export type VersionActionButton = { label: ReactElement; }; -const VersionCardActionButton = ({ actionButton }: VersionCardActionButtonProps): ReactElement => { +const VersionCardActionButton = ({ actionButton, refetch }: VersionCardActionButtonProps): ReactElement => { const router = useRouter(); const setModal = useSetModal(); @@ -47,8 +48,4 @@ const VersionCardActionButton = ({ actionButton }: VersionCardActionButtonProps) ); }; -const refetch = (): void => { - window.location.reload(); -}; - export default memo(VersionCardActionButton); diff --git a/apps/meteor/client/views/admin/workspaceStatus/VersionCard/components/VersionCardActionItem.tsx b/apps/meteor/client/views/admin/workspace/VersionCard/components/VersionCardActionItem.tsx similarity index 100% rename from apps/meteor/client/views/admin/workspaceStatus/VersionCard/components/VersionCardActionItem.tsx rename to apps/meteor/client/views/admin/workspace/VersionCard/components/VersionCardActionItem.tsx diff --git a/apps/meteor/client/views/admin/workspaceStatus/VersionCard/components/VersionCardActionItemList.tsx b/apps/meteor/client/views/admin/workspace/VersionCard/components/VersionCardActionItemList.tsx similarity index 100% rename from apps/meteor/client/views/admin/workspaceStatus/VersionCard/components/VersionCardActionItemList.tsx rename to apps/meteor/client/views/admin/workspace/VersionCard/components/VersionCardActionItemList.tsx diff --git a/apps/meteor/client/views/admin/workspaceStatus/VersionCard/components/VersionCardSkeleton.tsx b/apps/meteor/client/views/admin/workspace/VersionCard/components/VersionCardSkeleton.tsx similarity index 100% rename from apps/meteor/client/views/admin/workspaceStatus/VersionCard/components/VersionCardSkeleton.tsx rename to apps/meteor/client/views/admin/workspace/VersionCard/components/VersionCardSkeleton.tsx diff --git a/apps/meteor/client/views/admin/workspaceStatus/VersionCard/components/VersionTag.tsx b/apps/meteor/client/views/admin/workspace/VersionCard/components/VersionTag.tsx similarity index 100% rename from apps/meteor/client/views/admin/workspaceStatus/VersionCard/components/VersionTag.tsx rename to apps/meteor/client/views/admin/workspace/VersionCard/components/VersionTag.tsx diff --git a/apps/meteor/client/views/admin/workspaceStatus/WorkspaceStatusPage.tsx b/apps/meteor/client/views/admin/workspace/WorkspacePage.tsx similarity index 97% rename from apps/meteor/client/views/admin/workspaceStatus/WorkspaceStatusPage.tsx rename to apps/meteor/client/views/admin/workspace/WorkspacePage.tsx index 0021c1546e2c..fb504ce4e063 100644 --- a/apps/meteor/client/views/admin/workspaceStatus/WorkspaceStatusPage.tsx +++ b/apps/meteor/client/views/admin/workspace/WorkspacePage.tsx @@ -20,7 +20,7 @@ type WorkspaceStatusPageProps = { onClickDownloadInfo: () => void; }; -const WorkspaceStatusPage = ({ +const WorkspacePage = ({ canViewStatistics, serverInfo, statistics, @@ -99,4 +99,4 @@ const WorkspaceStatusPage = ({ ); }; -export default memo(WorkspaceStatusPage); +export default memo(WorkspacePage); diff --git a/apps/meteor/client/views/admin/workspaceStatus/WorkspaceStatusRoute.tsx b/apps/meteor/client/views/admin/workspace/WorkspaceRoute.tsx similarity index 91% rename from apps/meteor/client/views/admin/workspaceStatus/WorkspaceStatusRoute.tsx rename to apps/meteor/client/views/admin/workspace/WorkspaceRoute.tsx index 0d3b66069731..0ec27f67a69e 100644 --- a/apps/meteor/client/views/admin/workspaceStatus/WorkspaceStatusRoute.tsx +++ b/apps/meteor/client/views/admin/workspace/WorkspaceRoute.tsx @@ -8,9 +8,9 @@ import PageSkeleton from '../../../components/PageSkeleton'; import { useWorkspaceInfo } from '../../../hooks/useWorkspaceInfo'; import { downloadJsonAs } from '../../../lib/download'; import NotAuthorizedPage from '../../notAuthorized/NotAuthorizedPage'; -import WorkspaceStatusPage from './WorkspaceStatusPage'; +import WorkspacePage from './WorkspacePage'; -const WorkspaceStatusRoute = (): ReactElement => { +const WorkspaceRoute = (): ReactElement => { const t = useTranslation(); const canViewStatistics = usePermission('view-statistics'); @@ -57,7 +57,7 @@ const WorkspaceStatusRoute = (): ReactElement => { } return ( - { ); }; -export default memo(WorkspaceStatusRoute); +export default memo(WorkspaceRoute);