mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Add backup size to backup table (#11365)
This commit is contained in:
parent
81faae6f74
commit
930c7e4afa
@ -119,7 +119,7 @@ export class HassioBackups extends LitElement {
|
||||
private _columns = memoizeOne(
|
||||
(narrow: boolean): DataTableColumnContainer => ({
|
||||
name: {
|
||||
title: this.supervisor?.localize("backup.name") || "",
|
||||
title: this.supervisor.localize("backup.name"),
|
||||
sortable: true,
|
||||
filterable: true,
|
||||
grows: true,
|
||||
@ -127,8 +127,16 @@ export class HassioBackups extends LitElement {
|
||||
html`${entry || backup.slug}
|
||||
<div class="secondary">${backup.secondary}</div>`,
|
||||
},
|
||||
size: {
|
||||
title: this.supervisor.localize("backup.size"),
|
||||
width: "15%",
|
||||
hidden: narrow,
|
||||
filterable: true,
|
||||
sortable: true,
|
||||
template: (entry: number) => Math.ceil(entry * 10) / 10 + " MB",
|
||||
},
|
||||
date: {
|
||||
title: this.supervisor?.localize("backup.created") || "",
|
||||
title: this.supervisor.localize("backup.created"),
|
||||
width: "15%",
|
||||
direction: "desc",
|
||||
hidden: narrow,
|
||||
@ -188,11 +196,11 @@ export class HassioBackups extends LitElement {
|
||||
slot="trigger"
|
||||
></ha-icon-button>
|
||||
<mwc-list-item>
|
||||
${this.supervisor?.localize("common.reload")}
|
||||
${this.supervisor.localize("common.reload")}
|
||||
</mwc-list-item>
|
||||
${atLeastVersion(this.hass.config.version, 0, 116)
|
||||
? html`<mwc-list-item>
|
||||
${this.supervisor?.localize("backup.upload_backup")}
|
||||
${this.supervisor.localize("backup.upload_backup")}
|
||||
</mwc-list-item>`
|
||||
: ""}
|
||||
</ha-button-menu>
|
||||
|
@ -20,6 +20,7 @@ export interface HassioBackup {
|
||||
slug: string;
|
||||
date: string;
|
||||
name: string;
|
||||
size: number;
|
||||
type: "full" | "partial";
|
||||
protected: boolean;
|
||||
content: BackupContent;
|
||||
|
@ -4445,6 +4445,7 @@
|
||||
"partial_backup": "Partial backup",
|
||||
"addons": "Add-ons",
|
||||
"folders": "Folders",
|
||||
"size": "Size",
|
||||
"password": "Backup password",
|
||||
"confirm_password": "Confirm backup password",
|
||||
"password_protection": "Password protection",
|
||||
|
Loading…
x
Reference in New Issue
Block a user