;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ DashboardComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(DashboardComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/openvidu-server/src/main/resources/frontend/src/app/components/dashboard/dashboard.component.ts b/openvidu-server/src/main/resources/frontend/src/app/components/dashboard/dashboard.component.ts
new file mode 100644
index 00000000..f5abdc6e
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/src/app/components/dashboard/dashboard.component.ts
@@ -0,0 +1,43 @@
+import { Component, OnInit, AfterViewChecked, ViewChild, ElementRef } from '@angular/core';
+import { Subscription } from 'rxjs/Subscription';
+
+import { InfoService } from '../../services/info.service';
+
+@Component({
+ selector: 'app-dashboard',
+ templateUrl: './dashboard.component.html',
+ styleUrls: ['./dashboard.component.css'],
+})
+export class DashboardComponent implements OnInit, AfterViewChecked {
+
+ @ViewChild('scrollMe') private myScrollContainer: ElementRef;
+
+ infoSubscription: Subscription;
+ info = [];
+
+ constructor(private infoService: InfoService) {
+
+ // Subscription to info updated event raised by InfoService
+ this.infoSubscription = this.infoService.newInfo$.subscribe(
+ info => {
+ this.info.push(info);
+ });
+ }
+
+ ngOnInit() {
+
+ }
+
+ ngAfterViewChecked() {
+ this.scrollToBottom();
+ }
+
+ scrollToBottom(): void {
+ try {
+ this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
+ } catch (err) {
+ console.log('[Error]:' + err.toString());
+ }
+ }
+
+}
diff --git a/openvidu-server/src/main/resources/frontend/src/app/components/session-details/session-details.component.css b/openvidu-server/src/main/resources/frontend/src/app/components/session-details/session-details.component.css
new file mode 100644
index 00000000..e69de29b
diff --git a/openvidu-server/src/main/resources/frontend/src/app/components/session-details/session-details.component.html b/openvidu-server/src/main/resources/frontend/src/app/components/session-details/session-details.component.html
new file mode 100644
index 00000000..db83cc1b
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/src/app/components/session-details/session-details.component.html
@@ -0,0 +1,3 @@
+
+ session-details works!
+
diff --git a/openvidu-server/src/main/resources/frontend/src/app/components/session-details/session-details.component.spec.ts b/openvidu-server/src/main/resources/frontend/src/app/components/session-details/session-details.component.spec.ts
new file mode 100644
index 00000000..1f1d2fb7
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/src/app/components/session-details/session-details.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { SessionDetailsComponent } from './session-details.component';
+
+describe('SessionDetailsComponent', () => {
+ let component: SessionDetailsComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ SessionDetailsComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(SessionDetailsComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/openvidu-server/src/main/resources/frontend/src/app/components/session-details/session-details.component.ts b/openvidu-server/src/main/resources/frontend/src/app/components/session-details/session-details.component.ts
new file mode 100644
index 00000000..95b253f2
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/src/app/components/session-details/session-details.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-session-details',
+ templateUrl: './session-details.component.html',
+ styleUrls: ['./session-details.component.css']
+})
+export class SessionDetailsComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/openvidu-server/src/main/resources/frontend/src/app/services/info.service.spec.ts b/openvidu-server/src/main/resources/frontend/src/app/services/info.service.spec.ts
new file mode 100644
index 00000000..b850bd26
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/src/app/services/info.service.spec.ts
@@ -0,0 +1,15 @@
+import { TestBed, inject } from '@angular/core/testing';
+
+import { InfoService } from './info.service';
+
+describe('CommunicationService', () => {
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ providers: [InfoService]
+ });
+ });
+
+ it('should ...', inject([InfoService], (service: InfoService) => {
+ expect(service).toBeTruthy();
+ }));
+});
diff --git a/openvidu-server/src/main/resources/frontend/src/app/services/info.service.ts b/openvidu-server/src/main/resources/frontend/src/app/services/info.service.ts
new file mode 100644
index 00000000..91268cd8
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/src/app/services/info.service.ts
@@ -0,0 +1,23 @@
+import { Injectable } from '@angular/core';
+import { Subject } from 'rxjs/Subject';
+
+@Injectable()
+export class InfoService {
+
+ info: string;
+ newInfo$: Subject;
+
+ constructor() {
+ this.newInfo$ = new Subject();
+ }
+
+ getInfo() {
+ return this.info;
+ }
+
+ updateInfo(info: string) {
+ this.info = info;
+ this.newInfo$.next(info);
+ }
+
+}
diff --git a/openvidu-server/src/main/resources/frontend/src/assets/.gitkeep b/openvidu-server/src/main/resources/frontend/src/assets/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/openvidu-server/src/main/resources/frontend/src/environments/environment.prod.ts b/openvidu-server/src/main/resources/frontend/src/environments/environment.prod.ts
new file mode 100644
index 00000000..3612073b
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/src/environments/environment.prod.ts
@@ -0,0 +1,3 @@
+export const environment = {
+ production: true
+};
diff --git a/openvidu-server/src/main/resources/frontend/src/environments/environment.ts b/openvidu-server/src/main/resources/frontend/src/environments/environment.ts
new file mode 100644
index 00000000..b7f639ae
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/src/environments/environment.ts
@@ -0,0 +1,8 @@
+// The file contents for the current environment will overwrite these during build.
+// The build system defaults to the dev environment which uses `environment.ts`, but if you do
+// `ng build --env=prod` then `environment.prod.ts` will be used instead.
+// The list of which env maps to which file can be found in `.angular-cli.json`.
+
+export const environment = {
+ production: false
+};
diff --git a/openvidu-server/src/main/resources/frontend/src/favicon.ico b/openvidu-server/src/main/resources/frontend/src/favicon.ico
new file mode 100644
index 00000000..8081c7ce
Binary files /dev/null and b/openvidu-server/src/main/resources/frontend/src/favicon.ico differ
diff --git a/openvidu-server/src/main/resources/frontend/src/index.html b/openvidu-server/src/main/resources/frontend/src/index.html
new file mode 100644
index 00000000..452211bf
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/src/index.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+ Frontend
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/openvidu-server/src/main/resources/frontend/src/main.ts b/openvidu-server/src/main/resources/frontend/src/main.ts
new file mode 100644
index 00000000..a9ca1caf
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/src/main.ts
@@ -0,0 +1,11 @@
+import { enableProdMode } from '@angular/core';
+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
+
+import { AppModule } from './app/app.module';
+import { environment } from './environments/environment';
+
+if (environment.production) {
+ enableProdMode();
+}
+
+platformBrowserDynamic().bootstrapModule(AppModule);
diff --git a/openvidu-server/src/main/resources/frontend/src/polyfills.ts b/openvidu-server/src/main/resources/frontend/src/polyfills.ts
new file mode 100644
index 00000000..53bdaf1b
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/src/polyfills.ts
@@ -0,0 +1,68 @@
+/**
+ * This file includes polyfills needed by Angular and is loaded before the app.
+ * You can add your own extra polyfills to this file.
+ *
+ * This file is divided into 2 sections:
+ * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
+ * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
+ * file.
+ *
+ * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
+ * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
+ * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
+ *
+ * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
+ */
+
+/***************************************************************************************************
+ * BROWSER POLYFILLS
+ */
+
+/** IE9, IE10 and IE11 requires all of the following polyfills. **/
+// import 'core-js/es6/symbol';
+// import 'core-js/es6/object';
+// import 'core-js/es6/function';
+// import 'core-js/es6/parse-int';
+// import 'core-js/es6/parse-float';
+// import 'core-js/es6/number';
+// import 'core-js/es6/math';
+// import 'core-js/es6/string';
+// import 'core-js/es6/date';
+// import 'core-js/es6/array';
+// import 'core-js/es6/regexp';
+// import 'core-js/es6/map';
+// import 'core-js/es6/set';
+
+/** IE10 and IE11 requires the following for NgClass support on SVG elements */
+// import 'classlist.js'; // Run `npm install --save classlist.js`.
+
+/** IE10 and IE11 requires the following to support `@angular/animation`. */
+// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
+
+
+/** Evergreen browsers require these. **/
+import 'core-js/es6/reflect';
+import 'core-js/es7/reflect';
+
+
+/** ALL Firefox browsers require the following to support `@angular/animation`. **/
+// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
+
+
+
+/***************************************************************************************************
+ * Zone JS is required by Angular itself.
+ */
+import 'zone.js/dist/zone'; // Included with Angular CLI.
+
+
+
+/***************************************************************************************************
+ * APPLICATION IMPORTS
+ */
+
+/**
+ * Date, currency, decimal and percent pipes.
+ * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
+ */
+// import 'intl'; // Run `npm install --save intl`.
diff --git a/openvidu-server/src/main/resources/frontend/src/styles.css b/openvidu-server/src/main/resources/frontend/src/styles.css
new file mode 100644
index 00000000..1a5eb5f7
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/src/styles.css
@@ -0,0 +1,17 @@
+@import '~@angular/material/prebuilt-themes/deeppurple-amber.css';
+html,
+body {
+ height: 100%;
+ margin: 0;
+ padding: 0;
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
+}
+
+main {
+ height: 90%;
+ padding: 20px;
+}
+
+li {
+ list-style: none;
+}
diff --git a/openvidu-server/src/main/resources/frontend/src/test.ts b/openvidu-server/src/main/resources/frontend/src/test.ts
new file mode 100644
index 00000000..9bf72267
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/src/test.ts
@@ -0,0 +1,32 @@
+// This file is required by karma.conf.js and loads recursively all the .spec and framework files
+
+import 'zone.js/dist/long-stack-trace-zone';
+import 'zone.js/dist/proxy.js';
+import 'zone.js/dist/sync-test';
+import 'zone.js/dist/jasmine-patch';
+import 'zone.js/dist/async-test';
+import 'zone.js/dist/fake-async-test';
+import { getTestBed } from '@angular/core/testing';
+import {
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting
+} from '@angular/platform-browser-dynamic/testing';
+
+// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
+declare var __karma__: any;
+declare var require: any;
+
+// Prevent Karma from running prematurely.
+__karma__.loaded = function () {};
+
+// First, initialize the Angular testing environment.
+getTestBed().initTestEnvironment(
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting()
+);
+// Then we find all the tests.
+const context = require.context('./', true, /\.spec\.ts$/);
+// And load the modules.
+context.keys().map(context);
+// Finally, start Karma to run the tests.
+__karma__.start();
diff --git a/openvidu-server/src/main/resources/frontend/src/tsconfig.app.json b/openvidu-server/src/main/resources/frontend/src/tsconfig.app.json
new file mode 100644
index 00000000..5e2507db
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/src/tsconfig.app.json
@@ -0,0 +1,13 @@
+{
+ "extends": "../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../out-tsc/app",
+ "module": "es2015",
+ "baseUrl": "",
+ "types": []
+ },
+ "exclude": [
+ "test.ts",
+ "**/*.spec.ts"
+ ]
+}
diff --git a/openvidu-server/src/main/resources/frontend/src/tsconfig.spec.json b/openvidu-server/src/main/resources/frontend/src/tsconfig.spec.json
new file mode 100644
index 00000000..510e3f1f
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/src/tsconfig.spec.json
@@ -0,0 +1,20 @@
+{
+ "extends": "../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../out-tsc/spec",
+ "module": "commonjs",
+ "target": "es5",
+ "baseUrl": "",
+ "types": [
+ "jasmine",
+ "node"
+ ]
+ },
+ "files": [
+ "test.ts"
+ ],
+ "include": [
+ "**/*.spec.ts",
+ "**/*.d.ts"
+ ]
+}
diff --git a/openvidu-server/src/main/resources/frontend/src/typings.d.ts b/openvidu-server/src/main/resources/frontend/src/typings.d.ts
new file mode 100644
index 00000000..ef5c7bd6
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/src/typings.d.ts
@@ -0,0 +1,5 @@
+/* SystemJS module definition */
+declare var module: NodeModule;
+interface NodeModule {
+ id: string;
+}
diff --git a/openvidu-server/src/main/resources/frontend/tsconfig.json b/openvidu-server/src/main/resources/frontend/tsconfig.json
new file mode 100644
index 00000000..a35a8ee3
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/tsconfig.json
@@ -0,0 +1,20 @@
+{
+ "compileOnSave": false,
+ "compilerOptions": {
+ "outDir": "./dist/out-tsc",
+ "baseUrl": "src",
+ "sourceMap": true,
+ "declaration": false,
+ "moduleResolution": "node",
+ "emitDecoratorMetadata": true,
+ "experimentalDecorators": true,
+ "target": "es5",
+ "typeRoots": [
+ "node_modules/@types"
+ ],
+ "lib": [
+ "es2016",
+ "dom"
+ ]
+ }
+}
diff --git a/openvidu-server/src/main/resources/frontend/tslint.json b/openvidu-server/src/main/resources/frontend/tslint.json
new file mode 100644
index 00000000..9113f136
--- /dev/null
+++ b/openvidu-server/src/main/resources/frontend/tslint.json
@@ -0,0 +1,116 @@
+{
+ "rulesDirectory": [
+ "node_modules/codelyzer"
+ ],
+ "rules": {
+ "callable-types": true,
+ "class-name": true,
+ "comment-format": [
+ true,
+ "check-space"
+ ],
+ "curly": true,
+ "eofline": true,
+ "forin": true,
+ "import-blacklist": [true, "rxjs"],
+ "import-spacing": true,
+ "indent": [
+ true,
+ "spaces"
+ ],
+ "interface-over-type-literal": true,
+ "label-position": true,
+ "max-line-length": [
+ true,
+ 140
+ ],
+ "member-access": false,
+ "member-ordering": [
+ true,
+ "static-before-instance",
+ "variables-before-functions"
+ ],
+ "no-arg": true,
+ "no-bitwise": true,
+ "no-console": [
+ true,
+ "debug",
+ "info",
+ "time",
+ "timeEnd",
+ "trace"
+ ],
+ "no-construct": true,
+ "no-debugger": true,
+ "no-duplicate-variable": true,
+ "no-empty": false,
+ "no-empty-interface": true,
+ "no-eval": true,
+ "no-inferrable-types": [true, "ignore-params"],
+ "no-shadowed-variable": true,
+ "no-string-literal": false,
+ "no-string-throw": true,
+ "no-switch-case-fall-through": true,
+ "no-trailing-whitespace": true,
+ "no-unused-expression": true,
+ "no-use-before-declare": true,
+ "no-var-keyword": true,
+ "object-literal-sort-keys": false,
+ "one-line": [
+ true,
+ "check-open-brace",
+ "check-catch",
+ "check-else",
+ "check-whitespace"
+ ],
+ "prefer-const": true,
+ "quotemark": [
+ true,
+ "single"
+ ],
+ "radix": true,
+ "semicolon": [
+ "always"
+ ],
+ "triple-equals": [
+ true,
+ "allow-null-check"
+ ],
+ "typedef-whitespace": [
+ true,
+ {
+ "call-signature": "nospace",
+ "index-signature": "nospace",
+ "parameter": "nospace",
+ "property-declaration": "nospace",
+ "variable-declaration": "nospace"
+ }
+ ],
+ "typeof-compare": true,
+ "unified-signatures": true,
+ "variable-name": false,
+ "whitespace": [
+ true,
+ "check-branch",
+ "check-decl",
+ "check-operator",
+ "check-separator",
+ "check-type"
+ ],
+
+ "directive-selector": [true, "attribute", "app", "camelCase"],
+ "component-selector": [true, "element", "app", "kebab-case"],
+ "use-input-property-decorator": true,
+ "use-output-property-decorator": true,
+ "use-host-property-decorator": true,
+ "no-input-rename": true,
+ "no-output-rename": true,
+ "use-life-cycle-interface": true,
+ "use-pipe-transform-interface": true,
+ "component-class-suffix": true,
+ "directive-class-suffix": true,
+ "no-access-missing-member": true,
+ "templates-use-public": true,
+ "invoke-injectable": true
+ }
+}