RIFT-15970: RIFT-287: Manually triggered autoscaling scaling limits test - No UI feedback when scaling group Max limit is reached

Signed-off-by: KIRAN KASHALKAR <kiran.kashalkar@riftio.com>
diff --git a/skyquake/framework/widgets/button/rw.button.js b/skyquake/framework/widgets/button/rw.button.js
index 41730eb..5d684ec 100644
--- a/skyquake/framework/widgets/button/rw.button.js
+++ b/skyquake/framework/widgets/button/rw.button.js
@@ -251,7 +251,8 @@
         onKeyPress:        this.onKeyPress,
         onKeyUp:           this.onKeyUp,
         onFocus:           this.onFocus,
-        onBlur:            this.onBlur
+        onBlur:            this.onBlur,
+        disabled:          this.isDisabled, 
       },
       button_icon,
       React.createElement("span", {className: "rw-button__label"}, display)
diff --git a/skyquake/plugins/launchpad/src/launchpad_card/nsrScalingGroups.jsx b/skyquake/plugins/launchpad/src/launchpad_card/nsrScalingGroups.jsx
index be8d4eb..db94ded 100644
--- a/skyquake/plugins/launchpad/src/launchpad_card/nsrScalingGroups.jsx
+++ b/skyquake/plugins/launchpad/src/launchpad_card/nsrScalingGroups.jsx
@@ -17,18 +17,24 @@
  */
 import React from 'react';
 import RecordViewStore from '../recordViewer/recordViewStore.js';
+import SkyquakeComponent from 'widgets/skyquake_container/skyquakeComponent.jsx';
 import Button from 'widgets/button/rw.button.js';
 import Utils from 'utils/utils.js';
 import UpTime from 'widgets/uptime/uptime.jsx';
 import './nsrScalingGroups.scss';
 
-export default class NsrScalingGroups extends React.Component {
+class NsrScalingGroups extends React.Component {
 	constructor(props) {
 		super(props);
 		this.state = {};
 	}
 
-	handleExecuteClick = (nsr_id, scaling_group_id, event) => {
+	handleExecuteClick = (nsr_id, scaling_group_id, max_instance_count, event) => {
+		let self = this;
+		if (this.getInstancesForScalingGroup(scaling_group_id) == max_instance_count) {
+			self.props.flux.actions.global.showNotification("Maximum allowed scaling instances created for this group. Cannot create any more");
+			return;
+		}
 		RecordViewStore.createScalingGroupInstance({
 			nsr_id: nsr_id,
 			scaling_group_id: scaling_group_id
@@ -68,7 +74,7 @@
 					);
 				}
 			}) : trows.push(
-				<tr key={sgrInstanceIndex}>
+				<tr key={sgri}>
 					<td colSpan="5" style={{textAlign: 'center'}}>No network services scaled in this group</td>
 				</tr>
 			);
@@ -132,7 +138,7 @@
 
 			let sgInstanceTable = this.createScalingGroupTable(sgd.name);
 
-			let sgCreateInstanceButton = <Button label='Create Scaling Group Instance' className="dark" isDisabled={this.getInstancesForScalingGroup(sgd.name) == sgd["max-instance-count"]} isLoading={false} onClick={this.handleExecuteClick.bind(this, this.props.data.id, sgd.name)} />
+			let sgCreateInstanceButton = <Button label='Create Scaling Group Instance' className="dark" isDisabled={this.getInstancesForScalingGroup(sgd.name) == sgd["max-instance-count"]} isLoading={false} onClick={this.handleExecuteClick.bind(this, this.props.data.id, sgd.name, sgd['max-instance-count'])} />
 
 			let scalingGroup =
 				<div>
@@ -157,3 +163,5 @@
 	}
 
 }
+
+export default SkyquakeComponent(NsrScalingGroups);