Sha256: 7155ab71f5e06e9208a12a52e4cfa546b21b67fd3a080d6f4dcf24f788ab2a21

Contents?: true

Size: 1.17 KB

Versions: 6

Compression:

Stored size: 1.17 KB

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { translate as __ } from 'foremanReact/common/I18n';
import EmptyState from 'foremanReact/components/common/EmptyState';
import { foremanUrl, getManualURL } from 'foremanReact/common/helpers';

export const WelcomeEnv = ({ canCreate }) => {
  const action = canCreate && {
    title: __('Create Puppet Environment'),
    url: foremanUrl('environments/new'),
  };

  const content = __(`If you are planning to use Foreman as an external node classifier you should provide information about one or more environments.<br/>
  This information is commonly imported from a pre-existing Puppet configuration by the use of the <a href=${getManualURL(
    '4.2.2Classes'
  )}>Puppet classes and environment importer.</a>`);
  return (
    <EmptyState
      icon="th"
      iconType="fa"
      header={__('Environments')}
      description={<div dangerouslySetInnerHTML={{ __html: content }} />}
      documentation={{ url: getManualURL('4.2.1Environments') }}
      action={action}
    />
  );
};

WelcomeEnv.propTypes = {
  canCreate: PropTypes.bool,
};

WelcomeEnv.defaultProps = {
  canCreate: false,
};

export default WelcomeEnv;

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
foreman_puppet-1.0.3 webpack/src/Components/Environments/Welcome.js
foreman_puppet-1.0.2 webpack/src/Components/Environments/Welcome.js
foreman_puppet-1.0.1 webpack/src/Components/Environments/Welcome.js
foreman_puppet-1.0.0 webpack/src/Components/Environments/Welcome.js
foreman_puppet-1.0.0.rc.2 webpack/src/Components/Environments/Welcome.js
foreman_puppet-1.0.0.rc.1 webpack/src/Components/Environments/Welcome.js