summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2017-07-07 13:54:49 +0100
committerNick Thomas <nick@gitlab.com>2017-07-07 14:35:16 +0100
commit6b4da27e97a39448d363d453dce81cce574af9b5 (patch)
treeeabcc3e09241a0f4337ae8e1dd58afef77e58684 /app/controllers/dashboard
parentde2d5ce685877249434ba412b5839910bc703882 (diff)
downloadgitlab-ce-6b4da27e97a39448d363d453dce81cce574af9b5.tar.gz
Fix dashboard labels dropdown
Diffstat (limited to 'app/controllers/dashboard')
-rw-r--r--app/controllers/dashboard/labels_controller.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/dashboard/labels_controller.rb b/app/controllers/dashboard/labels_controller.rb
index dd1d46a68c7..9dcb3a0eb6d 100644
--- a/app/controllers/dashboard/labels_controller.rb
+++ b/app/controllers/dashboard/labels_controller.rb
@@ -1,9 +1,14 @@
class Dashboard::LabelsController < Dashboard::ApplicationController
def index
- labels = LabelsFinder.new(current_user).execute
-
respond_to do |format|
format.json { render json: LabelSerializer.new.represent_appearance(labels) }
end
end
+
+ def labels
+ finder_params = { project_ids: projects.select(:id) }
+ labels = LabelsFinder.new(current_user, finder_params).execute
+
+ GlobalLabel.build_collection(labels)
+ end
end