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:
James Rucker 2021-03-23 08:04:22 -07:00 committed by GitHub
parent 523cc3984a
commit f3b71bce2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View file

@ -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,
},

View file

@ -39,7 +39,7 @@ describe('SourceRow', () => {
const source = {
...contentSources[0],
status: 'error',
errorReason: 1,
errorReason: 'credentials_invalid',
};
const wrapper = shallow(<SourceRow isOrganization source={source} />);

View file

@ -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;

View file

@ -106,7 +106,7 @@ export interface ContentSourceDetails extends ContentSource {
isFederatedSource: boolean;
searchable: boolean;
supportedByLicense: boolean;
errorReason: number;
errorReason: string | null;
allowsReauth: boolean;
boost: number;
}