<commit_before>import React from 'react/addons';
import Router from 'react-router';
import Header from './Header.react';
import ContentRepositoryActions from '../actions/ContentRepositoryActions';

var EditContentRepository = React.createClass({
  mixins: [Router.Navigation],

  handleRepositoryPathChange: function (e) {
    this.contentRepositoryPath = e.target.value;
  },

  handleControlRepositoryChange: function (e) {
    this.controlRepositoryLocation = e.target.value;
  },

  handleCancel: function () {
    this.transitionTo("repositoryList");
  },

  handleCreate: function () {
    // this.contentRepositoryPath = "/Users/ashl6947/writing/docs-quickstart";
    // this.controlRepositoryLocation = "/Users/ashl6947/writing/nexus-control";

    ContentRepositoryActions.launch("1", this.controlRepositoryLocation, this.contentRepositoryPath);

    this.transitionTo("repositoryList");
  },

  render: function () {
    return (
      <div className="edit-content-repository">
        <Header />
        <div className="container">
          <h1>New Content Repository</h1>
          <div className="repository-path">
            <h3>Repository Path</h3>
            <p className="explanation">Filesystem path to the content repository.</p>
            <input id="input-repository-path" type="text" className="line" placeholder="/some/path" onChange={this.handleRepositoryPathChange}></input>
          </div>
          <div className="control-repository">
            <h3>Control Repository Location</h3><commit_msg>Take out the hard-coded paths.<commit_after>import React from 'react/addons';
import Router from 'react-router';
import Header from './Header.react';
import ContentRepositoryActions from '../actions/ContentRepositoryActions';

var EditContentRepository = React.createClass({
  mixins: [Router.Navigation],

  handleRepositoryPathChange: function (e) {
    this.contentRepositoryPath = e.target.value;
  },

  handleControlRepositoryChange: function (e) {
    this.controlRepositoryLocation = e.target.value;
  },

  handleCancel: function () {
    this.transitionTo("repositoryList");
  },

  handleCreate: function () {
    ContentRepositoryActions.launch("1", this.controlRepositoryLocation, this.contentRepositoryPath);

    this.transitionTo("repositoryList");
  },

  render: function () {
    return (
      <div className="edit-content-repository">
        <Header />
        <div className="container">
          <h1>New Content Repository</h1>
          <div className="repository-path">
            <h3>Repository Path</h3>
            <p className="explanation">Filesystem path to the content repository.</p>
            <input id="input-repository-path" type="text" className="line" placeholder="/some/path" onChange={this.handleRepositoryPathChange}></input>
          </div>
          <div className="control-repository">
            <h3>Control Repository Location</h3>
{'fraction_non_alphanumeric': 0.12774725274725274, 'fraction_numerical': 0.007554945054945055, 'mean_word_length': 3.6983870967741934, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '3425161', 'n_tokens_mistral': 778, 'n_tokens_neox': 757, 'n_words': 155}