(nifi) branch main updated: [NIFI-12748] apply panelClass to snackbars to apply lighter color to … (#8365)

2024-02-07 Thread rfellows
This is an automated email from the ASF dual-hosted git repository.

rfellows 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 43276acf55 [NIFI-12748] apply panelClass to snackbars to apply lighter 
color to … (#8365)
43276acf55 is described below

commit 43276acf55330033ccb433243a0657268d80f7d2
Author: Scott Aslan 
AuthorDate: Wed Feb 7 15:23:26 2024 -0500

[NIFI-12748] apply panelClass to snackbars to apply lighter color to … 
(#8365)

* [NIFI-12748] apply panelClass to snackbars to apply lighter color to the 
snackbar action text

* hover color for snackbar action button

* updates based on https://github.com/angular/components/issues/11426

This closes #8365
---
 .../main/nifi/src/app/_app.component-theme.scss| 27 --
 .../main/nifi/src/app/state/error/error.effects.ts |  2 +-
 .../src/main/nifi/src/styles.scss  |  4 ++--
 3 files changed, 28 insertions(+), 5 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/_app.component-theme.scss
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/_app.component-theme.scss
index 3afc567f46..b24559cab4 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/_app.component-theme.scss
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/_app.component-theme.scss
@@ -18,17 +18,40 @@
 @use 'sass:map';
 @use '@angular/material' as mat;
 
-@mixin nifi-theme($theme) {
+@mixin nifi-theme($material-theme, $canvas-theme) {
 // Get the color config from the theme.
-$color-config: mat.get-color-config($theme);
+$color-config: mat.get-color-config($material-theme);
+$canvas-color-config: mat.get-color-config($canvas-theme);
 
 // Get the color palette from the color-config.
 $primary-palette: map.get($color-config, 'primary');
+$accent-palette: map.get($color-config, 'accent');
+$warn-palette: map.get($color-config, 'warn');
+$canvas-primary-palette: map.get($canvas-color-config, 'primary');
 
 // Get hues from palette
+$primary-palette-300: mat.get-color-from-palette($primary-palette, 300);
 $primary-palette-500: mat.get-color-from-palette($primary-palette, 500);
+$accent-palette-A400: mat.get-color-from-palette($accent-palette, 'A400');
+$warn-palette-500: mat.get-color-from-palette($warn-palette, 500);
+$canvas-primary-palette-A200: 
mat.get-color-from-palette($canvas-primary-palette, 'A200');
 
 .splash {
 background-color: $primary-palette-500;
 }
+
+// https://github.com/angular/components/issues/11426
+.nifi-snackbar .mdc-snackbar__surface {
+background-color: $primary-palette-300 !important;
+}
+
+// https://github.com/angular/components/issues/11426
+.nifi-snackbar .mat-mdc-snack-bar-label {
+color: $canvas-primary-palette-A200 !important;
+}
+
+// https://github.com/angular/components/issues/11426
+.nifi-snackbar .mat-mdc-button:not(:disabled) .mdc-button__label {
+color: $accent-palette-A400;
+}
 }
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/state/error/error.effects.ts
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/state/error/error.effects.ts
index 4a4d48e3a1..93c48de1ba 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/state/error/error.effects.ts
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/state/error/error.effects.ts
@@ -47,7 +47,7 @@ export class ErrorEffects {
 ofType(ErrorActions.snackBarError),
 map((action) => action.error),
 tap((error) => {
-this.snackBar.open(error, 'Dismiss', { duration: 3 });
+this.snackBar.open(error, 'Dismiss', { panelClass: 
'nifi-snackbar', duration: 3 });
 })
 ),
 { dispatch: false }
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/styles.scss
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/styles.scss
index fd01e720f7..4a26174ebc 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/styles.scss
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/styles.scss
@@ -461,7 +461,7 @@ $appFontPath: '~roboto-fontface/fonts';
 
 // generate light 

(nifi) branch main updated: NIFI-12752 Updated GitHub Workflows to use macos-14

2024-02-07 Thread exceptionfactory
This is an automated email from the ASF dual-hosted git repository.

exceptionfactory 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 202ca3c638 NIFI-12752 Updated GitHub Workflows to use macos-14
202ca3c638 is described below

commit 202ca3c638a5eaf986c9b74994c93a15fbac9b35
Author: exceptionfactory 
AuthorDate: Tue Feb 6 22:47:52 2024 -0600

NIFI-12752 Updated GitHub Workflows to use macos-14

- Upgraded setup-java action from v3 to v4
- Upgraded setup-python action from v4 to v5
- Updated system-tests to use Python 3.10 instead of Python 3.9

This closes #8371

Signed-off-by: David Handermann 
Signed-off-by: Joe Witt 
---
 .github/workflows/ci-workflow.yml   | 10 +-
 .github/workflows/dependency-check.yml  |  2 +-
 .github/workflows/docker-tests.yml  |  2 +-
 .github/workflows/integration-tests.yml |  2 +-
 .github/workflows/system-tests.yml  | 10 +-
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/.github/workflows/ci-workflow.yml 
b/.github/workflows/ci-workflow.yml
index 6e8a0cdbf1..e357aed12c 100644
--- a/.github/workflows/ci-workflow.yml
+++ b/.github/workflows/ci-workflow.yml
@@ -97,7 +97,7 @@ jobs:
   # Cache Maven modules using a cache key different from setup-java 
steps
   key: ${{ runner.os }}-maven-static-analysis-${{ 
hashFiles('**/pom.xml') }}
   - name: Set up Java 21
-uses: actions/setup-java@v3
+uses: actions/setup-java@v4
 with:
   distribution: 'zulu'
   java-version: '21'
@@ -145,7 +145,7 @@ jobs:
 **/node_modules
   key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
   - name: Set up Java 21
-uses: actions/setup-java@v3
+uses: actions/setup-java@v4
 with:
   distribution: 'corretto'
   java-version: '21'
@@ -188,7 +188,7 @@ jobs:
 
   macos-build-jp:
 timeout-minutes: 150
-runs-on: macos-latest
+runs-on: macos-14
 name: MacOS Zulu JDK 21 JP
 steps:
   - name: System Information
@@ -207,7 +207,7 @@ jobs:
 **/node_modules
   key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
   - name: Set up Java 21
-uses: actions/setup-java@v3
+uses: actions/setup-java@v4
 with:
   distribution: 'zulu'
   java-version: '21'
@@ -274,7 +274,7 @@ jobs:
 **\node_modules
   key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
   - name: Set up Java 21
-uses: actions/setup-java@v3
+uses: actions/setup-java@v4
 with:
   distribution: 'zulu'
   java-version: '21'
diff --git a/.github/workflows/dependency-check.yml 
b/.github/workflows/dependency-check.yml
index 1829c157ad..c066c2963f 100644
--- a/.github/workflows/dependency-check.yml
+++ b/.github/workflows/dependency-check.yml
@@ -47,7 +47,7 @@ jobs:
   - name: Checkout Code
 uses: actions/checkout@v4
   - name: Set up Java Zulu 21
-uses: actions/setup-java@v3
+uses: actions/setup-java@v4
 with:
   distribution: 'zulu'
   java-version: 21
diff --git a/.github/workflows/docker-tests.yml 
b/.github/workflows/docker-tests.yml
index 6c085c7874..9a2161a75b 100644
--- a/.github/workflows/docker-tests.yml
+++ b/.github/workflows/docker-tests.yml
@@ -107,7 +107,7 @@ jobs:
   - name: Checkout Code
 uses: actions/checkout@v4
   - name: Set up Java Zulu 21
-uses: actions/setup-java@v3
+uses: actions/setup-java@v4
 with:
   distribution: 'zulu'
   java-version: 21
diff --git a/.github/workflows/integration-tests.yml 
b/.github/workflows/integration-tests.yml
index 583323cdb0..209a512516 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -99,7 +99,7 @@ jobs:
   - name: Checkout Code
 uses: actions/checkout@v4
   - name: Set up Java Zulu 21
-uses: actions/setup-java@v3
+uses: actions/setup-java@v4
 with:
   distribution: 'zulu'
   java-version: 21
diff --git a/.github/workflows/system-tests.yml 
b/.github/workflows/system-tests.yml
index ec82be7278..9cc8e36069 100644
--- a/.github/workflows/system-tests.yml
+++ b/.github/workflows/system-tests.yml
@@ -77,7 +77,7 @@ jobs:
 strategy:
   fail-fast: false
   matrix:
-os: [ ubuntu-latest, macos-latest ]
+os: [ ubuntu-latest, macos-14 ]
 version: [ 21 ]
 timeout-minutes: 120
 runs-on: ${{ matrix.os }}
@@ -98,16 +98,16 @@ jobs:
   - name: Checkout Code
 uses: actions/checkout@v4
   - name: Set up Java ${{ env.JAVA_DISTRIBUTION }} ${{ matrix.version }}
-uses: actions/setup-java@v3
+uses: actions/setup-java@v4
 

(nifi) branch main updated: NIFI-12734: Import from Registry (#8354)

2024-02-07 Thread scottyaslan
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 7ec2dd07c9 NIFI-12734: Import from Registry (#8354)
7ec2dd07c9 is described below

commit 7ec2dd07c9d3fe7ca2239c4d0950fa81e825c136
Author: Matt Gilman 
AuthorDate: Wed Feb 7 12:02:13 2024 -0500

NIFI-12734: Import from Registry (#8354)

* NIFI-12734:
- Import from Registry.

* NIFI-12734:
- Providing better guidance when there are no registry clients available 
based on user permissions.
- Showing form validation errors when there are no buckets or no flows.

This closes #8354
---
 .../flow-designer/service/registry.service.ts  |  58 
 .../pages/flow-designer/state/flow/flow.actions.ts |  14 +-
 .../pages/flow-designer/state/flow/flow.effects.ts | 115 ++-
 .../app/pages/flow-designer/state/flow/index.ts|  15 +
 .../ui/canvas/header/header.component.html |   5 +
 .../new-canvas-item/new-canvas-item.component.scss |  29 +-
 .../import-from-registry.component.html| 154 ++
 .../import-from-registry.component.scss}   |  34 ++-
 .../import-from-registry.component.spec.ts | 136 +
 .../import-from-registry.component.ts  | 337 +
 .../no-registry-clients-dialog.component.html} |  20 +-
 .../no-registry-clients-dialog.component.scss} |  21 +-
 .../no-registry-clients-dialog.component.spec.ts   |  50 +++
 .../no-registry-clients-dialog.component.ts}   |  33 +-
 .../settings/service/registry-client.service.ts|   5 +-
 .../pages/settings/state/registry-clients/index.ts |  12 +-
 .../registry-clients/registry-clients.selectors.ts |   3 +-
 .../registry-client-table.component.ts |   3 +-
 .../registry-clients/registry-clients.component.ts |   3 +-
 .../flow-configuration.selectors.ts|   5 +
 .../src/main/nifi/src/app/state/shared/index.ts|  54 +++-
 .../ui/common/ok-dialog/ok-dialog.component.html   |   2 +-
 .../nifi/src/assets/fonts/flowfont/flowfont.css|  21 +-
 .../nifi/src/assets/fonts/flowfont/flowfont.eot| Bin 25120 -> 25276 bytes
 .../nifi/src/assets/fonts/flowfont/flowfont.svg|  68 +++--
 .../nifi/src/assets/fonts/flowfont/flowfont.ttf| Bin 24952 -> 25108 bytes
 .../nifi/src/assets/fonts/flowfont/flowfont.woff   | Bin 12664 -> 13660 bytes
 .../nifi/src/assets/fonts/flowfont/flowfont.woff2  | Bin 10780 -> 11600 bytes
 28 files changed, 1069 insertions(+), 128 deletions(-)

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/registry.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/registry.service.ts
new file mode 100644
index 00..971fb4b455
--- /dev/null
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/registry.service.ts
@@ -0,0 +1,58 @@
+/*
+ * 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 { Injectable } from '@angular/core';
+import { Observable } from 'rxjs';
+import { HttpClient } from '@angular/common/http';
+import { ImportFromRegistryRequest } from '../state/flow';
+
+@Injectable({ providedIn: 'root' })
+export class RegistryService {
+private static readonly API: string = '../nifi-api';
+
+constructor(private httpClient: HttpClient) {}
+
+getRegistryClients(): Observable {
+return this.httpClient.get(`${RegistryService.API}/flow/registries`);
+}
+
+getBuckets(registryId: string): Observable {
+return 
this.httpClient.get(`${RegistryService.API}/flow/registries/${registryId}/buckets`);
+}
+
+getFlows(registryId: string, bucketId: string): Observable {
+return 
this.httpClient.get(`${RegistryService.API}/flow/registries/${registryId}/buckets/${bucketId}/flows`);
+}
+
+getFlowVersions(registryId: string, bucketId: string, flowId: string): 
Observable {
+

(nifi) branch main updated: NIFI-12708: add option in UnpackContent to specify encoding charset for filenames in zip unpacking

2024-02-07 Thread joewitt
This is an automated email from the ASF dual-hosted git repository.

joewitt 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 e00d2b6d5e NIFI-12708: add option in UnpackContent to specify encoding 
charset for filenames in zip unpacking
e00d2b6d5e is described below

commit e00d2b6d5e5ef7ffb726251b7edf94d0735ce7a8
Author: Umar Hussain 
AuthorDate: Fri Feb 2 16:49:11 2024 +0100

NIFI-12708: add option in UnpackContent to specify encoding charset for 
filenames in zip unpacking

This closes #8350

The processor can now take a filename encoding parameter and pass it to zip 
unpacking. This will allow
user to unzip files with specific encoding to get correct filenames in 
output.

This for example help with zip files created on Windows which by default 
uses Cp437 for filename encoding.
If the filename contains special character like German alphabet ä, ü etc., 
decoding this with Linux's
default encoding usually UTF8 output will contain `?` in it. When the same 
file is processed with property
set with `Cp437`, the processor outputs correct filenames with special 
characters preserved.

Signed-off-by: Joseph Witt 
---
 .../nifi-standard-processors/pom.xml   |   1 +
 .../nifi/processors/standard/UnpackContent.java| 114 +
 .../processors/standard/TestUnpackContent.java | 105 +++
 .../TestUnpackContent/windows-with-cp437.zip   | Bin 0 -> 644 bytes
 4 files changed, 180 insertions(+), 40 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
index e514b21466..1048db9509 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
@@ -697,6 +697,7 @@
 
src/test/resources/TestUnpackContent/folder/cal.txt
 
src/test/resources/TestUnpackContent/folder/date.txt
 
src/test/resources/TestUnpackContent/invalid_data.zip
+
src/test/resources/TestUnpackContent/windows-with-cp437.zip
 
src/test/resources/TestUpdateRecord/input/addresses.json
 
src/test/resources/TestUpdateRecord/input/embedded-string.json
 
src/test/resources/TestUpdateRecord/input/multi-arrays.json
diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java
index 3b736aaa6c..34b8573389 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java
@@ -16,6 +16,7 @@
  */
 package org.apache.nifi.processors.standard;
 
+import java.nio.charset.Charset;
 import net.lingala.zip4j.io.inputstream.ZipInputStream;
 import net.lingala.zip4j.model.LocalFileHeader;
 import net.lingala.zip4j.model.enums.EncryptionMethod;
@@ -24,6 +25,7 @@ import 
org.apache.commons.compress.archivers.tar.TarArchiveEntry;
 import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
 import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
 import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream;
+import org.apache.commons.io.Charsets;
 import org.apache.nifi.annotation.behavior.InputRequirement;
 import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
 import org.apache.nifi.annotation.behavior.ReadsAttribute;
@@ -34,6 +36,7 @@ import org.apache.nifi.annotation.behavior.WritesAttributes;
 import org.apache.nifi.annotation.documentation.CapabilityDescription;
 import org.apache.nifi.annotation.documentation.SeeAlso;
 import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.documentation.UseCase;
 import org.apache.nifi.annotation.lifecycle.OnScheduled;
 import org.apache.nifi.annotation.lifecycle.OnStopped;
 import org.apache.nifi.components.PropertyDescriptor;
@@ -104,6 +107,13 @@ import java.util.regex.Pattern;
 @WritesAttribute(attribute = "file.permissions", description = "The 
read/write/execute permissions of the unpacked file (tar only)"),
 @WritesAttribute(attribute = "file.encryptionMethod", description = "The 
encryption method for entries in Zip archives")})
 @SeeAlso(MergeContent.class)
+@UseCase(
+description = "Unpack Zip containing filenames with special characters, 
created on Windows with filename charset 'Cp437' or 'IBM437'.",
+

(nifi) branch main updated (72f6d8a680 -> f39f3ea252)

2024-02-07 Thread mcgilman
This is an automated email from the ASF dual-hosted git repository.

mcgilman pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


from 72f6d8a680 [NIFI-12747] correct theming references (#8364)
 add f39f3ea252 [NIFI-12727] Detect theme based on OS setting, allow user 
override (#8352)

No new revisions were added by this update.

Summary of changes:
 .../src/main/nifi/src/app/app.component.ts | 26 -
 .../state/transform/transform.effects.ts   | 10 +++-
 .../navigation-control.component.ts|  6 +-
 .../operation-control.component.ts |  6 +-
 .../main/nifi/src/app/service/storage.service.ts   | 35 +---
 .../main/nifi/src/app/service/theming.service.ts   | 48 
 .../ui/common/navigation/navigation.component.html | 19 ++-
 .../ui/common/navigation/navigation.component.ts   | 44 ++-
 .../src/main/nifi/src/assets/themes/nifi.scss  | 64 ++
 .../src/main/nifi/src/assets/themes/purple.scss| 64 ++
 .../src/main/nifi/src/styles.scss  | 63 -
 11 files changed, 292 insertions(+), 93 deletions(-)
 create mode 100644 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/service/theming.service.ts