<commit_before>const React = require('react');
const ReactDOM = require('react-dom');
const ReactBootstrap = require('react-bootstrap');
const Modal = ReactBootstrap.Modal;
const Form = ReactBootstrap.Form;
const FormGroup = ReactBootstrap.FormGroup;
const FormControl = ReactBootstrap.FormControl;
const ControlLabel = ReactBootstrap.ControlLabel;
const Col = ReactBootstrap.Col;

const Button = ReactBootstrap.Button;

const LoginModal = React.createClass({
  handleSubmit: function(event) {
    event.preventDefault();
    const usernameNode = ReactDOM.findDOMNode(this.refs.username);
    const passwordNode = ReactDOM.findDOMNode(this.refs.password);
    this.props.onLogin(this.props.request, usernameNode.value, passwordNode.value);
    usernameNode.value = '';
    passwordNode.value = '';
  },
  render: function() {
    var theServer = '';
    if (!this.props.show) {
      theServer = '';
    } else if (this.props.authInfo.isProxy) {
      theServer = `The proxy ${authInfo.host}:${authInfo.port}`;
    } else {
      theServer = `The server ${this.props.authServerURL}`;
    }
    const message = `${theServer} requires a username and password.`;
    return (
      <Modal show={ this.props.show }>
        <Modal.Header>
          <Modal.Title>Authentication Required</Modal.Title>
        </Modal.Header>
        <Modal.Body>
          <p>
            { message }
          </p>
          <Form horizontal onSubmit={ this.handleSubmit }>
            <FormGroup>
              <Col componentClass={ ControlLabel } sm={ 2 }>User&nbsp;Name</Col>
              <Col sm={ 10 }>
              <FormControl type="text" placeholder="<NAME>" ref="username" />
              </Col>
            </FormGroup>
            <FormGroup>
              <Col componentClass={ ControlLabel } sm={ 2 }>Password</Col>
              <Col sm={ 10 }>
              <FormControl type="password" placeholder="Password" ref="password" />
              </Col>
            </FormGroup>
            <FormGroup><commit_msg>Fix authentication dialog not working for proxy<commit_after>const React = require('react');
const ReactDOM = require('react-dom');
const ReactBootstrap = require('react-bootstrap');
const Modal = ReactBootstrap.Modal;
const Form = ReactBootstrap.Form;
const FormGroup = ReactBootstrap.FormGroup;
const FormControl = ReactBootstrap.FormControl;
const ControlLabel = ReactBootstrap.ControlLabel;
const Col = ReactBootstrap.Col;

const Button = ReactBootstrap.Button;

const LoginModal = React.createClass({
  handleSubmit: function(event) {
    event.preventDefault();
    const usernameNode = ReactDOM.findDOMNode(this.refs.username);
    const passwordNode = ReactDOM.findDOMNode(this.refs.password);
    this.props.onLogin(this.props.request, usernameNode.value, passwordNode.value);
    usernameNode.value = '';
    passwordNode.value = '';
  },
  render: function() {
    var theServer = '';
    if (!this.props.show) {
      theServer = '';
    } else if (this.props.authInfo.isProxy) {
      theServer = `The proxy ${this.props.authInfo.host}:${this.props.authInfo.port}`;
    } else {
      theServer = `The server ${this.props.authServerURL}`;
    }
    const message = `${theServer} requires a username and password.`;
    return (
      <Modal show={ this.props.show }>
        <Modal.Header>
          <Modal.Title>Authentication Required</Modal.Title>
        </Modal.Header>
        <Modal.Body>
          <p>
            { message }
          </p>
          <Form horizontal onSubmit={ this.handleSubmit }>
            <FormGroup>
              <Col componentClass={ ControlLabel } sm={ 2 }>User&nbsp;Name</Col>
              <Col sm={ 10 }>
              <FormControl type="text" placeholder="<NAME>" ref="username" />
              </Col>
            </FormGroup>
            <FormGroup>
              <Col componentClass={ ControlLabel } sm={ 2 }>Password</Col>
              <Col sm={ 10 }>
              <FormControl type="password" placeholder="Password" ref="password" />
              </Col>
            </FormGroup>
            <FormGroup>
{'fraction_non_alphanumeric': 0.13225172074729596, 'fraction_numerical': 0.0029498525073746312, 'mean_word_length': 2.6493273542600897, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, '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': '4764582', 'n_tokens_mistral': 1140, 'n_tokens_neox': 1131, 'n_words': 251}