Rift.IO OSM R1 Initial Submission
[osm/UI.git] / skyquake / plugins / launchpad / src / monitoring_params / monitoringParamsCarousel.jsx
1
2 /*
3  * 
4  *   Copyright 2016 RIFT.IO Inc
5  *
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
9  *
10  *       http://www.apache.org/licenses/LICENSE-2.0
11  *
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.
17  *
18  */
19 import React from 'react';
20 import Carousel from '../carousel/carousel-react.jsx';
21 import SkyquakeCarousel from '../carousel/skyquakeCarousel.jsx';
22 import './monitoring_params.scss';
23 import ParseMP from './monitoringParamComponents.js';
24 //TODO
25 // This Carousel needs to be refactored so that we can sanely add a unique key to each element.
26 // The entire component needs some serious refactoring.
27
28 export default class launchpadCarousel extends React.Component {
29     constructor(props){
30         super(props);
31     }
32     componentWillMount(){
33         // window.addEventListener('resize', resizeComponents.bind(this))
34     }
35     componentWillUnmount(){
36         // window.removeEventListener('resize', resizeComponents.bind(this))
37     }
38   render() {
39     var slideno = this.props.slideno;
40     if(this.props.component_list) {
41         var components = ParseMP.call(this, this.props.component_list);
42        return <Carousel slideno={this.props.slideno} component_list={components} />
43        // return <SkyquakeCarousel slideno={this.props.slideno} slides={components} />
44     } else {
45         return <div className="empty"> MONITORING PARAMETERS NOT LOADED</div>
46     }
47   }
48 }
49
50