From 9bb11853317367573e8682a27df68f4fd744678b Mon Sep 17 00:00:00 2001 From: Vardan Bansal Date: Tue, 19 Sep 2023 16:45:03 -0700 Subject: [PATCH] fix run step --- .../components/PluginsPanel/PluginsPanel.tsx | 31 ++++++------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/web/src/components/PluginsPanel/PluginsPanel.tsx b/web/src/components/PluginsPanel/PluginsPanel.tsx index 67454a3bd..fa0f638ba 100644 --- a/web/src/components/PluginsPanel/PluginsPanel.tsx +++ b/web/src/components/PluginsPanel/PluginsPanel.tsx @@ -47,28 +47,12 @@ const PluginCategories: PluginCategoryInterface[] = [ { category: PluginCategory.Drone, name: 'Drone', description: 'Run Drone plugins', icon: 'ci-infra' } ] -const StepNameInput: PluginInput = { - type: 'string', - description: 'Name of the step' +const RunStep: TypesPlugin = { + uid: 'run', + description: 'Run a script', + spec: '{"kind":"run","type":"step","name":"Run","spec":{"name":"run","description":"Run a script","inputs":{"image":{"type":"string","description":"Container image","required":true},"script":{"type":"string","description":"Script to execute","required":true,"options":{"isExtended":true}}}}}' } -// const RunStep: Plugin = { -// name: 'run', -// spec: { -// name: 'Run', -// inputs: { -// name: StepNameInput, -// image: { -// type: 'string' -// }, -// script: { -// type: 'string', -// options: { isExtended: true } -// } -// } -// } -// } - interface PluginInsertionTemplateInterface { name?: string type: 'plugins' @@ -134,7 +118,7 @@ export const PluginsPanel = ({ onPluginAddUpdate }: PluginsPanelInterface): JSX. if (pluginCategory === PluginCategory.Drone) { setPanelView(PluginPanelView.Listing) } else if (pluginCategory === PluginCategory.Harness) { - // setPlugin(RunStep) + setPlugin(RunStep) setPanelView(PluginPanelView.Configuration) } }} @@ -292,7 +276,10 @@ export const PluginsPanel = ({ onPluginAddUpdate }: PluginsPanelInterface): JSX. }): { [key: string]: PluginInput } => { const inputsClone = Object.assign( { - name: StepNameInput + name: { + type: 'string', + description: 'Name of the step' + } }, existingInputs )