diff --git a/README.md b/README.md index 552c30e..677a75b 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,6 @@ Using the JFrog Extension doesn't require a paid JFrog subscription. Follow these directions to proceed, based on your use case: - If you already have a JFrog environment which includes Xray, all you need to do is set the connection details through the UI. -- If you don't have a JFrog environment, JFrog supports setting up an environment for free. The extension will then connect to this environment automatically. Please note that this new JFrog environment will be available for you as long as you need it. +- If you don't have a JFrog environment, you can try it out with JFrog's free trial. ## diff --git a/client/src/api/setup-env.ts b/client/src/api/setup-env.ts deleted file mode 100644 index 004d525..0000000 --- a/client/src/api/setup-env.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { execOnHostAndStreamResult } from './utils'; -import { editJfrogExtensionConfig, JfrogExtensionConfig } from './config'; - -/** - * Sets up a new JFrog environment. It opens a registration form in a browser window and saves the environments details in the configuration. - */ -export async function setupEnv(setPreparingEnv: () => void): Promise { - await new Promise((resolve, reject) => { - console.log('Running setup command'); - execOnHostAndStreamResult('runcli.sh', 'runcli.bat', ['setup', '--format=machine'], { - stream: { - splitOutputLines: true, - onOutput(data: { stdout: string; stderr?: undefined } | { stdout?: undefined; stderr: string }): void { - if (data.stdout === 'PREPARING_ENV') { - console.log('The new environment is being built'); - setPreparingEnv(); - } - }, - onError(error: any): void { - console.error(error); - reject(error); - }, - onClose(exitCode: number): void { - console.log('Setup command finished with exit code ' + exitCode); - if (exitCode === 0) { - resolve(); - } else { - reject('Setup failed'); - } - }, - }, - }); - }); - const jfrogExtensionConf = new JfrogExtensionConfig(); - jfrogExtensionConf.jfrogCliConfigured = true; - return editJfrogExtensionConfig(jfrogExtensionConf); -} diff --git a/client/src/components/CredentialsForm/CredentialsForm.tsx b/client/src/components/CredentialsForm/CredentialsForm.tsx index b110e8a..51870a2 100644 --- a/client/src/components/CredentialsForm/CredentialsForm.tsx +++ b/client/src/components/CredentialsForm/CredentialsForm.tsx @@ -33,7 +33,7 @@ export const CredentialsForm = ( alignItems: 'center', }} > - Create one for FREE + Create a FREE TRIAL diff --git a/client/src/pages/SetupEnv.tsx b/client/src/pages/SetupEnv.tsx index 003dbd3..8f2f623 100644 --- a/client/src/pages/SetupEnv.tsx +++ b/client/src/pages/SetupEnv.tsx @@ -1,59 +1,34 @@ import { styled, Box, Button, Link, Stack } from '@mui/material'; -import { useState } from 'react'; import { useNavigate } from 'react-router-dom'; -import { setupEnv } from '../api/setup-env'; -import { ddToast } from '../api/utils'; +import { ddClient } from '../api/utils'; import { JfrogHeadline } from '../components/JfrogHeadline'; -export const enum SetupStage { - Idle, - WaitingForUser, - PreparingEnv, - Done, - Error, -} +const FREE_TRIAL_LINK : string = "https://jfrog.com/start-free/"; export const SetupEnvPage = () => { const navigate = useNavigate(); - const [setupStage, setSetupStage] = useState(SetupStage.Idle); - - const setupEnvHandler = () => { - setSetupStage(SetupStage.WaitingForUser); - setupEnv(() => setSetupStage(SetupStage.PreparingEnv)) - .then(() => { - setSetupStage(SetupStage.Done); - ddToast.success('Please verify your email address within the next 72 hours.'); - navigate('/scan'); - }) - .catch(() => { - setSetupStage(SetupStage.Error); - console.error; - }); - }; return ( <> - + - You can set up a FREE JFrog Environment in the cloud. + You can set up a FREE TRIAL JFrog Environment. {'We invite you to '} ddClient?.host?.openExternal(FREE_TRIAL_LINK)} sx={{ textDecoration: 'underline', }} > - sign in here + sign up here {' to create your environment.'} - Docker Desktop will automatically connect to your environment once the setup is complete. - - {(setupStage == SetupStage.WaitingForUser || setupStage == SetupStage.PreparingEnv) && ( + Upon Completion, you will be able to sign in with your new environment and credentials - )}