Skip to content

Commit

Permalink
Merge branch 'devel' into CB-5935-resolve-connection-state-blinking
Browse files Browse the repository at this point in the history
  • Loading branch information
EvgeniaBzzz authored Dec 11, 2024
2 parents 91cf4c4 + d09bb9b commit 8c873e0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ public void deleteResource(@NotNull String projectId, @NotNull String resourcePa
log.warn("Failed to remove resources properties", e);
}
try {
if (targetPath.toFile().isDirectory()) {
if (Files.isDirectory(targetPath)) {
IOUtils.deleteDirectory(targetPath);
} else {
Files.delete(targetPath);
Expand Down
15 changes: 10 additions & 5 deletions webapp/packages/core-blocks/src/StatusMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,18 @@ export const StatusMessage = observer<Props>(function StatusMessage({
const errorDetails = useErrorDetails(exception);
const isError = type === ENotificationType.Error || exception !== null;

if (Array.isArray(message)) {
message = message.map(m => translate(m)).join(', ');
} else if (message !== null) {
message = translate(message);
function translateMessage(message: string | string[] | null | undefined) {
if (Array.isArray(message)) {
message = message.map(m => translate(m)).join(', ');
} else if (message !== null) {
message = translate(message);
}

return message;
}

message = message ?? errorDetails.message;
message = translateMessage(message) || translateMessage(errorDetails.message);

let icon = '/icons/info_icon.svg';

if (isError) {
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-ui/src/Form/FormPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export abstract class FormPart<TPartState, TFormState = any> implements IFormPar
if (this.loading) {
return;
}

this.loading = true;

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const GrantedUsersTableInnerHeader = observer<Props>(function GrantedUser
<TableColumnHeader min />
<TableColumnHeader>{translate('administration_teams_team_granted_users_user_id')}</TableColumnHeader>
{showUserTeamRole && (
<TableColumnHeader title={translate('plugin_authentication_administration_team_user_team_role_supervisor_description')}>
<TableColumnHeader title={translate('plugin_authentication_administration_team_user_team_role_supervisor_description')} flex centerContent>
{translate('plugin_authentication_administration_team_user_team_role_supervisor')}
</TableColumnHeader>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const GrantedUsersTableItem = observer<Props>(function GrantedUsersTableI
</TableColumnValue>
<TableColumnValue>{name}</TableColumnValue>
{teamRoles.length > 0 && (
<TableColumnValue title={translate('plugin_authentication_administration_team_user_team_role_supervisor_description')}>
<TableColumnValue title={translate('plugin_authentication_administration_team_user_team_role_supervisor_description')} centerContent flex>
<Checkbox
checked={teamRole === USER_TEAM_ROLE_SUPERVISOR}
onChange={value => onTeamRoleAssign(id, value ? USER_TEAM_ROLE_SUPERVISOR : null)}
Expand Down

0 comments on commit 8c873e0

Please sign in to comment.