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.options @dashboard.options api.created_on @dashboard.created_at api.updated_on @dashboard.updated_at call_hook :api_dashboard_show, dashboard: @dashboard end