mirror of
https://github.com/zammad/zammad
synced 2026-05-24 09:48:36 +00:00
32 lines
726 B
Ruby
32 lines
726 B
Ruby
# Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/
|
|
|
|
class SystemReportController < ApplicationController
|
|
|
|
prepend_before_action :authenticate_and_authorize!
|
|
|
|
# GET /api/v1/system_report
|
|
def index
|
|
render json: {
|
|
descriptions: SystemReport.descriptions,
|
|
fetch: SystemReport.fetch
|
|
}
|
|
end
|
|
|
|
# GET /api/v1/system_report/download
|
|
def download
|
|
instance = SystemReport.fetch_with_create
|
|
|
|
send_data(
|
|
instance.data.to_json,
|
|
filename: instance.filename,
|
|
type: 'application/json',
|
|
disposition: 'attachment'
|
|
)
|
|
end
|
|
|
|
# GET /api/v1/system_report/plugins
|
|
def plugins
|
|
render json: { plugins: SystemReport.plugins }
|
|
end
|
|
|
|
end
|