diff --git a/src/components/panels/Machine/UpdatePanel/Entry.vue b/src/components/panels/Machine/UpdatePanel/Entry.vue
index 707199e96..1ea5d2859 100644
--- a/src/components/panels/Machine/UpdatePanel/Entry.vue
+++ b/src/components/panels/Machine/UpdatePanel/Entry.vue
@@ -19,7 +19,17 @@
{{ versionOutput }}
-
+
+ {{ mdiInformation }}
+
+
-
-
+
+
{{ mdiReload }}
{{ $t('Machine.UpdatePanel.SoftRecovery') }}
-
-
+
+
{{ mdiReload }}
@@ -70,36 +80,30 @@
-
-
-
- {{ notificationText }}
-
-
-
-
+
+ color="orange"
+ :icon="mdiCloseCircle">
{{ message }}
-
+
+ color="info"
+ :icon="mdiInformation">
{{ message }}
@@ -123,7 +127,7 @@ import { Component, Mixins, Prop } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import { ServerUpdateManagerStateGitRepo } from '@/store/server/updateManager/types'
import {
- mdiAlertCircle,
+ mdiCloseCircle,
mdiCheck,
mdiHelpCircleOutline,
mdiInformation,
@@ -141,11 +145,13 @@ export default class UpdatePanelEntry extends Mixins(BaseMixin) {
mdiInformation = mdiInformation
mdiMenuDown = mdiMenuDown
mdiReload = mdiReload
- mdiAlertCircle = mdiAlertCircle
+ mdiCloseCircle = mdiCloseCircle
boolShowCommitList = false
boolShowUpdateHint = false
+ toggleAnomalies = false
+
@Prop({ required: true }) readonly repo!: ServerUpdateManagerStateGitRepo
get name() {
@@ -230,6 +236,10 @@ export default class UpdatePanelEntry extends Mixins(BaseMixin) {
return this.repo.is_dirty ?? false
}
+ get isCorrupt() {
+ return this.repo.corrupt ?? false
+ }
+
get debugEnabled() {
return this.repo.debug_enabled ?? false
}
@@ -240,19 +250,21 @@ export default class UpdatePanelEntry extends Mixins(BaseMixin) {
return !this.debugEnabled && (this.repo.detached ?? false)
}
- get needsRecovery() {
- return !this.isValid || this.isDirty
+ get existsRecoveryUrl() {
+ const url = this.repo.recovery_url ?? '?'
+
+ return url !== '?'
}
get btnDisabled() {
if (['printing', 'paused'].includes(this.printer_state)) return true
- if (!this.isValid || this.isDirty || this.commitsBehind.length) return false
+ if (!this.isValid || this.isCorrupt || this.isDirty || this.commitsBehind.length) return false
return !(this.localVersion && this.remoteVersion && semver.gt(this.remoteVersion, this.localVersion))
}
get btnIcon() {
- if (this.isDetached || !this.isValid || this.isDirty) return mdiAlertCircle
+ if (this.isDetached || !this.isValid || this.isCorrupt || this.isDirty) return mdiCloseCircle
if (
this.commitsBehind.length ||
@@ -266,8 +278,7 @@ export default class UpdatePanelEntry extends Mixins(BaseMixin) {
}
get btnColor() {
- if (this.isDetached || !this.isValid) return 'orange'
- if (this.isDirty) return 'red'
+ if (this.isCorrupt || this.isDetached || this.isDirty || !this.isValid) return 'orange'
if (
this.commitsBehind.length ||
@@ -279,9 +290,10 @@ export default class UpdatePanelEntry extends Mixins(BaseMixin) {
}
get btnText() {
+ if (this.isCorrupt) return this.$t('Machine.UpdatePanel.Corrupt')
if (this.isDetached) return this.$t('Machine.UpdatePanel.Detached')
- if (!this.isValid) return this.$t('Machine.UpdatePanel.Invalid')
if (this.isDirty) return this.$t('Machine.UpdatePanel.Dirty')
+ if (!this.isValid) return this.$t('Machine.UpdatePanel.Invalid')
if (
this.commitsBehind.length ||
(this.localVersion && this.remoteVersion && semver.gt(this.remoteVersion, this.localVersion))
@@ -293,23 +305,8 @@ export default class UpdatePanelEntry extends Mixins(BaseMixin) {
return this.$t('Machine.UpdatePanel.UpToDate')
}
- get notificationText() {
- if (this.isDetached) return this.$t('Machine.UpdatePanel.Notification.Detached')
- if (this.isDirty) return this.$t('Machine.UpdatePanel.Notification.Dirty')
-
- return null
- }
-
- get notificationColor() {
- return this.btnColor
- }
-
- get notificationIcon() {
- return this.btnIcon
- }
-
- get gitMessages() {
- return this.repo.git_messages ?? []
+ get anomalies() {
+ return this.repo.anomalies ?? []
}
get warnings() {
@@ -323,8 +320,12 @@ export default class UpdatePanelEntry extends Mixins(BaseMixin) {
return semver.gt(this.remoteVersion, this.localVersion)
}
+ get repo_name() {
+ return this.repo.repo_name ?? this.repo.name ?? ''
+ }
+
get webLinkRelease() {
- return `https://github.com/${this.repo.owner}/${this.repo.name}/releases/tag/${this.repo.remote_version}`
+ return `https://github.com/${this.repo.owner}/${this.repo_name}/releases/tag/${this.repo.remote_version}`
}
get hideUpdateWarning() {
diff --git a/src/components/panels/Machine/UpdatePanel/GitCommitsListDayCommit.vue b/src/components/panels/Machine/UpdatePanel/GitCommitsListDayCommit.vue
index 47df5d42e..7fcde9471 100644
--- a/src/components/panels/Machine/UpdatePanel/GitCommitsListDayCommit.vue
+++ b/src/components/panels/Machine/UpdatePanel/GitCommitsListDayCommit.vue
@@ -85,8 +85,12 @@ export default class GitCommitsListDayCommit extends Mixins(BaseMixin) {
})
}
+ get repo_name() {
+ return this.repo.repo_name ?? this.repo.name ?? ''
+ }
+
get commitHref() {
- return `https://github.com/${this.repo.owner}/${this.repo.name}/commit/${this.commit.sha}`
+ return `https://github.com/${this.repo.owner}/${this.repo_name}/commit/${this.commit.sha}`
}
get commitShortSha() {
diff --git a/src/components/panels/Machine/UpdatePanel/UpdateHintAlert.vue b/src/components/panels/Machine/UpdatePanel/UpdateHintAlert.vue
index 15a38f9e1..97c15c621 100644
--- a/src/components/panels/Machine/UpdatePanel/UpdateHintAlert.vue
+++ b/src/components/panels/Machine/UpdatePanel/UpdateHintAlert.vue
@@ -69,13 +69,17 @@ export default class UpdateHintAlert extends Mixins(BaseMixin) {
return null
}
+ get repo_name() {
+ return this.repo.repo_name ?? this.repo.name ?? ''
+ }
+
get externalLink() {
if (this.name === 'klipper') return '//www.klipper3d.org/Config_Changes.html'
if (this.name === 'moonraker') return '//moonraker.readthedocs.io/en/latest/changelog/'
if (this.repo?.configured_type === 'web')
- return `//github.com/${this.repo.owner}/${this.repo.name}/releases/tag/${this.repo.remote_version}`
+ return `//github.com/${this.repo.owner}/${this.repo_name}/releases/tag/${this.repo.remote_version}`
- return `//github.com/${this.repo.owner}/${this.repo.name}`
+ return `//github.com/${this.repo.owner}/${this.repo_name}`
}
get externalLinkText() {
diff --git a/src/locales/en.json b/src/locales/en.json
index 86d442965..bdaef0320 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -490,6 +490,7 @@
"CommittedHoursAgo": "committed {hours} hours ago",
"CommittedOnDate": "committed on {date}",
"CommittedYesterday": "committed yesterday",
+ "Corrupt": "corrupt",
"ConfigChanges": "Config Changes",
"CountPackagesCanBeUpgraded": "{count} packages can be upgraded",
"Detached": "detached",
diff --git a/src/store/server/updateManager/types.ts b/src/store/server/updateManager/types.ts
index 3d51e40a8..91dfbe121 100644
--- a/src/store/server/updateManager/types.ts
+++ b/src/store/server/updateManager/types.ts
@@ -32,6 +32,7 @@ export interface ServerUpdateManagerStateGitRepoCommit {
export interface ServerUpdateManagerStateGitRepo {
name: string
+ repo_name?: string
configured_type: string
detected_type?: string
channel?: string
@@ -47,12 +48,15 @@ export interface ServerUpdateManagerStateGitRepo {
remote_hash?: string
is_valid?: boolean
is_dirty?: boolean
+ corrupt?: boolean
detached?: boolean
debug_enabled?: boolean
commits_behind?: ServerUpdateManagerStateGitRepoCommit[]
git_messages?: string[]
+ anomalies?: string[]
warnings?: string[]
info_tags?: string[]
+ recovery_url?: string
}
export interface ServerUpdateManagerStateGitRepoGroupedCommits {