From 3ba56d2efbb530d084fdc0f992c1ad0c4ae9ccb3 Mon Sep 17 00:00:00 2001 From: woodjes Date: Mon, 13 Nov 2023 17:49:05 +0000 Subject: [PATCH 1/7] No data messages / show logicals if no phsycials #CTCTOWALTZ-2931 #6834 --- .../flow-detail-tab/FlowDetailPanel.svelte | 6 ++-- .../flow-detail-tab/LogicalFlowTable.svelte | 7 ++++ .../PhysicalFlowAttributeFilters.svelte | 33 +++++++++++++++++-- .../flow-detail-tab/PhysicalFlowTable.svelte | 7 ++++ .../flow-detail-tab/flow-detail-utils.js | 29 ++++++++++------ 5 files changed, 67 insertions(+), 15 deletions(-) diff --git a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/FlowDetailPanel.svelte b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/FlowDetailPanel.svelte index 7d9270426e..4549155c3f 100644 --- a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/FlowDetailPanel.svelte +++ b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/FlowDetailPanel.svelte @@ -74,6 +74,8 @@ $: filteredFlows = filterFlows(allFlows, $filters); + $: physicalFlows = _.filter(filteredFlows, d => !_.isEmpty(d.physicalFlow)); + $: logicalFlows = _ .chain(filteredFlows) .map(d => mkLogicalFromFlowDetails(d)) @@ -125,14 +127,14 @@ Physical Flow - +
- + {#if $selectedLogicalFlow || $selectedPhysicalFlow} diff --git a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/LogicalFlowTable.svelte b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/LogicalFlowTable.svelte index d834045dcb..ae67651055 100644 --- a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/LogicalFlowTable.svelte +++ b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/LogicalFlowTable.svelte @@ -8,6 +8,7 @@ import {truncate} from "../../../../common/string-utils"; import Tooltip from "../../../../common/svelte/Tooltip.svelte"; import DataTypeTooltipContent from "./DataTypeTooltipContent.svelte"; + import NoData from "../../../../common/svelte/NoData.svelte"; export let logicalFlows = []; export let assessments; @@ -116,6 +117,12 @@ {/each} + {:else} + + + There are no logical flows to show, these may have been filtered. + + {/each} diff --git a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowAttributeFilters.svelte b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowAttributeFilters.svelte index e9786ec6f6..fca018f9e2 100644 --- a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowAttributeFilters.svelte +++ b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowAttributeFilters.svelte @@ -12,15 +12,24 @@ import _ from "lodash"; import {filters, updateFilters} from "./flow-details-store"; import {enumValueStore} from "../../../../svelte-stores/enum-value-store"; + import NoData from "../../../../common/svelte/NoData.svelte"; export let flows = []; export let criticalities = []; let enumsCall = enumValueStore.load(); - $: usedFrequencies = _.uniq(_.map(flows, d => d.physicalFlow.frequency)); - $: usedCriticalities = _.uniq(_.map(flows, d => d.physicalFlow.criticality)); - $: usedTransport = _.uniq(_.map(flows, d => d.physicalFlow.transport)); + function mapOverPhysicals(flows, attr) { + return _.chain(flows) + .map(d => _.get(d, ["physicalFlow", attr])) + .uniq() + .compact() + .value(); + } + + $: usedFrequencies = mapOverPhysicals(flows, "frequency"); + $: usedCriticalities = mapOverPhysicals(flows, "criticality"); + $: usedTransport = mapOverPhysicals(flows, "transport"); $: criticalities = _ .chain($enumsCall.data) @@ -153,6 +162,12 @@ Use the physical flow attributes to filter the flows. Both logical and physical {criticality.name} + {:else} + + + There are no physical flow criticalities to filter over. + + {/each} @@ -179,6 +194,12 @@ Use the physical flow attributes to filter the flows. Both logical and physical {frequency.name} + {:else} + + + There are no physical flow frequencies to filter over. + + {/each} @@ -205,6 +226,12 @@ Use the physical flow attributes to filter the flows. Both logical and physical {transportKind.name} + {:else} + + + There are no physical flow transport kinds to filter over. + + {/each} diff --git a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowTable.svelte b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowTable.svelte index 10b0a3973e..3c0e51264d 100644 --- a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowTable.svelte +++ b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowTable.svelte @@ -12,6 +12,7 @@ } from "../../../../physical-flows/svelte/physical-flow-registration-utils"; import {selectedPhysicalFlow, selectedLogicalFlow} from "./flow-details-store"; import {mkLogicalFromFlowDetails} from "./flow-detail-utils"; + import NoData from "../../../../common/svelte/NoData.svelte"; export let physicalFlows; @@ -109,6 +110,12 @@ {toTransportKindName(nestedEnums, flow.physicalFlow.transport)} + {:else} + + + There are no physical flows to show, these may have been filtered. + + {/each} diff --git a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/flow-detail-utils.js b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/flow-detail-utils.js index 6c6140ad23..e8903fff18 100644 --- a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/flow-detail-utils.js +++ b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/flow-detail-utils.js @@ -23,15 +23,24 @@ export function mkFlowDetails(flowView, parentEntityRef) { const decoratorsByFlowId = _.groupBy(flowView.dataTypeDecorators, d => d.dataFlowId); const specsById = _.keyBy(flowView.physicalSpecifications, d => d.id); const logicalFlowsById = _.keyBy(flowView.flows, d => d.id); + const physicalFlowsByLogicalFlowId = _.groupBy(flowView.physicalFlows, d => d.logicalFlowId); return _ - .chain(flowView.physicalFlows) - .map(d => { + .chain(flowView.flows) + .flatMap(d => { + const physicalFlows = _.get(physicalFlowsByLogicalFlowId, d.id, []); + return _.isEmpty(physicalFlows) + ? [{logicalFlow: d, physicalFlow: null}] + : _.map(physicalFlows, p => ({logicalFlow: d, physicalFlow: p})) + }) + .map(t => { + + const logicalFlow = t.logicalFlow; + const physicalFlow = t.physicalFlow; - const logicalFlow = _.get(logicalFlowsById, d.logicalFlowId); - const assessmentRatingsForLogicalFlow = _.get(ratingsByFlowId, d.logicalFlowId, []); - const dataTypesForLogicalFlow = _.get(decoratorsByFlowId, d.logicalFlowId, []); - const specification = _.get(specsById, d.specificationId); + const assessmentRatingsForLogicalFlow = _.get(ratingsByFlowId, logicalFlow.id, []); + const dataTypesForLogicalFlow = _.get(decoratorsByFlowId, logicalFlow.id, []); + const specification = _.get(specsById, physicalFlow?.specificationId); const assessmentRatings = _.map( assessmentRatingsForLogicalFlow, @@ -54,7 +63,7 @@ export function mkFlowDetails(flowView, parentEntityRef) { logicalFlow, ratingsByDefId, dataTypesForLogicalFlow, - physicalFlow: d, + physicalFlow, specification, assessmentRatings, direction @@ -127,7 +136,7 @@ export function mkCriticalityFilter(id, criticalities) { criticalities, test: (r) => _.isEmpty(criticalities) ? x => true - : _.includes(criticalities, r.physicalFlow.criticality) + : _.includes(criticalities, r.physicalFlow?.criticality) }; } @@ -137,7 +146,7 @@ export function mkFrequencyFilter(id, frequencies) { frequencies, test: (r) => _.isEmpty(frequencies) ? x => true - : _.includes(frequencies, r.physicalFlow.frequency) + : _.includes(frequencies, r.physicalFlow?.frequency) }; } @@ -147,7 +156,7 @@ export function mkTransportKindFilter(id, transportKinds) { transportKinds, test: (r) => _.isEmpty(transportKinds) ? x => true - : _.includes(transportKinds, r.physicalFlow.transport) + : _.includes(transportKinds, r.physicalFlow?.transport) }; } From ecb6da1e84c1ad99eff0784525c7684fc69f887c Mon Sep 17 00:00:00 2001 From: woodjes Date: Mon, 13 Nov 2023 18:12:05 +0000 Subject: [PATCH 2/7] Add warning when filters applied to summary #CTCTOWALTZ-2931 #6834 --- .../flow-detail-tab/FlowDetailPanel.svelte | 35 +++++++++++++++++-- .../PhysicalFlowAttributeFilters.svelte | 11 ++++++ .../flow-detail-tab/flow-detail-utils.js | 13 +++++++ 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/FlowDetailPanel.svelte b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/FlowDetailPanel.svelte index 4549155c3f..632a81a758 100644 --- a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/FlowDetailPanel.svelte +++ b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/FlowDetailPanel.svelte @@ -8,13 +8,20 @@ import LogicalFlowTable from "./LogicalFlowTable.svelte"; import {filters, resetFlowDetailsStore, selectedLogicalFlow, selectedPhysicalFlow} from "./flow-details-store"; import PhysicalFlowTable from "./PhysicalFlowTable.svelte"; - import {mkAssessmentFilters, mkFlowDetails, mkLogicalFromFlowDetails} from "./flow-detail-utils"; + import { + Directions, + FilterKinds, + mkAssessmentFilters, + mkFlowDetails, + mkLogicalFromFlowDetails + } from "./flow-detail-utils"; import SelectedFlowDetail from "./SelectedFlowDetail.svelte"; import AssessmentFilters from "./AssessmentFilters.svelte"; import DataTypeFilters from "./DataTypeFilters.svelte"; import InboundOutboundFilters from "./InboundOutboundFilters.svelte"; import {onMount} from "svelte"; import PhysicalFlowAttributeFilters from "./PhysicalFlowAttributeFilters.svelte"; + import Icon from "../../../../common/svelte/Icon.svelte"; export let parentEntityRef; @@ -105,6 +112,12 @@
Flow Direction + {#if _.some($filters, d => d.kind === FilterKinds.DIRECTION) && _.find($filters, d => d.kind === FilterKinds.DIRECTION).direction !== Directions.ALL} + + + + {/if}
@@ -112,6 +125,12 @@
Data Types + {#if _.some($filters, d => d.kind === FilterKinds.DATA_TYPE)} + + + + {/if}
@@ -119,6 +138,12 @@
Assessments + {#if _.some($filters, d => d.kind === FilterKinds.ASSESSMENT)} + + + + {/if}
@@ -126,6 +151,12 @@
Physical Flow + {#if _.some($filters, d => d.kind === FilterKinds.PHYSICAL_FLOW_ATTRIBUTE)} + + + + {/if}
@@ -162,7 +193,7 @@ } .filter-set { - background-color: white; + background-color: #fafafa; } \ No newline at end of file diff --git a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowAttributeFilters.svelte b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowAttributeFilters.svelte index fca018f9e2..3b67151daf 100644 --- a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowAttributeFilters.svelte +++ b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowAttributeFilters.svelte @@ -134,6 +134,11 @@ return _.includes(filteredTransportKinds, transportKind); } + $: hasCriticalityFilter = _.some($filters, d => d.id !== mkCriticalityFilterId()); + $: hasFrequencyFilter = _.some($filters, d => d.id !== mkFrequencyFilterId()); + $: hasTransportKindFilter = _.some($filters, d => d.id !== mkTransportKindFilterId()); + +
Criticality + {#if hasCriticalityFilter} + {/if} @@ -178,10 +185,12 @@ Use the physical flow attributes to filter the flows. Both logical and physical Frequency + {#if hasFrequencyFilter} + {/if} @@ -210,10 +219,12 @@ Use the physical flow attributes to filter the flows. Both logical and physical Transport Kind + {#if hasTransportKindFilter} + {/if} diff --git a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/flow-detail-utils.js b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/flow-detail-utils.js index e8903fff18..801cc4c7c2 100644 --- a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/flow-detail-utils.js +++ b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/flow-detail-utils.js @@ -2,6 +2,13 @@ import _ from "lodash"; import {sameRef} from "../../../../common/entity-utils"; +export const FilterKinds = { + DIRECTION: "DIRECTION", + DATA_TYPE: "DATA_TYPE", + ASSESSMENT: "ASSESSMENT", + PHYSICAL_FLOW_ATTRIBUTE: "PHYSICAL_FLOW_ATTRIBUTE" +} + export const Directions = { INBOUND: "INBOUND", OUTBOUND: "OUTBOUND", @@ -123,6 +130,7 @@ export function mkDirectionFilterId() { export function mkAssessmentFilter(id, ratings) { return { id, + kind: FilterKinds.ASSESSMENT, ratings, test: (r) => _.isEmpty(ratings) ? x => true @@ -133,6 +141,7 @@ export function mkAssessmentFilter(id, ratings) { export function mkCriticalityFilter(id, criticalities) { return { id, + kind: FilterKinds.PHYSICAL_FLOW_ATTRIBUTE, criticalities, test: (r) => _.isEmpty(criticalities) ? x => true @@ -143,6 +152,7 @@ export function mkCriticalityFilter(id, criticalities) { export function mkFrequencyFilter(id, frequencies) { return { id, + kind: FilterKinds.PHYSICAL_FLOW_ATTRIBUTE, frequencies, test: (r) => _.isEmpty(frequencies) ? x => true @@ -153,6 +163,7 @@ export function mkFrequencyFilter(id, frequencies) { export function mkTransportKindFilter(id, transportKinds) { return { id, + kind: FilterKinds.PHYSICAL_FLOW_ATTRIBUTE, transportKinds, test: (r) => _.isEmpty(transportKinds) ? x => true @@ -163,6 +174,7 @@ export function mkTransportKindFilter(id, transportKinds) { export function mkDataTypeFilter(id, dataTypes) { return { id, + kind: FilterKinds.DATA_TYPE, dataTypes, test: (r) => _.isEmpty(dataTypes) ? x => true @@ -173,6 +185,7 @@ export function mkDataTypeFilter(id, dataTypes) { export function mkDirectionFilter(id, direction) { return { id, + kind: FilterKinds.DIRECTION, direction, test: (r) => direction === Directions.ALL ? true From 7373dd871ff06ff6535c565d51202523724829a2 Mon Sep 17 00:00:00 2001 From: woodjes Date: Mon, 13 Nov 2023 18:43:59 +0000 Subject: [PATCH 3/7] Links to pages #CTCTOWALTZ-2931 #6834 --- .../flow-detail-tab/FlowDetailPanel.svelte | 8 +-- .../PhysicalFlowAttributeFilters.svelte | 6 +- .../flow-detail-tab/SelectedFlowDetail.svelte | 57 ++++++++++++++----- 3 files changed, 51 insertions(+), 20 deletions(-) diff --git a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/FlowDetailPanel.svelte b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/FlowDetailPanel.svelte index 632a81a758..0e3d835caf 100644 --- a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/FlowDetailPanel.svelte +++ b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/FlowDetailPanel.svelte @@ -111,7 +111,7 @@
- Flow Direction + Flow Direction {#if _.some($filters, d => d.kind === FilterKinds.DIRECTION) && _.find($filters, d => d.kind === FilterKinds.DIRECTION).direction !== Directions.ALL} @@ -124,7 +124,7 @@
- Data Types + Data Types {#if _.some($filters, d => d.kind === FilterKinds.DATA_TYPE)} @@ -137,7 +137,7 @@
- Assessments + Assessments {#if _.some($filters, d => d.kind === FilterKinds.ASSESSMENT)} @@ -150,7 +150,7 @@
- Physical Flow + Physical Flow {#if _.some($filters, d => d.kind === FilterKinds.PHYSICAL_FLOW_ATTRIBUTE)} diff --git a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowAttributeFilters.svelte b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowAttributeFilters.svelte index 3b67151daf..7f0751ff6c 100644 --- a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowAttributeFilters.svelte +++ b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowAttributeFilters.svelte @@ -134,9 +134,9 @@ return _.includes(filteredTransportKinds, transportKind); } - $: hasCriticalityFilter = _.some($filters, d => d.id !== mkCriticalityFilterId()); - $: hasFrequencyFilter = _.some($filters, d => d.id !== mkFrequencyFilterId()); - $: hasTransportKindFilter = _.some($filters, d => d.id !== mkTransportKindFilterId()); + $: hasCriticalityFilter = _.some($filters, d => d.id === mkCriticalityFilterId()); + $: hasFrequencyFilter = _.some($filters, d => d.id === mkFrequencyFilterId()); + $: hasTransportKindFilter = _.some($filters, d => d.id === mkTransportKindFilterId()); diff --git a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/SelectedFlowDetail.svelte b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/SelectedFlowDetail.svelte index 08b24e2f0f..b90d74b6ea 100644 --- a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/SelectedFlowDetail.svelte +++ b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/SelectedFlowDetail.svelte @@ -61,6 +61,24 @@ }; } + function goToLogicalFlowPage(flow) { + $pageInfo = { + state: "main.logical-flow.view", + params: { + id: flow.logicalFlow.id + } + } + } + + function goToPhysicalFlowPage(flow) { + $pageInfo = { + state: "main.physical-flow.view", + params: { + id: flow.physicalFlow.id + } + } + } + @@ -68,7 +86,7 @@
- +
This will open the flow registration page
+ +
  • +
    To remove this logical flow or edit it's data types + +
  • @@ -258,18 +285,22 @@
    +
    + {#if hasEditPermission} +
    +
      +
    • +
      To remove this physical flow or edit it's attributes + +
      +
    • +
    +
    + {/if} {/if}
    - - - \ No newline at end of file + \ No newline at end of file From c1b2e8933a9e20b23fd769d72dbfa631db6fc00a Mon Sep 17 00:00:00 2001 From: woodjes Date: Mon, 13 Nov 2023 19:02:09 +0000 Subject: [PATCH 4/7] Sticky table header #CTCTOWALTZ-2931 #6834 --- .../svelte/flow-detail-tab/LogicalFlowTable.svelte | 8 ++++++++ .../svelte/flow-detail-tab/PhysicalFlowTable.svelte | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/LogicalFlowTable.svelte b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/LogicalFlowTable.svelte index ae67651055..d5713f5a6b 100644 --- a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/LogicalFlowTable.svelte +++ b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/LogicalFlowTable.svelte @@ -134,10 +134,18 @@ table { display: table; white-space: nowrap; + position: relative; + } + + th { + position: sticky; + top: 0; + background: white; } .table-container { overflow-x: auto; + padding-top: 0; } .rating-col { diff --git a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowTable.svelte b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowTable.svelte index 3c0e51264d..d5cad27a08 100644 --- a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowTable.svelte +++ b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowTable.svelte @@ -127,10 +127,18 @@ table { display: table; white-space: nowrap; + position: relative; + } + + th { + position: sticky; + top: 0; + background: white; } .table-container { overflow-x: auto; + padding-top: 0; } From 1fcdd9cd3c8d4f5f1716b25bf152ca1c74be0cc8 Mon Sep 17 00:00:00 2001 From: woodjes Date: Tue, 14 Nov 2023 08:48:27 +0000 Subject: [PATCH 5/7] Sticky table header #CTCTOWALTZ-2931 #6834 --- .../components/svelte/flow-detail-tab/LogicalFlowTable.svelte | 1 + .../components/svelte/flow-detail-tab/PhysicalFlowTable.svelte | 1 + 2 files changed, 2 insertions(+) diff --git a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/LogicalFlowTable.svelte b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/LogicalFlowTable.svelte index d5713f5a6b..bd7cafea4c 100644 --- a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/LogicalFlowTable.svelte +++ b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/LogicalFlowTable.svelte @@ -135,6 +135,7 @@ display: table; white-space: nowrap; position: relative; + border-collapse: separate; } th { diff --git a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowTable.svelte b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowTable.svelte index d5cad27a08..cccd32cb5a 100644 --- a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowTable.svelte +++ b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/PhysicalFlowTable.svelte @@ -128,6 +128,7 @@ display: table; white-space: nowrap; position: relative; + border-collapse: separate; } th { From 19a61cb08c156ef24824e8f2b029aa86c4026a73 Mon Sep 17 00:00:00 2001 From: woodjes Date: Tue, 14 Nov 2023 09:57:29 +0000 Subject: [PATCH 6/7] Style actions #CTCTOWALTZ-2931 #6834 --- .../flow-detail-tab/SelectedFlowDetail.svelte | 81 +++++++++++-------- 1 file changed, 49 insertions(+), 32 deletions(-) diff --git a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/SelectedFlowDetail.svelte b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/SelectedFlowDetail.svelte index b90d74b6ea..81d44302f2 100644 --- a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/SelectedFlowDetail.svelte +++ b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/SelectedFlowDetail.svelte @@ -187,27 +187,32 @@ {/if} - {#if hasEditPermission} -
    -
      +
      +
        + {#if hasEditPermission}
      • - -
        This will open the flow registration page
        -
      • -
      • -
        To remove this logical flow or edit it's data types + -
        + This will open the flow registration page +
      • -
      -
      - {/if} + {/if} +
    • + + + {#if hasEditPermission} + To remove the flow or edit it's data types + {/if} + +
    • +
    +
    {/if} {#if $selectedPhysicalFlow} @@ -286,21 +291,33 @@
    - {#if hasEditPermission} -
    -
      -
    • -
      To remove this physical flow or edit it's attributes - -
      -
    • -
    -
    - {/if} +
    +
      +
    • + + + {#if hasEditPermission} + To remove the flow or edit it's attributes + {/if} + +
    • +
    +
    {/if} - \ No newline at end of file + + + \ No newline at end of file From 3bcc40890f3df3998a2ddd6b893b38ba8dbdda55 Mon Sep 17 00:00:00 2001 From: woodjes Date: Tue, 14 Nov 2023 10:22:51 +0000 Subject: [PATCH 7/7] Add exports #CTCTOWALTZ-2931 #6834 --- .../flow-detail-tab/FlowDetailPanel.svelte | 18 ++++++++++++++++++ .../extracts/LogicalFlowViewExtractor.java | 8 +++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/FlowDetailPanel.svelte b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/FlowDetailPanel.svelte index 0e3d835caf..c8eb9be772 100644 --- a/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/FlowDetailPanel.svelte +++ b/waltz-ng/client/data-flow/components/svelte/flow-detail-tab/FlowDetailPanel.svelte @@ -22,6 +22,7 @@ import {onMount} from "svelte"; import PhysicalFlowAttributeFilters from "./PhysicalFlowAttributeFilters.svelte"; import Icon from "../../../../common/svelte/Icon.svelte"; + import DataExtractLink from "../../../../common/svelte/DataExtractLink.svelte"; export let parentEntityRef; @@ -167,6 +168,23 @@
    +
    + + + | + + +
    + {#if $selectedLogicalFlow || $selectedPhysicalFlow}
    diff --git a/waltz-web/src/main/java/org/finos/waltz/web/endpoints/extracts/LogicalFlowViewExtractor.java b/waltz-web/src/main/java/org/finos/waltz/web/endpoints/extracts/LogicalFlowViewExtractor.java index d0c96b89c6..4b4e88bbdc 100644 --- a/waltz-web/src/main/java/org/finos/waltz/web/endpoints/extracts/LogicalFlowViewExtractor.java +++ b/waltz-web/src/main/java/org/finos/waltz/web/endpoints/extracts/LogicalFlowViewExtractor.java @@ -38,6 +38,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.Objects; @@ -45,6 +46,7 @@ import static java.util.stream.Collectors.toList; import static org.finos.waltz.common.StringUtilities.joinUsing; +import static org.finos.waltz.model.utils.IdUtilities.indexById; import static spark.Spark.post; @@ -111,7 +113,7 @@ private List> prepareReportRows(LogicalFlowView viewData) { Map> dataTypesByFlowId = MapUtilities.groupBy(viewData.dataTypeDecorators(), d -> d.dataFlowId()); Map> physicalsByLogicalFlowId = MapUtilities.groupBy(viewData.physicalFlows(), PhysicalFlow::logicalFlowId); Map> ratingsByFlowId = MapUtilities.groupBy(viewData.flowRatings(), d -> d.entityReference().id()); - Map ratingSchemeItemsById = MapUtilities.indexBy(viewData.ratingSchemeItems(), d -> d.id()); + Map ratingSchemeItemsById = indexById(viewData.ratingSchemeItems()); return viewData .flows() @@ -137,9 +139,9 @@ private List> prepareReportRows(LogicalFlowView viewData) { viewData.primaryAssessmentDefinitions() .stream() - .sorted() + .sorted(Comparator.comparing(NameProvider::name)) .forEach(defn -> { - String ratingsStrForDefn = ratingsByDefnId.getOrDefault(defn.id(), Collections.emptySet()) + String ratingsStrForDefn = ratingsByDefnId.getOrDefault(defn.id().get(), Collections.emptySet()) .stream() .map(d -> ratingSchemeItemsById.getOrDefault(d.ratingId(), null)) .filter(Objects::nonNull)