mirror of https://github.com/status-im/consul.git
ui: Fix Health Checks in K/V form Lock Sessions Info section (#10767)
This commit is contained in:
parent
710bd90ef7
commit
8ad1ab9c08
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
ui: Fix Health Checks in K/V form Lock Sessions Info section
|
||||
```
|
|
@ -32,7 +32,7 @@
|
|||
<dd>{{or api.data.TTL '-'}}</dd>
|
||||
<dt>Behavior</dt>
|
||||
<dd>{{api.data.Behavior}}</dd>
|
||||
{{#let (union api.data.NodeChecks api.data.ServiceChecks) as |checks|}}
|
||||
{{#let api.data.checks as |checks|}}
|
||||
<dt>Health Checks</dt>
|
||||
<dd>
|
||||
{{#if (gt checks.length 0)}}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import Model, { attr } from '@ember-data/model';
|
||||
import { computed } from '@ember/object';
|
||||
import { nullValue } from 'consul-ui/decorators/replace';
|
||||
|
||||
export const PRIMARY_KEY = 'uid';
|
||||
|
@ -23,4 +24,9 @@ export default class Session extends Model {
|
|||
@nullValue([]) @attr({ defaultValue: () => [] }) ServiceChecks;
|
||||
|
||||
@attr({ defaultValue: () => [] }) Resources; // []
|
||||
|
||||
@computed('NodeChecks', 'ServiceChecks')
|
||||
get checks() {
|
||||
return [...this.NodeChecks, ...this.ServiceChecks.map(({ ID }) => ID)];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,15 @@
|
|||
}",
|
||||
"Node":"node-1",
|
||||
"NodeChecks":["serfHealth"],
|
||||
"ServiceChecks": ["${fake.hacker.noun()}Health"],
|
||||
"ServiceChecks": [
|
||||
{
|
||||
"ID": "${fake.hacker.noun()}Health",
|
||||
"Namespace": "${
|
||||
typeof location.search.ns !== 'undefined' ? location.search.ns :
|
||||
typeof http.body.Namespace !== 'undefined' ? http.body.Namespace : 'default'
|
||||
}"
|
||||
}
|
||||
],
|
||||
"LockDelay":15000000000,
|
||||
"Behavior":"${fake.helpers.randomize(['release', 'delete'])}",
|
||||
"TTL":"",
|
||||
|
|
Loading…
Reference in New Issue