From 6d2a8908eae29aef10898971336360908d77392c Mon Sep 17 00:00:00 2001 From: woodjes Date: Tue, 27 Feb 2024 13:46:41 +0000 Subject: [PATCH] Add phys flow name to table in logical flow view #CTCTOWALTZ-3004 #6908 --- .../client/physical-flow/physical-flow-table-utilities.js | 3 ++- .../components/flow-table/physical-flow-table.js | 5 +++-- .../physical-flow-section/physical-flow-section.js | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/waltz-ng/client/physical-flow/physical-flow-table-utilities.js b/waltz-ng/client/physical-flow/physical-flow-table-utilities.js index ff4bf4610d..a43d09c2da 100644 --- a/waltz-ng/client/physical-flow/physical-flow-table-utilities.js +++ b/waltz-ng/client/physical-flow/physical-flow-table-utilities.js @@ -22,7 +22,8 @@ import {CORE_API} from "../common/services/core-api-utils"; export const columnDef = { - name: mkLinkGridCell("Name", "specification.name", "physicalFlow.id", "main.physical-flow.view"), + name: mkLinkGridCell("Name", "physicalFlow.name", "physicalFlow.id", "main.physical-flow.view"), + specName: mkLinkGridCell("Specification Name", "specification.name", "specification.id", "main.physical-specification.view"), extId: {field: "physicalFlow.externalId", displayName: "Ext. Id"}, format: {field: "specification.format", displayName: "Format", cellFilter: "toDisplayName:\"DataFormatKind\""}, transport: { diff --git a/waltz-ng/client/physical-flows/components/flow-table/physical-flow-table.js b/waltz-ng/client/physical-flows/components/flow-table/physical-flow-table.js index 64bfcfce6c..86ada197e2 100644 --- a/waltz-ng/client/physical-flows/components/flow-table/physical-flow-table.js +++ b/waltz-ng/client/physical-flows/components/flow-table/physical-flow-table.js @@ -40,6 +40,7 @@ function controller($q, serviceBroker) { const defaultColumnDefs = [ withWidth(columnDef.name, "20%"), + withWidth(columnDef.specName, "20%"), columnDef.extId, columnDef.format, columnDef.transport, @@ -48,13 +49,13 @@ function controller($q, serviceBroker) { columnDef.description ]; - vm.$onInit = () => { + vm.$onChanges = () => { vm.columnDefs = _.isEmpty(vm.optionalColumnDefs) ? defaultColumnDefs : vm.optionalColumnDefs; - vm.tableData = fetchData(vm.parentEntityRef, $q, serviceBroker) + fetchData(vm.parentEntityRef, $q, serviceBroker) .then(data => vm.tableData = data); vm.selectorOptions = mkSelectionOptions( diff --git a/waltz-ng/client/physical-flows/components/physical-flow-section/physical-flow-section.js b/waltz-ng/client/physical-flows/components/physical-flow-section/physical-flow-section.js index ef4b794b83..4abd15dfa9 100644 --- a/waltz-ng/client/physical-flows/components/physical-flow-section/physical-flow-section.js +++ b/waltz-ng/client/physical-flows/components/physical-flow-section/physical-flow-section.js @@ -33,6 +33,7 @@ function determineColumnDefs(entityKind) { switch (entityKind) { case "PHYSICAL_SPECIFICATION": return [ + columnDef.name, columnDef.extId, columnDef.source, columnDef.target, @@ -42,9 +43,9 @@ function determineColumnDefs(entityKind) { case "TAG": return [ columnDef.name, + columnDef.extId, columnDef.source, columnDef.target, - columnDef.extId, columnDef.frequency, columnDef.description]; default: