-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat(ui): display storage usage #1929
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM
<p className="font-bold"> | ||
Storage Usage | ||
</p> | ||
<p className="text-sm text-muted-foreground">Disk space used by Tabby</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -47,6 +62,15 @@ export default function Workers() { | |||
|
|||
if (!healthInfo) return | |||
|
|||
// TODO: mock data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// TODO: mock data | |
// FIXME(wwayne): connect with backend api |
@@ -47,6 +62,15 @@ export default function Workers() { | |||
|
|||
if (!healthInfo) return | |||
|
|||
// TODO: mock data | |||
const usageData = [ | |||
{ name: "Models", usage: 1024 * 1024 * 1024 * 1.1, color: "#0088FE", folders: ["~/.tabby/models"] }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove folders hover for now to simplify backend api
Please also fix CI |
@@ -47,6 +62,15 @@ export default function Workers() { | |||
|
|||
if (!healthInfo) return | |||
|
|||
// TODO: mock data | |||
const usageData = [ | |||
{ name: "Models", usage: 1024 * 1024 * 1024 * 1.1, color: "#0088FE", folders: ["~/.tabby/models"] }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ name: "Models", usage: 1024 * 1024 * 1024 * 1.1, color: "#0088FE", folders: ["~/.tabby/models"] }, | |
{ name: "Model Cache", usage: 1024 * 1024 * 1024 * 1.1, color: "#0088FE", folders: ["~/.tabby/models"] }, |
// TODO: mock data | ||
const usageData = [ | ||
{ name: "Models", usage: 1024 * 1024 * 1024 * 1.1, color: "#0088FE", folders: ["~/.tabby/models"] }, | ||
{ name: "Repository data", usage: 1024 * 1024 * 2.1, color: "#00C49F", folders: ["~/.tabby/dataset", "~/.tabby/index"] }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ name: "Repository data", usage: 1024 * 1024 * 2.1, color: "#00C49F", folders: ["~/.tabby/dataset", "~/.tabby/index"] }, | |
{ name: "Repository Context", usage: 1024 * 1024 * 2.1, color: "#00C49F", folders: ["~/.tabby/dataset", "~/.tabby/index"] }, |
const usageData = [ | ||
{ name: "Models", usage: 1024 * 1024 * 1024 * 1.1, color: "#0088FE", folders: ["~/.tabby/models"] }, | ||
{ name: "Repository data", usage: 1024 * 1024 * 2.1, color: "#00C49F", folders: ["~/.tabby/dataset", "~/.tabby/index"] }, | ||
{ name: "Database", usage: 1024 * 85, color: "#FFBB28", folders: ["~/.tabby/ee"] }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ name: "Database", usage: 1024 * 85, color: "#FFBB28", folders: ["~/.tabby/ee"] }, | |
{ name: "Other", usage: 1024 * 85, color: "#FFBB28", folders: ["~/.tabby/ee"] }, |
{ name: "Models", usage: 1024 * 1024 * 1024 * 1.1, color: "#0088FE", folders: ["~/.tabby/models"] }, | ||
{ name: "Repository data", usage: 1024 * 1024 * 2.1, color: "#00C49F", folders: ["~/.tabby/dataset", "~/.tabby/index"] }, | ||
{ name: "Database", usage: 1024 * 85, color: "#FFBB28", folders: ["~/.tabby/ee"] }, | ||
{ name: "Events", usage: 1024 * 1200 * 11, color: "#FF8042", folders: ["~/.tabby/events"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ name: "Events", usage: 1024 * 1200 * 11, color: "#FF8042", folders: ["~/.tabby/events"] } | |
{ name: "Event Logs", usage: 1024 * 1200 * 11, color: "#FF8042", folders: ["~/.tabby/events"] } |
fill={theme === 'dark' ? '#FDFDFD' : '#030302'} | ||
className="text-sm" | ||
> | ||
Total Usuage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Total Usuage | |
Total Usage |
da64b6e
to
9660038
Compare
84531de
to
5c378ff
Compare
5c378ff
to
84da66e
Compare
Notable changes
We already have pretty-bytes. Why import a new library bytes?
Pretty-bytes cannot convert the size data correctly. The reason should be:
Note that it uses base-10 (e.g. kilobyte)
from pretty-bytes READMEScreen record: https://jam.dev/c/649c3857-52e5-4c46-9181-4addaa75b2e7
fix TAB-616