<commit_before>import React    from 'react';
import { Link } from 'react-router';
import client   from '../../network';

import state    from 'HPCCloudStyle/States.mcss';
import theme    from 'HPCCloudStyle/Theme.mcss';
import layout   from 'HPCCloudStyle/Layout.mcss';

export default React.createClass({

  displayName: 'HPCCloud-TopBar',

  propTypes: {
    children: React.PropTypes.oneOfType([React.PropTypes.object, React.PropTypes.array]),
    location: React.PropTypes.object,
  },

  getInitialState() {
    return {
      loggedIn: client.loggedIn(),
      isBusy: false,
      progress: 0,
    };
  },

  componentWillMount() {
    this.subscription = client.onAuthChange(this.updateAuth);
    this.busySubscription = client.onBusy(this.updateBusy);
    this.progressSubscription = client.onProgress(this.updateProgress);
  },

  componentWillUnmount() {
    if (this.subscription) {
      this.subscription.unsubscribe();
      this.subscription = null;
    }

    if (this.busySubscription) {
      this.busySubscription.unsubscribe();
      this.busySubscription = null;
    }
  },

  updateAuth(loggedIn) {
    this.setState({
      loggedIn: !!loggedIn,
    });
  },

  updateBusy(isBusy) {
    this.setState({ isBusy });
  },

  updateProgress({ current, total }) {
    const progress = Math.floor(current / total * 100);
    this.setState({ progress });
    if (progress === 100) {
      setTimeout(() => {
        this.setState({ progress: 0 });
      }, 2000);
    }
  },

  render() {
    return (
      <div className={ layout.verticalFlexContainer }>
        <div className={ theme.topBar } style={{ position: 'relative' }}>
            <div className={ this.state.isBusy ? state.isBusy : '' }>
                <Link to="/"><i className={ theme.hpcCloudIcon }></i> HPC</Link>
            </div>

            <div className={ theme.progressBar }
              style={{<commit_msg>fix(Logo): Update logo to Cloud+HPC<commit_after>import React    from 'react';
import { Link } from 'react-router';
import client   from '../../network';

import state    from 'HPCCloudStyle/States.mcss';
import theme    from 'HPCCloudStyle/Theme.mcss';
import layout   from 'HPCCloudStyle/Layout.mcss';

export default React.createClass({

  displayName: 'HPCCloud-TopBar',

  propTypes: {
    children: React.PropTypes.oneOfType([React.PropTypes.object, React.PropTypes.array]),
    location: React.PropTypes.object,
  },

  getInitialState() {
    return {
      loggedIn: client.loggedIn(),
      isBusy: false,
      progress: 0,
    };
  },

  componentWillMount() {
    this.subscription = client.onAuthChange(this.updateAuth);
    this.busySubscription = client.onBusy(this.updateBusy);
    this.progressSubscription = client.onProgress(this.updateProgress);
  },

  componentWillUnmount() {
    if (this.subscription) {
      this.subscription.unsubscribe();
      this.subscription = null;
    }

    if (this.busySubscription) {
      this.busySubscription.unsubscribe();
      this.busySubscription = null;
    }
  },

  updateAuth(loggedIn) {
    this.setState({
      loggedIn: !!loggedIn,
    });
  },

  updateBusy(isBusy) {
    this.setState({ isBusy });
  },

  updateProgress({ current, total }) {
    const progress = Math.floor(current / total * 100);
    this.setState({ progress });
    if (progress === 100) {
      setTimeout(() => {
        this.setState({ progress: 0 });
      }, 2000);
    }
  },

  render() {
    return (
      <div className={ layout.verticalFlexContainer }>
        <div className={ theme.topBar } style={{ position: 'relative' }}>
            <div className={ this.state.isBusy ? state.isBusy : '' }>
                <Link to="/"><i className={ theme.hpcCloudIcon }></i>+HPC</Link>
            </div>

            <div className={ theme.progressBar }
              style={{
{'fraction_non_alphanumeric': 0.1450601150026137, 'fraction_numerical': 0.006272869837950863, 'mean_word_length': 2.796626984126984, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '7362596', 'n_tokens_mistral': 1199, 'n_tokens_neox': 1188, 'n_words': 226}