Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into org-notification-edit
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood committed Jul 3, 2024
2 parents 3e31ce8 + a07070b commit 850c9c9
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 59 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
3 changes: 3 additions & 0 deletions src/components/Organizations/SharedStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,9 @@ export const RemoveModalParagraph = styled.p`
line-height: 24px;
span {
font-weight: bold;
&.highlight {
color: #4b84ff;
}
}
`;

Expand Down
5 changes: 3 additions & 2 deletions src/components/Organizations/Users/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const Users = ({ users = [], organization, organizationId, organizationName, ref
</Tooltip>
{!user.email.startsWith('default-user') ? (
<>
<Tooltip overlayClassName="orgTooltip" placement="bottom" title="Delete user">
<Tooltip overlayClassName="orgTooltip" placement="bottom" title="Remove user">
<DeleteOutlined
className="delete"
onClick={() => {
Expand All @@ -144,7 +144,8 @@ const Users = ({ users = [], organization, organizationId, organizationName, ref
<Modal isOpen={deleteUserModalOpen && selectedUser === user?.id} onRequestClose={closeUserModal}>
<RemoveModalHeader>Remove user?</RemoveModalHeader>
<RemoveModalParagraph>
This action will remove this user from all groups, you might not be able to reverse this.
This action will remove user <span className="highlight">{user.email}</span> from all groups in this
organization, you might not be able to reverse this.
</RemoveModalParagraph>

<Footer>
Expand Down
14 changes: 13 additions & 1 deletion test/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ services:
condition: service_completed_successfully # don't start the lagoon migrations until the db migrations is completed
keycloak:
condition: service_started
api-sidecar-handler:
# this is neded for the internal dns references
container_name: apisidecarhandler
image: testlagoon/api-sidecar-handler:main
ports:
- '3333:3333'
api:
image: testlagoon/api:main
ports:
Expand All @@ -44,8 +50,14 @@ services:
- S3_BAAS_ACCESS_KEY_ID=minio
- S3_BAAS_SECRET_ACCESS_KEY=minio123
- CONSOLE_LOGGING_LEVEL=trace
- SIDECAR_HANDLER_HOST=apisidecarhandler
depends_on:
- api-lagoon-migrations
api-lagoon-migrations:
condition: service_started
keycloak:
condition: service_started
api-sidecar-handler:
condition: service_started
api-redis:
image: testlagoon/api-redis:main
keycloak:
Expand Down
2 changes: 1 addition & 1 deletion test/keycloak/configure-keycloak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function is_keycloak_running {
function configure_user_passwords {

LAGOON_DEMO_USERS=("guest@example.com" "reporter@example.com" "developer@example.com" "maintainer@example.com" "owner@example.com")
LAGOON_DEMO_ORG_USERS=("orguser@example.com" "orgviewer@example.com" "orgowner@example.com" "platformowner@example.com")
LAGOON_DEMO_ORG_USERS=("orguser@example.com" "orgviewer@example.com" "orgadmin@example.com" "orgowner@example.com" "platformowner@example.com")

for i in ${LAGOON_DEMO_USERS[@]}
do
Expand Down

0 comments on commit 850c9c9

Please sign in to comment.