2020-01-07 21:07:50 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Types
|
|
|
|
class GrafanaIntegrationType < ::Types::BaseObject
|
|
|
|
graphql_name 'GrafanaIntegration'
|
|
|
|
|
|
|
|
authorize :admin_operations
|
|
|
|
|
|
|
|
field :id, GraphQL::ID_TYPE, null: false,
|
|
|
|
description: 'Internal ID of the Grafana integration'
|
|
|
|
field :grafana_url, GraphQL::STRING_TYPE, null: false,
|
2020-04-30 06:10:03 +00:00
|
|
|
description: 'URL for the Grafana host for the Grafana integration'
|
2020-01-07 21:07:50 +00:00
|
|
|
field :enabled, GraphQL::BOOLEAN_TYPE, null: false,
|
|
|
|
description: 'Indicates whether Grafana integration is enabled'
|
|
|
|
field :created_at, Types::TimeType, null: false,
|
|
|
|
description: 'Timestamp of the issue\'s creation'
|
|
|
|
field :updated_at, Types::TimeType, null: false,
|
|
|
|
description: 'Timestamp of the issue\'s last activity'
|
2020-01-30 21:08:47 +00:00
|
|
|
|
|
|
|
field :token, GraphQL::STRING_TYPE, null: false,
|
2020-04-06 03:09:23 +00:00
|
|
|
deprecated: { reason: 'Plain text token has been masked for security reasons', milestone: '12.7' },
|
2020-03-20 09:09:22 +00:00
|
|
|
description: 'API token for the Grafana integration'
|
2020-01-30 21:08:47 +00:00
|
|
|
|
|
|
|
def token
|
|
|
|
object.masked_token
|
|
|
|
end
|
2020-01-07 21:07:50 +00:00
|
|
|
end
|
|
|
|
end
|