<!--

    Copyright © 2016-2017 The Thingsboard Authors

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<section layout="row" layout-align="start start">
	<md-input-container>
		 <label translate>timeinterval.days</label>
	     <input type="number" ng-model="days" step="1" aria-label="{{ 'timeinterval.days' | translate }}">
	</md-input-container>
	<md-input-container>
		 <label translate>timeinterval.hours</label>
	     <input type="number" ng-model="hours" step="1" aria-label="{{ 'timeinterval.hours' | translate }}">
	</md-input-container>
	<md-input-container>
		 <label translate>timeinterval.minutes</label>
	     <input type="number" ng-model="mins" step="1" aria-label="{{ 'timeinterval.minutes' | translate }}">
	</md-input-container>
	<md-input-container>
		 <label translate>timeinterval.seconds</label>
	     <input type="number" ng-model="secs" step="1" aria-label="{{ 'timeinterval.seconds' | translate }}">
	</md-input-container>
     <md-menu md-position-mode="target-right target">
      <md-button class="md-icon-button"  aria-label="Open intervals" ng-click="$mdOpenMenu($event)">
      	<md-icon md-menu-origin aria-label="arrow_drop_down" class="material-icons">arrow_drop_down</md-icon>	
      </md-button>
      <md-menu-content width="4">
        <md-menu-item ng-repeat="interval in predefIntervals" >
          <md-button ng-click="setIntervalMs(interval.value)">
			<span>{{interval.name}}</span>
          </md-button>
        </md-menu-item>
      </md-menu-content>
     </md-menu>		
</section>
