summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard_controller.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-03-22 19:19:53 +0100
committerRémy Coutable <remy@rymai.me>2016-03-23 12:02:15 +0100
commit7dc16346bba174d6075cf438adcd70a5596ba935 (patch)
treebdb093b32967dae0946476747a223124ee65f09f /app/controllers/dashboard_controller.rb
parent703f7c5d579a6ab6d7592c24f8e3f2813d9d1703 (diff)
downloadgitlab-ce-7dc16346bba174d6075cf438adcd70a5596ba935.tar.gz
Fix an issue causing the Dashboard/Milestones page to be blank
Diffstat (limited to 'app/controllers/dashboard_controller.rb')
-rw-r--r--app/controllers/dashboard_controller.rb29
1 files changed, 1 insertions, 28 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb
index b538c7d1608..1dce4a21729 100644
--- a/app/controllers/dashboard_controller.rb
+++ b/app/controllers/dashboard_controller.rb
@@ -3,7 +3,7 @@ class DashboardController < Dashboard::ApplicationController
include MergeRequestsAction
before_action :event_filter, only: :activity
- before_action :projects, only: [:issues, :merge_requests, :labels, :milestones]
+ before_action :projects, only: [:issues, :merge_requests]
respond_to :html
@@ -20,29 +20,6 @@ class DashboardController < Dashboard::ApplicationController
end
end
- def labels
- labels = Label.where(project_id: @projects).select(:title, :color).uniq(:title)
-
- respond_to do |format|
- format.json do
- render json: labels
- end
- end
- end
-
- def milestones
- milestones = Milestone.where(project_id: @projects).active
- epoch = DateTime.parse('1970-01-01')
- grouped_milestones = GlobalMilestone.build_collection(milestones)
- grouped_milestones = grouped_milestones.sort_by { |x| x.due_date.nil? ? epoch : x.due_date }
-
- respond_to do |format|
- format.json do
- render json: grouped_milestones
- end
- end
- end
-
protected
def load_events
@@ -57,8 +34,4 @@ class DashboardController < Dashboard::ApplicationController
@events = @event_filter.apply_filter(@events).with_associations
@events = @events.limit(20).offset(params[:offset] || 0)
end
-
- def projects
- @projects ||= current_user.authorized_projects.sorted_by_activity.non_archived
- end
end