Add process tooltip to charts
This commit is contained in:
parent
ce3ccf6fe9
commit
729e57ceb9
|
|
@ -450,6 +450,20 @@ new Chart(ctx{{ metricName|replace({'-': '_', '.': '_'}) }}, {
|
|||
y: {
|
||||
beginAtZero: false
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
tooltip: {
|
||||
enabled: true,
|
||||
mode: 'index',
|
||||
intersect: false,
|
||||
callbacks: {
|
||||
afterBody: function(context) {
|
||||
var dataIndex = context[0].dataIndex;
|
||||
var time = labels{{ metricName }}[dataIndex];
|
||||
return fetchProcesses({{ server.id }}, time);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue