8b0314f26f
When the Consul serf health check is failing, this means that the health checks registered with the agent may no longer be correct. Therefore we show a notice to the user when we detect that the serf health check is failing both for the health check listing for nodes and for service instances. There were a few little things we fixed up whilst we were here: - We use our @replace decorator to replace an empty Type with serf in the model. - We noticed that ServiceTags can be null, so we replace that with an empty array. - We added docs for both our Notice component and the Consul::HealthCheck::List component. Notice now defaults to @type=info.
14 lines
383 B
JavaScript
14 lines
383 B
JavaScript
const asArray = function(arr) {
|
|
return Array.isArray(arr) ? arr : arr.toArray();
|
|
};
|
|
export default {
|
|
Name: item => item.Name,
|
|
Node: item => item.Node,
|
|
Service: item => item.ServiceName,
|
|
CheckID: item => item.CheckID || '',
|
|
ID: item => item.Service.ID || '',
|
|
Notes: item => item.Notes,
|
|
Output: item => item.Output,
|
|
ServiceTags: item => asArray(item.ServiceTags),
|
|
};
|