Sha256: 6cd14416b640d764753433518eacfbbae976bc9aeeead1f3d98b039aea37c258

Contents?: true

Size: 1.03 KB

Versions: 23

Compression:

Stored size: 1.03 KB

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { Button } from 'patternfly-react';
import { translate as __ } from 'foremanReact/common/I18n';

const FixSelectedButton = ({ ids, postUrl, disabled, csrfToken }) => {
  const { hostIds, entryIds } = ids;

  return (
    <form action={postUrl} method="post">
      <Button type="submit" disabled={disabled}>
        {__('Fix Selected')}
      </Button>
      <input type="hidden" name="authenticity_token" value={csrfToken} />
      <input type="hidden" name="feature" value="leapp_remediation_plan" />
      {hostIds.map(hostId => (
        <input type="hidden" name="host_ids[]" key={hostId} value={hostId} />
      ))}
      <input
        type="hidden"
        name="inputs[remediation_ids]"
        value={entryIds.join(',')}
      />
    </form>
  );
};

FixSelectedButton.propTypes = {
  ids: PropTypes.object.isRequired,
  postUrl: PropTypes.string.isRequired,
  disabled: PropTypes.bool.isRequired,
  csrfToken: PropTypes.string.isRequired,
};

export default FixSelectedButton;

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
foreman_leapp-2.0.1 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-2.0.0 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-1.2.1 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-1.2.0 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-0.1.15 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-1.1.1 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-1.1.0 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-1.0.0 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-0.1.14 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-0.1.13 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-0.1.12 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-0.1.11 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-0.1.10 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-0.1.9 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-0.1.8 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-0.1.7 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-0.1.6 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-0.1.5 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-0.1.4 webpack/components/PreupgradeReports/components/FixSelectedButton.js
foreman_leapp-0.1.3 webpack/components/PreupgradeReports/components/FixSelectedButton.js