diff --git a/src/Components/Diagram/ComponentNodeWidget.tsx b/src/Components/Diagram/ComponentNodeWidget.tsx index 220ca1d..b003536 100644 --- a/src/Components/Diagram/ComponentNodeWidget.tsx +++ b/src/Components/Diagram/ComponentNodeWidget.tsx @@ -125,6 +125,16 @@ export class ComponentNodeWidget extends React.Component; generatePort: (port: any) => React.FunctionComponentElement<{ engine: DiagramEngine; port: any; key: any; }>; @@ -157,6 +170,9 @@ export class ComponentNodeWidget extends React.Component { + if(this.state.connected) + this.run(this.props.node.component.commands?.website!, ComponentStyleStatus.STARTING, KeyCommand.WEBSITE); + } + + terminal = () => { + if(this.state.connected) + this.run(this.props.node.component.commands?.terminal!, ComponentStyleStatus.CHECKING, KeyCommand.TERMINAL); + } async componentDidMount() { await this.initializeConnection(); @@ -293,6 +319,18 @@ export class ComponentNodeWidget extends React.Component } + {this.hasWebsite && + + + + } + + {this.hasTerminal && + + + + } + diff --git a/src/Model/Model.ts b/src/Model/Model.ts index eda9237..066c586 100644 --- a/src/Model/Model.ts +++ b/src/Model/Model.ts @@ -5,6 +5,8 @@ export enum KeyCommand { STOP = "stop", STATUS = "status", DOWNLOAD = "download", + WEBSITE = "website", + TERMINAL = "terminal" } export namespace AppArray.Model {