Skip to content

Commit

Permalink
Merge pull request #7121 from deutschebank/db-contrib/waltz-7115-flow…
Browse files Browse the repository at this point in the history
…-agg-filter

Db contrib/waltz 7115 flow agg filter
  • Loading branch information
davidwatkins73 committed Jul 20, 2024
2 parents b2a1370 + d9ac324 commit 0294d39
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@
let physicalFlows = [];
let logicalFlows = [];
function determineIfAggregateView(ref) {
switch (ref.kind) {
case "APPLICATION":
case "END_USER_APPLICATION":
case "ACTOR":
return false;
default:
return true;
}
}
onMount(() => {
resetFlowDetailsStore();
flowClassificationCall = flowClassificationStore.findAll();
Expand Down Expand Up @@ -92,6 +103,9 @@
flowViewCall = logicalFlowStore.getViewForSelector(selectionOptions);
}
}
$: isAggregateView = parentEntityRef && determineIfAggregateView(parentEntityRef);
</script>
Expand All @@ -108,7 +122,8 @@
<FlowDetailFilters {dataTypes}
{assessmentFilters}
{flowClassifications}
{physicalFlows}/>
{physicalFlows}
{isAggregateView}/>
<LogicalFlowTable {logicalFlows}
{flowClassifications}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export let dataTypes = [];
export let assessmentFilters = [];
export let physicalFlows = [];
export let flowClassifications = [];
export let isAggregateView = false;
$: classificationFilter = _.find($filters, d => d.kind === FilterKinds.FLOW_CLASSIFICATION);
Expand All @@ -32,18 +33,20 @@ $: directionFilter = _.find($filters, d => d.kind === FilterKinds.DIRECTION);
{/if}
</summary>

<details class="filter-set" style="margin-top: 1em">
<summary>
<Icon name="random"/> Flow Direction
{#if !_.isEqual(_.get(directionFilter, ["direction"], Directions.ALL), Directions.ALL)}
<span style="color: darkorange"
title="Flows have been filtered by direction">
<Icon name="exclamation-circle"/>
</span>
{/if}
</summary>
<InboundOutboundFilters/>
</details>
{#if isAggregateView === false}
<details class="filter-set" style="margin-top: 1em">
<summary>
<Icon name="random"/> Flow Direction
{#if !_.isEqual(_.get(directionFilter, ["direction"], Directions.ALL), Directions.ALL)}
<span style="color: darkorange"
title="Flows have been filtered by direction">
<Icon name="exclamation-circle"/>
</span>
{/if}
</summary>
<InboundOutboundFilters/>
</details>
{/if}

<details class="filter-set" style="margin-top: 1em">
<summary>
Expand Down

0 comments on commit 0294d39

Please sign in to comment.