Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Uptime] Add explicit alignments to table columns #40680

Merged
merged 9 commits into from
Jul 17, 2019
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export const MonitorListComponent = (props: Props) => {
// sorting={sorting}
columns={[
{
align: 'left',
field: 'monitor_id',
name: '',
sortable: true,
Expand Down Expand Up @@ -165,6 +166,7 @@ export const MonitorListComponent = (props: Props) => {
},
},
{
align: 'left',
field: 'state.monitor.status',
name: i18n.translate('xpack.uptime.monitorList.statusColumnLabel', {
defaultMessage: 'Status',
Expand All @@ -174,6 +176,7 @@ export const MonitorListComponent = (props: Props) => {
},
},
{
align: 'left',
field: 'state.monitor.name',
name: i18n.translate('xpack.uptime.monitorList.nameColumnLabel', {
defaultMessage: 'Name',
Expand All @@ -190,6 +193,7 @@ export const MonitorListComponent = (props: Props) => {
sortable: true,
},
{
align: 'left',
field: 'state.url.full',
name: i18n.translate('xpack.uptime.monitorList.urlColumnLabel', {
defaultMessage: 'URL',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,34 +113,43 @@ export const PingListComponent = ({
),
},
{
field: 'observer.geo.name',
align: 'left',
dataType: 'number',
field: 'observer.geo.name',
name: i18n.translate('xpack.uptime.pingList.locationNameColumnLabel', {
defaultMessage: 'Location',
}),
render: (location: string) => <LocationName location={location} />,
},
{
field: 'monitor.ip',
align: 'left',
dataType: 'number',
field: 'monitor.ip',
name: i18n.translate('xpack.uptime.pingList.ipAddressColumnLabel', {
defaultMessage: 'IP',
}),
},
{
align: 'right',
field: 'monitor.duration.us',
name: i18n.translate('xpack.uptime.pingList.durationMsColumnLabel', {
defaultMessage: 'Duration',
}),
render: (duration: number) => microsToMillis(duration),
render: (duration: number) =>
i18n.translate('xpack.uptime.pingList.durationMsColumnFormatting', {
values: { millis: microsToMillis(duration) },
defaultMessage: '{millis} ms',
}),
},
{
align: 'left',
field: 'error.type',
name: i18n.translate('xpack.uptime.pingList.errorTypeColumnLabel', {
defaultMessage: 'Error type',
}),
},
{
align: 'left',
field: 'error.message',
name: i18n.translate('xpack.uptime.pingList.errorMessageColumnLabel', {
defaultMessage: 'Error message',
Expand Down