mirror of https://github.com/apache/nifi.git
[NIFI-12686] eslint configuration (#8313)
* [NIFI-12686] eslint configuration for ts files * add linting to the default maven build * updates for RAT plugin * remove .eslitrc as it wasn't needed. updated RAT config This closes #8313
This commit is contained in:
parent
8b2758cd18
commit
d901253974
|
@ -147,6 +147,22 @@
|
||||||
<workingDirectory>${frontend.working.dir}</workingDirectory>
|
<workingDirectory>${frontend.working.dir}</workingDirectory>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Run the code linter
|
||||||
|
-->
|
||||||
|
<execution>
|
||||||
|
<id>lint</id>
|
||||||
|
<goals>
|
||||||
|
<goal>npm</goal>
|
||||||
|
</goals>
|
||||||
|
<phase>generate-resources</phase>
|
||||||
|
<configuration>
|
||||||
|
<arguments>run lint</arguments>
|
||||||
|
<workingDirectory>${frontend.working.dir}</workingDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Bundle, minify, and gzip compress all the javascript.
|
Bundle, minify, and gzip compress all the javascript.
|
||||||
-->
|
-->
|
||||||
|
@ -176,7 +192,8 @@
|
||||||
<exclude>src/main/nifi/README.md</exclude>
|
<exclude>src/main/nifi/README.md</exclude>
|
||||||
<exclude>src/main/nifi/proxy.config.mjs</exclude>
|
<exclude>src/main/nifi/proxy.config.mjs</exclude>
|
||||||
<exclude>src/main/nifi/.prettierrc</exclude>
|
<exclude>src/main/nifi/.prettierrc</exclude>
|
||||||
<exclude>src/main/nifi/src/.eslintrc</exclude>
|
<exclude>src/main/nifi/.prettierignore</exclude>
|
||||||
|
<exclude>src/main/nifi/dist/**/*</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
{
|
||||||
|
"root": true,
|
||||||
|
"ignorePatterns": ["projects/**/*"],
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": ["*.ts"],
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"plugin:@angular-eslint/recommended",
|
||||||
|
"plugin:@angular-eslint/template/process-inline-templates",
|
||||||
|
"plugin:prettier/recommended"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"@angular-eslint/directive-selector": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"type": "attribute",
|
||||||
|
"prefix": "",
|
||||||
|
"style": "camelCase"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@angular-eslint/component-selector": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"type": "element",
|
||||||
|
"prefix": "",
|
||||||
|
"style": "kebab-case"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@angular-eslint/component-class-suffix": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/ban-ts-comment": "off",
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
"@typescript-eslint/no-this-alias": "warn",
|
||||||
|
"no-useless-escape": "off"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
# Compiled output
|
||||||
|
/dist
|
||||||
|
/tmp
|
||||||
|
/out-tsc
|
||||||
|
/bazel-out
|
||||||
|
|
||||||
|
# Node
|
||||||
|
/node_modules
|
||||||
|
npm-debug.log
|
||||||
|
|
||||||
|
# IDEs and editors
|
||||||
|
.idea/
|
||||||
|
.project
|
||||||
|
.classpath
|
||||||
|
.c9/
|
||||||
|
*.launch
|
||||||
|
.settings/
|
||||||
|
*.sublime-workspace
|
||||||
|
|
||||||
|
# Visual Studio Code
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
.history/*
|
||||||
|
|
||||||
|
# Miscellaneous
|
||||||
|
/.angular/cache
|
||||||
|
.sass-cache/
|
||||||
|
/connect.lock
|
||||||
|
/coverage
|
||||||
|
|
||||||
|
# System files
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
|
@ -86,8 +86,17 @@
|
||||||
"scripts": [],
|
"scripts": [],
|
||||||
"karmaConfig": "karma.conf.js"
|
"karmaConfig": "karma.conf.js"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-eslint/builder:lint",
|
||||||
|
"options": {
|
||||||
|
"lintFilePatterns": ["src/**/*.ts"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"cli": {
|
||||||
|
"schematicCollections": ["@angular-eslint/schematics"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -10,7 +10,9 @@
|
||||||
"test:dev": "ng test --karma-config=karma.conf.js --watch=true --browsers=Chrome",
|
"test:dev": "ng test --karma-config=karma.conf.js --watch=true --browsers=Chrome",
|
||||||
"prettier": "prettier --config .prettierrc . --check",
|
"prettier": "prettier --config .prettierrc . --check",
|
||||||
"prettier-format": "prettier --config .prettierrc . --write",
|
"prettier-format": "prettier --config .prettierrc . --write",
|
||||||
"ci": "npm ci --ignore-scripts"
|
"ci": "npm ci --ignore-scripts",
|
||||||
|
"lint": "ng lint --eslint-config .eslintrc.json",
|
||||||
|
"lint:fix": "ng lint --eslint-config .eslintrc.json --fix"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -43,6 +45,11 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "^16.2.10",
|
"@angular-devkit/build-angular": "^16.2.10",
|
||||||
|
"@angular-eslint/builder": "16.3.0",
|
||||||
|
"@angular-eslint/eslint-plugin": "16.3.0",
|
||||||
|
"@angular-eslint/eslint-plugin-template": "16.3.0",
|
||||||
|
"@angular-eslint/schematics": "16.3.0",
|
||||||
|
"@angular-eslint/template-parser": "16.3.0",
|
||||||
"@angular/cli": "~16.2.10",
|
"@angular/cli": "~16.2.10",
|
||||||
"@angular/compiler-cli": "^16.2.12",
|
"@angular/compiler-cli": "^16.2.12",
|
||||||
"@types/codemirror": "^5.60.15",
|
"@types/codemirror": "^5.60.15",
|
||||||
|
@ -50,7 +57,10 @@
|
||||||
"@types/humanize-duration": "^3.27.3",
|
"@types/humanize-duration": "^3.27.3",
|
||||||
"@types/jasmine": "~4.6.4",
|
"@types/jasmine": "~4.6.4",
|
||||||
"@types/webfontloader": "^1.6.38",
|
"@types/webfontloader": "^1.6.38",
|
||||||
|
"@typescript-eslint/eslint-plugin": "5.62.0",
|
||||||
|
"@typescript-eslint/parser": "5.62.0",
|
||||||
"autoprefixer": "^10.4.16",
|
"autoprefixer": "^10.4.16",
|
||||||
|
"eslint": "^8.51.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-plugin-prettier": "^5.0.1",
|
"eslint-plugin-prettier": "^5.0.1",
|
||||||
"jasmine-core": "~4.6.0",
|
"jasmine-core": "~4.6.0",
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
{
|
|
||||||
"root": true,
|
|
||||||
"parser": "@typescript-eslint/parser",
|
|
||||||
"plugins": ["@typescript-eslint", "prettier"],
|
|
||||||
"extends": [
|
|
||||||
"eslint:recommended",
|
|
||||||
"plugin:@typescript-eslint/eslint-recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended",
|
|
||||||
"prettier"
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"no-console": 1, // Means warning
|
|
||||||
"prettier/prettier": 2 // Means error
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -26,7 +26,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
title = 'nifi';
|
title = 'nifi';
|
||||||
guardLoading: boolean = true;
|
guardLoading = true;
|
||||||
|
|
||||||
constructor(private router: Router) {
|
constructor(private router: Router) {
|
||||||
this.router.events.pipe(takeUntilDestroyed()).subscribe((event) => {
|
this.router.events.pipe(takeUntilDestroyed()).subscribe((event) => {
|
||||||
|
|
|
@ -43,7 +43,7 @@ export class AccessPolicyService {
|
||||||
users?: TenantEntity[];
|
users?: TenantEntity[];
|
||||||
} = {}
|
} = {}
|
||||||
): Observable<any> {
|
): Observable<any> {
|
||||||
let resource: string = `/${resourceAction.resource}`;
|
let resource = `/${resourceAction.resource}`;
|
||||||
if (resourceAction.resourceIdentifier) {
|
if (resourceAction.resourceIdentifier) {
|
||||||
resource += `/${resourceAction.resourceIdentifier}`;
|
resource += `/${resourceAction.resourceIdentifier}`;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ import {
|
||||||
SelectComponentAccessPolicyRequest
|
SelectComponentAccessPolicyRequest
|
||||||
} from './index';
|
} from './index';
|
||||||
|
|
||||||
const ACCESS_POLICY_PREFIX: string = '[Access Policy]';
|
const ACCESS_POLICY_PREFIX = '[Access Policy]';
|
||||||
|
|
||||||
export const selectGlobalAccessPolicy = createAction(
|
export const selectGlobalAccessPolicy = createAction(
|
||||||
`${ACCESS_POLICY_PREFIX} Select Global Access Policy`,
|
`${ACCESS_POLICY_PREFIX} Select Global Access Policy`,
|
||||||
|
|
|
@ -63,7 +63,7 @@ export class AccessPolicyEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(AccessPolicyActions.reloadAccessPolicy),
|
ofType(AccessPolicyActions.reloadAccessPolicy),
|
||||||
concatLatestFrom(() => this.store.select(selectResourceAction).pipe(isDefinedAndNotNull())),
|
concatLatestFrom(() => this.store.select(selectResourceAction).pipe(isDefinedAndNotNull())),
|
||||||
switchMap(([action, resourceAction]) => {
|
switchMap(([, resourceAction]) => {
|
||||||
return of(
|
return of(
|
||||||
AccessPolicyActions.loadAccessPolicy({
|
AccessPolicyActions.loadAccessPolicy({
|
||||||
request: {
|
request: {
|
||||||
|
@ -84,7 +84,7 @@ export class AccessPolicyEffects {
|
||||||
map((response) => {
|
map((response) => {
|
||||||
const accessPolicy: AccessPolicyEntity = response;
|
const accessPolicy: AccessPolicyEntity = response;
|
||||||
|
|
||||||
let requestedResource: string = `/${request.resourceAction.resource}`;
|
let requestedResource = `/${request.resourceAction.resource}`;
|
||||||
if (request.resourceAction.resourceIdentifier) {
|
if (request.resourceAction.resourceIdentifier) {
|
||||||
requestedResource += `/${request.resourceAction.resourceIdentifier}`;
|
requestedResource += `/${request.resourceAction.resourceIdentifier}`;
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ export class AccessPolicyEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(AccessPolicyActions.createAccessPolicy),
|
ofType(AccessPolicyActions.createAccessPolicy),
|
||||||
concatLatestFrom(() => this.store.select(selectResourceAction).pipe(isDefinedAndNotNull())),
|
concatLatestFrom(() => this.store.select(selectResourceAction).pipe(isDefinedAndNotNull())),
|
||||||
switchMap(([action, resourceAction]) =>
|
switchMap(([, resourceAction]) =>
|
||||||
from(this.accessPoliciesService.createAccessPolicy(resourceAction)).pipe(
|
from(this.accessPoliciesService.createAccessPolicy(resourceAction)).pipe(
|
||||||
map((response) => {
|
map((response) => {
|
||||||
const accessPolicy: AccessPolicyEntity = response;
|
const accessPolicy: AccessPolicyEntity = response;
|
||||||
|
@ -170,7 +170,7 @@ export class AccessPolicyEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(AccessPolicyActions.promptOverrideAccessPolicy),
|
ofType(AccessPolicyActions.promptOverrideAccessPolicy),
|
||||||
concatLatestFrom(() => this.store.select(selectAccessPolicy).pipe(isDefinedAndNotNull())),
|
concatLatestFrom(() => this.store.select(selectAccessPolicy).pipe(isDefinedAndNotNull())),
|
||||||
tap(([action, accessPolicy]) => {
|
tap(([, accessPolicy]) => {
|
||||||
const dialogReference = this.dialog.open(OverridePolicyDialog, {
|
const dialogReference = this.dialog.open(OverridePolicyDialog, {
|
||||||
panelClass: 'small-dialog'
|
panelClass: 'small-dialog'
|
||||||
});
|
});
|
||||||
|
@ -287,7 +287,7 @@ export class AccessPolicyEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(AccessPolicyActions.openAddTenantToPolicyDialog),
|
ofType(AccessPolicyActions.openAddTenantToPolicyDialog),
|
||||||
concatLatestFrom(() => this.store.select(selectAccessPolicy)),
|
concatLatestFrom(() => this.store.select(selectAccessPolicy)),
|
||||||
tap(([action, accessPolicy]) => {
|
tap(([, accessPolicy]) => {
|
||||||
const dialogReference = this.dialog.open(AddTenantToPolicyDialog, {
|
const dialogReference = this.dialog.open(AddTenantToPolicyDialog, {
|
||||||
data: {
|
data: {
|
||||||
accessPolicy
|
accessPolicy
|
||||||
|
@ -417,7 +417,7 @@ export class AccessPolicyEffects {
|
||||||
() =>
|
() =>
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(AccessPolicyActions.promptDeleteAccessPolicy),
|
ofType(AccessPolicyActions.promptDeleteAccessPolicy),
|
||||||
tap((request) => {
|
tap(() => {
|
||||||
const dialogReference = this.dialog.open(YesNoDialog, {
|
const dialogReference = this.dialog.open(YesNoDialog, {
|
||||||
data: {
|
data: {
|
||||||
title: 'Delete Policy',
|
title: 'Delete Policy',
|
||||||
|
@ -442,9 +442,9 @@ export class AccessPolicyEffects {
|
||||||
this.store.select(selectResourceAction).pipe(isDefinedAndNotNull()),
|
this.store.select(selectResourceAction).pipe(isDefinedAndNotNull()),
|
||||||
this.store.select(selectAccessPolicy).pipe(isDefinedAndNotNull())
|
this.store.select(selectAccessPolicy).pipe(isDefinedAndNotNull())
|
||||||
]),
|
]),
|
||||||
switchMap(([action, resourceAction, accessPolicy]) =>
|
switchMap(([, resourceAction, accessPolicy]) =>
|
||||||
from(this.accessPoliciesService.deleteAccessPolicy(accessPolicy)).pipe(
|
from(this.accessPoliciesService.deleteAccessPolicy(accessPolicy)).pipe(
|
||||||
map((response) => {
|
map(() => {
|
||||||
// the policy was removed, we need to reload the policy for this resource and action to fetch
|
// the policy was removed, we need to reload the policy for this resource and action to fetch
|
||||||
// the inherited policy or correctly when it's not found
|
// the inherited policy or correctly when it's not found
|
||||||
return AccessPolicyActions.loadAccessPolicy({
|
return AccessPolicyActions.loadAccessPolicy({
|
||||||
|
|
|
@ -42,7 +42,7 @@ export const accessPolicyReducer = createReducer(
|
||||||
...state,
|
...state,
|
||||||
resourceAction: request.resourceAction
|
resourceAction: request.resourceAction
|
||||||
})),
|
})),
|
||||||
on(loadAccessPolicy, (state, { request }) => ({
|
on(loadAccessPolicy, (state) => ({
|
||||||
...state,
|
...state,
|
||||||
status: 'loading' as const
|
status: 'loading' as const
|
||||||
})),
|
})),
|
||||||
|
@ -54,11 +54,11 @@ export const accessPolicyReducer = createReducer(
|
||||||
saving: false,
|
saving: false,
|
||||||
status: 'success' as const
|
status: 'success' as const
|
||||||
})),
|
})),
|
||||||
on(addTenantsToPolicy, (state, { request }) => ({
|
on(addTenantsToPolicy, (state) => ({
|
||||||
...state,
|
...state,
|
||||||
saving: true
|
saving: true
|
||||||
})),
|
})),
|
||||||
on(removeTenantFromPolicy, (state, { request }) => ({
|
on(removeTenantFromPolicy, (state) => ({
|
||||||
...state,
|
...state,
|
||||||
saving: true
|
saving: true
|
||||||
})),
|
})),
|
||||||
|
@ -76,7 +76,7 @@ export const accessPolicyReducer = createReducer(
|
||||||
policyStatus: undefined,
|
policyStatus: undefined,
|
||||||
status: 'error' as const
|
status: 'error' as const
|
||||||
})),
|
})),
|
||||||
on(resetAccessPolicyState, (state) => ({
|
on(resetAccessPolicyState, () => ({
|
||||||
...initialState
|
...initialState
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { AccessPolicyEntity, ComponentResourceAction, PolicyStatus, ResourceAction } from '../shared';
|
import { AccessPolicyEntity, ComponentResourceAction, PolicyStatus, ResourceAction } from '../shared';
|
||||||
import { TenantEntity, UserEntity, UserGroupEntity } from '../../../../state/shared';
|
import { TenantEntity } from '../../../../state/shared';
|
||||||
|
|
||||||
export const accessPolicyFeatureKey = 'accessPolicy';
|
export const accessPolicyFeatureKey = 'accessPolicy';
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
import { createAction, props } from '@ngrx/store';
|
import { createAction, props } from '@ngrx/store';
|
||||||
import { LoadPolicyComponentRequest, LoadPolicyComponentSuccess } from './index';
|
import { LoadPolicyComponentRequest, LoadPolicyComponentSuccess } from './index';
|
||||||
|
|
||||||
const POLICY_COMPONENT_PREFIX: string = '[Policy Component]';
|
const POLICY_COMPONENT_PREFIX = '[Policy Component]';
|
||||||
|
|
||||||
export const loadPolicyComponent = createAction(
|
export const loadPolicyComponent = createAction(
|
||||||
`${POLICY_COMPONENT_PREFIX} Load Policy Component`,
|
`${POLICY_COMPONENT_PREFIX} Load Policy Component`,
|
||||||
|
|
|
@ -51,7 +51,7 @@ export const policyComponentReducer = createReducer(
|
||||||
error: error,
|
error: error,
|
||||||
status: 'error' as const
|
status: 'error' as const
|
||||||
})),
|
})),
|
||||||
on(resetPolicyComponentState, (state) => ({
|
on(resetPolicyComponentState, () => ({
|
||||||
...initialState
|
...initialState
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
import { createAction, props } from '@ngrx/store';
|
import { createAction, props } from '@ngrx/store';
|
||||||
import { LoadTenantsSuccess } from './index';
|
import { LoadTenantsSuccess } from './index';
|
||||||
|
|
||||||
const TENANTS_PREFIX: string = '[Tenants]';
|
const TENANTS_PREFIX = '[Tenants]';
|
||||||
|
|
||||||
export const loadTenants = createAction(`${TENANTS_PREFIX} Load Tenants`);
|
export const loadTenants = createAction(`${TENANTS_PREFIX} Load Tenants`);
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ export const tenantsReducer = createReducer(
|
||||||
error: error,
|
error: error,
|
||||||
status: 'error' as const
|
status: 'error' as const
|
||||||
})),
|
})),
|
||||||
on(resetTenantsState, (state) => ({
|
on(resetTenantsState, () => ({
|
||||||
...initialState
|
...initialState
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
|
|
|
@ -24,7 +24,6 @@ import { MatInputModule } from '@angular/material/input';
|
||||||
import { ReactiveFormsModule } from '@angular/forms';
|
import { ReactiveFormsModule } from '@angular/forms';
|
||||||
import { MatSelectModule } from '@angular/material/select';
|
import { MatSelectModule } from '@angular/material/select';
|
||||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { CurrentUser } from '../../../../../state/current-user';
|
|
||||||
|
|
||||||
describe('PolicyTable', () => {
|
describe('PolicyTable', () => {
|
||||||
let component: PolicyTable;
|
let component: PolicyTable;
|
||||||
|
|
|
@ -15,12 +15,11 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { AfterViewInit, Component, EventEmitter, Input, Output } from '@angular/core';
|
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||||
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
||||||
import { MatSortModule, Sort } from '@angular/material/sort';
|
import { MatSortModule, Sort } from '@angular/material/sort';
|
||||||
import { NiFiCommon } from '../../../../../service/nifi-common.service';
|
import { NiFiCommon } from '../../../../../service/nifi-common.service';
|
||||||
import { CurrentUser } from '../../../../../state/current-user';
|
import { TenantEntity } from '../../../../../state/shared';
|
||||||
import { TenantEntity, UserEntity } from '../../../../../state/shared';
|
|
||||||
import { NgIf } from '@angular/common';
|
import { NgIf } from '@angular/common';
|
||||||
import { AccessPolicyEntity } from '../../../state/shared';
|
import { AccessPolicyEntity } from '../../../state/shared';
|
||||||
import { RemoveTenantFromPolicyRequest } from '../../../state/access-policy';
|
import { RemoveTenantFromPolicyRequest } from '../../../state/access-policy';
|
||||||
|
@ -98,7 +97,7 @@ export class PolicyTable {
|
||||||
return data.sort((a, b) => {
|
return data.sort((a, b) => {
|
||||||
const isAsc = sort.direction === 'asc';
|
const isAsc = sort.direction === 'asc';
|
||||||
|
|
||||||
let retVal: number = 0;
|
let retVal = 0;
|
||||||
switch (sort.active) {
|
switch (sort.active) {
|
||||||
case 'user':
|
case 'user':
|
||||||
retVal = this.nifiCommon.compareString(a.user, b.user);
|
retVal = this.nifiCommon.compareString(a.user, b.user);
|
||||||
|
|
|
@ -35,13 +35,13 @@ import {
|
||||||
selectAccessPolicyState,
|
selectAccessPolicyState,
|
||||||
selectComponentResourceActionFromRoute
|
selectComponentResourceActionFromRoute
|
||||||
} from '../../state/access-policy/access-policy.selectors';
|
} from '../../state/access-policy/access-policy.selectors';
|
||||||
import { distinctUntilChanged, filter } from 'rxjs';
|
import { distinctUntilChanged } from 'rxjs';
|
||||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||||
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
||||||
import { NiFiCommon } from '../../../../service/nifi-common.service';
|
import { NiFiCommon } from '../../../../service/nifi-common.service';
|
||||||
import { ComponentType, isDefinedAndNotNull, SelectOption, TextTipInput } from '../../../../state/shared';
|
import { ComponentType, isDefinedAndNotNull, SelectOption, TextTipInput } from '../../../../state/shared';
|
||||||
import { TextTip } from '../../../../ui/common/tooltips/text-tip/text-tip.component';
|
import { TextTip } from '../../../../ui/common/tooltips/text-tip/text-tip.component';
|
||||||
import { AccessPolicyEntity, Action, ComponentResourceAction, PolicyStatus, ResourceAction } from '../../state/shared';
|
import { AccessPolicyEntity, Action, PolicyStatus, ResourceAction } from '../../state/shared';
|
||||||
import { loadFlowConfiguration } from '../../../../state/flow-configuration/flow-configuration.actions';
|
import { loadFlowConfiguration } from '../../../../state/flow-configuration/flow-configuration.actions';
|
||||||
import { selectFlowConfiguration } from '../../../../state/flow-configuration/flow-configuration.selectors';
|
import { selectFlowConfiguration } from '../../../../state/flow-configuration/flow-configuration.selectors';
|
||||||
import { loadTenants, resetTenantsState } from '../../state/tenants/tenants.actions';
|
import { loadTenants, resetTenantsState } from '../../state/tenants/tenants.actions';
|
||||||
|
|
|
@ -35,7 +35,7 @@ import {
|
||||||
selectAccessPolicyState,
|
selectAccessPolicyState,
|
||||||
selectGlobalResourceActionFromRoute
|
selectGlobalResourceActionFromRoute
|
||||||
} from '../../state/access-policy/access-policy.selectors';
|
} from '../../state/access-policy/access-policy.selectors';
|
||||||
import { distinctUntilChanged, filter } from 'rxjs';
|
import { distinctUntilChanged } from 'rxjs';
|
||||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||||
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
||||||
import { NiFiCommon } from '../../../../service/nifi-common.service';
|
import { NiFiCommon } from '../../../../service/nifi-common.service';
|
||||||
|
@ -47,7 +47,7 @@ import {
|
||||||
TextTipInput
|
TextTipInput
|
||||||
} from '../../../../state/shared';
|
} from '../../../../state/shared';
|
||||||
import { TextTip } from '../../../../ui/common/tooltips/text-tip/text-tip.component';
|
import { TextTip } from '../../../../ui/common/tooltips/text-tip/text-tip.component';
|
||||||
import { AccessPolicyEntity, Action, PolicyStatus, ResourceAction } from '../../state/shared';
|
import { AccessPolicyEntity, Action, PolicyStatus } from '../../state/shared';
|
||||||
import { loadExtensionTypesForPolicies } from '../../../../state/extension-types/extension-types.actions';
|
import { loadExtensionTypesForPolicies } from '../../../../state/extension-types/extension-types.actions';
|
||||||
import { selectRequiredPermissions } from '../../../../state/extension-types/extension-types.selectors';
|
import { selectRequiredPermissions } from '../../../../state/extension-types/extension-types.selectors';
|
||||||
import { loadFlowConfiguration } from '../../../../state/flow-configuration/flow-configuration.actions';
|
import { loadFlowConfiguration } from '../../../../state/flow-configuration/flow-configuration.actions';
|
||||||
|
@ -74,8 +74,8 @@ export class GlobalAccessPolicies implements OnInit, OnDestroy {
|
||||||
policyForm: FormGroup;
|
policyForm: FormGroup;
|
||||||
resourceOptions: SelectOption[];
|
resourceOptions: SelectOption[];
|
||||||
requiredPermissionOptions!: SelectOption[];
|
requiredPermissionOptions!: SelectOption[];
|
||||||
supportsReadWriteAction: boolean = false;
|
supportsReadWriteAction = false;
|
||||||
supportsResourceIdentifier: boolean = false;
|
supportsResourceIdentifier = false;
|
||||||
|
|
||||||
@ViewChild('inheritedFromPolicies') inheritedFromPolicies!: TemplateRef<any>;
|
@ViewChild('inheritedFromPolicies') inheritedFromPolicies!: TemplateRef<any>;
|
||||||
@ViewChild('inheritedFromController') inheritedFromController!: TemplateRef<any>;
|
@ViewChild('inheritedFromController') inheritedFromController!: TemplateRef<any>;
|
||||||
|
@ -97,7 +97,7 @@ export class GlobalAccessPolicies implements OnInit, OnDestroy {
|
||||||
.select(selectRequiredPermissions)
|
.select(selectRequiredPermissions)
|
||||||
.pipe(takeUntilDestroyed())
|
.pipe(takeUntilDestroyed())
|
||||||
.subscribe((requiredPermissions: RequiredPermission[]) => {
|
.subscribe((requiredPermissions: RequiredPermission[]) => {
|
||||||
const regardlessOfRestrictions: string = 'regardless of restrictions';
|
const regardlessOfRestrictions = 'regardless of restrictions';
|
||||||
|
|
||||||
const options: SelectOption[] = [
|
const options: SelectOption[] = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,7 @@ import { Injectable } from '@angular/core';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Client } from '../../../service/client.service';
|
import { Client } from '../../../service/client.service';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { CounterEntity, ResetCounterRequest } from '../state/counter-listing';
|
import { ResetCounterRequest } from '../state/counter-listing';
|
||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class CountersService {
|
export class CountersService {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
import { createAction, props } from '@ngrx/store';
|
import { createAction, props } from '@ngrx/store';
|
||||||
import { LoadCounterListingResponse, ResetCounterRequest, ResetCounterSuccess } from './index';
|
import { LoadCounterListingResponse, ResetCounterRequest, ResetCounterSuccess } from './index';
|
||||||
|
|
||||||
const COUNTER_PREFIX: string = '[Counter Listing]';
|
const COUNTER_PREFIX = '[Counter Listing]';
|
||||||
|
|
||||||
export const loadCounters = createAction(`${COUNTER_PREFIX} Load Counter Listing`);
|
export const loadCounters = createAction(`${COUNTER_PREFIX} Load Counter Listing`);
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ export const counterListingReducer = createReducer(
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
on(resetCounterState, (state) => ({
|
on(resetCounterState, () => ({
|
||||||
...initialState
|
...initialState
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
|
|
|
@ -29,11 +29,11 @@ import { NiFiCommon } from '../../../../../service/nifi-common.service';
|
||||||
styleUrls: ['./counter-table.component.scss']
|
styleUrls: ['./counter-table.component.scss']
|
||||||
})
|
})
|
||||||
export class CounterTable implements AfterViewInit {
|
export class CounterTable implements AfterViewInit {
|
||||||
private _canModifyCounters: boolean = false;
|
private _canModifyCounters = false;
|
||||||
filterTerm: string = '';
|
filterTerm = '';
|
||||||
filterColumn: 'context' | 'name' = 'name';
|
filterColumn: 'context' | 'name' = 'name';
|
||||||
totalCount: number = 0;
|
totalCount = 0;
|
||||||
filteredCount: number = 0;
|
filteredCount = 0;
|
||||||
|
|
||||||
displayedColumns: string[] = ['context', 'name', 'value'];
|
displayedColumns: string[] = ['context', 'name', 'value'];
|
||||||
dataSource: MatTableDataSource<CounterEntity> = new MatTableDataSource<CounterEntity>();
|
dataSource: MatTableDataSource<CounterEntity> = new MatTableDataSource<CounterEntity>();
|
||||||
|
|
|
@ -20,8 +20,6 @@ import { RouterModule, Routes } from '@angular/router';
|
||||||
import { FlowDesigner } from './flow-designer.component';
|
import { FlowDesigner } from './flow-designer.component';
|
||||||
import { RootGroupRedirector } from '../ui/root/redirector/root-group-redirector.component';
|
import { RootGroupRedirector } from '../ui/root/redirector/root-group-redirector.component';
|
||||||
import { rootGroupGuard } from '../ui/root/guard/root-group.guard';
|
import { rootGroupGuard } from '../ui/root/guard/root-group.guard';
|
||||||
import { Canvas } from '../ui/canvas/canvas.component';
|
|
||||||
import { ControllerServices } from '../ui/controller-service/controller-services.component';
|
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,12 +34,12 @@ import { ComponentType } from '../../../../state/shared';
|
||||||
})
|
})
|
||||||
export class DraggableBehavior {
|
export class DraggableBehavior {
|
||||||
private readonly drag: any;
|
private readonly drag: any;
|
||||||
private snapEnabled: boolean = false;
|
private snapEnabled = false;
|
||||||
private snapAlignmentPixels: number = 8;
|
private snapAlignmentPixels = 8;
|
||||||
|
|
||||||
private scale: number = INITIAL_SCALE;
|
private scale: number = INITIAL_SCALE;
|
||||||
|
|
||||||
private updateConnectionRequestId: number = 0;
|
private updateConnectionRequestId = 0;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private store: Store<CanvasState>,
|
private store: Store<CanvasState>,
|
||||||
|
@ -84,8 +84,8 @@ export class DraggableBehavior {
|
||||||
if (minY === null || d.position.y < minY) {
|
if (minY === null || d.position.y < minY) {
|
||||||
minY = d.position.y;
|
minY = d.position.y;
|
||||||
}
|
}
|
||||||
var componentMaxX = d.position.x + d.dimensions.width;
|
const componentMaxX = d.position.x + d.dimensions.width;
|
||||||
var componentMaxY = d.position.y + d.dimensions.height;
|
const componentMaxY = d.position.y + d.dimensions.height;
|
||||||
if (maxX === null || componentMaxX > maxX) {
|
if (maxX === null || componentMaxX > maxX) {
|
||||||
maxX = componentMaxX;
|
maxX = componentMaxX;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,9 +18,6 @@
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { PositionBehavior } from './position-behavior.service';
|
import { PositionBehavior } from './position-behavior.service';
|
||||||
import { provideMockStore } from '@ngrx/store/testing';
|
|
||||||
import { initialState } from '../../state/flow/flow.reducer';
|
|
||||||
import { selectFlowState } from '../../state/flow/flow.selectors';
|
|
||||||
|
|
||||||
describe('PositionBehavior', () => {
|
describe('PositionBehavior', () => {
|
||||||
let service: PositionBehavior;
|
let service: PositionBehavior;
|
||||||
|
|
|
@ -208,8 +208,8 @@ export class BirdseyeView {
|
||||||
}
|
}
|
||||||
|
|
||||||
// offset in case the graph has positive/negative coordinates and panning appropriately
|
// offset in case the graph has positive/negative coordinates and panning appropriately
|
||||||
let offsetX: number = 0;
|
let offsetX = 0;
|
||||||
let left: number = -graphLeft;
|
const left: number = -graphLeft;
|
||||||
if (translate[0] < 0) {
|
if (translate[0] < 0) {
|
||||||
if (translate[0] < left) {
|
if (translate[0] < left) {
|
||||||
offsetX = left;
|
offsetX = left;
|
||||||
|
@ -221,8 +221,8 @@ export class BirdseyeView {
|
||||||
offsetX = left - translate[0];
|
offsetX = left - translate[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let offsetY: number = 0;
|
let offsetY = 0;
|
||||||
let top: number = -graphTop;
|
const top: number = -graphTop;
|
||||||
if (translate[1] < 0) {
|
if (translate[1] < 0) {
|
||||||
if (translate[1] < top) {
|
if (translate[1] < top) {
|
||||||
offsetY = top;
|
offsetY = top;
|
||||||
|
@ -274,7 +274,7 @@ export class BirdseyeView {
|
||||||
// labels
|
// labels
|
||||||
this.labelManager.selectAll().each(function (d: any) {
|
this.labelManager.selectAll().each(function (d: any) {
|
||||||
// default color
|
// default color
|
||||||
let color: string = '#fff7d7';
|
let color = '#fff7d7';
|
||||||
|
|
||||||
if (d.permissions.canRead) {
|
if (d.permissions.canRead) {
|
||||||
// use the specified color if appropriate
|
// use the specified color if appropriate
|
||||||
|
@ -313,7 +313,7 @@ export class BirdseyeView {
|
||||||
// processors
|
// processors
|
||||||
this.processorManager.selectAll().each(function (d: any) {
|
this.processorManager.selectAll().each(function (d: any) {
|
||||||
// default color
|
// default color
|
||||||
let color: string = '#dde4eb';
|
let color = '#dde4eb';
|
||||||
|
|
||||||
if (d.permissions.canRead) {
|
if (d.permissions.canRead) {
|
||||||
// use the specified color if appropriate
|
// use the specified color if appropriate
|
||||||
|
|
|
@ -778,7 +778,7 @@ export class CanvasContextMenu implements ContextMenuDefinitionProvider {
|
||||||
const selectionData = selection.datum();
|
const selectionData = selection.datum();
|
||||||
const componentType: ComponentType = selectionData.type;
|
const componentType: ComponentType = selectionData.type;
|
||||||
|
|
||||||
let resource: string = 'process-groups';
|
let resource = 'process-groups';
|
||||||
switch (componentType) {
|
switch (componentType) {
|
||||||
case ComponentType.Processor:
|
case ComponentType.Processor:
|
||||||
resource = 'processors';
|
resource = 'processors';
|
||||||
|
|
|
@ -753,7 +753,7 @@ export class CanvasUtils {
|
||||||
|
|
||||||
if (isDisconnected) {
|
if (isDisconnected) {
|
||||||
// go through each connection to ensure its source and destination are included
|
// go through each connection to ensure its source and destination are included
|
||||||
connections.forEach(function (connection, id) {
|
connections.forEach((connection) => {
|
||||||
if (isDisconnected) {
|
if (isDisconnected) {
|
||||||
// determine whether this connection and its components are included within the selection
|
// determine whether this connection and its components are included within the selection
|
||||||
isDisconnected =
|
isDisconnected =
|
||||||
|
@ -949,7 +949,7 @@ export class CanvasUtils {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private binarySearch(length: number, comparator: Function): number {
|
private binarySearch(length: number, comparator: (data: number) => number): number {
|
||||||
let low = 0;
|
let low = 0;
|
||||||
let high = length - 1;
|
let high = length - 1;
|
||||||
let mid = 0;
|
let mid = 0;
|
||||||
|
|
|
@ -50,7 +50,7 @@ export class CanvasView {
|
||||||
|
|
||||||
private behavior: any;
|
private behavior: any;
|
||||||
|
|
||||||
private birdseyeTranslateInProgress: boolean = false;
|
private birdseyeTranslateInProgress = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private store: Store<CanvasState>,
|
private store: Store<CanvasState>,
|
||||||
|
@ -95,7 +95,7 @@ export class CanvasView {
|
||||||
|
|
||||||
const self: CanvasView = this;
|
const self: CanvasView = this;
|
||||||
let refreshed: Promise<void> | null;
|
let refreshed: Promise<void> | null;
|
||||||
let panning: boolean = false;
|
let panning = false;
|
||||||
|
|
||||||
// define the behavior
|
// define the behavior
|
||||||
this.behavior = d3
|
this.behavior = d3
|
||||||
|
@ -123,7 +123,7 @@ export class CanvasView {
|
||||||
refreshBirdseye: false
|
refreshBirdseye: false
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.on('end', function (event) {
|
.on('end', function () {
|
||||||
if (!self.isBirdseyeEvent()) {
|
if (!self.isBirdseyeEvent()) {
|
||||||
// ensure the canvas was actually refreshed
|
// ensure the canvas was actually refreshed
|
||||||
if (refreshed) {
|
if (refreshed) {
|
||||||
|
@ -244,7 +244,7 @@ export class CanvasView {
|
||||||
};
|
};
|
||||||
|
|
||||||
// marks the specific component as visible and determines if its entering or leaving visibility
|
// marks the specific component as visible and determines if its entering or leaving visibility
|
||||||
const updateVisibility = function (selection: any, d: any, isVisible: Function) {
|
const updateVisibility = function (selection: any, d: any, isVisible: (d: any) => boolean) {
|
||||||
const visible: boolean = isVisible(d);
|
const visible: boolean = isVisible(d);
|
||||||
const wasVisible: boolean = selection.classed('visible');
|
const wasVisible: boolean = selection.classed('visible');
|
||||||
|
|
||||||
|
@ -307,11 +307,11 @@ export class CanvasView {
|
||||||
let box;
|
let box;
|
||||||
if (this.canvasUtils.isConnection(selection)) {
|
if (this.canvasUtils.isConnection(selection)) {
|
||||||
let x, y;
|
let x, y;
|
||||||
let d = selection.datum();
|
const d = selection.datum();
|
||||||
|
|
||||||
// get the position of the connection label
|
// get the position of the connection label
|
||||||
if (d.bends.length > 0) {
|
if (d.bends.length > 0) {
|
||||||
let i: number = Math.min(Math.max(0, d.labelIndex), d.bends.length - 1);
|
const i: number = Math.min(Math.max(0, d.labelIndex), d.bends.length - 1);
|
||||||
x = d.bends[i].x;
|
x = d.bends[i].x;
|
||||||
y = d.bends[i].y;
|
y = d.bends[i].y;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -77,7 +77,7 @@ export class ConnectionManager {
|
||||||
|
|
||||||
private connections: [] = [];
|
private connections: [] = [];
|
||||||
private connectionContainer: any;
|
private connectionContainer: any;
|
||||||
private transitionRequired: boolean = false;
|
private transitionRequired = false;
|
||||||
private currentProcessGroupId: string = initialState.id;
|
private currentProcessGroupId: string = initialState.id;
|
||||||
private scale: number = INITIAL_SCALE;
|
private scale: number = INITIAL_SCALE;
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ export class ConnectionManager {
|
||||||
private endpointDrag: any;
|
private endpointDrag: any;
|
||||||
private labelDrag: any;
|
private labelDrag: any;
|
||||||
|
|
||||||
private snapEnabled: boolean = true;
|
private snapEnabled = true;
|
||||||
|
|
||||||
private viewContainerRef: ViewContainerRef | undefined;
|
private viewContainerRef: ViewContainerRef | undefined;
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ export class ConnectionManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
let minimumDistance: number;
|
let minimumDistance: number;
|
||||||
let index: number = 0;
|
let index = 0;
|
||||||
|
|
||||||
// line is comprised of start -> [bends] -> end
|
// line is comprised of start -> [bends] -> end
|
||||||
const line = [connectionData.start].concat(connectionData.bends, [connectionData.end]);
|
const line = [connectionData.start].concat(connectionData.bends, [connectionData.end]);
|
||||||
|
@ -567,7 +567,7 @@ export class ConnectionManager {
|
||||||
if (updatePath) {
|
if (updatePath) {
|
||||||
updated
|
updated
|
||||||
.classed('grouped', function (d: any) {
|
.classed('grouped', function (d: any) {
|
||||||
let grouped: boolean = false;
|
let grouped = false;
|
||||||
|
|
||||||
if (d.permissions.canRead) {
|
if (d.permissions.canRead) {
|
||||||
// if there are more than one selected relationship, mark this as grouped
|
// if there are more than one selected relationship, mark this as grouped
|
||||||
|
@ -579,7 +579,7 @@ export class ConnectionManager {
|
||||||
return grouped;
|
return grouped;
|
||||||
})
|
})
|
||||||
.classed('ghost', function (d: any) {
|
.classed('ghost', function (d: any) {
|
||||||
let ghost: boolean = false;
|
let ghost = false;
|
||||||
|
|
||||||
if (d.permissions.canRead) {
|
if (d.permissions.canRead) {
|
||||||
// if the connection has a relationship that is unavailable, mark it a ghost relationship
|
// if the connection has a relationship that is unavailable, mark it a ghost relationship
|
||||||
|
@ -799,7 +799,7 @@ export class ConnectionManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
const newBends: any[] = [];
|
const newBends: any[] = [];
|
||||||
let bendIndex: number = -1;
|
let bendIndex = -1;
|
||||||
|
|
||||||
// create a new array of bends without the selected one
|
// create a new array of bends without the selected one
|
||||||
connectionData.component.bends.forEach((bend: any, i: number) => {
|
connectionData.component.bends.forEach((bend: any, i: number) => {
|
||||||
|
@ -890,8 +890,8 @@ export class ConnectionManager {
|
||||||
.attr('stroke', 'transparent');
|
.attr('stroke', 'transparent');
|
||||||
}
|
}
|
||||||
|
|
||||||
let labelCount: number = 0;
|
let labelCount = 0;
|
||||||
const rowHeight: number = 19;
|
const rowHeight = 19;
|
||||||
const backgrounds: any[] = [];
|
const backgrounds: any[] = [];
|
||||||
const borders: any[] = [];
|
const borders: any[] = [];
|
||||||
|
|
||||||
|
@ -964,7 +964,7 @@ export class ConnectionManager {
|
||||||
connectionFrom
|
connectionFrom
|
||||||
.select('text.connection-from')
|
.select('text.connection-from')
|
||||||
.each(function (this: any) {
|
.each(function (this: any) {
|
||||||
let connectionFromLabel = d3.select(this);
|
const connectionFromLabel = d3.select(this);
|
||||||
|
|
||||||
// reset the label name to handle any previous state
|
// reset the label name to handle any previous state
|
||||||
connectionFromLabel.text(null).selectAll('title').remove();
|
connectionFromLabel.text(null).selectAll('title').remove();
|
||||||
|
@ -1079,7 +1079,7 @@ export class ConnectionManager {
|
||||||
connectionTo
|
connectionTo
|
||||||
.select('text.connection-to')
|
.select('text.connection-to')
|
||||||
.each(function (this: any, d: any) {
|
.each(function (this: any, d: any) {
|
||||||
let connectionToLabel = d3.select(this);
|
const connectionToLabel = d3.select(this);
|
||||||
|
|
||||||
// reset the label name to handle any previous state
|
// reset the label name to handle any previous state
|
||||||
connectionToLabel.text(null).selectAll('title').remove();
|
connectionToLabel.text(null).selectAll('title').remove();
|
||||||
|
@ -1191,7 +1191,7 @@ export class ConnectionManager {
|
||||||
connectionName
|
connectionName
|
||||||
.select('text.connection-name')
|
.select('text.connection-name')
|
||||||
.each(function (this: any) {
|
.each(function (this: any) {
|
||||||
let connectionToLabel = d3.select(this);
|
const connectionToLabel = d3.select(this);
|
||||||
|
|
||||||
// reset the label name to handle any previous state
|
// reset the label name to handle any previous state
|
||||||
connectionToLabel.text(null).selectAll('title').remove();
|
connectionToLabel.text(null).selectAll('title').remove();
|
||||||
|
@ -1472,7 +1472,7 @@ export class ConnectionManager {
|
||||||
.select('title')
|
.select('title')
|
||||||
.text(function () {
|
.text(function () {
|
||||||
if (d.permissions.canRead) {
|
if (d.permissions.canRead) {
|
||||||
let loadBalanceStrategyText: string = '';
|
let loadBalanceStrategyText = '';
|
||||||
|
|
||||||
const loadBalanceStrategyOption: SelectOption | undefined = loadBalanceStrategies.find(
|
const loadBalanceStrategyOption: SelectOption | undefined = loadBalanceStrategies.find(
|
||||||
(option) => option.value == d.component.loadBalanceStrategy
|
(option) => option.value == d.component.loadBalanceStrategy
|
||||||
|
@ -1485,7 +1485,7 @@ export class ConnectionManager {
|
||||||
loadBalanceStrategyText += ' (' + d.component.loadBalancePartitionAttribute + ')';
|
loadBalanceStrategyText += ' (' + d.component.loadBalancePartitionAttribute + ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
let loadBalanceCompression: string = 'no compression';
|
let loadBalanceCompression = 'no compression';
|
||||||
switch (d.component.loadBalanceCompression) {
|
switch (d.component.loadBalanceCompression) {
|
||||||
case 'COMPRESS_ATTRIBUTES_ONLY':
|
case 'COMPRESS_ATTRIBUTES_ONLY':
|
||||||
loadBalanceCompression = "'Attribute' compression";
|
loadBalanceCompression = "'Attribute' compression";
|
||||||
|
@ -1619,7 +1619,7 @@ export class ConnectionManager {
|
||||||
return flowFileAvailability !== 'HEAD_OF_QUEUE_PENALIZED';
|
return flowFileAvailability !== 'HEAD_OF_QUEUE_PENALIZED';
|
||||||
})
|
})
|
||||||
.attr('x', function () {
|
.attr('x', function () {
|
||||||
let offset: number = 0;
|
let offset = 0;
|
||||||
if (!connectionLabelContainer.select('text.expiration-icon').classed('hidden')) {
|
if (!connectionLabelContainer.select('text.expiration-icon').classed('hidden')) {
|
||||||
offset += 16;
|
offset += 16;
|
||||||
}
|
}
|
||||||
|
@ -1878,8 +1878,8 @@ export class ConnectionManager {
|
||||||
// ensure the bend lengths are the same
|
// ensure the bend lengths are the same
|
||||||
if (bends.length === connectionData.component.bends.length) {
|
if (bends.length === connectionData.component.bends.length) {
|
||||||
// determine if the bend points have moved
|
// determine if the bend points have moved
|
||||||
let different: boolean = false;
|
let different = false;
|
||||||
for (let i: number = 0; i < bends.length && !different; i++) {
|
for (let i = 0; i < bends.length && !different; i++) {
|
||||||
if (
|
if (
|
||||||
bends[i].x !== connectionData.component.bends[i].x ||
|
bends[i].x !== connectionData.component.bends[i].x ||
|
||||||
bends[i].y !== connectionData.component.bends[i].y
|
bends[i].y !== connectionData.component.bends[i].y
|
||||||
|
@ -2088,7 +2088,7 @@ export class ConnectionManager {
|
||||||
y: datum.y + datum.height / 2
|
y: datum.y + datum.height / 2
|
||||||
};
|
};
|
||||||
|
|
||||||
let closestBendIndex: number = -1;
|
let closestBendIndex = -1;
|
||||||
let minDistance: number;
|
let minDistance: number;
|
||||||
d.bends.forEach((bend: Position, i: number) => {
|
d.bends.forEach((bend: Position, i: number) => {
|
||||||
const bendPoint: Position = {
|
const bendPoint: Position = {
|
||||||
|
|
|
@ -44,7 +44,7 @@ export class FunnelManager {
|
||||||
|
|
||||||
private funnels: [] = [];
|
private funnels: [] = [];
|
||||||
private funnelContainer: any;
|
private funnelContainer: any;
|
||||||
private transitionRequired: boolean = false;
|
private transitionRequired = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private store: Store<CanvasState>,
|
private store: Store<CanvasState>,
|
||||||
|
|
|
@ -52,10 +52,10 @@ export class LabelManager {
|
||||||
|
|
||||||
private labels: [] = [];
|
private labels: [] = [];
|
||||||
private labelContainer: any;
|
private labelContainer: any;
|
||||||
private transitionRequired: boolean = false;
|
private transitionRequired = false;
|
||||||
|
|
||||||
private labelPointDrag: any;
|
private labelPointDrag: any;
|
||||||
private snapEnabled: boolean = true;
|
private snapEnabled = true;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private store: Store<CanvasState>,
|
private store: Store<CanvasState>,
|
||||||
|
@ -323,14 +323,14 @@ export class LabelManager {
|
||||||
const labelData: any = label.datum();
|
const labelData: any = label.datum();
|
||||||
|
|
||||||
// determine if the width has changed
|
// determine if the width has changed
|
||||||
let different: boolean = false;
|
let different = false;
|
||||||
let widthSet: boolean = !!labelData.component.width;
|
const widthSet = !!labelData.component.width;
|
||||||
if (widthSet || labelData.dimensions.width !== labelData.component.width) {
|
if (widthSet || labelData.dimensions.width !== labelData.component.width) {
|
||||||
different = true;
|
different = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// determine if the height has changed
|
// determine if the height has changed
|
||||||
let heightSet: boolean = !!labelData.component.height;
|
const heightSet = !!labelData.component.height;
|
||||||
if ((!different && heightSet) || labelData.dimensions.height !== labelData.component.height) {
|
if ((!different && heightSet) || labelData.dimensions.height !== labelData.component.height) {
|
||||||
different = true;
|
different = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ export class PortManager {
|
||||||
|
|
||||||
private ports: [] = [];
|
private ports: [] = [];
|
||||||
private portContainer: any;
|
private portContainer: any;
|
||||||
private transitionRequired: boolean = false;
|
private transitionRequired = false;
|
||||||
|
|
||||||
private viewContainerRef: ViewContainerRef | undefined;
|
private viewContainerRef: ViewContainerRef | undefined;
|
||||||
|
|
||||||
|
@ -386,7 +386,7 @@ export class PortManager {
|
||||||
updated
|
updated
|
||||||
.select('text.run-status-icon')
|
.select('text.run-status-icon')
|
||||||
.attr('class', function (d: any) {
|
.attr('class', function (d: any) {
|
||||||
let clazz: string = 'primary-500';
|
let clazz = 'primary-500';
|
||||||
|
|
||||||
if (d.status.aggregateSnapshot.runStatus === 'Invalid') {
|
if (d.status.aggregateSnapshot.runStatus === 'Invalid') {
|
||||||
clazz = 'canvas-accent-A200';
|
clazz = 'canvas-accent-A200';
|
||||||
|
@ -399,7 +399,7 @@ export class PortManager {
|
||||||
return `run-status-icon ${clazz}`;
|
return `run-status-icon ${clazz}`;
|
||||||
})
|
})
|
||||||
.attr('font-family', function (d: any) {
|
.attr('font-family', function (d: any) {
|
||||||
let family: string = 'FontAwesome';
|
let family = 'FontAwesome';
|
||||||
if (d.status.aggregateSnapshot.runStatus === 'Disabled') {
|
if (d.status.aggregateSnapshot.runStatus === 'Disabled') {
|
||||||
family = 'flowfont';
|
family = 'flowfont';
|
||||||
}
|
}
|
||||||
|
@ -407,7 +407,7 @@ export class PortManager {
|
||||||
})
|
})
|
||||||
.attr('y', this.offsetY(25))
|
.attr('y', this.offsetY(25))
|
||||||
.text(function (d: any) {
|
.text(function (d: any) {
|
||||||
let img: string = '';
|
let img = '';
|
||||||
if (d.status.aggregateSnapshot.runStatus === 'Disabled') {
|
if (d.status.aggregateSnapshot.runStatus === 'Disabled') {
|
||||||
img = '\ue802';
|
img = '\ue802';
|
||||||
} else if (d.status.aggregateSnapshot.runStatus === 'Invalid') {
|
} else if (d.status.aggregateSnapshot.runStatus === 'Invalid') {
|
||||||
|
|
|
@ -56,7 +56,7 @@ export class ProcessGroupManager {
|
||||||
|
|
||||||
private processGroups: [] = [];
|
private processGroups: [] = [];
|
||||||
private processGroupContainer: any;
|
private processGroupContainer: any;
|
||||||
private transitionRequired: boolean = false;
|
private transitionRequired = false;
|
||||||
|
|
||||||
private viewContainerRef: ViewContainerRef | undefined;
|
private viewContainerRef: ViewContainerRef | undefined;
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ export class ProcessorManager {
|
||||||
|
|
||||||
private processors: [] = [];
|
private processors: [] = [];
|
||||||
private processorContainer: any;
|
private processorContainer: any;
|
||||||
private transitionRequired: boolean = false;
|
private transitionRequired = false;
|
||||||
|
|
||||||
private viewContainerRef: ViewContainerRef | undefined;
|
private viewContainerRef: ViewContainerRef | undefined;
|
||||||
|
|
||||||
|
@ -670,7 +670,7 @@ export class ProcessorManager {
|
||||||
updated
|
updated
|
||||||
.select('text.run-status-icon')
|
.select('text.run-status-icon')
|
||||||
.attr('class', function (d: any) {
|
.attr('class', function (d: any) {
|
||||||
let clazz: string = 'primary-500';
|
let clazz = 'primary-500';
|
||||||
|
|
||||||
if (d.status.aggregateSnapshot.runStatus === 'Validating') {
|
if (d.status.aggregateSnapshot.runStatus === 'Validating') {
|
||||||
clazz = 'warn-contrast-300';
|
clazz = 'warn-contrast-300';
|
||||||
|
@ -685,7 +685,7 @@ export class ProcessorManager {
|
||||||
return `run-status-icon ${clazz}`;
|
return `run-status-icon ${clazz}`;
|
||||||
})
|
})
|
||||||
.attr('font-family', function (d: any) {
|
.attr('font-family', function (d: any) {
|
||||||
let family: string = 'FontAwesome';
|
let family = 'FontAwesome';
|
||||||
if (d.status.aggregateSnapshot.runStatus === 'Disabled') {
|
if (d.status.aggregateSnapshot.runStatus === 'Disabled') {
|
||||||
family = 'flowfont';
|
family = 'flowfont';
|
||||||
}
|
}
|
||||||
|
@ -695,7 +695,7 @@ export class ProcessorManager {
|
||||||
return d.status.aggregateSnapshot.runStatus === 'Validating';
|
return d.status.aggregateSnapshot.runStatus === 'Validating';
|
||||||
})
|
})
|
||||||
.text(function (d: any) {
|
.text(function (d: any) {
|
||||||
let img: string = '';
|
let img = '';
|
||||||
if (d.status.aggregateSnapshot.runStatus === 'Disabled') {
|
if (d.status.aggregateSnapshot.runStatus === 'Disabled') {
|
||||||
img = '\ue802';
|
img = '\ue802';
|
||||||
} else if (d.status.aggregateSnapshot.runStatus === 'Validating') {
|
} else if (d.status.aggregateSnapshot.runStatus === 'Validating') {
|
||||||
|
|
|
@ -53,7 +53,7 @@ export class RemoteProcessGroupManager {
|
||||||
|
|
||||||
private remoteProcessGroups: [] = [];
|
private remoteProcessGroups: [] = [];
|
||||||
private remoteProcessGroupContainer: any;
|
private remoteProcessGroupContainer: any;
|
||||||
private transitionRequired: boolean = false;
|
private transitionRequired = false;
|
||||||
|
|
||||||
private viewContainerRef: ViewContainerRef | undefined;
|
private viewContainerRef: ViewContainerRef | undefined;
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { NiFiCommon } from '../../../service/nifi-common.service';
|
import { NiFiCommon } from '../../../service/nifi-common.service';
|
||||||
import { ParameterContextUpdateRequest, SubmitParameterContextUpdate } from '../../../state/shared';
|
import { ParameterContextUpdateRequest, SubmitParameterContextUpdate } from '../../../state/shared';
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
|
|
||||||
export interface SearchResultGroup {
|
export interface SearchResultGroup {
|
||||||
|
@ -51,6 +51,7 @@ export interface SearchResults {
|
||||||
export interface SearchResultsEntity {
|
export interface SearchResultsEntity {
|
||||||
searchResultsDTO: SearchResults;
|
searchResultsDTO: SearchResults;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class SearchService {
|
export class SearchService {
|
||||||
private static readonly API: string = '../nifi-api';
|
private static readonly API: string = '../nifi-api';
|
||||||
|
|
|
@ -104,7 +104,7 @@ export class ControllerServicesEffects {
|
||||||
this.store.select(selectControllerServiceTypes),
|
this.store.select(selectControllerServiceTypes),
|
||||||
this.store.select(selectCurrentProcessGroupId)
|
this.store.select(selectCurrentProcessGroupId)
|
||||||
]),
|
]),
|
||||||
tap(([action, controllerServiceTypes, processGroupId]) => {
|
tap(([, controllerServiceTypes, processGroupId]) => {
|
||||||
const dialogReference = this.dialog.open(CreateControllerService, {
|
const dialogReference = this.dialog.open(CreateControllerService, {
|
||||||
data: {
|
data: {
|
||||||
controllerServiceTypes
|
controllerServiceTypes
|
||||||
|
@ -255,7 +255,7 @@ export class ControllerServicesEffects {
|
||||||
};
|
};
|
||||||
|
|
||||||
editDialogReference.componentInstance.parameterContext = parameterContext;
|
editDialogReference.componentInstance.parameterContext = parameterContext;
|
||||||
editDialogReference.componentInstance.goToParameter = (parameter: string) => {
|
editDialogReference.componentInstance.goToParameter = () => {
|
||||||
const commands: string[] = ['/parameter-contexts', parameterContext.id];
|
const commands: string[] = ['/parameter-contexts', parameterContext.id];
|
||||||
goTo(commands, 'Parameter');
|
goTo(commands, 'Parameter');
|
||||||
};
|
};
|
||||||
|
@ -322,7 +322,7 @@ export class ControllerServicesEffects {
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
catchError((error) => {
|
catchError(() => {
|
||||||
// TODO handle error
|
// TODO handle error
|
||||||
return NEVER;
|
return NEVER;
|
||||||
})
|
})
|
||||||
|
|
|
@ -55,7 +55,7 @@ export const initialState: ControllerServicesState = {
|
||||||
|
|
||||||
export const controllerServicesReducer = createReducer(
|
export const controllerServicesReducer = createReducer(
|
||||||
initialState,
|
initialState,
|
||||||
on(resetControllerServicesState, (state) => ({
|
on(resetControllerServicesState, () => ({
|
||||||
...initialState
|
...initialState
|
||||||
})),
|
})),
|
||||||
on(loadControllerServices, (state) => ({
|
on(loadControllerServices, (state) => ({
|
||||||
|
@ -77,7 +77,7 @@ export const controllerServicesReducer = createReducer(
|
||||||
error,
|
error,
|
||||||
status: 'error' as const
|
status: 'error' as const
|
||||||
})),
|
})),
|
||||||
on(createControllerService, configureControllerService, deleteControllerService, (state, { request }) => ({
|
on(createControllerService, configureControllerService, deleteControllerService, (state) => ({
|
||||||
...state,
|
...state,
|
||||||
saving: true
|
saving: true
|
||||||
})),
|
})),
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Bundle, ControllerServiceEntity, Revision } from '../../../../state/shared';
|
import { ControllerServiceEntity } from '../../../../state/shared';
|
||||||
import { BreadcrumbEntity } from '../shared';
|
import { BreadcrumbEntity } from '../shared';
|
||||||
|
|
||||||
export const controllerServicesFeatureKey = 'controllerServiceListing';
|
export const controllerServicesFeatureKey = 'controllerServiceListing';
|
||||||
|
|
|
@ -118,7 +118,7 @@ export class FlowEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(FlowActions.reloadFlow),
|
ofType(FlowActions.reloadFlow),
|
||||||
concatLatestFrom(() => this.store.select(selectCurrentProcessGroupId)),
|
concatLatestFrom(() => this.store.select(selectCurrentProcessGroupId)),
|
||||||
switchMap(([action, processGroupId]) => {
|
switchMap(([, processGroupId]) => {
|
||||||
return of(
|
return of(
|
||||||
FlowActions.loadProcessGroup({
|
FlowActions.loadProcessGroup({
|
||||||
request: {
|
request: {
|
||||||
|
@ -193,7 +193,7 @@ export class FlowEffects {
|
||||||
takeUntil(this.actions$.pipe(ofType(FlowActions.stopProcessGroupPolling)))
|
takeUntil(this.actions$.pipe(ofType(FlowActions.stopProcessGroupPolling)))
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
switchMap((request) => of(FlowActions.reloadFlow()))
|
switchMap(() => of(FlowActions.reloadFlow()))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -348,7 +348,7 @@ export class FlowEffects {
|
||||||
ofType(FlowActions.getParameterContextsAndOpenGroupComponentsDialog),
|
ofType(FlowActions.getParameterContextsAndOpenGroupComponentsDialog),
|
||||||
map((action) => action.request),
|
map((action) => action.request),
|
||||||
concatLatestFrom(() => this.store.select(selectCurrentProcessGroupId)),
|
concatLatestFrom(() => this.store.select(selectCurrentProcessGroupId)),
|
||||||
switchMap(([request, currentProcessGroupId]) =>
|
switchMap(([request]) =>
|
||||||
from(this.flowService.getParameterContexts()).pipe(
|
from(this.flowService.getParameterContexts()).pipe(
|
||||||
concatLatestFrom(() => this.store.select(selectCurrentParameterContext)),
|
concatLatestFrom(() => this.store.select(selectCurrentParameterContext)),
|
||||||
map(([response, parameterContext]) => {
|
map(([response, parameterContext]) => {
|
||||||
|
@ -659,7 +659,7 @@ export class FlowEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(FlowActions.navigateToEditCurrentProcessGroup),
|
ofType(FlowActions.navigateToEditCurrentProcessGroup),
|
||||||
concatLatestFrom(() => this.store.select(selectCurrentProcessGroupId)),
|
concatLatestFrom(() => this.store.select(selectCurrentProcessGroupId)),
|
||||||
tap(([action, processGroupId]) => {
|
tap(([, processGroupId]) => {
|
||||||
this.router.navigate(['/process-groups', processGroupId, 'edit']);
|
this.router.navigate(['/process-groups', processGroupId, 'edit']);
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
|
@ -887,7 +887,7 @@ export class FlowEffects {
|
||||||
};
|
};
|
||||||
|
|
||||||
editDialogReference.componentInstance.parameterContext = parameterContext;
|
editDialogReference.componentInstance.parameterContext = parameterContext;
|
||||||
editDialogReference.componentInstance.goToParameter = (parameter: string) => {
|
editDialogReference.componentInstance.goToParameter = () => {
|
||||||
const commands: string[] = ['/parameter-contexts', parameterContext.id];
|
const commands: string[] = ['/parameter-contexts', parameterContext.id];
|
||||||
goTo(commands, 'Parameter');
|
goTo(commands, 'Parameter');
|
||||||
};
|
};
|
||||||
|
@ -954,7 +954,7 @@ export class FlowEffects {
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
catchError((error) => {
|
catchError(() => {
|
||||||
// TODO handle error
|
// TODO handle error
|
||||||
return NEVER;
|
return NEVER;
|
||||||
})
|
})
|
||||||
|
@ -1569,7 +1569,7 @@ export class FlowEffects {
|
||||||
|
|
||||||
return from(this.flowService.createSnippet(snippet)).pipe(
|
return from(this.flowService.createSnippet(snippet)).pipe(
|
||||||
switchMap((response) => this.flowService.moveSnippet(response.snippet.id, request.groupId)),
|
switchMap((response) => this.flowService.moveSnippet(response.snippet.id, request.groupId)),
|
||||||
map((response) => {
|
map(() => {
|
||||||
const deleteResponses: DeleteComponentResponse[] = [];
|
const deleteResponses: DeleteComponentResponse[] = [];
|
||||||
|
|
||||||
// prepare the delete responses with all requested components that are now deleted
|
// prepare the delete responses with all requested components that are now deleted
|
||||||
|
@ -1598,7 +1598,7 @@ export class FlowEffects {
|
||||||
mergeMap(([requests, processGroupId]) => {
|
mergeMap(([requests, processGroupId]) => {
|
||||||
if (requests.length === 1) {
|
if (requests.length === 1) {
|
||||||
return from(this.flowService.deleteComponent(requests[0])).pipe(
|
return from(this.flowService.deleteComponent(requests[0])).pipe(
|
||||||
map((response) => {
|
map(() => {
|
||||||
const deleteResponses: DeleteComponentResponse[] = [
|
const deleteResponses: DeleteComponentResponse[] = [
|
||||||
{
|
{
|
||||||
id: requests[0].id,
|
id: requests[0].id,
|
||||||
|
@ -1670,7 +1670,7 @@ export class FlowEffects {
|
||||||
|
|
||||||
return from(this.flowService.createSnippet(snippet)).pipe(
|
return from(this.flowService.createSnippet(snippet)).pipe(
|
||||||
switchMap((response) => this.flowService.deleteSnippet(response.snippet.id)),
|
switchMap((response) => this.flowService.deleteSnippet(response.snippet.id)),
|
||||||
map((response) => {
|
map(() => {
|
||||||
const deleteResponses: DeleteComponentResponse[] = [];
|
const deleteResponses: DeleteComponentResponse[] = [];
|
||||||
|
|
||||||
// prepare the delete responses with all requested components that are now deleted
|
// prepare the delete responses with all requested components that are now deleted
|
||||||
|
@ -1733,8 +1733,8 @@ export class FlowEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(FlowActions.leaveProcessGroup),
|
ofType(FlowActions.leaveProcessGroup),
|
||||||
concatLatestFrom(() => this.store.select(selectParentProcessGroupId)),
|
concatLatestFrom(() => this.store.select(selectParentProcessGroupId)),
|
||||||
filter(([action, parentProcessGroupId]) => parentProcessGroupId != null),
|
filter(([, parentProcessGroupId]) => parentProcessGroupId != null),
|
||||||
tap(([action, parentProcessGroupId]) => {
|
tap(([, parentProcessGroupId]) => {
|
||||||
this.router.navigate(['/process-groups', parentProcessGroupId]);
|
this.router.navigate(['/process-groups', parentProcessGroupId]);
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
|
@ -1822,7 +1822,7 @@ export class FlowEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(FlowActions.deselectAllComponents),
|
ofType(FlowActions.deselectAllComponents),
|
||||||
concatLatestFrom(() => this.store.select(selectCurrentProcessGroupId)),
|
concatLatestFrom(() => this.store.select(selectCurrentProcessGroupId)),
|
||||||
switchMap(([action, processGroupId]) => {
|
switchMap(([, processGroupId]) => {
|
||||||
return of(FlowActions.navigateWithoutTransform({ url: ['/process-groups', processGroupId] }));
|
return of(FlowActions.navigateWithoutTransform({ url: ['/process-groups', processGroupId] }));
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
|
@ -145,7 +145,7 @@ export const initialState: FlowState = {
|
||||||
|
|
||||||
export const flowReducer = createReducer(
|
export const flowReducer = createReducer(
|
||||||
initialState,
|
initialState,
|
||||||
on(resetFlowState, (state) => ({
|
on(resetFlowState, () => ({
|
||||||
...initialState
|
...initialState
|
||||||
})),
|
})),
|
||||||
on(loadProcessGroup, (state, { request }) => ({
|
on(loadProcessGroup, (state, { request }) => ({
|
||||||
|
@ -307,7 +307,7 @@ export const flowReducer = createReducer(
|
||||||
...state,
|
...state,
|
||||||
skipTransform: skipTransform
|
skipTransform: skipTransform
|
||||||
})),
|
})),
|
||||||
on(navigateWithoutTransform, (state, { url }) => ({
|
on(navigateWithoutTransform, (state) => ({
|
||||||
...state,
|
...state,
|
||||||
skipTransform: true
|
skipTransform: true
|
||||||
})),
|
})),
|
||||||
|
|
|
@ -89,7 +89,7 @@ export class ParameterEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(ParameterActions.pollParameterContextUpdateRequest),
|
ofType(ParameterActions.pollParameterContextUpdateRequest),
|
||||||
concatLatestFrom(() => this.store.select(selectUpdateRequest)),
|
concatLatestFrom(() => this.store.select(selectUpdateRequest)),
|
||||||
switchMap(([action, updateRequest]) => {
|
switchMap(([, updateRequest]) => {
|
||||||
if (updateRequest) {
|
if (updateRequest) {
|
||||||
return from(this.parameterService.pollParameterContextUpdate(updateRequest.request)).pipe(
|
return from(this.parameterService.pollParameterContextUpdate(updateRequest.request)).pipe(
|
||||||
map((response) =>
|
map((response) =>
|
||||||
|
@ -132,7 +132,7 @@ export class ParameterEffects {
|
||||||
stopPollingParameterContextUpdateRequest$ = createEffect(() =>
|
stopPollingParameterContextUpdateRequest$ = createEffect(() =>
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(ParameterActions.stopPollingParameterContextUpdateRequest),
|
ofType(ParameterActions.stopPollingParameterContextUpdateRequest),
|
||||||
switchMap((response) => of(ParameterActions.deleteParameterContextUpdateRequest()))
|
switchMap(() => of(ParameterActions.deleteParameterContextUpdateRequest()))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ export class ParameterEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(ParameterActions.deleteParameterContextUpdateRequest),
|
ofType(ParameterActions.deleteParameterContextUpdateRequest),
|
||||||
concatLatestFrom(() => this.store.select(selectUpdateRequest)),
|
concatLatestFrom(() => this.store.select(selectUpdateRequest)),
|
||||||
tap(([action, updateRequest]) => {
|
tap(([, updateRequest]) => {
|
||||||
if (updateRequest) {
|
if (updateRequest) {
|
||||||
this.parameterService.deleteParameterContextUpdate(updateRequest.request).subscribe();
|
this.parameterService.deleteParameterContextUpdate(updateRequest.request).subscribe();
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ export const initialState: ParameterState = {
|
||||||
|
|
||||||
export const parameterReducer = createReducer(
|
export const parameterReducer = createReducer(
|
||||||
initialState,
|
initialState,
|
||||||
on(submitParameterContextUpdateRequest, (state, { request }) => ({
|
on(submitParameterContextUpdateRequest, (state) => ({
|
||||||
...state,
|
...state,
|
||||||
saving: true
|
saving: true
|
||||||
})),
|
})),
|
||||||
|
|
|
@ -203,7 +203,7 @@ export class QueueEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(QueueActions.pollEmptyQueueRequest),
|
ofType(QueueActions.pollEmptyQueueRequest),
|
||||||
concatLatestFrom(() => this.store.select(selectDropRequestEntity).pipe(isDefinedAndNotNull())),
|
concatLatestFrom(() => this.store.select(selectDropRequestEntity).pipe(isDefinedAndNotNull())),
|
||||||
switchMap(([action, dropEntity]) => {
|
switchMap(([, dropEntity]) => {
|
||||||
return from(this.queueService.pollEmptyQueueRequest(dropEntity.dropRequest)).pipe(
|
return from(this.queueService.pollEmptyQueueRequest(dropEntity.dropRequest)).pipe(
|
||||||
map((response) =>
|
map((response) =>
|
||||||
QueueActions.pollEmptyQueueRequestSuccess({
|
QueueActions.pollEmptyQueueRequestSuccess({
|
||||||
|
@ -229,14 +229,14 @@ export class QueueEffects {
|
||||||
ofType(QueueActions.pollEmptyQueueRequestSuccess),
|
ofType(QueueActions.pollEmptyQueueRequestSuccess),
|
||||||
map((action) => action.response),
|
map((action) => action.response),
|
||||||
filter((response) => response.dropEntity.dropRequest.finished),
|
filter((response) => response.dropEntity.dropRequest.finished),
|
||||||
switchMap((response) => of(QueueActions.stopPollingEmptyQueueRequest()))
|
switchMap(() => of(QueueActions.stopPollingEmptyQueueRequest()))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
stopPollingEmptyQueueRequest$ = createEffect(() =>
|
stopPollingEmptyQueueRequest$ = createEffect(() =>
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(QueueActions.stopPollingEmptyQueueRequest),
|
ofType(QueueActions.stopPollingEmptyQueueRequest),
|
||||||
switchMap((response) => of(QueueActions.deleteEmptyQueueRequest()))
|
switchMap(() => of(QueueActions.deleteEmptyQueueRequest()))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ export class QueueEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(QueueActions.deleteEmptyQueueRequest),
|
ofType(QueueActions.deleteEmptyQueueRequest),
|
||||||
concatLatestFrom(() => this.store.select(selectDropRequestEntity).pipe(isDefinedAndNotNull())),
|
concatLatestFrom(() => this.store.select(selectDropRequestEntity).pipe(isDefinedAndNotNull())),
|
||||||
switchMap(([action, dropEntity]) => {
|
switchMap(([, dropEntity]) => {
|
||||||
this.dialog.closeAll();
|
this.dialog.closeAll();
|
||||||
|
|
||||||
return from(this.queueService.deleteEmptyQueueRequest(dropEntity.dropRequest)).pipe(
|
return from(this.queueService.deleteEmptyQueueRequest(dropEntity.dropRequest)).pipe(
|
||||||
|
@ -255,7 +255,7 @@ export class QueueEffects {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
catchError((error) =>
|
catchError(() =>
|
||||||
of(
|
of(
|
||||||
QueueActions.showEmptyQueueResults({
|
QueueActions.showEmptyQueueResults({
|
||||||
request: {
|
request: {
|
||||||
|
@ -282,7 +282,7 @@ export class QueueEffects {
|
||||||
const dropRequest: DropRequest = request.dropEntity.dropRequest;
|
const dropRequest: DropRequest = request.dropEntity.dropRequest;
|
||||||
const droppedTokens: string[] = dropRequest.dropped.split(/ \/ /);
|
const droppedTokens: string[] = dropRequest.dropped.split(/ \/ /);
|
||||||
|
|
||||||
let message: string = `${droppedTokens[0]} FlowFiles (${droppedTokens[1]})`;
|
let message = `${droppedTokens[0]} FlowFiles (${droppedTokens[1]})`;
|
||||||
|
|
||||||
if (dropRequest.percentCompleted < 100) {
|
if (dropRequest.percentCompleted < 100) {
|
||||||
const originalTokens: string[] = dropRequest.original.split(/ \/ /);
|
const originalTokens: string[] = dropRequest.original.split(/ \/ /);
|
||||||
|
@ -334,7 +334,7 @@ export class QueueEffects {
|
||||||
() =>
|
() =>
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(QueueActions.queueApiError),
|
ofType(QueueActions.queueApiError),
|
||||||
tap((action) => this.dialog.closeAll())
|
tap(() => this.dialog.closeAll())
|
||||||
),
|
),
|
||||||
{ dispatch: false }
|
{ dispatch: false }
|
||||||
);
|
);
|
||||||
|
|
|
@ -59,7 +59,7 @@ export const queueReducer = createReducer(
|
||||||
error,
|
error,
|
||||||
status: 'error' as const
|
status: 'error' as const
|
||||||
})),
|
})),
|
||||||
on(resetQueueState, (state) => ({
|
on(resetQueueState, () => ({
|
||||||
...initialState
|
...initialState
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
|
|
|
@ -66,7 +66,7 @@ export class TransformEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(TransformActions.restoreViewport),
|
ofType(TransformActions.restoreViewport),
|
||||||
concatLatestFrom(() => this.store.select(selectCurrentProcessGroupId)),
|
concatLatestFrom(() => this.store.select(selectCurrentProcessGroupId)),
|
||||||
tap(([action, processGroupId]) => {
|
tap(([, processGroupId]) => {
|
||||||
try {
|
try {
|
||||||
// see if we can restore the view position from storage
|
// see if we can restore the view position from storage
|
||||||
const name: string = TransformEffects.VIEW_PREFIX + processGroupId;
|
const name: string = TransformEffects.VIEW_PREFIX + processGroupId;
|
||||||
|
|
|
@ -24,7 +24,7 @@ export const INITIAL_TRANSLATE = {
|
||||||
y: 0
|
y: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
export const INITIAL_SCALE: number = 1;
|
export const INITIAL_SCALE = 1;
|
||||||
|
|
||||||
export const initialState: CanvasTransform = {
|
export const initialState: CanvasTransform = {
|
||||||
translate: INITIAL_TRANSLATE,
|
translate: INITIAL_TRANSLATE,
|
||||||
|
|
|
@ -118,7 +118,7 @@ export class Canvas implements OnInit, OnDestroy {
|
||||||
concatLatestFrom(() => this.store.select(selectSkipTransform)),
|
concatLatestFrom(() => this.store.select(selectSkipTransform)),
|
||||||
takeUntilDestroyed()
|
takeUntilDestroyed()
|
||||||
)
|
)
|
||||||
.subscribe(([status, skipTransform]) => {
|
.subscribe(([, skipTransform]) => {
|
||||||
if (skipTransform) {
|
if (skipTransform) {
|
||||||
this.store.dispatch(setSkipTransform({ skipTransform: false }));
|
this.store.dispatch(setSkipTransform({ skipTransform: false }));
|
||||||
} else {
|
} else {
|
||||||
|
@ -136,7 +136,7 @@ export class Canvas implements OnInit, OnDestroy {
|
||||||
concatLatestFrom(() => this.store.select(selectSkipTransform)),
|
concatLatestFrom(() => this.store.select(selectSkipTransform)),
|
||||||
takeUntilDestroyed()
|
takeUntilDestroyed()
|
||||||
)
|
)
|
||||||
.subscribe(([selectedComponent, skipTransform]) => {
|
.subscribe(([, skipTransform]) => {
|
||||||
if (skipTransform) {
|
if (skipTransform) {
|
||||||
this.store.dispatch(setSkipTransform({ skipTransform: false }));
|
this.store.dispatch(setSkipTransform({ skipTransform: false }));
|
||||||
} else {
|
} else {
|
||||||
|
@ -154,7 +154,7 @@ export class Canvas implements OnInit, OnDestroy {
|
||||||
concatLatestFrom(() => this.store.select(selectSkipTransform)),
|
concatLatestFrom(() => this.store.select(selectSkipTransform)),
|
||||||
takeUntilDestroyed()
|
takeUntilDestroyed()
|
||||||
)
|
)
|
||||||
.subscribe(([ids, skipTransform]) => {
|
.subscribe(([, skipTransform]) => {
|
||||||
if (skipTransform) {
|
if (skipTransform) {
|
||||||
this.store.dispatch(setSkipTransform({ skipTransform: false }));
|
this.store.dispatch(setSkipTransform({ skipTransform: false }));
|
||||||
} else {
|
} else {
|
||||||
|
@ -350,10 +350,7 @@ export class Canvas implements OnInit, OnDestroy {
|
||||||
.attr('result', 'offsetBlur');
|
.attr('result', 'offsetBlur');
|
||||||
|
|
||||||
// color/opacity
|
// color/opacity
|
||||||
componentDropShadowFilter
|
componentDropShadowFilter.append('feFlood').attr('flood-opacity', 0.4).attr('result', 'offsetColor');
|
||||||
.append('feFlood')
|
|
||||||
.attr('flood-opacity', 0.4)
|
|
||||||
.attr('result', 'offsetColor');
|
|
||||||
|
|
||||||
// combine
|
// combine
|
||||||
componentDropShadowFilter
|
componentDropShadowFilter
|
||||||
|
@ -391,10 +388,7 @@ export class Canvas implements OnInit, OnDestroy {
|
||||||
.attr('result', 'offsetBlur');
|
.attr('result', 'offsetBlur');
|
||||||
|
|
||||||
// color/opacity
|
// color/opacity
|
||||||
connectionFullDropShadowFilter
|
connectionFullDropShadowFilter.append('feFlood').attr('flood-opacity', 1).attr('result', 'offsetColor');
|
||||||
.append('feFlood')
|
|
||||||
.attr('flood-opacity', 1)
|
|
||||||
.attr('result', 'offsetColor');
|
|
||||||
|
|
||||||
// combine
|
// combine
|
||||||
connectionFullDropShadowFilter
|
connectionFullDropShadowFilter
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { CanvasState } from '../../../state';
|
|
||||||
import {
|
import {
|
||||||
selectBreadcrumbs,
|
selectBreadcrumbs,
|
||||||
selectNavigationCollapsed,
|
selectNavigationCollapsed,
|
||||||
|
@ -27,10 +26,7 @@ import { NavigationControl } from './navigation-control/navigation-control.compo
|
||||||
import { OperationControl } from './operation-control/operation-control.component';
|
import { OperationControl } from './operation-control/operation-control.component';
|
||||||
import { AsyncPipe } from '@angular/common';
|
import { AsyncPipe } from '@angular/common';
|
||||||
import { NiFiState } from '../../../../../state';
|
import { NiFiState } from '../../../../../state';
|
||||||
import {
|
import { selectSupportsManagedAuthorizer } from '../../../../../state/flow-configuration/flow-configuration.selectors';
|
||||||
selectFlowConfiguration,
|
|
||||||
selectSupportsManagedAuthorizer
|
|
||||||
} from '../../../../../state/flow-configuration/flow-configuration.selectors';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'graph-controls',
|
selector: 'graph-controls',
|
||||||
|
|
|
@ -223,7 +223,7 @@ export class OperationControl {
|
||||||
const selectionData = selection.datum();
|
const selectionData = selection.datum();
|
||||||
const componentType: ComponentType = selectionData.type;
|
const componentType: ComponentType = selectionData.type;
|
||||||
|
|
||||||
let resource: string = 'process-groups';
|
let resource = 'process-groups';
|
||||||
switch (componentType) {
|
switch (componentType) {
|
||||||
case ComponentType.Processor:
|
case ComponentType.Processor:
|
||||||
resource = 'processors';
|
resource = 'processors';
|
||||||
|
|
|
@ -37,12 +37,10 @@ export class FlowStatus {
|
||||||
@Input() clusterSummary: ClusterSummary = initialState.clusterSummary;
|
@Input() clusterSummary: ClusterSummary = initialState.clusterSummary;
|
||||||
@Input() bulletins: BulletinEntity[] = initialState.controllerBulletins.bulletins;
|
@Input() bulletins: BulletinEntity[] = initialState.controllerBulletins.bulletins;
|
||||||
@Input() currentProcessGroupId: string = initialState.id;
|
@Input() currentProcessGroupId: string = initialState.id;
|
||||||
@Input() loadingStatus: boolean = false;
|
@Input() loadingStatus = false;
|
||||||
|
|
||||||
protected readonly BulletinsTip = BulletinsTip;
|
protected readonly BulletinsTip = BulletinsTip;
|
||||||
|
|
||||||
constructor() {}
|
|
||||||
|
|
||||||
hasTerminatedThreads(): boolean {
|
hasTerminatedThreads(): boolean {
|
||||||
return this.controllerStatus.terminatedThreadCount > 0;
|
return this.controllerStatus.terminatedThreadCount > 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
(mouseleave)="mouseLeave()"
|
(mouseleave)="mouseLeave()"
|
||||||
cdkDrag
|
cdkDrag
|
||||||
cdkDragBoundary="body"
|
cdkDragBoundary="body"
|
||||||
(cdkDragStarted)="onDragStarted($event)"
|
(cdkDragStarted)="onDragStarted()"
|
||||||
(cdkDragEnded)="onDragEnded($event)">
|
(cdkDragEnded)="onDragEnded($event)">
|
||||||
<span class="h-1 absolute left-[3px] right-[3px] bottom-0.5 component-button-grip"></span>
|
<span class="h-1 absolute left-[3px] right-[3px] bottom-0.5 component-button-grip"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, OnInit } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
import { CdkDrag, CdkDragEnd, CdkDragStart } from '@angular/cdk/drag-drop';
|
import { CdkDrag, CdkDragEnd } from '@angular/cdk/drag-drop';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { CanvasState } from '../../../../state';
|
import { CanvasState } from '../../../../state';
|
||||||
import { INITIAL_SCALE, INITIAL_TRANSLATE } from '../../../../state/transform/transform.reducer';
|
import { INITIAL_SCALE, INITIAL_TRANSLATE } from '../../../../state/transform/transform.reducer';
|
||||||
|
@ -35,14 +35,14 @@ import { ComponentType } from '../../../../../../state/shared';
|
||||||
imports: [CdkDrag],
|
imports: [CdkDrag],
|
||||||
styleUrls: ['./new-canvas-item.component.scss']
|
styleUrls: ['./new-canvas-item.component.scss']
|
||||||
})
|
})
|
||||||
export class NewCanvasItem implements OnInit {
|
export class NewCanvasItem {
|
||||||
@Input() type!: ComponentType;
|
@Input() type!: ComponentType;
|
||||||
@Input() iconClass: string = '';
|
@Input() iconClass = '';
|
||||||
@Input() iconHoverClass: string = '';
|
@Input() iconHoverClass = '';
|
||||||
|
|
||||||
dragging: boolean = false;
|
dragging = false;
|
||||||
|
|
||||||
private hovering: boolean = false;
|
private hovering = false;
|
||||||
|
|
||||||
private scale: number = INITIAL_SCALE;
|
private scale: number = INITIAL_SCALE;
|
||||||
private translate: Position = INITIAL_TRANSLATE;
|
private translate: Position = INITIAL_TRANSLATE;
|
||||||
|
@ -67,8 +67,6 @@ export class NewCanvasItem implements OnInit {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
|
||||||
|
|
||||||
mouseEnter() {
|
mouseEnter() {
|
||||||
this.hovering = true;
|
this.hovering = true;
|
||||||
}
|
}
|
||||||
|
@ -81,7 +79,7 @@ export class NewCanvasItem implements OnInit {
|
||||||
return this.hovering && !this.dragging;
|
return this.hovering && !this.dragging;
|
||||||
}
|
}
|
||||||
|
|
||||||
onDragStarted(event: CdkDragStart): void {
|
onDragStarted(): void {
|
||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
setDragging({
|
setDragging({
|
||||||
dragging: true
|
dragging: true
|
||||||
|
|
|
@ -27,8 +27,6 @@ import {
|
||||||
OriginConnectionPosition,
|
OriginConnectionPosition,
|
||||||
OverlayConnectionPosition
|
OverlayConnectionPosition
|
||||||
} from '@angular/cdk/overlay';
|
} from '@angular/cdk/overlay';
|
||||||
import { Store } from '@ngrx/store';
|
|
||||||
import { CanvasState } from '../../../../state';
|
|
||||||
import { ComponentType } from '../../../../../../state/shared';
|
import { ComponentType } from '../../../../../../state/shared';
|
||||||
import { NgForOf, NgIf, NgTemplateOutlet } from '@angular/common';
|
import { NgForOf, NgIf, NgTemplateOutlet } from '@angular/common';
|
||||||
import { RouterLink } from '@angular/router';
|
import { RouterLink } from '@angular/router';
|
||||||
|
@ -58,10 +56,10 @@ export class Search implements OnInit {
|
||||||
public positions: ConnectionPositionPair[] = [this.position];
|
public positions: ConnectionPositionPair[] = [this.position];
|
||||||
|
|
||||||
searchForm: FormGroup;
|
searchForm: FormGroup;
|
||||||
searchInputVisible: boolean = false;
|
searchInputVisible = false;
|
||||||
|
|
||||||
searching: boolean = false;
|
searching = false;
|
||||||
searchingResultsVisible: boolean = false;
|
searchingResultsVisible = false;
|
||||||
|
|
||||||
processorResults: ComponentSearchResult[] = [];
|
processorResults: ComponentSearchResult[] = [];
|
||||||
connectionResults: ComponentSearchResult[] = [];
|
connectionResults: ComponentSearchResult[] = [];
|
||||||
|
|
|
@ -132,8 +132,8 @@ export class CreateConnection {
|
||||||
childOutputPorts$!: Observable<any> | null;
|
childOutputPorts$!: Observable<any> | null;
|
||||||
childInputPorts$!: Observable<any> | null;
|
childInputPorts$!: Observable<any> | null;
|
||||||
|
|
||||||
loadBalancePartitionAttributeRequired: boolean = false;
|
loadBalancePartitionAttributeRequired = false;
|
||||||
loadBalanceCompressionRequired: boolean = false;
|
loadBalanceCompressionRequired = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(MAT_DIALOG_DATA) private dialogRequest: CreateConnectionDialogRequest,
|
@Inject(MAT_DIALOG_DATA) private dialogRequest: CreateConnectionDialogRequest,
|
||||||
|
|
|
@ -25,6 +25,4 @@ import { Component, Input } from '@angular/core';
|
||||||
})
|
})
|
||||||
export class DestinationFunnel {
|
export class DestinationFunnel {
|
||||||
@Input() groupName!: string;
|
@Input() groupName!: string;
|
||||||
|
|
||||||
constructor() {}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,4 @@ export class DestinationOutputPort {
|
||||||
@Input() groupName!: string;
|
@Input() groupName!: string;
|
||||||
|
|
||||||
name!: string;
|
name!: string;
|
||||||
|
|
||||||
constructor() {}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,8 +83,8 @@ export class DestinationProcessGroup implements ControlValueAccessor {
|
||||||
|
|
||||||
protected readonly TextTip = TextTip;
|
protected readonly TextTip = TextTip;
|
||||||
|
|
||||||
isDisabled: boolean = false;
|
isDisabled = false;
|
||||||
isTouched: boolean = false;
|
isTouched = false;
|
||||||
onTouched!: () => void;
|
onTouched!: () => void;
|
||||||
onChange!: (outputPort: string) => void;
|
onChange!: (outputPort: string) => void;
|
||||||
|
|
||||||
|
@ -92,10 +92,8 @@ export class DestinationProcessGroup implements ControlValueAccessor {
|
||||||
inputPortItems!: SelectOption[];
|
inputPortItems!: SelectOption[];
|
||||||
selectedInputPort!: string;
|
selectedInputPort!: string;
|
||||||
|
|
||||||
noPorts: boolean = false;
|
noPorts = false;
|
||||||
hasUnauthorizedPorts: boolean = false;
|
hasUnauthorizedPorts = false;
|
||||||
|
|
||||||
constructor() {}
|
|
||||||
|
|
||||||
registerOnChange(onChange: (selectedInputPort: string) => void): void {
|
registerOnChange(onChange: (selectedInputPort: string) => void): void {
|
||||||
this.onChange = onChange;
|
this.onChange = onChange;
|
||||||
|
|
|
@ -36,6 +36,4 @@ export class DestinationProcessor {
|
||||||
@Input() groupName!: string;
|
@Input() groupName!: string;
|
||||||
|
|
||||||
processorName!: string;
|
processorName!: string;
|
||||||
|
|
||||||
constructor() {}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,8 +72,8 @@ export class DestinationRemoteProcessGroup implements ControlValueAccessor {
|
||||||
|
|
||||||
protected readonly TextTip = TextTip;
|
protected readonly TextTip = TextTip;
|
||||||
|
|
||||||
isDisabled: boolean = false;
|
isDisabled = false;
|
||||||
isTouched: boolean = false;
|
isTouched = false;
|
||||||
onTouched!: () => void;
|
onTouched!: () => void;
|
||||||
onChange!: (outputPort: string) => void;
|
onChange!: (outputPort: string) => void;
|
||||||
|
|
||||||
|
@ -81,9 +81,7 @@ export class DestinationRemoteProcessGroup implements ControlValueAccessor {
|
||||||
inputPortItems!: SelectOption[];
|
inputPortItems!: SelectOption[];
|
||||||
selectedInputPort!: string;
|
selectedInputPort!: string;
|
||||||
|
|
||||||
noPorts: boolean = false;
|
noPorts = false;
|
||||||
|
|
||||||
constructor() {}
|
|
||||||
|
|
||||||
registerOnChange(onChange: (selectedInputPort: string) => void): void {
|
registerOnChange(onChange: (selectedInputPort: string) => void): void {
|
||||||
this.onChange = onChange;
|
this.onChange = onChange;
|
||||||
|
|
|
@ -160,9 +160,9 @@ export class EditConnectionComponent {
|
||||||
childOutputPorts$!: Observable<any> | null;
|
childOutputPorts$!: Observable<any> | null;
|
||||||
childInputPorts$!: Observable<any> | null;
|
childInputPorts$!: Observable<any> | null;
|
||||||
|
|
||||||
loadBalancePartitionAttributeRequired: boolean = false;
|
loadBalancePartitionAttributeRequired = false;
|
||||||
initialPartitionAttribute: string;
|
initialPartitionAttribute: string;
|
||||||
loadBalanceCompressionRequired: boolean = false;
|
loadBalanceCompressionRequired = false;
|
||||||
initialCompression: string;
|
initialCompression: string;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
|
|
@ -73,8 +73,8 @@ export class Prioritizers implements ControlValueAccessor {
|
||||||
|
|
||||||
protected readonly TextTip = TextTip;
|
protected readonly TextTip = TextTip;
|
||||||
|
|
||||||
isDisabled: boolean = false;
|
isDisabled = false;
|
||||||
isTouched: boolean = false;
|
isTouched = false;
|
||||||
onTouched!: () => void;
|
onTouched!: () => void;
|
||||||
onChange!: (selectedPrioritizers: string[]) => void;
|
onChange!: (selectedPrioritizers: string[]) => void;
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,4 @@ import { Component, Input } from '@angular/core';
|
||||||
})
|
})
|
||||||
export class SourceFunnel {
|
export class SourceFunnel {
|
||||||
@Input() groupName!: string;
|
@Input() groupName!: string;
|
||||||
|
|
||||||
constructor() {}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,4 @@ export class SourceInputPort {
|
||||||
@Input() groupName!: string;
|
@Input() groupName!: string;
|
||||||
|
|
||||||
name!: string;
|
name!: string;
|
||||||
|
|
||||||
constructor() {}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,8 +86,8 @@ export class SourceProcessGroup implements ControlValueAccessor {
|
||||||
|
|
||||||
protected readonly TextTip = TextTip;
|
protected readonly TextTip = TextTip;
|
||||||
|
|
||||||
isDisabled: boolean = false;
|
isDisabled = false;
|
||||||
isTouched: boolean = false;
|
isTouched = false;
|
||||||
onTouched!: () => void;
|
onTouched!: () => void;
|
||||||
onChange!: (outputPort: string) => void;
|
onChange!: (outputPort: string) => void;
|
||||||
|
|
||||||
|
@ -95,10 +95,8 @@ export class SourceProcessGroup implements ControlValueAccessor {
|
||||||
outputPortItems!: SelectOption[];
|
outputPortItems!: SelectOption[];
|
||||||
selectedOutputPort!: string;
|
selectedOutputPort!: string;
|
||||||
|
|
||||||
noPorts: boolean = false;
|
noPorts = false;
|
||||||
hasUnauthorizedPorts: boolean = false;
|
hasUnauthorizedPorts = false;
|
||||||
|
|
||||||
constructor() {}
|
|
||||||
|
|
||||||
registerOnChange(onChange: (selectedOutputPort: string) => void): void {
|
registerOnChange(onChange: (selectedOutputPort: string) => void): void {
|
||||||
this.onChange = onChange;
|
this.onChange = onChange;
|
||||||
|
|
|
@ -51,8 +51,8 @@ export class SourceProcessor implements ControlValueAccessor {
|
||||||
}
|
}
|
||||||
@Input() groupName!: string;
|
@Input() groupName!: string;
|
||||||
|
|
||||||
isDisabled: boolean = false;
|
isDisabled = false;
|
||||||
isTouched: boolean = false;
|
isTouched = false;
|
||||||
onTouched!: () => void;
|
onTouched!: () => void;
|
||||||
onChange!: (selectedRelationships: string[]) => void;
|
onChange!: (selectedRelationships: string[]) => void;
|
||||||
|
|
||||||
|
@ -62,8 +62,6 @@ export class SourceProcessor implements ControlValueAccessor {
|
||||||
relationshipItems!: RelationshipItem[];
|
relationshipItems!: RelationshipItem[];
|
||||||
selectedRelationships!: string[];
|
selectedRelationships!: string[];
|
||||||
|
|
||||||
constructor() {}
|
|
||||||
|
|
||||||
processRelationships(): void {
|
processRelationships(): void {
|
||||||
if (this.relationships && this.selectedRelationships) {
|
if (this.relationships && this.selectedRelationships) {
|
||||||
this.relationshipItems = this.relationships.map((relationship) => {
|
this.relationshipItems = this.relationships.map((relationship) => {
|
||||||
|
|
|
@ -74,8 +74,8 @@ export class SourceRemoteProcessGroup implements ControlValueAccessor {
|
||||||
|
|
||||||
protected readonly TextTip = TextTip;
|
protected readonly TextTip = TextTip;
|
||||||
|
|
||||||
isDisabled: boolean = false;
|
isDisabled = false;
|
||||||
isTouched: boolean = false;
|
isTouched = false;
|
||||||
onTouched!: () => void;
|
onTouched!: () => void;
|
||||||
onChange!: (outputPort: string) => void;
|
onChange!: (outputPort: string) => void;
|
||||||
|
|
||||||
|
@ -83,9 +83,7 @@ export class SourceRemoteProcessGroup implements ControlValueAccessor {
|
||||||
outputPortItems!: SelectOption[];
|
outputPortItems!: SelectOption[];
|
||||||
selectedOutputPort!: string;
|
selectedOutputPort!: string;
|
||||||
|
|
||||||
noPorts: boolean = false;
|
noPorts = false;
|
||||||
|
|
||||||
constructor() {}
|
|
||||||
|
|
||||||
registerOnChange(onChange: (selectedOutputPort: string) => void): void {
|
registerOnChange(onChange: (selectedOutputPort: string) => void): void {
|
||||||
this.onChange = onChange;
|
this.onChange = onChange;
|
||||||
|
|
|
@ -61,7 +61,7 @@ export class CreatePort {
|
||||||
protected readonly TextTip = TextTip;
|
protected readonly TextTip = TextTip;
|
||||||
|
|
||||||
createPortForm: FormGroup;
|
createPortForm: FormGroup;
|
||||||
isRootProcessGroup: boolean = false;
|
isRootProcessGroup = false;
|
||||||
portTypeLabel: string;
|
portTypeLabel: string;
|
||||||
|
|
||||||
allowRemoteAccessOptions: SelectOption[] = [
|
allowRemoteAccessOptions: SelectOption[] = [
|
||||||
|
|
|
@ -25,7 +25,7 @@ describe('EditProcessGroup', () => {
|
||||||
let component: EditProcessGroup;
|
let component: EditProcessGroup;
|
||||||
let fixture: ComponentFixture<EditProcessGroup>;
|
let fixture: ComponentFixture<EditProcessGroup>;
|
||||||
|
|
||||||
const parameterContextId: string = '95d509b9-018b-1000-daff-b7957ea7934f';
|
const parameterContextId = '95d509b9-018b-1000-daff-b7957ea7934f';
|
||||||
const data: any = {
|
const data: any = {
|
||||||
type: 'ProcessGroup',
|
type: 'ProcessGroup',
|
||||||
uri: 'https://localhost:4200/nifi-api/process-groups/162380af-018c-1000-a7eb-f5d06f77168b',
|
uri: 'https://localhost:4200/nifi-api/process-groups/162380af-018c-1000-a7eb-f5d06f77168b',
|
||||||
|
|
|
@ -194,7 +194,7 @@ export class EditProcessGroup {
|
||||||
}
|
}
|
||||||
|
|
||||||
submitForm() {
|
submitForm() {
|
||||||
let updateStrategy: string = 'DIRECT_CHILDREN';
|
let updateStrategy = 'DIRECT_CHILDREN';
|
||||||
if (this.editProcessGroupForm.get('applyParameterContextRecursively')?.value) {
|
if (this.editProcessGroupForm.get('applyParameterContextRecursively')?.value) {
|
||||||
updateStrategy = 'ALL_DESCENDANTS';
|
updateStrategy = 'ALL_DESCENDANTS';
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,8 +70,8 @@ export class RelationshipSettings implements ControlValueAccessor {
|
||||||
maxBackoffPeriod!: string;
|
maxBackoffPeriod!: string;
|
||||||
retryCount!: number;
|
retryCount!: number;
|
||||||
|
|
||||||
isDisabled: boolean = false;
|
isDisabled = false;
|
||||||
isTouched: boolean = false;
|
isTouched = false;
|
||||||
onTouched!: () => void;
|
onTouched!: () => void;
|
||||||
onChange!: (relationshipConfiguration: RelationshipConfiguration) => void;
|
onChange!: (relationshipConfiguration: RelationshipConfiguration) => void;
|
||||||
|
|
||||||
|
|
|
@ -37,13 +37,11 @@ export class RunDurationSlider implements ControlValueAccessor {
|
||||||
runDurationValues: number[] = [0, 25, 50, 100, 250, 500, 1000, 2000];
|
runDurationValues: number[] = [0, 25, 50, 100, 250, 500, 1000, 2000];
|
||||||
runDurationIndex!: number;
|
runDurationIndex!: number;
|
||||||
|
|
||||||
isDisabled: boolean = false;
|
isDisabled = false;
|
||||||
isTouched: boolean = false;
|
isTouched = false;
|
||||||
onTouched!: () => void;
|
onTouched!: () => void;
|
||||||
onChange!: (runDuration: number) => void;
|
onChange!: (runDuration: number) => void;
|
||||||
|
|
||||||
constructor() {}
|
|
||||||
|
|
||||||
registerOnChange(onChange: (runDuration: number) => void): void {
|
registerOnChange(onChange: (runDuration: number) => void): void {
|
||||||
this.onChange = onChange;
|
this.onChange = onChange;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ export class Breadcrumbs {
|
||||||
@Input() entity: BreadcrumbEntity = initialState.flow.processGroupFlow.breadcrumb;
|
@Input() entity: BreadcrumbEntity = initialState.flow.processGroupFlow.breadcrumb;
|
||||||
@Input() currentProcessGroupId: string = initialState.id;
|
@Input() currentProcessGroupId: string = initialState.id;
|
||||||
|
|
||||||
private scrolledToProcessGroupId: string = '';
|
private scrolledToProcessGroupId = '';
|
||||||
|
|
||||||
@ViewChild('currentProcessGroup') set currentProcessGroupBreadcrumb(currentProcessGroupBreadcrumb: ElementRef) {
|
@ViewChild('currentProcessGroup') set currentProcessGroupBreadcrumb(currentProcessGroupBreadcrumb: ElementRef) {
|
||||||
// only auto scroll to the breadcrumb for the current pg once as the user may have manually scrolled since
|
// only auto scroll to the breadcrumb for the current pg once as the user may have manually scrolled since
|
||||||
|
|
|
@ -24,8 +24,8 @@ import { VersionControlInformation, VersionControlTipInput } from '../../../../s
|
||||||
styleUrls: ['./version-control-tip.component.scss']
|
styleUrls: ['./version-control-tip.component.scss']
|
||||||
})
|
})
|
||||||
export class VersionControlTip {
|
export class VersionControlTip {
|
||||||
@Input() left: number = 0;
|
@Input() left = 0;
|
||||||
@Input() top: number = 0;
|
@Input() top = 0;
|
||||||
@Input() data: VersionControlTipInput | undefined;
|
@Input() data: VersionControlTipInput | undefined;
|
||||||
|
|
||||||
getTrackingMessage(): string {
|
getTrackingMessage(): string {
|
||||||
|
|
|
@ -25,7 +25,7 @@ import { FlowState } from '../../../state/flow';
|
||||||
import { selectCurrentProcessGroupId } from '../../../state/flow/flow.selectors';
|
import { selectCurrentProcessGroupId } from '../../../state/flow/flow.selectors';
|
||||||
import { initialState } from '../../../state/flow/flow.reducer';
|
import { initialState } from '../../../state/flow/flow.reducer';
|
||||||
|
|
||||||
export const rootGroupGuard: CanActivateFn = (route, state) => {
|
export const rootGroupGuard: CanActivateFn = () => {
|
||||||
const router: Router = inject(Router);
|
const router: Router = inject(Router);
|
||||||
const flowService: FlowService = inject(FlowService);
|
const flowService: FlowService = inject(FlowService);
|
||||||
const store: Store<CurrentUserState> = inject(Store<FlowState>);
|
const store: Store<CurrentUserState> = inject(Store<FlowState>);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Client } from '../../../service/client.service';
|
import { Client } from '../../../service/client.service';
|
||||||
import { NiFiCommon } from '../../../service/nifi-common.service';
|
import { NiFiCommon } from '../../../service/nifi-common.service';
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AffectedComponentEntity,
|
|
||||||
ParameterContextReferenceEntity,
|
ParameterContextReferenceEntity,
|
||||||
ParameterContextUpdateRequestEntity,
|
ParameterContextUpdateRequestEntity,
|
||||||
ParameterEntity,
|
ParameterEntity,
|
||||||
|
|
|
@ -370,7 +370,7 @@ export class ParameterContextListingEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(ParameterContextListingActions.pollParameterContextUpdateRequest),
|
ofType(ParameterContextListingActions.pollParameterContextUpdateRequest),
|
||||||
concatLatestFrom(() => this.store.select(selectUpdateRequest)),
|
concatLatestFrom(() => this.store.select(selectUpdateRequest)),
|
||||||
switchMap(([action, updateRequest]) => {
|
switchMap(([, updateRequest]) => {
|
||||||
if (updateRequest) {
|
if (updateRequest) {
|
||||||
return from(this.parameterContextService.pollParameterContextUpdate(updateRequest.request)).pipe(
|
return from(this.parameterContextService.pollParameterContextUpdate(updateRequest.request)).pipe(
|
||||||
map((response) =>
|
map((response) =>
|
||||||
|
@ -413,7 +413,7 @@ export class ParameterContextListingEffects {
|
||||||
stopPollingParameterContextUpdateRequest$ = createEffect(() =>
|
stopPollingParameterContextUpdateRequest$ = createEffect(() =>
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(ParameterContextListingActions.stopPollingParameterContextUpdateRequest),
|
ofType(ParameterContextListingActions.stopPollingParameterContextUpdateRequest),
|
||||||
switchMap((response) => of(ParameterContextListingActions.deleteParameterContextUpdateRequest()))
|
switchMap(() => of(ParameterContextListingActions.deleteParameterContextUpdateRequest()))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -422,7 +422,7 @@ export class ParameterContextListingEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(ParameterContextListingActions.deleteParameterContextUpdateRequest),
|
ofType(ParameterContextListingActions.deleteParameterContextUpdateRequest),
|
||||||
concatLatestFrom(() => this.store.select(selectUpdateRequest)),
|
concatLatestFrom(() => this.store.select(selectUpdateRequest)),
|
||||||
tap(([action, updateRequest]) => {
|
tap(([, updateRequest]) => {
|
||||||
if (updateRequest) {
|
if (updateRequest) {
|
||||||
this.parameterContextService.deleteParameterContextUpdate(updateRequest.request).subscribe();
|
this.parameterContextService.deleteParameterContextUpdate(updateRequest.request).subscribe();
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ export const parameterContextListingReducer = createReducer(
|
||||||
error,
|
error,
|
||||||
status: 'error' as const
|
status: 'error' as const
|
||||||
})),
|
})),
|
||||||
on(createParameterContext, (state, { request }) => ({
|
on(createParameterContext, (state) => ({
|
||||||
...state,
|
...state,
|
||||||
saving: true
|
saving: true
|
||||||
})),
|
})),
|
||||||
|
@ -70,7 +70,7 @@ export const parameterContextListingReducer = createReducer(
|
||||||
draftState.saving = false;
|
draftState.saving = false;
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
on(submitParameterContextUpdateRequest, (state, { request }) => ({
|
on(submitParameterContextUpdateRequest, (state) => ({
|
||||||
...state,
|
...state,
|
||||||
saving: true
|
saving: true
|
||||||
})),
|
})),
|
||||||
|
@ -78,7 +78,7 @@ export const parameterContextListingReducer = createReducer(
|
||||||
...state,
|
...state,
|
||||||
updateRequestEntity: response.requestEntity
|
updateRequestEntity: response.requestEntity
|
||||||
})),
|
})),
|
||||||
on(editParameterContextComplete, (state, {}) => {
|
on(editParameterContextComplete, (state) => {
|
||||||
return produce(state, (draftState) => {
|
return produce(state, (draftState) => {
|
||||||
const updateRequestEntity: ParameterContextUpdateRequestEntity | null = draftState.updateRequestEntity;
|
const updateRequestEntity: ParameterContextUpdateRequestEntity | null = draftState.updateRequestEntity;
|
||||||
|
|
||||||
|
|
|
@ -76,8 +76,8 @@ export class ParameterContextInheritance implements ControlValueAccessor {
|
||||||
|
|
||||||
protected readonly TextTip = TextTip;
|
protected readonly TextTip = TextTip;
|
||||||
|
|
||||||
isDisabled: boolean = false;
|
isDisabled = false;
|
||||||
isTouched: boolean = false;
|
isTouched = false;
|
||||||
onTouched!: () => void;
|
onTouched!: () => void;
|
||||||
onChange!: (inheritedParameterContexts: ParameterContextReferenceEntity[]) => void;
|
onChange!: (inheritedParameterContexts: ParameterContextReferenceEntity[]) => void;
|
||||||
|
|
||||||
|
|
|
@ -76,8 +76,8 @@ export class ParameterTable implements AfterViewInit, ControlValueAccessor {
|
||||||
dataSource: MatTableDataSource<ParameterItem> = new MatTableDataSource<ParameterItem>();
|
dataSource: MatTableDataSource<ParameterItem> = new MatTableDataSource<ParameterItem>();
|
||||||
selectedItem: ParameterItem | null = null;
|
selectedItem: ParameterItem | null = null;
|
||||||
|
|
||||||
isDisabled: boolean = false;
|
isDisabled = false;
|
||||||
isTouched: boolean = false;
|
isTouched = false;
|
||||||
onTouched!: () => void;
|
onTouched!: () => void;
|
||||||
onChange!: (parameters: ParameterEntity[]) => void;
|
onChange!: (parameters: ParameterEntity[]) => void;
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ export class ParameterTable implements AfterViewInit, ControlValueAccessor {
|
||||||
}
|
}
|
||||||
|
|
||||||
initFilter(): void {
|
initFilter(): void {
|
||||||
this.dataSource.filterPredicate = (data: ParameterItem, filter: string) => this.isVisible(data);
|
this.dataSource.filterPredicate = (data: ParameterItem) => this.isVisible(data);
|
||||||
this.dataSource.filter = ' ';
|
this.dataSource.filter = ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,6 @@ export class ProcessGroupReferences {
|
||||||
authorizedProcessGroupReferences: BoundProcessGroup[] = [];
|
authorizedProcessGroupReferences: BoundProcessGroup[] = [];
|
||||||
unauthorizedProcessGroupReferences: BoundProcessGroup[] = [];
|
unauthorizedProcessGroupReferences: BoundProcessGroup[] = [];
|
||||||
|
|
||||||
constructor() {}
|
|
||||||
|
|
||||||
private getUnauthorized(references: BoundProcessGroup[] | undefined) {
|
private getUnauthorized(references: BoundProcessGroup[] | undefined) {
|
||||||
if (references) {
|
if (references) {
|
||||||
return references.filter((reference) => !reference.permissions.canRead);
|
return references.filter((reference) => !reference.permissions.canRead);
|
||||||
|
|
|
@ -22,8 +22,6 @@ import { provideMockStore } from '@ngrx/store/testing';
|
||||||
import { RouterModule } from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
import { initialState } from '../state/provenance-event-listing/provenance-event-listing.reducer';
|
import { initialState } from '../state/provenance-event-listing/provenance-event-listing.reducer';
|
||||||
import { Navigation } from '../../../ui/common/navigation/navigation.component';
|
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
describe('Provenance', () => {
|
describe('Provenance', () => {
|
||||||
|
|
|
@ -55,7 +55,7 @@ export class ProvenanceService {
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadContent(id: string, direction: string): void {
|
downloadContent(id: string, direction: string): void {
|
||||||
let dataUri: string = `${ProvenanceService.API}/provenance-events/${encodeURIComponent(
|
let dataUri = `${ProvenanceService.API}/provenance-events/${encodeURIComponent(
|
||||||
id
|
id
|
||||||
)}/content/${encodeURIComponent(direction)}`;
|
)}/content/${encodeURIComponent(direction)}`;
|
||||||
|
|
||||||
|
@ -73,9 +73,7 @@ export class ProvenanceService {
|
||||||
|
|
||||||
viewContent(nifiUrl: string, contentViewerUrl: string, id: string, direction: string): void {
|
viewContent(nifiUrl: string, contentViewerUrl: string, id: string, direction: string): void {
|
||||||
// build the uri to the data
|
// build the uri to the data
|
||||||
let dataUri: string = `${nifiUrl}provenance-events/${encodeURIComponent(id)}/content/${encodeURIComponent(
|
let dataUri = `${nifiUrl}provenance-events/${encodeURIComponent(id)}/content/${encodeURIComponent(direction)}`;
|
||||||
direction
|
|
||||||
)}`;
|
|
||||||
|
|
||||||
const dataUriParameters: any = {};
|
const dataUriParameters: any = {};
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ export class LineageEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(LineageActions.pollLineageQuery),
|
ofType(LineageActions.pollLineageQuery),
|
||||||
concatLatestFrom(() => [this.store.select(selectLineageId), this.store.select(selectClusterNodeId)]),
|
concatLatestFrom(() => [this.store.select(selectLineageId), this.store.select(selectClusterNodeId)]),
|
||||||
switchMap(([action, id, clusterNodeId]) => {
|
switchMap(([, id, clusterNodeId]) => {
|
||||||
if (id) {
|
if (id) {
|
||||||
return from(this.provenanceService.getLineageQuery(id, clusterNodeId)).pipe(
|
return from(this.provenanceService.getLineageQuery(id, clusterNodeId)).pipe(
|
||||||
map((response) =>
|
map((response) =>
|
||||||
|
@ -145,7 +145,7 @@ export class LineageEffects {
|
||||||
stopPollingLineageQuery$ = createEffect(() =>
|
stopPollingLineageQuery$ = createEffect(() =>
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(LineageActions.stopPollingLineageQuery),
|
ofType(LineageActions.stopPollingLineageQuery),
|
||||||
switchMap((response) => of(LineageActions.deleteLineageQuery()))
|
switchMap(() => of(LineageActions.deleteLineageQuery()))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ export class LineageEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(LineageActions.deleteLineageQuery),
|
ofType(LineageActions.deleteLineageQuery),
|
||||||
concatLatestFrom(() => [this.store.select(selectLineageId), this.store.select(selectClusterNodeId)]),
|
concatLatestFrom(() => [this.store.select(selectLineageId), this.store.select(selectClusterNodeId)]),
|
||||||
tap(([action, id, clusterNodeId]) => {
|
tap(([, id, clusterNodeId]) => {
|
||||||
if (id) {
|
if (id) {
|
||||||
this.provenanceService.deleteLineageQuery(id, clusterNodeId).subscribe();
|
this.provenanceService.deleteLineageQuery(id, clusterNodeId).subscribe();
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ export const initialState: LineageState = {
|
||||||
|
|
||||||
export const lineageReducer = createReducer(
|
export const lineageReducer = createReducer(
|
||||||
initialState,
|
initialState,
|
||||||
on(resetLineage, (state) => ({
|
on(resetLineage, () => ({
|
||||||
...initialState
|
...initialState
|
||||||
})),
|
})),
|
||||||
on(submitLineageQuery, (state) => ({
|
on(submitLineageQuery, (state) => ({
|
||||||
|
|
|
@ -51,7 +51,7 @@ export class ProvenanceEventListingEffects {
|
||||||
loadProvenanceOptions$ = createEffect(() =>
|
loadProvenanceOptions$ = createEffect(() =>
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(ProvenanceEventListingActions.loadProvenanceOptions),
|
ofType(ProvenanceEventListingActions.loadProvenanceOptions),
|
||||||
switchMap((request) =>
|
switchMap(() =>
|
||||||
from(this.provenanceService.getSearchOptions()).pipe(
|
from(this.provenanceService.getSearchOptions()).pipe(
|
||||||
map((response) =>
|
map((response) =>
|
||||||
ProvenanceEventListingActions.loadProvenanceOptionsSuccess({
|
ProvenanceEventListingActions.loadProvenanceOptionsSuccess({
|
||||||
|
@ -157,7 +157,7 @@ export class ProvenanceEventListingEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(ProvenanceEventListingActions.pollProvenanceQuery),
|
ofType(ProvenanceEventListingActions.pollProvenanceQuery),
|
||||||
concatLatestFrom(() => [this.store.select(selectProvenanceId), this.store.select(selectClusterNodeId)]),
|
concatLatestFrom(() => [this.store.select(selectProvenanceId), this.store.select(selectClusterNodeId)]),
|
||||||
switchMap(([action, id, clusterNodeId]) => {
|
switchMap(([, id, clusterNodeId]) => {
|
||||||
if (id) {
|
if (id) {
|
||||||
return from(this.provenanceService.getProvenanceQuery(id, clusterNodeId)).pipe(
|
return from(this.provenanceService.getProvenanceQuery(id, clusterNodeId)).pipe(
|
||||||
map((response) =>
|
map((response) =>
|
||||||
|
@ -201,7 +201,7 @@ export class ProvenanceEventListingEffects {
|
||||||
stopPollingProvenanceQuery$ = createEffect(() =>
|
stopPollingProvenanceQuery$ = createEffect(() =>
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(ProvenanceEventListingActions.stopPollingProvenanceQuery),
|
ofType(ProvenanceEventListingActions.stopPollingProvenanceQuery),
|
||||||
switchMap((response) => of(ProvenanceEventListingActions.deleteProvenanceQuery()))
|
switchMap(() => of(ProvenanceEventListingActions.deleteProvenanceQuery()))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ export class ProvenanceEventListingEffects {
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(ProvenanceEventListingActions.deleteProvenanceQuery),
|
ofType(ProvenanceEventListingActions.deleteProvenanceQuery),
|
||||||
concatLatestFrom(() => [this.store.select(selectProvenanceId), this.store.select(selectClusterNodeId)]),
|
concatLatestFrom(() => [this.store.select(selectProvenanceId), this.store.select(selectClusterNodeId)]),
|
||||||
tap(([action, id, clusterNodeId]) => {
|
tap(([, id, clusterNodeId]) => {
|
||||||
if (id) {
|
if (id) {
|
||||||
this.provenanceService.deleteProvenanceQuery(id, clusterNodeId).subscribe();
|
this.provenanceService.deleteProvenanceQuery(id, clusterNodeId).subscribe();
|
||||||
}
|
}
|
||||||
|
@ -229,7 +229,7 @@ export class ProvenanceEventListingEffects {
|
||||||
this.store.select(selectProvenanceRequest),
|
this.store.select(selectProvenanceRequest),
|
||||||
this.store.select(selectAbout)
|
this.store.select(selectAbout)
|
||||||
]),
|
]),
|
||||||
tap(([request, timeOffset, options, currentRequest, about]) => {
|
tap(([, timeOffset, options, currentRequest, about]) => {
|
||||||
if (about) {
|
if (about) {
|
||||||
const dialogReference = this.dialog.open(ProvenanceSearchDialog, {
|
const dialogReference = this.dialog.open(ProvenanceSearchDialog, {
|
||||||
data: {
|
data: {
|
||||||
|
@ -321,7 +321,7 @@ export class ProvenanceEventListingEffects {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
error: (error) => {
|
error: () => {
|
||||||
// TODO - handle error
|
// TODO - handle error
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -39,7 +39,7 @@ export const initialState: ProvenanceEventListingState = {
|
||||||
|
|
||||||
export const provenanceEventListingReducer = createReducer(
|
export const provenanceEventListingReducer = createReducer(
|
||||||
initialState,
|
initialState,
|
||||||
on(resetProvenanceState, (state) => ({
|
on(resetProvenanceState, () => ({
|
||||||
...initialState
|
...initialState
|
||||||
})),
|
})),
|
||||||
on(loadProvenanceOptionsSuccess, (state, { response }) => ({
|
on(loadProvenanceOptionsSuccess, (state, { response }) => ({
|
||||||
|
|
|
@ -44,7 +44,6 @@ import {
|
||||||
saveProvenanceRequest
|
saveProvenanceRequest
|
||||||
} from '../../state/provenance-event-listing/provenance-event-listing.actions';
|
} from '../../state/provenance-event-listing/provenance-event-listing.actions';
|
||||||
import { ProvenanceSearchDialog } from './provenance-search-dialog/provenance-search-dialog.component';
|
import { ProvenanceSearchDialog } from './provenance-search-dialog/provenance-search-dialog.component';
|
||||||
import { ProvenanceEventSummary } from '../../../../state/shared';
|
|
||||||
import { resetLineage, submitLineageQuery } from '../../state/lineage/lineage.actions';
|
import { resetLineage, submitLineageQuery } from '../../state/lineage/lineage.actions';
|
||||||
import { LineageRequest } from '../../state/lineage';
|
import { LineageRequest } from '../../state/lineage';
|
||||||
import { selectLineage } from '../../state/lineage/lineage.selectors';
|
import { selectLineage } from '../../state/lineage/lineage.selectors';
|
||||||
|
@ -61,7 +60,7 @@ export class ProvenanceEventListing implements OnDestroy {
|
||||||
lineage$ = this.store.select(selectLineage);
|
lineage$ = this.store.select(selectLineage);
|
||||||
|
|
||||||
request!: ProvenanceRequest;
|
request!: ProvenanceRequest;
|
||||||
stateReset: boolean = false;
|
stateReset = false;
|
||||||
|
|
||||||
constructor(private store: Store<ProvenanceEventListingState>) {
|
constructor(private store: Store<ProvenanceEventListingState>) {
|
||||||
this.store
|
this.store
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { LineageComponent } from './lineage.component';
|
import { LineageComponent } from './lineage.component';
|
||||||
import SpyObj = jasmine.SpyObj;
|
|
||||||
import createSpyObj = jasmine.createSpyObj;
|
|
||||||
|
|
||||||
describe('LineageComponent', () => {
|
describe('LineageComponent', () => {
|
||||||
let component: LineageComponent;
|
let component: LineageComponent;
|
||||||
|
|
|
@ -51,8 +51,8 @@ export class LineageComponent implements OnInit {
|
||||||
|
|
||||||
@Input() set eventTimestampThreshold(eventTimestampThreshold: number) {
|
@Input() set eventTimestampThreshold(eventTimestampThreshold: number) {
|
||||||
if (this.previousEventTimestampThreshold >= 0) {
|
if (this.previousEventTimestampThreshold >= 0) {
|
||||||
let nodes: any = this.lineageContainerElement.selectAll('g.node.rendered');
|
const nodes: any = this.lineageContainerElement.selectAll('g.node.rendered');
|
||||||
let links: any = this.lineageContainerElement.selectAll('path.link.rendered');
|
const links: any = this.lineageContainerElement.selectAll('path.link.rendered');
|
||||||
|
|
||||||
if (this.previousEventTimestampThreshold > eventTimestampThreshold) {
|
if (this.previousEventTimestampThreshold > eventTimestampThreshold) {
|
||||||
// the threshold is descending
|
// the threshold is descending
|
||||||
|
@ -123,7 +123,7 @@ export class LineageComponent implements OnInit {
|
||||||
},
|
},
|
||||||
clazz: 'fa fa-long-arrow-left',
|
clazz: 'fa fa-long-arrow-left',
|
||||||
text: 'Back to events',
|
text: 'Back to events',
|
||||||
action: (selection: any) => {
|
action: () => {
|
||||||
this.closeLineage.next();
|
this.closeLineage.next();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -226,7 +226,7 @@ export class LineageComponent implements OnInit {
|
||||||
|
|
||||||
private nodeLookup: Map<string, any> = new Map<string, any>();
|
private nodeLookup: Map<string, any> = new Map<string, any>();
|
||||||
private linkLookup: Map<string, any> = new Map<string, any>();
|
private linkLookup: Map<string, any> = new Map<string, any>();
|
||||||
private previousEventTimestampThreshold: number = -1;
|
private previousEventTimestampThreshold = -1;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.allMenus = new Map<string, ContextMenuDefinition>();
|
this.allMenus = new Map<string, ContextMenuDefinition>();
|
||||||
|
@ -247,7 +247,7 @@ export class LineageComponent implements OnInit {
|
||||||
// include if there is no condition (non conditional item, separator, sub menu, etc)
|
// include if there is no condition (non conditional item, separator, sub menu, etc)
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
menuItemClicked(menuItem: ContextMenuItemDefinition, event: MouseEvent) {
|
menuItemClicked(menuItem: ContextMenuItemDefinition) {
|
||||||
if (menuItem.action) {
|
if (menuItem.action) {
|
||||||
const selection: any = d3.select('circle.context');
|
const selection: any = d3.select('circle.context');
|
||||||
return menuItem.action(selection);
|
return menuItem.action(selection);
|
||||||
|
@ -257,7 +257,6 @@ export class LineageComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
const self: LineageComponent = this;
|
|
||||||
this.lineageElement = document.getElementById('lineage');
|
this.lineageElement = document.getElementById('lineage');
|
||||||
|
|
||||||
// handle zoom behavior
|
// handle zoom behavior
|
||||||
|
@ -283,9 +282,9 @@ export class LineageComponent implements OnInit {
|
||||||
.attr('class', 'lineage')
|
.attr('class', 'lineage')
|
||||||
.attr('width', '100%')
|
.attr('width', '100%')
|
||||||
.attr('height', '100%')
|
.attr('height', '100%')
|
||||||
.on('mousedown', function (event, d) {
|
.on('mousedown', (event) => {
|
||||||
// hide the context menu if necessary
|
// hide the context menu if necessary
|
||||||
self.clearSelectionContext();
|
this.clearSelectionContext();
|
||||||
|
|
||||||
// prevents browser from using text cursor
|
// prevents browser from using text cursor
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
@ -385,7 +384,7 @@ export class LineageComponent implements OnInit {
|
||||||
let immediate: string[] = Array.from(immediateSet.values());
|
let immediate: string[] = Array.from(immediateSet.values());
|
||||||
|
|
||||||
// attempt to identify fan in/out cases
|
// attempt to identify fan in/out cases
|
||||||
let nodesWithTwoParents: number = 0;
|
let nodesWithTwoParents = 0;
|
||||||
immediate.forEach((nodeId) => {
|
immediate.forEach((nodeId) => {
|
||||||
const node: any = this.nodeLookup.get(nodeId);
|
const node: any = this.nodeLookup.get(nodeId);
|
||||||
|
|
||||||
|
@ -552,7 +551,7 @@ export class LineageComponent implements OnInit {
|
||||||
});
|
});
|
||||||
|
|
||||||
// mark each nodes index so subsequent recursive calls can position children accordingly
|
// mark each nodes index so subsequent recursive calls can position children accordingly
|
||||||
let nodesWithTwoChildren: number = 0;
|
let nodesWithTwoChildren = 0;
|
||||||
immediate.forEach((nodeId: string, i: number) => {
|
immediate.forEach((nodeId: string, i: number) => {
|
||||||
const node: any = this.nodeLookup.get(nodeId);
|
const node: any = this.nodeLookup.get(nodeId);
|
||||||
node.index = i;
|
node.index = i;
|
||||||
|
@ -593,7 +592,7 @@ export class LineageComponent implements OnInit {
|
||||||
|
|
||||||
// add the new links
|
// add the new links
|
||||||
links.forEach((link) => {
|
links.forEach((link) => {
|
||||||
const linkId: string = `${link.sourceId}-${link.targetId}`;
|
const linkId = `${link.sourceId}-${link.targetId}`;
|
||||||
|
|
||||||
// create the link object
|
// create the link object
|
||||||
this.linkLookup.set(linkId, {
|
this.linkLookup.set(linkId, {
|
||||||
|
@ -614,13 +613,13 @@ export class LineageComponent implements OnInit {
|
||||||
const startNodes: Set<string> = new Set(this.nodeLookup.keys());
|
const startNodes: Set<string> = new Set(this.nodeLookup.keys());
|
||||||
|
|
||||||
// go through the nodes to reset their outgoing links
|
// go through the nodes to reset their outgoing links
|
||||||
this.nodeLookup.forEach(function (node, id) {
|
this.nodeLookup.forEach((node) => {
|
||||||
node.outgoing = [];
|
node.outgoing = [];
|
||||||
node.incoming = [];
|
node.incoming = [];
|
||||||
});
|
});
|
||||||
|
|
||||||
// go through the links in order to compute the new layout
|
// go through the links in order to compute the new layout
|
||||||
this.linkLookup.forEach(function (link, id) {
|
this.linkLookup.forEach((link) => {
|
||||||
// updating the nodes connections
|
// updating the nodes connections
|
||||||
link.source.outgoing.push(link);
|
link.source.outgoing.push(link);
|
||||||
link.target.incoming.push(link);
|
link.target.incoming.push(link);
|
||||||
|
@ -713,10 +712,8 @@ export class LineageComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
private renderFlowFile(flowfiles: any): void {
|
private renderFlowFile(flowfiles: any): void {
|
||||||
const self: LineageComponent = this;
|
flowfiles.classed('flowfile', true).on('mousedown', (event: MouseEvent) => {
|
||||||
|
this.clearSelectionContext();
|
||||||
flowfiles.classed('flowfile', true).on('mousedown', function (event: MouseEvent, d: any) {
|
|
||||||
self.clearSelectionContext();
|
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -726,25 +723,25 @@ export class LineageComponent implements OnInit {
|
||||||
.attr('class', 'flowfile-link')
|
.attr('class', 'flowfile-link')
|
||||||
.attr('r', 16)
|
.attr('r', 16)
|
||||||
.attr('stroke-width', 1.0)
|
.attr('stroke-width', 1.0)
|
||||||
.on('mouseover', function (event: MouseEvent, d: any) {
|
.on('mouseover', (event: MouseEvent, d: any) => {
|
||||||
self.lineageContainerElement
|
this.lineageContainerElement
|
||||||
.selectAll('path.link')
|
.selectAll('path.link')
|
||||||
.filter(function (linkDatum: any) {
|
.filter((linkDatum: any) => {
|
||||||
return d.id === linkDatum.flowFileUuid;
|
return d.id === linkDatum.flowFileUuid;
|
||||||
})
|
})
|
||||||
.classed('selected', true)
|
.classed('selected', true)
|
||||||
.attr('marker-end', function (d: any) {
|
.attr('marker-end', (d: any) => {
|
||||||
return `url(#${d.target.type}-SELECTED)`;
|
return `url(#${d.target.type}-SELECTED)`;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.on('mouseout', function (event: MouseEvent, d: any) {
|
.on('mouseout', (event: MouseEvent, d: any) => {
|
||||||
self.lineageContainerElement
|
this.lineageContainerElement
|
||||||
.selectAll('path.link')
|
.selectAll('path.link')
|
||||||
.filter(function (linkDatum: any) {
|
.filter((linkDatum: any) => {
|
||||||
return d.id === linkDatum.flowFileUuid;
|
return d.id === linkDatum.flowFileUuid;
|
||||||
})
|
})
|
||||||
.classed('selected', false)
|
.classed('selected', false)
|
||||||
.attr('marker-end', function (d: any) {
|
.attr('marker-end', (d: any) => {
|
||||||
return `url(#${d.target.type})`;
|
return `url(#${d.target.type})`;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -761,25 +758,25 @@ export class LineageComponent implements OnInit {
|
||||||
.attr('transform', function () {
|
.attr('transform', function () {
|
||||||
return 'translate(0,15)';
|
return 'translate(0,15)';
|
||||||
})
|
})
|
||||||
.on('mouseover', function (event: MouseEvent, d: any) {
|
.on('mouseover', (event: MouseEvent, d: any) => {
|
||||||
self.lineageContainerElement
|
this.lineageContainerElement
|
||||||
.selectAll('path.link')
|
.selectAll('path.link')
|
||||||
.filter(function (linkDatum: any) {
|
.filter((linkDatum: any) => {
|
||||||
return d.id === linkDatum.flowFileUuid;
|
return d.id === linkDatum.flowFileUuid;
|
||||||
})
|
})
|
||||||
.classed('selected', true)
|
.classed('selected', true)
|
||||||
.attr('marker-end', function (d: any) {
|
.attr('marker-end', (d: any) => {
|
||||||
return `url(#${d.target.type}-SELECTED)`;
|
return `url(#${d.target.type}-SELECTED)`;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.on('mouseout', function (event: MouseEvent, d: any) {
|
.on('mouseout', (event: MouseEvent, d: any) => {
|
||||||
self.lineageContainerElement
|
this.lineageContainerElement
|
||||||
.selectAll('path.link')
|
.selectAll('path.link')
|
||||||
.filter(function (linkDatum: any) {
|
.filter((linkDatum: any) => {
|
||||||
return d.id === linkDatum.flowFileUuid;
|
return d.id === linkDatum.flowFileUuid;
|
||||||
})
|
})
|
||||||
.classed('selected', false)
|
.classed('selected', false)
|
||||||
.attr('marker-end', function (d: any) {
|
.attr('marker-end', (d: any) => {
|
||||||
return `url(#${d.target.type})`;
|
return `url(#${d.target.type})`;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
@ -789,18 +786,16 @@ export class LineageComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
private renderEvent(events: any): void {
|
private renderEvent(events: any): void {
|
||||||
const self: LineageComponent = this;
|
|
||||||
|
|
||||||
events
|
events
|
||||||
.on('mousedown', function (event: MouseEvent, d: any) {
|
.on('mousedown', (event: MouseEvent, d: any) => {
|
||||||
self.clearSelectionContext();
|
this.clearSelectionContext();
|
||||||
d3.select(`#event-node-${d.id}`).classed('context', true);
|
d3.select(`#event-node-${d.id}`).classed('context', true);
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
})
|
})
|
||||||
.on('dblclick', function (event: MouseEvent, d: any) {
|
.on('dblclick', (event: MouseEvent, d: any) => {
|
||||||
// show the event details
|
// show the event details
|
||||||
// TODO - cluster node id
|
// TODO - cluster node id
|
||||||
self.openEventDialog.next({
|
this.openEventDialog.next({
|
||||||
id: d.id
|
id: d.id
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -821,8 +816,8 @@ export class LineageComponent implements OnInit {
|
||||||
events
|
events
|
||||||
.append('circle')
|
.append('circle')
|
||||||
.attr('class', 'event-circle')
|
.attr('class', 'event-circle')
|
||||||
.classed('selected', function (d: any) {
|
.classed('selected', (d: any) => {
|
||||||
return d.id === self.eventId;
|
return d.id === this.eventId;
|
||||||
})
|
})
|
||||||
.attr('r', 8)
|
.attr('r', 8)
|
||||||
.attr('stroke-width', 1.0)
|
.attr('stroke-width', 1.0)
|
||||||
|
@ -941,7 +936,7 @@ export class LineageComponent implements OnInit {
|
||||||
.remove();
|
.remove();
|
||||||
|
|
||||||
// select the links
|
// select the links
|
||||||
let linkSelection: any = this.lineageContainerElement
|
const linkSelection: any = this.lineageContainerElement
|
||||||
.selectAll('path.link')
|
.selectAll('path.link')
|
||||||
.data(this.linkLookup.values(), function (d: any) {
|
.data(this.linkLookup.values(), function (d: any) {
|
||||||
return d.id;
|
return d.id;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { AfterViewInit, Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
import { AfterViewInit, Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
||||||
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
||||||
import { MatSortModule, Sort } from '@angular/material/sort';
|
import { MatSortModule, Sort } from '@angular/material/sort';
|
||||||
import { TextTip } from '../../../../../ui/common/tooltips/text-tip/text-tip.component';
|
import { TextTip } from '../../../../../ui/common/tooltips/text-tip/text-tip.component';
|
||||||
|
@ -89,17 +89,19 @@ export class ProvenanceEventTable implements AfterViewInit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Input() oldestEventAvailable!: string;
|
@Input() oldestEventAvailable!: string;
|
||||||
@Input() timeOffset!: number;
|
@Input() timeOffset!: number;
|
||||||
@Input() resultsMessage!: string;
|
@Input() resultsMessage!: string;
|
||||||
@Input() hasRequest!: boolean;
|
@Input() hasRequest!: boolean;
|
||||||
@Input() loading!: boolean;
|
@Input() loading!: boolean;
|
||||||
@Input() loadedTimestamp!: string;
|
@Input() loadedTimestamp!: string;
|
||||||
|
|
||||||
@Input() set lineage$(lineage$: Observable<Lineage | null>) {
|
@Input() set lineage$(lineage$: Observable<Lineage | null>) {
|
||||||
this.provenanceLineage$ = lineage$.pipe(
|
this.provenanceLineage$ = lineage$.pipe(
|
||||||
tap((lineage) => {
|
tap((lineage) => {
|
||||||
let minMillis: number = -1;
|
let minMillis = -1;
|
||||||
let maxMillis: number = -1;
|
let maxMillis = -1;
|
||||||
|
|
||||||
lineage?.results.nodes.forEach((node) => {
|
lineage?.results.nodes.forEach((node) => {
|
||||||
// ensure this event has an event time
|
// ensure this event has an event time
|
||||||
|
@ -121,7 +123,7 @@ export class ProvenanceEventTable implements AfterViewInit {
|
||||||
// determine the range for the slider
|
// determine the range for the slider
|
||||||
let range: number = this.maxEventTimestamp - this.minEventTimestamp;
|
let range: number = this.maxEventTimestamp - this.minEventTimestamp;
|
||||||
|
|
||||||
const binCount: number = 10;
|
const binCount = 10;
|
||||||
const remainder: number = range % binCount;
|
const remainder: number = range % binCount;
|
||||||
if (remainder > 0) {
|
if (remainder > 0) {
|
||||||
// if the range doesn't fall evenly into binCount, increase the
|
// if the range doesn't fall evenly into binCount, increase the
|
||||||
|
@ -174,19 +176,19 @@ export class ProvenanceEventTable implements AfterViewInit {
|
||||||
|
|
||||||
filterForm: FormGroup;
|
filterForm: FormGroup;
|
||||||
filterColumnOptions: string[] = ['component name', 'component type', 'type'];
|
filterColumnOptions: string[] = ['component name', 'component type', 'type'];
|
||||||
totalCount: number = 0;
|
totalCount = 0;
|
||||||
filteredCount: number = 0;
|
filteredCount = 0;
|
||||||
filterApplied: boolean = false;
|
filterApplied = false;
|
||||||
|
|
||||||
showLineage: boolean = false;
|
showLineage = false;
|
||||||
provenanceLineage$!: Observable<Lineage | null>;
|
provenanceLineage$!: Observable<Lineage | null>;
|
||||||
eventId: string | null = null;
|
eventId: string | null = null;
|
||||||
|
|
||||||
minEventTimestamp: number = -1;
|
minEventTimestamp = -1;
|
||||||
maxEventTimestamp: number = -1;
|
maxEventTimestamp = -1;
|
||||||
eventTimestampStep: number = 1;
|
eventTimestampStep = 1;
|
||||||
initialEventTimestampThreshold: number = 0;
|
initialEventTimestampThreshold = 0;
|
||||||
currentEventTimestampThreshold: number = 0;
|
currentEventTimestampThreshold = 0;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private formBuilder: FormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
|
@ -223,7 +225,7 @@ export class ProvenanceEventTable implements AfterViewInit {
|
||||||
return data.sort((a, b) => {
|
return data.sort((a, b) => {
|
||||||
const isAsc = sort.direction === 'asc';
|
const isAsc = sort.direction === 'asc';
|
||||||
|
|
||||||
let retVal: number = 0;
|
let retVal = 0;
|
||||||
switch (sort.active) {
|
switch (sort.active) {
|
||||||
case 'eventTime':
|
case 'eventTime':
|
||||||
// event ideas are increasing, so we can use this simple number for sorting purposes
|
// event ideas are increasing, so we can use this simple number for sorting purposes
|
||||||
|
|
|
@ -69,8 +69,8 @@ export class ProvenanceSearchDialog {
|
||||||
let startTime: string = ProvenanceSearchDialog.DEFAULT_START_TIME;
|
let startTime: string = ProvenanceSearchDialog.DEFAULT_START_TIME;
|
||||||
let endDate: Date = now;
|
let endDate: Date = now;
|
||||||
let endTime: string = ProvenanceSearchDialog.DEFAULT_END_TIME;
|
let endTime: string = ProvenanceSearchDialog.DEFAULT_END_TIME;
|
||||||
let minFileSize: string = '';
|
let minFileSize = '';
|
||||||
let maxFileSize: string = '';
|
let maxFileSize = '';
|
||||||
|
|
||||||
if (request.currentRequest) {
|
if (request.currentRequest) {
|
||||||
const requestedStartDate = request.currentRequest.startDate;
|
const requestedStartDate = request.currentRequest.startDate;
|
||||||
|
@ -117,8 +117,8 @@ export class ProvenanceSearchDialog {
|
||||||
|
|
||||||
const searchableFields: SearchableField[] = request.options.searchableFields;
|
const searchableFields: SearchableField[] = request.options.searchableFields;
|
||||||
searchableFields.forEach((searchableField) => {
|
searchableFields.forEach((searchableField) => {
|
||||||
let value: string = '';
|
let value = '';
|
||||||
let inverse: boolean = false;
|
let inverse = false;
|
||||||
if (searchTerms && searchTerms[searchableField.id]) {
|
if (searchTerms && searchTerms[searchableField.id]) {
|
||||||
value = searchTerms[searchableField.id].value;
|
value = searchTerms[searchableField.id].value;
|
||||||
inverse = searchTerms[searchableField.id].inverse;
|
inverse = searchTerms[searchableField.id].inverse;
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
import { Queue } from './queue.component';
|
import { Queue } from './queue.component';
|
||||||
import { QueueListingRoutingModule } from '../ui/queue-listing/queue-listing-routing.module';
|
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -54,7 +54,7 @@ export class QueueService {
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadContent(flowfileSummary: FlowFileSummary): void {
|
downloadContent(flowfileSummary: FlowFileSummary): void {
|
||||||
let dataUri: string = `${this.nifiCommon.stripProtocol(flowfileSummary.uri)}/content`;
|
let dataUri = `${this.nifiCommon.stripProtocol(flowfileSummary.uri)}/content`;
|
||||||
|
|
||||||
const queryParameters: any = {};
|
const queryParameters: any = {};
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ export class QueueService {
|
||||||
|
|
||||||
viewContent(flowfileSummary: FlowFileSummary, contentViewerUrl: string): void {
|
viewContent(flowfileSummary: FlowFileSummary, contentViewerUrl: string): void {
|
||||||
// build the uri to the data
|
// build the uri to the data
|
||||||
let dataUri: string = `${this.nifiCommon.stripProtocol(flowfileSummary.uri)}/content`;
|
let dataUri = `${this.nifiCommon.stripProtocol(flowfileSummary.uri)}/content`;
|
||||||
|
|
||||||
const dataUriParameters: any = {};
|
const dataUriParameters: any = {};
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue