From 8d871b9c6da5b302f37299851db11ee3118febf2 Mon Sep 17 00:00:00 2001 From: kostis30fyllou Date: Mon, 22 Jun 2020 13:54:52 +0300 Subject: [PATCH] Add one more checkbox on settings --- interactive-mining-angular-frontend/package.json | 2 +- interactive-mining-angular-frontend/src/app/app.module.ts | 5 ----- .../resultspreview/resultspreview.component.html | 4 ---- .../resultspreview/resultspreview.component.ts | 1 + .../src/app/configuration/settings/settings.component.html | 5 ++++- .../src/app/configuration/settings/settings.component.ts | 7 +++++++ .../src/app/configuration/settings/settings.ts | 1 + .../src/app/stepsnvabar/stepsnvabar.component.ts | 1 - 8 files changed, 14 insertions(+), 12 deletions(-) diff --git a/interactive-mining-angular-frontend/package.json b/interactive-mining-angular-frontend/package.json index 7a11e88..af55da4 100755 --- a/interactive-mining-angular-frontend/package.json +++ b/interactive-mining-angular-frontend/package.json @@ -4,7 +4,7 @@ "license": "MIT", "scripts": { "ng": "ng", - "start": "ng serve", + "start": "ng serve --disable-host-check --host 0.0.0.0", "build": "ng build", "test": "ng test", "lint": "ng lint", diff --git a/interactive-mining-angular-frontend/src/app/app.module.ts b/interactive-mining-angular-frontend/src/app/app.module.ts index 394d46f..3c64c03 100755 --- a/interactive-mining-angular-frontend/src/app/app.module.ts +++ b/interactive-mining-angular-frontend/src/app/app.module.ts @@ -2,7 +2,6 @@ import {NgModule} from '@angular/core'; import {AppComponent} from './app.component'; import {AppRoutingModule} from './app-routing.module'; -import {Router} from '@angular/router'; import {BrowserModule} from '@angular/platform-browser'; import {InteractiveMiningModule} from './interactivemining/interactive-mining.module'; @@ -18,8 +17,4 @@ import {InteractiveMiningModule} from './interactivemining/interactive-mining.mo bootstrap: [AppComponent] }) export class AppModule { - // Diagnostic only: inspect router configuration - constructor(router: Router) { - console.log('Routes: ', JSON.stringify(router.config, undefined, 2)); - } } diff --git a/interactive-mining-angular-frontend/src/app/configuration/resultspreview/resultspreview.component.html b/interactive-mining-angular-frontend/src/app/configuration/resultspreview/resultspreview.component.html index b922a99..b8eae22 100755 --- a/interactive-mining-angular-frontend/src/app/configuration/resultspreview/resultspreview.component.html +++ b/interactive-mining-angular-frontend/src/app/configuration/resultspreview/resultspreview.component.html @@ -10,10 +10,6 @@

Select or upload a dataset to test the mining algorithm. Each dataset contains documents from various sources according to its title.

- - - -
diff --git a/interactive-mining-angular-frontend/src/app/configuration/resultspreview/resultspreview.component.ts b/interactive-mining-angular-frontend/src/app/configuration/resultspreview/resultspreview.component.ts index d22b71a..92fafc7 100755 --- a/interactive-mining-angular-frontend/src/app/configuration/resultspreview/resultspreview.component.ts +++ b/interactive-mining-angular-frontend/src/app/configuration/resultspreview/resultspreview.component.ts @@ -85,6 +85,7 @@ export class ResultspreviewComponent implements OnInit { wordssplitnum: Number.parseInt(localStorage.getItem('wordssplitnum')), punctuation: Number.parseInt(localStorage.getItem('punctuation')), stopwords: Number.parseInt(localStorage.getItem('stopwords')), + allLowercase: Number.parseInt(localStorage.getItem('allLowercase')), lowercase: Number.parseInt(localStorage.getItem('lowercase')), stemming: Number.parseInt(localStorage.getItem('stemming')), documentarea: localStorage.getItem('documentarea'), diff --git a/interactive-mining-angular-frontend/src/app/configuration/settings/settings.component.html b/interactive-mining-angular-frontend/src/app/configuration/settings/settings.component.html index 366a07f..493029f 100755 --- a/interactive-mining-angular-frontend/src/app/configuration/settings/settings.component.html +++ b/interactive-mining-angular-frontend/src/app/configuration/settings/settings.component.html @@ -127,7 +127,10 @@
- + +
+
+
diff --git a/interactive-mining-angular-frontend/src/app/configuration/settings/settings.component.ts b/interactive-mining-angular-frontend/src/app/configuration/settings/settings.component.ts index e65d4be..b9c931a 100755 --- a/interactive-mining-angular-frontend/src/app/configuration/settings/settings.component.ts +++ b/interactive-mining-angular-frontend/src/app/configuration/settings/settings.component.ts @@ -66,6 +66,7 @@ export class SettingsComponent implements OnInit { wordssplitnum: Number.parseInt(localStorage.getItem('wordssplitnum')), punctuation: Number.parseInt(localStorage.getItem('punctuation')), stopwords: Number.parseInt(localStorage.getItem('stopwords')), + allLowercase: Number.parseInt(localStorage.getItem('allLowercase')), lowercase: Number.parseInt(localStorage.getItem('lowercase')), stemming: Number.parseInt(localStorage.getItem('stemming')), documentarea: localStorage.getItem('documentarea'), @@ -216,6 +217,11 @@ export class SettingsComponent implements OnInit { this.settings.punctuation = value ? 1 : 0; } + allLowercaseCheckBoxChange(value: boolean): void { + localStorage.setItem('allLowercase', value ? '1' : '0'); + this.settings.allLowercase = value ? 1 : 0; + } + lowercaseCheckBoxChange(value: boolean): void { localStorage.setItem('lowercase', value ? '1' : '0'); this.settings.lowercase = value ? 1 : 0; @@ -243,6 +249,7 @@ export class SettingsComponent implements OnInit { wordssplitnum: Number.parseInt(localStorage.getItem('wordssplitnum')), punctuation: Number.parseInt(localStorage.getItem('punctuation')), stopwords: Number.parseInt(localStorage.getItem('stopwords')), + allLowercase: Number.parseInt(localStorage.getItem('allLowercase')), lowercase: Number.parseInt(localStorage.getItem('lowercase')), stemming: Number.parseInt(localStorage.getItem('stemming')), documentarea: localStorage.getItem('documentarea') diff --git a/interactive-mining-angular-frontend/src/app/configuration/settings/settings.ts b/interactive-mining-angular-frontend/src/app/configuration/settings/settings.ts index babf185..04fc8d7 100755 --- a/interactive-mining-angular-frontend/src/app/configuration/settings/settings.ts +++ b/interactive-mining-angular-frontend/src/app/configuration/settings/settings.ts @@ -9,6 +9,7 @@ export interface Settings { wordssplitnum: number; punctuation: number; stopwords: number; + allLowercase: number; lowercase: number; stemming: number; documentarea: string; diff --git a/interactive-mining-angular-frontend/src/app/stepsnvabar/stepsnvabar.component.ts b/interactive-mining-angular-frontend/src/app/stepsnvabar/stepsnvabar.component.ts index 2aaab29..453e72a 100755 --- a/interactive-mining-angular-frontend/src/app/stepsnvabar/stepsnvabar.component.ts +++ b/interactive-mining-angular-frontend/src/app/stepsnvabar/stepsnvabar.component.ts @@ -13,7 +13,6 @@ export class StepsnvabarComponent implements OnInit { constructor(private route: ActivatedRoute, private router: Router) { router.events.subscribe((val) => { - // see also if (val instanceof NavigationEnd) { this.changeStep(val.urlAfterRedirects); }