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