2019-09-04 21:01:54 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Types
|
|
|
|
class ProjectStatisticsType < BaseObject
|
|
|
|
graphql_name 'ProjectStatistics'
|
|
|
|
|
|
|
|
authorize :read_statistics
|
|
|
|
|
2020-04-22 19:07:51 +05:30
|
|
|
field :commit_count, GraphQL::FLOAT_TYPE, null: false,
|
2021-03-11 19:13:27 +05:30
|
|
|
description: 'Commit count of the project.'
|
2019-09-04 21:01:54 +05:30
|
|
|
|
2020-04-22 19:07:51 +05:30
|
|
|
field :storage_size, GraphQL::FLOAT_TYPE, null: false,
|
2021-03-11 19:13:27 +05:30
|
|
|
description: 'Storage size of the project in bytes.'
|
2020-04-22 19:07:51 +05:30
|
|
|
field :repository_size, GraphQL::FLOAT_TYPE, null: false,
|
2021-03-11 19:13:27 +05:30
|
|
|
description: 'Repository size of the project in bytes.'
|
2020-04-22 19:07:51 +05:30
|
|
|
field :lfs_objects_size, GraphQL::FLOAT_TYPE, null: false,
|
2021-03-11 19:13:27 +05:30
|
|
|
description: 'Large File Storage (LFS) object size of the project in bytes.'
|
2020-04-22 19:07:51 +05:30
|
|
|
field :build_artifacts_size, GraphQL::FLOAT_TYPE, null: false,
|
2021-03-11 19:13:27 +05:30
|
|
|
description: 'Build artifacts size of the project in bytes.'
|
2020-04-22 19:07:51 +05:30
|
|
|
field :packages_size, GraphQL::FLOAT_TYPE, null: false,
|
2021-03-11 19:13:27 +05:30
|
|
|
description: 'Packages size of the project in bytes.'
|
2020-04-22 19:07:51 +05:30
|
|
|
field :wiki_size, GraphQL::FLOAT_TYPE, null: true,
|
2021-03-11 19:13:27 +05:30
|
|
|
description: 'Wiki size of the project in bytes.'
|
2020-07-28 23:09:34 +05:30
|
|
|
field :snippets_size, GraphQL::FLOAT_TYPE, null: true,
|
2021-03-11 19:13:27 +05:30
|
|
|
description: 'Snippets size of the project in bytes.'
|
2021-01-29 00:20:46 +05:30
|
|
|
field :uploads_size, GraphQL::FLOAT_TYPE, null: true,
|
2021-03-11 19:13:27 +05:30
|
|
|
description: 'Uploads size of the project in bytes.'
|
2019-09-04 21:01:54 +05:30
|
|
|
end
|
|
|
|
end
|