mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
parent
e89c3bb564
commit
4168ee4bec
11 changed files with 25 additions and 27 deletions
|
@ -75,7 +75,7 @@
|
|||
"url": "https://github.com/elastic/kibana.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@elastic/eui": "v0.0.47",
|
||||
"@elastic/eui": "v0.0.49",
|
||||
"@elastic/filesaver": "1.1.2",
|
||||
"@elastic/numeral": "2.3.2",
|
||||
"@elastic/ui-ace": "0.2.3",
|
||||
|
|
|
@ -72,7 +72,7 @@ exports[`after fetch hideWriteControls 1`] = `
|
|||
},
|
||||
]
|
||||
}
|
||||
itemIdToExpandedRowMap={Object {}}
|
||||
itemId="id"
|
||||
items={Array []}
|
||||
loading={false}
|
||||
noItemsMessage={
|
||||
|
@ -104,7 +104,6 @@ exports[`after fetch hideWriteControls 1`] = `
|
|||
responsive={true}
|
||||
selection={
|
||||
Object {
|
||||
"itemId": "id",
|
||||
"onSelectionChange": [Function],
|
||||
}
|
||||
}
|
||||
|
@ -208,7 +207,7 @@ exports[`after fetch renders call to action when no dashboards exist 1`] = `
|
|||
},
|
||||
]
|
||||
}
|
||||
itemIdToExpandedRowMap={Object {}}
|
||||
itemId="id"
|
||||
items={Array []}
|
||||
loading={false}
|
||||
noItemsMessage={
|
||||
|
@ -253,7 +252,6 @@ exports[`after fetch renders call to action when no dashboards exist 1`] = `
|
|||
responsive={true}
|
||||
selection={
|
||||
Object {
|
||||
"itemId": "id",
|
||||
"onSelectionChange": [Function],
|
||||
}
|
||||
}
|
||||
|
@ -357,7 +355,7 @@ exports[`after fetch renders table rows 1`] = `
|
|||
},
|
||||
]
|
||||
}
|
||||
itemIdToExpandedRowMap={Object {}}
|
||||
itemId="id"
|
||||
items={
|
||||
Array [
|
||||
Object {
|
||||
|
@ -390,7 +388,6 @@ exports[`after fetch renders table rows 1`] = `
|
|||
responsive={true}
|
||||
selection={
|
||||
Object {
|
||||
"itemId": "id",
|
||||
"onSelectionChange": [Function],
|
||||
}
|
||||
}
|
||||
|
@ -525,7 +522,7 @@ exports[`after fetch renders warning when listingLimit is exceeded 1`] = `
|
|||
},
|
||||
]
|
||||
}
|
||||
itemIdToExpandedRowMap={Object {}}
|
||||
itemId="id"
|
||||
items={
|
||||
Array [
|
||||
Object {
|
||||
|
@ -558,7 +555,6 @@ exports[`after fetch renders warning when listingLimit is exceeded 1`] = `
|
|||
responsive={true}
|
||||
selection={
|
||||
Object {
|
||||
"itemId": "id",
|
||||
"onSelectionChange": [Function],
|
||||
}
|
||||
}
|
||||
|
@ -662,7 +658,7 @@ exports[`initialFilter 1`] = `
|
|||
},
|
||||
]
|
||||
}
|
||||
itemIdToExpandedRowMap={Object {}}
|
||||
itemId="id"
|
||||
items={Array []}
|
||||
loading={true}
|
||||
noItemsMessage=""
|
||||
|
@ -682,7 +678,6 @@ exports[`initialFilter 1`] = `
|
|||
responsive={true}
|
||||
selection={
|
||||
Object {
|
||||
"itemId": "id",
|
||||
"onSelectionChange": [Function],
|
||||
}
|
||||
}
|
||||
|
@ -786,7 +781,7 @@ exports[`renders table in loading state 1`] = `
|
|||
},
|
||||
]
|
||||
}
|
||||
itemIdToExpandedRowMap={Object {}}
|
||||
itemId="id"
|
||||
items={Array []}
|
||||
loading={true}
|
||||
noItemsMessage=""
|
||||
|
@ -806,7 +801,6 @@ exports[`renders table in loading state 1`] = `
|
|||
responsive={true}
|
||||
selection={
|
||||
Object {
|
||||
"itemId": "id",
|
||||
"onSelectionChange": [Function],
|
||||
}
|
||||
}
|
||||
|
|
|
@ -323,7 +323,6 @@ export class DashboardListing extends React.Component {
|
|||
pageSizeOptions: [10, 20, 50],
|
||||
};
|
||||
const selection = {
|
||||
itemId: 'id',
|
||||
onSelectionChange: (selection) => {
|
||||
this.setState({
|
||||
selectedIds: selection.map(item => { return item.id; })
|
||||
|
@ -340,6 +339,7 @@ export class DashboardListing extends React.Component {
|
|||
const items = this.state.dashboards.length === 0 ? [] : this.getPageOfItems();
|
||||
return (
|
||||
<EuiBasicTable
|
||||
itemId={'id'}
|
||||
items={items}
|
||||
loading={this.state.isFetchingItems}
|
||||
columns={tableColumns}
|
||||
|
|
|
@ -167,6 +167,7 @@ exports[`ObjectsTable should render normally 1`] = `
|
|||
getEditUrl={[Function]}
|
||||
goInApp={[Function]}
|
||||
isSearching={false}
|
||||
itemId="id"
|
||||
items={
|
||||
Array [
|
||||
Object {
|
||||
|
@ -205,7 +206,6 @@ exports[`ObjectsTable should render normally 1`] = `
|
|||
selectedSavedObjects={Array []}
|
||||
selectionConfig={
|
||||
Object {
|
||||
"itemId": "id",
|
||||
"onSelectionChange": [Function],
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ exports[`Table should render normally 1`] = `
|
|||
},
|
||||
]
|
||||
}
|
||||
itemIdToExpandedRowMap={Object {}}
|
||||
itemId="id"
|
||||
items={
|
||||
Array [
|
||||
3,
|
||||
|
@ -116,7 +116,6 @@ exports[`Table should render normally 1`] = `
|
|||
responsive={true}
|
||||
selection={
|
||||
Object {
|
||||
"itemId": "id",
|
||||
"onSelectionChange": [Function],
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ describe('Table', () => {
|
|||
const props = {
|
||||
selectedSavedObjects: [1],
|
||||
selectionConfig: {
|
||||
itemId: 'id',
|
||||
onSelectionChange: () => {},
|
||||
},
|
||||
filterOptions: [2],
|
||||
|
@ -37,6 +36,7 @@ describe('Table', () => {
|
|||
pageIndex: 1,
|
||||
pageSize: 2,
|
||||
items: [3],
|
||||
itemId: 'id',
|
||||
totalItemCount: 3,
|
||||
onQueryChange: () => {},
|
||||
onTableChange: () => {},
|
||||
|
|
|
@ -16,7 +16,6 @@ export class Table extends PureComponent {
|
|||
static propTypes = {
|
||||
selectedSavedObjects: PropTypes.array.isRequired,
|
||||
selectionConfig: PropTypes.shape({
|
||||
itemId: PropTypes.string.isRequired,
|
||||
selectable: PropTypes.func,
|
||||
selectableMessage: PropTypes.func,
|
||||
onSelectionChange: PropTypes.func.isRequired,
|
||||
|
@ -30,6 +29,10 @@ export class Table extends PureComponent {
|
|||
pageIndex: PropTypes.number.isRequired,
|
||||
pageSize: PropTypes.number.isRequired,
|
||||
items: PropTypes.array.isRequired,
|
||||
itemId: PropTypes.oneOfType([
|
||||
PropTypes.string, // the name of the item id property
|
||||
PropTypes.func // (item) => string
|
||||
]),
|
||||
totalItemCount: PropTypes.number.isRequired,
|
||||
onQueryChange: PropTypes.func.isRequired,
|
||||
onTableChange: PropTypes.func.isRequired,
|
||||
|
@ -42,6 +45,7 @@ export class Table extends PureComponent {
|
|||
const {
|
||||
pageIndex,
|
||||
pageSize,
|
||||
itemId,
|
||||
items,
|
||||
totalItemCount,
|
||||
isSearching,
|
||||
|
@ -168,6 +172,7 @@ export class Table extends PureComponent {
|
|||
<div data-test-subj="savedObjectsTable">
|
||||
<EuiBasicTable
|
||||
loading={isSearching}
|
||||
itemId={itemId}
|
||||
items={items}
|
||||
columns={columns}
|
||||
pagination={pagination}
|
||||
|
|
|
@ -435,7 +435,6 @@ export class ObjectsTable extends Component {
|
|||
} = this.state;
|
||||
|
||||
const selectionConfig = {
|
||||
itemId: 'id',
|
||||
onSelectionChange: this.onSelectionChanged,
|
||||
};
|
||||
|
||||
|
@ -461,6 +460,7 @@ export class ObjectsTable extends Component {
|
|||
/>
|
||||
<EuiSpacer size="xs" />
|
||||
<Table
|
||||
itemId={'id'}
|
||||
selectionConfig={selectionConfig}
|
||||
selectedSavedObjects={selectedSavedObjects}
|
||||
onQueryChange={this.onQueryChange}
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
"yargs": "4.7.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@elastic/eui": "0.0.47",
|
||||
"@elastic/eui": "0.0.49",
|
||||
"@elastic/node-crypto": "0.1.2",
|
||||
"@elastic/node-phantom-simple": "2.2.4",
|
||||
"@elastic/numeral": "2.3.2",
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
esutils "^2.0.2"
|
||||
js-tokens "^3.0.0"
|
||||
|
||||
"@elastic/eui@0.0.47":
|
||||
version "0.0.47"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-0.0.47.tgz#5bae27966bb1d68bb3106853610a407509053b44"
|
||||
"@elastic/eui@0.0.49":
|
||||
version "0.0.49"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-0.0.49.tgz#583b3c1526df352b99a6cf13bd750d6d5adfb949"
|
||||
dependencies:
|
||||
brace "^0.10.0"
|
||||
classnames "^2.2.5"
|
||||
|
|
|
@ -77,9 +77,9 @@
|
|||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@elastic/eui@0.0.47", "@elastic/eui@v0.0.47":
|
||||
version "0.0.47"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-0.0.47.tgz#5bae27966bb1d68bb3106853610a407509053b44"
|
||||
"@elastic/eui@0.0.49", "@elastic/eui@v0.0.49":
|
||||
version "0.0.49"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-0.0.49.tgz#583b3c1526df352b99a6cf13bd750d6d5adfb949"
|
||||
dependencies:
|
||||
brace "^0.10.0"
|
||||
classnames "^2.2.5"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue