Unverified Commit 0418b964 authored by Diksha Thakur's avatar Diksha Thakur Committed by GitHub

fix: Create separate reducer for last indexed value (#543)

* Added required new files

* Added new reducer for handling lastIndexed

* removed all comments

* suggested changes
parent bcb47ec3
...@@ -85,6 +85,6 @@ describe('mapStateToProps', () => { ...@@ -85,6 +85,6 @@ describe('mapStateToProps', () => {
}); });
it('sets lastIndexed on the props', () => { it('sets lastIndexed on the props', () => {
expect(result.lastIndexed).toEqual(globalState.tableMetadata.lastIndexed); expect(result.lastIndexed).toEqual(globalState.lastIndexed.lastIndexed);
}); });
}); });
...@@ -7,8 +7,8 @@ import { bindActionCreators } from 'redux'; ...@@ -7,8 +7,8 @@ import { bindActionCreators } from 'redux';
// TODO: Use css-modules instead of 'import' // TODO: Use css-modules instead of 'import'
import './styles.scss'; import './styles.scss';
import { GlobalState } from 'ducks/rootReducer'; import { GlobalState } from 'ducks/rootReducer';
import { getLastIndexed } from 'ducks/tableMetadata/reducer'; import { getLastIndexed } from 'ducks/lastIndexed/reducer';
import { GetLastIndexedRequest } from 'ducks/tableMetadata/types'; import { GetLastIndexedRequest } from 'ducks/lastIndexed/types';
import { formatDateTimeLong } from 'utils/dateUtils'; import { formatDateTimeLong } from 'utils/dateUtils';
...@@ -33,7 +33,9 @@ const ShimmeringFooterLoader: React.FC = () => { ...@@ -33,7 +33,9 @@ const ShimmeringFooterLoader: React.FC = () => {
export class Footer extends React.Component<FooterProps> { export class Footer extends React.Component<FooterProps> {
componentDidMount() { componentDidMount() {
this.props.getLastIndexed(); const { getLastIndexed } = this.props;
getLastIndexed();
} }
generateDateTimeString = () => { generateDateTimeString = () => {
...@@ -62,7 +64,7 @@ export class Footer extends React.Component<FooterProps> { ...@@ -62,7 +64,7 @@ export class Footer extends React.Component<FooterProps> {
export const mapStateToProps = (state: GlobalState) => { export const mapStateToProps = (state: GlobalState) => {
return { return {
lastIndexed: state.tableMetadata.lastIndexed, lastIndexed: state.lastIndexed.lastIndexed,
}; };
}; };
......
import axios, { AxiosResponse, AxiosError } from 'axios';
export const API_PATH = '/api/metadata/v0';
type MessageAPI = { msg: string };
export type LastIndexedAPI = { timestamp: string } & MessageAPI;
export function getLastIndexed() {
return axios
.get(`${API_PATH}/get_last_indexed`)
.then((response: AxiosResponse<LastIndexedAPI>) => {
const { data } = response;
return data.timestamp;
})
.catch((e) => {
const timestamp = null;
return Promise.reject({
timestamp,
});
});
}
import {
GetLastIndexed,
GetLastIndexedRequest,
GetLastIndexedResponse,
} from './types';
export interface LastIndexedReducerState {
lastIndexed: number;
}
export const initialState: LastIndexedReducerState = {
lastIndexed: null,
};
/* ACTIONS */
export function getLastIndexed(): GetLastIndexedRequest {
return { type: GetLastIndexed.REQUEST };
}
export function getLastIndexedFailure(): GetLastIndexedResponse {
return { type: GetLastIndexed.FAILURE };
}
export function getLastIndexedSuccess(
lastIndexedEpoch: number
): GetLastIndexedResponse {
return {
type: GetLastIndexed.SUCCESS,
payload: {
lastIndexedEpoch,
},
};
}
/* REDUCER */
export default function reducer(
state: LastIndexedReducerState = initialState,
action
): LastIndexedReducerState {
switch (action.type) {
case GetLastIndexed.REQUEST:
return initialState;
case GetLastIndexed.SUCCESS:
return {
lastIndexed: (<GetLastIndexedResponse>action).payload.lastIndexedEpoch,
};
case GetLastIndexed.FAILURE:
return {
lastIndexed: null,
};
default:
return state;
}
}
import { SagaIterator } from 'redux-saga';
import { call, put, takeEvery } from 'redux-saga/effects';
import * as API from 'ducks/lastIndexed/api/v0';
import { getLastIndexedFailure, getLastIndexedSuccess } from './reducer';
import { GetLastIndexed, GetLastIndexedRequest } from './types';
export function* getLastIndexedWorker(
action: GetLastIndexedRequest
): SagaIterator {
try {
const lastIndexed = yield call(API.getLastIndexed);
if (lastIndexed) {
yield put(getLastIndexedSuccess(lastIndexed));
} else {
yield put(getLastIndexedFailure());
}
} catch (e) {
yield put(getLastIndexedFailure());
}
}
export function* getLastIndexedWatcher(): SagaIterator {
yield takeEvery(GetLastIndexed.REQUEST, getLastIndexedWorker);
}
import { testSaga } from 'redux-saga-test-plan';
import * as API from '../api/v0';
import reducer, {
getLastIndexed,
getLastIndexedFailure,
getLastIndexedSuccess,
initialState,
LastIndexedReducerState,
} from '../reducer';
import { getLastIndexedWatcher, getLastIndexedWorker } from '../sagas';
import { GetLastIndexed } from '../types';
describe('lastIndexed ducks', () => {
let testEpoch: number;
beforeAll(() => {
testEpoch = 1545925769;
});
describe('actions', () => {
it('getLastIndexed - returns the action to get the last indexed date', () => {
const action = getLastIndexed();
expect(action.type).toBe(GetLastIndexed.REQUEST);
});
it('getLastIndexedFailure - returns the action to process failure', () => {
const action = getLastIndexedFailure();
expect(action.type).toBe(GetLastIndexed.FAILURE);
});
it('getLastIndexedSuccess - returns the action to process success', () => {
const action = getLastIndexedSuccess(testEpoch);
const { payload } = action;
expect(action.type).toBe(GetLastIndexed.SUCCESS);
expect(payload.lastIndexedEpoch).toBe(testEpoch);
});
});
describe('reducer', () => {
let testState: LastIndexedReducerState;
beforeAll(() => {
testState = initialState;
});
it('should return the existing state if action is not handled', () => {
expect(reducer(testState, { type: 'INVALID.ACTION' })).toEqual(testState);
});
it('should handle GetLastIndexed.REQUEST', () => {
expect(reducer(testState, getLastIndexed())).toEqual(initialState);
});
it('should handle GetLastIndexed.FAILURE', () => {
expect(reducer(testState, getLastIndexedFailure())).toEqual({
lastIndexed: null,
});
});
it('should handle GetLastIndexed.SUCCESS', () => {
expect(reducer(testState, getLastIndexedSuccess(testEpoch))).toEqual({
lastIndexed: testEpoch,
});
});
});
describe('sagas', () => {
describe('getLastIndexedWatcher', () => {
it('takes every GetLastIndexed.REQUEST with getLastIndexedWorker', () => {
testSaga(getLastIndexedWatcher)
.next()
.takeEvery(GetLastIndexed.REQUEST, getLastIndexedWorker)
.next()
.isDone();
});
});
describe('getLastIndexedWorker', () => {
it('executes flow for getting last indexed value', () => {
testSaga(getLastIndexedWorker, getLastIndexed())
.next()
.call(API.getLastIndexed)
.next(testEpoch)
.put(getLastIndexedSuccess(testEpoch))
.next()
.isDone();
});
it('handles request error', () => {
testSaga(getLastIndexedWorker, getLastIndexed())
.next()
.throw(new Error())
.put(getLastIndexedFailure())
.next()
.isDone();
});
});
});
});
export enum GetLastIndexed {
REQUEST = 'amundsen/GET_LAST_UPDATED_REQUEST',
SUCCESS = 'amundsen/GET_LAST_UPDATED_SUCCESS',
FAILURE = 'amundsen/GET_LAST_UPDATED_FAILURE',
}
export interface GetLastIndexedRequest {
type: GetLastIndexed.REQUEST;
}
export interface GetLastIndexedResponse {
type: GetLastIndexed.SUCCESS | GetLastIndexed.FAILURE;
payload?: GetLastIndexedPayload;
}
export interface GetLastIndexedPayload {
lastIndexedEpoch?: number;
}
...@@ -12,6 +12,7 @@ import search, { SearchReducerState } from './search/reducer'; ...@@ -12,6 +12,7 @@ import search, { SearchReducerState } from './search/reducer';
import tableMetadata, { import tableMetadata, {
TableMetadataReducerState, TableMetadataReducerState,
} from './tableMetadata/reducer'; } from './tableMetadata/reducer';
import lastIndexed, { LastIndexedReducerState } from './lastIndexed/reducer';
import tags, { TagsReducerState } from './tags/reducer'; import tags, { TagsReducerState } from './tags/reducer';
import user, { UserReducerState } from './user/reducer'; import user, { UserReducerState } from './user/reducer';
import bookmarks, { BookmarkReducerState } from './bookmark/reducer'; import bookmarks, { BookmarkReducerState } from './bookmark/reducer';
...@@ -28,6 +29,7 @@ export interface GlobalState { ...@@ -28,6 +29,7 @@ export interface GlobalState {
popularTables: PopularTablesReducerState; popularTables: PopularTablesReducerState;
search: SearchReducerState; search: SearchReducerState;
tableMetadata: TableMetadataReducerState; tableMetadata: TableMetadataReducerState;
lastIndexed: LastIndexedReducerState;
tags: TagsReducerState; tags: TagsReducerState;
user: UserReducerState; user: UserReducerState;
} }
...@@ -42,6 +44,7 @@ export default combineReducers<GlobalState>({ ...@@ -42,6 +44,7 @@ export default combineReducers<GlobalState>({
popularTables, popularTables,
search, search,
tableMetadata, tableMetadata,
lastIndexed,
tags, tags,
user, user,
}); });
...@@ -44,13 +44,15 @@ import { updateTableOwnerWatcher } from './tableMetadata/owners/sagas'; ...@@ -44,13 +44,15 @@ import { updateTableOwnerWatcher } from './tableMetadata/owners/sagas';
import { import {
getTableDataWatcher, getTableDataWatcher,
getColumnDescriptionWatcher, getColumnDescriptionWatcher,
getLastIndexedWatcher,
getPreviewDataWatcher, getPreviewDataWatcher,
getTableDescriptionWatcher, getTableDescriptionWatcher,
updateColumnDescriptionWatcher, updateColumnDescriptionWatcher,
updateTableDescriptionWatcher, updateTableDescriptionWatcher,
} from './tableMetadata/sagas'; } from './tableMetadata/sagas';
// LastIndexed
import { getLastIndexedWatcher } from './lastIndexed/sagas';
// Tags // Tags
import { getAllTagsWatcher, updateResourceTagsWatcher } from './tags/sagas'; import { getAllTagsWatcher, updateResourceTagsWatcher } from './tags/sagas';
...@@ -100,12 +102,13 @@ export default function* rootSaga() { ...@@ -100,12 +102,13 @@ export default function* rootSaga() {
// TableDetail // TableDetail
getTableDataWatcher(), getTableDataWatcher(),
getColumnDescriptionWatcher(), getColumnDescriptionWatcher(),
getLastIndexedWatcher(),
getPreviewDataWatcher(), getPreviewDataWatcher(),
getTableDescriptionWatcher(), getTableDescriptionWatcher(),
updateColumnDescriptionWatcher(), updateColumnDescriptionWatcher(),
updateTableDescriptionWatcher(), updateTableDescriptionWatcher(),
updateTableOwnerWatcher(), updateTableOwnerWatcher(),
// LastIndexed
getLastIndexedWatcher(),
// User // User
getLoggedInUserWatcher(), getLoggedInUserWatcher(),
getUserWatcher(), getUserWatcher(),
......
...@@ -31,7 +31,6 @@ export type TableData = TableMetadata & { ...@@ -31,7 +31,6 @@ export type TableData = TableMetadata & {
tags: Tag[]; tags: Tag[];
}; };
export type DescriptionAPI = { description: string } & MessageAPI; export type DescriptionAPI = { description: string } & MessageAPI;
export type LastIndexedAPI = { timestamp: string } & MessageAPI;
export type PreviewDataAPI = { previewData: PreviewData } & MessageAPI; export type PreviewDataAPI = { previewData: PreviewData } & MessageAPI;
export type TableDataAPI = { tableData: TableData } & MessageAPI; export type TableDataAPI = { tableData: TableData } & MessageAPI;
export type RelatedDashboardDataAPI = { export type RelatedDashboardDataAPI = {
...@@ -173,14 +172,6 @@ export function updateColumnDescription( ...@@ -173,14 +172,6 @@ export function updateColumnDescription(
}); });
} }
export function getLastIndexed() {
return axios
.get(`${API_PATH}/get_last_indexed`)
.then((response: AxiosResponse<LastIndexedAPI>) => {
return response.data.timestamp;
});
}
export function getPreviewData(queryParams: PreviewQueryParams) { export function getPreviewData(queryParams: PreviewQueryParams) {
return axios({ return axios({
url: '/api/preview/v0/', url: '/api/preview/v0/',
......
...@@ -24,9 +24,6 @@ import { ...@@ -24,9 +24,6 @@ import {
GetColumnDescriptionRequest, GetColumnDescriptionRequest,
UpdateColumnDescription, UpdateColumnDescription,
UpdateColumnDescriptionRequest, UpdateColumnDescriptionRequest,
GetLastIndexed,
GetLastIndexedRequest,
GetLastIndexedResponse,
GetPreviewData, GetPreviewData,
GetPreviewDataRequest, GetPreviewDataRequest,
GetPreviewDataResponse, GetPreviewDataResponse,
...@@ -66,7 +63,6 @@ export const initialTableDataState: TableMetadata = { ...@@ -66,7 +63,6 @@ export const initialTableDataState: TableMetadata = {
export const initialState: TableMetadataReducerState = { export const initialState: TableMetadataReducerState = {
isLoading: true, isLoading: true,
lastIndexed: null,
preview: initialPreviewState, preview: initialPreviewState,
statusCode: null, statusCode: null,
tableData: initialTableDataState, tableData: initialTableDataState,
...@@ -231,23 +227,6 @@ export function updateColumnDescription( ...@@ -231,23 +227,6 @@ export function updateColumnDescription(
}; };
} }
export function getLastIndexed(): GetLastIndexedRequest {
return { type: GetLastIndexed.REQUEST };
}
export function getLastIndexedFailure(): GetLastIndexedResponse {
return { type: GetLastIndexed.FAILURE };
}
export function getLastIndexedSuccess(
lastIndexedEpoch: number
): GetLastIndexedResponse {
return {
type: GetLastIndexed.SUCCESS,
payload: {
lastIndexedEpoch,
},
};
}
export function getPreviewData( export function getPreviewData(
queryParams: PreviewQueryParams queryParams: PreviewQueryParams
): GetPreviewDataRequest { ): GetPreviewDataRequest {
...@@ -286,7 +265,6 @@ export interface TableMetadataReducerState { ...@@ -286,7 +265,6 @@ export interface TableMetadataReducerState {
errorMessage?: string; errorMessage?: string;
}; };
isLoading: boolean; isLoading: boolean;
lastIndexed: number;
preview: { preview: {
data: PreviewData; data: PreviewData;
status: number | null; status: number | null;
...@@ -311,10 +289,7 @@ export default function reducer( ...@@ -311,10 +289,7 @@ export default function reducer(
}, },
}; };
case GetTableData.REQUEST: case GetTableData.REQUEST:
return { return initialState;
...initialState,
lastIndexed: state.lastIndexed,
};
case GetTableData.FAILURE: case GetTableData.FAILURE:
return { return {
...state, ...state,
...@@ -344,13 +319,6 @@ export default function reducer( ...@@ -344,13 +319,6 @@ export default function reducer(
...state, ...state,
tableData: (<GetColumnDescriptionResponse>action).payload.tableMetadata, tableData: (<GetColumnDescriptionResponse>action).payload.tableMetadata,
}; };
case GetLastIndexed.FAILURE:
return { ...state, lastIndexed: null };
case GetLastIndexed.SUCCESS:
return {
...state,
lastIndexed: (<GetLastIndexedResponse>action).payload.lastIndexedEpoch,
};
case GetPreviewData.FAILURE: case GetPreviewData.FAILURE:
case GetPreviewData.SUCCESS: case GetPreviewData.SUCCESS:
return { ...state, preview: (<GetPreviewDataResponse>action).payload }; return { ...state, preview: (<GetPreviewDataResponse>action).payload };
......
...@@ -11,15 +11,11 @@ import { ...@@ -11,15 +11,11 @@ import {
getTableDescriptionSuccess, getTableDescriptionSuccess,
getColumnDescriptionFailure, getColumnDescriptionFailure,
getColumnDescriptionSuccess, getColumnDescriptionSuccess,
getLastIndexedFailure,
getLastIndexedSuccess,
getPreviewDataFailure, getPreviewDataFailure,
getPreviewDataSuccess, getPreviewDataSuccess,
} from './reducer'; } from './reducer';
import { import {
GetLastIndexed,
GetLastIndexedRequest,
GetPreviewData, GetPreviewData,
GetPreviewDataRequest, GetPreviewDataRequest,
GetTableData, GetTableData,
...@@ -164,20 +160,6 @@ export function* updateColumnDescriptionWatcher(): SagaIterator { ...@@ -164,20 +160,6 @@ export function* updateColumnDescriptionWatcher(): SagaIterator {
); );
} }
export function* getLastIndexedWorker(
action: GetLastIndexedRequest
): SagaIterator {
try {
const lastIndexed = yield call(API.getLastIndexed);
yield put(getLastIndexedSuccess(lastIndexed));
} catch (e) {
yield put(getLastIndexedFailure());
}
}
export function* getLastIndexedWatcher(): SagaIterator {
yield takeEvery(GetLastIndexed.REQUEST, getLastIndexedWorker);
}
export function* getPreviewDataWorker( export function* getPreviewDataWorker(
action: GetPreviewDataRequest action: GetPreviewDataRequest
): SagaIterator { ): SagaIterator {
......
...@@ -28,9 +28,6 @@ import reducer, { ...@@ -28,9 +28,6 @@ import reducer, {
getColumnDescriptionFailure, getColumnDescriptionFailure,
getColumnDescriptionSuccess, getColumnDescriptionSuccess,
updateColumnDescription, updateColumnDescription,
getLastIndexed,
getLastIndexedFailure,
getLastIndexedSuccess,
getPreviewData, getPreviewData,
getPreviewDataFailure, getPreviewDataFailure,
getPreviewDataSuccess, getPreviewDataSuccess,
...@@ -51,8 +48,6 @@ import { ...@@ -51,8 +48,6 @@ import {
getColumnDescriptionWorker, getColumnDescriptionWorker,
updateColumnDescriptionWatcher, updateColumnDescriptionWatcher,
updateColumnDescriptionWorker, updateColumnDescriptionWorker,
getLastIndexedWatcher,
getLastIndexedWorker,
getPreviewDataWatcher, getPreviewDataWatcher,
getPreviewDataWorker, getPreviewDataWorker,
} from '../sagas'; } from '../sagas';
...@@ -63,7 +58,6 @@ import { ...@@ -63,7 +58,6 @@ import {
UpdateTableDescription, UpdateTableDescription,
GetColumnDescription, GetColumnDescription,
UpdateColumnDescription, UpdateColumnDescription,
GetLastIndexed,
GetPreviewData, GetPreviewData,
} from '../types'; } from '../types';
...@@ -84,7 +78,6 @@ describe('tableMetadata ducks', () => { ...@@ -84,7 +78,6 @@ describe('tableMetadata ducks', () => {
let newDescription: string; let newDescription: string;
let previewData: PreviewData; let previewData: PreviewData;
let queryParams: PreviewQueryParams; let queryParams: PreviewQueryParams;
let testEpoch: number;
beforeAll(() => { beforeAll(() => {
expectedData = globalState.tableMetadata.tableData; expectedData = globalState.tableMetadata.tableData;
expectedOwners = { expectedOwners = {
...@@ -130,7 +123,6 @@ describe('tableMetadata ducks', () => { ...@@ -130,7 +123,6 @@ describe('tableMetadata ducks', () => {
schema: 'testSchema', schema: 'testSchema',
tableName: 'testName', tableName: 'testName',
}; };
testEpoch = 1545925769;
}); });
describe('actions', () => { describe('actions', () => {
...@@ -245,23 +237,6 @@ describe('tableMetadata ducks', () => { ...@@ -245,23 +237,6 @@ describe('tableMetadata ducks', () => {
expect(payload.onFailure).toBe(mockFailure); expect(payload.onFailure).toBe(mockFailure);
}); });
it('getLastIndexed - returns the action to get the last indexed date of the table', () => {
const action = getLastIndexed();
expect(action.type).toBe(GetLastIndexed.REQUEST);
});
it('getLastIndexedFailure - returns the action to process failure', () => {
const action = getLastIndexedFailure();
expect(action.type).toBe(GetLastIndexed.FAILURE);
});
it('getLastIndexedSuccess - returns the action to process success', () => {
const action = getLastIndexedSuccess(testEpoch);
const { payload } = action;
expect(action.type).toBe(GetLastIndexed.SUCCESS);
expect(payload.lastIndexedEpoch).toBe(testEpoch);
});
it('getPreviewData - returns the action to get the preview table data', () => { it('getPreviewData - returns the action to get the preview table data', () => {
const action = getPreviewData(queryParams); const action = getPreviewData(queryParams);
const { payload } = action; const { payload } = action;
...@@ -352,20 +327,6 @@ describe('tableMetadata ducks', () => { ...@@ -352,20 +327,6 @@ describe('tableMetadata ducks', () => {
}); });
}); });
it('should handle GetLastIndexed.FAILURE', () => {
expect(reducer(testState, getLastIndexedFailure())).toEqual({
...testState,
lastIndexed: null,
});
});
it('should handle GetLastIndexed.SUCCESS', () => {
expect(reducer(testState, getLastIndexedSuccess(testEpoch))).toEqual({
...testState,
lastIndexed: testEpoch,
});
});
it('should handle GetPreviewData.FAILURE', () => { it('should handle GetPreviewData.FAILURE', () => {
const action = getPreviewDataFailure({}, 500); const action = getPreviewDataFailure({}, 500);
expect(reducer(testState, action)).toEqual({ expect(reducer(testState, action)).toEqual({
...@@ -720,37 +681,6 @@ describe('tableMetadata ducks', () => { ...@@ -720,37 +681,6 @@ describe('tableMetadata ducks', () => {
}); });
}); });
describe('getLastIndexedWatcher', () => {
it('takes every GetLastIndexed.REQUEST with getLastIndexedWorker', () => {
testSaga(getLastIndexedWatcher)
.next()
.takeEvery(GetLastIndexed.REQUEST, getLastIndexedWorker)
.next()
.isDone();
});
});
describe('getLastIndexedWorker', () => {
it('executes flow for getting last indexed value', () => {
testSaga(getLastIndexedWorker, getLastIndexed())
.next()
.call(API.getLastIndexed)
.next(testEpoch)
.put(getLastIndexedSuccess(testEpoch))
.next()
.isDone();
});
it('handles request error', () => {
testSaga(getLastIndexedWorker, getLastIndexed())
.next()
.throw(new Error())
.put(getLastIndexedFailure())
.next()
.isDone();
});
});
describe('getPreviewDataWatcher', () => { describe('getPreviewDataWatcher', () => {
it('takes every GetPreviewData.REQUEST with getPreviewDataWorker', () => { it('takes every GetPreviewData.REQUEST with getPreviewDataWorker', () => {
testSaga(getPreviewDataWatcher) testSaga(getPreviewDataWatcher)
......
...@@ -116,21 +116,6 @@ export interface UpdateColumnDescriptionResponse { ...@@ -116,21 +116,6 @@ export interface UpdateColumnDescriptionResponse {
type: UpdateColumnDescription.SUCCESS | UpdateColumnDescription.FAILURE; type: UpdateColumnDescription.SUCCESS | UpdateColumnDescription.FAILURE;
} }
export enum GetLastIndexed {
REQUEST = 'amundsen/tableMetadata/GET_LAST_UPDATED_REQUEST',
SUCCESS = 'amundsen/tableMetadata/GET_LAST_UPDATED_SUCCESS',
FAILURE = 'amundsen/tableMetadata/GET_LAST_UPDATED_FAILURE',
}
export interface GetLastIndexedRequest {
type: GetLastIndexed.REQUEST;
}
export interface GetLastIndexedResponse {
type: GetLastIndexed.SUCCESS | GetLastIndexed.FAILURE;
payload?: {
lastIndexedEpoch: number;
};
}
export enum GetPreviewData { export enum GetPreviewData {
REQUEST = 'amundsen/preview/GET_PREVIEW_DATA_REQUEST', REQUEST = 'amundsen/preview/GET_PREVIEW_DATA_REQUEST',
SUCCESS = 'amundsen/preview/GET_PREVIEW_DATA_SUCCESS', SUCCESS = 'amundsen/preview/GET_PREVIEW_DATA_SUCCESS',
......
...@@ -148,7 +148,6 @@ const globalState: GlobalState = { ...@@ -148,7 +148,6 @@ const globalState: GlobalState = {
}, },
tableMetadata: { tableMetadata: {
isLoading: true, isLoading: true,
lastIndexed: 1555632106,
preview: { preview: {
data: {}, data: {},
status: null, status: null,
...@@ -179,6 +178,7 @@ const globalState: GlobalState = { ...@@ -179,6 +178,7 @@ const globalState: GlobalState = {
owners: {}, owners: {},
}, },
}, },
lastIndexed: { lastIndexed: 1555632106 },
tags: { tags: {
allTags: { allTags: {
isLoading: false, isLoading: false,
......
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