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

Check integration with Wazuh API for available updates #6036

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion plugins/main/public/components/settings/about/appInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ export const SettingsAboutAppInfo = ({ appInfo }: SettingsAboutAppInfoProps) =>
const { ApisUpdateStatus } = getWazuhCheckUpdatesPlugin();

const showVersionWarning = !!apisAvailableUpdates?.find(
(apiAvailableUpdates) => apiAvailableUpdates.version !== appInfo['app-version']
(apiAvailableUpdates) =>
apiAvailableUpdates.current_version &&
apiAvailableUpdates.current_version.replace('v', '') !== appInfo['app-version']
);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ exports[`UpdatesNotification component should return null when there are no avai

exports[`UpdatesNotification component should return null when user already dismissed the notifications for available updates 1`] = `<div />`;

exports[`UpdatesNotification component should return null when user close notification 1`] = `<div />`;

exports[`UpdatesNotification component should return null when user dismissed notifications for future 1`] = `<div />`;

exports[`UpdatesNotification component should return the nofication component 1`] = `<div />`;
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const getApisUpdateStatusColumns = () => {
name,
width: '200px',
render: (lastUpdate: Update, api: ApiAvailableUpdates) =>
api.status !== API_UPDATES_STATUS.ERROR && lastUpdate ? (
api.status !== API_UPDATES_STATUS.ERROR && lastUpdate?.tag ? (
<UpdateBadge update={lastUpdate} />
) : null,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export const UpdatesNotification = () => {
</EuiFlexItem>
<EuiFlexItem grow={false} style={{ maxWidth: 'max-content' }}>
<EuiButtonEmpty
color="ghost"
href={getCore().http.basePath.prepend('/app/wazuh#/settings?tab=about')}
>
<FormattedMessage
Expand All @@ -120,10 +121,10 @@ export const UpdatesNotification = () => {
/>
</EuiFlexItem>
<EuiFlexItem grow={false} style={{ maxWidth: 'max-content' }}>
<EuiButton size="s" iconType="cross" onClick={() => handleOnClose()}>
<EuiButton fill size="s" iconType="cross" onClick={() => handleOnClose()}>
<FormattedMessage
id="wazuhCheckUpdates.updatesNotification.closeButtonText"
defaultMessage="Close"
defaultMessage="Dismiss"
/>
</EuiButton>
</EuiFlexItem>
Expand Down
2 changes: 1 addition & 1 deletion plugins/wazuh-check-updates/translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"wazuhCheckUpdates.updatesNotification.message": "New release is available!",
"wazuhCheckUpdates.updatesNotification.linkText": "Go to the about page for details",
"wazuhCheckUpdates.updatesNotification.dismissCheckText": "Disable updates notifications",
"wazuhCheckUpdates.updatesNotification.closeButtonText": "Close",
"wazuhCheckUpdates.updatesNotification.closeButtonText": "Dismiss",
"wazuhCheckUpdates.apisUpdateStatus.upToDate": "Up to date",
"wazuhCheckUpdates.apisUpdateStatus.availableUpdates": "Available updates",
"wazuhCheckUpdates.apisUpdateStatus.error": "Error checking updates",
Expand Down
Loading