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

CP 3.9 Fixes #36966, #36896, #36963 UI fixes #9947

Merged
merged 3 commits into from
Dec 19, 2023
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
2 changes: 1 addition & 1 deletion webpack/assets/javascripts/react_app/common/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export const getWikiURL = section => foremanUrl(`/links/wiki/${section}`);
*/
export const getDocsURL = (guide, chapter = null) => {
const url = foremanUrl(`/links/docs/${guide}`);
return chapter ? `{url}?chapter={encodeURIComponent(chapter)}` : url;
return chapter ? `${url}?chapter=${encodeURIComponent(chapter)}` : url;
};

/**
Expand Down
18 changes: 18 additions & 0 deletions webpack/assets/javascripts/react_app/common/helpers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
stringIsPositiveNumber,
formatDate,
formatDateTime,
getDocsURL,
} from './helpers';

describe('isoCompatibleDate', () => {
Expand Down Expand Up @@ -130,3 +131,20 @@ describe('formatDateTime', () => {
expect(formatDateTime(date)).toEqual('2020-03-06 14:00:00');
});
});

describe('getDocsURL', () => {
it('should return URL with guide and chapter', () => {
const guide = 'Managing_Hosts';
const chapter = 'registering-a-host_managing-hosts';
const expectedUrl = '/links/docs/Managing_Hosts?chapter=registering-a-host_managing-hosts';

expect(getDocsURL(guide, chapter)).toEqual(expectedUrl);
});

it('should return URL with guide only when chapter is not provided', () => {
const guide = 'Managing_Hosts';
const expectedUrl = '/links/docs/Managing_Hosts';

expect(getDocsURL(guide)).toEqual(expectedUrl);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
}
}

.pf-c-toolbar#data-toolbar {
// Override for unupdated plugins that use unupdated foreman CSS
display: grid;
justify-content: normal;
}

.pf-c-masthead__brand {
padding-right: 15px;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,10 @@ const TableIndexPage = ({
</ToolbarGroup>
)}
{actionButtons.length > 0 && (
<ToolbarGroup alignment={{ default: 'alignLeft' }}>
<ToolbarGroup
alignment={{ default: 'alignLeft' }}
className="table-toolbar-actions"
>
<ToolbarItem>
<ActionButtons buttons={actionButtons} />
</ToolbarItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
.toolbar-search {
flex-grow: 1;
}
.autocomplete-search {
max-width: 600px;
.table-toolbar-actions {
padding-left: 16px;
}
}
.pf-c-toolbar__group {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@
.pf-c-dropdown.pf-m-align-right {
width: unset;
}
.pf-c-dropdown {
width: unset; // just in case Katello overrides it
}
}
Loading