<commit_before>import React, { Component, PropTypes } from 'react'
import routes from './routers/routes'
import { render } from 'react-dom';
import { Router, browserHistory, hashHistory } from 'react-router';

class App extends Component {
	constructor(){
		super()
	}
  render() {
    return (
      <Router ref="router" history={hashHistory} routes={routes} />
    )
  }
}

const app = render(
  <App />, document.getElementById('app_container')
)

export default app<commit_msg>Changes for calling dashboard API into pivot ui<commit_after>import React, { Component, PropTypes } from 'react'
import routes from './routers/routes'
import { render } from 'react-dom';
import { Router, browserHistory, hashHistory } from 'react-router';
import fetch from 'isomorphic-fetch';
import {baseUrl} from './utils/Constants';

class App extends Component {
	constructor(){
		super()
		this.validateDashboardAPI()
	}
	validateDashboardAPI(){
		let apiURL = '/api/v1/dashboards';
		fetch(apiURL, {method: 'GET'}).then((res)=>{return res.json()}).then((result)=>{
			if(result.entities.length == 0){
				fetch(apiURL, {
					method: 'POST',
					body: JSON.stringify({name: 'dashboard', description: 'dashboard', data: ''}),
					headers: {
						'Content-Type' : 'application/json',
						'Accept' : 'application/json'
					}
				})
			}
		})
	}

  render() {
    return (
      <Router ref="router" history={hashHistory} routes={routes} />
    )
  }
}

const app = render(
  <App />, document.getElementById('app_container')
)

export default app
{'fraction_non_alphanumeric': 0.15559895833333334, 'fraction_numerical': 0.0013020833333333333, 'mean_word_length': 3.9741100323624594, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '4325826', 'n_tokens_mistral': 512, 'n_tokens_neox': 475, 'n_words': 119}