mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
chore: remove unused code (#16815)
This commit is contained in:
@ -26,7 +26,7 @@ import {
|
|||||||
} from "@mui/material/styles";
|
} from "@mui/material/styles";
|
||||||
import { DecoratorHelpers } from "@storybook/addon-themes";
|
import { DecoratorHelpers } from "@storybook/addon-themes";
|
||||||
import isChromatic from "chromatic/isChromatic";
|
import isChromatic from "chromatic/isChromatic";
|
||||||
import React, { StrictMode } from "react";
|
import { StrictMode } from "react";
|
||||||
import { HelmetProvider } from "react-helmet-async";
|
import { HelmetProvider } from "react-helmet-async";
|
||||||
import { QueryClient, QueryClientProvider, parseQueryArgs } from "react-query";
|
import { QueryClient, QueryClientProvider, parseQueryArgs } from "react-query";
|
||||||
import { withRouter } from "storybook-addon-remix-react-router";
|
import { withRouter } from "storybook-addon-remix-react-router";
|
||||||
|
@ -510,7 +510,7 @@ export const waitUntilUrlIsNotResponding = async (url: string) => {
|
|||||||
while (retries < maxRetries) {
|
while (retries < maxRetries) {
|
||||||
try {
|
try {
|
||||||
await axiosInstance.get(url);
|
await axiosInstance.get(url);
|
||||||
} catch (error) {
|
} catch {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
site/src/@types/storybook.d.ts
vendored
1
site/src/@types/storybook.d.ts
vendored
@ -1,4 +1,3 @@
|
|||||||
import * as _storybook_types from "@storybook/react";
|
|
||||||
import type {
|
import type {
|
||||||
DeploymentValues,
|
DeploymentValues,
|
||||||
Experiments,
|
Experiments,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { API, type InsightsParams, type InsightsTemplateParams } from "api/api";
|
import { API, type InsightsParams, type InsightsTemplateParams } from "api/api";
|
||||||
import type { GetUserStatusCountsResponse } from "api/typesGenerated";
|
import type { GetUserStatusCountsResponse } from "api/typesGenerated";
|
||||||
import { type UseQueryOptions, UseQueryResult } from "react-query";
|
import type { UseQueryOptions } from "react-query";
|
||||||
|
|
||||||
export const insightsTemplate = (params: InsightsTemplateParams) => {
|
export const insightsTemplate = (params: InsightsTemplateParams) => {
|
||||||
return {
|
return {
|
||||||
|
@ -2,7 +2,6 @@ import { API, type GetTemplatesOptions, type GetTemplatesQuery } from "api/api";
|
|||||||
import type {
|
import type {
|
||||||
CreateTemplateRequest,
|
CreateTemplateRequest,
|
||||||
CreateTemplateVersionRequest,
|
CreateTemplateVersionRequest,
|
||||||
Preset,
|
|
||||||
ProvisionerJob,
|
ProvisionerJob,
|
||||||
ProvisionerJobStatus,
|
ProvisionerJobStatus,
|
||||||
Template,
|
Template,
|
||||||
|
@ -7,12 +7,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
||||||
import { Button } from "components/Button/Button";
|
import { Check, ChevronRight, Circle } from "lucide-react";
|
||||||
import { Check, ChevronDownIcon, ChevronRight, Circle } from "lucide-react";
|
|
||||||
import {
|
import {
|
||||||
type ComponentPropsWithoutRef,
|
type ComponentPropsWithoutRef,
|
||||||
type ElementRef,
|
type ElementRef,
|
||||||
type FC,
|
|
||||||
type HTMLAttributes,
|
type HTMLAttributes,
|
||||||
forwardRef,
|
forwardRef,
|
||||||
} from "react";
|
} from "react";
|
||||||
|
@ -1,13 +1,3 @@
|
|||||||
/**
|
|
||||||
* @file A global error boundary designed to work with React Router.
|
|
||||||
*
|
|
||||||
* This is not documented well, but because of React Router works, it will
|
|
||||||
* automatically intercept any render errors produced in routes, and will
|
|
||||||
* "swallow" them, preventing the errors from bubbling up to any error
|
|
||||||
* boundaries above the router. The global error boundary must be explicitly
|
|
||||||
* bound to a route to work as expected.
|
|
||||||
*/
|
|
||||||
import type { Interpolation } from "@emotion/react";
|
|
||||||
import Link from "@mui/material/Link";
|
import Link from "@mui/material/Link";
|
||||||
import { Button } from "components/Button/Button";
|
import { Button } from "components/Button/Button";
|
||||||
import { CoderIcon } from "components/Icons/CoderIcon";
|
import { CoderIcon } from "components/Icons/CoderIcon";
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
import data from "@emoji-mart/data/sets/15/apple.json";
|
import data from "@emoji-mart/data/sets/15/apple.json";
|
||||||
import EmojiMart from "@emoji-mart/react";
|
import EmojiMart from "@emoji-mart/react";
|
||||||
import {
|
import { type ComponentProps, type FC, useEffect } from "react";
|
||||||
type ComponentProps,
|
|
||||||
type FC,
|
|
||||||
useEffect,
|
|
||||||
useLayoutEffect,
|
|
||||||
} from "react";
|
|
||||||
import icons from "theme/icons.json";
|
import icons from "theme/icons.json";
|
||||||
|
|
||||||
const custom = [
|
const custom = [
|
||||||
|
@ -88,7 +88,7 @@ const FeatureIcon: FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
root: (theme) => ({
|
root: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
@ -96,7 +96,7 @@ const styles = {
|
|||||||
padding: "24px 36px",
|
padding: "24px 36px",
|
||||||
borderRadius: 8,
|
borderRadius: 8,
|
||||||
gap: 18,
|
gap: 18,
|
||||||
}),
|
},
|
||||||
title: {
|
title: {
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
fontFamily: "inherit",
|
fontFamily: "inherit",
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react";
|
import type { Meta, StoryObj } from "@storybook/react";
|
||||||
import { userEvent } from "@storybook/test";
|
|
||||||
import {
|
import {
|
||||||
Select,
|
Select,
|
||||||
SelectContent,
|
SelectContent,
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import LaunchOutlined from "@mui/icons-material/LaunchOutlined";
|
|
||||||
import { Button } from "components/Button/Button";
|
import { Button } from "components/Button/Button";
|
||||||
import { Stack } from "components/Stack/Stack";
|
import { Stack } from "components/Stack/Stack";
|
||||||
import { SquareArrowOutUpRightIcon } from "lucide-react";
|
import { SquareArrowOutUpRightIcon } from "lucide-react";
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { type Interpolation, type Theme, css, useTheme } from "@emotion/react";
|
import { type Interpolation, type Theme, css, useTheme } from "@emotion/react";
|
||||||
import MenuItem from "@mui/material/MenuItem";
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
import { Button } from "components/Button/Button";
|
import { Button } from "components/Button/Button";
|
||||||
import { FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge";
|
|
||||||
import {
|
import {
|
||||||
Popover,
|
Popover,
|
||||||
PopoverContent,
|
PopoverContent,
|
||||||
|
@ -2,7 +2,6 @@ import type { Meta, StoryObj } from "@storybook/react";
|
|||||||
import { fn, userEvent, within } from "@storybook/test";
|
import { fn, userEvent, within } from "@storybook/test";
|
||||||
import { PointerEventsCheckLevel } from "@testing-library/user-event";
|
import { PointerEventsCheckLevel } from "@testing-library/user-event";
|
||||||
import type { FC } from "react";
|
import type { FC } from "react";
|
||||||
import { chromaticWithTablet } from "testHelpers/chromatic";
|
|
||||||
import {
|
import {
|
||||||
MockPrimaryWorkspaceProxy,
|
MockPrimaryWorkspaceProxy,
|
||||||
MockProxyLatencies,
|
MockProxyLatencies,
|
||||||
|
@ -13,7 +13,6 @@ import {
|
|||||||
DropdownMenuSeparator,
|
DropdownMenuSeparator,
|
||||||
DropdownMenuTrigger,
|
DropdownMenuTrigger,
|
||||||
} from "components/DropdownMenu/DropdownMenu";
|
} from "components/DropdownMenu/DropdownMenu";
|
||||||
import { FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge";
|
|
||||||
import { displayError } from "components/GlobalSnackbar/utils";
|
import { displayError } from "components/GlobalSnackbar/utils";
|
||||||
import { Latency } from "components/Latency/Latency";
|
import { Latency } from "components/Latency/Latency";
|
||||||
import type { ProxyContextValue } from "contexts/ProxyContext";
|
import type { ProxyContextValue } from "contexts/ProxyContext";
|
||||||
|
@ -2,7 +2,6 @@ import type { Theme } from "@emotion/react";
|
|||||||
import AlertTitle from "@mui/material/AlertTitle";
|
import AlertTitle from "@mui/material/AlertTitle";
|
||||||
import { Alert, type AlertColor } from "components/Alert/Alert";
|
import { Alert, type AlertColor } from "components/Alert/Alert";
|
||||||
import { AlertDetail } from "components/Alert/Alert";
|
import { AlertDetail } from "components/Alert/Alert";
|
||||||
import { Stack } from "components/Stack/Stack";
|
|
||||||
import { ProvisionerTag } from "modules/provisioners/ProvisionerTag";
|
import { ProvisionerTag } from "modules/provisioners/ProvisionerTag";
|
||||||
import type { FC } from "react";
|
import type { FC } from "react";
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import TextField from "@mui/material/TextField";
|
import TextField from "@mui/material/TextField";
|
||||||
import type { ProvisionerDaemon } from "api/typesGenerated";
|
import type { ProvisionerDaemon } from "api/typesGenerated";
|
||||||
import { Button } from "components/Button/Button";
|
import { Button } from "components/Button/Button";
|
||||||
import { Input } from "components/Input/Input";
|
|
||||||
import { PlusIcon } from "lucide-react";
|
import { PlusIcon } from "lucide-react";
|
||||||
import { ProvisionerTag } from "modules/provisioners/ProvisionerTag";
|
import { ProvisionerTag } from "modules/provisioners/ProvisionerTag";
|
||||||
import { type FC, useRef, useState } from "react";
|
import { type FC, useRef, useState } from "react";
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import Link from "@mui/material/Link";
|
import Link from "@mui/material/Link";
|
||||||
import type * as TypesGen from "api/typesGenerated";
|
|
||||||
import { TerminalIcon } from "components/Icons/TerminalIcon";
|
import { TerminalIcon } from "components/Icons/TerminalIcon";
|
||||||
import type { FC, MouseEvent } from "react";
|
import type { FC, MouseEvent } from "react";
|
||||||
import { generateRandomString } from "utils/random";
|
import { generateRandomString } from "utils/random";
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import { authMethods, createUser } from "api/queries/users";
|
import { authMethods, createUser } from "api/queries/users";
|
||||||
import { displaySuccess } from "components/GlobalSnackbar/utils";
|
import { displaySuccess } from "components/GlobalSnackbar/utils";
|
||||||
import { Margins } from "components/Margins/Margins";
|
import { Margins } from "components/Margins/Margins";
|
||||||
import { useDebouncedFunction } from "hooks/debounce";
|
import type { FC } from "react";
|
||||||
import { type FC, useState } from "react";
|
|
||||||
import { Helmet } from "react-helmet-async";
|
import { Helmet } from "react-helmet-async";
|
||||||
import { useMutation, useQuery, useQueryClient } from "react-query";
|
import { useMutation, useQuery, useQueryClient } from "react-query";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
@ -134,7 +134,7 @@ const CreateWorkspacePage: FC = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
onCreateWorkspace(newWorkspace);
|
onCreateWorkspace(newWorkspace);
|
||||||
} catch (err) {
|
} catch {
|
||||||
setMode("form");
|
setMode("form");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { Loader } from "components/Loader/Loader";
|
|
||||||
import { useDeploymentSettings } from "modules/management/DeploymentSettingsProvider";
|
import { useDeploymentSettings } from "modules/management/DeploymentSettingsProvider";
|
||||||
import type { FC } from "react";
|
import type { FC } from "react";
|
||||||
import { Helmet } from "react-helmet-async";
|
import { Helmet } from "react-helmet-async";
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { deploymentDAUs } from "api/queries/deployment";
|
import { deploymentDAUs } from "api/queries/deployment";
|
||||||
import { entitlements } from "api/queries/entitlements";
|
|
||||||
import { availableExperiments, experiments } from "api/queries/experiments";
|
import { availableExperiments, experiments } from "api/queries/experiments";
|
||||||
import { useEmbeddedMetadata } from "hooks/useEmbeddedMetadata";
|
import { useEmbeddedMetadata } from "hooks/useEmbeddedMetadata";
|
||||||
import { useDeploymentSettings } from "modules/management/DeploymentSettingsProvider";
|
import { useDeploymentSettings } from "modules/management/DeploymentSettingsProvider";
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import AlertTitle from "@mui/material/AlertTitle";
|
import AlertTitle from "@mui/material/AlertTitle";
|
||||||
import type {
|
import type {
|
||||||
DAUsResponse,
|
DAUsResponse,
|
||||||
Entitlements,
|
|
||||||
Experiments,
|
Experiments,
|
||||||
SerpentOption,
|
SerpentOption,
|
||||||
} from "api/typesGenerated";
|
} from "api/typesGenerated";
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { Loader } from "components/Loader/Loader";
|
|
||||||
import { useDeploymentSettings } from "modules/management/DeploymentSettingsProvider";
|
import { useDeploymentSettings } from "modules/management/DeploymentSettingsProvider";
|
||||||
import type { FC } from "react";
|
import type { FC } from "react";
|
||||||
import { Helmet } from "react-helmet-async";
|
import { Helmet } from "react-helmet-async";
|
||||||
|
@ -11,7 +11,6 @@ import { TabLink, Tabs, TabsList } from "components/Tabs/Tabs";
|
|||||||
import { useSearchParamsKey } from "hooks/useSearchParamsKey";
|
import { useSearchParamsKey } from "hooks/useSearchParamsKey";
|
||||||
import { useDeploymentSettings } from "modules/management/DeploymentSettingsProvider";
|
import { useDeploymentSettings } from "modules/management/DeploymentSettingsProvider";
|
||||||
import { castNotificationMethod } from "modules/notifications/utils";
|
import { castNotificationMethod } from "modules/notifications/utils";
|
||||||
import { Section } from "pages/UserSettingsPage/Section";
|
|
||||||
import type { FC } from "react";
|
import type { FC } from "react";
|
||||||
import { Helmet } from "react-helmet-async";
|
import { Helmet } from "react-helmet-async";
|
||||||
import { useQueries } from "react-query";
|
import { useQueries } from "react-query";
|
||||||
|
@ -28,7 +28,7 @@ const CreateOAuth2AppPage: FC = () => {
|
|||||||
`Successfully added the OAuth2 application "${app.name}".`,
|
`Successfully added the OAuth2 application "${app.name}".`,
|
||||||
);
|
);
|
||||||
navigate(`/deployment/oauth2-provider/apps/${app.id}?created=true`);
|
navigate(`/deployment/oauth2-provider/apps/${app.id}?created=true`);
|
||||||
} catch (ignore) {
|
} catch {
|
||||||
displayError("Failed to create OAuth2 application");
|
displayError("Failed to create OAuth2 application");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import KeyboardArrowLeft from "@mui/icons-material/KeyboardArrowLeft";
|
|
||||||
import type * as TypesGen from "api/typesGenerated";
|
import type * as TypesGen from "api/typesGenerated";
|
||||||
import { ErrorAlert } from "components/Alert/ErrorAlert";
|
import { ErrorAlert } from "components/Alert/ErrorAlert";
|
||||||
import { Button } from "components/Button/Button";
|
import { Button } from "components/Button/Button";
|
||||||
|
@ -62,7 +62,7 @@ const EditOAuth2AppPage: FC = () => {
|
|||||||
`Successfully updated the OAuth2 application "${req.name}".`,
|
`Successfully updated the OAuth2 application "${req.name}".`,
|
||||||
);
|
);
|
||||||
navigate("/deployment/oauth2-provider/apps?updated=true");
|
navigate("/deployment/oauth2-provider/apps?updated=true");
|
||||||
} catch (ignore) {
|
} catch {
|
||||||
displayError("Failed to update OAuth2 application");
|
displayError("Failed to update OAuth2 application");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@ -73,7 +73,7 @@ const EditOAuth2AppPage: FC = () => {
|
|||||||
`You have successfully deleted the OAuth2 application "${name}"`,
|
`You have successfully deleted the OAuth2 application "${name}"`,
|
||||||
);
|
);
|
||||||
navigate("/deployment/oauth2-provider/apps?deleted=true");
|
navigate("/deployment/oauth2-provider/apps?deleted=true");
|
||||||
} catch (error) {
|
} catch {
|
||||||
displayError("Failed to delete OAuth2 application");
|
displayError("Failed to delete OAuth2 application");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@ -82,7 +82,7 @@ const EditOAuth2AppPage: FC = () => {
|
|||||||
const secret = await postSecretMutation.mutateAsync(appId);
|
const secret = await postSecretMutation.mutateAsync(appId);
|
||||||
displaySuccess("Successfully generated OAuth2 client secret");
|
displaySuccess("Successfully generated OAuth2 client secret");
|
||||||
setFullNewSecret(secret);
|
setFullNewSecret(secret);
|
||||||
} catch (ignore) {
|
} catch {
|
||||||
displayError("Failed to generate OAuth2 client secret");
|
displayError("Failed to generate OAuth2 client secret");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@ -93,7 +93,7 @@ const EditOAuth2AppPage: FC = () => {
|
|||||||
if (fullNewSecret?.id === secretId) {
|
if (fullNewSecret?.id === secretId) {
|
||||||
setFullNewSecret(undefined);
|
setFullNewSecret(undefined);
|
||||||
}
|
}
|
||||||
} catch (ignore) {
|
} catch {
|
||||||
displayError("Failed to delete OAuth2 client secret");
|
displayError("Failed to delete OAuth2 client secret");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { Loader } from "components/Loader/Loader";
|
|
||||||
import { useDashboard } from "modules/dashboard/useDashboard";
|
import { useDashboard } from "modules/dashboard/useDashboard";
|
||||||
import { useDeploymentSettings } from "modules/management/DeploymentSettingsProvider";
|
import { useDeploymentSettings } from "modules/management/DeploymentSettingsProvider";
|
||||||
import type { FC } from "react";
|
import type { FC } from "react";
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { Loader } from "components/Loader/Loader";
|
|
||||||
import { useDeploymentSettings } from "modules/management/DeploymentSettingsProvider";
|
import { useDeploymentSettings } from "modules/management/DeploymentSettingsProvider";
|
||||||
import type { FC } from "react";
|
import type { FC } from "react";
|
||||||
import { Helmet } from "react-helmet-async";
|
import { Helmet } from "react-helmet-async";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { type Interpolation, type Theme, useTheme } from "@emotion/react";
|
import type { Interpolation, Theme } from "@emotion/react";
|
||||||
import AddIcon from "@mui/icons-material/AddOutlined";
|
import AddIcon from "@mui/icons-material/AddOutlined";
|
||||||
import AddOutlined from "@mui/icons-material/AddOutlined";
|
import AddOutlined from "@mui/icons-material/AddOutlined";
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
|
@ -8,7 +8,6 @@ import {
|
|||||||
roleIdpSyncSettings,
|
roleIdpSyncSettings,
|
||||||
} from "api/queries/organizations";
|
} from "api/queries/organizations";
|
||||||
import { organizationRoles } from "api/queries/roles";
|
import { organizationRoles } from "api/queries/roles";
|
||||||
import type { GroupSyncSettings, RoleSyncSettings } from "api/typesGenerated";
|
|
||||||
import { ChooseOne, Cond } from "components/Conditionals/ChooseOne";
|
import { ChooseOne, Cond } from "components/Conditionals/ChooseOne";
|
||||||
import { EmptyState } from "components/EmptyState/EmptyState";
|
import { EmptyState } from "components/EmptyState/EmptyState";
|
||||||
import { displayError } from "components/GlobalSnackbar/utils";
|
import { displayError } from "components/GlobalSnackbar/utils";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { screen, within } from "@testing-library/react";
|
import { screen } from "@testing-library/react";
|
||||||
import { http, HttpResponse } from "msw";
|
import { http, HttpResponse } from "msw";
|
||||||
import {
|
import {
|
||||||
MockDefaultOrganization,
|
MockDefaultOrganization,
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import type { Interpolation, Theme } from "@emotion/react";
|
|
||||||
import TextField from "@mui/material/TextField";
|
import TextField from "@mui/material/TextField";
|
||||||
import { isApiValidationError } from "api/errors";
|
import { isApiValidationError } from "api/errors";
|
||||||
import type {
|
import type {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { provisionerDaemons } from "api/queries/organizations";
|
import { provisionerDaemons } from "api/queries/organizations";
|
||||||
import type { Organization, ProvisionerDaemon } from "api/typesGenerated";
|
import type { ProvisionerDaemon } from "api/typesGenerated";
|
||||||
import { Avatar } from "components/Avatar/Avatar";
|
import { Avatar } from "components/Avatar/Avatar";
|
||||||
import { Button } from "components/Button/Button";
|
import { Button } from "components/Button/Button";
|
||||||
import { EmptyState } from "components/EmptyState/EmptyState";
|
import { EmptyState } from "components/EmptyState/EmptyState";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { provisionerJobs } from "api/queries/organizations";
|
import { provisionerJobs } from "api/queries/organizations";
|
||||||
import type { Organization, ProvisionerJob } from "api/typesGenerated";
|
import type { ProvisionerJob } from "api/typesGenerated";
|
||||||
import { Avatar } from "components/Avatar/Avatar";
|
import { Avatar } from "components/Avatar/Avatar";
|
||||||
import { Badge } from "components/Badge/Badge";
|
import { Badge } from "components/Badge/Badge";
|
||||||
import { Button } from "components/Button/Button";
|
import { Button } from "components/Button/Button";
|
||||||
|
@ -17,9 +17,7 @@ import {
|
|||||||
PopoverContent,
|
PopoverContent,
|
||||||
PopoverTrigger,
|
PopoverTrigger,
|
||||||
} from "components/deprecated/Popover/Popover";
|
} from "components/deprecated/Popover/Popover";
|
||||||
import { ChevronDownIcon, ChevronRightIcon } from "lucide-react";
|
|
||||||
import { type FC, useEffect, useState } from "react";
|
import { type FC, useEffect, useState } from "react";
|
||||||
import { cn } from "utils/cn";
|
|
||||||
|
|
||||||
const roleDescriptions: Record<string, string> = {
|
const roleDescriptions: Record<string, string> = {
|
||||||
owner:
|
owner:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react";
|
import type { Meta, StoryObj } from "@storybook/react";
|
||||||
import { expect, spyOn, userEvent, within } from "@storybook/test";
|
import { spyOn, userEvent, within } from "@storybook/test";
|
||||||
import { API } from "api/api";
|
import { API } from "api/api";
|
||||||
import { mockApiError } from "testHelpers/entities";
|
import { mockApiError } from "testHelpers/entities";
|
||||||
import { withGlobalSnackbar } from "testHelpers/storybook";
|
import { withGlobalSnackbar } from "testHelpers/storybook";
|
||||||
|
@ -2,7 +2,7 @@ import type { Interpolation, Theme } from "@emotion/react";
|
|||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
import LoadingButton from "@mui/lab/LoadingButton";
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import TextField from "@mui/material/TextField";
|
import TextField from "@mui/material/TextField";
|
||||||
import { isApiError, isApiValidationError } from "api/errors";
|
import { isApiValidationError } from "api/errors";
|
||||||
import { changePasswordWithOTP } from "api/queries/users";
|
import { changePasswordWithOTP } from "api/queries/users";
|
||||||
import { ErrorAlert } from "components/Alert/ErrorAlert";
|
import { ErrorAlert } from "components/Alert/ErrorAlert";
|
||||||
import { CustomLogo } from "components/CustomLogo/CustomLogo";
|
import { CustomLogo } from "components/CustomLogo/CustomLogo";
|
||||||
|
@ -2,11 +2,9 @@ import { type Interpolation, type Theme, useTheme } from "@emotion/react";
|
|||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
import LoadingButton from "@mui/lab/LoadingButton";
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import TextField from "@mui/material/TextField";
|
import TextField from "@mui/material/TextField";
|
||||||
import { getErrorMessage } from "api/errors";
|
|
||||||
import { requestOneTimePassword } from "api/queries/users";
|
import { requestOneTimePassword } from "api/queries/users";
|
||||||
import { ErrorAlert } from "components/Alert/ErrorAlert";
|
import { ErrorAlert } from "components/Alert/ErrorAlert";
|
||||||
import { CustomLogo } from "components/CustomLogo/CustomLogo";
|
import { CustomLogo } from "components/CustomLogo/CustomLogo";
|
||||||
import { displayError } from "components/GlobalSnackbar/utils";
|
|
||||||
import { Stack } from "components/Stack/Stack";
|
import { Stack } from "components/Stack/Stack";
|
||||||
import type { FC } from "react";
|
import type { FC } from "react";
|
||||||
import { Helmet } from "react-helmet-async";
|
import { Helmet } from "react-helmet-async";
|
||||||
|
@ -3,7 +3,7 @@ import { authMethods, createFirstUser } from "api/queries/users";
|
|||||||
import { Loader } from "components/Loader/Loader";
|
import { Loader } from "components/Loader/Loader";
|
||||||
import { useAuthContext } from "contexts/auth/AuthProvider";
|
import { useAuthContext } from "contexts/auth/AuthProvider";
|
||||||
import { useEmbeddedMetadata } from "hooks/useEmbeddedMetadata";
|
import { useEmbeddedMetadata } from "hooks/useEmbeddedMetadata";
|
||||||
import { type FC, useEffect, useState } from "react";
|
import { type FC, useEffect } from "react";
|
||||||
import { Helmet } from "react-helmet-async";
|
import { Helmet } from "react-helmet-async";
|
||||||
import { useMutation, useQuery } from "react-query";
|
import { useMutation, useQuery } from "react-query";
|
||||||
import { Navigate, useNavigate } from "react-router-dom";
|
import { Navigate, useNavigate } from "react-router-dom";
|
||||||
|
@ -17,7 +17,7 @@ import { PasswordField } from "components/PasswordField/PasswordField";
|
|||||||
import { SignInLayout } from "components/SignInLayout/SignInLayout";
|
import { SignInLayout } from "components/SignInLayout/SignInLayout";
|
||||||
import { Stack } from "components/Stack/Stack";
|
import { Stack } from "components/Stack/Stack";
|
||||||
import { type FormikContextType, useFormik } from "formik";
|
import { type FormikContextType, useFormik } from "formik";
|
||||||
import { type ChangeEvent, type FC, useCallback } from "react";
|
import type { ChangeEvent, FC } from "react";
|
||||||
import { docs } from "utils/docs";
|
import { docs } from "utils/docs";
|
||||||
import {
|
import {
|
||||||
getFormHelpers,
|
getFormHelpers,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react";
|
import type { Meta, StoryObj } from "@storybook/react";
|
||||||
import { chromatic } from "testHelpers/chromatic";
|
import { chromatic } from "testHelpers/chromatic";
|
||||||
import { MockEntitlementsWithUserLimit } from "testHelpers/entities";
|
|
||||||
import { TemplateInsightsPageView } from "./TemplateInsightsPage";
|
import { TemplateInsightsPageView } from "./TemplateInsightsPage";
|
||||||
|
|
||||||
const meta: Meta<typeof TemplateInsightsPageView> = {
|
const meta: Meta<typeof TemplateInsightsPageView> = {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { screen, waitFor } from "@testing-library/react";
|
import { screen, waitFor } from "@testing-library/react";
|
||||||
import userEvent from "@testing-library/user-event";
|
import userEvent from "@testing-library/user-event";
|
||||||
import { API, withDefaultFeatures } from "api/api";
|
import { API, withDefaultFeatures } from "api/api";
|
||||||
import type { Template, UpdateTemplateMeta } from "api/typesGenerated";
|
import type { UpdateTemplateMeta } from "api/typesGenerated";
|
||||||
import { http, HttpResponse } from "msw";
|
import { http, HttpResponse } from "msw";
|
||||||
import {
|
import {
|
||||||
MockEntitlements,
|
MockEntitlements,
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import Inventory2 from "@mui/icons-material/Inventory2";
|
import Inventory2 from "@mui/icons-material/Inventory2";
|
||||||
import NoteAddOutlined from "@mui/icons-material/NoteAddOutlined";
|
|
||||||
import UploadOutlined from "@mui/icons-material/UploadOutlined";
|
import UploadOutlined from "@mui/icons-material/UploadOutlined";
|
||||||
import { Button } from "components/Button/Button";
|
import { Button } from "components/Button/Button";
|
||||||
import {
|
import {
|
||||||
|
@ -21,7 +21,6 @@ import type {
|
|||||||
} from "api/typesGenerated";
|
} from "api/typesGenerated";
|
||||||
import { ErrorAlert } from "components/Alert/ErrorAlert";
|
import { ErrorAlert } from "components/Alert/ErrorAlert";
|
||||||
import { Avatar } from "components/Avatar/Avatar";
|
import { Avatar } from "components/Avatar/Avatar";
|
||||||
import { AvatarData } from "components/Avatar/AvatarData";
|
|
||||||
import { Loader } from "components/Loader/Loader";
|
import { Loader } from "components/Loader/Loader";
|
||||||
import {
|
import {
|
||||||
MoreMenu,
|
MoreMenu,
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react";
|
import type { Meta, StoryObj } from "@storybook/react";
|
||||||
import { expect, spyOn, userEvent, waitFor, within } from "@storybook/test";
|
import { expect, spyOn, userEvent, within } from "@storybook/test";
|
||||||
import { API } from "api/api";
|
import { API } from "api/api";
|
||||||
import {
|
import {
|
||||||
notificationDispatchMethodsKey,
|
notificationDispatchMethodsKey,
|
||||||
systemNotificationTemplatesKey,
|
systemNotificationTemplatesKey,
|
||||||
userNotificationPreferencesKey,
|
userNotificationPreferencesKey,
|
||||||
} from "api/queries/notifications";
|
} from "api/queries/notifications";
|
||||||
import { http, HttpResponse } from "msw";
|
|
||||||
import { reactRouterParameters } from "storybook-addon-remix-react-router";
|
import { reactRouterParameters } from "storybook-addon-remix-react-router";
|
||||||
import {
|
import {
|
||||||
MockNotificationMethodsResponse,
|
MockNotificationMethodsResponse,
|
||||||
|
@ -8,7 +8,6 @@ import TableRow from "@mui/material/TableRow";
|
|||||||
import type * as TypesGen from "api/typesGenerated";
|
import type * as TypesGen from "api/typesGenerated";
|
||||||
import { ErrorAlert } from "components/Alert/ErrorAlert";
|
import { ErrorAlert } from "components/Alert/ErrorAlert";
|
||||||
import { Avatar } from "components/Avatar/Avatar";
|
import { Avatar } from "components/Avatar/Avatar";
|
||||||
import { AvatarData } from "components/Avatar/AvatarData";
|
|
||||||
import { Stack } from "components/Stack/Stack";
|
import { Stack } from "components/Stack/Stack";
|
||||||
import { TableLoader } from "components/TableLoader/TableLoader";
|
import { TableLoader } from "components/TableLoader/TableLoader";
|
||||||
import type { FC } from "react";
|
import type { FC } from "react";
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
import LoadingButton from "@mui/lab/LoadingButton";
|
||||||
import TextField from "@mui/material/TextField";
|
import TextField from "@mui/material/TextField";
|
||||||
import type * as TypesGen from "api/typesGenerated";
|
|
||||||
import { Alert } from "components/Alert/Alert";
|
import { Alert } from "components/Alert/Alert";
|
||||||
import { ErrorAlert } from "components/Alert/ErrorAlert";
|
import { ErrorAlert } from "components/Alert/ErrorAlert";
|
||||||
import { Form, FormFields } from "components/Form/Form";
|
import { Form, FormFields } from "components/Form/Form";
|
||||||
import { PasswordField } from "components/PasswordField/PasswordField";
|
import { PasswordField } from "components/PasswordField/PasswordField";
|
||||||
import { type FormikContextType, useFormik } from "formik";
|
import { type FormikContextType, useFormik } from "formik";
|
||||||
import type { FC } from "react";
|
import type { FC } from "react";
|
||||||
import { useEffect } from "react";
|
|
||||||
import { getFormHelpers } from "utils/formUtils";
|
import { getFormHelpers } from "utils/formUtils";
|
||||||
import * as Yup from "yup";
|
import * as Yup from "yup";
|
||||||
|
|
||||||
|
@ -7,10 +7,7 @@ import {
|
|||||||
type UseFilterMenuOptions,
|
type UseFilterMenuOptions,
|
||||||
useFilterMenu,
|
useFilterMenu,
|
||||||
} from "components/Filter/menu";
|
} from "components/Filter/menu";
|
||||||
import {
|
import { StatusIndicatorDot } from "components/StatusIndicator/StatusIndicator";
|
||||||
StatusIndicator,
|
|
||||||
StatusIndicatorDot,
|
|
||||||
} from "components/StatusIndicator/StatusIndicator";
|
|
||||||
import type { FC } from "react";
|
import type { FC } from "react";
|
||||||
import { docs } from "utils/docs";
|
import { docs } from "utils/docs";
|
||||||
|
|
||||||
|
@ -23,12 +23,7 @@ import { useDashboard } from "modules/dashboard/useDashboard";
|
|||||||
import { type FC, useState } from "react";
|
import { type FC, useState } from "react";
|
||||||
import { Helmet } from "react-helmet-async";
|
import { Helmet } from "react-helmet-async";
|
||||||
import { useMutation, useQuery, useQueryClient } from "react-query";
|
import { useMutation, useQuery, useQueryClient } from "react-query";
|
||||||
import {
|
import { useLocation, useNavigate, useSearchParams } from "react-router-dom";
|
||||||
Navigate,
|
|
||||||
useLocation,
|
|
||||||
useNavigate,
|
|
||||||
useSearchParams,
|
|
||||||
} from "react-router-dom";
|
|
||||||
import { pageTitle } from "utils/page";
|
import { pageTitle } from "utils/page";
|
||||||
import { generateRandomString } from "utils/random";
|
import { generateRandomString } from "utils/random";
|
||||||
import { ResetPasswordDialog } from "./ResetPasswordDialog";
|
import { ResetPasswordDialog } from "./ResetPasswordDialog";
|
||||||
|
@ -5,7 +5,6 @@ import { ProxyContext, getPreferredProxy } from "contexts/ProxyContext";
|
|||||||
import * as Mocks from "testHelpers/entities";
|
import * as Mocks from "testHelpers/entities";
|
||||||
import { withDashboardProvider } from "testHelpers/storybook";
|
import { withDashboardProvider } from "testHelpers/storybook";
|
||||||
import { Workspace } from "./Workspace";
|
import { Workspace } from "./Workspace";
|
||||||
import { WorkspaceBuildLogsSection } from "./WorkspaceBuildLogsSection";
|
|
||||||
import type { WorkspacePermissions } from "./permissions";
|
import type { WorkspacePermissions } from "./permissions";
|
||||||
|
|
||||||
const permissions: WorkspacePermissions = {
|
const permissions: WorkspacePermissions = {
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import ArrowForwardOutlined from "@mui/icons-material/ArrowForwardOutlined";
|
|
||||||
import type { Template } from "api/typesGenerated";
|
import type { Template } from "api/typesGenerated";
|
||||||
import { Avatar } from "components/Avatar/Avatar";
|
import { Avatar } from "components/Avatar/Avatar";
|
||||||
import { Button } from "components/Button/Button";
|
import { Button } from "components/Button/Button";
|
||||||
|
@ -11,7 +11,6 @@ import {
|
|||||||
useFilterMenu,
|
useFilterMenu,
|
||||||
} from "components/Filter/menu";
|
} from "components/Filter/menu";
|
||||||
import {
|
import {
|
||||||
StatusIndicator,
|
|
||||||
StatusIndicatorDot,
|
StatusIndicatorDot,
|
||||||
type StatusIndicatorDotProps,
|
type StatusIndicatorDotProps,
|
||||||
} from "components/StatusIndicator/StatusIndicator";
|
} from "components/StatusIndicator/StatusIndicator";
|
||||||
|
Reference in New Issue
Block a user