<commit_before>import React from 'react';

import DescriptionList from './DescriptionList';
import MarathonConfigUtil from '../utils/MarathonConfigUtil';

class PodContainerSpecView extends React.Component {
  getGeneralDetails() {
    let {container} = this.props;
    let {cpus, mem, disk} = container.resources;
    let hash = {
      'Name': container.name,
      'CPUs': cpus,
      'Memory (MiB)': mem,
      'Disk Space (Mib)': disk,
      'Command': MarathonConfigUtil.getCommandString(container)
    };

    return <DescriptionList hash={hash} />;
  }

  getLabelSection() {
    let {container} = this.props;
    if (!container.labels || !Object.keys(container.labels).length) {
      return null;
    }

    return (
      <div>
        <h5 className="inverse flush-top">Labels</h5>
        <DescriptionList hash={container.labels} />
      </div>
    );
  }

  getEndpointsSection() {
    let {container: {id, endpoints}} = this.props;

    if (!endpoints || !endpoints.length) {
      return null;
    }

    let portConfigurations = MarathonConfigUtil.getPortDefinitionGroups(
        id, endpoints, function (content, linkTo) {
          return <a href={linkTo} target="_blank">{content}</a>;
        }
      ).map(function ({hash, headline}, index) {
        return (
          <DescriptionList className="nested-description-list"
            hash={hash}
            headline={headline}
            key={index} /><commit_msg>Fix rebase MarathonConfigUtil -> ServiceConfigUtil<commit_after>import React from 'react';

import DescriptionList from './DescriptionList';
import ServiceConfigUtil from '../utils/ServiceConfigUtil';

class PodContainerSpecView extends React.Component {
  getGeneralDetails() {
    let {container} = this.props;
    let {cpus, mem, disk} = container.resources;
    let hash = {
      'Name': container.name,
      'CPUs': cpus,
      'Memory (MiB)': mem,
      'Disk Space (Mib)': disk,
      'Command': ServiceConfigUtil.getCommandString(container)
    };

    return <DescriptionList hash={hash} />;
  }

  getLabelSection() {
    let {container} = this.props;
    if (!container.labels || !Object.keys(container.labels).length) {
      return null;
    }

    return (
      <div>
        <h5 className="inverse flush-top">Labels</h5>
        <DescriptionList hash={container.labels} />
      </div>
    );
  }

  getEndpointsSection() {
    let {container: {id, endpoints}} = this.props;

    if (!endpoints || !endpoints.length) {
      return null;
    }

    let portConfigurations = ServiceConfigUtil.getPortDefinitionGroups(
        id, endpoints, function (content, linkTo) {
          return <a href={linkTo} target="_blank">{content}</a>;
        }
      ).map(function ({hash, headline}, index) {
        return (
          <DescriptionList className="nested-description-list"
            hash={hash}
            headline={headline}
            key={index} />
{'fraction_non_alphanumeric': 0.13525575008582216, 'fraction_numerical': 0.0013731548232063166, 'mean_word_length': 2.7942708333333335, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1678082', 'n_tokens_mistral': 853, 'n_tokens_neox': 825, 'n_words': 189}