Class: Types::Ci::JobTraceType

Inherits:
BaseObject
  • Object
show all
Defined in:
app/graphql/types/ci/job_trace_type.rb

Constant Summary collapse

MAX_SIZE_KB =
16
MAX_SIZE_B =
MAX_SIZE_KB * 1024

Instance Method Summary collapse

Methods inherited from BaseObject

accepts, assignable?, authorization, authorize, authorized?, #current_user, #id

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Instance Method Details

#html_summary(last_lines:) ⇒ Object



21
22
23
24
25
26
# File 'app/graphql/types/ci/job_trace_type.rb', line 21

def html_summary(last_lines:)
  object.html(
    last_lines: last_lines.clamp(1, 100),
    max_size: Feature.enabled?(:graphql_job_trace_html_summary_max_size) ? MAX_SIZE_B : nil
  ).html_safe
end