<commit_before>/** @jsx React.DOM */
//= require ../stores/app
//= require ./app-controls
//= require ./app-source-history
//= require ./service-unavailable
//= require ./route-link

(function () {

"use strict";

var AppStore = Dashboard.Stores.App;

var RouteLink = Dashboard.Views.RouteLink;

Dashboard.Views.App = React.createClass({
	displayName: "Views.App",

	render: function () {
		var app = this.state.app;

		return (
			<section>
				<header>
					<RouteLink path={this.props.getClusterPath()} className="back-link">
						Go back to cluster
					</RouteLink>
				</header>

				{ !app && this.state.serviceUnavailable ? (
					<Dashboard.Views.ServiceUnavailable status={503} />
				) : null }

				{app ? (
					<section className="panel">
						<Dashboard.Views.AppControls
							headerComponent={this.props.appControlsHeaderComponent}
							appId={this.props.appId}
							app={app}
							formation={this.state.formation}
							getAppPath={this.props.getAppPath} />
					</section>
				) : null}

				{app && app.meta && app.meta.type === "github" ? (
					<section className="panel">
						<Dashboard.Views.AppSourceHistory
							appId={this.props.appId}
							app={app}
							selectedBranchName={this.props.selectedBranchName}
							selectedSha={this.props.selectedSha}
							selectedTab={this.props.selectedTab}
							getAppPath={this.props.getAppPath} />
					</section>
				) : null}
			</section>
		);
	},
<commit_msg>dashboard/app: Allow passing in custom header component to app view<commit_after>/** @jsx React.DOM */
//= require ../stores/app
//= require ./app-controls
//= require ./app-source-history
//= require ./service-unavailable
//= require ./route-link

(function () {

"use strict";

var AppStore = Dashboard.Stores.App;

var RouteLink = Dashboard.Views.RouteLink;

Dashboard.Views.App = React.createClass({
	displayName: "Views.App",

	render: function () {
		var app = this.state.app;
		var headerComponent = this.props.headerComponent || React.DOM.header;

		return (
			<section>
				{headerComponent(this.props,
					<RouteLink path={this.props.getClusterPath()} className="back-link">
						Go back to cluster
					</RouteLink>
				)}

				{ !app && this.state.serviceUnavailable ? (
					<Dashboard.Views.ServiceUnavailable status={503} />
				) : null }

				{app ? (
					<section className="panel">
						<Dashboard.Views.AppControls
							headerComponent={this.props.appControlsHeaderComponent}
							appId={this.props.appId}
							app={app}
							formation={this.state.formation}
							getAppPath={this.props.getAppPath} />
					</section>
				) : null}

				{app && app.meta && app.meta.type === "github" ? (
					<section className="panel">
						<Dashboard.Views.AppSourceHistory
							appId={this.props.appId}
							app={app}
							selectedBranchName={this.props.selectedBranchName}
							selectedSha={this.props.selectedSha}
							selectedTab={this.props.selectedTab}
							getAppPath={this.props.getAppPath} />
					</section>
				) : null}
			</section>
		);
	},

{'fraction_non_alphanumeric': 0.15301085883514315, 'fraction_numerical': 0.0019743336623889436, 'mean_word_length': 2.8825031928480205, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '252999', 'n_tokens_mistral': 1250, 'n_tokens_neox': 965, 'n_words': 162}