-
- Downloads
Expose namespace storage statistics with GraphQL
Root namespaces have storage statistics. This commit allows namespace owners to get those stats via GraphQL queries like the following one { namespace(fullPath: "a_namespace_path") { rootStorageStatistics { storageSize repositorySize lfsObjectsSize buildArtifactsSize packagesSize wikiSize } } }
Showing
- app/graphql/types/namespace_type.rb 5 additions, 0 deletionsapp/graphql/types/namespace_type.rb
- app/graphql/types/root_storage_statistics_type.rb 16 additions, 0 deletionsapp/graphql/types/root_storage_statistics_type.rb
- app/models/namespace/root_storage_statistics.rb 2 additions, 0 deletionsapp/models/namespace/root_storage_statistics.rb
- app/policies/group_policy.rb 2 additions, 0 deletionsapp/policies/group_policy.rb
- app/policies/namespace/root_storage_statistics_policy.rb 5 additions, 0 deletionsapp/policies/namespace/root_storage_statistics_policy.rb
- app/policies/namespace_policy.rb 1 addition, 0 deletionsapp/policies/namespace_policy.rb
- changelogs/unreleased/ac-graphql-root-namespace-stats.yml 5 additions, 0 deletionschangelogs/unreleased/ac-graphql-root-namespace-stats.yml
- doc/api/graphql/reference/index.md 12 additions, 0 deletionsdoc/api/graphql/reference/index.md
- lib/gitlab/graphql/loaders/batch_root_storage_statistics_loader.rb 23 additions, 0 deletions...b/graphql/loaders/batch_root_storage_statistics_loader.rb
- spec/graphql/types/namespace_type_spec.rb 1 addition, 1 deletionspec/graphql/types/namespace_type_spec.rb
- spec/graphql/types/root_storage_statistics_type_spec.rb 14 additions, 0 deletionsspec/graphql/types/root_storage_statistics_type_spec.rb
- spec/lib/gitlab/graphql/loaders/batch_root_storage_statistics_loader_spec.rb 18 additions, 0 deletions...phql/loaders/batch_root_storage_statistics_loader_spec.rb
- spec/models/namespace/root_storage_statistics_spec.rb 13 additions, 0 deletionsspec/models/namespace/root_storage_statistics_spec.rb
- spec/policies/namespace/root_storage_statistics_policy_spec.rb 80 additions, 0 deletions...policies/namespace/root_storage_statistics_policy_spec.rb
- spec/policies/namespace_policy_spec.rb 1 addition, 1 deletionspec/policies/namespace_policy_spec.rb
- spec/requests/api/graphql/namespace/root_storage_statistics_spec.rb 55 additions, 0 deletions...sts/api/graphql/namespace/root_storage_statistics_spec.rb
- spec/requests/api/graphql/project/project_statistics_spec.rb 1 addition, 1 deletionspec/requests/api/graphql/project/project_statistics_spec.rb
- spec/support/shared_contexts/policies/group_policy_shared_context.rb 2 additions, 1 deletion...t/shared_contexts/policies/group_policy_shared_context.rb
Please register or sign in to comment