debian-mirror-gitlab/app/controllers/dashboard/labels_controller.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
481 B
Ruby
Raw Normal View History

2018-12-05 23:21:45 +05:30
# frozen_string_literal: true
2016-06-02 11:05:42 +05:30
class Dashboard::LabelsController < Dashboard::ApplicationController
2021-12-11 22:18:48 +05:30
feature_category :team_planning
2022-07-16 23:28:13 +05:30
urgency :low
2021-01-03 14:25:43 +05:30
2016-06-02 11:05:42 +05:30
def index
respond_to do |format|
2017-08-17 22:00:37 +05:30
format.json { render json: LabelSerializer.new.represent_appearance(labels) }
2016-06-02 11:05:42 +05:30
end
end
2017-09-10 17:25:29 +05:30
def labels
finder_params = { project_ids: projects.select(:id) }
2021-01-03 14:25:43 +05:30
LabelsFinder.new(current_user, finder_params).execute
.select('DISTINCT ON (labels.title) labels.*')
2017-09-10 17:25:29 +05:30
end
2016-06-02 11:05:42 +05:30
end