mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user