Skip to content

Commit

Permalink
chore: update konstruct links (#518)
Browse files Browse the repository at this point in the history
  • Loading branch information
CristhianF7 authored Oct 21, 2024
1 parent 16b30da commit 8ac1597
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 180 deletions.
4 changes: 3 additions & 1 deletion components/DeleteCluster/DeleteCluster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import {
TextField,
} from './DeleteCluster.styled';

import { DOCS_LINK } from '@/constants';

export interface DeleteClusterProps extends Omit<IModalProps, 'children'> {
cluster: Cluster | DraftCluster;
onDelete: () => void;
Expand All @@ -43,7 +45,7 @@ const DeleteCluster: FunctionComponent<DeleteClusterProps> = ({ cluster, onDelet
{`deleting a management cluster will also delete all it's
corresponding worker clusters`}
</Text>
<NextLink href="https://docs.kubefirst.io/common/deprovision" target="_blank">
<NextLink href={`${DOCS_LINK}/common/deprovision`} target="_blank">
<>
How to delete a management cluster
<LaunchOutlinedIcon />
Expand Down
2 changes: 1 addition & 1 deletion components/FlappyKRay/FlappyKRay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const FlappyKray: FunctionComponent<FlappyKrayProps> = ({ closeModal, isOpen })
<iframe
id="flappy-kray"
title="Flappy KRay"
src="https://kray.kubefirst.io"
src="https://kray.konstruct.io"
ref={flappyKRayRef}
style={{
border: 0,
Expand Down
7 changes: 2 additions & 5 deletions components/LearnMore/LearnMore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ITypographyProps, Variant } from '../Typography/Typography';
import { Text } from './LearnMore.styled';

import { InstallationType } from '@/types/redux';
import { DOCS_LINK } from '@/constants';

export interface LearnMoreProps extends Omit<ITypographyProps, 'variant' | 'children'> {
description: string;
Expand All @@ -24,11 +25,7 @@ const LearnMore: FunctionComponent<LearnMoreProps> = ({
variant = 'labelLarge',
...rest
}) => {
const docsDomainLink = `https://docs.kubefirst.io/${
installType && [InstallationType.DIGITAL_OCEAN, InstallationType.VULTR].includes(installType)
? 'k3d'
: installType
}`;
const docsDomainLink = `${DOCS_LINK}/${installType}`;

return (
<Text variant={variant} {...rest}>
Expand Down
6 changes: 4 additions & 2 deletions constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export const CIVO_REGIONS = [
{ label: 'London', value: 'lon1' },
];

export const DOCS_LINK = 'https://docs.kubefirst.io';
export const DOCS_LINK = 'https://kubefirst.konstruct.io/docs';

export const SLACK_LINK = 'http://konstruct.io/slack';

export const ANALYTICS_ID = '0gAYkX5RV3vt7s4pqCOOsDb6WHPLT30M';

Expand All @@ -32,7 +34,7 @@ export const FIRST_CHAR_ALPHABETICAL = /^[A-Za-z].*/;
export const KUBEFIRST_REPOSITORIES = ['gitops', 'metaphor'];
export const KUBEFIRST_TEAMS = ['admins', 'developers'];

export const FLAPPY_TWEET = `The @kubefirst team is making kubernetes platform provisioning so much fun! Check out this Flappy K-Ray game that they let you play while your cluster provisions! https://kray.kubefirst.io
export const FLAPPY_TWEET = `The @kubefirst team is making kubernetes platform provisioning so much fun! Check out this Flappy K-Ray game that they let you play while your cluster provisions! https://kray.konstruct.io
<note: add a screenshot of your high score for a chance to win a monthly prize!>`;

Expand Down
6 changes: 4 additions & 2 deletions constants/installation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { AuthKeys, InstallationInfo, InstallationType } from '../types/redux';

import { DOCS_LINK } from '@/constants';

export enum MarketplaceFormStep {
AUTHENTICATION = 0,
SETUP = 1,
Expand Down Expand Up @@ -45,7 +47,7 @@ export const INFO_INSTALLATION_TYPES: Record<InstallationType, Record<number, In
description: [
'Create an AWS account with billing enabled.',
'Establish a public hosted zone with dns routing established (<a href="https://docs.aws.amazon.com/route53/" target="_blank">docs</a>).',
'Connect with AdministratorAccess IAM credentials to your AWS account (<a href="https://docs.kubefirst.io/aws/quick-start/install/cli#aws-prerequisites" target="_blank">docs</a>).',
`Connect with AdministratorAccess IAM credentials to your AWS account (<a href="${DOCS_LINK}/aws/quick-start/install/cli#aws-prerequisites" target="_blank">docs</a>).`,
],
ctaDescription: 'Learn more',
ctaLink: 'https://docs.aws.amazon.com',
Expand Down Expand Up @@ -122,7 +124,7 @@ export const INFO_MARKETPLACE_INSTALLATION_TYPES: Record<
description: [
'Create an AWS account with billing enabled.',
'Establish a public hosted zone with dns routing established (<a href="https://docs.aws.amazon.com/route53/" target="_blank">docs</a>).',
'Connect with AdministratorAccess IAM credentials to your AWS account (<a href="https://docs.kubefirst.io/aws/quick-start/install/cli#aws-prerequisites" target="_blank">docs</a>).',
`Connect with AdministratorAccess IAM credentials to your AWS account (<a href="${DOCS_LINK}/aws/quick-start/install/cli#aws-prerequisites" target="_blank">docs</a>).`,
],
ctaDescription: 'Learn more',
ctaLink: 'https://docs.aws.amazon.com',
Expand Down
3 changes: 2 additions & 1 deletion containers/Environments/Environments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import DeleteEnvironment from '@/components/DeleteEnvironment/DeleteEnvironment'
import { clearEnvironmentError } from '@/redux/slices/environments.slice';
import { noop } from '@/utils/noop';
import { VOLCANIC_SAND } from '@/constants/colors';
import { DOCS_LINK } from '@/constants';

const Environments: FunctionComponent = () => {
const { isOpen, close, open } = useToggle();
Expand Down Expand Up @@ -92,7 +93,7 @@ const Environments: FunctionComponent = () => {
<LearnMore
description="Define and add you environments."
linkTitle="Learn more"
href="https://docs.kubefirst.io/civo/quick-start/cluster-management"
href={`${DOCS_LINK}/civo/quick-start/cluster-management`}
/>
</HeadingContainer>
<Button variant="contained" color="primary" onClick={open}>
Expand Down
3 changes: 2 additions & 1 deletion containers/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { ECHO_BLUE, PRIMARY, TRAFFIC_WHITE, VOLCANIC_SAND } from '@/constants/co
import useToggle from '@/hooks/useToggle';
import useFeatureFlag from '@/hooks/useFeatureFlag';
import { FeatureFlag } from '@/types/config';
import { DOCS_LINK } from '@/constants';

function stringAvatar(name?: string | null) {
return {
Expand Down Expand Up @@ -51,7 +52,7 @@ const Header: FunctionComponent<HeaderProps> = ({ handleOpenFlappy, handleOpenKu

const helpItems = useMemo(
() => [
{ icon: <MenuBookOutlinedIcon />, title: 'Documentation', path: 'https://docs.kubefirst.io' },
{ icon: <MenuBookOutlinedIcon />, title: 'Documentation', path: DOCS_LINK },
{
icon: <BsSlack color={VOLCANIC_SAND} />,
title: 'Slack',
Expand Down
4 changes: 2 additions & 2 deletions containers/Navigation/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { InstallationType } from '@/types/redux';
import { FeatureFlag } from '@/types/config';
import { ASMANI_SKY } from '@/constants/colors';
import { SaasPlans } from '@/types/subscription';
import { Route } from '@/constants';
import { DOCS_LINK, Route } from '@/constants';

export interface NavigationProps {
handleOpenFlappy: typeof noop;
Expand Down Expand Up @@ -112,7 +112,7 @@ const Navigation: FunctionComponent<NavigationProps> = ({
: [
{
icon: <HelpOutlineOutlinedIcon />,
path: 'https://docs.kubefirst.io',
path: DOCS_LINK,
title: 'Documentation',
color: '',
},
Expand Down
8 changes: 4 additions & 4 deletions containers/Provision/Provision.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ import { createCluster, resetClusterProgress } from '@/redux/thunks/api.thunk';
import { useInstallation } from '@/hooks/useInstallation';
import { InstallValues, InstallationType } from '@/types/redux';
import { GitProvider } from '@/types';
import { AUTHENTICATION_ERROR_MSG, DEFAULT_CLOUD_INSTANCE_SIZES } from '@/constants';
import { AUTHENTICATION_ERROR_MSG, DEFAULT_CLOUD_INSTANCE_SIZES, DOCS_LINK } from '@/constants';
import { useQueue } from '@/hooks/useQueue';
import LearnMore from '@/components/LearnMore/LearnMore';

const FOOTER_LINKS_INFO: Record<number, { linkTitle: string; href: string }> = {
1: {
linkTitle: 'authentication',
href: 'https://docs.kubefirst.io/do/quick-start/install/cli/#github-prerequisites',
href: `${DOCS_LINK}/do/quick-start/install/cli/#github-prerequisites`,
},
2: {
linkTitle: 'configuring your cluster',
href: 'https://docs.kubefirst.io/do/quick-start/install/ui#step-2-install-your-kubefirst-management-cluster',
href: `${DOCS_LINK}/do/quick-start/install/ui#step-2-install-your-kubefirst-management-cluster`,
},
};

Expand Down Expand Up @@ -242,7 +242,7 @@ const Provision: FunctionComponent = () => {
showAdvancedOptions ? (
<FormFooter>
<LearnMore
href="https://docs.kubefirst.io/do/explore/gitops#using-your-own-gitops-template-repository-fork "
href={`${DOCS_LINK}/do/explore/gitops#using-your-own-gitops-template-repository-fork`}
linkTitle="Customizing the GitOps template"
description="Learn more about"
/>
Expand Down
161 changes: 0 additions & 161 deletions utils/cards.ts

This file was deleted.

0 comments on commit 8ac1597

Please sign in to comment.