suitepro/plugins/additionals/app/views/dashboards/index.api.rsb

20 lines
824 B
Text

api.array :dashboards, api_meta(total_count: @query_count, offset: @offset, limit: @limit) do
@dashboards.each do |dashboard|
api.dashboard do
api.id dashboard.id
api.name dashboard.name
api.dashboard_type dashboard.dashboard_type
api.description dashboard.description
api.enable_sidebar dashboard.enable_sidebar
api.system_default dashboard.system_default
api.always_expose dashboard.always_expose
api.project(id: dashboard.project_id, name: dashboard.project.name) unless dashboard.project.nil?
api.author id: dashboard.author_id, name: dashboard.author.name
api.visibility dashboard.visibility
api.created_on dashboard.created_at
api.updated_on dashboard.updated_at
call_hook :api_dashboard_show, dashboard: dashboard
end
end
end