mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
Merge pull request #9514 from appwrite/feat-domains-count
Feat: domains count
This commit is contained in:
commit
088d0998cd
2 changed files with 9 additions and 0 deletions
|
|
@ -221,6 +221,7 @@ const METRIC_TOPICS = 'topics';
|
|||
const METRIC_TARGETS = 'targets';
|
||||
const METRIC_PROVIDER_TYPE_TARGETS = '{providerType}.targets';
|
||||
const METRIC_KEYS = 'keys';
|
||||
const METRIC_DOMAINS = 'domains';
|
||||
const METRIC_RESOURCE_TYPE_ID_BUILDS = '{resourceType}.{resourceInternalId}.builds';
|
||||
const METRIC_RESOURCE_TYPE_ID_BUILDS_STORAGE = '{resourceType}.{resourceInternalId}.builds.storage';
|
||||
const METRIC_RESOURCE_TYPE_ID_DEPLOYMENTS = '{resourceType}.{resourceInternalId}.deployments';
|
||||
|
|
|
|||
|
|
@ -114,6 +114,13 @@ class StatsResources extends Action
|
|||
$keys = $dbForPlatform->count('keys', [
|
||||
Query::equal('projectInternalId', [$project->getInternalId()])
|
||||
]);
|
||||
|
||||
$domains = $dbForPlatform->count('rules', [
|
||||
Query::equal('projectInternalId', [$project->getInternalId()]),
|
||||
Query::equal('owner', ['']),
|
||||
]);
|
||||
|
||||
|
||||
$databases = $dbForProject->count('databases');
|
||||
$buckets = $dbForProject->count('buckets');
|
||||
$users = $dbForProject->count('users');
|
||||
|
|
@ -162,6 +169,7 @@ class StatsResources extends Action
|
|||
METRIC_PROVIDERS => $providers,
|
||||
METRIC_TOPICS => $topics,
|
||||
METRIC_KEYS => $keys,
|
||||
METRIC_DOMAINS => $domains,
|
||||
METRIC_TARGETS => $targets,
|
||||
str_replace('{providerType}', MESSAGE_TYPE_EMAIL, METRIC_PROVIDER_TYPE_TARGETS) => $emailTargets,
|
||||
str_replace('{providerType}', MESSAGE_TYPE_PUSH, METRIC_PROVIDER_TYPE_TARGETS) => $pushTargets,
|
||||
|
|
|
|||
Loading…
Reference in a new issue