From 90259d73661a7d9da50ced82e5148945229fcaf5 Mon Sep 17 00:00:00 2001 From: Michael Klein Date: Mon, 10 Oct 2022 15:26:40 +0200 Subject: [PATCH] Move peering bento box into dedicated component --- .../consul/peer/bento-box/index.hbs | 71 ++++++++++++++++ .../app/templates/dc/peers/edit.hbs | 82 +------------------ 2 files changed, 72 insertions(+), 81 deletions(-) create mode 100644 ui/packages/consul-peerings/app/components/consul/peer/bento-box/index.hbs diff --git a/ui/packages/consul-peerings/app/components/consul/peer/bento-box/index.hbs b/ui/packages/consul-peerings/app/components/consul/peer/bento-box/index.hbs new file mode 100644 index 0000000000..54a38b9526 --- /dev/null +++ b/ui/packages/consul-peerings/app/components/consul/peer/bento-box/index.hbs @@ -0,0 +1,71 @@ + +
+
+
Status
+
+ +
+
+
+
Latest heartbeat
+
+ {{#if @peering.heartbeat}} + {{#let (smart-date-format @peering.heartbeat) as |smartDate|}} + + {{#if smartDate.isNearDate}} + {{smartDate.relative}} + {{else}} + {{smartDate.friendly}} + {{/if}} + {{/let}} + {{else}} + None yet + {{/if}} +
+
+
+
Latest receipt
+
+ {{#if @peering.receipt}} + {{#let (smart-date-format @peering.receipt) as |smartDate|}} + {{#if smartDate.isNearDate}} + {{smartDate.relative}} + {{else}} + {{smartDate.friendly}} + {{/if}} + {{/let}} + {{else}} + None yet + {{/if}} +
+
+
+
Latest send
+
+ {{#if @peering.lastSend}} + {{#let (smart-date-format @peering.lastSend) as |smartDate|}} + {{#if smartDate.isNearDate}} + {{smartDate.relative}} + {{else}} + {{smartDate.friendly}} + {{/if}} + {{/let}} + {{else}} + None yet + {{/if}} +
+ +
+
+
\ No newline at end of file diff --git a/ui/packages/consul-peerings/app/templates/dc/peers/edit.hbs b/ui/packages/consul-peerings/app/templates/dc/peers/edit.hbs index a60f11ae04..25177b78e6 100644 --- a/ui/packages/consul-peerings/app/templates/dc/peers/edit.hbs +++ b/ui/packages/consul-peerings/app/templates/dc/peers/edit.hbs @@ -36,87 +36,7 @@ - -
-
-
Status
-
- -
-
-
-
Latest heartbeat
-
- {{#if item.heartbeat}} - {{#let (smart-date-format item.heartbeat) as |smartDate|}} - - {{#if smartDate.isNearDate}} - {{smartDate.relative}} - {{else}} - {{smartDate.friendly}} - {{/if}} - {{/let}} - {{else}} - None yet - {{/if}} -
-
-
-
Latest receipt
-
- {{#if item.receipt}} - {{#let (smart-date-format item.receipt) as |smartDate|}} - {{#if smartDate.isNearDate}} - {{smartDate.relative}} - {{else}} - {{smartDate.friendly}} - {{/if}} - {{/let}} - {{else}} - None yet - {{/if}} -
-
-
-
Latest send
-
- {{#if item.lastSend}} - {{#let (smart-date-format item.lastSend) as |smartDate|}} - {{#if smartDate.isNearDate}} - {{smartDate.relative}} - {{else}} - {{smartDate.friendly}} - {{/if}} - {{/let}} - {{else}} - None yet - {{/if}} -
- -
-
-
+