Sha256: 90b31a64e41de3a6ae7165853d32468a33ae73e40f2f430d630c2fd007ced29d

Contents?: true

Size: 690 Bytes

Versions: 42

Compression:

Stored size: 690 Bytes

Contents

import React from 'react';
import JSONTree from 'react-json-tree';
import PropTypes from 'prop-types';

const theme = {
  scheme: 'foreman',
  backgroundColor: 'rgba(0, 0, 0, 255)',
  base00: 'rgba(0, 0, 0, 0)',
};

const ReportJsonViewer = ({ data }) => (
  <div className="report-json-viewer">
    <JSONTree
      data={data}
      hideRoot
      theme={theme}
      shouldExpandNode={(keyPath, _myData, level) =>
        keyPath[0] === '_meta' ||
        keyPath[0] === 'hostvars' ||
        level === 3 ||
        keyPath[0] === 'foreman_ansible_roles'
      }
    />
  </div>
);

ReportJsonViewer.propTypes = {
  data: PropTypes.object.isRequired,
};

export default ReportJsonViewer;

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
foreman_ansible-15.0.3 webpack/components/ReportJsonViewer.js
foreman_ansible-15.0.2 webpack/components/ReportJsonViewer.js
foreman_ansible-15.0.1 webpack/components/ReportJsonViewer.js
foreman_ansible-15.0.0 webpack/components/ReportJsonViewer.js
foreman_ansible-14.2.2 webpack/components/ReportJsonViewer.js
foreman_ansible-14.2.1 webpack/components/ReportJsonViewer.js
foreman_ansible-13.0.7 webpack/components/ReportJsonViewer.js
foreman_ansible-14.2.0 webpack/components/ReportJsonViewer.js
foreman_ansible-14.1.1 webpack/components/ReportJsonViewer.js
foreman_ansible-14.1.0 webpack/components/ReportJsonViewer.js
foreman_ansible-13.0.5 webpack/components/ReportJsonViewer.js
foreman_ansible-14.0.0 webpack/components/ReportJsonViewer.js
foreman_ansible-13.0.4 webpack/components/ReportJsonViewer.js
foreman_ansible-13.0.3 webpack/components/ReportJsonViewer.js
foreman_ansible-13.0.2 webpack/components/ReportJsonViewer.js
foreman_ansible-13.0.1 webpack/components/ReportJsonViewer.js
foreman_ansible-13.0.0 webpack/components/ReportJsonViewer.js
foreman_ansible-12.0.7 webpack/components/ReportJsonViewer.js
foreman_ansible-10.4.4 webpack/components/ReportJsonViewer.js
foreman_ansible-12.0.6 webpack/components/ReportJsonViewer.js