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

PSP-9900 : PIMS service availability notifications #4674

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

eddherrera
Copy link
Collaborator

No description provided.

@eddherrera eddherrera added the enhancement New feature or request label Mar 4, 2025
@eddherrera eddherrera self-assigned this Mar 4, 2025
Copy link
Contributor

github-actions bot commented Mar 4, 2025

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/4674

</label>
{systemChecks.length > 1 && (
<LinkButton
data-testid="healtcheck-full-list"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: healthcheck-full-list

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

totalDuration: Date;
// Dictionary of health information.
entries: {
PmbcExternalApi: {
Copy link
Collaborator

@devinleighsmith devinleighsmith Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

each of these objects:

    {
      data: object;
      duration: Date;
      status: string;
      tags: string[];
    }
appears the same, could these be defined by an interface to reduce repetition?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

return (
const [systemChecked, setSystemChecked] = useState<boolean>(null);
const [systemDegraded, setSystemDegraded] = useState<boolean>(false);
const [healthCheckIssues, sethealthCheckIssues] = useState<IHealthCheckIssue[]>(null);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: setHealthCheckIssues.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

return systemDegraded && systemChecked ? (
<>
<LoadingBar style={{ zIndex: 9999, backgroundColor: '#fcba19', height: '.3rem' }} />
<Styled.AppGridContainerWithHealth className="App" {...rest}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would you feel about using a css class to show/hide the health container? it seems like you are having to duplicate lines 109 to 115 because of this approach.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not opposed to the idea, but managing the grid-template-areas without breaking the app layout is complicated enough.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eddherrera I tested this out, and this solution isn't viable as it causes the map to be de-rendered and re-rendered. Please change this so that the banner is added and removed as needed without re-rendering the entire application.

@devinleighsmith
Copy link
Collaborator

At the moment, it does not appear that this AC is satisfied:

Each of these messages should be alterable via configuration on the frontend. Therefore, we should use keys to refer the services to the messages.

@eddherrera
Copy link
Collaborator Author

eddherrera commented Mar 4, 2025

At the moment, it does not appear that this AC is satisfied:

Each of these messages should be alterable via configuration on the frontend. Therefore, we should use keys to refer the services to the messages.

updated tenant file to store messages.

@eddherrera eddherrera marked this pull request as ready for review March 4, 2025 17:31
Copy link
Contributor

github-actions bot commented Mar 4, 2025

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/4674

Copy link
Contributor

github-actions bot commented Mar 4, 2025

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/4674

import * as Styled from './styles';

const PublicLayout: React.FC<React.PropsWithChildren<React.HTMLAttributes<HTMLElement>>> = ({
children,
...rest
}) => {
return (
const [systemChecked, setSystemChecked] = useState<boolean>(null);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this logic should be added to the publicLayout. The PublicLayout should be stateless, and just accept params for these health check items.

const { setModalContent, setDisplayModal } = useModalContext();

return (
systemChecks.length && (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this appears to throw an NPE, as this is initialized with null until the promise returns.

@devinleighsmith
Copy link
Collaborator

It looks like errors for keys with spaces aren't displaying properly:
image

@devinleighsmith
Copy link
Collaborator

It looks like errors for keys with spaces aren't displaying properly: image

This should just be displaying as "PMBC".

all of the keys should display as per the below:

CDOGs (The DevExchange Document Generation Service is experiencing service degradation, you will be unable to generate form documents (ie. H120, H1005) until resolved).

MAYAN (The PIMS Document server is experiencing service degradation, you will be unable to view, download or upload documents until resolved)

PIMS API (The PIMS server is currently unavailable, PIMS will not be useable until this is resolved).

PMBC (The BC Data Warehouse is experiencing service degradation, this will limit PIMS map functionality until resolved).

GEOCODER (The BC Geocoder is experiencing service degradation, address search will be unavailable until resolved).

GEOSERVER (The MOTT Geoserver is experiencing service degradation, PIMS map layer functionality will be limited until resolved).

LTSA (The LTSA title service is experiencing service degradation, the LTSA tab within a property will not be viewable until resolved).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants