<commit_before>import React from 'react';
import { Link } from 'react-router';
import classNames from 'classnames';
import ColorDropdown from './ColorDropdown';
import SearchDropdown from './SearchDropdown';
import TasksDropdown from './TasksDropdown';

import { connect } from 'react-redux';
import { switchViewMode, scrollAllToTop, scrollAllToBottom } from '../../actions/log';

class Header extends React.Component {
  renderBreadcrumbs() {
    return this.props.path.split('/').map((subpath, key) => {
      if (subpath === '$TASK_ID') {
        return <li key={key}><span className="label label-info">Task ID</span></li>;
      }
      return <li key={key}>{subpath}</li>;
    });
  }

  renderViewButtons() {
    if (this.props.multipleTasks) {
      return (<div className="btn-group" role="group" title="Select View Type">
        <button type="button" className={classNames({btn: true, 'btn-sm': true, 'btn-default': true, 'no-margin': true, active: this.props.viewMode === 'unified'})} onClick={() => { this.props.switchViewMode('unified'); }}>Unified</button>
        <button type="button" className={classNames({btn: true, 'btn-sm': true, 'btn-default': true, 'no-margin': true, active: this.props.viewMode === 'split'})} onClick={() => { this.props.switchViewMode('split'); }}>Split</button>
      </div>);
    }
  }

  renderAnchorButtons() {
    return (this.props.taskGroupCount > 1) && (
      <span>
        <a className="btn btn-default btn-sm tail-bottom-button" onClick={this.props.scrollAllToBottom} title="Scroll All to Bottom">
          <span className="glyphicon glyphicon-chevron-down"></span>
        </a>
        <a className="btn btn-default btn-sm tail-top-button" onClick={this.props.scrollAllToTop} title="Scroll All to Top">
          <span className="glyphicon glyphicon-chevron-up"></span>
        </a>
      </span>
    );
  }

  renderSwitchToNewTailer() {
    if ((this.props.taskGroupCount === 1) && (true)) {
      return (<Link to={`/task/${this.props.firstTaskId}/new-tail/${this.props.path}`}>Switch to new tailer</Link>);
    }
  }

  render() {
    return (
      <div className="tail-header">
        <div className="row">
          <div className="col-md-3">
            <ul className="breadcrumb breadcrumb-request">
              <li>
                Request&nbsp;
                <Link to={`request/${this.props.requestId}`}>
                  {this.props.requestId}
                </Link>
              </li>
            </ul>
          </div>
          <div className="col-md-6">
            <ul className="breadcrumb">
              {this.renderBreadcrumbs()}
            </ul>
          </div><commit_msg>make it a button<commit_after>import React from 'react';
import { Link } from 'react-router';
import classNames from 'classnames';
import ColorDropdown from './ColorDropdown';
import SearchDropdown from './SearchDropdown';
import TasksDropdown from './TasksDropdown';

import { connect } from 'react-redux';
import { switchViewMode, scrollAllToTop, scrollAllToBottom } from '../../actions/log';

class Header extends React.Component {
  renderBreadcrumbs() {
    return this.props.path.split('/').map((subpath, key) => {
      if (subpath === '$TASK_ID') {
        return <li key={key}><span className="label label-info">Task ID</span></li>;
      }
      return <li key={key}>{subpath}</li>;
    });
  }

  renderViewButtons() {
    if (this.props.multipleTasks) {
      return (<div className="btn-group" role="group" title="Select View Type">
        <button type="button" className={classNames({btn: true, 'btn-sm': true, 'btn-default': true, 'no-margin': true, active: this.props.viewMode === 'unified'})} onClick={() => { this.props.switchViewMode('unified'); }}>Unified</button>
        <button type="button" className={classNames({btn: true, 'btn-sm': true, 'btn-default': true, 'no-margin': true, active: this.props.viewMode === 'split'})} onClick={() => { this.props.switchViewMode('split'); }}>Split</button>
      </div>);
    }
  }

  renderAnchorButtons() {
    return (this.props.taskGroupCount > 1) && (
      <span>
        <a className="btn btn-default btn-sm tail-bottom-button" onClick={this.props.scrollAllToBottom} title="Scroll All to Bottom">
          <span className="glyphicon glyphicon-chevron-down"></span>
        </a>
        <a className="btn btn-default btn-sm tail-top-button" onClick={this.props.scrollAllToTop} title="Scroll All to Top">
          <span className="glyphicon glyphicon-chevron-up"></span>
        </a>
      </span>
    );
  }

  renderSwitchToNewTailer() {
    if ((this.props.taskGroupCount === 1) && (true)) {
      return (<Link to={`/task/${this.props.firstTaskId}/new-tail/${this.props.path}`}><button type="button" className="btn btn-sm btn-default">Switch to new tailer</button></Link>);
    }
  }

  render() {
    return (
      <div className="tail-header">
        <div className="row">
          <div className="col-md-3">
            <ul className="breadcrumb breadcrumb-request">
              <li>
                Request&nbsp;
                <Link to={`request/${this.props.requestId}`}>
                  {this.props.requestId}
                </Link>
              </li>
            </ul>
          </div>
          <div className="col-md-6">
            <ul className="breadcrumb">
              {this.renderBreadcrumbs()}
            </ul>
          </div>
{'fraction_non_alphanumeric': 0.1745501762196253, 'fraction_numerical': 0.0014839547393804488, 'mean_word_length': 2.8268275372604683, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 89, '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': '3423665', 'n_tokens_mistral': 1643, 'n_tokens_neox': 1630, 'n_words': 344}