<commit_before>'use strict';

import React, {PropTypes} from 'react';
import ProjectName from './projectname.js';
import Progressbar from './progressbar.jsx';
import {Modal} from 'react-bootstrap';
import AppSetting from './appSetting';

import FileCloudDownload from 'material-ui/svg-icons/file/cloud-download';
import FileCloudUpload from 'material-ui/svg-icons/file/cloud-upload';
import Key from 'material-ui/svg-icons/communication/vpn-key';
import PersonAdd from 'material-ui/svg-icons/social/person-add';
import Icon from 'material-ui/svg-icons/file/cloud';
import {grey500, blue500} from 'material-ui/styles/colors';

const iconStyles = {
    marginRight: 24,
};

const logoStyles = {
    height: 100,
    width: 100,
};

const Project = React.createClass({

    getInitialState() {
        return {
            showModal: false,
            selectedTab: (typeof this.props.selectedTab !== 'undefined') ? this.props.selectedTab : 1
        };
    },

    handleSelect(selectedKey) {
        alert('selected ' + selectedKey);
    },

    close() {
        this.setState({showModal: false});
    },

    open() {
        this.setState({showModal: true});
    },


    render: function () {
        console.log("inside Project component this.props: ");
        console.log(this.props);
        let planName = "";
        if (this.props.planId == 1)
            planName = "Free Plan";

        return (
            <div className="project">
                <div className="plan-status">{planName}</div>
                <Icon style={logoStyles} color={blue500}> </Icon>
                <ProjectName
                    name={this.props.name}
                    id={this.props._id}
                />
                <Progressbar />
                <div className="project-option">
                    <div >
                        <PersonAdd style={iconStyles} color={grey500} onClick={this.open}/>
                        <Key style={iconStyles} color={grey500}/>
                        <FileCloudUpload style={iconStyles} color={grey500}/>
                        <FileCloudDownload style={iconStyles} color={grey500}/>
                    </div>
                    <Modal show={this.state.showModal} onHide={this.close} dialogClassName='app-setting'>
                        <Modal.Header closeButton>
                            <Modal.Title>Settings</Modal.Title>
                        </Modal.Header>
                        <Modal.Body>
                            <AppSetting id={this.props._id}
                                        masterKey={this.props.keys.master}
                                        clientKey={this.props.keys.js}
                                        planId={this.props.planId}
                            /><commit_msg>changed icons margin and replaced download cloud icon with delete icon<commit_after>'use strict';

import React, {PropTypes} from 'react';
import ProjectName from './projectname.js';
import Progressbar from './progressbar.jsx';
import {Modal} from 'react-bootstrap';
import AppSetting from './appSetting';

import IconDelete from 'material-ui/svg-icons/action/delete';
import FileCloudUpload from 'material-ui/svg-icons/file/cloud-upload';
import Key from 'material-ui/svg-icons/communication/vpn-key';
import PersonAdd from 'material-ui/svg-icons/social/person-add';
import Icon from 'material-ui/svg-icons/file/cloud';
import {grey500, blue500} from 'material-ui/styles/colors';

const iconStyles = {
    marginRight: 12,
    marginLeft: 12
};

const logoStyles = {
    height: 100,
    width: 100,
};

const Project = React.createClass({

    getInitialState() {
        return {
            showModal: false,
            selectedTab: (typeof this.props.selectedTab !== 'undefined') ? this.props.selectedTab : 1
        };
    },

    handleSelect(selectedKey) {
        alert('selected ' + selectedKey);
    },

    close() {
        this.setState({showModal: false});
    },

    open() {
        this.setState({showModal: true});
    },


    render: function () {
        console.log("inside Project component this.props: ");
        console.log(this.props);
        let planName = "";
        if (this.props.planId == 1)
            planName = "Free Plan";

        return (
            <div className="project">
                <div className="plan-status">{planName}</div>
                <Icon style={logoStyles} color={blue500}> </Icon>
                <ProjectName
                    name={this.props.name}
                    id={this.props._id}
                />
                <Progressbar />
                <div className="project-option">
                    <div >
                        <PersonAdd style={iconStyles} color={grey500} onClick={this.open}/>
                        <Key style={iconStyles} color={grey500}/>
                        <FileCloudUpload style={iconStyles} color={grey500}/>
                        <IconDelete style={iconStyles} color={grey500}/>
                    </div>
                    <Modal show={this.state.showModal} onHide={this.close} dialogClassName='app-setting'>
                        <Modal.Header closeButton>
                            <Modal.Title>Settings</Modal.Title>
                        </Modal.Header>
                        <Modal.Body>
                            <AppSetting id={this.props._id}
                                        masterKey={this.props.keys.master}
                                        clientKey={this.props.keys.js}
                                        planId={this.props.planId}
                            />
{'fraction_non_alphanumeric': 0.12441902037897748, 'fraction_numerical': 0.01144082946013586, 'mean_word_length': 1.7213035019455254, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7648750', 'n_tokens_mistral': 1508, 'n_tokens_neox': 1410, 'n_words': 290}