replace the dateTo with an interval

I hope an interval is easier to handle than having 
to change two date fields
This commit is contained in:
2017-03-27 20:07:32 +02:00
parent 726258020f
commit 2875237272
6 changed files with 65 additions and 16 deletions

View File

@@ -99,3 +99,9 @@ body{
align-items: center;
}
input:required:invalid {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAT1JREFUeNpi/P//PwMpgImBRMACY/x7/uDX39sXt/67cMoDyOVgMjBjYFbV/8kkqcCBrIER5KS/967s+rmkXxzI5wJiRSBm/v8P7NTfHHFFl5mVdIzhGv4+u///x+xmuAlcdXPB9KeqeLgYd3bDU2ZpRRmwH4DOeAI07QXIRKipYPD35184/nn17CO4p/+cOfjl76+/X4GYAYThGn7/g+Mfh/ZZwjUA/aABpJVhpv6+dQUjZP78Z0YEK7OezS2gwltg64GmfTu6i+HL+mUMP34wgvGvL78ZOEysf8M1sGgZvQIqfA1SDAL8iUUMPIFRQLf+AmMQ4DQ0vYYSrL9vXDz2sq9LFsiX4dLRA0t8OX0SHKzi5bXf2HUMBVA0gN356N7p7xdOS3w5fAgcfNxWtn+BJi9gVVBOQfYPQIABABvRq3BwGT3OAAAAAElFTkSuQmCC);
background-position: right top;
background-repeat: no-repeat;
box-shadow: none;
}

View File

@@ -90,7 +90,7 @@ function plot(event){
request['limitBy'] = $('#search-limit-by').val();
request['limit'] = parseInt($('#search-limit-value').val());
request['dateFrom'] = $('#search-date-from').val();
request['dateTo'] = $('#search-date-to').val();
request['dateRange'] = $('#search-date-range').val();
var success = function(response){

View File

@@ -32,8 +32,16 @@
<label for="search-date-from">From Date:</label>
<input id="search-date-from" class="input_date" type="text" value="{{oldestValue}}">
<label for="search-date-to">To Date:</label>
<input id="search-date-to" class="input_date" type="text" value="{{latestValue}}">
<label for="search-date-range">Interval:</label>
<input id="search-date-range" type="text" list="ranges" required="" value="1 week" pattern="\d+ (second|minute|hour|day|week|month)s?">
<datalist id="ranges">
<option value="60 seconds">
<option value="5 minutes">
<option value="1 hour">
<option value="1 day">
<option value="1 week">
<option value="1 month">
</datalist>
<button id="search-submit"><i class="fa fa-area-chart"> Plot</i></button>
</div>