<commit_before>import React, { Component } from 'react';
import {observer} from 'mobx-react';
import Services from '../components/Services';
import Tasks from '../components/Tasks';
import FlatButton from 'material-ui/FlatButton';
import { Link } from 'react-router';

const styles = {
  button: {
    margin: 0.6 + 'rem'
  }
};

const Dashboard = observer(
  class Dashboard extends Component {
    constructor(props) {
      super(props);
      this.state = {
        selectedServices: []
      };
    }

    onServiceSelection(selectedServices) {
      this.setState({
        selectedServices: selectedServices
      });
    }

    render() {
      const {nodeStore} = this.props.route;

      return (
        <div>
          <FlatButton
            label="Create Service"
            containerElement={<Link to="/services/create" />}
            primary={true}
            style={styles.button}
            icon={<i className="material-icons">add</i>}
          />
          <Services
           services={nodeStore.services}
           onSelection={this.onServiceSelection.bind(this)}
           selectedServices={this.state.selectedServices}/>
          <Tasks
           tasks={nodeStore.tasks}
           selectedServices={this.state.selectedServices}/>
        </div>
      );
    }
  }
);

export default Dashboard;<commit_msg>Disable non-functional create service button<commit_after>import React, { Component } from 'react';
import {observer} from 'mobx-react';
import Services from '../components/Services';
import Tasks from '../components/Tasks';
import FlatButton from 'material-ui/FlatButton';
import { Link } from 'react-router';

const styles = {
  button: {
    margin: 0.6 + 'rem'
  }
};

const Dashboard = observer(
  class Dashboard extends Component {
    constructor(props) {
      super(props);
      this.state = {
        selectedServices: []
      };
    }

    onServiceSelection(selectedServices) {
      this.setState({
        selectedServices: selectedServices
      });
    }

    render() {
      const {nodeStore} = this.props.route;
      /*
          <FlatButton
            label="Create Service"
            containerElement={<Link to="/services/create" />}
            primary={true}
            style={styles.button}
            icon={<i className="material-icons">add</i>}
          />
      */

      return (
        <div>
          <Services
           services={nodeStore.services}
           onSelection={this.onServiceSelection.bind(this)}
           selectedServices={this.state.selectedServices}/>
          <Tasks
           tasks={nodeStore.tasks}
           selectedServices={this.state.selectedServices}/>
        </div>
      );
    }
  }
);

export default Dashboard;
{'fraction_non_alphanumeric': 0.1265126512651265, 'fraction_numerical': 0.0014668133480014668, 'mean_word_length': 2.2169811320754715, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '6418833', 'n_tokens_mistral': 742, 'n_tokens_neox': 729, 'n_words': 147}