Skip to content

Commit 0875576

Browse files
committed
refactor: use generic library grid container in cp2type list
1 parent 5696035 commit 0875576

File tree

5 files changed

+7
-156
lines changed

5 files changed

+7
-156
lines changed

src/shared/orion/cp2type/Container.jsx

Lines changed: 0 additions & 130 deletions
This file was deleted.

src/shared/orion/cp2type/__tests__/Container.spec.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/shared/orion/cp2type/actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import rest from '../../app/rest'
55
module.exports = {
66
...module.exports,
77
...createTableActions('CP2TYPE_LIST'),
8-
...rest.actions,
8+
...rest.actions.cp2type,
99
}
1010

1111
export function updateCp2Type(customPollerId, sysObjectId, autoAssign = 1) {

src/shared/orion/cp2type/defaultColumns.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ const defaultColumns = Map(
8787
sortable: true,
8888
position: 90,
8989
width: 1,
90-
render: cp2type => (cp2type.autoAssign === '0' ? (
90+
render: cp2type => (cp2type.autoAssign === 0 ? (
9191
'NA'
92-
) : cp2type.autoAssign === '1' ? (
92+
) : cp2type.autoAssign === 1 ? (
9393
'Assign'
94-
) : cp2type.autoAssign === '2' ? (
94+
) : cp2type.autoAssign === 2 ? (
9595
'Unassign'
96-
) : cp2type.autoAssign === '3' ? (
96+
) : cp2type.autoAssign === 3 ? (
9797
'Ignore'
9898
) : 'Unrecognized value'
9999
)

src/shared/orion/cp2type/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
import React, { PropTypes } from 'react'
33
import { connect } from 'react-redux'
44
import { reduxUtils } from '@hhjcz/js-lib'
5+
import { MyGridContainer as Container } from '@hhjcz/react-lib'
56
import rest from '../../app/rest'
67
import * as actions from './actions'
7-
import Container from './Container'
88

99
export default connect(
1010
(state) => ({
11+
title: 'cp2type-list',
1112
...(rest.selectResource('cp2type')(state)),
1213
...(state.cp2typeList.toObject())
1314
}),

0 commit comments

Comments
 (0)