Commit 98212ac7 authored by Nicolas Dular's avatar Nicolas Dular

Expose temporary storage increase end date

This adds the temporary storage increase end date to the GraphQL
API. This field will be used to show how long and if the temporary
storage is active.
parent 93e2eb5b
......@@ -5298,6 +5298,11 @@ type Group {
"""
subgroupCreationLevel: String
"""
Date until the temporary storage increase is active
"""
temporaryStorageIncreaseEndsOn: Time
"""
Time logged in issues by group members
"""
......@@ -8194,6 +8199,11 @@ type Namespace {
"""
storageSizeLimit: Float
"""
Date until the temporary storage increase is active
"""
temporaryStorageIncreaseEndsOn: Time
"""
Visibility of the namespace
"""
......
......@@ -14585,6 +14585,20 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "temporaryStorageIncreaseEndsOn",
"description": "Date until the temporary storage increase is active",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "Time",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "timelogs",
"description": "Time logged in issues by group members",
......@@ -24409,6 +24423,20 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "temporaryStorageIncreaseEndsOn",
"description": "Date until the temporary storage increase is active",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "Time",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "visibility",
"description": "Visibility of the namespace",
......@@ -818,6 +818,7 @@ Autogenerated return type of EpicTreeReorder
| `shareWithGroupLock` | Boolean | Indicates if sharing a project with another group within this group is prevented |
| `storageSizeLimit` | Float | Total storage limit of the root namespace in bytes |
| `subgroupCreationLevel` | String | The permission level required to create subgroups within the group |
| `temporaryStorageIncreaseEndsOn` | Time | Date until the temporary storage increase is active |
| `twoFactorGracePeriod` | Int | Time before two-factor authentication is enforced |
| `userPermissions` | GroupPermissions! | Permissions for the current user on the resource |
| `visibility` | String | Visibility of the namespace |
......@@ -1253,6 +1254,7 @@ Contains statistics about a milestone
| `requestAccessEnabled` | Boolean | Indicates if users can request access to namespace |
| `rootStorageStatistics` | RootStorageStatistics | Aggregated storage statistics of the namespace. Only available for root namespaces |
| `storageSizeLimit` | Float | Total storage limit of the root namespace in bytes |
| `temporaryStorageIncreaseEndsOn` | Time | Date until the temporary storage increase is active |
| `visibility` | String | Visibility of the namespace |
## Note
......
......@@ -7,9 +7,15 @@ module EE
prepended do
field :storage_size_limit,
GraphQL::FLOAT_TYPE, null: true,
GraphQL::FLOAT_TYPE,
null: true,
description: 'Total storage limit of the root namespace in bytes',
resolve: -> (obj, _args, _ctx) { EE::Namespace::RootStorageSize.new(obj).limit }
field :temporary_storage_increase_ends_on,
::Types::TimeType,
null: true,
description: 'Date until the temporary storage increase is active'
end
end
end
......
......@@ -50,6 +50,7 @@ module EE
delegate :additional_purchased_storage_size, :additional_purchased_storage_size=,
:additional_purchased_storage_ends_on, :additional_purchased_storage_ends_on=,
:temporary_storage_increase_ends_on,
to: :namespace_limit, allow_nil: true
delegate :email, to: :owner, allow_nil: true, prefix: true
......
---
title: Expose temporary storage increase end date in api
merge_request: 36495
author:
type: added
......@@ -3,5 +3,9 @@
require 'spec_helper'
RSpec.describe GitlabSchema.types['Namespace'] do
it { expect(described_class).to have_graphql_field(:storage_size_limit) }
it 'has specific fields' do
expected_fields = %w[storage_size_limit temporary_storage_increase_ends_on]
expect(described_class).to include_graphql_fields(*expected_fields)
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment