diff options
Diffstat (limited to 'app/graphql/types/ci/runner_type.rb')
-rw-r--r-- | app/graphql/types/ci/runner_type.rb | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/app/graphql/types/ci/runner_type.rb b/app/graphql/types/ci/runner_type.rb index 9094c6b96e4..a7f0730f07e 100644 --- a/app/graphql/types/ci/runner_type.rb +++ b/app/graphql/types/ci/runner_type.rb @@ -16,54 +16,20 @@ module Types alias_method :runner, :object - field :id, ::Types::GlobalIDType[::Ci::Runner], null: false, - description: 'ID of the runner.' - field :description, GraphQL::Types::String, null: true, - description: 'Description of the runner.' - field :created_at, Types::TimeType, null: true, - description: 'Timestamp of creation of this runner.' - field :contacted_at, Types::TimeType, null: true, - description: 'Timestamp of last contact from this runner.', - method: :contacted_at - field :token_expires_at, Types::TimeType, null: true, - description: 'Runner token expiration time.', - method: :token_expires_at - field :maximum_timeout, GraphQL::Types::Int, null: true, - description: 'Maximum timeout (in seconds) for jobs processed by the runner.' field :access_level, ::Types::Ci::RunnerAccessLevelEnum, null: false, description: 'Access level of the runner.' field :active, GraphQL::Types::Boolean, null: false, description: 'Indicates the runner is allowed to receive jobs.', deprecated: { reason: 'Use paused', milestone: '14.8' } - field :paused, GraphQL::Types::Boolean, null: false, - description: 'Indicates the runner is paused and not available to run jobs.' - field :status, - Types::Ci::RunnerStatusEnum, - null: false, - description: 'Status of the runner.', - resolver: ::Resolvers::Ci::RunnerStatusResolver - field :version, GraphQL::Types::String, null: true, - description: 'Version of the runner.' - field :short_sha, GraphQL::Types::String, null: true, - description: %q(First eight characters of the runner's token used to authenticate new job requests. Used as the runner's unique ID.) - field :revision, GraphQL::Types::String, null: true, - description: 'Revision of the runner.' - field :locked, GraphQL::Types::Boolean, null: true, - description: 'Indicates the runner is locked.' - field :run_untagged, GraphQL::Types::Boolean, null: false, - description: 'Indicates the runner is able to run untagged jobs.' - field :ip_address, GraphQL::Types::String, null: true, - description: 'IP address of the runner.' - field :runner_type, ::Types::Ci::RunnerTypeEnum, null: false, - description: 'Type of the runner.' - field :tag_list, [GraphQL::Types::String], null: true, - description: 'Tags associated with the runner.' - field :project_count, GraphQL::Types::Int, null: true, - description: 'Number of projects that the runner is associated with.' - field :job_count, GraphQL::Types::Int, null: true, - description: "Number of jobs processed by the runner (limited to #{JOB_COUNT_LIMIT}, plus one to indicate that more items exist)." field :admin_url, GraphQL::Types::String, null: true, description: 'Admin URL of the runner. Only available for administrators.' + field :contacted_at, Types::TimeType, null: true, + description: 'Timestamp of last contact from this runner.', + method: :contacted_at + field :created_at, Types::TimeType, null: true, + description: 'Timestamp of creation of this runner.' + field :description, GraphQL::Types::String, null: true, + description: 'Description of the runner.' field :edit_admin_url, GraphQL::Types::String, null: true, description: 'Admin form URL of the runner. Only available for administrators.' field :executor_name, GraphQL::Types::String, null: true, @@ -72,12 +38,46 @@ module Types feature_flag: :graphql_ci_runner_executor field :groups, ::Types::GroupType.connection_type, null: true, description: 'Groups the runner is associated with. For group runners only.' - field :projects, ::Types::ProjectType.connection_type, null: true, - description: 'Projects the runner is associated with. For project runners only.' + field :id, ::Types::GlobalIDType[::Ci::Runner], null: false, + description: 'ID of the runner.' + field :ip_address, GraphQL::Types::String, null: true, + description: 'IP address of the runner.' + field :job_count, GraphQL::Types::Int, null: true, + description: "Number of jobs processed by the runner (limited to #{JOB_COUNT_LIMIT}, plus one to indicate that more items exist)." field :jobs, ::Types::Ci::JobType.connection_type, null: true, description: 'Jobs assigned to the runner.', authorize: :read_builds, resolver: ::Resolvers::Ci::RunnerJobsResolver + field :locked, GraphQL::Types::Boolean, null: true, + description: 'Indicates the runner is locked.' + field :maximum_timeout, GraphQL::Types::Int, null: true, + description: 'Maximum timeout (in seconds) for jobs processed by the runner.' + field :paused, GraphQL::Types::Boolean, null: false, + description: 'Indicates the runner is paused and not available to run jobs.' + field :project_count, GraphQL::Types::Int, null: true, + description: 'Number of projects that the runner is associated with.' + field :projects, ::Types::ProjectType.connection_type, null: true, + description: 'Projects the runner is associated with. For project runners only.' + field :revision, GraphQL::Types::String, null: true, + description: 'Revision of the runner.' + field :run_untagged, GraphQL::Types::Boolean, null: false, + description: 'Indicates the runner is able to run untagged jobs.' + field :runner_type, ::Types::Ci::RunnerTypeEnum, null: false, + description: 'Type of the runner.' + field :short_sha, GraphQL::Types::String, null: true, + description: %q(First eight characters of the runner's token used to authenticate new job requests. Used as the runner's unique ID.) + field :status, + Types::Ci::RunnerStatusEnum, + null: false, + description: 'Status of the runner.', + resolver: ::Resolvers::Ci::RunnerStatusResolver + field :tag_list, [GraphQL::Types::String], null: true, + description: 'Tags associated with the runner.' + field :token_expires_at, Types::TimeType, null: true, + description: 'Runner token expiration time.', + method: :token_expires_at + field :version, GraphQL::Types::String, null: true, + description: 'Version of the runner.' def job_count # We limit to 1 above the JOB_COUNT_LIMIT to indicate that more items exist after JOB_COUNT_LIMIT |