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

Update Storybook Stories for AvailableSoftwareUpdates #2857

Merged
merged 1 commit into from
Aug 6, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,12 @@ export default {
type: 'function',
},
},
softwareUpdatesSettingsLoading: {
loading: {
control: {
type: 'boolean',
},
description: 'are software updates settings being fetched?',
},
softwareUpdatesLoading: {
control: {
type: 'boolean',
},
description: 'are software updates being fetched?',
},
relevantPatches: {
type: 'number',
description: 'Number of relevant patches available for the system',
Expand Down Expand Up @@ -82,17 +76,14 @@ export const Cool = {

export const NoSettingsConfigured = { args: { settingsConfigured: false } };

export const SoftwareUpdateSettingsLoading = {
args: { softwareUpdatesSettingsLoading: true },
};

export const SoftwareUpdatesLoading = {
args: { settingsConfigured: true, softwareUpdatesLoading: true },
export const Loading = {
args: { settingsConfigured: true, loading: true },
};

export const Unknown = {
export const Error = {
args: {
settingsConfigured: true,
tooltip: 'Trento was not able to retrieve the requested data',
errorMessage: 'Connection to SUMA not working',
tooltip: 'Please review SUSE Manager settings',
},
};
7 changes: 5 additions & 2 deletions assets/js/pages/HostDetailsPage/HostDetails.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ export const WithSuseManager = {
args: {
...Default.args,
suseManagerEnabled: true,
softwareUpdatesSettingsSaved: true,
softwareUpdatesLoading: false,
relevantPatches: 123,
upgradablePackages: 456,
},
Expand All @@ -306,9 +308,10 @@ export const SuseManagerUnknown = {
args: {
...Default.args,
suseManagerEnabled: true,
softwareUpdatesSettingsSaved: true,
relevantPatches: undefined,
upgradablePackages: undefined,
softwareUpdatesTooltip:
'SUSE Manager was not able to retrieve the requested data',
softwareUpdatesErrorMessage: 'Connection to SUMA not working',
softwareUpdatesTooltip: 'Please review SUSE Manager settings',
},
};
Loading