/** * Copyright 2017 Red Hat Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ import { defineMessages, FormattedDate, FormattedMessage, FormattedTime, injectIntl } from 'react-intl'; import { startCase } from 'lodash'; import React from 'react'; import PropTypes from 'prop-types'; import { Row, Col } from 'react-bootstrap'; const messages = defineMessages({ macAddresses: { id: 'NodeExtendedInfo.macAddresses', defaultMessage: 'Mac Addresses:' }, interfaces: { id: 'nodeExtendedinfo.interfaces', defaultMessage: 'Interfaces:' }, macAddress: { id: 'nodeExtendedinfo.interfaceMacAddress', defaultMessage: 'MAC Address' }, ipAddress: { id: 'nodeExtendedinfo.interfaceIpAddress', defaultMessage: 'IP Address' }, bios: { id: 'nodeExtendedinfo.bios', defaultMessage: 'Bios:' }, rootDisk: { id: 'nodeExtendedinfo.rootDisk', defaultMessage: 'Root Disk:' }, product: { id: 'nodeExtendedinfo.product', defaultMessage: 'Product:' }, productName: { id: 'nodeExtendedinfo.productName', defaultMessage: 'Name' }, productVendor: { id: 'nodeExtendedinfo.productVendor', defaultMessage: 'Vendor' }, productVersion: { id: 'nodeExtendedinfo.productVersion', defaultMessage: 'Version' }, kernel: { id: 'nodeExtendedinfo.kernel', defaultMessage: 'Kernel:' }, uuid: { id: 'nodeExtendedinfo.uuid', defaultMessage: 'UUID:' }, registered: { id: 'nodeExtendedinfo.registered', defaultMessage: 'Registered:' }, architecture: { id: 'nodeExtendedinfo.architecture', defaultMessage: 'Architecture:' }, driver: { id: 'nodeExtendedinfo.driver', defaultMessage: 'Driver:' } }); class NodeExtendedInfo extends React.Component { componentDidMount() { if ( this.props.node.getIn(['introspectionStatus', 'state']) === 'finished' ) { this.props.fetchNodeIntrospectionData(this.props.node.get('uuid')); } } renderInterfaces() { const { intl, node } = this.props; if (node.getIn(['introspectionData', 'interfaces']).isEmpty()) { return (