mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
This commit is contained in:
parent
06de1bac6b
commit
8592f59c1a
3 changed files with 9 additions and 7 deletions
|
@ -48,10 +48,10 @@ function renderTime(date, aggregationInterval) {
|
|||
}
|
||||
}
|
||||
|
||||
function showLinksMenuForItem(item) {
|
||||
const canConfigureRules = (isRuleSupported(item) && checkPermission('canUpdateJob'));
|
||||
function showLinksMenuForItem(item, showViewSeriesLink) {
|
||||
const canConfigureRules = (isRuleSupported(item.source) && checkPermission('canUpdateJob'));
|
||||
return (canConfigureRules ||
|
||||
item.isTimeSeriesViewRecord ||
|
||||
(showViewSeriesLink && item.isTimeSeriesViewRecord) ||
|
||||
item.entityName === 'mlcategory' ||
|
||||
item.customUrls !== undefined);
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ export function getColumns(
|
|||
});
|
||||
}
|
||||
|
||||
const showLinks = (showViewSeriesLink === true) || items.some(item => showLinksMenuForItem(item));
|
||||
const showLinks = items.some(item => showLinksMenuForItem(item, showViewSeriesLink));
|
||||
|
||||
if (showLinks === true) {
|
||||
columns.push({
|
||||
|
|
|
@ -29,7 +29,7 @@ export function DescriptionCell({ actual, typical }) {
|
|||
} = getMetricChangeDescription(actual, typical);
|
||||
|
||||
return (
|
||||
<EuiFlexGroup gutterSize="s">
|
||||
<EuiFlexGroup gutterSize="s" alignItems="center">
|
||||
{iconType !== undefined &&
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiIcon
|
||||
|
|
|
@ -37,8 +37,10 @@ export function formatValue(value, mlFunction, fieldFormat, record) {
|
|||
if (value.length === 1) {
|
||||
return formatSingleValue(value[0], mlFunction, fieldFormat, record);
|
||||
} else {
|
||||
// Return with array style formatting.
|
||||
const values = value.map(val => formatSingleValue(val, mlFunction, fieldFormat, record));
|
||||
// Currently only multi-value response is for lat_long detectors.
|
||||
// Return with array style formatting, with items formatted as numbers, rather than
|
||||
// the default String format which is set for geo_point and geo_shape fields.
|
||||
const values = value.map(val => formatSingleValue(val, mlFunction, undefined, record));
|
||||
return `[${values}]`;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue