This commit is contained in:
insanity 2017-08-23 19:41:26 +09:00
parent b2bf464700
commit 08a4bf2f6b
3 changed files with 8 additions and 6 deletions

View File

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

View File

@ -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]:

View File

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