<commit_before>/** @jsx React.DOM */

var SeasonRow = React.createClass({
	render: function() {
		hrefTarget = "/admin/seasons/" + encodeURIComponent(this.props.season.Name + ";" + this.props.season.Year);
		return (
			<tr>
				<td><a href={hrefTarget}>{this.props.season.Name}</a></td>
				<td><a href={hrefTarget}>{this.props.season.Year}</a></td>
				<td><a href={hrefTarget}>{this.props.season.Active ? 'True' : 'False'}</a></td>
			</tr>
		);
	}
});

var SeasonTable = React.createClass({
	loadSeasonsFromServer: function() {
		$.ajax({url:"/api/seasons/",
				type: 'GET',
				dataType: 'json',
				success: function(data) {
					this.setState({seasons: data});
				}.bind(this),
				error: function(xhr, status, err) {
        			console.error(this.props.url, status, err.toString());
      			}.bind(this)
		});
	},
	getInitialState: function() {
		return {seasons:[]};
	},
	componentDidMount: function() {
	    this.loadSeasonsFromServer();
	    setInterval(this.loadSeasonsFromServer, this.props.pollInterval);
  	},
	render: function() {
		var rows = [];
		this.state.seasons.forEach(function(season) {
			rows.push(<SeasonRow season={season} />);
		});
		return (
			<div>
				<table>
					<thead>
						<th>Name</th>
						<th>Year</th>
						<th>Active</th>
					</thead>
					<tbody>{rows}</tbody>
				</table>
			</div>
		);<commit_msg>Removed auto-refresh from the admin panels.<commit_after>/** @jsx React.DOM */

var SeasonRow = React.createClass({
	render: function() {
		hrefTarget = "/admin/seasons/" + encodeURIComponent(this.props.season.Name + ";" + this.props.season.Year);
		return (
			<tr>
				<td><a href={hrefTarget}>{this.props.season.Name}</a></td>
				<td><a href={hrefTarget}>{this.props.season.Year}</a></td>
				<td><a href={hrefTarget}>{this.props.season.Active ? 'True' : 'False'}</a></td>
			</tr>
		);
	}
});

var SeasonTable = React.createClass({
	loadSeasonsFromServer: function() {
		$.ajax({url:"/api/seasons/",
				type: 'GET',
				dataType: 'json',
				success: function(data) {
					this.setState({seasons: data});
				}.bind(this),
				error: function(xhr, status, err) {
        			console.error(this.props.url, status, err.toString());
      			}.bind(this)
		});
	},
	getInitialState: function() {
		return {seasons:[]};
	},
	componentDidMount: function() {
	    this.loadSeasonsFromServer();
  	},
	render: function() {
		var rows = [];
		this.state.seasons.forEach(function(season) {
			rows.push(<SeasonRow season={season} />);
		});
		return (
			<div>
				<table>
					<thead>
						<th>Name</th>
						<th>Year</th>
						<th>Active</th>
					</thead>
					<tbody>{rows}</tbody>
				</table>
			</div>
		);
{'fraction_non_alphanumeric': 0.20600375234521576, 'fraction_numerical': 0.0, 'mean_word_length': 3.191823899371069, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 61, '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': '2527563', 'n_tokens_mistral': 1130, 'n_tokens_neox': 956, 'n_words': 149}