<div class="container">
	<div class="row">
		<%# <button ng-click="loadDashboard()" class="btn btn-large btn-success"><i class="fa fa-refresh"></i> Reload Dashboard</button>%>
		<a href="/json/csv/all" class="btn btn-large btn-primary"><i class="fa fa-download"></i> Download All Data</a>

        <% for (var i = 0; i < vals.length; i++){ var val = vals[i]; %>
			<div class="col-md-4" style="height:200px; margin-bottom:40px;">
                <div id="<%= val.name %>"></div>
				<div style="text-align:center">
					<h5><%= val.dtime %></h5>
					<a href="/#/tag/<%= val.t_id %>" class="btn btn-large btn-primary"><i class="fa fa-line-chart"></i> View Data</a>
				</div>
			</div>
		<% } %>
	</div>
</div>
<script>
    <% for (var x = 0; x < vals.length; x++){ var val = vals[i]; %>
        var g = new JustGage({
            id: "<%= val.name %>",
            value: <%= val.val %>,
            min: <%= val.minExpected %>,
            max: <%= val.maxExpected %>,
            title: <%= val.name %>,
            label:<%= val.units %>,
            decimals:2,
            refreshAnimationType:'bounce',
            startAnimationType:'bounce'}
        });
    <% } >

</script>
