diff --git a/src/ic/ic-action.js b/src/ic/ic-action.js
index 4e787af..6a9e591 100644
--- a/src/ic/ic-action.js
+++ b/src/ic/ic-action.js
@@ -55,11 +55,12 @@ class ICAction extends React.Component {
));
return
+ Send command to infrastructure component
{actionList}
-
+
;
diff --git a/src/scenario/scenario.js b/src/scenario/scenario.js
index 0e4b9ed..e7cd701 100644
--- a/src/scenario/scenario.js
+++ b/src/scenario/scenario.js
@@ -234,12 +234,18 @@ class Scenario extends React.Component {
this.setState({ selectedConfigs: selectedConfigs });
}
- runAction = action => {
+ runAction(action) {
+
+ if(action.data.action === 'none'){
+ console.warn("No command selected. Nothing was sent.");
+ return;
+ }
+
for (let index of this.state.selectedConfigs) {
// get IC for component config
let ic = null;
for (let component of this.state.ics) {
- if (component._id === this.state.configs[index].icID) {
+ if (component.id === this.state.configs[index].icID) {
ic = component;
}
}
@@ -410,11 +416,15 @@ class Scenario extends React.Component {
marginLeft: '10px'
};
+ const tableHeadingStyle = {
+ paddingTop: '30px'
+ }
+
return
{this.state.scenario.name}
{/*Component Configurations table*/}
-
Component Configurations
+
Component Configurations
this.onConfigChecked(index, event)} width='30' />
@@ -447,8 +457,9 @@ class Scenario extends React.Component {
this.runAction(action)}
actions={[
+ { id: '-1', title: 'Select command', data: { action: 'none' } },
{ id: '0', title: 'Start', data: { action: 'start' } },
{ id: '1', title: 'Stop', data: { action: 'stop' } },
{ id: '2', title: 'Pause', data: { action: 'pause' } },
@@ -493,7 +504,7 @@ class Scenario extends React.Component {
configID={this.state.modalConfigData.id}/>
{/*Dashboard table*/}
- Dashboards
+ Dashboards