<!DOCTYPE html>
<html>
	<head>
		<title>GoConvey</title>
		<meta name="apple-mobile-web-app-capable" content="yes">
		<link rel="stylesheet" href="/resources/css/font-awesome.min.css">
		<link rel="stylesheet" href="/resources/css/tipsy.css">
		<link rel="stylesheet" href="/resources/css/common.css">
		<link rel="icon" class="favicon" href="/favicon.ico" type="image/vnd.microsoft.icon">
		<link rel="shortcut icon" class="favicon" href="/favicon.ico" type="image/vnd.microsoft.icon">
		<script src="/resources/js/lib/markup.min.js"></script>
		<script src="/resources/js/lib/moment.min.js"></script>
		<script src="/resources/js/lib/ansispan.js"></script>
		<script src="/resources/js/lib/diff-match-patch.min.js"></script>
		<script src="/resources/js/lib/jquery-2_1_0.min.js"></script>
		<script src="/resources/js/lib/jquery-ui-1_10_3-custom.min.js"></script>
		<script src="/resources/js/lib/jquery.pretty-text-diff.min.js"></script>
		<script src="/resources/js/lib/jquery.tipsy.min.js"></script>

		<!-- Script ordering is important -->
		<script src="/resources/js/poller.js"></script>
		<script src="/resources/js/convey.js"></script>
		<script src="/resources/js/config.js"></script>
		<script src="/resources/js/goconvey.js"></script>
	</head>
	<body>
		<header>
			<div class="overall ok">
				<div class="status">PASS</div>
			</div>

			<div class="toggler narrow" data-toggle="controls">
				Controls
			</div>

			<div id="controls" class="controls hide-narrow">
				<div class="server-not-down">
					<ul>
						<li id="logo" title="Powered by GoConvey"><a href="http://goconvey.co" target="_blank">GoConvey</a></li>
					</ul>

					<div class="float-left" id="path-container">
						<input type="text" id="path" placeholder="Watched directory" title="Change watched directory">
					</div>

					<ul class="float-right" id="control-buttons">
						<li class="fa fa-pause" id="play-pause" title="Play/pause tests"></li>
						<li class="fa fa-refresh" id="run-tests" title="Run tests"></li>
						<li class="fa fa-history" id="show-history" title="Test history"></li>
						<li class="fa fa-bell-o" id="toggle-notif" title="Toggle notifications"></li>
						<li class="fa fa-cog" id="show-settings" title="Settings"></li>
						<li class="fa fa-pencil-square-o" id="show-gen" title="Composer"></li>
					</ul>
				</div>
				<div class="server-down">
					<span class="flash">NOTICE:</span>
					<span class="notice-message"><!-- Populated by Javascript --></span>
				</div>

				<hr class="clear">


				<div class="expandable settings">
					<div class="container">
						<div class="setting">
							<div class="setting-meta">
								Theme
							</div>
							<div class="setting-val">
								<ol class="enum" id="theme"><!-- Populated by Javascript --></ol>
								<script id="tpl-theme-enum" type="text/template">
									{{.}}<li data-theme="{{id}}">{{name}}</li>{{/.}}
								</script>
							</div>
						</div>
						<div class="setting">
							<div class="setting-meta">
								Default
							</div>
							<div class="setting-val">
								<ol class="enum" id="pkg-expand-collapse">
									<li data-pkg-expand-collapse="expanded">Expand All</li>
									<li data-pkg-expand-collapse="collapsed">Collapse All</li>
								</ol>
							</div>
						</div>
						<div class="setting">
							<div class="setting-meta">
								Debug Output
							</div>
							<div class="setting-val">
								<ol class="enum" id="show-debug-output">
									<li data-show-debug-output="show">Show</li>
									<li data-show-debug-output="hide">Hide</li>
								</ol>
							</div>
						</div>
						<div class="setting">
							<div class="setting-meta">
								Effects
							</div>
							<div class="setting-val">
								<ol class="enum" id="ui-effects">
									<li data-ui-effects="true">Cinematic</li>
									<li data-ui-effects="false">Off</li>
								</ol>
							</div>
						</div>
					</div>
				</div>

				<div class="expandable history">
					<div class="container"><!-- Populated by Javascript --></div>
					<script id="tpl-history" type="text/template">
						<div class="item {{overall.status.class}} frame-{{id}}" data-frameid="{{id}}">
							<div class="status momentjs" id="frame-{{id}}"></div>
							<div class="summary">{{overall.status.text|upcase}}<br>{{overall.passed}}/{{overall.assertions}} pass<br>{{overall.failures}} fail, {{overall.skipped}} skip</div>
						</div>
					</script>
				</div>


			</div>
		</header>






		<div class="frame cf">


			<div class="col" id="col-1">
				<div class="toggler" data-toggle="coverage">
					Coverage
				</div>
				<div class="togglable" id="coverage"><!-- Populated by Javascript --></div>
				<script id="tpl-coverage" type="text/template">
					<div class="templated">
						{{.}}
						<div class="pkg-cover">
							<div class="pkg-cover-bar" data-pkg="{{PackageName}}" data-width="{{Coverage|coveragePct}}"></div>
							<div class="pkg-cover-name rtl pad-right{{if Coverage|coveragePct|equals>0}} no-coverage{{/if}}" title="{{Coverage|coveragePct}}% coverage">
								<a class="fa fa-level-down" href="#pkg-{{_id}}" style="padding: 0 5px;"></a>{{if Coverage|more>0}}<a href="/reports/{{PackageName|coverageReportName}}.html" target="_blank">{{PackageName|boldPkgName}}</a>{{else}}{{PackageName|boldPkgName}}{{/if}}
							</div>
						</div>
						{{/.}}
					</div>
				</script>



				<div class="toggler" data-toggle="ignored">
					Ignored
				</div>
				<div class="togglable" id="ignored"><!-- Populated by Javascript --></div>
				<script id="tpl-ignored" type="text/template">
					<div class="templated">
						<div class="rtl pkg-list">
						{{.}}
							<div>
								<a class="fa fa-level-down" href="#pkg-{{_id}}" style="padding: 0 5px;"></a>{{PackageName|boldPkgName}}
							</div>
						{{/.}}
						</div>
					</div>
				</script>


				<div class="toggler" data-toggle="notestfn">
					No Test Functions
				</div>
				<div class="togglable" id="notestfn"><!-- Populated by Javascript --></div>
				<script id="tpl-notestfn" type="text/template">
					<div class="templated">
						<div class="rtl pkg-list">
						{{.}}
							{{PackageName|boldPkgName}}<br>
						{{/.}}
						</div>
					</div>
				</script>


				<div class="toggler" data-toggle="notestfiles">
					No Test Files
				</div>
				<div class="togglable" id="notestfiles"><!-- Populated by Javascript --></div>
				<script id="tpl-notestfiles" type="text/template">
					<div class="templated">
						<div class="rtl pkg-list">
						{{.}}
							{{PackageName|boldPkgName}}<br>
						{{/.}}
						</div>
					</div>
				</script>



				<div class="toggler" data-toggle="nogofiles">
					No Go Files
				</div>
				<div class="togglable" id="nogofiles"><!-- Populated by Javascript --></div>
				<script id="tpl-nogofiles" type="text/template">
					<div class="templated">
						<div class="rtl pkg-list">
						{{.}}
							{{PackageName|boldPkgName}}<br>
						{{/.}}
						</div>
					</div>
				</script>
			</div>











			<div class="col" id="col-2">

				<div class="toggler buildfailures" data-toggle="buildfailures">
					Build Failures
				</div>
				<div class="togglable buildfailures" id="buildfailures"><!-- Populated by Javascript --></div>
				<script id="tpl-buildfailures" type="text/template">
					<div class="templated">
						{{.}}
						<div class="buildfail">
							<div class="buildfail-pkg"><i class="fa fa-wrench"></i>&nbsp; {{PackageName|boldPkgName}}</div>
							<div class="buildfail-output">{{BuildOutput|htmlSafe|ansiColours}}</div>
						</div>
						{{/.}}
					</div>
				</script>



				<div class="toggler panics" data-toggle="panics">
					Panics
				</div>
				<div class="togglable panics" id="panics"><!-- Populated by Javascript --></div>
				<script id="tpl-panics" type="text/template">
					<div class="templated">
						{{.}}
						<div class="panic">
							<div class="panic-pkg">
								<i class="fa fa-bomb"></i>&nbsp; {{_pkg|boldPkgName}}
							</div>
						<div class="panic-details">
							<div class="panic-story">
							<div class="panic-file">
								{{if File|notempty}}
								<a href="goconvey://open/?url=file://{{File|url}}&line={{Line}}">{{File|relativePath}}{{if Line|more>0}}:{{Line}}{{/if}}&nbsp; <i class="fa fa-external-link"></i></a>
								{{else}}
								<b>{{TestName}}</b>
								{{/if}}
						</div>
					{{if _path|notempty}}
						{{_path}}
							<div class="story-links{{if Depth|more>-1}} depth-{{Depth}}{{/if}}"><a href="#test-{{_id}}">{{Title}}</a></div>
						{{/_path}}
					{{/if}}
							{{if StackTrace|notempty}}<div class="depth-{{_maxDepth}} panic-summary">{{Error}}</div>{{/if}}
							</div>
							<div class="panic-output">{{if StackTrace|empty}}{{Error|htmlSafe|ansiColours}}{{else}}{{StackTrace|htmlSafe|ansiColours}}{{/if}}</div>
						</div>
						{{/.}}
					</div>
				</script>




				<div class="toggler failures" data-toggle="failures">
					Failures
				</div>
				<div class="togglable failures" id="failures"><!-- Populated by Javascript --></div>
				<script id="tpl-failures" type="text/template">
					<div class="templated">
						{{.}}
						<div class="failure">
							<div class="failure-pkg"><i class="fa fa-file-code-o"></i>&nbsp; {{_pkg|boldPkgName}}</div>
							<div class="failure-details">
								<div class="failure-story">
									<div class="failure-file">
										{{if File|notempty}}
										<a href="goconvey://open/?url=file://{{File|url}}&line={{Line}}">{{File|relativePath}}{{if Line|more>0}}:{{Line}}{{/if}}&nbsp; <i class="fa fa-external-link"></i></a>
										{{else}}
										<b class="test-name-link"><a href="#test-{{_id}}">{{TestName}}</a></b>
										{{/if}}
									</div>
							{{if _path|notempty}}
								{{_path}}
									<div class="story-links{{if Depth|more>-1}} depth-{{Depth}}{{/if}}"><a href="#test-{{_id}}">{{Title}}</a></div>
								{{/_path}}
							{{/if}}
								</div>
								<div class="failure-output">{{if Failure|notempty}}{{Failure|htmlSafe|ansiColours}}{{else}}{{if Message|notempty}}{{Message|htmlSafe|ansiColours}}{{else}}{{StackTrace|htmlSafe|ansiColours}}{{/if}}{{/if}}</div>
								{{if .|needsDiff}}
								<table class="diffviewer">
									<tr>
										<td class="exp">Expected</td>
										<td class="original">{{Expected|htmlSafe|ansiColours}}</td>
									</tr>
									<tr>
										<td class="act">Actual</td>
										<td class="changed">{{Actual|htmlSafe|ansiColours}}</td>
									</tr>
									<tr>
										<td>Diff</td>
										<td class="diff"></td>
									</tr>
								</table>
								{{/if}}
							</div>
						</div>
						{{/.}}
					</div>
				</script>




				<div class="toggler stories" data-toggle="stories">
					Stories
				</div>
				<div class="togglable stories" id="stories"><!-- Populated by Javascript --></div>

				<script id="tpl-stories" type="text/template">
					<table>
					{{.}}
						<tr class="story-pkg expanded pkg-{{_id}}" data-pkg="{{_id}}" data-pkg-name="{{PackageName}}" data-pkg-state="expanded" id="pkg-{{_id}}">
							<td colspan="2">
								<span class="pkg-toggle-container">
									<a href="javascript:" class="fa fa-minus-square-o pkg-toggle"></a>
									<span class="toggle-all-pkg">ALL</span>
								</span>
							</td>
							<td class="story-pkg-name">
								{{PackageName|boldPkgName}}
							</td>
							<td class="story-pkg-summary">
								{{if _panicked|more>0}}<span class="story-pkg-panic-count"><span class="statusicon panic"><i class="fa fa-bolt"></i></span> {{_panicked}}
								&nbsp;</span>{{/if}}
								{{if _failed|more>0}}<span class="story-pkg-failure-count"><span class="statusicon fail">&#10007;</span> {{_failed}}
								&nbsp;</span>{{/if}}
								{{if _passed|more>0}}<span class="story-pkg-pass-count"><span class="statusicon ok">&#10003;</span> {{_passed}}</span>{{/if}}
								{{if _skipped|more>0}}<span class="story-pkg-skip-count">&nbsp; <span class="statusicon skip"><b>S</b></span> {{_skipped}}</span>{{/if}}
							</td>
							<td class="story-pkg-watch-td">
								{{if Outcome|equals>disabled}}
								<span class="fa fa-lg fa-eye-slash disabled" title="Disabled"></span>
								{{else}}
								<a class="fa fa-lg ignore {{if Outcome|notequals>ignored}}fa-eye unwatch{{else}}fa-eye-slash watch clr-red{{/if}}" href="javascript:" title="Toggle ignore" data-pkg="{{PackageName}}"></a>
								{{/if}}
							</td>
						</tr>
						{{TestResults}}
						<tr id="test-{{_id}}" class="story-line {{if _status.class}}{{_status.class}}{{else}}skip{{/if}} test-{{_id}} pkg-{{_pkgid}}">
							<td class="story-line-status"></td>
							<td class="story-line-summary-container">
								
									{{if Stories|empty}} <!-- Not apparently a GoConvey test -->
										{{if _passed}}<span class="statusicon ok">&#10003;</span><br>{{/if}}
										{{if _failed}}<span class="statusicon fail">&#10007;</span><br>{{/if}}
										{{if _panicked}}<span class="statusicon panic"><i class="fa fa-bolt"></i></span><br>{{/if}}
										{{if _skipped}}<span class="statusicon skip"><b>S</b></span><br>{{/if}}
									{{/if}}

							</td>
							<td colspan="3" class="depth-0 story-line-desc">
								<b>{{TestName|htmlSafe|ansiColours}}</b>
								{{if Message}}<div class="message">{{Message|htmlSafe|ansiColours}}</div>{{/if}}
							</td>
						</tr>



							{{Stories}}
							<tr class="story-line {{if _status.class}}{{_status.class}}{{else}}skip{{/if}} pkg-{{_pkgid}}"  id="test-{{_id}}">
								<td class="story-line-status"></td>
								<td class="story-line-summary-container">
									
									{{if _passed}}<span class="statusicon ok">&#10003; {{_passed}}</span><br>{{/if}}
									{{if _failed}}<span class="statusicon fail">&#10007; {{_failed}}</span><br>{{/if}}
									{{if _panicked}}<span class="statusicon panic"><i class="fa fa-bolt"></i> {{_panicked}}</span><br>{{/if}}
									{{if _skipped}}<span class="statusicon skip"><b>S</b> {{_skipped}}</span><br>{{/if}}

								</td>
								<td colspan="3" class="depth-{{Depth}} story-line-desc">
									{{Title|htmlSafe|ansiColours}}
									{{if Output}}<div class="message">{{Output|htmlSafe|ansiColours}}</div>{{/if}}
									{{if _failed}}
										{{Assertions}}
											{{if _failed}}
											<div class="failure">
												<div class="failure-details">
													<div class="failure-output">{{if Failure|notempty}}{{Failure|htmlSafe|ansiColours}}{{else}}{{if Message|notempty}}{{Message|htmlSafe|ansiColours}}{{else}}
															{{StackTrace|htmlSafe|ansiColours}}{{/if}}{{/if}}</div>
												</div>
											</div>
											{{/if}}
										{{/Assertions}}
									{{/if}}
									{{if _panicked}}
										{{Assertions}}
											{{if _panicked}}
											<div class="panic">
												<div class="panic-details">
													<div class="panic-output">{{if Panic|notempty}}{{Panic|htmlSafe|ansiColours}}{{else}}{{if Message|notempty}}{{Message|htmlSafe|ansiColours}}{{else}}{{StackTrace|htmlSafe|ansiColours}}{{/if}}{{/if}}</div>
												</div>
											</div>
											{{/if}}
										{{/Assertions}}
									{{/if}}
								</td>
							</tr>
							{{/Stories}}


						{{/TestResults}}
					{{/.}}
					</table>
				</script>
			</div>



			<div class="col" id="col-3">
				<div class="toggler" data-toggle="log">
					LOG
				</div>
				<div class="togglable log" id="log"><!-- Populated by Javascript --></div>
				<script id="tpl-log-line" type="text/template">
					<div class="line"><span class="timestamp">[{{time}}]</span> {{msg|clean}}</div>
				</script>
			</div>

		</div>

		<footer>
			<section>
				<span id="summary">
					<span class="info" id="time"><!-- Populated by Javascript --></span>
					<span class="info" id="last-test-container">Last test <span id="last-test"><!-- Populated by Javascript --></span></span>
					<span class="info" id="assert-count"><!-- Populated by Javascript --></span>
					<span class="info fail-clr" id="fail-count"><!-- Populated by Javascript --></span>
					<span class="info panic-clr" id="panic-count"><!-- Populated by Javascript --></span>
					<span class="info skip-clr" id="skip-count"><!-- Populated by Javascript --></span>
					<span class="momentjs" id="duration"><!-- Populated by Javascript --></span>
				</span>
				<span id="narrow-summary">
					<span id="narrow-assert-count"><!-- Populated by Javascript --></span>:
					<span class="fail-clr" id="narrow-fail-count"><!-- Populated by Javascript --></span> /
					<span class="panic-clr" id="narrow-panic-count"><!-- Populated by Javascript --></span> /
					<span class="skip-clr" id="narrow-skip-count"><!-- Populated by Javascript --></span>
				</span>
			</section>
			<section>
				<span class="server-not-down">
					<span class="recording">
						<i class="fa fa-circle"></i> LIVE
					</span>
					<span class="replay" title="Click for current test results">
						<i class="fa fa-play"></i> REPLAY
					</span>
					<span class="paused">
						<i class="fa fa-pause"></i> PAUSED
					</span>
				</span>
				<span class="server-down">
					<i class="fa fa-exclamation-triangle fa-lg flash"></i>
					<span class="notice-message"><!-- Populated by Javascript --></span>
				</span>
			</section>
		</footer>

	</body>
</html>
