Skip to content

Commit 9b4456c

Browse files
committed
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
Fixed PR comments.
1 parent 23e16d6 commit 9b4456c

File tree

31 files changed

+55
-77
lines changed

31 files changed

+55
-77
lines changed

flink-cyber/flink-cyber-api/src/main/java/com/cloudera/cyber/indexing/MappingColumnDto.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import lombok.AllArgsConstructor;
55
import lombok.Data;
66
import lombok.NoArgsConstructor;
7+
import org.apache.commons.lang3.StringUtils;
78

89
@Data
910
@NoArgsConstructor
@@ -42,7 +43,7 @@ public String getRawKafkaName(){
4243
}
4344

4445
public String getPath() {
45-
if (path == null || path.isEmpty()) {
46+
if (StringUtils.isEmpty(path)) {
4647
return "extensions";
4748
} else if (path.equals(".")) {
4849
return "";

flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client/.eslintrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"plugin:@angular-eslint/template/process-inline-templates"
5555
],
5656
"rules": {
57+
"no-unused-vars": "off",
5758
"jsdoc/check-alignment": "off",
5859
"jsdoc/check-param-names": "off",
5960
"@typescript-eslint/adjacent-overload-signatures": "off",
@@ -66,6 +67,15 @@
6667
"simple-import-sort/imports": "off",
6768
"array-bracket-spacing": "off",
6869
"no-underscore-dangle": "off",
70+
"@typescript-eslint/no-unused-vars": [
71+
"warn",
72+
{
73+
"vars": "all",
74+
"varsIgnorePattern": "^_",
75+
"args": "after-used",
76+
"argsIgnorePattern": "^_"
77+
}
78+
],
6979
"@typescript-eslint/naming-convention": [
7080
"error",
7181
{

flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client/src/app/chain-list-page/chain-list-page.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import {
3131
} from './chain-list-page.reducers';
3232
import {ChainModel, ChainOperationalModel} from './chain.model';
3333
import {NzMessageService} from "ng-zorro-antd/message";
34-
import {c} from "msw/lib/glossary-de6278a9";
3534

3635
@Component({
3736
selector: 'app-chain-list-page',

flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client/src/app/chain-list-page/chain-list-page.effects.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export class ChainListEffects {
112112

113113
loadPipelines$: Observable<Action> = createEffect(() => this._actions$.pipe(
114114
ofType(fromActions.LOAD_PIPELINES),
115-
switchMap((action: fromActions.LoadPipelinesAction) => {
115+
switchMap(_ => {
116116
return this._pipelineService.getPipelines()
117117
.pipe(
118118
map((pipelines: string[]) => {
@@ -163,7 +163,7 @@ export class ChainListEffects {
163163
deleteSelectedPipeline$: Observable<Action> = createEffect(() => this._actions$.pipe(
164164
ofType(fromActions.DELETE_SELECTED_PIPELINE),
165165
withLatestFrom(this._store$.select(getSelectedPipeline)),
166-
switchMap(([action, selectedPipeline]) => {
166+
switchMap(([_,selectedPipeline]) => {
167167
return this._pipelineService.deletePipeline(selectedPipeline)
168168
.pipe(
169169
map((pipelines: string[]) => {
@@ -186,7 +186,7 @@ export class ChainListEffects {
186186

187187
pipelineChanged$: Observable<Action> = createEffect(() => this._actions$.pipe(
188188
ofType(fromActions.PIPELINE_CHANGED),
189-
switchMap((action: fromActions.PipelineChangedAction) => {
189+
switchMap(_ => {
190190
return of(new fromActions.LoadChainsAction())
191191
})
192192
));

flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client/src/app/chain-page/chain-page.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export class ChainPageComponent implements OnInit, OnDestroy, DeactivatePrevente
140140
}
141141

142142
onChainLevelChange(chainId: string) {
143-
this._store.pipe(select(getChain({ id: chainId }))).pipe(take(1)).subscribe((chain: ParserChainModel) => {
143+
this._store.pipe(select(getChain({ id: chainId }))).pipe(take(1)).subscribe(_ => {
144144
this._store.dispatch(
145145
new fromActions.AddToPathAction({ chainId })
146146
);

flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client/src/app/chain-page/chain-page.effects.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export class ChainPageEffects {
9090

9191
getFormConfigs$: Observable<Action> = createEffect(() => this._actions$.pipe(
9292
ofType(fromActions.GET_FORM_CONFIGS),
93-
switchMap((action: fromActions.GetFormConfigsAction) => {
93+
switchMap(_ => {
9494
return this._chainPageService.getFormConfigs().pipe(
9595
map((formConfigs: { [key: string]: ParserDescriptor }) => {
9696
return new fromActions.GetFormConfigsSuccessAction({

flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client/src/app/chain-page/chain-page.module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ import {IndexingFormComponent} from './components/indexing-form/indexing-form.co
5151
import {NzLayoutModule} from "ng-zorro-antd/layout";
5252
import {NzAutocompleteModule} from "ng-zorro-antd/auto-complete";
5353
import {NzCheckboxModule} from "ng-zorro-antd/checkbox";
54-
import {MatDialogModule} from "@angular/material/dialog";
5554
import {MonacoEditorModule} from "ngx-monaco-editor-v2";
5655

5756
@NgModule({

flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client/src/app/chain-page/components/live-view/live-view.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export class LiveViewComponent implements OnInit, AfterViewInit, OnDestroy {
9696
this.isLiveViewOn$,
9797
]).pipe(
9898
debounceTime(LiveViewConsts.LIVE_VIEW_DEBOUNCE_RATE),
99-
filter(([ sampleData, chainConfig, isLiveViewOn ]) => isLiveViewOn && !!sampleData.source),
99+
filter(([ sampleData, isLiveViewOn ]) => isLiveViewOn && !!sampleData.source),
100100
takeUntil(this._unsubscribe$)
101101
).subscribe(([ sampleData, chainConfig ]) => {
102102
this._store.dispatch(executionTriggered({ sampleData, chainConfig }));
@@ -119,7 +119,7 @@ export class LiveViewComponent implements OnInit, AfterViewInit, OnDestroy {
119119
this.sampleDataForceChange$,
120120
this.chainConfig$]).pipe(
121121
takeUntil(this._unsubscribe$),
122-
filter((sampleData, chainConfig) => sampleData !== null),
122+
filter((sampleData) => sampleData !== null),
123123
).subscribe(([sampleData, chainConfig]) => {
124124
this._store.dispatch(ExecutionListTriggeredAction({ sampleData, chainConfig }));
125125
});

flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client/src/app/chain-page/components/live-view/sample-data-form/sample-data-form.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@
1010
* limitations governing your use of the file.
1111
*/
1212

13-
import { Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core';
14-
import { NzMessageService } from 'ng-zorro-antd/message';
13+
import {Component, EventEmitter, Input, Output} from '@angular/core';
1514

1615
import {SampleDataInternalModel, SampleDataModel} from '../models/sample-data.model';
17-
import {EntryParsingResultModel} from "../models/live-view.model";
1816

1917
@Component({
2018
selector: 'app-sample-data-form',

flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client/src/app/chain-page/components/live-view/sample-data-form/sample-data-text-folder-input/sample-data-text-folder-input.effects.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@
1010
* limitations governing your use of the file.
1111
*/
1212

13-
import { Injectable } from '@angular/core';
13+
import {Injectable} from '@angular/core';
1414
import {Actions, createEffect, ofType} from '@ngrx/effects';
15-
import { Action } from '@ngrx/store';
16-
import { NzMessageService } from 'ng-zorro-antd/message';
17-
import { Observable, of } from 'rxjs';
18-
import { catchError, map, switchMap, tap } from 'rxjs/operators';
15+
import {Action} from '@ngrx/store';
16+
import {NzMessageService} from 'ng-zorro-antd/message';
17+
import {Observable, of} from 'rxjs';
18+
import {catchError, map, switchMap} from 'rxjs/operators';
1919
import {
2020
ExecutionListFailedAction,
2121
ExecutionListSuccessfulAction,
2222
ExecutionListTriggeredAction,
2323
FetchSampleListFailedAction,
2424
FetchSampleListSuccessfulAction,
2525
FetchSampleListTriggeredAction,
26-
SampleFolderActionsType, SampleFolderPathRestoredAction,
26+
SampleFolderActionsType,
27+
SampleFolderPathRestoredAction,
2728
SampleFolderViewInitializedAction,
2829
SaveSampleListFailedAction,
2930
SaveSampleListSuccessfulAction,

0 commit comments

Comments
 (0)