Commit f9a293af by Tania B Committed by GitHub

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

* Remove last synchronisation field from LDAP debug view

* Apply review comments
parent 6aa4db38
......@@ -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>
......
......@@ -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>
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment