Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[viewer api] return storage consumption and limit separated by storage type #3430

Closed
antonkovalenko opened this issue Apr 3, 2024 · 4 comments
Assignees
Labels
area/ui UI/Embedded UI related issues

Comments

@antonkovalenko
Copy link
Member

No description provided.

@antonkovalenko antonkovalenko added the area/ui UI/Embedded UI related issues label Apr 3, 2024
@artemmufazalov
Copy link
Member

artemmufazalov commented Apr 3, 2024

endpoint: viewer/json/tenantinfo

We need following data:

  • SSD Blob storage - used and limit
  • HDD Blob storage - used and limit
  • SSD Tablet storage - used and limit
  • HDD Tablet storage - used and limit

Currently, we have following data structure from backend:

{
DatabaseQuotas: {
    "data_size_hard_quota": "53687091200" // Limit for tablet storage
},
Metrics: {
    "Storage": "3885878" // Tablet storage
},
StorageAllocatedSize: "12345", // Blob storage
StorageAllocatedLimit: "12345", // Blob storage limit
StorageUsage: [
    {
        "Type": "SSD",
        "Size": "12345", // SSD Blob storage
        "Limit": "12345", // SSD Blob storage limit
    },
    {
        "Type": "HDD"
    }
]
}

In the UI we check values, which are present and use them.

It will be better to have simplified structure, which could be used by UI without additional calculations:

{
"TabletStorage": [
     {
        "Type": "SSD",
        "Size": "12345", // SSD Tablet storage
        "Limit": "12345", // SSD Tablet storage limit (data_size_hard_quota)
    },
    {
        "Type": "HDD",
        "Size": "12345", // HDD Tablet storage
        "Limit": "12345", // HDD Tablet storage limit 
    },
],
"BlobStorage" : [
    {
        "Type": "SSD",
        "Size": "12345", // SSD Blob storage
        "Limit": "12345", // SSD Blob storage limit
    },
    {
        "Type": "HDD",
        "Size": "12345", // HDD Blob storage
        "Limit": "12345", // HDD Blob storage limit
    }
]
}

@StekPerepolnen
Copy link
Collaborator

#3463

@StekPerepolnen
Copy link
Collaborator

StekPerepolnen commented Apr 5, 2024

the final result looks like

{
"StorageUsage": [
     {
        "Type": "SSD",
        "Size": "12345", // SSD Blob storage
        "Limit": "12345", // SSD Blob storage limit
    },
    {
        "Type": "HDD"
    },
],
"QuotaUsage" : [
    {
        "Type": "SSD",
        "Size": "12345", // Tablet storage
        "Limit": "12345", // Tablet limit (data_size_hard_quota)
    },
    {
        "Type": "HDD"
    }
]
}

so, I've decided keep StorageUsage like before (there is no any change here)

@artemmufazalov
Copy link
Member

so, I've decided keep StorageUsage like before (there is no any change here)

Thanks, look great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui UI/Embedded UI related issues
Projects
None yet
Development

No branches or pull requests

3 participants