You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by sc...@apache.org on 2024/04/10 15:07:51 UTC
(nifi) branch main updated: [NIFI-12995]- Change Flow Version, Show Local Changes, Revert local changes (#8607)
This is an automated email from the ASF dual-hosted git repository.
scottyaslan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 90d0f6317a [NIFI-12995]- Change Flow Version, Show Local Changes, Revert local changes (#8607)
90d0f6317a is described below
commit 90d0f6317a94d1730f779b719398c6a384fb9033
Author: Rob Fellows <ro...@gmail.com>
AuthorDate: Wed Apr 10 11:07:44 2024 -0400
[NIFI-12995]- Change Flow Version, Show Local Changes, Revert local changes (#8607)
* [NIFI-12995]- Change Flow Version, Show Local Changes, Revert local changes
* review feedback
---
.../nifi-web-frontend/src/main/nifi/.prettierrc | 10 +-
.../src/main/nifi/package-lock.json | 322 +----------------
.../nifi-web-frontend/src/main/nifi/package.json | 2 +-
.../nifi-web-frontend/src/main/nifi/project.json | 12 +
.../service/canvas-context-menu.service.ts | 60 +++-
.../pages/flow-designer/service/flow.service.ts | 56 +++
.../pages/flow-designer/state/flow/flow.actions.ts | 104 +++++-
.../pages/flow-designer/state/flow/flow.effects.ts | 394 ++++++++++++++++++++-
.../pages/flow-designer/state/flow/flow.reducer.ts | 21 ++
.../flow-designer/state/flow/flow.selectors.ts | 5 +
.../app/pages/flow-designer/state/flow/index.ts | 66 +++-
.../change-version-dialog.html | 98 +++++
.../change-version-dialog.scss | 36 ++
.../change-version-dialog.spec.ts | 101 ++++++
.../change-version-dialog/change-version-dialog.ts | 131 +++++++
.../change-version-progress-dialog.html | 51 +++
.../change-version-progress-dialog.scss | 22 ++
.../change-version-progress-dialog.spec.ts | 39 ++
.../change-version-progress-dialog.ts | 41 +++
.../local-changes-dialog/local-changes-dialog.html | 50 +++
.../local-changes-dialog/local-changes-dialog.scss | 19 +
.../local-changes-dialog.spec.ts | 102 ++++++
.../local-changes-dialog/local-changes-dialog.ts | 70 ++++
.../local-changes-table/local-changes-table.html | 80 +++++
.../local-changes-table/local-changes-table.scss | 25 ++
.../local-changes-table.spec.ts | 40 +++
.../local-changes-table/local-changes-table.ts | 174 +++++++++
.../save-version-dialog.component.html | 6 +-
.../nifi/src/app/service/nifi-common.service.ts | 9 +-
29 files changed, 1811 insertions(+), 335 deletions(-)
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/.prettierrc b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/.prettierrc
index 296f9390f3..c5e7cae03c 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/.prettierrc
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/.prettierrc
@@ -4,5 +4,13 @@
"singleQuote": true,
"printWidth": 120,
"tabWidth": 4,
- "bracketSameLine": true
+ "bracketSameLine": true,
+ "overrides": [
+ {
+ "files": "*.html",
+ "options": {
+ "parser": "angular"
+ }
+ }
+ ]
}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/package-lock.json b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/package-lock.json
index c88e010ef6..3614747ca5 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/package-lock.json
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/package-lock.json
@@ -67,7 +67,7 @@
"jest-preset-angular": "^14.0.3",
"nx": "18.1.3",
"postcss": "^8.4.32",
- "prettier": "3.1.0",
+ "prettier": "^3.2.5",
"tailwindcss": "^3.3.6",
"typescript": "5.3.3"
},
@@ -8939,19 +8939,11 @@
"node": ">=14"
}
},
- "node_modules/@pkgr/utils": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz",
- "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==",
+ "node_modules/@pkgr/core": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz",
+ "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==",
"dev": true,
- "dependencies": {
- "cross-spawn": "^7.0.3",
- "fast-glob": "^3.3.0",
- "is-glob": "^4.0.3",
- "open": "^9.1.0",
- "picocolors": "^1.0.0",
- "tslib": "^2.6.0"
- },
"engines": {
"node": "^12.20.0 || ^14.18.0 || >=16.0.0"
},
@@ -8959,36 +8951,6 @@
"url": "https://opencollective.com/unts"
}
},
- "node_modules/@pkgr/utils/node_modules/define-lazy-prop": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz",
- "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/@pkgr/utils/node_modules/open": {
- "version": "9.1.0",
- "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz",
- "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==",
- "dev": true,
- "dependencies": {
- "default-browser": "^4.0.0",
- "define-lazy-prop": "^3.0.0",
- "is-inside-container": "^1.0.0",
- "is-wsl": "^2.2.0"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.12.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.0.tgz",
@@ -11446,15 +11408,6 @@
"integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==",
"dev": true
},
- "node_modules/big-integer": {
- "version": "1.6.52",
- "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz",
- "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==",
- "dev": true,
- "engines": {
- "node": ">=0.6"
- }
- },
"node_modules/big.js": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
@@ -11551,18 +11504,6 @@
"integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==",
"dev": true
},
- "node_modules/bplist-parser": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz",
- "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==",
- "dev": true,
- "dependencies": {
- "big-integer": "^1.6.44"
- },
- "engines": {
- "node": ">= 5.10.0"
- }
- },
"node_modules/brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@@ -11677,21 +11618,6 @@
"semver": "^7.0.0"
}
},
- "node_modules/bundle-name": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz",
- "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==",
- "dev": true,
- "dependencies": {
- "run-applescript": "^5.0.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/bytes": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
@@ -13298,150 +13224,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/default-browser": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz",
- "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==",
- "dev": true,
- "dependencies": {
- "bundle-name": "^3.0.0",
- "default-browser-id": "^3.0.0",
- "execa": "^7.1.1",
- "titleize": "^3.0.0"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/default-browser-id": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz",
- "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==",
- "dev": true,
- "dependencies": {
- "bplist-parser": "^0.2.0",
- "untildify": "^4.0.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/default-browser/node_modules/execa": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz",
- "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==",
- "dev": true,
- "dependencies": {
- "cross-spawn": "^7.0.3",
- "get-stream": "^6.0.1",
- "human-signals": "^4.3.0",
- "is-stream": "^3.0.0",
- "merge-stream": "^2.0.0",
- "npm-run-path": "^5.1.0",
- "onetime": "^6.0.0",
- "signal-exit": "^3.0.7",
- "strip-final-newline": "^3.0.0"
- },
- "engines": {
- "node": "^14.18.0 || ^16.14.0 || >=18.0.0"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/execa?sponsor=1"
- }
- },
- "node_modules/default-browser/node_modules/human-signals": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz",
- "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==",
- "dev": true,
- "engines": {
- "node": ">=14.18.0"
- }
- },
- "node_modules/default-browser/node_modules/is-stream": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
- "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
- "dev": true,
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/default-browser/node_modules/mimic-fn": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
- "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/default-browser/node_modules/npm-run-path": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz",
- "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==",
- "dev": true,
- "dependencies": {
- "path-key": "^4.0.0"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/default-browser/node_modules/onetime": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
- "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
- "dev": true,
- "dependencies": {
- "mimic-fn": "^4.0.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/default-browser/node_modules/path-key": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
- "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/default-browser/node_modules/strip-final-newline": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
- "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/default-gateway": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz",
@@ -14065,23 +13847,24 @@
}
},
"node_modules/eslint-plugin-prettier": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz",
- "integrity": "sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==",
+ "version": "5.1.3",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz",
+ "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==",
"dev": true,
"dependencies": {
"prettier-linter-helpers": "^1.0.0",
- "synckit": "^0.8.5"
+ "synckit": "^0.8.6"
},
"engines": {
"node": "^14.18.0 || >=16.0.0"
},
"funding": {
- "url": "https://opencollective.com/prettier"
+ "url": "https://opencollective.com/eslint-plugin-prettier"
},
"peerDependencies": {
"@types/eslint": ">=8.0.0",
"eslint": ">=8.0.0",
+ "eslint-config-prettier": "*",
"prettier": ">=3.0.0"
},
"peerDependenciesMeta": {
@@ -16189,39 +15972,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/is-inside-container": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz",
- "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==",
- "dev": true,
- "dependencies": {
- "is-docker": "^3.0.0"
- },
- "bin": {
- "is-inside-container": "cli.js"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/is-inside-container/node_modules/is-docker": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz",
- "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==",
- "dev": true,
- "bin": {
- "is-docker": "cli.js"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/is-interactive": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",
@@ -21329,9 +21079,9 @@
}
},
"node_modules/prettier": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz",
- "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==",
+ "version": "3.2.5",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz",
+ "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==",
"dev": true,
"bin": {
"prettier": "bin/prettier.cjs"
@@ -22002,21 +21752,6 @@
"fsevents": "~2.3.2"
}
},
- "node_modules/run-applescript": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz",
- "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==",
- "dev": true,
- "dependencies": {
- "execa": "^5.0.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/run-async": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz",
@@ -23058,12 +22793,12 @@
"dev": true
},
"node_modules/synckit": {
- "version": "0.8.6",
- "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.6.tgz",
- "integrity": "sha512-laHF2savN6sMeHCjLRkheIU4wo3Zg9Ln5YOjOo7sZ5dVQW8yF5pPE5SIw1dsPhq3TRp1jisKRCdPhfs/1WMqDA==",
+ "version": "0.8.8",
+ "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz",
+ "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==",
"dev": true,
"dependencies": {
- "@pkgr/utils": "^2.4.2",
+ "@pkgr/core": "^0.1.0",
"tslib": "^2.6.2"
},
"engines": {
@@ -23375,18 +23110,6 @@
"integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==",
"dev": true
},
- "node_modules/titleize": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz",
- "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/tmp": {
"version": "0.0.33",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
@@ -23965,15 +23688,6 @@
"node": ">= 0.8"
}
},
- "node_modules/untildify": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz",
- "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/update-browserslist-db": {
"version": "1.0.13",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz",
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/package.json b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/package.json
index 7148cfc12f..7c9cd256b2 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/package.json
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/package.json
@@ -75,7 +75,7 @@
"jest-preset-angular": "^14.0.3",
"nx": "18.1.3",
"postcss": "^8.4.32",
- "prettier": "3.1.0",
+ "prettier": "^3.2.5",
"tailwindcss": "^3.3.6",
"typescript": "5.3.3"
},
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/project.json b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/project.json
index ba798374cf..1b300952e4 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/project.json
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/project.json
@@ -81,6 +81,18 @@
"lintFilePatterns": ["src/**/*.ts"]
},
"outputs": ["{options.outputFile}"]
+ },
+ "prettier": {
+ "executor": "nx:run-commands",
+ "options": {
+ "command": "npm run prettier"
+ }
+ },
+ "prettier:format": {
+ "executor": "nx:run-commands",
+ "options": {
+ "command": "npm run prettier-format"
+ }
}
}
}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-context-menu.service.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-context-menu.service.ts
index e8b70f4e4d..4a6a1c0a31 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-context-menu.service.ts
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-context-menu.service.ts
@@ -37,9 +37,12 @@ import {
navigateToProvenanceForComponent,
navigateToQueueListing,
navigateToViewStatusHistoryForComponent,
+ openChangeVersionDialogRequest,
openCommitLocalChangesDialogRequest,
openForceCommitLocalChangesDialogRequest,
+ openRevertLocalChangesDialogRequest,
openSaveVersionDialogRequest,
+ openShowLocalChangesDialogRequest,
reloadFlow,
replayLastProvenanceEvent,
requestRefreshRemoteProcessGroup,
@@ -52,11 +55,13 @@ import {
} from '../state/flow/flow.actions';
import { ComponentType } from '../../../state/shared';
import {
+ ConfirmStopVersionControlRequest,
DeleteComponentRequest,
MoveComponentRequest,
+ OpenChangeVersionDialogRequest,
+ OpenLocalChangesDialogRequest,
StartComponentRequest,
- StopComponentRequest,
- StopVersionControlRequest
+ StopComponentRequest
} from '../state/flow';
import {
ContextMenuDefinition,
@@ -148,8 +153,17 @@ export class CanvasContextMenu implements ContextMenuDefinitionProvider {
},
clazz: 'fa',
text: 'Show local changes',
- action: () => {
- // TODO - showLocalChanges
+ action: (selection: d3.Selection<any, any, any, any>) => {
+ let pgId;
+ if (selection.empty()) {
+ pgId = this.canvasUtils.getProcessGroupId();
+ } else {
+ pgId = selection.datum().id;
+ }
+ const request: OpenLocalChangesDialogRequest = {
+ processGroupId: pgId
+ };
+ this.store.dispatch(openShowLocalChangesDialogRequest({ request }));
}
},
{
@@ -158,8 +172,17 @@ export class CanvasContextMenu implements ContextMenuDefinitionProvider {
},
clazz: 'fa fa-undo',
text: 'Revert local changes',
- action: () => {
- // TODO - revertLocalChanges
+ action: (selection: d3.Selection<any, any, any, any>) => {
+ let pgId;
+ if (selection.empty()) {
+ pgId = this.canvasUtils.getProcessGroupId();
+ } else {
+ pgId = selection.datum().id;
+ }
+ const request: OpenLocalChangesDialogRequest = {
+ processGroupId: pgId
+ };
+ this.store.dispatch(openRevertLocalChangesDialogRequest({ request }));
}
},
{
@@ -168,8 +191,17 @@ export class CanvasContextMenu implements ContextMenuDefinitionProvider {
},
clazz: 'fa',
text: 'Change version',
- action: () => {
- // TODO - changeFlowVersion
+ action: (selection: d3.Selection<any, any, any, any>) => {
+ let pgId;
+ if (selection.empty()) {
+ pgId = this.canvasUtils.getProcessGroupId();
+ } else {
+ pgId = selection.datum().id;
+ }
+ const request: OpenChangeVersionDialogRequest = {
+ processGroupId: pgId
+ };
+ this.store.dispatch(openChangeVersionDialogRequest({ request }));
}
},
{
@@ -182,10 +214,14 @@ export class CanvasContextMenu implements ContextMenuDefinitionProvider {
clazz: 'fa',
text: 'Stop version control',
action: (selection: d3.Selection<any, any, any, any>) => {
- const selectionData = selection.datum();
- const request: StopVersionControlRequest = {
- revision: selectionData.revision,
- processGroupId: selectionData.id
+ let pgId;
+ if (selection.empty()) {
+ pgId = this.canvasUtils.getProcessGroupId();
+ } else {
+ pgId = selection.datum().id;
+ }
+ const request: ConfirmStopVersionControlRequest = {
+ processGroupId: pgId
};
this.store.dispatch(stopVersionControlRequest({ request }));
}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/flow.service.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/flow.service.ts
index f5460185c4..9133eee2ad 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/flow.service.ts
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/flow.service.ts
@@ -27,6 +27,8 @@ import {
CreateProcessorRequest,
CreateRemoteProcessGroupRequest,
DeleteComponentRequest,
+ FlowComparisonEntity,
+ FlowUpdateRequestEntity,
GoToRemoteProcessGroupRequest,
ProcessGroupRunStatusRequest,
ReplayLastProvenanceEventRequest,
@@ -355,4 +357,58 @@ export class FlowService implements PropertyDescriptorRetriever {
params
}) as Observable<VersionControlInformationEntity>;
}
+
+ initiateChangeVersionUpdate(request: VersionControlInformationEntity) {
+ return this.httpClient.post(
+ `${FlowService.API}/versions/update-requests/process-groups/${request.versionControlInformation?.groupId}`,
+ {
+ ...request
+ }
+ ) as Observable<FlowUpdateRequestEntity>;
+ }
+
+ getChangeVersionUpdateRequest(requestId: string) {
+ return this.httpClient.get(
+ `${FlowService.API}/versions/update-requests/${requestId}`
+ ) as Observable<FlowUpdateRequestEntity>;
+ }
+
+ deleteChangeVersionUpdateRequest(requestId: string) {
+ const params = {
+ disconnectedNodeAcknowledged: false
+ };
+ return this.httpClient.delete(`${FlowService.API}/versions/update-requests/${requestId}`, {
+ params
+ }) as Observable<FlowUpdateRequestEntity>;
+ }
+
+ initiateRevertFlowVersion(request: VersionControlInformationEntity) {
+ return this.httpClient.post(
+ `${FlowService.API}/versions/revert-requests/process-groups/${request.versionControlInformation?.groupId}`,
+ {
+ ...request
+ }
+ ) as Observable<FlowUpdateRequestEntity>;
+ }
+
+ getRevertChangesUpdateRequest(requestId: string) {
+ return this.httpClient.get(
+ `${FlowService.API}/versions/revert-requests/${requestId}`
+ ) as Observable<FlowUpdateRequestEntity>;
+ }
+
+ deleteRevertChangesUpdateRequest(requestId: string) {
+ const params = {
+ disconnectedNodeAcknowledged: false
+ };
+ return this.httpClient.delete(`${FlowService.API}/versions/revert-requests/${requestId}`, {
+ params
+ }) as Observable<FlowUpdateRequestEntity>;
+ }
+
+ getLocalModifications(processGroupId: string): Observable<FlowComparisonEntity> {
+ return this.httpClient.get(
+ `${FlowService.API}/process-groups/${processGroupId}/local-modifications`
+ ) as Observable<FlowComparisonEntity>;
+ }
}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.actions.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.actions.ts
index 28498d2066..592a4648c5 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.actions.ts
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.actions.ts
@@ -18,7 +18,9 @@
import { createAction, props } from '@ngrx/store';
import {
CenterComponentRequest,
+ ChangeVersionDialogRequest,
ComponentEntity,
+ ConfirmStopVersionControlRequest,
CreateComponentRequest,
CreateComponentResponse,
CreateConnection,
@@ -35,6 +37,7 @@ import {
EditConnectionDialogRequest,
EditCurrentProcessGroupRequest,
EnterProcessGroupRequest,
+ FlowUpdateRequestEntity,
GoToRemoteProcessGroupRequest,
GroupComponentsDialogRequest,
GroupComponentsRequest,
@@ -48,13 +51,16 @@ import {
LoadProcessGroupResponse,
LoadProcessorSuccess,
LoadRemoteProcessGroupSuccess,
+ LocalChangesDialogRequest,
MoveComponentsRequest,
NavigateToComponentRequest,
NavigateToControllerServicesRequest,
NavigateToManageComponentPoliciesRequest,
NavigateToQueueListing,
+ OpenChangeVersionDialogRequest,
OpenComponentDialogRequest,
OpenGroupComponentsDialogRequest,
+ OpenLocalChangesDialogRequest,
OpenSaveVersionDialogRequest,
RefreshRemoteProcessGroupRequest,
ReplayLastProvenanceEventRequest,
@@ -609,6 +615,11 @@ export const startCurrentProcessGroup = createAction(`${CANVAS_PREFIX} Start Cur
export const stopCurrentProcessGroup = createAction(`${CANVAS_PREFIX} Stop Current Process Group`);
+export const openChangeVersionDialogRequest = createAction(
+ `${CANVAS_PREFIX} Open Change Flow Version Dialog Request`,
+ props<{ request: OpenChangeVersionDialogRequest }>()
+);
+
export const openSaveVersionDialogRequest = createAction(
`${CANVAS_PREFIX} Open Save Flow Version Dialog Request`,
props<{ request: OpenSaveVersionDialogRequest }>()
@@ -624,6 +635,42 @@ export const openForceCommitLocalChangesDialogRequest = createAction(
props<{ request: OpenSaveVersionDialogRequest }>()
);
+export const openChangeVersionDialog = createAction(
+ `${CANVAS_PREFIX} Open Change Flow Version Dialog`,
+ props<{ request: ChangeVersionDialogRequest }>()
+);
+
+export const openChangeVersionProgressDialog = createAction(
+ `${CANVAS_PREFIX} Open Change Flow Version Progress Dialog`,
+ props<{ request: VersionControlInformationEntity }>()
+);
+
+export const changeVersion = createAction(
+ `${CANVAS_PREFIX} Change Flow Version`,
+ props<{ request: VersionControlInformationEntity }>()
+);
+
+export const changeVersionSuccess = createAction(
+ `${CANVAS_PREFIX} Change Flow Version Success`,
+ props<{ response: FlowUpdateRequestEntity }>()
+);
+
+export const changeVersionComplete = createAction(
+ `${CANVAS_PREFIX} Change Flow Version Complete`,
+ props<{ response: FlowUpdateRequestEntity }>()
+);
+
+export const startPollingChangeVersion = createAction(`${CANVAS_PREFIX} Start Polling Change Version`);
+
+export const pollChangeVersion = createAction(`${CANVAS_PREFIX} Poll Change Version`);
+
+export const pollChangeVersionSuccess = createAction(
+ `${CANVAS_PREFIX} Poll Change Version Success`,
+ props<{ response: FlowUpdateRequestEntity }>()
+);
+
+export const stopPollingChangeVersion = createAction(`${CANVAS_PREFIX} Stop Polling Change Version`);
+
export const openSaveVersionDialog = createAction(
`${CANVAS_PREFIX} Open Save Flow Version Dialog`,
props<{ request: SaveVersionDialogRequest }>()
@@ -646,7 +693,7 @@ export const flowVersionBannerError = createAction(
export const stopVersionControlRequest = createAction(
`${CANVAS_PREFIX} Stop Version Control Request`,
- props<{ request: StopVersionControlRequest }>()
+ props<{ request: ConfirmStopVersionControlRequest }>()
);
export const stopVersionControl = createAction(
@@ -658,3 +705,58 @@ export const stopVersionControlSuccess = createAction(
`${CANVAS_PREFIX} Stop Version Control Success`,
props<{ response: StopVersionControlResponse }>()
);
+
+export const flowSnackbarError = createAction(`${CANVAS_PREFIX} Flow Snackbar Error`, props<{ error: string }>());
+
+export const openShowLocalChangesDialogRequest = createAction(
+ `${CANVAS_PREFIX} Open Show Local Changes Dialog Request`,
+ props<{ request: OpenLocalChangesDialogRequest }>()
+);
+
+export const openRevertLocalChangesDialogRequest = createAction(
+ `${CANVAS_PREFIX} Open Revert Local Changes Dialog Request`,
+ props<{ request: OpenLocalChangesDialogRequest }>()
+);
+
+export const openLocalChangesDialog = createAction(
+ `${CANVAS_PREFIX} Open Local Changes Dialog`,
+ props<{ request: LocalChangesDialogRequest }>()
+);
+
+export const goToChange = createAction(
+ `${CANVAS_PREFIX} Go To Change`,
+ props<{
+ request: NavigateToComponentRequest;
+ }>()
+);
+
+export const openRevertChangesProgressDialog = createAction(
+ `${CANVAS_PREFIX} Open Revert Changes Progress Dialog`,
+ props<{ request: VersionControlInformationEntity }>()
+);
+
+export const revertChanges = createAction(
+ `${CANVAS_PREFIX} Revert Changes`,
+ props<{ request: VersionControlInformationEntity }>()
+);
+
+export const revertChangesSuccess = createAction(
+ `${CANVAS_PREFIX} Revert Changes Success`,
+ props<{ response: FlowUpdateRequestEntity }>()
+);
+
+export const revertChangesComplete = createAction(
+ `${CANVAS_PREFIX} Revert Changes Complete`,
+ props<{ response: FlowUpdateRequestEntity }>()
+);
+
+export const startPollingRevertChanges = createAction(`${CANVAS_PREFIX} Start Polling Revert Changes`);
+
+export const pollRevertChanges = createAction(`${CANVAS_PREFIX} Poll Revert Changes`);
+
+export const pollRevertChangesSuccess = createAction(
+ `${CANVAS_PREFIX} Poll Revert Changes Success`,
+ props<{ response: FlowUpdateRequestEntity }>()
+);
+
+export const stopPollingRevertChanges = createAction(`${CANVAS_PREFIX} Stop Polling Revert Changes`);
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.effects.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.effects.ts
index 1ac8cf69e5..ed3c68693a 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.effects.ts
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.effects.ts
@@ -30,6 +30,7 @@ import {
interval,
map,
mergeMap,
+ NEVER,
Observable,
of,
switchMap,
@@ -47,15 +48,18 @@ import {
SaveVersionDialogRequest,
SaveVersionRequest,
Snippet,
+ StopVersionControlRequest,
StopVersionControlResponse,
UpdateComponentFailure,
UpdateComponentResponse,
UpdateConnectionSuccess,
- UpdateProcessorRequest
+ UpdateProcessorRequest,
+ VersionControlInformationEntity
} from './index';
import { Action, Store } from '@ngrx/store';
import {
selectAnySelectedComponentIds,
+ selectChangeVersionRequest,
selectCurrentParameterContext,
selectCurrentProcessGroupId,
selectParentProcessGroupId,
@@ -103,9 +107,12 @@ import { ImportFromRegistry } from '../../ui/canvas/items/flow/import-from-regis
import { selectCurrentUser } from '../../../../state/current-user/current-user.selectors';
import { NoRegistryClientsDialog } from '../../ui/common/no-registry-clients-dialog/no-registry-clients-dialog.component';
import { EditRemoteProcessGroup } from '../../ui/canvas/items/remote-process-group/edit-remote-process-group/edit-remote-process-group.component';
-import { LARGE_DIALOG, MEDIUM_DIALOG, SMALL_DIALOG } from '../../../../index';
+import { LARGE_DIALOG, MEDIUM_DIALOG, SMALL_DIALOG, XL_DIALOG } from '../../../../index';
import { HttpErrorResponse } from '@angular/common/http';
import { SaveVersionDialog } from '../../ui/canvas/items/flow/save-version-dialog/save-version-dialog.component';
+import { ChangeVersionDialog } from '../../ui/canvas/items/flow/change-version-dialog/change-version-dialog';
+import { ChangeVersionProgressDialog } from '../../ui/canvas/items/flow/change-version-progress-dialog/change-version-progress-dialog';
+import { LocalChangesDialog } from '../../ui/canvas/items/flow/local-changes-dialog/local-changes-dialog';
@Injectable()
export class FlowEffects {
@@ -2518,6 +2525,9 @@ export class FlowEffects {
)
);
+ //////////////////////////////////
+ // Start version control effects
+ //////////////////////////////////
openSaveVersionDialogRequest$ = createEffect(() =>
this.actions$.pipe(
ofType(FlowActions.openSaveVersionDialogRequest),
@@ -2536,7 +2546,7 @@ export class FlowEffects {
return FlowActions.openSaveVersionDialog({ request: dialogRequest });
}),
- catchError((error) => of(FlowActions.flowApiError({ error: error.error })))
+ catchError((error) => of(FlowActions.flowSnackbarError({ error: error.error })))
);
})
)
@@ -2642,11 +2652,25 @@ export class FlowEffects {
)
);
+ /////////////////////////////////
+ // Stop version control effects
+ /////////////////////////////////
stopVersionControlRequest$ = createEffect(
() =>
this.actions$.pipe(
ofType(FlowActions.stopVersionControlRequest),
map((action) => action.request),
+ switchMap((request) => {
+ return from(this.flowService.getVersionInformation(request.processGroupId)).pipe(
+ map((response) => {
+ const dialogRequest: StopVersionControlRequest = {
+ processGroupId: request.processGroupId,
+ revision: response.processGroupRevision
+ };
+ return dialogRequest;
+ })
+ );
+ }),
tap((request) => {
const dialogRef = this.dialog.open(YesNoDialog, {
...SMALL_DIALOG,
@@ -2663,7 +2687,8 @@ export class FlowEffects {
dialogRef.componentInstance.no.pipe(take(1)).subscribe(() => {
dialogRef.close();
});
- })
+ }),
+ catchError((error) => of(FlowActions.flowSnackbarError({ error: error.error })))
),
{ dispatch: false }
);
@@ -2681,7 +2706,7 @@ export class FlowEffects {
};
return FlowActions.stopVersionControlSuccess({ response: stopResponse });
}),
- catchError((errorResponse) => of(ErrorActions.snackBarError({ error: errorResponse.error })))
+ catchError((errorResponse) => of(FlowActions.flowSnackbarError({ error: errorResponse.error })))
)
)
)
@@ -2702,6 +2727,9 @@ export class FlowEffects {
)
);
+ /////////////////////////////////
+ // Commit local changes effects
+ /////////////////////////////////
openCommitLocalChangesDialogRequest$ = createEffect(() =>
this.actions$.pipe(
ofType(FlowActions.openCommitLocalChangesDialogRequest),
@@ -2757,4 +2785,360 @@ export class FlowEffects {
),
{ dispatch: false }
);
+
+ /////////////////////////////
+ // Change version effects
+ /////////////////////////////
+ openChangeVersionDialogRequest$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(FlowActions.openChangeVersionDialogRequest),
+ map((action) => action.request),
+ switchMap((request) =>
+ from(this.flowService.getVersionInformation(request.processGroupId)).pipe(
+ tap({
+ error: (errorResponse: HttpErrorResponse) =>
+ this.store.dispatch(FlowActions.flowSnackbarError({ error: errorResponse.error }))
+ })
+ )
+ ),
+ switchMap((versionControlInfo: VersionControlInformationEntity) => {
+ const vci = versionControlInfo.versionControlInformation;
+ if (vci) {
+ return from(this.registryService.getFlowVersions(vci.registryId, vci.bucketId, vci.flowId)).pipe(
+ map((versions) =>
+ FlowActions.openChangeVersionDialog({
+ request: {
+ processGroupId: vci.groupId,
+ revision: versionControlInfo.processGroupRevision,
+ versionControlInformation: vci,
+ versions:
+ versions.versionedFlowSnapshotMetadataSet as unknown as VersionedFlowSnapshotMetadataEntity[]
+ }
+ })
+ ),
+ catchError((errorResponse: HttpErrorResponse) =>
+ of(FlowActions.flowSnackbarError({ error: errorResponse.error }))
+ )
+ );
+ } else {
+ // should never happen
+ return NEVER;
+ }
+ })
+ )
+ );
+
+ openChangeVersionDialog$ = createEffect(
+ () =>
+ this.actions$.pipe(
+ ofType(FlowActions.openChangeVersionDialog),
+ map((action) => action.request),
+ tap((request) => {
+ const dialogRef = this.dialog.open(ChangeVersionDialog, {
+ ...LARGE_DIALOG,
+ data: request
+ });
+
+ dialogRef.componentInstance.changeVersion.pipe(take(1)).subscribe((selectedVersion) => {
+ const entity: VersionControlInformationEntity = {
+ versionControlInformation: {
+ ...request.versionControlInformation,
+ version: selectedVersion.version
+ },
+ processGroupRevision: request.revision,
+ disconnectedNodeAcknowledged: false
+ };
+ dialogRef.close();
+
+ this.store.dispatch(FlowActions.openChangeVersionProgressDialog({ request: entity }));
+ });
+ })
+ ),
+ { dispatch: false }
+ );
+
+ openChangeVersionProgressDialog$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(FlowActions.openChangeVersionProgressDialog),
+ map((action) => action.request),
+ tap(() => {
+ const dialogRef = this.dialog.open(ChangeVersionProgressDialog, {
+ ...SMALL_DIALOG,
+ minWidth: 365,
+ disableClose: true
+ });
+ dialogRef.componentInstance.flowUpdateRequest$ = this.store.select(selectChangeVersionRequest);
+ dialogRef.componentInstance.changeVersionComplete.pipe(take(1)).subscribe((entity) => {
+ this.store.dispatch(FlowActions.changeVersionComplete({ response: entity }));
+ });
+ }),
+ switchMap((request) => of(FlowActions.changeVersion({ request })))
+ )
+ );
+
+ changeVersion$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(FlowActions.changeVersion),
+ map((action) => action.request),
+ switchMap((request) => {
+ return from(this.flowService.initiateChangeVersionUpdate(request)).pipe(
+ map((flowUpdate) => FlowActions.changeVersionSuccess({ response: flowUpdate })),
+ catchError((errorResponse: HttpErrorResponse) =>
+ of(FlowActions.flowSnackbarError({ error: errorResponse.error }))
+ )
+ );
+ })
+ )
+ );
+
+ changeVersionSuccess$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(FlowActions.changeVersionSuccess),
+ map((action) => action.response),
+ filter((response) => !response.request.complete),
+ switchMap(() => {
+ return of(FlowActions.startPollingChangeVersion());
+ })
+ )
+ );
+
+ startPollingChangeVersion = createEffect(() =>
+ this.actions$.pipe(
+ ofType(FlowActions.startPollingChangeVersion),
+ switchMap(() =>
+ interval(2000, asyncScheduler).pipe(
+ takeUntil(this.actions$.pipe(ofType(FlowActions.stopPollingChangeVersion)))
+ )
+ ),
+ switchMap(() => of(FlowActions.pollChangeVersion()))
+ )
+ );
+
+ pollChangeVersion$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(FlowActions.pollChangeVersion),
+ concatLatestFrom(() => [this.store.select(selectChangeVersionRequest).pipe(isDefinedAndNotNull())]),
+ switchMap(([, changeVersionRequest]) => {
+ return from(
+ this.flowService.getChangeVersionUpdateRequest(changeVersionRequest.request.requestId).pipe(
+ map((response) => FlowActions.pollChangeVersionSuccess({ response })),
+ catchError((errorResponse: HttpErrorResponse) =>
+ of(FlowActions.flowSnackbarError({ error: errorResponse.error }))
+ )
+ )
+ );
+ })
+ )
+ );
+
+ pollChangeVersionSuccess$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(FlowActions.pollChangeVersionSuccess),
+ map((action) => action.response),
+ filter((response) => response.request.complete),
+ switchMap(() => of(FlowActions.stopPollingChangeVersion()))
+ )
+ );
+
+ changeVersionComplete$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(FlowActions.changeVersionComplete),
+ map((action) => action.response),
+ switchMap((response) =>
+ from(this.flowService.deleteChangeVersionUpdateRequest(response.request.requestId)).pipe(
+ map(() => FlowActions.reloadFlow()),
+ catchError((errorResponse: HttpErrorResponse) =>
+ of(FlowActions.flowSnackbarError({ error: errorResponse.error }))
+ )
+ )
+ )
+ )
+ );
+
+ flowSnackbarError$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(FlowActions.flowSnackbarError),
+ map((action) => action.error),
+ tap(() => {
+ this.dialog.closeAll();
+ }),
+ switchMap((error) => of(ErrorActions.snackBarError({ error })))
+ )
+ );
+
+ ///////////////////////////////
+ // Show local changes effects
+ ///////////////////////////////
+ openLocalChangesDialogRequest = (mode: 'SHOW' | 'REVERT') =>
+ createEffect(() =>
+ this.actions$.pipe(
+ ofType(
+ mode === 'SHOW'
+ ? FlowActions.openShowLocalChangesDialogRequest
+ : FlowActions.openRevertLocalChangesDialogRequest
+ ),
+ map((action) => action.request),
+ switchMap((request) =>
+ combineLatest([
+ this.flowService.getVersionInformation(request.processGroupId),
+ this.flowService.getLocalModifications(request.processGroupId)
+ ]).pipe(
+ map(([versionControlInfo, localModifications]) =>
+ FlowActions.openLocalChangesDialog({
+ request: {
+ localModifications,
+ versionControlInformation: versionControlInfo,
+ mode
+ }
+ })
+ ),
+ catchError((errorResponse: HttpErrorResponse) =>
+ of(FlowActions.flowSnackbarError({ error: errorResponse.error }))
+ )
+ )
+ )
+ )
+ );
+
+ openShowLocalChangesDialogRequest$ = this.openLocalChangesDialogRequest('SHOW');
+
+ openLocalChangesDialog$ = createEffect(
+ () =>
+ this.actions$.pipe(
+ ofType(FlowActions.openLocalChangesDialog),
+ map((action) => action.request),
+ tap((request) => {
+ const dialogRef = this.dialog.open(LocalChangesDialog, {
+ ...XL_DIALOG,
+ data: request
+ });
+ if (request.mode === 'REVERT') {
+ dialogRef.componentInstance.revert.pipe(take(1)).subscribe((request) => {
+ dialogRef.close();
+ this.store.dispatch(
+ FlowActions.openRevertChangesProgressDialog({
+ request: request.versionControlInformation
+ })
+ );
+ });
+ }
+ dialogRef.componentInstance.goToChange
+ .pipe(take(1))
+ .subscribe((request) => this.store.dispatch(FlowActions.goToChange({ request })));
+ })
+ ),
+ { dispatch: false }
+ );
+
+ goToChange$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(FlowActions.goToChange),
+ map((action) => action.request),
+ tap(() => this.dialog.closeAll()),
+ switchMap((request) => of(FlowActions.navigateToComponent({ request })))
+ )
+ );
+
+ /////////////////////////////////
+ // Revert version effects
+ /////////////////////////////////
+ openRevertLocalChangesDialogRequest$ = this.openLocalChangesDialogRequest('REVERT');
+
+ openRevertChangesProgressDialog$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(FlowActions.openRevertChangesProgressDialog),
+ map((action) => action.request),
+ tap(() => {
+ const dialogRef = this.dialog.open(ChangeVersionProgressDialog, {
+ ...SMALL_DIALOG,
+ minWidth: 365,
+ disableClose: true
+ });
+ dialogRef.componentInstance.flowUpdateRequest$ = this.store.select(selectChangeVersionRequest);
+ dialogRef.componentInstance.changeVersionComplete.pipe(take(1)).subscribe((entity) => {
+ this.store.dispatch(FlowActions.revertChangesComplete({ response: entity }));
+ });
+ }),
+ switchMap((request) => of(FlowActions.revertChanges({ request })))
+ )
+ );
+
+ revertChanges$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(FlowActions.revertChanges),
+ map((action) => action.request),
+ switchMap((request) => {
+ return from(this.flowService.initiateRevertFlowVersion(request)).pipe(
+ map((flowUpdate) => FlowActions.revertChangesSuccess({ response: flowUpdate })),
+ catchError((errorResponse: HttpErrorResponse) =>
+ of(FlowActions.flowSnackbarError({ error: errorResponse.error }))
+ )
+ );
+ })
+ )
+ );
+
+ revertChangesSuccess$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(FlowActions.revertChangesSuccess),
+ map((action) => action.response),
+ filter((response) => !response.request.complete),
+ switchMap(() => {
+ return of(FlowActions.startPollingRevertChanges());
+ })
+ )
+ );
+
+ startPollingRevertChanges = createEffect(() =>
+ this.actions$.pipe(
+ ofType(FlowActions.startPollingRevertChanges),
+ switchMap(() =>
+ interval(2000, asyncScheduler).pipe(
+ takeUntil(this.actions$.pipe(ofType(FlowActions.stopPollingRevertChanges)))
+ )
+ ),
+ switchMap(() => of(FlowActions.pollRevertChanges()))
+ )
+ );
+
+ pollRevertChanges$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(FlowActions.pollRevertChanges),
+ concatLatestFrom(() => [this.store.select(selectChangeVersionRequest).pipe(isDefinedAndNotNull())]),
+ switchMap(([, changeVersionRequest]) => {
+ return from(
+ this.flowService.getRevertChangesUpdateRequest(changeVersionRequest.request.requestId).pipe(
+ map((response) => FlowActions.pollRevertChangesSuccess({ response })),
+ catchError((errorResponse: HttpErrorResponse) =>
+ of(FlowActions.flowSnackbarError({ error: errorResponse.error }))
+ )
+ )
+ );
+ })
+ )
+ );
+
+ pollRevertChangesSuccess$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(FlowActions.pollRevertChangesSuccess),
+ map((action) => action.response),
+ filter((response) => response.request.complete),
+ switchMap(() => of(FlowActions.stopPollingRevertChanges()))
+ )
+ );
+
+ revertChangesComplete$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(FlowActions.revertChangesComplete),
+ map((action) => action.response),
+ switchMap((response) =>
+ from(this.flowService.deleteRevertChangesUpdateRequest(response.request.requestId)).pipe(
+ map(() => FlowActions.reloadFlow()),
+ catchError((errorResponse: HttpErrorResponse) =>
+ of(FlowActions.flowSnackbarError({ error: errorResponse.error }))
+ )
+ )
+ )
+ )
+ );
}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.reducer.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.reducer.ts
index 48fd23043c..67a8aa0bc8 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.reducer.ts
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.reducer.ts
@@ -17,6 +17,8 @@
import { createReducer, on } from '@ngrx/store';
import {
+ changeVersionComplete,
+ changeVersionSuccess,
clearFlowApiError,
createComponentComplete,
createComponentSuccess,
@@ -39,8 +41,12 @@ import {
loadProcessorSuccess,
loadRemoteProcessGroupSuccess,
navigateWithoutTransform,
+ pollChangeVersionSuccess,
+ pollRevertChangesSuccess,
requestRefreshRemoteProcessGroup,
resetFlowState,
+ revertChangesComplete,
+ revertChangesSuccess,
runOnce,
runOnceSuccess,
saveToFlowRegistry,
@@ -73,6 +79,7 @@ import { produce } from 'immer';
export const initialState: FlowState = {
id: 'root',
+ changeVersionRequest: null,
flow: {
permissions: {
canRead: false,
@@ -425,6 +432,20 @@ export const flowReducer = createReducer(
draftState.versionSaving = false;
});
}),
+ on(
+ changeVersionSuccess,
+ pollChangeVersionSuccess,
+ revertChangesSuccess,
+ pollRevertChangesSuccess,
+ (state, { response }) => ({
+ ...state,
+ changeVersionRequest: response
+ })
+ ),
+ on(changeVersionComplete, revertChangesComplete, (state) => ({
+ ...state,
+ changeVersionRequest: null
+ })),
on(flowVersionBannerError, (state) => ({
...state,
versionSaving: false
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.selectors.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.selectors.ts
index 9b968a3ed4..f65666b22c 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.selectors.ts
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.selectors.ts
@@ -24,6 +24,11 @@ export const selectFlowState = createSelector(selectCanvasState, (state: CanvasS
export const selectFlowLoadingStatus = createSelector(selectFlowState, (state: FlowState) => state.status);
+export const selectChangeVersionRequest = createSelector(
+ selectFlowState,
+ (state: FlowState) => state.changeVersionRequest
+);
+
export const selectFlow = createSelector(selectFlowState, (state: FlowState) => state.flow);
export const selectApiError = createSelector(selectFlowState, (state: FlowState) => state.error);
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/index.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/index.ts
index 33ff0c4c82..7f11264c34 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/index.ts
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/index.ts
@@ -26,7 +26,8 @@ import {
RegistryClientEntity,
Revision,
SelectOption,
- SparseVersionedFlow
+ SparseVersionedFlow,
+ VersionedFlowSnapshotMetadataEntity
} from '../../../../state/shared';
import { ParameterContextEntity } from '../../../parameter-contexts/state/parameter-context-listing';
@@ -185,6 +186,17 @@ export interface OpenSaveVersionDialogRequest {
forceCommit?: boolean;
}
+export interface OpenChangeVersionDialogRequest {
+ processGroupId: string;
+}
+
+export interface ChangeVersionDialogRequest {
+ processGroupId: string;
+ revision: Revision;
+ versionControlInformation: VersionControlInformation;
+ versions: VersionedFlowSnapshotMetadataEntity[];
+}
+
export interface SaveVersionDialogRequest {
processGroupId: string;
revision: Revision;
@@ -199,6 +211,10 @@ export interface SaveToVersionControlRequest {
processGroupRevision: Revision;
}
+export interface ConfirmStopVersionControlRequest {
+ processGroupId: string;
+}
+
export interface StopVersionControlRequest {
revision: Revision;
processGroupId: string;
@@ -230,7 +246,7 @@ export interface VersionControlInformation {
flowName: string;
flowDescription: string;
version: number;
- storageLocation: string;
+ storageLocation?: string;
state: string;
stateExplanation: string;
}
@@ -486,9 +502,9 @@ export interface VersionControlInformation {
flowName: string;
flowDescription: string;
version: number;
- storageLocation: string;
state: string;
stateExplanation: string;
+ storageLocation?: string;
}
export interface VersionControlTipInput {
@@ -585,6 +601,7 @@ export interface FlowState {
operationCollapsed: boolean;
error: string | null;
versionSaving: boolean;
+ changeVersionRequest: FlowUpdateRequestEntity | null;
status: 'pending' | 'loading' | 'error' | 'success';
}
@@ -674,3 +691,46 @@ export interface StopComponentsRequest {
export interface LoadChildProcessGroupRequest {
id: string;
}
+
+export interface FlowUpdateRequest {
+ requestId: string;
+ processGroupId: string;
+ uri: string;
+ lastUpdated: string;
+ complete: boolean;
+ percentCompleted: number;
+ state: string;
+ failureReason?: string;
+}
+
+export interface FlowUpdateRequestEntity {
+ processGroupRevision: Revision;
+ request: FlowUpdateRequest;
+}
+
+export interface Difference {
+ differenceType: string;
+ difference: string;
+}
+
+export interface ComponentDifference {
+ componentType: ComponentType;
+ componentId: string;
+ processGroupId: string;
+ differences: Difference[];
+ componentName?: string;
+}
+
+export interface FlowComparisonEntity {
+ componentDifferences: ComponentDifference[];
+}
+
+export interface OpenLocalChangesDialogRequest {
+ processGroupId: string;
+}
+
+export interface LocalChangesDialogRequest {
+ versionControlInformation: VersionControlInformationEntity;
+ localModifications: FlowComparisonEntity;
+ mode: 'SHOW' | 'REVERT';
+}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-dialog/change-version-dialog.html b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-dialog/change-version-dialog.html
new file mode 100644
index 0000000000..6403e2691f
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-dialog/change-version-dialog.html
@@ -0,0 +1,98 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<h2 mat-dialog-title>Change Version</h2>
+<div class="change-version" tabindex="0">
+ <mat-dialog-content>
+ <div class="flex flex-col gap-y-4 w-full">
+ <div class="flex flex-row w-full">
+ <div class="flex flex-1 flex-col gap-y-4">
+ <div>
+ <div>Registry</div>
+ <div class="mat-accent font-medium">{{ versionControlInformation.registryName }}</div>
+ </div>
+ <div>
+ <div>Flow Name</div>
+ <div class="mat-accent font-medium">{{ versionControlInformation.flowName }}</div>
+ </div>
+ </div>
+ <div class="flex flex-1 flex-col gap-y-4">
+ <div>
+ <div>Bucket</div>
+ <div class="mat-accent font-medium">{{ versionControlInformation.bucketName }}</div>
+ </div>
+ <div>
+ <div>Current Version</div>
+ <div class="mat-accent font-medium">{{ versionControlInformation.version }}</div>
+ </div>
+ </div>
+ </div>
+ <div>
+ <div>Flow Description</div>
+ <div class="mat-accent font-medium">
+ {{ versionControlInformation.flowDescription || 'No description provided' }}
+ </div>
+ </div>
+
+ <div class="listing-table">
+ <div class="h-48 overflow-y-auto overflow-x-hidden">
+ <table
+ mat-table
+ [dataSource]="dataSource"
+ matSort
+ matSortDisableClear
+ (matSortChange)="sortData($event)"
+ [matSortActive]="sort.active"
+ [matSortDirection]="sort.direction">
+ <!-- Version Column -->
+ <ng-container matColumnDef="version">
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>Version</th>
+ <td mat-cell *matCellDef="let item">{{ item.version }}</td>
+ </ng-container>
+
+ <!-- Create Column -->
+ <ng-container matColumnDef="created">
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>Created</th>
+ <td mat-cell *matCellDef="let item">{{ formatTimestamp(item) }}</td>
+ </ng-container>
+
+ <!-- Comments Column -->
+ <ng-container matColumnDef="comments">
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>Comments</th>
+ <td mat-cell *matCellDef="let item">{{ item.comments }}</td>
+ </ng-container>
+
+ <tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
+ <tr
+ mat-row
+ *matRowDef="let row; let even = even; columns: displayedColumns"
+ (click)="select(row)"
+ (dblclick)="changeFlowVersion()"
+ [class.selected]="isSelected(row)"
+ [class.even]="even"></tr>
+ </table>
+ </div>
+ </div>
+ </div>
+ </mat-dialog-content>
+ <mat-dialog-actions align="end">
+ <button mat-button mat-dialog-close>Cancel</button>
+ <button [disabled]="!isSelectionValid()" type="button" color="primary" (click)="changeFlowVersion()" mat-button>
+ Change
+ </button>
+ </mat-dialog-actions>
+</div>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-dialog/change-version-dialog.scss b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-dialog/change-version-dialog.scss
new file mode 100644
index 0000000000..a4bf3bf04e
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-dialog/change-version-dialog.scss
@@ -0,0 +1,36 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+@use '@angular/material' as mat;
+
+.change-version {
+ @include mat.button-density(-1);
+
+ .listing-table {
+ table {
+ table-layout: unset;
+
+ .mat-column-version {
+ width: 75px;
+ }
+
+ .mat-column-created {
+ width: 200px;
+ }
+ }
+ }
+}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-dialog/change-version-dialog.spec.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-dialog/change-version-dialog.spec.ts
new file mode 100644
index 0000000000..e71beb526b
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-dialog/change-version-dialog.spec.ts
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ChangeVersionDialog } from './change-version-dialog';
+import { ChangeVersionDialogRequest } from '../../../../../state/flow';
+import { MAT_DIALOG_DATA } from '@angular/material/dialog';
+import { provideMockStore } from '@ngrx/store/testing';
+import { initialState } from '../../../../../state/flow/flow.reducer';
+import { NoopAnimationsModule } from '@angular/platform-browser/animations';
+import { selectTimeOffset } from '../../../../../../../state/flow-configuration/flow-configuration.selectors';
+
+describe('ChangeVersionDialog', () => {
+ let component: ChangeVersionDialog;
+ let fixture: ComponentFixture<ChangeVersionDialog>;
+ const data: ChangeVersionDialogRequest = {
+ processGroupId: '80f86c6f-018e-1000-68e5-17d68c402f4c',
+ revision: {
+ clientId: '8f36f627-d927-4a37-a1f2-a6deb9b91e50',
+ version: 31
+ },
+ versionControlInformation: {
+ groupId: '80f86c6f-018e-1000-68e5-17d68c402f4c',
+ registryId: '80441509-018e-1000-12b2-d70361a7f661',
+ registryName: 'Local Registry',
+ bucketId: 'bd6fa6cc-da95-4a12-92cc-9b38b3d48266',
+ bucketName: 'RAG',
+ flowId: 'e884a53c-cbc2-4cb6-9ebd-d9e5d5bb7d05',
+ flowName: 'sdaf',
+ flowDescription: '',
+ version: 2,
+ state: 'UP_TO_DATE',
+ stateExplanation: 'Flow version is current'
+ },
+ versions: [
+ {
+ versionedFlowSnapshotMetadata: {
+ bucketIdentifier: 'bd6fa6cc-da95-4a12-92cc-9b38b3d48266',
+ flowIdentifier: 'e884a53c-cbc2-4cb6-9ebd-d9e5d5bb7d05',
+ version: 2,
+ timestamp: 1712171233843,
+ author: 'anonymous',
+ comments: ''
+ },
+ registryId: '80441509-018e-1000-12b2-d70361a7f661'
+ },
+ {
+ versionedFlowSnapshotMetadata: {
+ bucketIdentifier: 'bd6fa6cc-da95-4a12-92cc-9b38b3d48266',
+ flowIdentifier: 'e884a53c-cbc2-4cb6-9ebd-d9e5d5bb7d05',
+ version: 1,
+ timestamp: 1712076498414,
+ author: 'anonymous',
+ comments: ''
+ },
+ registryId: '80441509-018e-1000-12b2-d70361a7f661'
+ }
+ ]
+ };
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ imports: [ChangeVersionDialog, NoopAnimationsModule],
+ providers: [
+ { provide: MAT_DIALOG_DATA, useValue: data },
+ provideMockStore({
+ initialState,
+ selectors: [
+ {
+ selector: selectTimeOffset,
+ value: 0
+ }
+ ]
+ })
+ ]
+ }).compileComponents();
+
+ fixture = TestBed.createComponent(ChangeVersionDialog);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-dialog/change-version-dialog.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-dialog/change-version-dialog.ts
new file mode 100644
index 0000000000..7fc28dc416
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-dialog/change-version-dialog.ts
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { Component, EventEmitter, Inject, Output } from '@angular/core';
+import { AsyncPipe } from '@angular/common';
+import { MatButton } from '@angular/material/button';
+import { MatCell, MatCellDef, MatColumnDef, MatTableDataSource, MatTableModule } from '@angular/material/table';
+import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
+import { MatSortModule, Sort } from '@angular/material/sort';
+import { VersionedFlowSnapshotMetadata } from '../../../../../../../state/shared';
+import { ChangeVersionDialogRequest, VersionControlInformation } from '../../../../../state/flow';
+import { NiFiCommon } from '../../../../../../../service/nifi-common.service';
+import { Store } from '@ngrx/store';
+import { CanvasState } from '../../../../../state';
+import { selectTimeOffset } from '../../../../../../../state/flow-configuration/flow-configuration.selectors';
+
+@Component({
+ selector: 'change-version-dialog',
+ standalone: true,
+ imports: [AsyncPipe, MatButton, MatCell, MatCellDef, MatColumnDef, MatDialogModule, MatSortModule, MatTableModule],
+ templateUrl: './change-version-dialog.html',
+ styleUrl: './change-version-dialog.scss'
+})
+export class ChangeVersionDialog {
+ displayedColumns: string[] = ['version', 'created', 'comments'];
+ dataSource: MatTableDataSource<VersionedFlowSnapshotMetadata> =
+ new MatTableDataSource<VersionedFlowSnapshotMetadata>();
+ selectedFlowVersion: VersionedFlowSnapshotMetadata | null = null;
+ sort: Sort = {
+ active: 'version',
+ direction: 'desc'
+ };
+ versionControlInformation: VersionControlInformation;
+ private timeOffset = this.store.selectSignal(selectTimeOffset);
+
+ @Output() changeVersion: EventEmitter<VersionedFlowSnapshotMetadata> =
+ new EventEmitter<VersionedFlowSnapshotMetadata>();
+
+ constructor(
+ @Inject(MAT_DIALOG_DATA) private dialogRequest: ChangeVersionDialogRequest,
+ private nifiCommon: NiFiCommon,
+ private store: Store<CanvasState>
+ ) {
+ const flowVersions = dialogRequest.versions.map((entity) => entity.versionedFlowSnapshotMetadata);
+ const sortedFlowVersions = this.sortVersions(flowVersions, this.sort);
+ this.selectedFlowVersion = sortedFlowVersions[0];
+ this.dataSource.data = sortedFlowVersions;
+ this.versionControlInformation = dialogRequest.versionControlInformation;
+ }
+
+ sortData(sort: Sort) {
+ this.sort = sort;
+ this.dataSource.data = this.sortVersions(this.dataSource.data, sort);
+ }
+
+ sortVersions(data: VersionedFlowSnapshotMetadata[], sort: Sort): VersionedFlowSnapshotMetadata[] {
+ if (!data) {
+ return [];
+ }
+ return data.slice().sort((a, b) => {
+ const isAsc = sort.direction === 'asc';
+ let retVal = 0;
+ switch (sort.active) {
+ case 'version':
+ retVal = this.nifiCommon.compareNumber(a.version, b.version);
+ break;
+ case 'created':
+ retVal = this.nifiCommon.compareNumber(a.timestamp, b.timestamp);
+ break;
+ case 'comments':
+ retVal = this.nifiCommon.compareString(a.comments, b.comments);
+ break;
+ }
+ return retVal * (isAsc ? 1 : -1);
+ });
+ }
+
+ select(flowVersion: VersionedFlowSnapshotMetadata): void {
+ this.selectedFlowVersion = flowVersion;
+ }
+
+ isSelected(flowVersion: VersionedFlowSnapshotMetadata): boolean {
+ if (this.selectedFlowVersion) {
+ return flowVersion.version === this.selectedFlowVersion.version;
+ }
+ return false;
+ }
+
+ private getTimezoneOffset(): number {
+ return this.timeOffset() || 0;
+ }
+
+ formatTimestamp(flowVersion: VersionedFlowSnapshotMetadata) {
+ // get the current user time to properly convert the server time
+ const now: Date = new Date();
+
+ // convert the user offset to millis
+ const userTimeOffset: number = now.getTimezoneOffset() * 60 * 1000;
+
+ // create the proper date by adjusting by the offsets
+ const date: Date = new Date(flowVersion.timestamp + userTimeOffset + this.getTimezoneOffset());
+ return this.nifiCommon.formatDateTime(date);
+ }
+
+ changeFlowVersion() {
+ if (this.selectedFlowVersion != null) {
+ this.changeVersion.next(this.selectedFlowVersion);
+ }
+ }
+
+ isSelectionValid() {
+ if (!this.selectedFlowVersion) {
+ return false;
+ }
+ return this.selectedFlowVersion.version !== this.versionControlInformation.version;
+ }
+}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-progress-dialog/change-version-progress-dialog.html b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-progress-dialog/change-version-progress-dialog.html
new file mode 100644
index 0000000000..45346dcd44
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-progress-dialog/change-version-progress-dialog.html
@@ -0,0 +1,51 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<h2 mat-dialog-title>Change Flow Version</h2>
+<div class="change-version-progress">
+ <mat-dialog-content>
+ <div class="flex flex-col gap-y-4">
+ @if (flowUpdateRequest$ | async; as versionChangeRequest) {
+ <div class="mat-accent font-medium">
+ @if (versionChangeRequest.request.complete) {
+ This Process Group version has changed.
+ } @else {
+ {{ versionChangeRequest.request.state }}
+ }
+ </div>
+ <div class="w-full flex flex-col items-center">
+ <mat-progress-bar
+ mode="determinate"
+ [value]="versionChangeRequest.request.percentCompleted"></mat-progress-bar>
+ <div class="mat-accent font-medium">{{ versionChangeRequest.request.percentCompleted }}%</div>
+ </div>
+ }
+ </div>
+ </mat-dialog-content>
+ <mat-dialog-actions align="end">
+ @if (flowUpdateRequest$ | async; as versionChangeRequest) {
+ <button
+ [disabled]="!versionChangeRequest?.request?.complete"
+ mat-button
+ mat-dialog-close
+ (click)="close(versionChangeRequest)"
+ color="primary">
+ Close
+ </button>
+ }
+ </mat-dialog-actions>
+</div>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-progress-dialog/change-version-progress-dialog.scss b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-progress-dialog/change-version-progress-dialog.scss
new file mode 100644
index 0000000000..5af9844ffc
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-progress-dialog/change-version-progress-dialog.scss
@@ -0,0 +1,22 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+@use '@angular/material' as mat;
+
+.change-version-progress {
+ @include mat.button-density(-1);
+}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-progress-dialog/change-version-progress-dialog.spec.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-progress-dialog/change-version-progress-dialog.spec.ts
new file mode 100644
index 0000000000..e148fddae1
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-progress-dialog/change-version-progress-dialog.spec.ts
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ChangeVersionProgressDialog } from './change-version-progress-dialog';
+
+describe('ChangeVersionProgressDialog', () => {
+ let component: ChangeVersionProgressDialog;
+ let fixture: ComponentFixture<ChangeVersionProgressDialog>;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ imports: [ChangeVersionProgressDialog]
+ }).compileComponents();
+
+ fixture = TestBed.createComponent(ChangeVersionProgressDialog);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-progress-dialog/change-version-progress-dialog.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-progress-dialog/change-version-progress-dialog.ts
new file mode 100644
index 0000000000..5c72684f92
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/change-version-progress-dialog/change-version-progress-dialog.ts
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { Component, EventEmitter, Input, Output } from '@angular/core';
+import { MatDialogModule, MatDialogTitle } from '@angular/material/dialog';
+import { MatButton } from '@angular/material/button';
+import { FlowUpdateRequestEntity } from '../../../../../state/flow';
+import { Observable, of } from 'rxjs';
+import { AsyncPipe } from '@angular/common';
+import { MatProgressBar } from '@angular/material/progress-bar';
+
+@Component({
+ selector: 'change-version-progress-dialog',
+ standalone: true,
+ imports: [MatDialogTitle, MatDialogModule, MatButton, AsyncPipe, MatProgressBar],
+ templateUrl: './change-version-progress-dialog.html',
+ styleUrl: './change-version-progress-dialog.scss'
+})
+export class ChangeVersionProgressDialog {
+ @Input() flowUpdateRequest$: Observable<FlowUpdateRequestEntity | null> = of(null);
+ @Output() changeVersionComplete: EventEmitter<FlowUpdateRequestEntity> =
+ new EventEmitter<FlowUpdateRequestEntity>();
+
+ close(entity: FlowUpdateRequestEntity) {
+ this.changeVersionComplete.next(entity);
+ }
+}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-dialog.html b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-dialog.html
new file mode 100644
index 0000000000..8ea1775d0e
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-dialog.html
@@ -0,0 +1,50 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<h2 mat-dialog-title>
+ @if (mode === 'SHOW') {
+ Show Local Changes
+ } @else {
+ Revert Local Changes
+ }
+</h2>
+<div class="local-changes">
+ <mat-dialog-content>
+ <div class="flex flex-col h-full gap-y-2">
+ <div>
+ The following changes have been made to
+ {{ versionControlInformation.versionControlInformation?.flowName }} (Version
+ {{ versionControlInformation.versionControlInformation?.version }}).
+ @if (mode === 'REVERT') {
+ <span class="font-bold">Revert will remove all changes.</span>
+ }
+ </div>
+ <div class="flex-1">
+ <local-changes-table
+ [differences]="localModifications.componentDifferences"
+ (goToChange)="goToChange.next($event)"></local-changes-table>
+ </div>
+ </div>
+ </mat-dialog-content>
+ <mat-dialog-actions align="end">
+ @if (mode === 'REVERT') {
+ <button mat-button mat-dialog-close>Cancel</button>
+ <button type="button" color="primary" (click)="revertChanges()" mat-button>Revert</button>
+ } @else {
+ <button mat-button mat-dialog-close color="primary">Close</button>
+ }
+ </mat-dialog-actions>
+</div>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-dialog.scss b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-dialog.scss
new file mode 100644
index 0000000000..4b81a54e0b
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-dialog.scss
@@ -0,0 +1,19 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+.local-changes {
+}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-dialog.spec.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-dialog.spec.ts
new file mode 100644
index 0000000000..ab4dec9dad
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-dialog.spec.ts
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { LocalChangesDialog } from './local-changes-dialog';
+import { LocalChangesDialogRequest } from '../../../../../state/flow';
+import { ComponentType } from '../../../../../../../state/shared';
+import { MAT_DIALOG_DATA } from '@angular/material/dialog';
+import { NoopAnimationsModule } from '@angular/platform-browser/animations';
+
+describe('LocalChangesDialog', () => {
+ let component: LocalChangesDialog;
+ let fixture: ComponentFixture<LocalChangesDialog>;
+ const request: LocalChangesDialogRequest = {
+ localModifications: {
+ componentDifferences: [
+ {
+ componentType: ComponentType.Processor,
+ componentId: '575f027f-018d-1000-b5e3-9cf78bff50ce',
+ componentName: 'LogAttribute',
+ processGroupId: '575e8ad2-018d-1000-fb2c-ea23f9efb273',
+ differences: [
+ {
+ differenceType: 'Property Value Changed',
+ difference: "From 'info' to 'warn'"
+ },
+ {
+ differenceType: 'Position Changed',
+ difference: 'Position was changed'
+ }
+ ]
+ },
+ {
+ componentType: ComponentType.Funnel,
+ componentId: '57607557-018d-1000-e45a-8a132d9965d2',
+ processGroupId: '575e8ad2-018d-1000-fb2c-ea23f9efb273',
+ differences: [
+ {
+ differenceType: 'Position Changed',
+ difference: 'Position was changed'
+ }
+ ]
+ }
+ ]
+ },
+ versionControlInformation: {
+ processGroupRevision: {
+ clientId: 'a54dacf3-018e-1000-ac75-2eeef71a49cc',
+ version: 9
+ },
+ versionControlInformation: {
+ groupId: '575e8ad2-018d-1000-fb2c-ea23f9efb273',
+ registryId: '80441509-018e-1000-12b2-d70361a7f661',
+ registryName: 'Local Registry',
+ bucketId: 'bd6fa6cc-da95-4a12-92cc-9b38b3d48266',
+ bucketName: 'RAG',
+ flowId: '28dc4617-541c-4912-87c8-aad0ae882d33',
+ flowName: 'asdfasdfa',
+ flowDescription: 'asdf',
+ version: 2,
+ state: 'LOCALLY_MODIFIED_AND_STALE',
+ stateExplanation: 'Local changes have been made and a newer version of this flow is available'
+ }
+ },
+ mode: 'SHOW'
+ };
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ imports: [LocalChangesDialog, NoopAnimationsModule],
+ providers: [
+ {
+ provide: MAT_DIALOG_DATA,
+ useValue: request
+ }
+ ]
+ }).compileComponents();
+
+ fixture = TestBed.createComponent(LocalChangesDialog);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-dialog.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-dialog.ts
new file mode 100644
index 0000000000..4b1c46e1eb
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-dialog.ts
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { Component, EventEmitter, Inject, Output } from '@angular/core';
+import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
+import {
+ FlowComparisonEntity,
+ LocalChangesDialogRequest,
+ NavigateToComponentRequest,
+ VersionControlInformationEntity
+} from '../../../../../state/flow';
+import { MatButton } from '@angular/material/button';
+import { MatFormFieldModule, MatLabel } from '@angular/material/form-field';
+import { MatInput } from '@angular/material/input';
+import { MatOption } from '@angular/material/autocomplete';
+import { ReactiveFormsModule } from '@angular/forms';
+import { LocalChangesTable } from './local-changes-table/local-changes-table';
+
+@Component({
+ selector: 'local-changes-dialog',
+ standalone: true,
+ imports: [
+ MatDialogModule,
+ MatButton,
+ MatFormFieldModule,
+ MatInput,
+ MatLabel,
+ MatOption,
+ ReactiveFormsModule,
+ LocalChangesTable
+ ],
+ templateUrl: './local-changes-dialog.html',
+ styleUrl: './local-changes-dialog.scss'
+})
+export class LocalChangesDialog {
+ mode: 'SHOW' | 'REVERT' = 'SHOW';
+ versionControlInformation: VersionControlInformationEntity;
+ localModifications: FlowComparisonEntity;
+
+ private readonly _request: LocalChangesDialogRequest;
+
+ @Output()
+ revert: EventEmitter<LocalChangesDialogRequest> = new EventEmitter<LocalChangesDialogRequest>();
+ @Output() goToChange: EventEmitter<NavigateToComponentRequest> = new EventEmitter<NavigateToComponentRequest>();
+
+ constructor(@Inject(MAT_DIALOG_DATA) private dialogRequest: LocalChangesDialogRequest) {
+ this.mode = dialogRequest.mode;
+ this.versionControlInformation = dialogRequest.versionControlInformation;
+ this.localModifications = dialogRequest.localModifications;
+ this._request = dialogRequest;
+ }
+
+ revertChanges() {
+ this.revert.next(this._request);
+ }
+}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-table/local-changes-table.html b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-table/local-changes-table.html
new file mode 100644
index 0000000000..ee4d189c81
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-table/local-changes-table.html
@@ -0,0 +1,80 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<div class="local-changes-table h-full flex flex-col">
+ <div>
+ <div class="mat-accent font-medium">Displaying {{ filteredCount }} of {{ totalCount }}</div>
+ <form [formGroup]="filterForm">
+ <div class="flex pt-2">
+ <div class="mr-2">
+ <mat-form-field>
+ <mat-label>Filter</mat-label>
+ <input matInput type="text" class="small" formControlName="filterTerm" />
+ </mat-form-field>
+ </div>
+ </div>
+ </form>
+ </div>
+ <div class="listing-table">
+ <div class="h-96 overflow-y-auto overflow-x-hidden">
+ <table
+ mat-table
+ [dataSource]="dataSource"
+ matSort
+ matSortDisableClear
+ (matSortChange)="sortData($event)"
+ [matSortActive]="initialSortColumn"
+ [matSortDirection]="initialSortDirection">
+ <!-- Context column -->
+ <ng-container matColumnDef="componentName">
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>Component Name</th>
+ <td mat-cell *matCellDef="let item" [title]="formatComponentName(item)">
+ {{ formatComponentName(item) }}
+ </td>
+ </ng-container>
+
+ <!-- Name Column -->
+ <ng-container matColumnDef="changeType">
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>Change Type</th>
+ <td mat-cell *matCellDef="let item" [title]="formatChangeType(item)">
+ {{ formatChangeType(item) }}
+ </td>
+ </ng-container>
+
+ <!-- Value column -->
+ <ng-container matColumnDef="difference">
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>Difference</th>
+ <td mat-cell *matCellDef="let item" [title]="formatDifference(item)">
+ {{ formatDifference(item) }}
+ </td>
+ </ng-container>
+
+ <ng-container matColumnDef="actions">
+ <th mat-header-cell *matHeaderCellDef></th>
+ <td mat-cell *matCellDef="let item">
+ <div class="flex items-center gap-x-3 pointer">
+ <div class="fa fa-long-arrow-right" title="Go To" (click)="goToClicked(item)"></div>
+ </div>
+ </td>
+ </ng-container>
+
+ <tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
+ <tr mat-row *matRowDef="let row; let even = even; columns: displayedColumns" [class.even]="even"></tr>
+ </table>
+ </div>
+ </div>
+</div>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-table/local-changes-table.scss b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-table/local-changes-table.scss
new file mode 100644
index 0000000000..54460aa9c2
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-table/local-changes-table.scss
@@ -0,0 +1,25 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+.local-changes-table {
+ .listing-table {
+ .mat-column-actions {
+ width: 40px;
+ min-width: 40px;
+ }
+ }
+}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-table/local-changes-table.spec.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-table/local-changes-table.spec.ts
new file mode 100644
index 0000000000..e76dfedffc
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-table/local-changes-table.spec.ts
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { LocalChangesTable } from './local-changes-table';
+import { NoopAnimationsModule } from '@angular/platform-browser/animations';
+
+describe('LocalChangesTable', () => {
+ let component: LocalChangesTable;
+ let fixture: ComponentFixture<LocalChangesTable>;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ imports: [LocalChangesTable, NoopAnimationsModule]
+ }).compileComponents();
+
+ fixture = TestBed.createComponent(LocalChangesTable);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-table/local-changes-table.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-table/local-changes-table.ts
new file mode 100644
index 0000000000..cb2ecefb7b
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/local-changes-dialog/local-changes-table/local-changes-table.ts
@@ -0,0 +1,174 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { AfterViewInit, Component, DestroyRef, EventEmitter, inject, Input, Output } from '@angular/core';
+import { MatFormField, MatLabel } from '@angular/material/form-field';
+import { MatInput } from '@angular/material/input';
+import { FormBuilder, FormGroup, ReactiveFormsModule } from '@angular/forms';
+import { MatTableDataSource, MatTableModule } from '@angular/material/table';
+import { MatSortModule, Sort } from '@angular/material/sort';
+import { NiFiCommon } from '../../../../../../../../service/nifi-common.service';
+import { ComponentDifference, NavigateToComponentRequest } from '../../../../../../state/flow';
+import { debounceTime } from 'rxjs';
+import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
+import { ComponentType } from '../../../../../../../../state/shared';
+
+interface LocalChange {
+ componentType: ComponentType;
+ componentId: string;
+ componentName: string;
+ processGroupId: string;
+ differenceType: string;
+ difference: string;
+}
+
+@Component({
+ selector: 'local-changes-table',
+ standalone: true,
+ imports: [MatFormField, MatInput, MatLabel, ReactiveFormsModule, MatTableModule, MatSortModule],
+ templateUrl: './local-changes-table.html',
+ styleUrl: './local-changes-table.scss'
+})
+export class LocalChangesTable implements AfterViewInit {
+ private destroyRef: DestroyRef = inject(DestroyRef);
+ initialSortColumn: 'componentName' | 'changeType' | 'difference' = 'componentName';
+ initialSortDirection: 'asc' | 'desc' = 'asc';
+
+ filterTerm = '';
+ totalCount = 0;
+ filteredCount = 0;
+
+ activeSort: Sort = {
+ active: this.initialSortColumn,
+ direction: this.initialSortDirection
+ };
+
+ displayedColumns: string[] = ['componentName', 'changeType', 'difference', 'actions'];
+ dataSource: MatTableDataSource<LocalChange> = new MatTableDataSource<LocalChange>();
+ filterForm: FormGroup;
+
+ @Input() set differences(differences: ComponentDifference[]) {
+ const localChanges: LocalChange[] = this.explodeDifferences(differences);
+ this.dataSource.data = this.sortEntities(localChanges, this.activeSort);
+ this.dataSource.filterPredicate = (data: LocalChange, filter: string) => {
+ const { filterTerm } = JSON.parse(filter);
+ // check the filter term in both the name and type columns
+ return (
+ this.nifiCommon.stringContains(data.componentName, filterTerm, true) ||
+ this.nifiCommon.stringContains(data.differenceType, filterTerm, true)
+ );
+ };
+ this.totalCount = localChanges.length;
+ this.filteredCount = localChanges.length;
+
+ // apply any filtering to the new data
+ const filterTerm = this.filterForm.get('filterTerm')?.value;
+ if (filterTerm?.length > 0) {
+ this.applyFilter(filterTerm);
+ }
+ }
+
+ @Output() goToChange: EventEmitter<NavigateToComponentRequest> = new EventEmitter<NavigateToComponentRequest>();
+
+ constructor(
+ private formBuilder: FormBuilder,
+ private nifiCommon: NiFiCommon
+ ) {
+ this.filterForm = this.formBuilder.group({ filterTerm: '', filterColumn: 'componentName' });
+ }
+
+ ngAfterViewInit(): void {
+ this.filterForm
+ .get('filterTerm')
+ ?.valueChanges.pipe(debounceTime(500), takeUntilDestroyed(this.destroyRef))
+ .subscribe((filterTerm: string) => {
+ this.applyFilter(filterTerm);
+ });
+ }
+
+ applyFilter(filterTerm: string) {
+ this.dataSource.filter = JSON.stringify({ filterTerm });
+ this.filteredCount = this.dataSource.filteredData.length;
+ }
+
+ formatComponentName(item: LocalChange): string {
+ return item.componentName || '';
+ }
+
+ formatChangeType(item: LocalChange): string {
+ return item.differenceType;
+ }
+
+ formatDifference(item: LocalChange): string {
+ return item.difference;
+ }
+
+ sortData(sort: Sort) {
+ this.activeSort = sort;
+ this.dataSource.data = this.sortEntities(this.dataSource.data, sort);
+ }
+
+ sortEntities(data: LocalChange[], sort: Sort): LocalChange[] {
+ if (!data) {
+ return [];
+ }
+ return data.slice().sort((a, b) => {
+ const isAsc = sort.direction === 'asc';
+ let retVal = 0;
+ switch (sort.active) {
+ case 'componentName':
+ retVal = this.nifiCommon.compareString(this.formatComponentName(a), this.formatComponentName(b));
+ break;
+ case 'changeType':
+ retVal = this.nifiCommon.compareString(this.formatChangeType(a), this.formatChangeType(b));
+ break;
+ case 'difference':
+ retVal = this.nifiCommon.compareString(this.formatDifference(a), this.formatDifference(b));
+ break;
+ default:
+ return 0;
+ }
+ return retVal * (isAsc ? 1 : -1);
+ });
+ }
+
+ goToClicked(item: LocalChange) {
+ const linkMeta: NavigateToComponentRequest = {
+ id: item.componentId,
+ type: item.componentType,
+ processGroupId: item.processGroupId
+ };
+ this.goToChange.next(linkMeta);
+ }
+
+ private explodeDifferences(differences: ComponentDifference[]): LocalChange[] {
+ return differences.reduce((accumulator, currentValue) => {
+ const diffs = currentValue.differences.map(
+ (diff) =>
+ ({
+ componentName: currentValue.componentName,
+ componentId: currentValue.componentId,
+ componentType: currentValue.componentType,
+ processGroupId: currentValue.processGroupId,
+ differenceType: diff.differenceType,
+ difference: diff.difference
+ }) as LocalChange
+ );
+ return [...accumulator, ...diffs];
+ }, [] as LocalChange[]);
+ }
+}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/save-version-dialog/save-version-dialog.component.html b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/save-version-dialog/save-version-dialog.component.html
index 637d3788a8..fd976dffb0 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/save-version-dialog/save-version-dialog.component.html
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/flow/save-version-dialog/save-version-dialog.component.html
@@ -23,16 +23,16 @@
<div class="flex flex-col gap-y-4 mb-6">
<div>
<div>Registry</div>
- <div class="value">{{ versionControlInformation.registryName }}</div>
+ <div class="mat-accent font-medium">{{ versionControlInformation.registryName }}</div>
</div>
<div>
<div>Bucket</div>
- <div class="value">{{ versionControlInformation.bucketName }}</div>
+ <div class="mat-accent font-medium">{{ versionControlInformation.bucketName }}</div>
</div>
<div class="flex">
<div class="flex-1">
<div>Flow Name</div>
- <div class="value">{{ versionControlInformation.flowName }}</div>
+ <div class="mat-accent font-medium">{{ versionControlInformation.flowName }}</div>
</div>
@if (!forceCommit) {
<div class="save-flow-version-label ml-3">{{ versionControlInformation.version + 1 }}</div>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/service/nifi-common.service.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/service/nifi-common.service.ts
index be8e1b4c12..9a7c7abf8d 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/service/nifi-common.service.ts
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/service/nifi-common.service.ts
@@ -288,12 +288,11 @@ export class NiFiCommon {
* @param a
* @param b
*/
- public compareString(a: string, b: string): number {
+ public compareString(a: string | null, b: string | null): number {
if (a === b) {
return 0;
}
-
- return a < b ? -1 : 1;
+ return (a || '').localeCompare(b || '');
}
/**
@@ -302,8 +301,8 @@ export class NiFiCommon {
* @param a
* @param b
*/
- public compareNumber(a: number, b: number): number {
- return a - b;
+ public compareNumber(a: number | null, b: number | null): number {
+ return (a || 0) - (b || 0);
}
/**