Skip to content

Commit

Permalink
Fix broken link in Deploy App buton (#1643)
Browse files Browse the repository at this point in the history
* Fix broken link in Deploy App buton

* Fix link in Catalog card
  • Loading branch information
Andres Martinez Gotor authored Apr 8, 2020
1 parent 39cf8ba commit ddca77d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
3 changes: 2 additions & 1 deletion dashboard/src/components/AppList/AppList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class AppList extends React.Component<IAppListProps, IAppListState> {
const {
apps: { error, isFetching },
isFetchingResources,
namespace,
} = this.props;
return (
<section className="AppList">
Expand All @@ -75,7 +76,7 @@ class AppList extends React.Component<IAppListProps, IAppListState> {
</div>
<div className="col-3 text-r align-center">
{!error && (
<Link to="/catalog">
<Link to={`/ns/${namespace}/catalog`}>
<button className="deploy-button button button-accent">Deploy App</button>
</Link>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ exports[`when apps available matches the snapshot 1`] = `
className="col-3 text-r align-center"
>
<Link
to="/catalog"
to="/ns/default/catalog"
>
<button
className="deploy-button button button-accent"
Expand Down Expand Up @@ -117,7 +117,7 @@ exports[`when custom resources available matches the snapshot 1`] = `
className="col-3 text-r align-center"
>
<Link
to="/catalog"
to="/ns/default/catalog"
>
<button
className="deploy-button button button-accent"
Expand Down Expand Up @@ -277,7 +277,7 @@ exports[`when fetched but not apps available matches the snapshot 1`] = `
className="col-3 text-r align-center"
>
<Link
to="/catalog"
to="/ns/default/catalog"
>
<button
className="deploy-button button button-accent"
Expand Down Expand Up @@ -348,7 +348,7 @@ exports[`while fetching apps loading spinner matches the snapshot 1`] = `
className="col-3 text-r align-center"
>
<Link
to="/catalog"
to="/ns/default/catalog"
>
<button
className="deploy-button button button-accent"
Expand Down Expand Up @@ -419,7 +419,7 @@ exports[`while fetching apps loading spinner matches the snapshot 2`] = `
className="col-3 text-r align-center"
>
<Link
to="/catalog"
to="/ns/default/catalog"
>
<button
className="deploy-button button button-accent"
Expand Down Expand Up @@ -490,7 +490,7 @@ exports[`while fetching apps matches the snapshot 1`] = `
className="col-3 text-r align-center"
>
<Link
to="/catalog"
to="/ns/default/catalog"
>
<button
className="deploy-button button button-accent"
Expand Down
5 changes: 4 additions & 1 deletion dashboard/src/components/Catalog/CatalogItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ const CatalogItem: React.SFC<ICatalogItemProps> = props => {
let subIcon;
if (type === "chart") {
tag1 = (
<Link className="ListItem__content__info_tag_link" to={`/catalog/${repoName}`}>
<Link
className="ListItem__content__info_tag_link"
to={`/ns/${namespace}/catalog/${repoName}`}
>
{repoName}
</Link>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports[`should render an item 1`] = `
tag1Content={
<Unknown
className="ListItem__content__info_tag_link"
to="/catalog/undefined"
to="/ns/kubeapps/catalog/undefined"
/>
}
title="foo"
Expand Down

0 comments on commit ddca77d

Please sign in to comment.