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

Add progress and status for backup dashboard #23222

Merged
merged 3 commits into from
Dec 10, 2024

Conversation

piitaya
Copy link
Member

@piitaya piitaya commented Dec 9, 2024

Proposed change

Display progress and status in summary card in dashboard.
Fix display name issue in upload dialog.
Fix wrong property sent for core installation and custom backup

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@piitaya piitaya changed the title Backup manager state Add progress and status for backup dashboard Dec 9, 2024

const lastBackupDate = new Date(lastBackup.date);
const lastBackupPeriod = new Date().getTime() - lastBackupDate.getTime();
const numberOfDays = Math.floor(lastBackupPeriod / (1000 * 60 * 60 * 24));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the helper differenceInDays

@piitaya piitaya force-pushed the backup_manager_state branch from 5deaffa to 018afcd Compare December 10, 2024 09:45
@piitaya piitaya force-pushed the backup_manager_state branch from daca203 to 49cf19d Compare December 10, 2024 10:03
@piitaya piitaya merged commit f8de9dd into allthebackupchanges Dec 10, 2024
3 checks passed
@piitaya piitaya deleted the backup_manager_state branch December 10, 2024 10:07
piitaya added a commit that referenced this pull request Dec 11, 2024
* Add dialog to upload a backup file (#22405)

* Add dialog to upload a backup file

* Prosess feedback

* Remoe unused definition

* Early pushout of changes to the backup panel (#22321)

* Eary pushout of changes to the backup panel

* Add location icons

* Path is optional

* Set backupSlug from route

* No need for subscription mixin

* update

* Reorder

* init details

* Fix import

* Improve backup screen and navigation (#22827)

* Add location page

* Start dashboard

* Move list to dashboard

* Add mocked config page

* Fix hardcoded boolean

* Add summary card

* Use new format for BackupAgent

* Use new API

* Rename to ha-backup-summary-card

* Use new api

* Fix backup agents

* Rename backup slug to backup id (#22876)

* Add delete backup action to datatable (#22867)

* Create generate backup dialog (#22866)

Co-authored-by: Bram Kragten <[email protected]>

* Add backup details page (#22884)

* Add new backup dialog to choose between automatic and manual (#22895)

Co-authored-by: Simon Lamon <[email protected]>

* Improve download backup (#22905)

* Rename remove to delete in backup websocket type (#22902)

* Use bytes for backup size (#22909)

* Use default backup instead of automatic backup (#22915)

* Update generate backup api (#22943)

Use new backup api for generate backup

* Improve details page for new backup (#22946)

* Add content of backup in detail page

* Add restore button

* Add note

* Use disabled

* Fix backup generate

* Use options to WS command backup/restore (#22950)

* Add addons picker in generate backup dialog (#22951)

* Add addons picker in generate backup dialog

* Change condition

* Fix label

* Fix local addons

* Review

* Add local addon in addon mode is all

* Fix local addon folder

* Use addon picker inside data picker

* Fetch addons info in detail page

* Fetch addon inside component

* Rename agents picker

* Restrict generate backup content for core backup (#22958)

* Fix addon mode all

* Use event to check if a backup is in progress (#22960)

* Use event to check if a backup is in progress

* Update src/panels/config/backup/ha-config-backup-dashboard.ts

Co-authored-by: Bram Kragten <[email protected]>

---------

Co-authored-by: Bram Kragten <[email protected]>

* Force enable home assistant settings when history is selected in backup (#22961)

* Backup default config (#22954)

* WIP default config

* Add addons

* save data

* add icon

* basics of change encryption key

* Update dialog-change-backup-password.ts

* use default config when manually triggering default backup

* limit to hassio

* enforce encryption key, manual use manual one

* Update ha-config-backup-dashboard.ts

* Add suggested password and copy buttons

* Add download emergency kit button

* review

* fix

* Update ha-config-backup-default-config.ts

* Update ha-config-backup-default-config.ts

* Update default backup settings (#23109)

* Only display addons and folder for hassio (#23118)

* Use new backup dashboard page for hassio backup (#23161)

* Add support for copies and days for backup retention (#23128)

* Add upload dialog for backup (#23139)

* Improve generate backup dialog (#23167)

* Propose to use encryption key if available when restoring a backup (#23164)

Co-authored-by: Bram Kragten <[email protected]>

* Add encryption key onboarding (#23180)

* Fix attributes broken by the warning fixes (#23182)

* Don't allow any more eslint warnings (#23181)

* Use dedicated endpoint to generate backup with default settings (#23224)

* Add onboarding dialog for backups (#23225)

* Add onboarding flow for backups

* Add welcome screen

* Add progress and status for backup dashboard (#23222)

* Handle backup state

* Add summary card

* Use difference in days

* Rename local backups and show icon (#23238)

* Improve backup onboarding (#23241)

* Do not navigate to config page after onboarding

* Use casita image and center text

* fix lint

* Rename stored and default to strategy backup

* Update

* Fix icon and add type in datatable

* Use strategy in more places

* Fix list item overflow

---------

Co-authored-by: Joakim Sørensen <[email protected]>
Co-authored-by: Bram Kragten <[email protected]>
Co-authored-by: Simon Lamon <[email protected]>
Co-authored-by: Petar Petrov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants