diff --git a/webui/src/app/version.service.ts b/webui/src/app/version.service.ts index 400dd41b..02858576 100644 --- a/webui/src/app/version.service.ts +++ b/webui/src/app/version.service.ts @@ -586,20 +586,23 @@ export class VersionService { * @private */ private checkStorkServerUpdates(data: AppsVersions): void { - if (!this._storkServerVersion) { + if (!this.sanitizeSemver(this._storkServerVersion)) { return } const serverFeedback = this.getSoftwareVersionFeedback(this._storkServerVersion, 'stork', data) const updateType = serverFeedback.severity === Severity.error ? 'security update' : 'update' - serverFeedback.messages = [ - !!serverFeedback.update - ? `Stork server ${updateType} is available (${serverFeedback.update}).` - : `Stork server is up-to-date.`, - ] this._serverUpdateNotification$.next({ available: !!serverFeedback.update, - feedback: serverFeedback, + feedback: { + severity: serverFeedback.severity, + update: serverFeedback.update || '', + messages: [ + !!serverFeedback.update + ? `Stork server ${updateType} is available (${serverFeedback.update}).` + : `Stork server is up-to-date.`, + ], + }, }) this.detectAlertingSeverity(serverFeedback?.severity ?? Severity.success) }