<commit_before>// @flow
import React, { Component } from 'react';
import { connect } from 'react-redux';

import './TrafficTools.css';

class TrafficTools extends Component {
  handleClick(index: number) {
    const view = this.props.view.slice(0, index);
    this.props.setView(view);
  }

  render() {
    const view = ['cluster', ...this.props.view];

    return (
      <div className={`${this.props.className} TrafficTools`}>
        {view.map((v, index) => (
          <a
            key={index}
            className="TrafficTools-route"
            onClick={() => this.handleClick(index)}
          >
            {`${v}/`}
          </a>
        ))}
        <input
          value={this.props.search}
          onChange={event => this.props.setSearch(event.target.value)}
        />
      </div><commit_msg>Denamify node/pid name in TrafficTools display<commit_after>// @flow
import React, { Component } from 'react';
import { connect } from 'react-redux';

import './TrafficTools.css';

const denamify = (name: string) => {
  return name.replace('_at_', '@').replace(/_/g, '.');
};

class TrafficTools extends Component {
  handleClick(index: number) {
    const view = this.props.view.slice(0, index);
    this.props.setView(view);
  }

  render() {
    const view = ['cluster', ...this.props.view];

    return (
      <div className={`${this.props.className} TrafficTools`}>
        {view.map((v, index) => (
          <a
            key={index}
            className="TrafficTools-route"
            onClick={() => this.handleClick(index)}
          >
            {`${denamify(v)}/`}
          </a>
        ))}
        <input
          value={this.props.search}
          onChange={event => this.props.setSearch(event.target.value)}
        />
      </div>
{'fraction_non_alphanumeric': 0.17015262860373093, 'fraction_numerical': 0.0011305822498586771, 'mean_word_length': 2.2007233273056057, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 20, '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': '2008053', 'n_tokens_mistral': 545, 'n_tokens_neox': 542, 'n_words': 105}