Change the type of content source errorReason to match ent-search (#95098)
A recent refactor of content source jobs models unintentionally changed this API. This change restores the functionality of the re-authentication "Fix" link.
This commit is contained in:
parent
523cc3984a
commit
f3b71bce2a
|
@ -21,7 +21,7 @@ export const contentSources = [
|
|||
name: 'source',
|
||||
documentCount: '123',
|
||||
isFederatedSource: false,
|
||||
errorReason: 0,
|
||||
errorReason: null,
|
||||
allowsReauth: true,
|
||||
boost: 1,
|
||||
},
|
||||
|
@ -35,7 +35,7 @@ export const contentSources = [
|
|||
name: 'Jira',
|
||||
documentCount: '34234',
|
||||
isFederatedSource: false,
|
||||
errorReason: 0,
|
||||
errorReason: null,
|
||||
allowsReauth: true,
|
||||
boost: 0.5,
|
||||
},
|
||||
|
|
|
@ -39,7 +39,7 @@ describe('SourceRow', () => {
|
|||
const source = {
|
||||
...contentSources[0],
|
||||
status: 'error',
|
||||
errorReason: 1,
|
||||
errorReason: 'credentials_invalid',
|
||||
};
|
||||
const wrapper = shallow(<SourceRow isOrganization source={source} />);
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ import {
|
|||
import { ContentSourceDetails } from '../../../types';
|
||||
import { SourceIcon } from '../source_icon';
|
||||
|
||||
const CREDENTIALS_INVALID_ERROR_REASON = 1;
|
||||
const CREDENTIALS_INVALID_ERROR_REASON = 'credentials_invalid';
|
||||
|
||||
export interface ISourceRow {
|
||||
showDetails?: boolean;
|
||||
|
|
|
@ -106,7 +106,7 @@ export interface ContentSourceDetails extends ContentSource {
|
|||
isFederatedSource: boolean;
|
||||
searchable: boolean;
|
||||
supportedByLicense: boolean;
|
||||
errorReason: number;
|
||||
errorReason: string | null;
|
||||
allowsReauth: boolean;
|
||||
boost: number;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue