diff --git a/apps/red-ui/src/app/app-config/app-config.service.ts b/apps/red-ui/src/app/app-config/app-config.service.ts index c81269b6d..db28a6231 100644 --- a/apps/red-ui/src/app/app-config/app-config.service.ts +++ b/apps/red-ui/src/app/app-config/app-config.service.ts @@ -24,7 +24,7 @@ export class AppConfigService { loadAppConfig(): Observable { return this._httpClient.get('/assets/config/config.json').pipe( tap((config) => { - console.log('got', config); + console.log('[REDACTION] Started with config: ', config); this._config = config; }) ); diff --git a/apps/red-ui/src/app/auth/red-role.guard.ts b/apps/red-ui/src/app/auth/red-role.guard.ts index 743bcc76d..fb0e196ff 100644 --- a/apps/red-ui/src/app/auth/red-role.guard.ts +++ b/apps/red-ui/src/app/auth/red-role.guard.ts @@ -30,7 +30,6 @@ export class RedRoleGuard implements CanActivate { obs.next(true); obs.complete(); } else { - console.log('this case'); this._router.navigate(['/ui/projects']); obs.next(false); obs.complete(); diff --git a/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.ts b/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.ts index 72ec1bedd..3a524d9dc 100644 --- a/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.ts +++ b/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.ts @@ -9,6 +9,7 @@ import { forkJoin } from 'rxjs'; import { PermissionsService } from '../../../common/service/permissions.service'; import { FormBuilder, FormGroup } from '@angular/forms'; import { debounce } from '../../../utils/debounce'; +import { UserPreferenceService } from '../../../common/service/user-preference.service'; @Component({ selector: 'redaction-dictionary-listing-screen', @@ -26,6 +27,7 @@ export class DictionaryListingScreenComponent implements OnInit { private readonly _dialogService: DialogService, private readonly _sortingService: SortingService, private readonly _formBuilder: FormBuilder, + private readonly _userPreferenceService: UserPreferenceService, private readonly _dictionaryControllerService: DictionaryControllerService, private readonly _appStateService: AppStateService, public readonly permissionsService: PermissionsService @@ -52,7 +54,7 @@ export class DictionaryListingScreenComponent implements OnInit { const appStateDictionaryData = this._appStateService.dictionaryData; this.dictionaries = Object.keys(appStateDictionaryData) .map((key) => appStateDictionaryData[key]) - .filter((d) => !d.virtual); + .filter((d) => !d.virtual || (this._userPreferenceService.areDevFeaturesEnabled && d.type === 'false_positive')); this.displayedDictionaries = [...this.dictionaries]; const dataObs = []; this.dictionaries.forEach((item) => { diff --git a/apps/red-ui/src/app/screens/admin/dictionary-overview-screen/dictionary-overview-screen.component.ts b/apps/red-ui/src/app/screens/admin/dictionary-overview-screen/dictionary-overview-screen.component.ts index 540f797bf..5fb3163f9 100644 --- a/apps/red-ui/src/app/screens/admin/dictionary-overview-screen/dictionary-overview-screen.component.ts +++ b/apps/red-ui/src/app/screens/admin/dictionary-overview-screen/dictionary-overview-screen.component.ts @@ -207,7 +207,6 @@ export class DictionaryOverviewScreenComponent { } ); } else { - console.log(invalidRowsExist); this._notificationService.showToastNotification( this._translateService.instant('dictionary-overview.error.entries-too-short'), null, diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts index 7ea2c7174..79d3bfdc1 100644 --- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts @@ -194,7 +194,6 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy { handleAnnotationSelected(annotationId: string) { this.selectedAnnotation = this.annotations.find((a) => a.id === annotationId); this.scrollToSelectedAnnotation(); - console.log('selected: ', annotationId); this._changeDetectorRef.detectChanges(); } diff --git a/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts b/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts index 65292487b..62522c2e0 100644 --- a/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts +++ b/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts @@ -109,7 +109,6 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnChanges { }); instance.docViewer.on('pageNumberUpdated', (p) => { - console.log(this.shouldDeselectAnnotationsOnPageChange); if (this.shouldDeselectAnnotationsOnPageChange) { this.instance.annotManager.deselectAllAnnotations(); } diff --git a/apps/red-ui/src/app/screens/html-debug-screen/html-debug-screen.component.ts b/apps/red-ui/src/app/screens/html-debug-screen/html-debug-screen.component.ts index 22d8e6580..23345d298 100644 --- a/apps/red-ui/src/app/screens/html-debug-screen/html-debug-screen.component.ts +++ b/apps/red-ui/src/app/screens/html-debug-screen/html-debug-screen.component.ts @@ -43,7 +43,6 @@ export class HtmlDebugScreenComponent { .subscribe((data) => { this.htmlData = data; this.loading = false; - console.log(this.htmlData); }); } } diff --git a/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.ts b/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.ts index 360ca57b6..2876ffa2a 100644 --- a/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.ts +++ b/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.ts @@ -89,7 +89,6 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy { this.filesAutoUpdateTimer = timer(0, 7500) .pipe( tap(async () => { - console.log('reload ... '); await this.appStateService.reloadActiveProjectFilesIfNecessary(); }) ) diff --git a/apps/red-ui/src/app/state/app-state.service.ts b/apps/red-ui/src/app/state/app-state.service.ts index 32a4d7696..3dd23d04c 100644 --- a/apps/red-ui/src/app/state/app-state.service.ts +++ b/apps/red-ui/src/app/state/app-state.service.ts @@ -188,39 +188,6 @@ export class AppStateService { return activeFileWrapper; } - private _automaticallyReanalyseErrorFiles(project: ProjectWrapper) { - const now = new Date().getTime(); - project.files.forEach((file) => { - if (file.status === 'ERROR') { - console.log('Auto-Reanalyse file because of error'); - this._reanalyseFileInCurrentSessionIfNeeded(project, file); - } - if (file.status === 'PROCESSING') { - const delta = now - file.newestDate.getTime(); - if (delta > 1000 * 60 * 2) { - console.log('Auto-Reanalyse file because of timeout'); - this._reanalyseFileInCurrentSessionIfNeeded(project, file); - } - } - }); - } - - private _reanalyseFileInCurrentSessionIfNeeded(project: ProjectWrapper, file: FileStatusWrapper) { - const result = sessionStorage.getItem('FILE_' + file.fileId); - if (!result) { - this._reanalysisControllerService.reanalyzeFile(project.projectId, file.fileId).subscribe(() => {}); - sessionStorage.setItem('FILE_' + file.fileId, `${new Date().getTime()}`); - } else { - const now = new Date().getTime(); - const lastAttempt = new Date(parseInt(result, 10)).getTime(); - const delta = now - lastAttempt; - if (delta > 1000 * 60 * 2) { - this._reanalysisControllerService.reanalyzeFile(project.projectId, file.fileId).subscribe(() => {}); - sessionStorage.setItem('FILE_' + file.fileId, `${new Date().getTime()}`); - } - } - } - async getFiles(project?: ProjectWrapper) { if (!project) { project = this.activeProject; diff --git a/apps/red-ui/src/app/utils/file-download-utils.ts b/apps/red-ui/src/app/utils/file-download-utils.ts index 377fd2596..038357ab9 100644 --- a/apps/red-ui/src/app/utils/file-download-utils.ts +++ b/apps/red-ui/src/app/utils/file-download-utils.ts @@ -5,11 +5,9 @@ export function download(event: HttpResponse, altName?: string) { const contentDisposition = event.headers.get('Content-Disposition'); let fileName; try { - fileName = contentDisposition - ? contentDisposition.split('filename=')[1].replace(/"/g, '') - : undefined; + fileName = contentDisposition ? contentDisposition.split('filename=')[1].replace(/"/g, '') : undefined; } catch (e) { - console.log('failed to parse content-disposition: ', contentDisposition); + console.log('[REDACTION] Failed to parse content-disposition: ', contentDisposition); } saveAs(event.body, fileName ? fileName : altName); }