Sha256: dc9451f1d6b99d3c8e81206717cdd4849e2b23110ba0df1a496c55be77c0d80f

Contents?: true

Size: 1.31 KB

Versions: 2

Compression:

Stored size: 1.31 KB

Contents

import React from 'react';
import PropTypes from 'prop-types';
import ExtSelect from '../../common/ExtSelect';
import RailsData from '../../common/RailsData';

const AnsiblePlaybookSelector = ({
  label,
  hidden,
  editable,
  viewText,
  selectValue,
  onChange,
  options,
  additionalData,
}) => (
  <div className="form-group">
    <label className="col-md-2 control-label">{label}</label>
    <div className="col-md-4">
      <ExtSelect
        hidden={hidden}
        editable={editable}
        viewText={viewText}
        selectValue={selectValue}
        onChange={onChange}
        options={options}
        additionalData={additionalData}
      />
      <RailsData
        key="ansible_playbook_data"
        view="app_definition"
        parameter="acd_ansible_playbook_id"
        value={selectValue}
      />
    </div>
  </div>
);

AnsiblePlaybookSelector.propTypes = {
  label: PropTypes.string.isRequired,
  editable: PropTypes.bool.isRequired,
  viewText: PropTypes.string,
  selectValue: PropTypes.string,
  hidden: PropTypes.bool.isRequired,
  onChange: PropTypes.func.isRequired,
  options: PropTypes.object,
  additionalData: PropTypes.object,
};
AnsiblePlaybookSelector.defaultProps = {
  viewText: '',
  selectValue: '',
  options: undefined,
  additionalData: undefined,
};

export default AnsiblePlaybookSelector;

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foreman_acd-0.11.0 webpack/components/ApplicationDefinition/components/AnsiblePlaybookSelector.js
foreman_acd-0.10.0 webpack/components/ApplicationDefinition/components/AnsiblePlaybookSelector.js