mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix: backwards compatibility
This commit is contained in:
@@ -37378,6 +37378,12 @@
|
||||
"x-example": 0,
|
||||
"format": "int32"
|
||||
},
|
||||
"functionsStorageTotal": {
|
||||
"type": "integer",
|
||||
"description": "Total aggregated sum of functions storage size (in bytes).",
|
||||
"x-example": 0,
|
||||
"format": "int32"
|
||||
},
|
||||
"buildsStorageTotal": {
|
||||
"type": "integer",
|
||||
"description": "Total aggregated sum of builds storage size (in bytes).",
|
||||
@@ -37487,6 +37493,7 @@
|
||||
"databasesTotal",
|
||||
"usersTotal",
|
||||
"filesStorageTotal",
|
||||
"functionsStorageTotal",
|
||||
"buildsStorageTotal",
|
||||
"deploymentsStorageTotal",
|
||||
"bucketsTotal",
|
||||
|
||||
@@ -37378,6 +37378,12 @@
|
||||
"x-example": 0,
|
||||
"format": "int32"
|
||||
},
|
||||
"functionsStorageTotal": {
|
||||
"type": "integer",
|
||||
"description": "Total aggregated sum of functions storage size (in bytes).",
|
||||
"x-example": 0,
|
||||
"format": "int32"
|
||||
},
|
||||
"buildsStorageTotal": {
|
||||
"type": "integer",
|
||||
"description": "Total aggregated sum of builds storage size (in bytes).",
|
||||
@@ -37487,6 +37493,7 @@
|
||||
"databasesTotal",
|
||||
"usersTotal",
|
||||
"filesStorageTotal",
|
||||
"functionsStorageTotal",
|
||||
"buildsStorageTotal",
|
||||
"deploymentsStorageTotal",
|
||||
"bucketsTotal",
|
||||
|
||||
@@ -37933,6 +37933,12 @@
|
||||
"x-example": 0,
|
||||
"format": "int32"
|
||||
},
|
||||
"functionsStorageTotal": {
|
||||
"type": "integer",
|
||||
"description": "Total aggregated sum of functions storage size (in bytes).",
|
||||
"x-example": 0,
|
||||
"format": "int32"
|
||||
},
|
||||
"buildsStorageTotal": {
|
||||
"type": "integer",
|
||||
"description": "Total aggregated sum of builds storage size (in bytes).",
|
||||
@@ -38051,6 +38057,7 @@
|
||||
"databasesTotal",
|
||||
"usersTotal",
|
||||
"filesStorageTotal",
|
||||
"functionsStorageTotal",
|
||||
"buildsStorageTotal",
|
||||
"deploymentsStorageTotal",
|
||||
"bucketsTotal",
|
||||
|
||||
@@ -37933,6 +37933,12 @@
|
||||
"x-example": 0,
|
||||
"format": "int32"
|
||||
},
|
||||
"functionsStorageTotal": {
|
||||
"type": "integer",
|
||||
"description": "Total aggregated sum of functions storage size (in bytes).",
|
||||
"x-example": 0,
|
||||
"format": "int32"
|
||||
},
|
||||
"buildsStorageTotal": {
|
||||
"type": "integer",
|
||||
"description": "Total aggregated sum of builds storage size (in bytes).",
|
||||
@@ -38051,6 +38057,7 @@
|
||||
"databasesTotal",
|
||||
"usersTotal",
|
||||
"filesStorageTotal",
|
||||
"functionsStorageTotal",
|
||||
"buildsStorageTotal",
|
||||
"deploymentsStorageTotal",
|
||||
"bucketsTotal",
|
||||
|
||||
@@ -272,6 +272,7 @@ App::get('/v1/project/usage')
|
||||
'usersTotal' => $total[METRIC_USERS],
|
||||
'bucketsTotal' => $total[METRIC_BUCKETS],
|
||||
'filesStorageTotal' => $total[METRIC_FILES_STORAGE],
|
||||
'functionsStorageTotal' => $total[METRIC_DEPLOYMENTS_STORAGE] + $total[METRIC_BUILDS_STORAGE],
|
||||
'buildsStorageTotal' => $total[METRIC_BUILDS_STORAGE],
|
||||
'deploymentsStorageTotal' => $total[METRIC_DEPLOYMENTS_STORAGE],
|
||||
'executionsBreakdown' => $executionsBreakdown,
|
||||
|
||||
@@ -40,6 +40,12 @@ class UsageProject extends Model
|
||||
'default' => 0,
|
||||
'example' => 0,
|
||||
])
|
||||
->addRule('functionsStorageTotal', [
|
||||
'type' => self::TYPE_INTEGER,
|
||||
'description' => 'Total aggregated sum of functions storage size (in bytes).',
|
||||
'default' => 0,
|
||||
'example' => 0,
|
||||
])
|
||||
->addRule('buildsStorageTotal', [
|
||||
'type' => self::TYPE_INTEGER,
|
||||
'description' => 'Total aggregated sum of builds storage size (in bytes).',
|
||||
|
||||
@@ -143,7 +143,7 @@ class UsageTest extends Scope
|
||||
);
|
||||
|
||||
$this->assertEquals(200, $response['headers']['status-code']);
|
||||
$this->assertEquals(19, count($response['body']));
|
||||
$this->assertEquals(20, count($response['body']));
|
||||
$this->validateDates($response['body']['network']);
|
||||
$this->validateDates($response['body']['requests']);
|
||||
$this->validateDates($response['body']['users']);
|
||||
@@ -324,7 +324,7 @@ class UsageTest extends Scope
|
||||
]
|
||||
);
|
||||
|
||||
$this->assertEquals(19, count($response['body']));
|
||||
$this->assertEquals(20, count($response['body']));
|
||||
$this->assertEquals(1, count($response['body']['requests']));
|
||||
$this->assertEquals($requestsTotal, $response['body']['requests'][array_key_last($response['body']['requests'])]['value']);
|
||||
$this->validateDates($response['body']['requests']);
|
||||
@@ -545,7 +545,7 @@ class UsageTest extends Scope
|
||||
]
|
||||
);
|
||||
|
||||
$this->assertEquals(19, count($response['body']));
|
||||
$this->assertEquals(20, count($response['body']));
|
||||
$this->assertEquals(1, count($response['body']['requests']));
|
||||
$this->assertEquals(1, count($response['body']['network']));
|
||||
$this->assertEquals($requestsTotal, $response['body']['requests'][array_key_last($response['body']['requests'])]['value']);
|
||||
|
||||
Reference in New Issue
Block a user