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> { ...@@ -21,10 +21,8 @@ export class UserLdapSyncInfo extends PureComponent<Props, State> {
render() { render() {
const { ldapSyncInfo, user } = this.props; const { ldapSyncInfo, user } = this.props;
const prevSyncSuccessful = ldapSyncInfo && ldapSyncInfo.prevSync;
const nextSyncSuccessful = ldapSyncInfo && ldapSyncInfo.nextSync; const nextSyncSuccessful = ldapSyncInfo && ldapSyncInfo.nextSync;
const nextSyncTime = nextSyncSuccessful ? dateTimeFormat(ldapSyncInfo.nextSync, { format }) : ''; const nextSyncTime = nextSyncSuccessful ? dateTimeFormat(ldapSyncInfo.nextSync, { format }) : '';
const prevSyncTime = prevSyncSuccessful ? dateTimeFormat(ldapSyncInfo.prevSync!.started, { format }) : '';
const debugLDAPMappingURL = `${debugLDAPMappingBaseURL}?user=${user && user.login}`; const debugLDAPMappingURL = `${debugLDAPMappingBaseURL}?user=${user && user.login}`;
return ( return (
...@@ -54,17 +52,6 @@ export class UserLdapSyncInfo extends PureComponent<Props, State> { ...@@ -54,17 +52,6 @@ export class UserLdapSyncInfo extends PureComponent<Props, State> {
</> </>
)} )}
</tr> </tr>
<tr>
{prevSyncSuccessful ? (
<>
<td>Last synchronisation</td>
<td>{prevSyncTime}</td>
<td>Successful</td>
</>
) : (
<td colSpan={3}>Last synchronisation</td>
)}
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
......
...@@ -26,8 +26,6 @@ export class LdapSyncInfo extends PureComponent<Props, State> { ...@@ -26,8 +26,6 @@ export class LdapSyncInfo extends PureComponent<Props, State> {
const { ldapSyncInfo } = this.props; const { ldapSyncInfo } = this.props;
const { isSyncing } = this.state; const { isSyncing } = this.state;
const nextSyncTime = dateTimeFormat(ldapSyncInfo.nextSync, { format }); const nextSyncTime = dateTimeFormat(ldapSyncInfo.nextSync, { format });
const prevSyncSuccessful = ldapSyncInfo && ldapSyncInfo.prevSync;
const prevSyncTime = prevSyncSuccessful ? dateTimeFormat(ldapSyncInfo.prevSync!.started, { format }) : '';
return ( return (
<> <>
...@@ -54,15 +52,6 @@ export class LdapSyncInfo extends PureComponent<Props, State> { ...@@ -54,15 +52,6 @@ export class LdapSyncInfo extends PureComponent<Props, State> {
<td>Next scheduled synchronisation</td> <td>Next scheduled synchronisation</td>
<td>{nextSyncTime}</td> <td>{nextSyncTime}</td>
</tr> </tr>
<tr>
<td>Last synchronisation</td>
{prevSyncSuccessful && (
<>
<td>{prevSyncTime}</td>
<td>Successful</td>
</>
)}
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
......
...@@ -12,7 +12,6 @@ export interface SyncInfo { ...@@ -12,7 +12,6 @@ export interface SyncInfo {
enabled: boolean; enabled: boolean;
schedule: string; schedule: string;
nextSync: string; nextSync: string;
prevSync?: SyncResult;
} }
export interface LdapUserSyncInfo { export interface LdapUserSyncInfo {
...@@ -21,14 +20,6 @@ export interface LdapUserSyncInfo { ...@@ -21,14 +20,6 @@ export interface LdapUserSyncInfo {
status?: string; status?: string;
} }
export interface SyncResult {
started: string;
elapsed: string;
UpdatedUserIds: number[];
MissingUserIds: number[];
FailedUsers?: FailedUser[];
}
export interface FailedUser { export interface FailedUser {
Login: string; Login: string;
Error: 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