/* * * Copyright 2016 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ 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'; class NsrScalingGroups extends React.Component { constructor(props) { super(props); this.state = {}; } 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 }); } handleDeleteClick = (nsr_id, scaling_group_id, scaling_instance_index, event) => { RecordViewStore.deleteScalingGroupInstance({ nsr_id: nsr_id, scaling_group_id: scaling_group_id, scaling_instance_index: scaling_instance_index }); } createScalingGroupTable = (scalingGroupDesriptorName) => { let trows = []; this.props.data['scaling-group-record'] && this.props.data['scaling-group-record'].map((sgr, sgri) => { sgr['instance'] ? sgr['instance'].map((sgrInstance, sgrInstanceIndex) => { let id = sgrInstance['instance-id']; let sgrName = sgr['scaling-group-name-ref']; if (sgrName == scalingGroupDesriptorName) { trows.push(
ID | Uptime | Status | Config-Status |
---|