mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
chore: update naming
This commit is contained in:
@@ -1894,7 +1894,7 @@ App::get('/v1/storage/:bucketId/usage')
|
||||
$metrics = [
|
||||
str_replace('{bucketInternalId}', $bucket->getInternalId(), METRIC_BUCKET_ID_FILES),
|
||||
str_replace('{bucketInternalId}', $bucket->getInternalId(), METRIC_BUCKET_ID_FILES_STORAGE),
|
||||
str_replace('{bucketInternalId}', $bucket->getInternalId(), METRIC_FILES_TRANSFORMATIONS),
|
||||
str_replace('{bucketInternalId}', $bucket->getInternalId(), METRIC_FILES_IMAGES_TRANSFORMED),
|
||||
];
|
||||
|
||||
|
||||
@@ -1949,7 +1949,7 @@ App::get('/v1/storage/:bucketId/usage')
|
||||
'filesStorageTotal' => $usage[$metrics[1]]['total'],
|
||||
'files' => $usage[$metrics[0]]['data'],
|
||||
'storage' => $usage[$metrics[1]]['data'],
|
||||
'fileTransformations' => $usage[$metrics[2]]['data'],
|
||||
'fileTransformationsTotal' => $usage[$metrics[2]]['total'],
|
||||
'imageTransformations' => $usage[$metrics[2]]['data'],
|
||||
'imageTransformationsTotal' => $usage[$metrics[2]]['total'],
|
||||
]), Response::MODEL_USAGE_BUCKETS);
|
||||
});
|
||||
|
||||
@@ -42,14 +42,14 @@ class UsageBuckets extends Model
|
||||
'example' => [],
|
||||
'array' => true
|
||||
])
|
||||
->addRule('fileTransformations', [
|
||||
->addRule('imageTransformations', [
|
||||
'type' => Response::MODEL_METRIC,
|
||||
'description' => 'Aggregated number of files transformations per period.',
|
||||
'default' => [],
|
||||
'example' => [],
|
||||
'array' => true
|
||||
])
|
||||
->addRule('fileTransformationsTotal', [
|
||||
->addRule('imageTransformationsTotal', [
|
||||
'type' => self::TYPE_INTEGER,
|
||||
'description' => 'Total aggregated number of files transformations.',
|
||||
'default' => 0,
|
||||
|
||||
@@ -104,7 +104,7 @@ class StorageConsoleClientTest extends Scope
|
||||
$this->assertIsNumeric($response['body']['filesStorageTotal']);
|
||||
$this->assertIsArray($response['body']['files']);
|
||||
$this->assertIsArray($response['body']['storage']);
|
||||
$this->assertIsArray($response['body']['fileTransformations']);
|
||||
$this->assertIsNumeric($response['body']['fileTransformationsTotal']);
|
||||
$this->assertIsArray($response['body']['imageTransformations']);
|
||||
$this->assertIsNumeric($response['body']['imageTransformationsTotal']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user