test
This commit is contained in:
parent
b2bf464700
commit
08a4bf2f6b
|
@ -3,10 +3,11 @@ import { Table, Button, Header, Container, Menu, Icon } from 'semantic-ui-react'
|
|||
import { ListContainer } from '@overflow/commons/react/component/ListContainer';
|
||||
import Probe from '@overflow/probe/api/model/Probe';
|
||||
import History from '@overflow/history/api/model/History';
|
||||
import Page from '@overflow/commons/api/model/Page';
|
||||
|
||||
export interface StateProps {
|
||||
probeId: string;
|
||||
histories: any;
|
||||
histories: Page;
|
||||
}
|
||||
|
||||
export interface DispatchProps {
|
||||
|
@ -66,7 +67,7 @@ export class HistoryList extends React.Component<Props, State> {
|
|||
this.props.onReadAllByProbe(probe, String(p), String(this.countPerPage));
|
||||
}
|
||||
|
||||
public renderPagination = (pageObj: any): (JSX.Element | JSX.Element[]) => {
|
||||
public renderPagination = (pageObj: Page): (JSX.Element | JSX.Element[]) => {
|
||||
if (pageObj === undefined) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -2,17 +2,17 @@ import Action from '@overflow/commons/redux/Action';
|
|||
import { ReducersMapObject } from 'redux';
|
||||
import Probe from '@overflow/probe/api/model/Probe';
|
||||
import History from '../../api/model/History';
|
||||
|
||||
import Page from '@overflow/commons/api/model/Page';
|
||||
import * as ReadAllByProbeActionTypes from '../action/read_all_by_probe';
|
||||
import ReadAllByProbeState, { defaultState as ReadAllByProbeDefaultState } from '../state/ReadAllByProbe';
|
||||
|
||||
const reducer: ReducersMapObject = {
|
||||
[ReadAllByProbeActionTypes.REQUEST_SUCCESS]:
|
||||
(state: ReadAllByProbeState = ReadAllByProbeDefaultState, action: Action<object>):
|
||||
(state: ReadAllByProbeState = ReadAllByProbeDefaultState, action: Action<Page>):
|
||||
ReadAllByProbeState => {
|
||||
return {
|
||||
...state,
|
||||
historyPage: action.payload,
|
||||
historyPage: <Page>action.payload,
|
||||
};
|
||||
},
|
||||
[ReadAllByProbeActionTypes.REQUEST_FAILURE]:
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import History from '../../api/model/History';
|
||||
import Page from '@overflow/commons/api/model/Page';
|
||||
|
||||
export interface State {
|
||||
readonly historyPage?: object;
|
||||
readonly historyPage?: Page;
|
||||
readonly error?: Error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user