Commit edc57a96 authored by Irina Toma's avatar Irina Toma
parents 49405589 0f6da602
......@@ -33,7 +33,8 @@
"src/assets/styles/icomoon.css",
"src/assets/styles/main.css",
"src/assets/styles/screen.css",
"./node_modules/ngx-ui-switch/ui-switch.component.css"
"node_modules/ngx-ui-switch/ui-switch.component.css",
"node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
......@@ -151,7 +152,8 @@
"src/assets/styles/icomoon.css",
"src/assets/styles/main.css",
"src/assets/styles/screen.css",
"./node_modules/ngx-ui-switch/ui-switch.component.css"
"node_modules/ngx-ui-switch/ui-switch.component.css",
"node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css"
],
"assets": [
"src/assets",
......
......@@ -709,6 +709,23 @@
"tslib": "^1.9.0"
}
},
"@angular/cdk": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-7.2.0.tgz",
"integrity": "sha512-ANGNIvyEdkMW6APl+6XDQC5VBS+mS/M+3UB/ROnj+7Om3xe2DSbEjqDXB/SpeJYUp6Qg/wQoWmyvd4y8HfjMwA==",
"requires": {
"parse5": "^5.0.0",
"tslib": "^1.7.1"
},
"dependencies": {
"parse5": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz",
"integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==",
"optional": true
}
}
},
"@angular/cli": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@angular/cli/-/cli-6.2.1.tgz",
......@@ -917,6 +934,14 @@
"integrity": "sha512-L6upXuyO42Z5XhtvbDoDuQEmXEOdSYeGOBmXSxb3ywb/0eh8kHk1Xft+8aaKKtazYjol0t+M+DlZgehqvk4vEA==",
"dev": true
},
"@angular/material": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/@angular/material/-/material-7.2.0.tgz",
"integrity": "sha512-ZLgpZ6hVJABMu6lk+97esN9TmLvBjeAgTbszLBJHOeSKocUGaWeKsdiUweMCdNgWrYNMowIAVKGqwavmaj7XTQ==",
"requires": {
"tslib": "^1.7.1"
}
},
"@angular/platform-browser": {
"version": "6.1.7",
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-6.1.7.tgz",
......
......@@ -6,6 +6,7 @@
"ng": "ng",
"start": "ng serve",
"prod": "ng serve --port 80 --host 0.0.0.0 --disable-host-check",
"ssl": "ng serve --port 443 --host 0.0.0.0 --disable-host-check --ssl true",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
......@@ -16,6 +17,7 @@
"@amcharts/amcharts4": "^4.9.26",
"@amcharts/amcharts4-geodata": "^4.1.15",
"@angular/animations": "6.1.7",
"@angular/cdk": "^7.2.0",
"@angular/cli": "6.2.1",
"@angular/common": "6.1.7",
"@angular/compiler": "6.1.7",
......@@ -23,6 +25,7 @@
"@angular/core": "6.1.7",
"@angular/forms": "6.1.7",
"@angular/http": "6.1.7",
"@angular/material": "^7.2.0",
"@angular/platform-browser": "6.1.7",
"@angular/platform-browser-dynamic": "6.1.7",
"@angular/router": "6.1.7",
......
......@@ -8,7 +8,7 @@ import { TextualComplexityComponent } from '../pages/demo/textual-complexity/tex
import { KeywordsComponent } from '../pages/demo/keywords/keywords.component';
import { SemanticAnnotationComponent } from '../pages/demo/semantic-annotation/semantic-annotation.component';
import { SelfExplanationComponent } from '../pages/demo/self-explanation/self-explanation.component';
import { CsclComponent } from '../pages/demo/cscl/cscl.component';
import { CsclOldComponent } from '../pages/demo/cscl-old/cscl-old.component';
import { CvAnalysisComponent } from '../pages/demo/cv-analysis/cv-analysis.component';
import { LakComponent } from '../pages/demo/lak/lak.component';
import { CommunityComponent } from '../pages/demo/community/community.component';
......@@ -21,7 +21,7 @@ import { ComprehensionModelComponent } from '../pages/demo/comprehension-model/c
import { KeywordsHeatmapComponent } from '../pages/demo/keywords-heatmap/keywords-heatmap.component';
import { CurriculumRecommendationComponent } from '../pages/demo/curriculum-recomandation/curriculum-recommendation.component';
import { DocumentAnalysisComponent } from "../pages/demo/document-analysis/document-analysis";
import { CsclNewComponent } from '../pages/demo/cscl-new/cscl-new.component';
import { CsclComponent } from '../pages/demo/cscl/cscl.component';
import { EssayFeedbackComponent } from '../pages/demo/essay-feedback/essay-feedback.component';
import { IntellitComponent } from '../pages/experiments/intellit/intellit.component';
......@@ -71,12 +71,12 @@ const routes: Routes = [
component: SelfExplanationComponent,
},
{
path: 'demo/cscl',
component: CsclComponent,
path: 'demo/cscl-old',
component: CsclOldComponent,
},
{
path: 'demo/cscl-new',
component: CsclNewComponent,
path: 'demo/cscl',
component: CsclComponent,
},
{
path: 'demo/cv-analysis',
......
......@@ -25,7 +25,7 @@ import { EdgeBundlingDiagramComponent } from './pages/demo/comprehension-model/e
import { KeywordsComponent } from './pages/demo/keywords/keywords.component';
import { SemanticAnnotationComponent } from './pages/demo/semantic-annotation/semantic-annotation.component';
import { SelfExplanationComponent } from './pages/demo/self-explanation/self-explanation.component';
import { CsclComponent } from './pages/demo/cscl/cscl.component';
import { CsclOldComponent } from './pages/demo/cscl-old/cscl-old.component';
import { CvAnalysisComponent } from './pages/demo/cv-analysis/cv-analysis.component';
import { LakComponent } from './pages/demo/lak/lak.component';
import { CommunityComponent } from './pages/demo/community/community.component';
......@@ -53,7 +53,7 @@ import { EssayFeedbackComponent } from './pages/demo/essay-feedback/essay-feedba
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
// Import library module
import { NgxSpinnerModule } from "ngx-spinner";
import { NgxSpinnerModule } from 'ngx-spinner';
import 'jquery';
import { PeopleComponent } from './pages/people/people.component';
......@@ -75,12 +75,14 @@ import {NgbAccordion, NgbAccordionModule, NgbModule, NgbRatingModule} from '@ng-
import { DocumentAnalysisComponent } from './pages/demo/document-analysis/document-analysis';
import { Ng5SliderModule } from 'ng5-slider';
import { MultiDocumentCohesionGridComponent } from './pages/demo/document-analysis/multi-document-cohesion-grid/multi-document-cohesion-grid';
import { CsclNewComponent } from './pages/demo/cscl-new/cscl-new.component';
import { CsclComponent } from './pages/demo/cscl/cscl.component';
import { DropzoneModule, DropzoneConfigInterface, DROPZONE_CONFIG } from 'ngx-dropzone-wrapper';
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
import { PERFECT_SCROLLBAR_CONFIG } from 'ngx-perfect-scrollbar';
import { PerfectScrollbarConfigInterface } from 'ngx-perfect-scrollbar';
import {MatSliderModule} from '@angular/material/slider';
const DEFAULT_DROPZONE_CONFIG: DropzoneConfigInterface = {
// Change this to your upload POST address:
url: '//readerbench.com/api/v2/file-upload',
......@@ -116,8 +118,8 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
IntellitComponent,
SemanticAnnotationComponent,
SelfExplanationComponent,
CsclOldComponent,
CsclComponent,
CsclNewComponent,
CvAnalysisComponent,
ComprehensionModelComponent,
CMScoresTableComponent,
......@@ -164,7 +166,8 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
UiSwitchModule,
DropzoneModule,
PerfectScrollbarModule,
NgxSpinnerModule
NgxSpinnerModule,
MatSliderModule
],
exports: [
KeywordsComponent
......
.dropzone.dropzone-default.dropzone-success {
border-color: #0abb87;
}
.dropzone.dropzone-default {
/* min-height: 350px; */
padding: 20px;
text-align: center;
cursor: pointer;
border: 2px dashed #ebedf2;
border-radius: 4px;
}
.dropzone {
min-height: 150px;
border: 2px solid rgba(0,0,0,0.3);
background: white;
padding: 20px 20px;
}
.dropzone, .dropzone * {
box-sizing: border-box;
}
.dropzone {
min-height: auto;
}
......@@ -12,36 +12,31 @@
</div>
<div class="container">
<div class="section-header">
<h1>Computer Supported Collaborative Learning (new)</h1>
<h1>Computer Supported Collaborative Learning</h1>
</div>
</div>
<div class="container">
<div class="form-group">
<div class="input">
<div class="row">
<div class="col-xs-12 col-md-12 col-lg-3">
<div class="col-xs-3 col-md-3">
<label for="file">CSCL file <span class="required">*</span><br /><small>(only XML files
allowed)</small></label>
</div>
<div class="col-xs-12 col-md-12 col-lg-6">
<div [dropzone]="dropzone" class="dropzone dropzone-default dropzone-success" id="kt_dropzone_3"
(config)="config" (init)="onUploadInit($event)" (sending)="onSending($event)"
(error)="onUploadError($event)" (success)="onUploadSuccess($event)"
(complete)="onUploadComplete($event, $data)">
<div class="dropzone-msg dz-message needsclick">
<h3 class="dropzone-msg-title">Drop your XML file here or click this area to upload it.</h3>
<span class="dropzone-msg-desc">Your file will be uploaded immediately to the server.<br />
Only XML files are allowed!</span>
</div>
</div>
<div class="col-xs-4 col-md-4">
<input id="file" class="btn theme-btn-1" type="file" (change)="fileChange($event)"
placeholder="Upload file" accept=".xml" valie="Select File: " />
File:
<small>{{uploadedFileName}}
<span class="progress" ng-show="csclFile.progress >= 0">
<!-- <div style="width:{{csclFile.progress}}%" ng-bind="csclFile.progress + '%'"></div> -->
</span>
</small>
{{csclErrorMsg}}
<input type="hidden" ng-model="formData.csclFile" />
</div>
<div class="col-xs-12 col-md-12 col-lg-3">
<!-- <a href="{{sampleFileUrl}}" target="_blank">Sample CSCL file</a> -->
<!-- <dropzone class="dropzone-container dropzone dropzone-default dropzone-success" [config]="config"
(init)="onUploadInit($event)" (sending)="onSending($event)" (error)="onUploadError($event)"
(success)="onUploadSuccess($event)">
</dropzone> -->
<div class="col-xs-3 col-md-3">
<a href="{{sampleFileUrl}}" target="_blank">Sample CSCL file</a>
</div>
</div>
<app-demo-common-fields [formData]="formData" [language]="language" [languages]="languages"
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CsclNewComponent } from './cscl-new.component';
import { CsclOldComponent } from './cscl-old.component';
describe('CsclNewComponent', () => {
let component: CsclNewComponent;
let fixture: ComponentFixture<CsclNewComponent>;
describe('CsclOldComponent', () => {
let component: CsclOldComponent;
let fixture: ComponentFixture<CsclOldComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [CsclNewComponent]
declarations: [CsclOldComponent]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CsclNewComponent);
fixture = TestBed.createComponent(CsclOldComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
......
import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { Component, OnInit, Input } from '@angular/core';
import { ApiRequestService } from '../api-request.service';
import { DefaultInputData } from '../demo.component.data';
import { CsclData } from './cscl-new.data';
import { CsclOldData } from './cscl-old.data';
import { isNil } from 'lodash';
import { TwoModeGraphService } from '../../../two-mode-graph.service';
import { ReaderBenchService } from '../../../readerbench.service';
import { DropzoneModule, DropzoneDirective, DropzoneConfigInterface } from 'ngx-dropzone-wrapper';
@Component({
selector: 'app-cscl',
templateUrl: './cscl-new.component.html',
styleUrls: ['./cscl-new.component.css'],
selector: 'app-old-cscl',
templateUrl: './cscl-old.component.html',
styleUrls: ['./cscl-old.component.css'],
providers: [ApiRequestService, TwoModeGraphService]
})
export class CsclNewComponent implements OnInit {
public config: DropzoneConfigInterface = {
clickable: true,
maxFiles: 0,
timeout: 60 * 1000,
};
export class CsclOldComponent implements OnInit {
formData: any;
@Input() advanced: boolean;
......@@ -47,12 +39,6 @@ export class CsclNewComponent implements OnInit {
participantInteractionGraph: any;
noFilesToUpload: number;
noUploadedFiles: number;
@ViewChild(DropzoneModule, { }) componentRef?: DropzoneModule;
@ViewChild(DropzoneDirective, {}) directiveRef?: DropzoneDirective;
constructor(
private apiRequestService: ApiRequestService,
private twoModeGraphService: TwoModeGraphService,
......@@ -62,8 +48,8 @@ export class CsclNewComponent implements OnInit {
ngOnInit() {
this.isFileUploaded = false;
this.languages = CsclData.languages;
this.language = CsclData.defaultLanguage;
this.languages = CsclOldData.languages;
this.language = CsclOldData.defaultLanguage;
this.formData = {
'language': this.language,
......@@ -76,8 +62,6 @@ export class CsclNewComponent implements OnInit {
this.loading = false;
this.showResults = false;
this.noFilesToUpload = 0;
this.noUploadedFiles = 0;
}
loadSemanticModels() {
......@@ -97,7 +81,7 @@ export class CsclNewComponent implements OnInit {
}
process() {
this.apiRequestService.setApiService(CsclData.serviceName);
this.apiRequestService.setApiService(CsclOldData.serviceName);
this.apiRequestService.setHeaders(this.apiRequestService.HEADERS_TYPE_COMMON_REQUEST);
this.loading = true;
this.showResults = false;
......@@ -233,7 +217,7 @@ export class CsclNewComponent implements OnInit {
}
fileChange(event) {
this.apiRequestService.setApiService(CsclData.fileUploadEndpointKey);
this.apiRequestService.setApiService(CsclOldData.fileUploadEndpointKey);
this.apiRequestService.setHeaders(this.apiRequestService.HEADERS_TYPE_FILE_UPLOAD);
const fileList: FileList = event.target.files;
if (fileList.length > 0) {
......@@ -255,28 +239,4 @@ export class CsclNewComponent implements OnInit {
}
}
public onUploadInit(args: any): void {
}
public onSending(args: any): void {
this.noFilesToUpload++;
}
public onUploadError(args: any): void {
alert('There was an error uploading your file(s)!');
}
public onUploadSuccess(args: any): void {
// console.log(args);
this.uploadedFileName = args[1].data.file;
}
public onUploadComplete(args: any, response): void {
this.noUploadedFiles++;
if (this.noUploadedFiles == this.noFilesToUpload) {
console.log('File uploaded', args, response);
// this.uploadedFileName = args.data.name;
}
}
}
import { DefaultInputData } from '../demo.component.data';
export let CsclData = {
export let CsclOldData = {
'fileUploadEndpointKey': 'fileUpload',
'serviceName': 'csclProcessingNew',
'title': 'Computer-Supported Collaborative Learning (New)',
'serviceName': 'csclProcessingOld',
'title': 'Computer-Supported Collaborative Learning',
'languages': [
DefaultInputData.languages[0], // en
DefaultInputData.languages[1], // fr
......
......@@ -7,4 +7,4 @@ import { CommonModule } from '@angular/common';
],
declarations: []
})
export class CsclNewModule { }
export class CsclOldModule { }
.dropzone.dropzone-default.dropzone-success {
border-color: #0abb87;
}
.dropzone.dropzone-default {
/* min-height: 350px; */
padding: 20px;
text-align: center;
cursor: pointer;
border: 2px dashed #ebedf2;
border-radius: 4px;
}
.dropzone {
min-height: 150px;
border: 2px solid rgba(0, 0, 0, 0.3);
background: white;
padding: 20px 20px;
}
.dropzone,
.dropzone * {
box-sizing: border-box;
}
.dropzone {
min-height: auto;
}
.contributions-indices td,
.contributions-indices th {
font-size: 12px;
padding: 0 5px;
text-align: left;
vertical-align: top;
}
.contributions-indices>thead th,
.contributions-indices>tbody td.contribution-id,
.contributions-indices>tfoot td {
color: #43b9c7;
font-weight: bold;
}
.contributions-indices td.value {
text-align: right;
}
#cscl-tabs ul {
display: inline-block;
list-style-type: none;
}
#cscl-tabs ul li {
display: inline-block;
}
#cscl-tabs ul li a {
cursor: pointer;
}
#cscl-tabs ul li a span {
vertical-align: middle;
display: inline-block;
padding: 10px 25px;
color: #43b9c7;
font-size: 12px;
line-height: 1em;
font-weight: 400;
letter-spacing: 0.2em;
text-transform: uppercase;
}
.mat-slider-thumb-label {
transform: rotate(45deg) !important;
border-radius: 50% 50% 0 !important;
}
.mat-slider-thumb {
transform: scale(0) !important;
}
.mat-slider-thumb-label-text {
opacity: 1 !important;
}
This diff is collapsed.
This diff is collapsed.
......@@ -7,6 +7,7 @@ export let CsclData = {
'languages': [
DefaultInputData.languages[0], // en
DefaultInputData.languages[1], // fr
DefaultInputData.languages[2], // ro
],
'defaultLanguage': DefaultInputData.languages[0] // en
};
......@@ -98,7 +98,7 @@ export let DefaultInputData = {
'fr': [{
id: '1',
name: 'Le Monde',
value: 'Le_Monde'
value: 'le_monde'
},
{
id: '2',
......@@ -128,7 +128,7 @@ export let DefaultInputData = {
'ro': [{
id: '1',
name: 'Read me',
value: 'ReadMe'
value: 'readme'
},
{
id: '2',
......@@ -170,7 +170,7 @@ export let DefaultInputData = {
'fr': [{
id: '1',
name: 'Le Monde',
value: 'Le_Monde'
value: 'le_monde'
},
{
id: '2',
......@@ -233,7 +233,7 @@ export let DefaultInputData = {
'fr': [{
id: '1',
name: 'Le Monde',
value: 'Le_Monde'
value: 'le_monde'
},
{
id: '2',
......@@ -263,7 +263,7 @@ export let DefaultInputData = {
'ro': [{
id: '1',
name: 'Read me',
value: 'ReadMe'
value: 'readme'
},
{
id: '2',
......
......@@ -216,7 +216,7 @@ export class MultiDocumentCohesionGridComponent implements OnInit, OnChanges {
var path = d3.path();
if (nameToNode[edge.source] && nameToNode[edge.source]) {
if (nameToNode[edge.source] && nameToNode[edge.target]) {
var isArc = false;
if (nameToNode[edge.source].depth === 3){
console.log(nameToNode[edge.source]);
......
......@@ -45,7 +45,6 @@ export class KeywordsComponent implements OnInit {
'text': DefaultInputData.text,
'language': this.language,
'pos-tagging': DefaultInputData.defaultPosTaggingOption(),
'dialogism': DefaultInputData.defaultDialogismOption(),
'threshold': DefaultInputData.semanticSimilarityThreshold,
'bigrams': DefaultInputData.defaultBigrams
};
......@@ -82,7 +81,6 @@ export class KeywordsComponent implements OnInit {
'lda': this.formData['lda'].value,
'w2v': this.formData['word2vec'].value,
'pos-tagging': this.formData['pos-tagging'],
'dialogism': this.formData['dialogism'],
'threshold': this.formData['threshold'],
'bigrams': this.formData['bigrams']
};
......@@ -97,16 +95,15 @@ export class KeywordsComponent implements OnInit {
return;
}
this.myGraph = {
'nodeList': response.data.nodeList,
'edgeList': response.data.edgeList
const conceptGraph = {
nodeList: response.data.nodeList,
edgeList: response.data.edgeList,
};
this.twoModeGraphService.getGraph(this.myGraph).subscribe(
this.twoModeGraphService.getGraph(conceptGraph).subscribe(
graph => { this.myGraph = graph; },
error => { this.error = error.message; },
() => {
// this.readerbenchService.d3jsForTopics(this.graph, "#conceptMap", false);
}
);
......
......@@ -63,11 +63,11 @@
</label>
</div>
</div>
<div class="row top-buffer" *ngIf="advanced">
<!-- <div class="row top-buffer" *ngIf="advanced">
<div class="col-xs-12 col-md-12 col-lg-12">
<input type="checkbox" id="input_dialogism" [checked]="formData['dialogism']" (change)="formData['dialogism'] = !formData['dialogism']" />
<label for="input_dialogism">Compute dialogism
<span class="required">*</span>
</label>
</div>
</div>
</div> -->
......@@ -46,6 +46,7 @@ export let DemoMenuItemsData = [
participation and collaboration.',
image: 'assets/images/demo_cscl.png',
altText: 'CSCL conversation analysis with ReaderBench framework',
language: 'English, French, Romanian'
},
// {
// name: 'CV Analysis',
......
......@@ -22,13 +22,7 @@
<h5 class="title">Links</h5>
<ul>
<li>
<a href="http://readerbench.com/wiki/install" target="_blank">ReaderBench Documentation</a>
</li>
<li>
<a href="http://git.readerbench.com/ReaderBench/ReaderBench" target="_blank">ReaderBench Open-Source Code Repository</a>
</li>
<li>
<a href="http://readerbench.com/deployment" target="_blank">ReaderBench Deployment versions</a>
<a href="https://git.readerbench.com/ReaderBench/readerbenchpy" target="_blank">ReaderBench Open-Source Code Repository</a>
</li>
</ul>
</div>
......
......@@ -20,8 +20,8 @@
"selfExplanation": "self-explanation",
"semanticAnnotation": "semantic-annotation",
"cvAnalysis": "cv-processing",
"csclProcessing": "cscl-processing",
"csclProcessingNew": "v2/cscl-processing",
"csclProcessingOld": "cscl-processing",
"csclProcessing": "v2/cscl-processing",
"fileUpload": "file-upload",
"community": "community/communities",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment