Remove assign domain option for deployments
This commit is contained in:
parent
f6ca18db82
commit
813ae98cc8
@ -1,42 +0,0 @@
|
|||||||
import { CopyBlock, atomOneLight } from 'react-code-blocks';
|
|
||||||
import { Link } from 'react-router-dom';
|
|
||||||
|
|
||||||
import { Modal } from 'components/shared/Modal';
|
|
||||||
import { Button } from 'components/shared/Button';
|
|
||||||
|
|
||||||
interface AssignDomainProps {
|
|
||||||
open: boolean;
|
|
||||||
handleOpen: () => void;
|
|
||||||
}
|
|
||||||
|
|
||||||
const AssignDomainDialog = ({ open, handleOpen }: AssignDomainProps) => {
|
|
||||||
return (
|
|
||||||
<Modal open={open} onOpenChange={handleOpen}>
|
|
||||||
<Modal.Content>
|
|
||||||
<Modal.Header>Assign Domain</Modal.Header>
|
|
||||||
<Modal.Body>
|
|
||||||
In order to assign a domain to your production deployments, configure
|
|
||||||
it in the{' '}
|
|
||||||
{/* TODO: Fix selection of project settings tab on navigation to domains */}
|
|
||||||
<Link to="../settings/domains" className="text-light-blue-800 inline">
|
|
||||||
project settings{' '}
|
|
||||||
</Link>
|
|
||||||
(recommended). If you want to assign to this specific deployment,
|
|
||||||
however, you can do so using our command-line interface:
|
|
||||||
{/* https://github.com/rajinwonderland/react-code-blocks/issues/138 */}
|
|
||||||
<CopyBlock
|
|
||||||
text="snowball alias <deployment> <domain>"
|
|
||||||
language=""
|
|
||||||
showLineNumbers={false}
|
|
||||||
theme={atomOneLight}
|
|
||||||
/>
|
|
||||||
</Modal.Body>
|
|
||||||
<Modal.Footer className="flex justify-start">
|
|
||||||
<Button onClick={handleOpen}>Okay</Button>
|
|
||||||
</Modal.Footer>
|
|
||||||
</Modal.Content>
|
|
||||||
</Modal>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default AssignDomainDialog;
|
|
@ -10,7 +10,6 @@ import {
|
|||||||
import { Deployment, Domain, Environment, Project } from 'gql-client';
|
import { Deployment, Domain, Environment, Project } from 'gql-client';
|
||||||
import { Button } from 'components/shared/Button';
|
import { Button } from 'components/shared/Button';
|
||||||
import {
|
import {
|
||||||
GlobeIcon,
|
|
||||||
HorizontalDotIcon,
|
HorizontalDotIcon,
|
||||||
LinkIcon,
|
LinkIcon,
|
||||||
RefreshIcon,
|
RefreshIcon,
|
||||||
@ -18,7 +17,6 @@ import {
|
|||||||
UndoIcon,
|
UndoIcon,
|
||||||
CrossCircleIcon,
|
CrossCircleIcon,
|
||||||
} from 'components/shared/CustomIcon';
|
} from 'components/shared/CustomIcon';
|
||||||
import AssignDomainDialog from './AssignDomainDialog';
|
|
||||||
import { useGQLClient } from 'context/GQLClientContext';
|
import { useGQLClient } from 'context/GQLClientContext';
|
||||||
import { cn } from 'utils/classnames';
|
import { cn } from 'utils/classnames';
|
||||||
import { ChangeStateToProductionDialog } from 'components/projects/Dialog/ChangeStateToProductionDialog';
|
import { ChangeStateToProductionDialog } from 'components/projects/Dialog/ChangeStateToProductionDialog';
|
||||||
@ -50,7 +48,6 @@ export const DeploymentMenu = ({
|
|||||||
const [deleteDeploymentDialog, setDeleteDeploymentDialog] = useState(false);
|
const [deleteDeploymentDialog, setDeleteDeploymentDialog] = useState(false);
|
||||||
const [isConfirmDeleteLoading, setIsConfirmDeleteLoading] = useState(false);
|
const [isConfirmDeleteLoading, setIsConfirmDeleteLoading] = useState(false);
|
||||||
const [rollbackDeployment, setRollbackDeployment] = useState(false);
|
const [rollbackDeployment, setRollbackDeployment] = useState(false);
|
||||||
const [assignDomainDialog, setAssignDomainDialog] = useState(false);
|
|
||||||
const [isConfirmButtonLoading, setConfirmButtonLoadingLoading] =
|
const [isConfirmButtonLoading, setConfirmButtonLoadingLoading] =
|
||||||
useState(false);
|
useState(false);
|
||||||
|
|
||||||
@ -173,12 +170,6 @@ export const DeploymentMenu = ({
|
|||||||
<LinkIcon /> Visit
|
<LinkIcon /> Visit
|
||||||
</a>
|
</a>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
|
||||||
className="hover:bg-base-bg-emphasized flex items-center gap-3"
|
|
||||||
onClick={() => setAssignDomainDialog(!assignDomainDialog)}
|
|
||||||
>
|
|
||||||
<GlobeIcon /> Assign domain
|
|
||||||
</MenuItem>
|
|
||||||
<MenuItem
|
<MenuItem
|
||||||
className="hover:bg-base-bg-emphasized flex items-center gap-3"
|
className="hover:bg-base-bg-emphasized flex items-center gap-3"
|
||||||
onClick={() => setChangeToProduction(!changeToProduction)}
|
onClick={() => setChangeToProduction(!changeToProduction)}
|
||||||
@ -243,7 +234,7 @@ export const DeploymentMenu = ({
|
|||||||
setRedeployToProduction((preVal) => !preVal);
|
setRedeployToProduction((preVal) => !preVal);
|
||||||
}}
|
}}
|
||||||
deployment={deployment}
|
deployment={deployment}
|
||||||
domains={[]}
|
domains={prodBranchDomains}
|
||||||
isConfirmButtonLoading={isConfirmButtonLoading}
|
isConfirmButtonLoading={isConfirmButtonLoading}
|
||||||
/>
|
/>
|
||||||
{Boolean(currentDeployment) && (
|
{Boolean(currentDeployment) && (
|
||||||
@ -258,13 +249,9 @@ export const DeploymentMenu = ({
|
|||||||
}}
|
}}
|
||||||
deployment={currentDeployment}
|
deployment={currentDeployment}
|
||||||
newDeployment={deployment}
|
newDeployment={deployment}
|
||||||
domains={[]}
|
domains={prodBranchDomains}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<AssignDomainDialog
|
|
||||||
open={assignDomainDialog}
|
|
||||||
handleOpen={() => setAssignDomainDialog(!assignDomainDialog)}
|
|
||||||
/>
|
|
||||||
<DeleteDeploymentDialog
|
<DeleteDeploymentDialog
|
||||||
open={deleteDeploymentDialog}
|
open={deleteDeploymentDialog}
|
||||||
handleConfirm={async () => {
|
handleConfirm={async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user