From e9ba939bd6329ef0ce33a106fc1a7c0c370ccbfa Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Mon, 10 Dec 2018 15:26:27 -0800 Subject: [PATCH] Conditionally show the utilization graphs on the allocation and task detail pages --- .../allocations/allocation/index.hbs | 19 +++++++++++++------ .../allocations/allocation/task/index.hbs | 19 +++++++++++++------ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/ui/app/templates/allocations/allocation/index.hbs b/ui/app/templates/allocations/allocation/index.hbs index 9ea4f650d..668094bd0 100644 --- a/ui/app/templates/allocations/allocation/index.hbs +++ b/ui/app/templates/allocations/allocation/index.hbs @@ -22,14 +22,21 @@ Resource Utilization
-
-
- {{primary-metric resource=model metric="cpu"}} + {{#if model.isRunning}} +
+
+ {{primary-metric resource=model metric="cpu"}} +
+
+ {{primary-metric resource=model metric="memory"}} +
-
- {{primary-metric resource=model metric="memory"}} + {{else}} +
+

Allocation isn't running

+

Only running allocations utilize resources.

-
+ {{/if}}
diff --git a/ui/app/templates/allocations/allocation/task/index.hbs b/ui/app/templates/allocations/allocation/task/index.hbs index dad7a4a71..4d4a46a08 100644 --- a/ui/app/templates/allocations/allocation/task/index.hbs +++ b/ui/app/templates/allocations/allocation/task/index.hbs @@ -30,14 +30,21 @@ Resource Utilization
-
-
- {{primary-metric resource=model metric="cpu"}} + {{#if model.isRunning}} +
+
+ {{primary-metric resource=model metric="cpu"}} +
+
+ {{primary-metric resource=model metric="memory"}} +
-
- {{primary-metric resource=model metric="memory"}} + {{else}} +
+

Task isn't running

+

Only running tasks utilize resources.

-
+ {{/if}}