From d2855da9bb606517cccab42b2776df3686ff57a5 Mon Sep 17 00:00:00 2001 From: Nicola Lanzilotto Date: Fri, 22 Dec 2023 10:04:23 +0100 Subject: [PATCH] Commented log --- src/app/auth/signin/signin.component.ts | 4 +- .../panel-intent-list.component.ts | 2 +- src/app/core/auth.guard.ts | 2 +- .../create-project.component.ts | 12 +++--- .../get-start-chatbot-fork.component.ts | 40 +++++++++---------- src/app/services/faq-kb.service.ts | 8 ++-- 6 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/app/auth/signin/signin.component.ts b/src/app/auth/signin/signin.component.ts index 1572bf38eaed..1e7209d9ba26 100755 --- a/src/app/auth/signin/signin.component.ts +++ b/src/app/auth/signin/signin.component.ts @@ -84,7 +84,7 @@ export class SigninComponent implements OnInit { } ngOnInit() { - console.log('[SIGN-IN] ON INIT !!!! ') + // console.log('[SIGN-IN] ON INIT !!!! ') this.getOSCODE(); // this.redirectIfLogged(); // this.widgetReInit() @@ -102,7 +102,7 @@ export class SigninComponent implements OnInit { getStoredRoute() { this.storedRoute = this.localDbService.getFromStorage('wannago') - console.log('[SIGN-IN] storedRoute ', this.storedRoute) + this.logger.log('[SIGN-IN] storedRoute ', this.storedRoute) if (this.storedRoute) { this.EXIST_STORED_ROUTE = true } else { diff --git a/src/app/chatbot-design-studio/cds-dashboard/panel-intent-list/panel-intent-list.component.ts b/src/app/chatbot-design-studio/cds-dashboard/panel-intent-list/panel-intent-list.component.ts index 9bf30aa73b60..5e91a402844a 100644 --- a/src/app/chatbot-design-studio/cds-dashboard/panel-intent-list/panel-intent-list.component.ts +++ b/src/app/chatbot-design-studio/cds-dashboard/panel-intent-list/panel-intent-list.component.ts @@ -227,7 +227,7 @@ export class PanelIntentListComponent implements OnInit { // } onSelectIntent(intent: Intent, index: number) { - console.log('onSelectIntent:: ', intent, index); + // console.log('onSelectIntent:: ', intent, index); this.idSelectedIntent = index; this.selectedIntent = intent; this.selectIntent.emit(intent); diff --git a/src/app/core/auth.guard.ts b/src/app/core/auth.guard.ts index 3662f4dd3b5d..4a9655a37409 100755 --- a/src/app/core/auth.guard.ts +++ b/src/app/core/auth.guard.ts @@ -403,7 +403,7 @@ export class AuthGuard implements CanActivate { // console.log('[AUTH-GUARD] SSO - CAN ACTIVATE queryParams HAS_JWT: NOT HAS - navigate to login '); // console.log('[AUTH-GUARD] - CAN ACTIVATE queryParams HAS_JWT: NOT HAS - wanna go url ', url); const storedRoute = this.localDbService.getFromStorage('wannago') - console.log('[AUTH-GUARD] - CAN ACTIVATE queryParams HAS_JWT: NOT HAS - wanna go url storedRoute', storedRoute); + // console.log('[AUTH-GUARD] - CAN ACTIVATE queryParams HAS_JWT: NOT HAS - wanna go url storedRoute', storedRoute); if (!storedRoute) { const URLtoStore = url; diff --git a/src/app/create-project-wizard/create-project/create-project.component.ts b/src/app/create-project-wizard/create-project/create-project.component.ts index 402a60e02944..2c95423bbb68 100755 --- a/src/app/create-project-wizard/create-project/create-project.component.ts +++ b/src/app/create-project-wizard/create-project/create-project.component.ts @@ -92,7 +92,7 @@ export class CreateProjectComponent extends WidgetSetUpBaseComponent implements if (this.router.url.startsWith('/create-project-itw/')) { this.CREATE_PRJCT_FOR_TEMPLATE_INSTALLATION = true - console.log('[WIZARD - CREATE-PRJCT] CREATE_PRJCT_FOR_TEMPLATE_INSTALLATION ', this.CREATE_PRJCT_FOR_TEMPLATE_INSTALLATION) + // console.log('[WIZARD - CREATE-PRJCT] CREATE_PRJCT_FOR_TEMPLATE_INSTALLATION ', this.CREATE_PRJCT_FOR_TEMPLATE_INSTALLATION) this.browser_lang = this.translate.getBrowserLang(); if (tranlatedLanguage.includes(this.browser_lang)) { @@ -141,7 +141,7 @@ export class CreateProjectComponent extends WidgetSetUpBaseComponent implements this.projectService.createProject(this.project_name, 'create-project') .subscribe((project) => { - console.log('[WIZARD - CREATE-PRJCT] POST DATA PROJECT RESPONSE ', project); + // console.log('[WIZARD - CREATE-PRJCT] POST DATA PROJECT RESPONSE ', project); if (project) { this.new_project = project // WHEN THE USER SELECT A PROJECT ITS ID IS SEND IN THE PROJECT SERVICE THET PUBLISHES IT @@ -340,7 +340,7 @@ export class CreateProjectComponent extends WidgetSetUpBaseComponent implements // this.faqKbService.getTemplates().subscribe((res: any) => { this.faqKbService.getChatbotTemplateById(botid).subscribe((res: any) => { if (res) { - console.log('[WIZARD - CREATE-PRJCT] GET TEMPLATES - RES ', res) + // console.log('[WIZARD - CREATE-PRJCT] GET TEMPLATES - RES ', res) this.template = res; this.botname = res['name'] @@ -350,7 +350,7 @@ export class CreateProjectComponent extends WidgetSetUpBaseComponent implements // } // if ( this.templates && this.templates['name']) { // this.botname = this.templates['name'] - // // console.log('[INSTALL-TEMPLATE] GET TEMPLATES - SELECTED TEMPALTES > botname', this.botname) + // console.log('[INSTALL-TEMPLATE] GET TEMPLATES - SELECTED TEMPALTES > botname', this.botname) // } if (!isDevMode()) { @@ -406,7 +406,7 @@ export class CreateProjectComponent extends WidgetSetUpBaseComponent implements forkTemplate() { this.faqKbService.installTemplate(this.template._id, this.id_project, true, this.template._id).subscribe((res: any) => { - console.log('[INSTALL-TEMPLATE] - FORK TEMPLATE RES', res); + // console.log('[INSTALL-TEMPLATE] - FORK TEMPLATE RES', res); this.botid = res.bot_id }, (error) => { @@ -470,7 +470,7 @@ export class CreateProjectComponent extends WidgetSetUpBaseComponent implements getFaqKbById(botid) { this.faqKbService.getFaqKbById(botid).subscribe((faqkb: any) => { - console.log('[INSTALL-TEMPLATE] GET FAQ-KB (DETAILS) BY ID ', faqkb); + // console.log('[INSTALL-TEMPLATE] GET FAQ-KB (DETAILS) BY ID ', faqkb); this.botLocalDbService.saveBotsInStorage(botid, faqkb); this.goToBotDetails(faqkb) diff --git a/src/app/create-project-wizard/get-start-chatbot-fork/get-start-chatbot-fork.component.ts b/src/app/create-project-wizard/get-start-chatbot-fork/get-start-chatbot-fork.component.ts index d87134b4e08d..3107559c3c86 100644 --- a/src/app/create-project-wizard/get-start-chatbot-fork/get-start-chatbot-fork.component.ts +++ b/src/app/create-project-wizard/get-start-chatbot-fork/get-start-chatbot-fork.component.ts @@ -71,12 +71,12 @@ export class GetStartChatbotForkComponent implements OnInit { } getLoggedUser() { - console.log('[GET START CHATBOT FORK] getLoggedUser called') + // console.log('[GET START CHATBOT FORK] getLoggedUser called') this.auth.user_bs .subscribe((user) => { if (user) { this.user = user; - console.log('[GET START CHATBOT FORK] - user ', this.user) + // console.log('[GET START CHATBOT FORK] - user ', this.user) } }); } @@ -104,12 +104,12 @@ export class GetStartChatbotForkComponent implements OnInit { // console.log('[GET START CHATBOT FORK] storedRoute ', storedRoute) const storedRoute = decodeURIComponent(this.router.url); - console.log('[GET START CHATBOT FORK] _storedRoute ', storedRoute) + // console.log('[GET START CHATBOT FORK] _storedRoute ', storedRoute) if (storedRoute) { // storedRoute.split('/') let storedRouteSegments = storedRoute.split('/') - console.log('[GET START CHATBOT FORK] storedRouteSegment ', storedRouteSegments) + // console.log('[GET START CHATBOT FORK] storedRouteSegment ', storedRouteSegments) let secondStoredRouteSegment = storedRouteSegments[2] // this.logger.log('[GET START CHATBOT FORK] secondStoredRouteSegment ', secondStoredRouteSegment) @@ -120,7 +120,7 @@ export class GetStartChatbotForkComponent implements OnInit { // console.log('[GET START CHATBOT FORK] secondStoredRouteSegments ', secondStoredRouteSegments) this.botid = secondStoredRouteSegments[0] - console.log('[GET START CHATBOT FORK] botid ', this.botid) + // console.log('[GET START CHATBOT FORK] botid ', this.botid) const _templateNameOnSite = secondStoredRouteSegments[1]; try { this.templateNameOnSite = decodeURI(_templateNameOnSite) @@ -135,7 +135,7 @@ export class GetStartChatbotForkComponent implements OnInit { // console.log('[GET START CHATBOT FORK] GET-CHATBOT-TEMPLATE-BY-ID - RES ', res) if (res) { this.selectedTemplate = res - console.log('[GET START CHATBOT FORK] GET-CHATBOT-TEMPLATE-BY-ID - selectedTemplate ', this.selectedTemplate) + // console.log('[GET START CHATBOT FORK] GET-CHATBOT-TEMPLATE-BY-ID - selectedTemplate ', this.selectedTemplate) this.botname = res['name'] if (this.selectedTemplate && this.selectedTemplate['bigImage']) { @@ -157,27 +157,27 @@ export class GetStartChatbotForkComponent implements OnInit { getProjects(projectid?: string) { this.projectService.getProjects().subscribe((projects: any) => { - console.log('[GET START CHATBOT FORK] - GET PROJECTS ', projects); + // console.log('[GET START CHATBOT FORK] - GET PROJECTS ', projects); if (projects) { this.projects = projects; if (this.projects && this.projects.length === 1) { - console.log('[GET START CHATBOT FORK] USE-CASE PROJECTS NO = 1') + // console.log('[GET START CHATBOT FORK] USE-CASE PROJECTS NO = 1') this.projectName = this.projects[0].id_project.name this.selectedProjectId = this.projects[0].id_project._id - console.log('[GET START CHATBOT FORK] this.project ', this.selectedProjectId) + // console.log('[GET START CHATBOT FORK] this.project ', this.selectedProjectId) this.project = this.projects[0].id_project; - console.log('[GET START CHATBOT FORK] this.project ', this.project) + // console.log('[GET START CHATBOT FORK] this.project ', this.project) this.buildPlanName(this.project) this.trackGroup(this.selectedProjectId) } if (projectid) { - console.log('[GET START CHATBOT FORK] USE-CASE PROJECTS NO > 1' , projectid) + // console.log('[GET START CHATBOT FORK] USE-CASE PROJECTS NO > 1' , projectid) if (this.projects && this.projects.length > 1) { - console.log('[GET START CHATBOT FORK] USE-CASE PROJECTS NO > 1') + // console.log('[GET START CHATBOT FORK] USE-CASE PROJECTS NO > 1') projects.forEach(project => { if (project.id_project.id === projectid) { this.project = project.id_project - console.log('[GET START CHATBOT FORK] this.project ', this.project) + // console.log('[GET START CHATBOT FORK] this.project ', this.project) this.projectPlan = project.id_project.profile.name this.projectName = project.id_project.name; this.selectedProjectId = projectid @@ -239,10 +239,10 @@ export class GetStartChatbotForkComponent implements OnInit { forkTemplate() { - console.log('[GET START CHATBOT FORK] selectedTemplate ',this.selectedTemplate._id) - console.log('[GET START CHATBOT FORK] selectedProjectId ',this.selectedProjectId) + // console.log('[GET START CHATBOT FORK] selectedTemplate ',this.selectedTemplate._id) + // console.log('[GET START CHATBOT FORK] selectedProjectId ',this.selectedProjectId) this.faqKbService.installTemplate(this.selectedTemplate._id, this.selectedProjectId, true, this.selectedTemplate._id).subscribe((res: any) => { - console.log('[GET START CHATBOT FORK] - FORK TEMPLATE RES', res); + // console.log('[GET START CHATBOT FORK] - FORK TEMPLATE RES', res); this.botid = res.bot_id }, (error) => { @@ -262,7 +262,7 @@ export class GetStartChatbotForkComponent implements OnInit { getFaqKbById(botid) { this.faqKbService.getFaqKbByIdAndProjectId(this.selectedProjectId , botid).subscribe((faqkb: any) => { - console.log('[GET START CHATBOT FORK] GET FAQ-KB (DETAILS) BY ID ', faqkb); + // console.log('[GET START CHATBOT FORK] GET FAQ-KB (DETAILS) BY ID ', faqkb); this.botLocalDbService.saveBotsInStorage(botid, faqkb); this.goToBotDetails(faqkb) @@ -292,9 +292,9 @@ export class GetStartChatbotForkComponent implements OnInit { this.logger.error('Wizard Get start chatbot fork page error', err); } if (!this.user) { - console.log('[GET START CHATBOT FORK] this.user', this.user) + // console.log('[GET START CHATBOT FORK] this.user', this.user) this.user = localStorage.getItem('user'); - console.log('[GET START CHATBOT FORK] stored user', this.user) + // console.log('[GET START CHATBOT FORK] stored user', this.user) } let userFullname = '' @@ -394,7 +394,7 @@ export class GetStartChatbotForkComponent implements OnInit { buildPlanName(project) { if (project.profile.extra3) { this.appSumoProfile = APP_SUMO_PLAN_NAME[project.profile.extra3] - console.log('[GET START CHATBOT FORK] Find Current Project appSumoProfile ', this.appSumoProfile) + // console.log('[GET START CHATBOT FORK] Find Current Project appSumoProfile ', this.appSumoProfile) } if (project.profile.type === 'free') { diff --git a/src/app/services/faq-kb.service.ts b/src/app/services/faq-kb.service.ts index bd376bfd6755..ad41a007af5d 100755 --- a/src/app/services/faq-kb.service.ts +++ b/src/app/services/faq-kb.service.ts @@ -176,7 +176,7 @@ export class FaqKbService { // / (dovrebbe funzionare anche con POST ../PROJECT_ID/bots/fork/ID_FAQ_FB/) // const url = this.SERVER_BASE_PATH + "635b97cc7d7275001a2ab3e0/bots/fork/" + botid; const url = this.SERVER_BASE_PATH + projectid + "/faq_kb/fork/" + botid + "?public=" + ispublic + "&projectid=" + projectid; - console.log('[BOT-CREATE][FAQ-KB.SERV] - FORK - URL ', url); + // console.log('[BOT-CREATE][FAQ-KB.SERV] - FORK - URL ', url); return this._httpClient .post(url, null, httpOptions) @@ -272,7 +272,7 @@ export class FaqKbService { }; let url = this.FAQKB_URL + id; - console.log('[FAQ-KB.SERV] - GET FAQ-KB BY ID - URL', url); + // console.log('[FAQ-KB.SERV] - GET FAQ-KB BY ID - URL', url); return this._httpClient .get(url, httpOptions) } @@ -286,10 +286,10 @@ export class FaqKbService { }) }; - console.log('[FAQ-KB.SERV] - GET FAQ-KB BY ID - this.SERVER_BASE_PATH', this.SERVER_BASE_PATH); + // console.log('[FAQ-KB.SERV] - GET FAQ-KB BY ID - this.SERVER_BASE_PATH', this.SERVER_BASE_PATH); let url = this.SERVER_BASE_PATH + projectid + '/faq_kb/' + botid // let url = this.FAQKB_URL + botid; - console.log('[FAQ-KB.SERV] - GET FAQ-KB BY ID - URL', url); + // console.log('[FAQ-KB.SERV] - GET FAQ-KB BY ID - URL', url); return this._httpClient .get(url, httpOptions) }