runtime.tsx 862 B

1234567891011121314151617181920212223242526272829303132
  1. import {Fragment} from 'react';
  2. import ContextBlock from 'sentry/components/events/contexts/contextBlock';
  3. import {getUnknownData} from '../getUnknownData';
  4. import getRuntimeKnownData from './getRuntimeKnownData';
  5. import {RuntimeData, RuntimeIgnoredDataType, RuntimeKnownDataType} from './types';
  6. type Props = {
  7. data: RuntimeData;
  8. };
  9. const runtimeKnownDataValues = [RuntimeKnownDataType.NAME, RuntimeKnownDataType.VERSION];
  10. const runtimeIgnoredDataValues = [RuntimeIgnoredDataType.BUILD];
  11. function Runtime({data}: Props) {
  12. return (
  13. <Fragment>
  14. <ContextBlock data={getRuntimeKnownData(data, runtimeKnownDataValues)} />
  15. <ContextBlock
  16. data={getUnknownData({
  17. allData: data,
  18. knownKeys: [...runtimeKnownDataValues, ...runtimeIgnoredDataValues],
  19. })}
  20. />
  21. </Fragment>
  22. );
  23. }
  24. export default Runtime;