<div class="row" ng-show="error">
	<div class="col-lg-12">
		<div class="alert alert-danger" ng-bind="error"></div>
	</div>
</div>
<div class="row" ng-show="running">
	<div class="col-lg-12">
		<div class="alert alert-info">Executing: {{running}}</div>
	</div>
</div>
<div class="row" ng-show="queries">
	<div class="col-lg-12">
		<h4>Queries</h4>
	</div>
	<div class="col-lg-12" ng-repeat="(s, q) in queries">
		<a href="/graph?b64={{btoa(json(q))}}" ng-bind="s"></a>
	</div>
</div>
<div class="row" ng-show="result">
	<div class="col-sm-12">
		<table class="table">
			<thead>
				<tr>
					<th>group</th>
					<th>result</th>
					<th>computations</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="r in result">
					<td>
						{
						<span ng-repeat="(k, v) in r.Group">
							{{k}}={{v}}<span ng-hide="$last">,</span>
						</span>
						}
					</td>
					<td>
						<button class="btn btn-default btn-xs" ng-hide="show || !isSeries(r.Value)" ng-click="show = true">show</button>
						<pre ng-if="show || !isSeries(r.Value)" ng-bind="json(r.Value)"></pre>
					</td>
					<td ts-computations="r.Computations"></td>
				</tr>
			</tbody>
		</table>
	</div>
</div>