<commit_before>var React = require('react')
var Immutable = require('immutable')

var DepActions  = require('../actions/DepActions')
var DepStateItem = React.createClass({
	getInitialState: function() {
		return {
			hover: false
		}
	},

	removeDepState: function() {
		if(confirm("Are you sure you want to remove state '"+this.props.state.get('name')+"?")) {
			DepActions.removeDepState(this.props.dep, this.props.state)	
		}
	},

	enter: function() { this.setState({hover: true})},
	leave: function() { this.setState({hover: false})},

	render: function() {
		st = this.props.state
		dep = this.props.dep
		imageName = st.get('image_name')

		var isolations = this.props.isolations.filter(function(iso){
			var res = false
			iso.get('states').forEach(function(sname, dname){
				if(dname === dep.get('id') && sname === st.get('id')) {
					res = true
					return
				}
			})
			return res
		})

		return <div className="item" onMouseEnter={this.enter} onMouseLeave={this.leave}>
			{this.state.hover ? <button style={{margin: '5px 5px 0 0'}} className="right floated circular compact ui red icon mini button" onClick={this.removeDepState}><i className="trash icon"></i></button> : null }
			{imageName ? <img className="ui avatar image" src="/static/src/img/icon_built_image.png"/> : <img className="ui avatar image" src="/static/src/img/icon_unbuilt_image.png"/>}
			<div className="content">
				<a className="header" href={"/deps/"+dep.get('id')+"/states/"+st.get('id')}>
					<h4 style={{color: BRAND_BLUE, fontWeight: "normal"}}>{st.get('name')}</h4>				
				</a>
				<div className="description">Image: {imageName ? <span>{imageName}</span> : <em>not yet build</em>}</div>			
			</div>			
		</div>
	}
})

module.exports = React.createClass({
	getInitialState: function() {
		return {
			hover: false
		}
	},
<commit_msg>adjusted ui to cope with new length of images<commit_after>var React = require('react')
var Immutable = require('immutable')

var DepActions  = require('../actions/DepActions')
var DepStateItem = React.createClass({
	getInitialState: function() {
		return {
			hover: false
		}
	},

	removeDepState: function() {
		if(confirm("Are you sure you want to remove state '"+this.props.state.get('name')+"?")) {
			DepActions.removeDepState(this.props.dep, this.props.state)	
		}
	},

	enter: function() { this.setState({hover: true})},
	leave: function() { this.setState({hover: false})},

	render: function() {
		st = this.props.state
		dep = this.props.dep
		imageName = st.get('image_name')

		var isolations = this.props.isolations.filter(function(iso){
			var res = false
			iso.get('states').forEach(function(sname, dname){
				if(dname === dep.get('id') && sname === st.get('id')) {
					res = true
					return
				}
			})
			return res
		})

		var imageNameShortened = imageName
		var parts = imageNameShortened.split(".")
		if (parts.length > 1) {
			console.log(imageName)
			imageNameShortened = parts[0].substring(0,10) + "..." + parts[1].slice(-10)
		}

		return <div className="item" onMouseEnter={this.enter} onMouseLeave={this.leave}>
			{this.state.hover ? <button style={{margin: '5px 5px 0 0'}} className="right floated circular compact ui red icon mini button" onClick={this.removeDepState}><i className="trash icon"></i></button> : null }
			{imageName ? <img className="ui avatar image" src="/static/src/img/icon_built_image.png"/> : <img className="ui avatar image" src="/static/src/img/icon_unbuilt_image.png"/>}
			<div className="content">
				<a className="header" href={"/deps/"+dep.get('id')+"/states/"+st.get('id')}>
					<h4 style={{color: BRAND_BLUE, fontWeight: "normal"}}>{st.get('name')}</h4>				
				</a>
				<div className="description">Image: {imageName ? <span>{imageNameShortened}</span> : <em>not yet build</em>}</div>			
			</div>			
		</div>
	}
})

module.exports = React.createClass({
	getInitialState: function() {
		return {
			hover: false
		}
	},

{'fraction_non_alphanumeric': 0.18443877551020407, 'fraction_numerical': 0.00510204081632653, 'mean_word_length': 4.145669291338582, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 44, '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': '5757004', 'n_tokens_mistral': 1483, 'n_tokens_neox': 1319, 'n_words': 273}