Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (44 sloc) 2.39 KB
<!--
- Created by Johan Karlsteen on 2017-10-08.
-->
<aura:component description="FridgeReadingHistoryComponent" implements="force:appHostable,flexipage:availableForAllPageTypes" access="global" controller="FridgeReadingHistoryController">
<ltng:require scripts="{!$Resource.chartjs_270}" />
<aura:attribute name="today" type="DateTime" />
<aura:attribute name="results" type="Integer" default="200"/>
<aura:attribute name="width" type="Integer" />
<aura:attribute name="height" type="Integer" />
<aura:handler name="init" value="{!this}" action="{!c.doinit}"/>
<article class="slds-card">
<div class="slds-card__header slds-grid">
<header class="slds-media slds-media_center slds-has-flexi-truncate">
<div class="slds-media__figure">
<span class="slds-icon_container slds-icon-standard-contact" title="description of icon when needed">
<lightning:icon iconName="custom:custom97" />
</span>
</div>
<div class="slds-media__body">
<h2>
<a href="javascript:void(0);" class="slds-card__header-link slds-truncate" title="[object Object]">
<span class="slds-text-heading_small">Temperature and Humidity</span>
</a>
</h2>
</div>
</header>
<div class="slds-no-flex">
</div>
</div>
<div class="slds-card__body slds-card__body_inner" style="height: 100%">
<ui:inputDateTime aura:id="endDate" label="End Date" class="form-control" value="{!v.today}" displayDatePicker="true" />
<lightning:input type="number" name="results" label="Results" value="{!v.results}"/>
<button class="slds-button slds-button_neutral" onclick="{!c.refreshData}">Refresh</button>
<canvas id="temperature" width="{!v.width}" height="{!v.height-200}" class="chartjs-render-monitor"></canvas>
</div>
<footer class="slds-card__footer"></footer>
</article>
<div class="slds-spinner_container slds-hide" aura:id="spinner">
<div class="slds-spinner--brand slds-spinner slds-spinner--medium" aria-hidden="false" role="alert">
<div class="slds-spinner__dot-a"></div>
<div class="slds-spinner__dot-b"></div>
</div>
</div>
</aura:component>