removed some logs
This commit is contained in:
parent
d2fc1908e9
commit
4b2954827a
@ -24,7 +24,7 @@ export class AppConfigService {
|
||||
loadAppConfig(): Observable<any> {
|
||||
return this._httpClient.get<any>('/assets/config/config.json').pipe(
|
||||
tap((config) => {
|
||||
console.log('got', config);
|
||||
console.log('[REDACTION] Started with config: ', config);
|
||||
this._config = config;
|
||||
})
|
||||
);
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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) => {
|
||||
|
||||
@ -207,7 +207,6 @@ export class DictionaryOverviewScreenComponent {
|
||||
}
|
||||
);
|
||||
} else {
|
||||
console.log(invalidRowsExist);
|
||||
this._notificationService.showToastNotification(
|
||||
this._translateService.instant('dictionary-overview.error.entries-too-short'),
|
||||
null,
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -43,7 +43,6 @@ export class HtmlDebugScreenComponent {
|
||||
.subscribe((data) => {
|
||||
this.htmlData = data;
|
||||
this.loading = false;
|
||||
console.log(this.htmlData);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -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();
|
||||
})
|
||||
)
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -5,11 +5,9 @@ export function download(event: HttpResponse<Blob>, 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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user