Sha256: 545d8117a0e107ce623e50ee8e09f1c720a9e3c8fbf5cfa9c5fe210d48dee806

Contents?: true

Size: 921 Bytes

Versions: 100

Compression:

Stored size: 921 Bytes

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { ActionButtons } from 'foremanReact/components/common/ActionButtons/ActionButtons';
import HostStatus from './HostStatus';

const HostItem = ({ name, link, status, actions }) => {
  const hostLink = link ? (
    <a href={link}>{name}</a>
  ) : (
    <a href="#" className="disabled">
      {name}
    </a>
  );

  return (
    <tr id={`targeting-host-${name}`}>
      <td className="host_name">{hostLink}</td>
      <td className="host_status">
        <HostStatus status={status} />
      </td>
      <td className="host_actions">
        <ActionButtons buttons={[...actions]} />
      </td>
    </tr>
  );
};

HostItem.propTypes = {
  name: PropTypes.string.isRequired,
  link: PropTypes.string.isRequired,
  status: PropTypes.string.isRequired,
  actions: PropTypes.array,
};

HostItem.defaultProps = {
  actions: [],
};

export default HostItem;

Version data entries

100 entries across 100 versions & 1 rubygems

Version Path
foreman_remote_execution-13.2.8 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-15.0.2 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-15.0.1 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-13.2.7 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-15.0.0 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-14.1.4 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-14.1.3 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-14.1.2 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-14.1.1 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-14.1.0 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-14.0.2 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-14.0.1 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-13.2.6 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-14.0.0 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-13.2.5 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-13.2.4 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-13.2.3 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-13.2.2 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-12.0.7 webpack/react_app/components/TargetingHosts/components/HostItem.js
foreman_remote_execution-13.2.1 webpack/react_app/components/TargetingHosts/components/HostItem.js