Remove last synchronisation field from LDAP debug view (#30984)

* Remove last synchronisation field from LDAP debug view

* Apply review comments
This commit is contained in:
Tania B
2021-02-15 17:11:17 +02:00
committed by GitHub
parent 6aa4db387b
commit f9a293afea
3 changed files with 0 additions and 33 deletions

View File

@@ -21,10 +21,8 @@ export class UserLdapSyncInfo extends PureComponent<Props, State> {
render() {
const { ldapSyncInfo, user } = this.props;
const prevSyncSuccessful = ldapSyncInfo && ldapSyncInfo.prevSync;
const nextSyncSuccessful = ldapSyncInfo && ldapSyncInfo.nextSync;
const nextSyncTime = nextSyncSuccessful ? dateTimeFormat(ldapSyncInfo.nextSync, { format }) : '';
const prevSyncTime = prevSyncSuccessful ? dateTimeFormat(ldapSyncInfo.prevSync!.started, { format }) : '';
const debugLDAPMappingURL = `${debugLDAPMappingBaseURL}?user=${user && user.login}`;
return (
@@ -54,17 +52,6 @@ export class UserLdapSyncInfo extends PureComponent<Props, State> {
</>
)}
</tr>
<tr>
{prevSyncSuccessful ? (
<>
<td>Last synchronisation</td>
<td>{prevSyncTime}</td>
<td>Successful</td>
</>
) : (
<td colSpan={3}>Last synchronisation</td>
)}
</tr>
</tbody>
</table>
</div>

View File

@@ -26,8 +26,6 @@ export class LdapSyncInfo extends PureComponent<Props, State> {
const { ldapSyncInfo } = this.props;
const { isSyncing } = this.state;
const nextSyncTime = dateTimeFormat(ldapSyncInfo.nextSync, { format });
const prevSyncSuccessful = ldapSyncInfo && ldapSyncInfo.prevSync;
const prevSyncTime = prevSyncSuccessful ? dateTimeFormat(ldapSyncInfo.prevSync!.started, { format }) : '';
return (
<>
@@ -54,15 +52,6 @@ export class LdapSyncInfo extends PureComponent<Props, State> {
<td>Next scheduled synchronisation</td>
<td>{nextSyncTime}</td>
</tr>
<tr>
<td>Last synchronisation</td>
{prevSyncSuccessful && (
<>
<td>{prevSyncTime}</td>
<td>Successful</td>
</>
)}
</tr>
</tbody>
</table>
</div>

View File

@@ -12,7 +12,6 @@ export interface SyncInfo {
enabled: boolean;
schedule: string;
nextSync: string;
prevSync?: SyncResult;
}
export interface LdapUserSyncInfo {
@@ -21,14 +20,6 @@ export interface LdapUserSyncInfo {
status?: string;
}
export interface SyncResult {
started: string;
elapsed: string;
UpdatedUserIds: number[];
MissingUserIds: number[];
FailedUsers?: FailedUser[];
}
export interface FailedUser {
Login: string;
Error: string;