Skip to content

Commit

Permalink
nodes-added-pdiskid-filter
Browse files Browse the repository at this point in the history
  • Loading branch information
StekPerepolnen committed Apr 10, 2024
1 parent 77c6779 commit 94ed60c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ydb/core/viewer/json_tenantinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -628,13 +628,23 @@ class TJsonTenantInfo : public TViewerPipeClient<TJsonTenantInfo> {
tenant.SetStorageAllocatedLimit(storageAllocatedLimit);
tenant.SetStorageMinAvailableSize(storageMinAvailableSize);
tenant.SetStorageGroups(storageGroups);

auto& ssdUsage = *tenant.AddStorageUsage();
ssdUsage.SetType(NKikimrViewer::TStorageUsage::SSD);
ssdUsage.SetSize(storageAllocatedSize);
ssdUsage.SetLimit(storageAllocatedLimit);
// TODO(andrew-rykov)
auto& hddUsage = *tenant.AddStorageUsage();
hddUsage.SetType(NKikimrViewer::TStorageUsage::HDD);

if (tenant.databasequotas().data_size_hard_quota()) {
auto& ssdQuotaUsage = *tenant.AddQuotaUsage();
ssdQuotaUsage.SetType(NKikimrViewer::TStorageUsage::SSD);
ssdQuotaUsage.SetSize(tenant.GetMetrics().GetStorage());
ssdQuotaUsage.SetLimit(tenant.databasequotas().data_size_hard_quota());
auto& hddQuotaUsage = *tenant.AddQuotaUsage();
hddQuotaUsage.SetType(NKikimrViewer::TStorageUsage::HDD);
}
}
}

Expand Down
1 change: 1 addition & 0 deletions ydb/core/viewer/protos/viewer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ message TTenant {
uint64 StorageAllocatedLimit = 41;
Ydb.Cms.DatabaseQuotas DatabaseQuotas = 42;
repeated TStorageUsage StorageUsage = 43;
repeated TStorageUsage QuotaUsage = 44;
}

message TTenants {
Expand Down

0 comments on commit 94ed60c

Please sign in to comment.