<commit_before>import React from 'react';
import moment from 'moment';

import { Button, Collapse } from '@blueprintjs/core';
import apolloServer from '../../services/apollo-server';

class ExecutionDisplay extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      showResult: false,
      exe: props.exe
    }

    this.handleClick = this.handleClick.bind(this);
  }

  handleClick() {
    this.setState({
      showResult: !this.state.showResult
    });
  }

  render() {
    var executedAt = moment(this.state.exe.executed_at);
    return (
      <div className='executionHistory'>
            {executedAt.calendar()} |
            {this.state.exe.result_type === "0" ? "Success" : "Error" }
             | 
            <Button className='pt-button pt-small pt-intent-success' onClick={this.handleClick}>
                {this.state.showResult ? "Hide" : "Show"} Result
            </Button><commit_msg>tweak to client to properly display job execution results<commit_after>import React from 'react';
import moment from 'moment';

import { Button, Collapse } from '@blueprintjs/core';
import apolloServer from '../../services/apollo-server';

class ExecutionDisplay extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      showResult: false,
      exe: props.exe
    }

    this.handleClick = this.handleClick.bind(this);
  }

  handleClick() {
    this.setState({
      showResult: !this.state.showResult
    });
  }

  render() {
    var executedAt = moment(this.state.exe.executed_at);
    return (
      <div className='executionHistory'>
            {executedAt.calendar()} |
            { this.state.exe.result_type }
             | 
            <Button className='pt-button pt-small pt-intent-success' onClick={this.handleClick}>
                {this.state.showResult ? "Hide" : "Show"} Result
            </Button>
{'fraction_non_alphanumeric': 0.1324538258575198, 'fraction_numerical': 0.0005277044854881266, 'mean_word_length': 2.618320610687023, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4215614', 'n_tokens_mistral': 563, 'n_tokens_neox': 546, 'n_words': 116}