From 553a2e91036e0c0d67fa0c3e76836e5178d2ec58 Mon Sep 17 00:00:00 2001 From: Davit Date: Sun, 30 Jun 2024 21:03:05 +0400 Subject: [PATCH 1/7] use dynamic length for deployments --- src/components/DeploymentsByFilter/index.js | 102 ++++++++++---------- 1 file changed, 50 insertions(+), 52 deletions(-) diff --git a/src/components/DeploymentsByFilter/index.js b/src/components/DeploymentsByFilter/index.js index f9849b9f..93be94a9 100644 --- a/src/components/DeploymentsByFilter/index.js +++ b/src/components/DeploymentsByFilter/index.js @@ -118,10 +118,12 @@ const DeploymentsByFilter = ({ deployments }) => { }); }; + const sortedFilteredItems = sortedItems.filter(deployment => filterResults(deployment)); + return (
- + { - {!sortedItems.filter(deployment => filterResults(deployment)).length && ( -
No deployments
- )} - {sortedItems - .filter(deployment => filterResults(deployment)) - .map(deployment => { - return ( -
-
- - {formatString(deployment.environment.project.name, 'project')} - -
-
- - {formatString(deployment.environment.name, 'environment')} - -
-
{formatString(deployment.environment.openshift.name, 'cluster')}
-
- - {deployment.name} - -
-
{deployment.priority}
-
- {moment.utc(deployment.created).local().format('DD MMM YYYY, HH:mm:ss (Z)')} -
-
- {deployment.status.charAt(0).toUpperCase() + deployment.status.slice(1)} - - {!['complete', 'cancelled', 'failed'].includes(deployment.status) && deployment.buildStep && ( - - )} -
-
{getDeploymentDuration(deployment)}
-
- {['new', 'pending', 'queued', 'running'].includes(deployment.status) && ( - - )} -
+ {!sortedFilteredItems.length &&
No deployments
} + {sortedFilteredItems.map(deployment => { + return ( +
+
+ + {formatString(deployment.environment.project.name, 'project')} + +
+
+ + {formatString(deployment.environment.name, 'environment')} + +
+
{formatString(deployment.environment.openshift.name, 'cluster')}
+
+ + {deployment.name} + +
+
{deployment.priority}
+
+ {moment.utc(deployment.created).local().format('DD MMM YYYY, HH:mm:ss (Z)')} +
+
+ {deployment.status.charAt(0).toUpperCase() + deployment.status.slice(1)} + + {!['complete', 'cancelled', 'failed'].includes(deployment.status) && deployment.buildStep && ( + + )} +
+
{getDeploymentDuration(deployment)}
+
+ {['new', 'pending', 'queued', 'running'].includes(deployment.status) && ( + + )}
- ); - })} +
+ ); + })} ); From 1d6e6044508bddf6d0daaf3d31e779b59cfe0645 Mon Sep 17 00:00:00 2001 From: Davit Date: Sun, 30 Jun 2024 22:29:28 +0400 Subject: [PATCH 2/7] show which user is being removed --- src/components/Organizations/SharedStyles.tsx | 3 +++ src/components/Organizations/Users/index.js | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/Organizations/SharedStyles.tsx b/src/components/Organizations/SharedStyles.tsx index ba652c07..4fe024a6 100644 --- a/src/components/Organizations/SharedStyles.tsx +++ b/src/components/Organizations/SharedStyles.tsx @@ -450,6 +450,9 @@ export const RemoveModalParagraph = styled.p` line-height: 24px; span { font-weight: bold; + &.highlight { + color: #4b84ff; + } } `; diff --git a/src/components/Organizations/Users/index.js b/src/components/Organizations/Users/index.js index ef62e6c0..fb7882bd 100644 --- a/src/components/Organizations/Users/index.js +++ b/src/components/Organizations/Users/index.js @@ -132,7 +132,7 @@ const Users = ({ users = [], organization, organizationId, organizationName, ref {!user.email.startsWith('default-user') ? ( <> - + { @@ -144,7 +144,8 @@ const Users = ({ users = [], organization, organizationId, organizationName, ref Remove user? - This action will remove this user from all groups, you might not be able to reverse this. + This action will remove user {user.email} from all groups, you + might not be able to reverse this.