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.
19 import React from 'react';
20 import VnfrActions from './vnfrActions.js';
21 import VnfrSource from './vnfrSource.js';
22 import VnfrStore from './vnfrStore.js';
23 import VnfrCard from './vnfrCard.jsx';
24 import Loader from 'widgets/loading-indicator/loadingIndicator.jsx';
25 import ScreenLoader from 'widgets/screen-loader/screenLoader.jsx';
26 let ReactCSSTransitionGroup = require('react-addons-css-transition-group');
27 class VnfrView extends React.Component {
30 this.state = VnfrStore.getState();
31 this.state.vnfrs = [];
34 VnfrStore.listen(this.handleUpdate);
35 console.log(VnfrStore)
36 setTimeout(function() {
37 VnfrStore.openVnfrSocket();
38 // VnfrStore.vnfrMock();
41 handleUpdate = (data) => {
48 self.state.vnfrs.map(function(vnfr) {
49 vnfrCards.push(<VnfrCard data={vnfr}></VnfrCard>)
52 <ReactCSSTransitionGroup
53 transitionName="loader-animation"
55 className="dashboardCard_wrapper"
59 </ReactCSSTransitionGroup>
64 export default VnfrView;