2 * Copyright 2016 RIFT.IO Inc
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
21 import React from 'react';
22 import DashboardCard from '../../../components/dashboard_card/dashboard_card.jsx';
23 import ManagementDomainCardHeader from './managementDomainCardHeader.jsx';
24 import './managementDomainCard.scss'
25 function openLaunch() {
26 window.location.hash = window.location.hash + '/launch';
29 class ManagementDomainCard extends React.Component {
33 componentWillReceiveProps(nextProps) {
35 shouldComponentUpdate(nextProps) {
39 window.location.hash = window.location.hash + 'management-domain/create'
43 if(this.props.create){
44 html = <DashboardCard className="managementDomainCard"><div className={'managementDomainCard_create'} onClick={this.openCreate} style={{cursor:'pointer'}}><img src={require("../../../../assets/img/launchpad-add-fleet-icon.png")}/> Create Management Domain </div> </DashboardCard>;
46 var pools_html = null;
47 if (this.props.data.pools) {
51 <dd>{this.props.data.pools.vm || null}</dd>
52 <dt>Network Pool: </dt>
53 <dd>{this.props.data.pools.network || null}</dd>
55 <dd>{this.props.data.launchpad.ip_address}</dd>
63 <dt>Network Pool: </dt>
66 <dd>{this.props.data.pools ? this.props.data.launchpad.ip_address : null}</dd>
71 <DashboardCard className="managementDomainCard">
72 <ManagementDomainCardHeader name={this.props.data.name} isActive={this.props.isActive} style="93px" data={this.props.data}/>
73 <div className="content">
80 // <dd>{this.props.data.pools.vm}</dd>
81 // <dt>Network Pools</dt>
82 // <dd>{this.props.data.pools.network}</dd>
86 ManagementDomainCard.propTypes = {
87 nsr: React.PropTypes.object,
88 isActive: React.PropTypes.bool,
89 name: React.PropTypes.string
91 ManagementDomainCard.defaultProps = {
96 export default ManagementDomainCard