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 { ListContainer } from '@overflow/commons/react/component/ListContainer';
|
||||||
import Probe from '@overflow/probe/api/model/Probe';
|
import Probe from '@overflow/probe/api/model/Probe';
|
||||||
import History from '@overflow/history/api/model/History';
|
import History from '@overflow/history/api/model/History';
|
||||||
|
import Page from '@overflow/commons/api/model/Page';
|
||||||
|
|
||||||
export interface StateProps {
|
export interface StateProps {
|
||||||
probeId: string;
|
probeId: string;
|
||||||
histories: any;
|
histories: Page;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DispatchProps {
|
export interface DispatchProps {
|
||||||
|
@ -66,7 +67,7 @@ export class HistoryList extends React.Component<Props, State> {
|
||||||
this.props.onReadAllByProbe(probe, String(p), String(this.countPerPage));
|
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) {
|
if (pageObj === undefined) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,17 +2,17 @@ import Action from '@overflow/commons/redux/Action';
|
||||||
import { ReducersMapObject } from 'redux';
|
import { ReducersMapObject } from 'redux';
|
||||||
import Probe from '@overflow/probe/api/model/Probe';
|
import Probe from '@overflow/probe/api/model/Probe';
|
||||||
import History from '../../api/model/History';
|
import History from '../../api/model/History';
|
||||||
|
import Page from '@overflow/commons/api/model/Page';
|
||||||
import * as ReadAllByProbeActionTypes from '../action/read_all_by_probe';
|
import * as ReadAllByProbeActionTypes from '../action/read_all_by_probe';
|
||||||
import ReadAllByProbeState, { defaultState as ReadAllByProbeDefaultState } from '../state/ReadAllByProbe';
|
import ReadAllByProbeState, { defaultState as ReadAllByProbeDefaultState } from '../state/ReadAllByProbe';
|
||||||
|
|
||||||
const reducer: ReducersMapObject = {
|
const reducer: ReducersMapObject = {
|
||||||
[ReadAllByProbeActionTypes.REQUEST_SUCCESS]:
|
[ReadAllByProbeActionTypes.REQUEST_SUCCESS]:
|
||||||
(state: ReadAllByProbeState = ReadAllByProbeDefaultState, action: Action<object>):
|
(state: ReadAllByProbeState = ReadAllByProbeDefaultState, action: Action<Page>):
|
||||||
ReadAllByProbeState => {
|
ReadAllByProbeState => {
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
historyPage: action.payload,
|
historyPage: <Page>action.payload,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
[ReadAllByProbeActionTypes.REQUEST_FAILURE]:
|
[ReadAllByProbeActionTypes.REQUEST_FAILURE]:
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import History from '../../api/model/History';
|
import History from '../../api/model/History';
|
||||||
|
import Page from '@overflow/commons/api/model/Page';
|
||||||
|
|
||||||
export interface State {
|
export interface State {
|
||||||
readonly historyPage?: object;
|
readonly historyPage?: Page;
|
||||||
readonly error?: Error;
|
readonly error?: Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user