mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
@ -1,8 +1,8 @@
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
import { Route, Routes } from "react-router-dom"
|
import { Route, Routes } from "react-router-dom"
|
||||||
import { AuthAndFrame } from "./components/AuthAndFrame/AuthAndFrame"
|
import { AuthAndFrame } from "./components/AuthAndFrame/AuthAndFrame"
|
||||||
import { RequireAuth } from "./components/Page/RequireAuth"
|
import { PreferencesLayout } from "./components/PreferencesLayout/PreferencesLayout"
|
||||||
import { PreferencesLayout } from "./components/Preferences/Layout"
|
import { RequireAuth } from "./components/RequireAuth/RequireAuth"
|
||||||
import { IndexPage } from "./pages"
|
import { IndexPage } from "./pages"
|
||||||
import { NotFoundPage } from "./pages/404Page/404Page"
|
import { NotFoundPage } from "./pages/404Page/404Page"
|
||||||
import { CliAuthenticationPage } from "./pages/CliAuthPage/CliAuthPage"
|
import { CliAuthenticationPage } from "./pages/CliAuthPage/CliAuthPage"
|
||||||
|
@ -4,7 +4,7 @@ import React from "react"
|
|||||||
import { BrowserRouter as Router } from "react-router-dom"
|
import { BrowserRouter as Router } from "react-router-dom"
|
||||||
import { SWRConfig } from "swr"
|
import { SWRConfig } from "swr"
|
||||||
import { AppRouter } from "./AppRouter"
|
import { AppRouter } from "./AppRouter"
|
||||||
import { GlobalSnackbar } from "./components/Snackbar/GlobalSnackbar"
|
import { GlobalSnackbar } from "./components/GlobalSnackbar/GlobalSnackbar"
|
||||||
import { light } from "./theme"
|
import { light } from "./theme"
|
||||||
import "./theme/globalFonts"
|
import "./theme/globalFonts"
|
||||||
import { XServiceProvider } from "./xServices/StateContext"
|
import { XServiceProvider } from "./xServices/StateContext"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
|
import { Footer } from "../Footer/Footer"
|
||||||
import { Navbar } from "../Navbar/Navbar"
|
import { Navbar } from "../Navbar/Navbar"
|
||||||
import { Footer } from "../Page/Footer"
|
import { RequireAuth } from "../RequireAuth/RequireAuth"
|
||||||
import { RequireAuth } from "../Page/RequireAuth"
|
|
||||||
|
|
||||||
interface AuthAndFrameProps {
|
interface AuthAndFrameProps {
|
||||||
children: JSX.Element
|
children: JSX.Element
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { makeStyles } from "@material-ui/core/styles"
|
import { makeStyles } from "@material-ui/core/styles"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { MONOSPACE_FONT_FAMILY } from "../../theme/constants"
|
import { MONOSPACE_FONT_FAMILY } from "../../theme/constants"
|
||||||
import { CopyButton } from "../Button/CopyButton"
|
import { CopyButton } from "../CopyButton/CopyButton"
|
||||||
|
|
||||||
export interface CodeExampleProps {
|
export interface CodeExampleProps {
|
||||||
code: string
|
code: string
|
||||||
|
@ -3,23 +3,23 @@ import MenuItem from "@material-ui/core/MenuItem"
|
|||||||
import { makeStyles } from "@material-ui/core/styles"
|
import { makeStyles } from "@material-ui/core/styles"
|
||||||
import Typography from "@material-ui/core/Typography"
|
import Typography from "@material-ui/core/Typography"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { FormTextField, FormTextFieldProps } from "./FormTextField"
|
import { FormTextField, FormTextFieldProps } from "../FormTextField/FormTextField"
|
||||||
|
|
||||||
export interface DropdownItem {
|
export interface FormDropdownItem {
|
||||||
value: string
|
value: string
|
||||||
name: string
|
name: string
|
||||||
description?: string
|
description?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FormDropdownFieldProps<T> extends FormTextFieldProps<T> {
|
export interface FormDropdownFieldProps<T> extends FormTextFieldProps<T> {
|
||||||
items: DropdownItem[]
|
items: FormDropdownItem[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export const FormDropdownField = <T,>({ items, ...props }: FormDropdownFieldProps<T>): React.ReactElement => {
|
export const FormDropdownField = <T,>({ items, ...props }: FormDropdownFieldProps<T>): React.ReactElement => {
|
||||||
const styles = useStyles()
|
const styles = useStyles()
|
||||||
return (
|
return (
|
||||||
<FormTextField select {...props}>
|
<FormTextField select {...props}>
|
||||||
{items.map((item: DropdownItem) => (
|
{items.map((item: FormDropdownItem) => (
|
||||||
<MenuItem key={item.value} value={item.value}>
|
<MenuItem key={item.value} value={item.value}>
|
||||||
<Box alignItems="center" display="flex">
|
<Box alignItems="center" display="flex">
|
||||||
<Box ml={1}>
|
<Box ml={1}>
|
@ -1,7 +1,7 @@
|
|||||||
import TextField, { TextFieldProps } from "@material-ui/core/TextField"
|
import TextField, { TextFieldProps } from "@material-ui/core/TextField"
|
||||||
import { FormikContextType } from "formik"
|
import { FormikContextType } from "formik"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { PasswordField } from "./PasswordField"
|
import { PasswordField } from "../PasswordField/PasswordField"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FormFieldProps are required props for creating form fields using a factory.
|
* FormFieldProps are required props for creating form fields using a factory.
|
@ -2,9 +2,9 @@ import { makeStyles } from "@material-ui/core/styles"
|
|||||||
import React, { useCallback, useState } from "react"
|
import React, { useCallback, useState } from "react"
|
||||||
import { useCustomEvent } from "../../hooks/events"
|
import { useCustomEvent } from "../../hooks/events"
|
||||||
import { CustomEventListener } from "../../util/events"
|
import { CustomEventListener } from "../../util/events"
|
||||||
|
import { EnterpriseSnackbar } from "../EnterpriseSnackbar/EnterpriseSnackbar"
|
||||||
import { ErrorIcon } from "../Icons/ErrorIcon"
|
import { ErrorIcon } from "../Icons/ErrorIcon"
|
||||||
import { Typography } from "../Typography/Typography"
|
import { Typography } from "../Typography/Typography"
|
||||||
import { EnterpriseSnackbar } from "./EnterpriseSnackbar"
|
|
||||||
import {
|
import {
|
||||||
AdditionalMessage,
|
AdditionalMessage,
|
||||||
isNotificationList,
|
isNotificationList,
|
@ -2,7 +2,7 @@ import Box from "@material-ui/core/Box"
|
|||||||
import { makeStyles } from "@material-ui/core/styles"
|
import { makeStyles } from "@material-ui/core/styles"
|
||||||
import Typography from "@material-ui/core/Typography"
|
import Typography from "@material-ui/core/Typography"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { HeaderButton } from "./HeaderButton"
|
import { HeaderButton } from "../HeaderButton/HeaderButton"
|
||||||
|
|
||||||
export interface HeaderAction {
|
export interface HeaderAction {
|
||||||
readonly text: string
|
readonly text: string
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { useActor } from "@xstate/react"
|
import { useActor } from "@xstate/react"
|
||||||
import React, { useContext } from "react"
|
import React, { useContext } from "react"
|
||||||
import { XServiceContext } from "../../xServices/StateContext"
|
import { XServiceContext } from "../../xServices/StateContext"
|
||||||
import { NavbarView } from "./NavbarView/NavbarView"
|
import { NavbarView } from "../NavbarView/NavbarView"
|
||||||
|
|
||||||
export const Navbar: React.FC = () => {
|
export const Navbar: React.FC = () => {
|
||||||
const xServices = useContext(XServiceContext)
|
const xServices = useContext(XServiceContext)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { screen } from "@testing-library/react"
|
import { screen } from "@testing-library/react"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { render } from "../../../testHelpers"
|
import { render } from "../../testHelpers"
|
||||||
import { MockUser } from "../../../testHelpers/entities"
|
import { MockUser } from "../../testHelpers/entities"
|
||||||
import { NavbarView } from "./NavbarView"
|
import { NavbarView } from "./NavbarView"
|
||||||
|
|
||||||
describe("NavbarView", () => {
|
describe("NavbarView", () => {
|
@ -3,10 +3,10 @@ import ListItem from "@material-ui/core/ListItem"
|
|||||||
import { fade, makeStyles } from "@material-ui/core/styles"
|
import { fade, makeStyles } from "@material-ui/core/styles"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { NavLink } from "react-router-dom"
|
import { NavLink } from "react-router-dom"
|
||||||
import { UserResponse } from "../../../api/types"
|
import { UserResponse } from "../../api/types"
|
||||||
import { navHeight } from "../../../theme/constants"
|
import { navHeight } from "../../theme/constants"
|
||||||
import { AdminDropdown } from "../../AdminDropdown/AdminDropdown"
|
import { AdminDropdown } from "../AdminDropdown/AdminDropdown"
|
||||||
import { Logo } from "../../Icons/Logo"
|
import { Logo } from "../Icons/Logo"
|
||||||
import { UserDropdown } from "../UserDropdown/UsersDropdown"
|
import { UserDropdown } from "../UserDropdown/UsersDropdown"
|
||||||
|
|
||||||
export interface NavbarViewProps {
|
export interface NavbarViewProps {
|
@ -3,9 +3,9 @@ import TextField from "@material-ui/core/TextField"
|
|||||||
import { FormikContextType, FormikErrors, useFormik } from "formik"
|
import { FormikContextType, FormikErrors, useFormik } from "formik"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import * as Yup from "yup"
|
import * as Yup from "yup"
|
||||||
import { getFormHelpers, onChangeTrimmed } from "../Form/utils"
|
import { getFormHelpers, onChangeTrimmed } from "../../util/formUtils"
|
||||||
|
import { LoadingButton } from "../LoadingButton/LoadingButton"
|
||||||
import { Stack } from "../Stack/Stack"
|
import { Stack } from "../Stack/Stack"
|
||||||
import { LoadingButton } from "./../Button/LoadingButton"
|
|
||||||
|
|
||||||
interface AccountFormValues {
|
interface AccountFormValues {
|
||||||
name: string
|
name: string
|
@ -2,7 +2,7 @@ import { makeStyles } from "@material-ui/core/styles"
|
|||||||
import { fade } from "@material-ui/core/styles/colorManipulator"
|
import { fade } from "@material-ui/core/styles/colorManipulator"
|
||||||
import Typography from "@material-ui/core/Typography"
|
import Typography from "@material-ui/core/Typography"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { SectionAction } from "./Action"
|
import { SectionAction } from "../SectionAction/SectionAction"
|
||||||
|
|
||||||
type SectionLayout = "fixed" | "fluid"
|
type SectionLayout = "fixed" | "fluid"
|
||||||
|
|
||||||
|
@ -4,9 +4,9 @@ import TextField from "@material-ui/core/TextField"
|
|||||||
import { FormikContextType, useFormik } from "formik"
|
import { FormikContextType, useFormik } from "formik"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import * as Yup from "yup"
|
import * as Yup from "yup"
|
||||||
import { getFormHelpers, onChangeTrimmed } from "../Form/utils"
|
import { getFormHelpers, onChangeTrimmed } from "../../util/formUtils"
|
||||||
import { LoadingButton } from "./../Button/LoadingButton"
|
import { Welcome } from "../Welcome/Welcome"
|
||||||
import { Welcome } from "./Welcome"
|
import { LoadingButton } from "./../LoadingButton/LoadingButton"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BuiltInAuthFormValues describes a form using built-in (email/password)
|
* BuiltInAuthFormValues describes a form using built-in (email/password)
|
@ -1,7 +1,7 @@
|
|||||||
import { makeStyles } from "@material-ui/core/styles"
|
import { makeStyles } from "@material-ui/core/styles"
|
||||||
import { fade } from "@material-ui/core/styles/colorManipulator"
|
import { fade } from "@material-ui/core/styles/colorManipulator"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { TabSidebar, TabSidebarItem } from "./TabSidebar"
|
import { TabSidebar, TabSidebarItem } from "../TabSidebar/TabSidebar"
|
||||||
|
|
||||||
export type AdminMenuItemCallback = (menuItem: string) => void
|
export type AdminMenuItemCallback = (menuItem: string) => void
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ import TableCell from "@material-ui/core/TableCell"
|
|||||||
import TableHead from "@material-ui/core/TableHead"
|
import TableHead from "@material-ui/core/TableHead"
|
||||||
import TableRow from "@material-ui/core/TableRow"
|
import TableRow from "@material-ui/core/TableRow"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { TableHeaders } from "./TableHeaders"
|
import { TableHeaders } from "../TableHeaders/TableHeaders"
|
||||||
import { TableTitle } from "./TableTitle"
|
import { TableTitle } from "../TableTitle/TableTitle"
|
||||||
|
|
||||||
export interface Column<T> {
|
export interface Column<T> {
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { ComponentMeta, Story } from "@storybook/react"
|
import { ComponentMeta, Story } from "@storybook/react"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { MockUser, MockUserAgent } from "../../../testHelpers"
|
import { MockUser, MockUserAgent } from "../../testHelpers"
|
||||||
import { UserCell, UserCellProps } from "./UserCell"
|
import { UserCell, UserCellProps } from "./UserCell"
|
||||||
|
|
||||||
export default {
|
export default {
|
@ -1,6 +1,6 @@
|
|||||||
import { fireEvent, render, screen } from "@testing-library/react"
|
import { fireEvent, render, screen } from "@testing-library/react"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { MockUser, MockUserAgent, WrapperComponent } from "../../../testHelpers"
|
import { MockUser, MockUserAgent, WrapperComponent } from "../../testHelpers"
|
||||||
import { UserCell, UserCellProps } from "./UserCell"
|
import { UserCell, UserCellProps } from "./UserCell"
|
||||||
|
|
||||||
namespace Helpers {
|
namespace Helpers {
|
@ -3,7 +3,7 @@ import Link from "@material-ui/core/Link"
|
|||||||
import { makeStyles } from "@material-ui/core/styles"
|
import { makeStyles } from "@material-ui/core/styles"
|
||||||
import Typography from "@material-ui/core/Typography"
|
import Typography from "@material-ui/core/Typography"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { UserAvatar, UserAvatarProps } from "../../User/UserAvatar"
|
import { UserAvatar, UserAvatarProps } from "../UserAvatar/UserAvatar"
|
||||||
|
|
||||||
export interface UserCellProps {
|
export interface UserCellProps {
|
||||||
Avatar: UserAvatarProps
|
Avatar: UserAvatarProps
|
@ -1,7 +1,7 @@
|
|||||||
import { screen } from "@testing-library/react"
|
import { screen } from "@testing-library/react"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { render } from "../../../testHelpers"
|
import { render } from "../../testHelpers"
|
||||||
import { MockUser } from "../../../testHelpers/entities"
|
import { MockUser } from "../../testHelpers/entities"
|
||||||
import { Language, UserDropdown, UserDropdownProps } from "./UsersDropdown"
|
import { Language, UserDropdown, UserDropdownProps } from "./UsersDropdown"
|
||||||
|
|
||||||
const renderAndClick = async (props: Partial<UserDropdownProps> = {}) => {
|
const renderAndClick = async (props: Partial<UserDropdownProps> = {}) => {
|
@ -7,13 +7,13 @@ import { fade, makeStyles } from "@material-ui/core/styles"
|
|||||||
import AccountIcon from "@material-ui/icons/AccountCircleOutlined"
|
import AccountIcon from "@material-ui/icons/AccountCircleOutlined"
|
||||||
import React, { useState } from "react"
|
import React, { useState } from "react"
|
||||||
import { Link } from "react-router-dom"
|
import { Link } from "react-router-dom"
|
||||||
import { UserResponse } from "../../../api/types"
|
import { UserResponse } from "../../api/types"
|
||||||
import { BorderedMenu } from "../../BorderedMenu/BorderedMenu"
|
import { BorderedMenu } from "../BorderedMenu/BorderedMenu"
|
||||||
import { CloseDropdown, OpenDropdown } from "../../DropdownArrows/DropdownArrows"
|
import { CloseDropdown, OpenDropdown } from "../DropdownArrows/DropdownArrows"
|
||||||
import { DocsIcon } from "../../Icons/DocsIcon"
|
import { DocsIcon } from "../Icons/DocsIcon"
|
||||||
import { LogoutIcon } from "../../Icons/LogoutIcon"
|
import { LogoutIcon } from "../Icons/LogoutIcon"
|
||||||
import { UserAvatar } from "../../User/UserAvatar"
|
import { UserAvatar } from "../UserAvatar/UserAvatar"
|
||||||
import { UserProfileCard } from "../../User/UserProfileCard"
|
import { UserProfileCard } from "../UserProfileCard/UserProfileCard"
|
||||||
|
|
||||||
export const Language = {
|
export const Language = {
|
||||||
accountLabel: "Account",
|
accountLabel: "Account",
|
@ -2,7 +2,7 @@ import { makeStyles } from "@material-ui/core/styles"
|
|||||||
import Typography from "@material-ui/core/Typography"
|
import Typography from "@material-ui/core/Typography"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { UserResponse } from "../../api/types"
|
import { UserResponse } from "../../api/types"
|
||||||
import { UserAvatar } from "./UserAvatar"
|
import { UserAvatar } from "../UserAvatar/UserAvatar"
|
||||||
|
|
||||||
interface UserProfileCardProps {
|
interface UserProfileCardProps {
|
||||||
user: UserResponse
|
user: UserResponse
|
@ -1,8 +1,8 @@
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
import { UserResponse } from "../../api/types"
|
import { UserResponse } from "../../api/types"
|
||||||
import { Column, Table } from "../../components/Table/Table"
|
|
||||||
import { EmptyState } from "../EmptyState/EmptyState"
|
import { EmptyState } from "../EmptyState/EmptyState"
|
||||||
import { UserCell } from "../Table/Cells/UserCell"
|
import { Column, Table } from "../Table/Table"
|
||||||
|
import { UserCell } from "../UserCell/UserCell"
|
||||||
|
|
||||||
const Language = {
|
const Language = {
|
||||||
pageTitle: "Users",
|
pageTitle: "Users",
|
||||||
|
@ -6,9 +6,9 @@ import CloudCircleIcon from "@material-ui/icons/CloudCircle"
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
import { Link } from "react-router-dom"
|
import { Link } from "react-router-dom"
|
||||||
import * as Types from "../../api/types"
|
import * as Types from "../../api/types"
|
||||||
|
import { WorkspaceSchedule } from "../WorkspaceSchedule/WorkspaceSchedule"
|
||||||
|
import { WorkspaceSection } from "../WorkspaceSection/WorkspaceSection"
|
||||||
import * as Constants from "./constants"
|
import * as Constants from "./constants"
|
||||||
import { WorkspaceSchedule } from "./WorkspaceSchedule"
|
|
||||||
import { WorkspaceSection } from "./WorkspaceSection"
|
|
||||||
|
|
||||||
export interface WorkspaceProps {
|
export interface WorkspaceProps {
|
||||||
organization: Types.Organization
|
organization: Types.Organization
|
||||||
|
@ -3,7 +3,7 @@ import Typography from "@material-ui/core/Typography"
|
|||||||
import cronstrue from "cronstrue"
|
import cronstrue from "cronstrue"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { extractTimezone, stripTimezone } from "../../util/schedule"
|
import { extractTimezone, stripTimezone } from "../../util/schedule"
|
||||||
import { WorkspaceSection } from "./WorkspaceSection"
|
import { WorkspaceSection } from "../WorkspaceSection/WorkspaceSection"
|
||||||
|
|
||||||
const Language = {
|
const Language = {
|
||||||
autoStartLabel: (schedule: string): string => {
|
autoStartLabel: (schedule: string): string => {
|
@ -2,7 +2,7 @@ import Paper from "@material-ui/core/Paper"
|
|||||||
import { makeStyles } from "@material-ui/core/styles"
|
import { makeStyles } from "@material-ui/core/styles"
|
||||||
import Typography from "@material-ui/core/Typography"
|
import Typography from "@material-ui/core/Typography"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { CardPadding, CardRadius } from "./constants"
|
import { CardPadding, CardRadius } from "../Workspace/constants"
|
||||||
|
|
||||||
export interface WorkspaceSectionProps {
|
export interface WorkspaceSectionProps {
|
||||||
title: string
|
title: string
|
@ -4,12 +4,12 @@ import { FormikContextType, useFormik } from "formik"
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
import * as Yup from "yup"
|
import * as Yup from "yup"
|
||||||
import { CreateTemplateRequest, Organization, Provisioner, Template } from "../api/types"
|
import { CreateTemplateRequest, Organization, Provisioner, Template } from "../api/types"
|
||||||
import { LoadingButton } from "../components/Button/LoadingButton"
|
import { FormCloseButton } from "../components/FormCloseButton/FormCloseButton"
|
||||||
import { FormCloseButton } from "../components/Form/FormCloseButton"
|
import { FormDropdownField, FormDropdownItem } from "../components/FormDropdownField/FormDropdownField"
|
||||||
import { DropdownItem, FormDropdownField } from "../components/Form/FormDropdownField"
|
import { FormSection } from "../components/FormSection/FormSection"
|
||||||
import { FormSection } from "../components/Form/FormSection"
|
import { FormTextField } from "../components/FormTextField/FormTextField"
|
||||||
import { FormTextField } from "../components/Form/FormTextField"
|
import { FormTitle } from "../components/FormTitle/FormTitle"
|
||||||
import { FormTitle } from "../components/Form/FormTitle"
|
import { LoadingButton } from "../components/LoadingButton/LoadingButton"
|
||||||
|
|
||||||
export interface CreateTemplateFormProps {
|
export interface CreateTemplateFormProps {
|
||||||
provisioners: Provisioner[]
|
provisioners: Provisioner[]
|
||||||
@ -45,14 +45,14 @@ export const CreateTemplateForm: React.FC<CreateTemplateFormProps> = ({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const organizationDropDownItems: DropdownItem[] = organizations.map((org) => {
|
const organizationDropDownItems: FormDropdownItem[] = organizations.map((org) => {
|
||||||
return {
|
return {
|
||||||
value: org.name,
|
value: org.name,
|
||||||
name: org.name,
|
name: org.name,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const provisionerDropDownItems: DropdownItem[] = provisioners.map((provisioner) => {
|
const provisionerDropDownItems: FormDropdownItem[] = provisioners.map((provisioner) => {
|
||||||
return {
|
return {
|
||||||
value: provisioner.id,
|
value: provisioner.id,
|
||||||
name: provisioner.name,
|
name: provisioner.name,
|
||||||
|
@ -4,11 +4,11 @@ import { FormikContextType, useFormik } from "formik"
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
import * as Yup from "yup"
|
import * as Yup from "yup"
|
||||||
import { CreateWorkspaceRequest, Template, Workspace } from "../api/types"
|
import { CreateWorkspaceRequest, Template, Workspace } from "../api/types"
|
||||||
import { LoadingButton } from "../components/Button/LoadingButton"
|
import { FormCloseButton } from "../components/FormCloseButton/FormCloseButton"
|
||||||
import { FormCloseButton } from "../components/Form/FormCloseButton"
|
import { FormSection } from "../components/FormSection/FormSection"
|
||||||
import { FormSection } from "../components/Form/FormSection"
|
import { FormTextField } from "../components/FormTextField/FormTextField"
|
||||||
import { FormTextField } from "../components/Form/FormTextField"
|
import { FormTitle } from "../components/FormTitle/FormTitle"
|
||||||
import { FormTitle } from "../components/Form/FormTitle"
|
import { LoadingButton } from "../components/LoadingButton/LoadingButton"
|
||||||
|
|
||||||
export interface CreateWorkspaceForm {
|
export interface CreateWorkspaceForm {
|
||||||
template: Template
|
template: Template
|
||||||
|
@ -2,8 +2,8 @@ import { makeStyles } from "@material-ui/core/styles"
|
|||||||
import { useActor } from "@xstate/react"
|
import { useActor } from "@xstate/react"
|
||||||
import React, { useContext, useEffect, useState } from "react"
|
import React, { useContext, useEffect, useState } from "react"
|
||||||
import { getApiKey } from "../../api"
|
import { getApiKey } from "../../api"
|
||||||
|
import { CliAuthToken } from "../../components/CliAuthToken/CliAuthToken"
|
||||||
import { FullScreenLoader } from "../../components/Loader/FullScreenLoader"
|
import { FullScreenLoader } from "../../components/Loader/FullScreenLoader"
|
||||||
import { CliAuthToken } from "../../components/SignIn/CliAuthToken"
|
|
||||||
import { XServiceContext } from "../../xServices/StateContext"
|
import { XServiceContext } from "../../xServices/StateContext"
|
||||||
|
|
||||||
export const CliAuthenticationPage: React.FC = () => {
|
export const CliAuthenticationPage: React.FC = () => {
|
||||||
|
@ -2,7 +2,7 @@ import { act, screen } from "@testing-library/react"
|
|||||||
import userEvent from "@testing-library/user-event"
|
import userEvent from "@testing-library/user-event"
|
||||||
import { rest } from "msw"
|
import { rest } from "msw"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { Language } from "../../components/SignIn/SignInForm"
|
import { Language } from "../../components/SignInForm/SignInForm"
|
||||||
import { history, render } from "../../testHelpers"
|
import { history, render } from "../../testHelpers"
|
||||||
import { server } from "../../testHelpers/server"
|
import { server } from "../../testHelpers/server"
|
||||||
import { LoginPage } from "./LoginPage"
|
import { LoginPage } from "./LoginPage"
|
||||||
|
@ -2,8 +2,8 @@ import { makeStyles } from "@material-ui/core/styles"
|
|||||||
import { useActor } from "@xstate/react"
|
import { useActor } from "@xstate/react"
|
||||||
import React, { useContext } from "react"
|
import React, { useContext } from "react"
|
||||||
import { Navigate, useLocation } from "react-router-dom"
|
import { Navigate, useLocation } from "react-router-dom"
|
||||||
import { Footer } from "../../components/Page/Footer"
|
import { Footer } from "../../components/Footer/Footer"
|
||||||
import { SignInForm } from "../../components/SignIn/SignInForm"
|
import { SignInForm } from "../../components/SignInForm/SignInForm"
|
||||||
import { retrieveRedirect } from "../../util/redirect"
|
import { retrieveRedirect } from "../../util/redirect"
|
||||||
import { XServiceContext } from "../../xServices/StateContext"
|
import { XServiceContext } from "../../xServices/StateContext"
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { fireEvent, screen, waitFor } from "@testing-library/react"
|
import { fireEvent, screen, waitFor } from "@testing-library/react"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import * as API from "../../../api"
|
import * as API from "../../../api"
|
||||||
import * as AccountForm from "../../../components/Preferences/AccountForm"
|
import { GlobalSnackbar } from "../../../components/GlobalSnackbar/GlobalSnackbar"
|
||||||
import { GlobalSnackbar } from "../../../components/Snackbar/GlobalSnackbar"
|
import * as AccountForm from "../../../components/PreferencesAccountForm/PreferencesAccountForm"
|
||||||
import { renderWithAuth } from "../../../testHelpers"
|
import { renderWithAuth } from "../../../testHelpers"
|
||||||
import * as AuthXService from "../../../xServices/auth/authXService"
|
import * as AuthXService from "../../../xServices/auth/authXService"
|
||||||
import { AccountPage, Language } from "./AccountPage"
|
import { AccountPage, Language } from "./AccountPage"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { useActor } from "@xstate/react"
|
import { useActor } from "@xstate/react"
|
||||||
import React, { useContext } from "react"
|
import React, { useContext } from "react"
|
||||||
import { isApiError, mapApiErrorToFieldErrors } from "../../../api/errors"
|
import { isApiError, mapApiErrorToFieldErrors } from "../../../api/errors"
|
||||||
import { AccountForm } from "../../../components/Preferences/AccountForm"
|
import { AccountForm } from "../../../components/PreferencesAccountForm/PreferencesAccountForm"
|
||||||
import { Section } from "../../../components/Section/Section"
|
import { Section } from "../../../components/Section/Section"
|
||||||
import { XServiceContext } from "../../../xServices/StateContext"
|
import { XServiceContext } from "../../../xServices/StateContext"
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { render as wrappedRender, RenderResult } from "@testing-library/react"
|
|||||||
import { createMemoryHistory } from "history"
|
import { createMemoryHistory } from "history"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { MemoryRouter, Route, Routes, unstable_HistoryRouter as HistoryRouter } from "react-router-dom"
|
import { MemoryRouter, Route, Routes, unstable_HistoryRouter as HistoryRouter } from "react-router-dom"
|
||||||
import { RequireAuth } from "../components/Page/RequireAuth"
|
import { RequireAuth } from "../components/RequireAuth/RequireAuth"
|
||||||
import { dark } from "../theme"
|
import { dark } from "../theme"
|
||||||
import { XServiceProvider } from "../xServices/StateContext"
|
import { XServiceProvider } from "../xServices/StateContext"
|
||||||
import { MockUser } from "./entities"
|
import { MockUser } from "./entities"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { FormikContextType } from "formik/dist/types"
|
import { FormikContextType } from "formik/dist/types"
|
||||||
import { getFormHelpers, onChangeTrimmed } from "./utils"
|
import { getFormHelpers, onChangeTrimmed } from "./formUtils"
|
||||||
|
|
||||||
interface TestType {
|
interface TestType {
|
||||||
untouchedGoodField: string
|
untouchedGoodField: string
|
@ -1,7 +1,7 @@
|
|||||||
import { assign, createMachine } from "xstate"
|
import { assign, createMachine } from "xstate"
|
||||||
import * as API from "../../api"
|
import * as API from "../../api"
|
||||||
import * as Types from "../../api/types"
|
import * as Types from "../../api/types"
|
||||||
import { displaySuccess } from "../../components/Snackbar/utils"
|
import { displaySuccess } from "../../components/GlobalSnackbar/utils"
|
||||||
|
|
||||||
export const Language = {
|
export const Language = {
|
||||||
successProfileUpdate: "Updated preferences.",
|
successProfileUpdate: "Updated preferences.",
|
||||||
|
Reference in New Issue
Block a user