Skip to content

Commit

Permalink
fix: Set correct item url (#1856)
Browse files Browse the repository at this point in the history
* fix: Set correct item url

* fixup! fix: Set correct item url
  • Loading branch information
aleixhub authored Apr 25, 2024
1 parent d673625 commit b13365f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion catalog/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ui:
name: # default use chart name + '-ui'
image:
#override:
tag: v0.31.0
tag: v0.31.1
repository: quay.io/redhat-gpte/babylon-catalog-ui
pullPolicy: IfNotPresent
replicaCount: 1
Expand Down
11 changes: 8 additions & 3 deletions catalog/ui/src/app/Catalog/CatalogContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
import { CatalogItem } from '@app/types';
import useSession from '@app/utils/useSession';
import { useRect } from '@app/utils/useRect';
import LoadingIcon from '@app/components/LoadingIcon';
import CatalogGridList from './CatalogGridList';

const CatalogContent: React.FC<{
Expand All @@ -30,8 +29,14 @@ const CatalogContent: React.FC<{
{!userHasRequiredPropertiesToAccess && userInterface === 'rhdp-partners' ? (
<>
<p>Welcome to the Red Hat Demo Platform (RHDP)!</p>
<p>At this time, it appears that your account is not listed as a pilot user for the beta version of RHDP. Please reach out to your account manager or Red Hat contact to request pilot access.</p>
<p>Once approved, you will be able to log-in with your Red Hat credentials. We look forward to your engagement with our updated demo platform!</p>
<p>
At this time, it appears that your account is not listed as a pilot user for the beta version of RHDP.
Please reach out to your account manager or Red Hat contact to request pilot access.
</p>
<p>
Once approved, you will be able to log-in with your Red Hat credentials. We look forward to your
engagement with our updated demo platform!
</p>
</>
) : groups.includes('salesforce-partner') && userInterface !== 'rhdp-partners' ? (
<>
Expand Down
10 changes: 4 additions & 6 deletions catalog/ui/src/app/Catalog/CatalogItemCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ const CatalogItemCard: React.FC<{ catalogItem: CatalogItem }> = ({ catalogItem }
const { code: status } = getStatus(catalogItem);
const sla = getSLA(catalogItem);

if (!searchParams.has('item')) {
if (namespace) {
searchParams.set('item', catalogItem.metadata.name);
} else {
searchParams.set('item', `${catalogItem.metadata.namespace}/${catalogItem.metadata.name}`);
}
if (namespace) {
searchParams.set('item', catalogItem.metadata.name);
} else {
searchParams.set('item', `${catalogItem.metadata.namespace}/${catalogItem.metadata.name}`);
}

return (
Expand Down
8 changes: 3 additions & 5 deletions catalog/ui/src/app/Catalog/CatalogItemDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { CatalogItem, ResourceClaim } from '@app/types';
import LoadingIcon from '@app/components/LoadingIcon';
import StatusPageIcons from '@app/components/StatusPageIcons';
import useSession from '@app/utils/useSession';
import useImpersonateUser from '@app/utils/useImpersonateUser';
import {
checkAccessControl,
displayName,
Expand Down Expand Up @@ -62,11 +61,11 @@ import {
} from './catalog-utils';
import CatalogItemIcon from './CatalogItemIcon';
import CatalogItemHealthDisplay from './CatalogItemHealthDisplay';

import './catalog-item-details.css';
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
import useHelpLink from '@app/utils/useHelpLink';

import './catalog-item-details.css';

enum CatalogItemAccess {
Allow,
Deny,
Expand All @@ -75,8 +74,7 @@ enum CatalogItemAccess {

const CatalogItemDetails: React.FC<{ catalogItem: CatalogItem; onClose: () => void }> = ({ catalogItem, onClose }) => {
const navigate = useNavigate();
const { email, userNamespace, isAdmin, groups } = useSession().getSession();
const { userImpersonated } = useImpersonateUser();
const { userNamespace, isAdmin, groups } = useSession().getSession();
const { provisionTimeEstimate, accessControl, lastUpdate } = catalogItem.spec;
const { labels, namespace, name } = catalogItem.metadata;
const provider = getProvider(catalogItem);
Expand Down
2 changes: 1 addition & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ catalog:
image:
pullPolicy: IfNotPresent
repository: quay.io/redhat-gpte/babylon-catalog-ui
tag: v0.31.0
tag: v0.31.1
replicaCount: 1
resources:
requests:
Expand Down

0 comments on commit b13365f

Please sign in to comment.