From b373456c76e2e345c8dd13c6da050afd1c275c26 Mon Sep 17 00:00:00 2001
From: Kenia <19161242+kaxcode@users.noreply.github.com>
Date: Thu, 8 Oct 2020 11:52:09 -0400
Subject: [PATCH] ui: Add deny SVG lines with icons (#8846)
* Refactor and color SVG Lines based on intention permissions
* Create Icon component with L7 and Deny icon styling
* Reposition icons on the lines when the lines are redrawn
* Create service/intention-permissions helper
* Use service/intention-permissions helper to return allow or deny lines
* Upgrade consul-api-double to v5.3.5
* Update HasPermission attribute
---
.../topology-metrics/down-lines/index.hbs | 62 ++++++++++++++
.../topology-metrics/down-lines/index.js | 24 ++++++
.../app/components/topology-metrics/icon.hbs | 17 ++++
.../app/components/topology-metrics/index.hbs | 80 +++++--------------
.../app/components/topology-metrics/index.js | 76 +++++++++++-------
.../app/components/topology-metrics/skin.scss | 38 ++++++++-
.../topology-metrics/up-lines/index.hbs | 61 ++++++++++++++
.../topology-metrics/up-lines/index.js | 23 ++++++
.../helpers/service/intention-permissions.js | 15 ++++
ui-v2/package.json | 2 +-
.../service/intention-permissions-test.js | 22 +++++
ui-v2/yarn.lock | 8 +-
12 files changed, 331 insertions(+), 97 deletions(-)
create mode 100644 ui-v2/app/components/topology-metrics/down-lines/index.hbs
create mode 100644 ui-v2/app/components/topology-metrics/down-lines/index.js
create mode 100644 ui-v2/app/components/topology-metrics/icon.hbs
create mode 100644 ui-v2/app/components/topology-metrics/up-lines/index.hbs
create mode 100644 ui-v2/app/components/topology-metrics/up-lines/index.js
create mode 100644 ui-v2/app/helpers/service/intention-permissions.js
create mode 100644 ui-v2/tests/integration/helpers/service/intention-permissions-test.js
diff --git a/ui-v2/app/components/topology-metrics/down-lines/index.hbs b/ui-v2/app/components/topology-metrics/down-lines/index.hbs
new file mode 100644
index 0000000000..b1ab5a5e08
--- /dev/null
+++ b/ui-v2/app/components/topology-metrics/down-lines/index.hbs
@@ -0,0 +1,62 @@
+{{on-window 'resize' (action this.getIconPositions)}}
+
+{{#if (gt @lines.length 0)}}
+
+{{/if}}
+
+
{{downstream.Name}}
@@ -58,34 +61,13 @@{{dc}}
{{#each upstreams as |upstream|}} -{{upstream.Name}}
@@ -142,33 +127,12 @@