Skip to content

Commit

Permalink
fix: rename Workspace status to Workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
hugocostadev committed Oct 17, 2023
1 parent a7b8ba1 commit 8a5e9dd
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion apps/meteor/client/views/admin/AdministrationRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const AdministrationRouter = ({ children }: AdministrationRouterProps): ReactEle
return;
}

const defaultRoutePath = getAdminSidebarItems().find(firstSidebarPage)?.href ?? '/admin/workspace-status';
const defaultRoutePath = getAdminSidebarItems().find(firstSidebarPage)?.href ?? '/admin/workspace';

if (isGoRocketChatLink(defaultRoutePath)) {
window.open(defaultRoutePath, '_blank');
Expand Down
16 changes: 6 additions & 10 deletions apps/meteor/client/views/admin/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ declare module '@rocket.chat/ui-contexts' {
pathname: '/admin/info';
pattern: '/admin/info';
};
'workspace-status': {
pathname: '/admin/workspace-status';
pattern: '/admin/workspace-status';
'workspace': {
pathname: '/admin/workspace';
pattern: '/admin/workspace';
};
'admin-import': {
pathname: '/admin/import';
Expand Down Expand Up @@ -123,18 +123,14 @@ registerAdminRoute('/sounds/:context?/:id?', {
component: lazy(() => import('./customSounds/CustomSoundsRoute')),
});

/** @deprecated in favor of `/workspace-status` route, this is a fallback to work in Mobile app, should be removed in the next major */
/** @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')),
});

registerAdminRoute('/workspace-status', {
name: 'workspace-status',
component: lazy(() => import('./workspaceStatus/WorkspaceStatusRoute')),
});
registerAdminRoute('/workspace-status', {
name: 'workspace-status',
registerAdminRoute('/workspace', {
name: 'workspace',
component: lazy(() => import('./workspaceStatus/WorkspaceStatusRoute')),
});

Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/client/views/admin/sidebarItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export const {
subscribeToSidebarItems: subscribeToAdminSidebarItems,
} = createSidebarItems([
{
href: '/admin/workspace-status',
i18nLabel: 'Workspace_status',
href: '/admin/workspace',
i18nLabel: 'Workspace',
icon: 'info-circled',
permissionGranted: (): boolean => hasPermission('view-statistics'),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const WorkspaceStatusPage = ({
const alertOplogForMultipleInstances = warningMultipleInstances && !statistics.oplogEnabled;

return (
<Page data-qa='workspace-status' bg='tint'>
<Page.Header title={t('Workspace_status')}>
<Page bg='tint'>
<Page.Header title={t('Workspace')}>
{canViewStatistics && (
<ButtonGroup>
<Button type='button' onClick={onClickDownloadInfo}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const WorkspaceStatusRoute = (): ReactElement => {
if (isError || !statistics || !serverInfo) {
return (
<Page>
<Page.Header title={t('Workspace_status')}>
<Page.Header title={t('Workspace')}>
<ButtonGroup>
<Button icon='reload' primary type='button' onClick={handleClickRefreshButton}>
{t('Refresh')}
Expand Down
1 change: 0 additions & 1 deletion apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -6091,7 +6091,6 @@
"Premium_capability": "Premium capability",
"Operating_withing_plan_limits": "Operating withing plan limits",
"Plan_limits_reached": "Plan limits reached",
"Workspace_status": "Workspace status",
"Workspace_not_registered": "Workspace not registered",
"Users_Connected": "Users connected",
"Manage_subscription": "Manage subscription",
Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/tests/e2e/administration-menu.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ test.describe.serial('administration-menu', () => {
await expect(page).toHaveURL('admin/upgrade/go-fully-featured');
});

test('expect open Workspace status page', async ({ page }) => {
test('expect open Workspace page', async ({ page }) => {
test.skip(!IS_EE, 'Enterprise only');
await poHomeDiscussion.sidenav.openAdministrationByLabel('Workspace');

await expect(page).toHaveURL('admin/workspace-status');
await expect(page).toHaveURL('admin/workspace');
});

test('expect open omnichannel page', async ({ page }) => {
Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/tests/e2e/administration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ test.describe.parallel('administration', () => {
poAdmin = new Admin(page);
});

test.describe('Workspace status', () => {
test.describe('Workspace', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/admin/workspace-status');
await page.goto('/admin/workspace');
});

test('expect download info as JSON', async ({ page }) => {
Expand Down

0 comments on commit 8a5e9dd

Please sign in to comment.