From c8b1ff0e9ea01abe67afff441b2c301b7870b558 Mon Sep 17 00:00:00 2001 From: Edmond Lee Date: Thu, 21 May 2020 15:27:34 -0700 Subject: [PATCH] updating generate command to generate deploy script --- .../client/src/components/configure/configure-tab.tsx | 8 ++++---- ...e-command-pane.tsx => generate-deploy-script-pane.tsx} | 2 +- ...ut-pane.tsx => generate-deploy-script-output-pane.tsx} | 2 +- .../packages/client/src/components/output/output-tab.tsx | 4 ++-- .../{generate-command.ts => generate-deploy-script.ts} | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) rename tools/webide/packages/client/src/components/configure/{generate-command-pane.tsx => generate-deploy-script-pane.tsx} (97%) rename tools/webide/packages/client/src/components/output/{generate-command-output-pane.tsx => generate-deploy-script-output-pane.tsx} (95%) rename tools/webide/packages/client/src/redux/actions/{generate-command.ts => generate-deploy-script.ts} (98%) diff --git a/tools/webide/packages/client/src/components/configure/configure-tab.tsx b/tools/webide/packages/client/src/components/configure/configure-tab.tsx index 0023f3ffc..4ec2bb5a9 100644 --- a/tools/webide/packages/client/src/components/configure/configure-tab.tsx +++ b/tools/webide/packages/client/src/components/configure/configure-tab.tsx @@ -7,7 +7,7 @@ import { DeployAction } from '../../redux/actions/deploy'; import { DryRunAction } from '../../redux/actions/dry-run'; import { EvaluateFunctionAction } from '../../redux/actions/evaluate-function'; import { EvaluateValueAction } from '../../redux/actions/evaluate-value'; -import { GenerateCommandAction } from '../../redux/actions/generate-command'; +import { GenerateDeployScript } from '../../redux/actions/generate-deploy-script'; import { AppState } from '../../redux/app'; import { ChangeDispatchedAction, ChangeSelectedAction, CommandState } from '../../redux/command'; import { Command } from '../../redux/types'; @@ -17,7 +17,7 @@ import { DeployPaneComponent } from './deploy-pane'; import { DryRunPaneComponent } from './dry-run-pane'; import { EvaluateFunctionPaneComponent } from './evaluate-function-pane'; import { EvaluateValuePaneComponent } from './evaluate-value-pane'; -import { GenerateCommandPaneComponent } from './generate-command-pane'; +import { GenerateDeployScriptPane } from './generate-deploy-script-pane'; const Container = styled.div<{ visible?: boolean }>` position: absolute; @@ -77,7 +77,7 @@ function createAction(command: Command) { case Command.EvaluateFunction: return new EvaluateFunctionAction(); case Command.GenerateCommand: - return new GenerateCommandAction(); + return new GenerateDeployScript(); default: throw new Error('Unsupported command'); } @@ -148,7 +148,7 @@ export const ConfigureTabComponent = (props: { )) || (command === Command.GenerateCommand && ( - + ))} ); diff --git a/tools/webide/packages/client/src/components/configure/generate-command-pane.tsx b/tools/webide/packages/client/src/components/configure/generate-deploy-script-pane.tsx similarity index 97% rename from tools/webide/packages/client/src/components/configure/generate-command-pane.tsx rename to tools/webide/packages/client/src/components/configure/generate-deploy-script-pane.tsx index da56264af..ffd9d9575 100644 --- a/tools/webide/packages/client/src/components/configure/generate-command-pane.tsx +++ b/tools/webide/packages/client/src/components/configure/generate-deploy-script-pane.tsx @@ -18,7 +18,7 @@ const Container = styled.div` overflow: auto; `; -export const GenerateCommandPaneComponent = () => { +export const GenerateDeployScriptPane = () => { const dispatch = useDispatch(); const tool = useSelector( diff --git a/tools/webide/packages/client/src/components/output/generate-command-output-pane.tsx b/tools/webide/packages/client/src/components/output/generate-deploy-script-output-pane.tsx similarity index 95% rename from tools/webide/packages/client/src/components/output/generate-command-output-pane.tsx rename to tools/webide/packages/client/src/components/output/generate-deploy-script-output-pane.tsx index 5dd714375..487ed5cb9 100644 --- a/tools/webide/packages/client/src/components/output/generate-command-output-pane.tsx +++ b/tools/webide/packages/client/src/components/output/generate-deploy-script-output-pane.tsx @@ -24,7 +24,7 @@ const Pre = styled.pre` margin: 0; `; -export const GenerateCommandOutputPane = () => { +export const GenerateDeployScriptOutputPane = () => { const output = useSelector( state => state.result.output ); diff --git a/tools/webide/packages/client/src/components/output/output-tab.tsx b/tools/webide/packages/client/src/components/output/output-tab.tsx index 5989b9f0e..9f365b9a1 100644 --- a/tools/webide/packages/client/src/components/output/output-tab.tsx +++ b/tools/webide/packages/client/src/components/output/output-tab.tsx @@ -8,7 +8,7 @@ import { ResultState } from '../../redux/result'; import { Command } from '../../redux/types'; import { CompileOutputPane } from './compile-output-pane'; import { DeployOutputPane } from './deploy-output-pane'; -import { GenerateCommandOutputPane } from './generate-command-output-pane'; +import { GenerateDeployScriptOutputPane } from './generate-deploy-script-output-pane'; import { Loading } from './loading'; import { OutputPane } from './output-pane'; @@ -56,7 +56,7 @@ export const OutputTab = (props: { } else if (command === Command.Deploy) { return ; } else if (command === Command.GenerateCommand) { - return ; + return ; } return ; diff --git a/tools/webide/packages/client/src/redux/actions/generate-command.ts b/tools/webide/packages/client/src/redux/actions/generate-deploy-script.ts similarity index 98% rename from tools/webide/packages/client/src/redux/actions/generate-command.ts rename to tools/webide/packages/client/src/redux/actions/generate-deploy-script.ts index f5e2847e4..bc4fe5fd3 100644 --- a/tools/webide/packages/client/src/redux/actions/generate-command.ts +++ b/tools/webide/packages/client/src/redux/actions/generate-deploy-script.ts @@ -22,7 +22,7 @@ export async function fetchRandomPrivateKey(): Promise { return response.text(); } -export class GenerateCommandAction extends CancellableAction { +export class GenerateDeployScript extends CancellableAction { getAction() { return async (dispatch: Dispatch, getState: () => AppState) => { dispatch({ ...new UpdateLoadingAction('Compiling contract...') });