diff --git a/Gemfile.lock b/Gemfile.lock index 983c917d8..1afb73bda 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -401,7 +401,7 @@ GEM mini_magick (4.12.0) mini_mime (1.1.2) mini_portile2 (2.8.4) - minitest (5.18.1) + minitest (5.20.0) msgpack (1.7.1) multi_json (1.15.0) multi_test (1.1.0) @@ -673,7 +673,7 @@ GEM websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) whacamole (1.2.0) - wicked_pdf (2.6.3) + wicked_pdf (2.7.0) activesupport xpath (3.2.0) nokogiri (~> 1.8) diff --git a/app/assets/javascripts/global_activities/index.js b/app/assets/javascripts/global_activities/index.js index aed7fbb93..eaf4b4f0d 100644 --- a/app/assets/javascripts/global_activities/index.js +++ b/app/assets/javascripts/global_activities/index.js @@ -21,7 +21,6 @@ ev.preventDefault(); animateSpinner(null, true); filters.page = moreButton.data('next-page'); - filters.starting_timestamp = $('.ga-activities-list').data('starting-timestamp'); $.ajax({ url: $('.ga-activities-list').data('activities-url'), data: filters, diff --git a/app/assets/javascripts/global_activities/side_pane.js b/app/assets/javascripts/global_activities/side_pane.js index 72588e585..d741f6015 100644 --- a/app/assets/javascripts/global_activities/side_pane.js +++ b/app/assets/javascripts/global_activities/side_pane.js @@ -287,7 +287,6 @@ var globalActivities = (function() { } else { noActivitiesMessage.addClass('hidden'); } - $('.ga-activities-list').data('starting-timestamp', json.starting_timestamp); updateRunning = false; animateSpinner('.ga-main', false); diff --git a/app/controllers/global_activities_controller.rb b/app/controllers/global_activities_controller.rb index 4d05101c1..04ca86781 100644 --- a/app/controllers/global_activities_controller.rb +++ b/app/controllers/global_activities_controller.rb @@ -49,14 +49,12 @@ class GlobalActivitiesController < ApplicationController end @next_page = activities.next_page - @starting_timestamp = activities.first&.created_at.to_i respond_to do |format| format.json do render json: { activities_html: render_to_string(partial: 'activity_list', formats: :html), - next_page: @next_page, - starting_timestamp: @starting_timestamp + next_page: @next_page } end format.html do @@ -158,7 +156,7 @@ class GlobalActivitiesController < ApplicationController def activity_filters params.permit( - :page, :starting_timestamp, :from_date, :to_date, types: [], subjects: {}, users: [], teams: [] + :page, :from_date, :to_date, types: [], subjects: {}, users: [], teams: [] ) end diff --git a/app/controllers/my_modules_controller.rb b/app/controllers/my_modules_controller.rb index 44a60494b..07a6b549a 100644 --- a/app/controllers/my_modules_controller.rb +++ b/app/controllers/my_modules_controller.rb @@ -123,7 +123,6 @@ class MyModulesController < ApplicationController end @next_page = activities.next_page - @starting_timestamp = activities.first&.created_at.to_i respond_to do |format| format.json do @@ -132,8 +131,7 @@ class MyModulesController < ApplicationController partial: 'global_activities/activity_list', formats: :html ), - next_page: @next_page, - starting_timestamp: @starting_timestamp + next_page: @next_page } end format.html @@ -562,7 +560,7 @@ class MyModulesController < ApplicationController def activity_filters params.permit( - :page, :starting_timestamp, :from_date, :to_date, types: [], users: [], subjects: {} + :page, :from_date, :to_date, types: [], users: [], subjects: {} ) end diff --git a/app/services/activities_service.rb b/app/services/activities_service.rb index 3dbdf02c1..24e82d9c4 100644 --- a/app/services/activities_service.rb +++ b/app/services/activities_service.rb @@ -30,8 +30,6 @@ class ActivitiesService query = query.where(owner_id: filters[:users]) if filters[:users] query = query.where(type_of: filters[:types].map(&:to_i)) if filters[:types] - query = query.where('created_at <= ?', Time.at(filters[:starting_timestamp].to_i)) if filters[:starting_timestamp] - activities = if filters[:from_date].present? && filters[:to_date].present? query.where('created_at <= :from AND created_at >= :to', diff --git a/app/views/global_activities/index.html.erb b/app/views/global_activities/index.html.erb index 546d67935..58c934da6 100644 --- a/app/views/global_activities/index.html.erb +++ b/app/views/global_activities/index.html.erb @@ -11,9 +11,7 @@
-