-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* namespaceBreadcrumb: move the "Namespaces" vs "Partners" logic to a helper export and switch from string computation to having strings for both terms * Remove My Namespaces from menu, breadcrumb and tests edit-namespace: use namespaceBreadcrumb menu: remove My Namespaces tests: don't expect My Namespaces in menu * namespace-detail: use MyNamespaceAPI to determine showControls, not url before: ManageNamespace = NamespaceDetail with showControls=true PartnerDetail = NamespaceDetail with showControls=false after: both removed, route changed to use NamespaceDetail directly NamespaceDetail - move showControls from props to state, set from MyNamespaceAPI * LinkTabs: move CollectionHeader tabs to separate component that's the only tab component we have that supports links in tabs, switching to that one, so moving into a LinkTabs component * namespace-list: merge MyNamespaces & Partners list screens before: MyNamespaces = NamespaceList with filterOwner true, title, and namespacePath myCollectionsByRepo Partners = NamespaceList with filterOwner false, title, and namespacePath namespaceByRepo after: the same, except title is always the same, the Create button only depends on permissions, not filterOwner anymore and added tabs to switch between * NamespaceList - unify conditions for Create button ; LinkTabs - export props type the original logic used filterOwner + rights for the toolbar Create button, and filterOwner + a constant for the empty state Create button now, we're using isStandalone + rights for both * Toolbar (wrapper): call updateParams with page:1 in the new state so that searching always goes to the first page * NamespaceList - drop isStandalone, Create uses rights, adjust EmptyState messages dropping the "No managed namespaces" title altogether, in favor of "No namespaces yet", changing the logic for both Create buttons to just use the `add_namespace` user permission and the "Namespaces will appear once created" vs "This accound is not set up to manage any namespaces" changes from standalone vs cloud to namespaces vs my namespaces tab. (cherry picked from commit 25f72e2) Co-authored-by: Martin Hradil <[email protected]>
- Loading branch information
1 parent
ac63f64
commit c3968d2
Showing
22 changed files
with
191 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import * as React from 'react'; | ||
import cx from 'classnames'; | ||
|
||
import { Link } from 'react-router-dom'; | ||
|
||
export interface IProps { | ||
/** List of tabs */ | ||
tabs: { | ||
active?: boolean; | ||
link: string; | ||
title: string; | ||
}[]; | ||
} | ||
|
||
// We're not using the Tab react component because they don't support links. | ||
export class LinkTabs extends React.Component<IProps> { | ||
render() { | ||
return ( | ||
<div className='pf-c-tabs'> | ||
<ul className='pf-c-tabs__list'> | ||
{this.props.tabs.map(tab => this.renderTab(tab))} | ||
</ul> | ||
</div> | ||
); | ||
} | ||
|
||
private renderTab({ link, title, active = false }) { | ||
return ( | ||
<li | ||
className={cx({ | ||
'pf-c-tabs__item': true, | ||
'pf-m-current': active, | ||
})} | ||
key={title} | ||
> | ||
<Link to={link} className='pf-c-tabs__link'> | ||
<span className='pf-c-tabs__item-text'>{title}</span> | ||
</Link> | ||
</li> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.