Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
titleShort: '95th',
data: p95,
type: 'linemark',
color: theme.euiColorVis5
},
{
title: i18n.translate(
'xpack.apm.transactions.chart.99thPercentileLabel',
{
defaultMessage: '99th percentile'
}
),
titleShort: '99th',
data: p99,
type: 'linemark',
color: theme.euiColorVis7
}
];
if (anomalyTimeseries) {
// insert after Avg. series
series.splice(
1,
0,
getAnomalyBoundariesSeries(anomalyTimeseries.anomalyBoundaries),
getAnomalyScoreSeries(anomalyTimeseries.anomalyScore)
);
}
return series;
}
titleShort: '95th',
data: p95,
type: 'linemark',
color: theme.euiColorVis5
},
{
title: i18n.translate(
'xpack.apm.transactions.chart.99thPercentileLabel',
{
defaultMessage: '99th percentile'
}
),
titleShort: '99th',
data: p99,
type: 'linemark',
color: theme.euiColorVis7
}
];
if (anomalyTimeseries) {
// insert after Avg. series
series.splice(
1,
0,
getAnomalyBoundariesSeries(anomalyTimeseries.anomalyBoundaries),
getAnomalyScoreSeries(anomalyTimeseries.anomalyScore)
);
}
return series;
}
titleShort: '95th',
data: p95,
type: 'linemark',
color: theme.euiColorVis5
},
{
title: i18n.translate(
'xpack.apm.transactions.chart.99thPercentileLabel',
{
defaultMessage: '99th percentile'
}
),
titleShort: '99th',
data: p99,
type: 'linemark',
color: theme.euiColorVis7
}
];
if (anomalyTimeseries) {
// insert after Avg. series
series.splice(
1,
0,
getAnomalyBoundariesSeries(anomalyTimeseries.anomalyBoundaries),
getAnomalyScoreSeries(anomalyTimeseries.anomalyScore)
);
}
return series;
}
function getIconColor(type) {
switch (type) {
case 'field':
return theme.euiColorVis7;
case 'value':
return theme.euiColorVis0;
case 'operator':
return theme.euiColorVis1;
case 'conjunction':
return theme.euiColorVis3;
case 'recentSearch':
return theme.euiColorMediumShade;
}
}
function getIconColor(type) {
switch (type) {
case 'field':
return theme.euiColorVis7;
case 'value':
return theme.euiColorVis0;
case 'operator':
return theme.euiColorVis1;
case 'conjunction':
return theme.euiColorVis3;
case 'recentSearch':
return theme.euiColorMediumShade;
}
}
render: (value: TableData['severity']) => (
{value}
),
truncateText: true,
function getColorByKey(keys: string[]) {
const assignedColors: StringMap = {
'HTTP 2xx': theme.euiColorVis0,
'HTTP 3xx': theme.euiColorVis5,
'HTTP 4xx': theme.euiColorVis7,
'HTTP 5xx': theme.euiColorVis2
};
const unknownKeys = difference(keys, Object.keys(assignedColors));
const unassignedColors: StringMap = zipObject(unknownKeys, [
theme.euiColorVis1,
theme.euiColorVis3,
theme.euiColorVis4,
theme.euiColorVis6,
theme.euiColorVis2,
theme.euiColorVis8
]);
return (key: string) => assignedColors[key] || unassignedColors[key];
}
function getColorByKey(keys: string[]) {
const assignedColors: StringMap = {
'HTTP 2xx': theme.euiColorVis0,
'HTTP 3xx': theme.euiColorVis5,
'HTTP 4xx': theme.euiColorVis7,
'HTTP 5xx': theme.euiColorVis2
};
const unknownKeys = difference(keys, Object.keys(assignedColors));
const unassignedColors: StringMap = zipObject(unknownKeys, [
theme.euiColorVis1,
theme.euiColorVis3,
theme.euiColorVis4,
theme.euiColorVis6,
theme.euiColorVis2,
theme.euiColorVis8
]);
return (key: string) => assignedColors[key] || unassignedColors[key];
}
function getColorByKey(keys: string[]) {
const assignedColors: StringMap = {
'HTTP 2xx': theme.euiColorVis0,
'HTTP 3xx': theme.euiColorVis5,
'HTTP 4xx': theme.euiColorVis7,
'HTTP 5xx': theme.euiColorVis2
};
const unknownKeys = difference(keys, Object.keys(assignedColors));
const unassignedColors: StringMap = zipObject(unknownKeys, [
theme.euiColorVis1,
theme.euiColorVis3,
theme.euiColorVis4,
theme.euiColorVis6,
theme.euiColorVis2,
theme.euiColorVis8
]);
return (key: string) => assignedColors[key] || unassignedColors[key];
}