Skip to content

Commit

Permalink
Merge branch 'main' into project-deletio-confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveDarsa committed Jul 4, 2024
2 parents d55452b + 2be4445 commit 245be9c
Show file tree
Hide file tree
Showing 10 changed files with 593 additions and 493 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Node builder image
FROM uselagoon/node-20-builder:latest as builder
FROM uselagoon/node-20-builder:latest AS builder

COPY . /app/

RUN yarn install
RUN yarn install --network-timeout 300000


# Node service image
Expand All @@ -28,4 +28,4 @@ ENV GRAPHQL_API=$GRAPHQL_API
RUN yarn run build

EXPOSE 3000
CMD ["yarn", "start"]
CMD ["yarn", "start"]
1 change: 1 addition & 0 deletions cypress/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defineConfig } from 'cypress';

export default defineConfig({
requestTimeout: 15000,
defaultCommandTimeout: 8000,
e2e: {
env: {
api: 'http://0.0.0.0:33000/graphql',
Expand Down
102 changes: 50 additions & 52 deletions src/components/DeploymentsByFilter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,12 @@ const DeploymentsByFilter = ({ deployments }) => {
});
};

const sortedFilteredItems = sortedItems.filter(deployment => filterResults(deployment));

return (
<Deployments>
<div className="filters">
<label>{sortedItems.length == 1 ? `1 deployment` : `${sortedItems.length} deployments`}</label>
<label>{sortedItems.length == 1 ? `1 deployment` : `${sortedFilteredItems.length} deployments`}</label>
<label></label>
<input
type="text"
Expand Down Expand Up @@ -162,58 +164,54 @@ const DeploymentsByFilter = ({ deployments }) => {
<label>Duration</label>
<label></label>
</DeploymentsHeader>
{!sortedItems.filter(deployment => filterResults(deployment)).length && (
<div className="data-none">No deployments</div>
)}
{sortedItems
.filter(deployment => filterResults(deployment))
.map(deployment => {
return (
<div className="data-row row-heading" key={deployment.id}>
<div className="project">
<ProjectLink projectSlug={deployment.environment.project.name}>
{formatString(deployment.environment.project.name, 'project')}
</ProjectLink>
</div>
<div className="environment">
<DeploymentsLink
environmentSlug={deployment.environment.openshiftProjectName}
projectSlug={deployment.environment.project.name}
>
{formatString(deployment.environment.name, 'environment')}
</DeploymentsLink>
</div>
<div className="cluster">{formatString(deployment.environment.openshift.name, 'cluster')}</div>
<div className="name">
<DeploymentLink
deploymentSlug={deployment.name}
environmentSlug={deployment.environment.openshiftProjectName}
projectSlug={deployment.environment.project.name}
key={deployment.id}
>
{deployment.name}
</DeploymentLink>
</div>
<div className="priority">{deployment.priority}</div>
<div className="started">
{moment.utc(deployment.created).local().format('DD MMM YYYY, HH:mm:ss (Z)')}
</div>
<div className={`status buildstep ${deployment.status}`}>
{deployment.status.charAt(0).toUpperCase() + deployment.status.slice(1)}

{!['complete', 'cancelled', 'failed'].includes(deployment.status) && deployment.buildStep && (
<HoverTag text={deployment.buildStep} maxWidth="160px" tooltipPosition="bottom" />
)}
</div>
<div className="duration">{getDeploymentDuration(deployment)}</div>
<div>
{['new', 'pending', 'queued', 'running'].includes(deployment.status) && (
<CancelDeployment deployment={deployment} afterText="Cancelled" beforeText="Cancel" />
)}
</div>
{!sortedFilteredItems.length && <div className="data-none">No deployments</div>}
{sortedFilteredItems.map(deployment => {
return (
<div className="data-row row-heading" key={deployment.id}>
<div className="project">
<ProjectLink projectSlug={deployment.environment.project.name}>
{formatString(deployment.environment.project.name, 'project')}
</ProjectLink>
</div>
<div className="environment">
<DeploymentsLink
environmentSlug={deployment.environment.openshiftProjectName}
projectSlug={deployment.environment.project.name}
>
{formatString(deployment.environment.name, 'environment')}
</DeploymentsLink>
</div>
<div className="cluster">{formatString(deployment.environment.openshift.name, 'cluster')}</div>
<div className="name">
<DeploymentLink
deploymentSlug={deployment.name}
environmentSlug={deployment.environment.openshiftProjectName}
projectSlug={deployment.environment.project.name}
key={deployment.id}
>
{deployment.name}
</DeploymentLink>
</div>
<div className="priority">{deployment.priority}</div>
<div className="started">
{moment.utc(deployment.created).local().format('DD MMM YYYY, HH:mm:ss (Z)')}
</div>
<div className={`status buildstep ${deployment.status}`}>
{deployment.status.charAt(0).toUpperCase() + deployment.status.slice(1)}

{!['complete', 'cancelled', 'failed'].includes(deployment.status) && deployment.buildStep && (
<HoverTag text={deployment.buildStep} maxWidth="160px" tooltipPosition="bottom" />
)}
</div>
<div className="duration">{getDeploymentDuration(deployment)}</div>
<div>
{['new', 'pending', 'queued', 'running'].includes(deployment.status) && (
<CancelDeployment deployment={deployment} afterText="Cancelled" beforeText="Cancel" />
)}
</div>
);
})}
</div>
);
})}
</DeploymentsDataTable>
</Deployments>
);
Expand Down
Loading

0 comments on commit 245be9c

Please sign in to comment.