diff --git a/client/views/dashboard/charts/charts.js b/client/views/dashboard/charts/charts.js index 68c166b6b1..2d190aca7e 100644 --- a/client/views/dashboard/charts/charts.js +++ b/client/views/dashboard/charts/charts.js @@ -176,7 +176,6 @@ Template.chartsLayout.created = function () { var overviewChart = dc.barChart("#overview-chart"); var moveChart = dc.barChart("#move-chart"); - overviewChart .height(80) .dimension(timeStampDimension) diff --git a/client/views/dashboard/charts/filter/filter.html b/client/views/dashboard/charts/filter/filter.html index ede1af83dd..3d46b6ff7f 100644 --- a/client/views/dashboard/charts/filter/filter.html +++ b/client/views/dashboard/charts/filter/filter.html @@ -7,7 +7,7 @@

{{_ "filterData_Title"}}

{{_ "filterData_Month"}} - @@ -23,18 +23,18 @@

{{_ "filterData_Title"}}

{{_ "filterData_Year"}} - {{_ "filterData_Limit"}} - + _ {{_ "filterData_SelectedOf"}} _ {{_ "filterData_Records"}} - {{_ "filterData_Reset"}} + {{_ "filterData_Reset"}} diff --git a/client/views/dashboard/charts/filter/filter.js b/client/views/dashboard/charts/filter/filter.js index a70ed08694..8ec9238083 100644 --- a/client/views/dashboard/charts/filter/filter.js +++ b/client/views/dashboard/charts/filter/filter.js @@ -36,5 +36,39 @@ Template.chartsLayout.events({ instance.getDashboardData(input) + }, + "click #filter-reset": function(event, template){ + // appending loading state + $('#loadingState').html("Loading..."); + + // gets current month and year -> providing them for initial query + var currentYearAndMonth = moment().format("YYYY-MM"); + + // sets default items amount to be returned + var initialLimit = 10000; + + // Initialize filter values + $('#filter-month').val(undefined); + $('#filter-year').val(undefined); + $('#filter-limit').val( initialLimit.toString() ); + + // sets query for elastic search + var input = { + index : "api-umbrella-logs-v1-"+currentYearAndMonth, + type : "log", + limit : initialLimit, + fields: [ + 'request_at', + 'request_ip_country', + 'request_ip', + 'response_time', + 'request_path', + 'request_ip_location.lon', + 'request_ip_location.lat' + ] + }; + + // get data + template.getDashboardData(input); } });