Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
2a8c8c2b
Commit
2a8c8c2b
authored
2 years ago
by
Phil Renaud
Browse files
Options
Download
Email Patches
Plain Diff
Index check only using alloc-specific ones too
parent
f81faa9c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ui/app/components/allocation-service-sidebar.hbs
+0
-5
ui/app/components/allocation-service-sidebar.hbs
ui/app/components/allocation-service-sidebar.js
+2
-4
ui/app/components/allocation-service-sidebar.js
ui/app/controllers/allocations/allocation/index.js
+5
-1
ui/app/controllers/allocations/allocation/index.js
with
7 additions
and
10 deletions
+7
-10
ui/app/components/allocation-service-sidebar.hbs
+
0
-
5
View file @
2a8c8c2b
...
...
@@ -103,11 +103,6 @@
<tr
data-service-health=
{{
row
.
model
.
Status
}}
>
<td
class=
"name"
>
<span
title=
{{
row
.
model
.
Check
}}
>
{{
row
.
model
.
Check
}}
</span>
TODO: TEMP
{{
format-ts
row
.
model
.
Timestamp
}}
</td>
<td
class=
"status"
>
<span>
...
...
This diff is collapsed.
Click to expand it.
ui/app/components/allocation-service-sidebar.js
+
2
-
4
View file @
2a8c8c2b
...
...
@@ -32,9 +32,7 @@ export default class AllocationServiceSidebarComponent extends Component {
}
get
aggregateStatus
()
{
return
this
.
args
.
service
?.
mostRecentChecks
?.
any
(
(
check
)
=>
check
.
Status
===
'
failure
'
)
return
this
.
checks
.
any
((
check
)
=>
check
.
Status
===
'
failure
'
)
?
'
Unhealthy
'
:
'
Healthy
'
;
}
...
...
@@ -45,7 +43,7 @@ export default class AllocationServiceSidebarComponent extends Component {
// Our UI checks run every 2 seconds; but a check itself may only update every, say, minute.
// Therefore, we'll have duplicate checks in a service's healthChecks array.
// Only get the most recent check for each check.
return
this
.
args
.
service
.
healthChecks
return
(
this
.
args
.
service
.
healthChecks
||
[])
.
filterBy
(
'
Alloc
'
,
allocID
)
.
uniqBy
(
'
Timestamp
'
)
.
sortBy
(
'
Timestamp
'
)
...
...
This diff is collapsed.
Click to expand it.
ui/app/controllers/allocations/allocation/index.js
+
5
-
1
View file @
2a8c8c2b
...
...
@@ -83,11 +83,15 @@ export default class IndexController extends Controller.extend(Sortable) {
return
currentServiceName
===
service
.
refID
;
}
);
// Only append those healthchecks whose timestamps are not already found in service.healthChecks
healthChecks
.
forEach
((
check
)
=>
{
service
.
healthChecks
.
pushObject
(
check
);
});
}
// Contextualize healthchecks for the allocation we're in
service
.
healthChecks
=
service
.
healthChecks
.
filterBy
(
'
Alloc
'
,
this
.
model
.
id
);
return
service
;
});
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment