From 93851b7a96249038b1327a762b5dc0b2b30c6426 Mon Sep 17 00:00:00 2001 From: Michael Pilosov <40366263+mathematicalmichael@users.noreply.github.com> Date: Wed, 3 Jul 2024 01:53:15 -0600 Subject: [PATCH] Feature/arrows highlight (#85) * proxy change to reflect API server default port * re-stylize arrows in pipeline * use the same type for both ids * feedback: color change * feedback: keep default color. darken only when selecting a node --- proxy.config.mjs | 2 +- .../pipeline-controller-info.component.html | 2 ++ .../pipeline-controller-info.component.scss | 8 ++++++++ .../pipeline-controller-info.component.ts | 16 +++++++++++----- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/proxy.config.mjs b/proxy.config.mjs index 6aad2025..eee1e1ba 100644 --- a/proxy.config.mjs +++ b/proxy.config.mjs @@ -1,7 +1,7 @@ import * as fs from 'fs'; const targets = [ - 'http://localhost:8081', // 1 + 'http://localhost:8008', // 1 ]; const PROXY_CONFIG = { diff --git a/src/app/webapp-common/pipelines-controller/pipeline-controller-info/pipeline-controller-info.component.html b/src/app/webapp-common/pipelines-controller/pipeline-controller-info/pipeline-controller-info.component.html index 2f90a539..71715c24 100644 --- a/src/app/webapp-common/pipelines-controller/pipeline-controller-info/pipeline-controller-info.component.html +++ b/src/app/webapp-common/pipelines-controller/pipeline-controller-info/pipeline-controller-info.component.html @@ -24,6 +24,7 @@ > ({...arrow, selected: arrow.targetId === this.selectedEntity?.id})) - .sort((a, b) => a.selected && !b.selected ? 1 : -1); + this.arrows = this.arrows?.map(arrow => { + const isTarget = arrow.targetId === this.selectedEntity?.stepId; + const isSource = arrow.sourceId === this.selectedEntity?.stepId; + return {...arrow, selected: isTarget || isSource, outgoing: isSource}; + }).sort((a, b) => (a.selected === b.selected) ? 0 : a.selected ? 1 : -1); } protected getTreeObject(task) {