ui: Fix Health Checks in K/V form Lock Sessions Info section (#10767)
This commit is contained in:
parent
57aabe3455
commit
1927ada2e7
|
@ -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>
|
<dd>{{or api.data.TTL '-'}}</dd>
|
||||||
<dt>Behavior</dt>
|
<dt>Behavior</dt>
|
||||||
<dd>{{api.data.Behavior}}</dd>
|
<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>
|
<dt>Health Checks</dt>
|
||||||
<dd>
|
<dd>
|
||||||
{{#if (gt checks.length 0)}}
|
{{#if (gt checks.length 0)}}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import Model, { attr } from '@ember-data/model';
|
import Model, { attr } from '@ember-data/model';
|
||||||
|
import { computed } from '@ember/object';
|
||||||
import { nullValue } from 'consul-ui/decorators/replace';
|
import { nullValue } from 'consul-ui/decorators/replace';
|
||||||
|
|
||||||
export const PRIMARY_KEY = 'uid';
|
export const PRIMARY_KEY = 'uid';
|
||||||
|
@ -23,4 +24,9 @@ export default class Session extends Model {
|
||||||
@nullValue([]) @attr({ defaultValue: () => [] }) ServiceChecks;
|
@nullValue([]) @attr({ defaultValue: () => [] }) ServiceChecks;
|
||||||
|
|
||||||
@attr({ defaultValue: () => [] }) Resources; // []
|
@attr({ defaultValue: () => [] }) Resources; // []
|
||||||
|
|
||||||
|
@computed('NodeChecks', 'ServiceChecks')
|
||||||
|
get checks() {
|
||||||
|
return [...this.NodeChecks, ...this.ServiceChecks.map(({ ID }) => ID)];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,15 @@
|
||||||
}",
|
}",
|
||||||
"Node":"node-1",
|
"Node":"node-1",
|
||||||
"NodeChecks":["serfHealth"],
|
"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,
|
"LockDelay":15000000000,
|
||||||
"Behavior":"${fake.helpers.randomize(['release', 'delete'])}",
|
"Behavior":"${fake.helpers.randomize(['release', 'delete'])}",
|
||||||
"TTL":"",
|
"TTL":"",
|
||||||
|
|
Loading…
Reference in New Issue