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;
33 let nsrDataCenter = this.props.nsr['resource-orchestrator'] ? this.props.nsr['resource-orchestrator'] : 'RIFT';
35 <div className={this.props.className + (isDisplayed ? '_open':'_close')}>
37 <div className={'dataCenterTable'}>
38 <div className="dataCenterTable-header">
41 <div>RESOURCE ORCHESTRATOR</div>
46 <div>{this.props.nsr['short-name']}</div>
47 <div>{nsrDataCenter}</div>
48 <div>{this.props.nsr['datacenter']}</div>
51 this.props.nsr && this.props.nsr['vnfrs'] && this.props.nsr['vnfrs'].map(function(v,i) {
52 if(v.hasOwnProperty('datacenter')) {
55 <div>{v['short-name']}</div>
56 <div>{nsrDataCenter}</div>
57 <div>{v['datacenter']}</div>
68 LaunchpadCardCloudAccount.defaultProps = {