4 * Copyright 2016 RIFT.IO Inc
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 import React from 'react';
21 import Loader from 'widgets/loading-indicator/loadingIndicator.jsx';
23 export default class LaunchpadCardCloudAccount extends React.Component {
27 componentWillReceiveProps(nextProps) {
32 let isDisplayed = this.props.display;
34 if (this.props.nsr['cloud-account']) {
36 (<li key="nsr"><h3>NSR: {this.props.nsr['cloud-account']}</h3></li>)
39 this.props.nsr['vnfrs'].map(function(v,i) {
40 if(v.hasOwnProperty('cloud-account')) {
42 (<li key={i}><h3>VNFR {v['short-name']}: {v['cloud-account']}</h3></li>)
51 return (<div className={this.props.className + (isDisplayed ? '_open':'_close')}><h2>VIM Accounts</h2>{html}</div>);
55 LaunchpadCardCloudAccount.defaultProps = {