From c12c5fbd53857c11224fa21c0bffb0755656a3a4 Mon Sep 17 00:00:00 2001 From: Rob Fellows Date: Wed, 20 Nov 2024 15:27:44 -0500 Subject: [PATCH] [NIFI-14038] - Add quick-copy to component-context component when it displays the id (#9546) * [NIFI-14038] - Add quick-copy to component-context component when it displays the id * npm audit fix - cross-spawn vulnerability This closes #9546 --- .../cluster-node-detail-dialog.component.html | 2 +- .../cluster-node-detail-dialog.component.ts | 4 ++-- .../main/frontend/libs/shared/src/assets/styles/_app.scss | 2 +- .../component-context/component-context.component.html | 2 +- .../component-context/component-context.component.ts | 3 ++- nifi-frontend/src/main/frontend/package-lock.json | 6 +++--- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/cluster/ui/cluster-node-listing/cluster-node-detail-dialog/cluster-node-detail-dialog.component.html b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/cluster/ui/cluster-node-listing/cluster-node-detail-dialog/cluster-node-detail-dialog.component.html index 50042fc09b..204276920e 100644 --- a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/cluster/ui/cluster-node-listing/cluster-node-detail-dialog/cluster-node-detail-dialog.component.html +++ b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/cluster/ui/cluster-node-listing/cluster-node-detail-dialog/cluster-node-detail-dialog.component.html @@ -24,7 +24,7 @@
Node Id
-
+
{{ node.nodeId }}
diff --git a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/cluster/ui/cluster-node-listing/cluster-node-detail-dialog/cluster-node-detail-dialog.component.ts b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/cluster/ui/cluster-node-listing/cluster-node-detail-dialog/cluster-node-detail-dialog.component.ts index a85de54956..fc15f7789f 100644 --- a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/cluster/ui/cluster-node-listing/cluster-node-detail-dialog/cluster-node-detail-dialog.component.ts +++ b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/cluster/ui/cluster-node-listing/cluster-node-detail-dialog/cluster-node-detail-dialog.component.ts @@ -19,12 +19,12 @@ import { Component, Inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog'; import { MatButton } from '@angular/material/button'; import { ClusterNode } from '../../../state/cluster-listing'; -import { CloseOnEscapeDialog } from '@nifi/shared'; +import { CloseOnEscapeDialog, CopyDirective } from '@nifi/shared'; @Component({ selector: 'cluster-node-detail-dialog', standalone: true, - imports: [MatDialogModule, MatButton], + imports: [MatDialogModule, MatButton, CopyDirective], templateUrl: './cluster-node-detail-dialog.component.html', styleUrl: './cluster-node-detail-dialog.component.scss' }) diff --git a/nifi-frontend/src/main/frontend/libs/shared/src/assets/styles/_app.scss b/nifi-frontend/src/main/frontend/libs/shared/src/assets/styles/_app.scss index dbb2dfe985..58709319c3 100644 --- a/nifi-frontend/src/main/frontend/libs/shared/src/assets/styles/_app.scss +++ b/nifi-frontend/src/main/frontend/libs/shared/src/assets/styles/_app.scss @@ -88,7 +88,7 @@ .context-id { font-size: 12px; - line-height: 12px; + line-height: 14px; } .hidden { diff --git a/nifi-frontend/src/main/frontend/libs/shared/src/components/component-context/component-context.component.html b/nifi-frontend/src/main/frontend/libs/shared/src/components/component-context/component-context.component.html index 88cdfa3e0d..f7fdf08f8b 100644 --- a/nifi-frontend/src/main/frontend/libs/shared/src/components/component-context/component-context.component.html +++ b/nifi-frontend/src/main/frontend/libs/shared/src/components/component-context/component-context.component.html @@ -30,6 +30,6 @@
@if (id) { -
{{ id }}
+
{{ id }}
} diff --git a/nifi-frontend/src/main/frontend/libs/shared/src/components/component-context/component-context.component.ts b/nifi-frontend/src/main/frontend/libs/shared/src/components/component-context/component-context.component.ts index a488f0d537..0788dcb6c4 100644 --- a/nifi-frontend/src/main/frontend/libs/shared/src/components/component-context/component-context.component.ts +++ b/nifi-frontend/src/main/frontend/libs/shared/src/components/component-context/component-context.component.ts @@ -18,11 +18,12 @@ import { Component, Input } from '@angular/core'; import { ComponentTypeNamePipe } from '../../pipes/component-type-name.pipe'; import { ComponentType } from '../../index'; +import { CopyDirective } from '../../directives/index'; @Component({ selector: 'component-context', standalone: true, - imports: [ComponentTypeNamePipe], + imports: [ComponentTypeNamePipe, CopyDirective], templateUrl: './component-context.component.html', styleUrl: './component-context.component.scss' }) diff --git a/nifi-frontend/src/main/frontend/package-lock.json b/nifi-frontend/src/main/frontend/package-lock.json index 914dd4d84a..609b0f02a9 100644 --- a/nifi-frontend/src/main/frontend/package-lock.json +++ b/nifi-frontend/src/main/frontend/package-lock.json @@ -9887,9 +9887,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0",