mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
All these tables are for large datasets, which makes the sorting misleading. After we have the states index we can query things in such a way that we can enable sorting (and pagination!). Till then we should disable these to better adhere to the principle of least surprise.
This commit is contained in:
parent
02c2d9cbb9
commit
56075e0190
6 changed files with 4 additions and 34 deletions
|
@ -25,35 +25,29 @@ exports[`ErrorList component renders the error list without errors 1`] = `
|
|||
Object {
|
||||
"field": "type",
|
||||
"name": "Error type",
|
||||
"sortable": true,
|
||||
},
|
||||
Object {
|
||||
"field": "monitorId",
|
||||
"name": "Monitor ID",
|
||||
"render": [Function],
|
||||
"sortable": true,
|
||||
"width": "25%",
|
||||
},
|
||||
Object {
|
||||
"field": "count",
|
||||
"name": "Count",
|
||||
"sortable": true,
|
||||
},
|
||||
Object {
|
||||
"field": "timestamp",
|
||||
"name": "Latest error",
|
||||
"render": [Function],
|
||||
"sortable": true,
|
||||
},
|
||||
Object {
|
||||
"field": "statusCode",
|
||||
"name": "Status code",
|
||||
"sortable": true,
|
||||
},
|
||||
Object {
|
||||
"field": "latestMessage",
|
||||
"name": "Latest message",
|
||||
"sortable": true,
|
||||
"width": "40%",
|
||||
},
|
||||
]
|
||||
|
@ -116,7 +110,7 @@ exports[`ErrorList component renders the error list without errors 1`] = `
|
|||
}
|
||||
}
|
||||
responsive={true}
|
||||
sorting={true}
|
||||
sorting={false}
|
||||
/>
|
||||
</EuiPanel>
|
||||
</Fragment>
|
||||
|
|
|
@ -26,13 +26,11 @@ exports[`MonitorList component renders a monitor list without errors 1`] = `
|
|||
"field": "ping.monitor.status",
|
||||
"name": "Status",
|
||||
"render": [Function],
|
||||
"sortable": true,
|
||||
},
|
||||
Object {
|
||||
"field": "ping.timestamp",
|
||||
"name": "Last updated",
|
||||
"render": [Function],
|
||||
"sortable": true,
|
||||
},
|
||||
Object {
|
||||
"field": "ping.monitor.host",
|
||||
|
@ -52,7 +50,6 @@ exports[`MonitorList component renders a monitor list without errors 1`] = `
|
|||
Object {
|
||||
"field": "ping.monitor.ip",
|
||||
"name": "IP",
|
||||
"sortable": true,
|
||||
},
|
||||
Object {
|
||||
"field": "upSeries",
|
||||
|
@ -555,7 +552,7 @@ exports[`MonitorList component renders a monitor list without errors 1`] = `
|
|||
}
|
||||
}
|
||||
responsive={true}
|
||||
sorting={true}
|
||||
sorting={false}
|
||||
/>
|
||||
</EuiPanel>
|
||||
</Fragment>
|
||||
|
|
|
@ -101,13 +101,11 @@ exports[`PingList component renders sorted list without errors 1`] = `
|
|||
"field": "monitor.status",
|
||||
"name": "Status",
|
||||
"render": [Function],
|
||||
"sortable": true,
|
||||
},
|
||||
Object {
|
||||
"field": "timestamp",
|
||||
"name": "Timestamp",
|
||||
"render": [Function],
|
||||
"sortable": true,
|
||||
},
|
||||
Object {
|
||||
"field": "monitor.ip",
|
||||
|
@ -123,7 +121,6 @@ exports[`PingList component renders sorted list without errors 1`] = `
|
|||
"field": "monitor.duration.us",
|
||||
"name": "Duration ms",
|
||||
"render": [Function],
|
||||
"sortable": true,
|
||||
},
|
||||
Object {
|
||||
"field": "error.type",
|
||||
|
@ -258,7 +255,7 @@ exports[`PingList component renders sorted list without errors 1`] = `
|
|||
}
|
||||
}
|
||||
responsive={true}
|
||||
sorting={true}
|
||||
sorting={false}
|
||||
/>
|
||||
</EuiPanel>
|
||||
</Fragment>
|
||||
|
@ -365,13 +362,11 @@ exports[`PingList component renders unsorted list of many monitors without error
|
|||
"field": "monitor.status",
|
||||
"name": "Status",
|
||||
"render": [Function],
|
||||
"sortable": true,
|
||||
},
|
||||
Object {
|
||||
"field": "timestamp",
|
||||
"name": "Timestamp",
|
||||
"render": [Function],
|
||||
"sortable": true,
|
||||
},
|
||||
Object {
|
||||
"field": "monitor.ip",
|
||||
|
@ -387,7 +382,6 @@ exports[`PingList component renders unsorted list of many monitors without error
|
|||
"field": "monitor.duration.us",
|
||||
"name": "Duration ms",
|
||||
"render": [Function],
|
||||
"sortable": true,
|
||||
},
|
||||
Object {
|
||||
"field": "error.type",
|
||||
|
@ -609,7 +603,7 @@ exports[`PingList component renders unsorted list of many monitors without error
|
|||
}
|
||||
}
|
||||
responsive={true}
|
||||
sorting={true}
|
||||
sorting={false}
|
||||
/>
|
||||
</EuiPanel>
|
||||
</Fragment>
|
||||
|
|
|
@ -35,7 +35,6 @@ export const ErrorList = ({ loading, errorList }: ErrorListProps) => (
|
|||
name: i18n.translate('xpack.uptime.errorList.errorTypeColumnLabel', {
|
||||
defaultMessage: 'Error type',
|
||||
}),
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
field: 'monitorId',
|
||||
|
@ -43,7 +42,6 @@ export const ErrorList = ({ loading, errorList }: ErrorListProps) => (
|
|||
defaultMessage: 'Monitor ID',
|
||||
}),
|
||||
render: (id: string) => <Link to={`/monitor/${id}`}>{id}</Link>,
|
||||
sortable: true,
|
||||
width: '25%',
|
||||
},
|
||||
{
|
||||
|
@ -51,14 +49,12 @@ export const ErrorList = ({ loading, errorList }: ErrorListProps) => (
|
|||
name: i18n.translate('xpack.uptime.errorList.CountColumnLabel', {
|
||||
defaultMessage: 'Count',
|
||||
}),
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
field: 'timestamp',
|
||||
name: i18n.translate('xpack.uptime.errorList.latestErrorColumnLabel', {
|
||||
defaultMessage: 'Latest error',
|
||||
}),
|
||||
sortable: true,
|
||||
render: (timestamp: string) => moment(timestamp).fromNow(),
|
||||
},
|
||||
{
|
||||
|
@ -66,18 +62,15 @@ export const ErrorList = ({ loading, errorList }: ErrorListProps) => (
|
|||
name: i18n.translate('xpack.uptime.errorList.statusCodeColumnLabel', {
|
||||
defaultMessage: 'Status code',
|
||||
}),
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
field: 'latestMessage',
|
||||
name: i18n.translate('xpack.uptime.errorList.latestMessageColumnLabel', {
|
||||
defaultMessage: 'Latest message',
|
||||
}),
|
||||
sortable: true,
|
||||
width: '40%',
|
||||
},
|
||||
]}
|
||||
sorting={true}
|
||||
pagination={{ initialPageSize: 10, pageSizeOptions: [5, 10, 20, 50] }}
|
||||
/>
|
||||
</EuiPanel>
|
||||
|
|
|
@ -68,7 +68,6 @@ export const MonitorList = ({ dangerColor, loading, monitors, primaryColor }: Mo
|
|||
})}
|
||||
</EuiHealth>
|
||||
),
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
field: 'ping.timestamp',
|
||||
|
@ -76,7 +75,6 @@ export const MonitorList = ({ dangerColor, loading, monitors, primaryColor }: Mo
|
|||
defaultMessage: 'Last updated',
|
||||
}),
|
||||
render: (timestamp: string) => moment(timestamp).fromNow(),
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
field: 'ping.monitor.host',
|
||||
|
@ -106,7 +104,6 @@ export const MonitorList = ({ dangerColor, loading, monitors, primaryColor }: Mo
|
|||
name: i18n.translate('xpack.uptime.monitorList.ipColumnLabel', {
|
||||
defaultMessage: 'IP',
|
||||
}),
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
field: 'upSeries',
|
||||
|
@ -149,7 +146,6 @@ export const MonitorList = ({ dangerColor, loading, monitors, primaryColor }: Mo
|
|||
loading={loading}
|
||||
items={monitors}
|
||||
pagination={monitorListPagination}
|
||||
sorting={true}
|
||||
/>
|
||||
</EuiPanel>
|
||||
</Fragment>
|
||||
|
|
|
@ -51,14 +51,12 @@ const columns = [
|
|||
})}
|
||||
</EuiHealth>
|
||||
),
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
field: 'timestamp',
|
||||
name: i18n.translate('xpack.uptime.pingList.timestampColumnLabel', {
|
||||
defaultMessage: 'Timestamp',
|
||||
}),
|
||||
sortable: true,
|
||||
render: (timestamp: string) => moment(timestamp).fromNow(),
|
||||
},
|
||||
{
|
||||
|
@ -82,7 +80,6 @@ const columns = [
|
|||
description: 'The "ms" in the default message is an abbreviation for milliseconds',
|
||||
}),
|
||||
render: (duration: number) => duration / 1000,
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
field: 'error.type',
|
||||
|
@ -163,7 +160,6 @@ export const PingList = (props: PingListProps) => {
|
|||
columns={columns}
|
||||
items={pings}
|
||||
pagination={{ initialPageSize: 10, pageSizeOptions: [5, 10, 20, 100] }}
|
||||
sorting={true}
|
||||
/>
|
||||
</EuiPanel>
|
||||
</Fragment>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue