Sha256: 7855a31376e08685e23fc55d866608c858950e0994a8310bb5ef125816eb1f9a

Contents?: true

Size: 904 Bytes

Versions: 3

Compression:

Stored size: 904 Bytes

Contents

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

import { translate as __ } from 'foremanReact/common/I18n';
import ForemanModal from 'foremanReact/components/ForemanModal';

import { RAW_MSG_MODAL_ID } from '../../../../constants';

const RawMsgModal = ({ body }) => {
  const theme = {
    scheme: 'foreman',
    backgroundColor: 'rgba(0, 0, 0, 255)',
    base00: 'rgba(0, 0, 0, 0)',
  };
  return (
    <ForemanModal
      id={RAW_MSG_MODAL_ID}
      title={__('Raw data')}
      backdrop="static"
      enforceFocus
    >
      <JSONTree
        data={Immutable.asMutable(body, { deep: true })}
        hideRoot
        theme={theme}
      />
    </ForemanModal>
  );
};

RawMsgModal.propTypes = {
  body: PropTypes.object,
};

RawMsgModal.defaultProps = {
  body: {},
};

export default RawMsgModal;

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foreman_host_reports-1.0.2 webpack/src/Router/HostReports/ShowPage/Components/ReportLogs/Components/RawMsgModal.js
foreman_host_reports-1.0.1 webpack/src/Router/HostReports/ShowPage/Components/ReportLogs/Components/RawMsgModal.js
foreman_host_reports-1.0.0 webpack/src/Router/HostReports/ShowPage/Components/ReportLogs/Components/RawMsgModal.js