Skip to content

Commit

Permalink
Fixes #36924 - Added breadcrumb bar to the header of subscription det…
Browse files Browse the repository at this point in the history
…ails pages. (#10801)

Additionally, updated neccesary snapshots.
  • Loading branch information
qcjames53 authored Nov 17, 2023
1 parent 9309d12 commit db9e0c2
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 36 deletions.
33 changes: 15 additions & 18 deletions webpack/scenes/Subscriptions/Details/SubscriptionDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,24 +59,21 @@ class SubscriptionDetails extends Component {

return (
<div id="subscription-details">
{!subscriptionDetails.loading &&
<BreadcrumbsBar
onSwitcherItemClick={(e, url) => this.handleBreadcrumbSwitcherItem(e, url)}
data={{
isSwitchable: true,
breadcrumbItems: [
{
caption: __('Subscriptions'),
onClick: () =>
this.props.history.push('/subscriptions'),
},
{
caption: String(subscriptionDetails.name || __('Subscription Details')),
},
],
resource,
}}
/>}
{!subscriptionDetails.loading && <BreadcrumbsBar
isLoadingResources={subscriptionDetails.loading}
onSwitcherItemClick={(e, url) => this.handleBreadcrumbSwitcherItem(e, url)}
isSwitchable
breadcrumbItems={[
{
caption: __('Subscriptions'),
url: '/subscriptions/',
},
{
caption: String(subscriptionDetails.name || __('Subscription Details')),
},
]}
resource={resource}
/>}

<TabContainer id="subscription-tabs-container" defaultActiveKey={1}>
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#subscription-details {
margin: 24px;

.scrolld-list {
max-height: 400px;
overflow-y: auto;
Expand All @@ -8,4 +10,4 @@
max-height: 20px;
padding: 0;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,27 @@ exports[`subscriptions details page should render and contain appropiate compone
id="subscription-details"
>
<BreadcrumbsBar
data={
Object {
"breadcrumbItems": Array [
Object {
"caption": "Subscriptions",
"onClick": [Function],
},
Object {
"caption": "OpenShift Employee Subscription",
},
],
"isSwitchable": true,
"resource": Object {
"nameField": "name",
"resourceUrl": "/katello/api/v2/organizations/1/subscriptions",
"switcherItemUrl": "/subscriptions/:id",
breadcrumbItems={
Array [
Object {
"caption": "Subscriptions",
"url": "/subscriptions/",
},
}
Object {
"caption": "OpenShift Employee Subscription",
},
]
}
isLoadingResources={false}
isSwitchable={true}
onSwitcherItemClick={[Function]}
resource={
Object {
"nameField": "name",
"resourceUrl": "/katello/api/v2/organizations/1/subscriptions",
"switcherItemUrl": "/subscriptions/:id",
}
}
/>
<ForwardRef
defaultActiveKey={1}
Expand Down

0 comments on commit db9e0c2

Please sign in to comment.