From 47dcf42285bcb40cf90ab93cf99dc7980a49c8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20FEREZ?= Date: Tue, 11 Jun 2024 12:19:50 +0200 Subject: [PATCH] Remove some debug code --- .../auth/djangopassword/djangopassword-strategy.ts | 3 --- src/app/@cyborg/auth/token.interceptor.ts | 2 -- .../@cyborg/components/catalog/catalog.component.ts | 1 - .../components/cron-editor/cron-editor.component.ts | 11 ----------- .../cron-editor/cron-time-picker.component.ts | 2 +- .../components/dashboard/dashboard.component.ts | 2 -- .../components/forms/user-form/user-form.component.ts | 1 - .../components/job-output/job-output.component.ts | 2 -- .../components/table/job-table/job-table.component.ts | 1 - .../table/policy-table/policy-table.component.ts | 1 - .../table/user-table/user-table.component.ts | 1 - src/app/@cyborg/services/clients/clients.service.ts | 1 - src/app/@cyborg/services/stats/stats.service.ts | 1 - 13 files changed, 1 insertion(+), 28 deletions(-) diff --git a/src/app/@core/framework/auth/djangopassword/djangopassword-strategy.ts b/src/app/@core/framework/auth/djangopassword/djangopassword-strategy.ts index 37d7b6e..f4c80d9 100644 --- a/src/app/@core/framework/auth/djangopassword/djangopassword-strategy.ts +++ b/src/app/@core/framework/auth/djangopassword/djangopassword-strategy.ts @@ -246,9 +246,6 @@ export class DjangoPasswordAuthStrategy extends NbAuthStrategy { if (data.hasOwnProperty('server')) { url = data.server + url; } - console.log(tokenKey); - console.log(this.route.snapshot); - console.log(this.route.snapshot.queryParams[tokenKey]); data[tokenKey] = this.route.snapshot.queryParams[tokenKey]; return this.http.request(method, url, {body: data, observe: 'response'}) .pipe( diff --git a/src/app/@cyborg/auth/token.interceptor.ts b/src/app/@cyborg/auth/token.interceptor.ts index 95b372c..564feb5 100644 --- a/src/app/@cyborg/auth/token.interceptor.ts +++ b/src/app/@cyborg/auth/token.interceptor.ts @@ -19,8 +19,6 @@ export class TokenInterceptor implements HttpInterceptor { } intercept(req: HttpRequest, next: HttpHandler): Observable> { - console.log(req.url); - console.log(req.url.indexOf('/api/v1/')); if (req.url.includes('/api/v1/')) { return this.authService.isAuthenticatedOrRefresh() .pipe( diff --git a/src/app/@cyborg/components/catalog/catalog.component.ts b/src/app/@cyborg/components/catalog/catalog.component.ts index 7f837c6..97c1532 100644 --- a/src/app/@cyborg/components/catalog/catalog.component.ts +++ b/src/app/@cyborg/components/catalog/catalog.component.ts @@ -226,7 +226,6 @@ export class CatalogComponent implements OnInit, OnDestroy { }).onClose.subscribe((res) => { if (res && this.formRestore.valid) { const data = this.formRestore.value; - console.log(item); data['archive_name'] = item.tag.archive_name; data['item'] = ''; if (item.tag.type !== 'date') { diff --git a/src/app/@cyborg/components/cron-editor/cron-editor.component.ts b/src/app/@cyborg/components/cron-editor/cron-editor.component.ts index e23b1dd..79aa54a 100644 --- a/src/app/@cyborg/components/cron-editor/cron-editor.component.ts +++ b/src/app/@cyborg/components/cron-editor/cron-editor.component.ts @@ -131,8 +131,6 @@ export class CronGenComponent implements OnInit, ControlValueAccessor { const [defaultHours, defaultMinutes, defaultSeconds] = this.options.defaultTime.split(':').map(Number); - console.log('inited'); - this.cronForm = new FormControl(this.cron); this.minutesForm = this.fb.group({ @@ -259,13 +257,6 @@ export class CronGenComponent implements OnInit, ControlValueAccessor { } public handleModelChange(cron: string) { - // if (this.isDirty) { - // this.isDirty = false; - // return; - // } else { - // this.isDirty = false; - // } - this.cron = cron; if (!this.cronIsValid(cron)) { @@ -402,8 +393,6 @@ export class CronGenComponent implements OnInit, ControlValueAccessor { this.state.advanced.expression = origCron; } - // console.log(this.activeTab); - // console.log(this.selectedIndex); } private computeMinutesCron(state: any) { diff --git a/src/app/@cyborg/components/cron-editor/cron-time-picker.component.ts b/src/app/@cyborg/components/cron-editor/cron-time-picker.component.ts index 071662f..07aaa59 100644 --- a/src/app/@cyborg/components/cron-editor/cron-time-picker.component.ts +++ b/src/app/@cyborg/components/cron-editor/cron-time-picker.component.ts @@ -9,7 +9,7 @@ export interface TimePickerModel { seconds: number; } -function* range(start: number, end: number) { +function* range(start: number, end: number): Generator { for (let i = start; i <= end; i++) { yield i; } diff --git a/src/app/@cyborg/components/dashboard/dashboard.component.ts b/src/app/@cyborg/components/dashboard/dashboard.component.ts index 163163e..d776fa4 100644 --- a/src/app/@cyborg/components/dashboard/dashboard.component.ts +++ b/src/app/@cyborg/components/dashboard/dashboard.component.ts @@ -51,7 +51,6 @@ export class DashboardComponent implements AfterViewInit, OnDestroy, OnInit { const colors: any = config.variables; const echarts: any = config.variables.echarts; - console.log(echarts); this.options = { backgroundColor: echarts.bg, tooltip: { @@ -179,7 +178,6 @@ export class DashboardComponent implements AfterViewInit, OnDestroy, OnInit { }, ], }; - console.log(this.options); this.statsService.fetch().subscribe((res) => { for (const el of res) { this.data.success.push([new Date(el.date).toISOString(), el.success]); diff --git a/src/app/@cyborg/components/forms/user-form/user-form.component.ts b/src/app/@cyborg/components/forms/user-form/user-form.component.ts index 85df9b9..1418ff2 100644 --- a/src/app/@cyborg/components/forms/user-form/user-form.component.ts +++ b/src/app/@cyborg/components/forms/user-form/user-form.component.ts @@ -118,7 +118,6 @@ export class UserFormComponent implements OnInit { submitNotif() { if (this.formNotif.value && this.userId !== 0) { - console.log(this.formNotif.value); this.usersService.patch(this.userId, this.formNotif.value).subscribe(() => { this.toastrService.show('', 'Notification settings updated', { position: NbGlobalPhysicalPosition.BOTTOM_RIGHT, diff --git a/src/app/@cyborg/components/job-output/job-output.component.ts b/src/app/@cyborg/components/job-output/job-output.component.ts index d4a15f4..c5b51bb 100644 --- a/src/app/@cyborg/components/job-output/job-output.component.ts +++ b/src/app/@cyborg/components/job-output/job-output.component.ts @@ -48,7 +48,6 @@ export class JobOutputComponent { if (this.job === undefined || this.loading || this.noMore - // || ['successful', 'failed', 'finished'].indexOf(this.job.status) === -1 ) { return; } @@ -77,7 +76,6 @@ export class JobOutputComponent { this.websocketService.send({ groups: { jobs: ['status_changed'], - // eslint-disable-next-line @typescript-eslint/naming-convention job_events: [String(this.jobId)] }, }); diff --git a/src/app/@cyborg/components/table/job-table/job-table.component.ts b/src/app/@cyborg/components/table/job-table/job-table.component.ts index fd00969..8e3b385 100644 --- a/src/app/@cyborg/components/table/job-table/job-table.component.ts +++ b/src/app/@cyborg/components/table/job-table/job-table.component.ts @@ -33,7 +33,6 @@ export class JobTableComponent implements OnInit { } cancelItem(item): void { - console.log('tutu'); console.log(item); } diff --git a/src/app/@cyborg/components/table/policy-table/policy-table.component.ts b/src/app/@cyborg/components/table/policy-table/policy-table.component.ts index dc17906..487a43b 100644 --- a/src/app/@cyborg/components/table/policy-table/policy-table.component.ts +++ b/src/app/@cyborg/components/table/policy-table/policy-table.component.ts @@ -44,7 +44,6 @@ export class PolicyTableComponent implements OnInit { } launchPolicy(item): void { - console.log('Fire'); this.policiesService.launch(item.id).subscribe((res) => { if (res) { this.toastrService.show('', 'Policy Job Launched', { diff --git a/src/app/@cyborg/components/table/user-table/user-table.component.ts b/src/app/@cyborg/components/table/user-table/user-table.component.ts index 7a030d3..dc273b2 100644 --- a/src/app/@cyborg/components/table/user-table/user-table.component.ts +++ b/src/app/@cyborg/components/table/user-table/user-table.component.ts @@ -48,7 +48,6 @@ export class UserTableComponent implements OnInit { } viewUser(item): void { - console.log('toto'); this.router.navigate(['/user/edit/' + item.id + '/']); } diff --git a/src/app/@cyborg/services/clients/clients.service.ts b/src/app/@cyborg/services/clients/clients.service.ts index 20c67e0..61c6ffe 100644 --- a/src/app/@cyborg/services/clients/clients.service.ts +++ b/src/app/@cyborg/services/clients/clients.service.ts @@ -14,7 +14,6 @@ export class ClientsService extends CrudService { this.http.get('/api/v1/' + this.endpoint + '/', params).subscribe((result: any) => { subscriber.next(result.count); }, (error) => { - // console.log('send query', error); subscriber.error(error); }); }); diff --git a/src/app/@cyborg/services/stats/stats.service.ts b/src/app/@cyborg/services/stats/stats.service.ts index d44239a..57cf4dd 100644 --- a/src/app/@cyborg/services/stats/stats.service.ts +++ b/src/app/@cyborg/services/stats/stats.service.ts @@ -14,7 +14,6 @@ export class StatsService extends CrudService { this.http.get('/api/v1/' + this.endpoint + '/', params).subscribe((result: any) => { subscriber.next(result); }, (error) => { - // console.log('send query', error); subscriber.error(error); }); });