mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Add forecasts (Number of forecasts for an ml jobs) as column to the ML Jobs monitoring page. Related to: elastic/elasticsearch#31647
This commit is contained in:
parent
05bbe62abb
commit
31eb567558
3 changed files with 9 additions and 0 deletions
|
@ -27,6 +27,7 @@ const columns = [
|
|||
{ title: 'State', sortKey: 'state' },
|
||||
{ title: 'Processed Records', sortKey: 'data_counts.processed_record_count' },
|
||||
{ title: 'Model Size', sortKey: 'model_size_stats.model_bytes' },
|
||||
{ title: 'Forecasts', sortKey: 'forecasts_stats.total' },
|
||||
{ title: 'Node', sortKey: 'node.name' }
|
||||
];
|
||||
const jobRowFactory = (scope, kbnUrl) => {
|
||||
|
@ -56,6 +57,7 @@ const jobRowFactory = (scope, kbnUrl) => {
|
|||
</KuiTableRowCell>
|
||||
<KuiTableRowCell>{ numeral(props.data_counts.processed_record_count).format(LARGE_ABBREVIATED) }</KuiTableRowCell>
|
||||
<KuiTableRowCell>{ numeral(props.model_size_stats.model_bytes).format(LARGE_BYTES) }</KuiTableRowCell>
|
||||
<KuiTableRowCell>{ numeral(props.forecasts_stats.total).format(LARGE_ABBREVIATED) }</KuiTableRowCell>
|
||||
<KuiTableRowCell>
|
||||
{ getNode(props.node) }
|
||||
</KuiTableRowCell>
|
||||
|
|
|
@ -21,6 +21,7 @@ describe('Get ML Jobs', () => {
|
|||
state: 'opened',
|
||||
data_counts: { processed_record_count: 1 },
|
||||
model_size_stats: { model_bytes: 293847 },
|
||||
forecasts_stats: { total: 5 },
|
||||
node: { id: 'node-01', name: 'nameOfNode1' }
|
||||
});
|
||||
set(jobStats, 'hits.hits[1]._source.job_stats', {
|
||||
|
@ -28,6 +29,7 @@ describe('Get ML Jobs', () => {
|
|||
state: 'opened',
|
||||
data_counts: { processed_record_count: 3 },
|
||||
model_size_stats: { model_bytes: 39045 },
|
||||
forecasts_stats: { total: 0 },
|
||||
node: { id: 'node-02', name: 'nameOfNode2' }
|
||||
});
|
||||
set(jobStats, 'hits.hits[2]._source.job_stats', {
|
||||
|
@ -35,6 +37,7 @@ describe('Get ML Jobs', () => {
|
|||
state: 'opened',
|
||||
data_counts: { processed_record_count: 5 },
|
||||
model_size_stats: { model_bytes: 983457 },
|
||||
forecasts_stats: { total: 4 },
|
||||
node: { id: 'node-03', name: 'nameOfNode3' }
|
||||
});
|
||||
|
||||
|
@ -45,6 +48,7 @@ describe('Get ML Jobs', () => {
|
|||
state: 'opened',
|
||||
data_counts: { processed_record_count: 1 },
|
||||
model_size_stats: { model_bytes: 293847 },
|
||||
forecasts_stats: { total: 5 },
|
||||
node: { id: 'node-01', name: 'nameOfNode1' }
|
||||
},
|
||||
{
|
||||
|
@ -52,6 +56,7 @@ describe('Get ML Jobs', () => {
|
|||
state: 'opened',
|
||||
data_counts: { processed_record_count: 3 },
|
||||
model_size_stats: { model_bytes: 39045 },
|
||||
forecasts_stats: { total: 0 },
|
||||
node: { id: 'node-02', name: 'nameOfNode2' }
|
||||
},
|
||||
{
|
||||
|
@ -59,6 +64,7 @@ describe('Get ML Jobs', () => {
|
|||
state: 'opened',
|
||||
data_counts: { processed_record_count: 5 },
|
||||
model_size_stats: { model_bytes: 983457 },
|
||||
forecasts_stats: { total: 4 },
|
||||
node: { id: 'node-03', name: 'nameOfNode3' }
|
||||
}
|
||||
]);
|
||||
|
|
|
@ -37,6 +37,7 @@ export function getMlJobs(req, esIndexPattern) {
|
|||
'hits.hits._source.job_stats.state',
|
||||
'hits.hits._source.job_stats.data_counts.processed_record_count',
|
||||
'hits.hits._source.job_stats.model_size_stats.model_bytes',
|
||||
'hits.hits._source.job_stats.forecasts_stats.total',
|
||||
'hits.hits._source.job_stats.node.id',
|
||||
'hits.hits._source.job_stats.node.name'
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue