From: KIRAN KASHALKAR Date: Wed, 19 Apr 2017 04:36:08 +0000 (-0400) Subject: RIFT-15970: RIFT-287: Manually triggered autoscaling scaling limits test - No UI... X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F87%2F1587%2F1;p=osm%2FUI.git 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 --- diff --git a/skyquake/framework/widgets/button/rw.button.js b/skyquake/framework/widgets/button/rw.button.js index 41730eb86..5d684ec34 100644 --- a/skyquake/framework/widgets/button/rw.button.js +++ b/skyquake/framework/widgets/button/rw.button.js @@ -251,7 +251,8 @@ module.exports = React.createClass({ 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 be8d4ebb7..db94dedb9 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 @@ export default class NsrScalingGroups extends React.Component { ); } }) : trows.push( - + No network services scaled in this group ); @@ -132,7 +138,7 @@ export default class NsrScalingGroups extends React.Component { let sgInstanceTable = this.createScalingGroupTable(sgd.name); - let sgCreateInstanceButton =