diff --git a/modules/fbs-core/api/src/main/scala/de/thm/ii/fbs/controller/HomeController.scala b/modules/fbs-core/api/src/main/scala/de/thm/ii/fbs/controller/HomeController.scala index c9e8613dd..f2e5e1a36 100644 --- a/modules/fbs-core/api/src/main/scala/de/thm/ii/fbs/controller/HomeController.scala +++ b/modules/fbs-core/api/src/main/scala/de/thm/ii/fbs/controller/HomeController.scala @@ -41,7 +41,7 @@ class HomeController { * Forward every access that is not defined to the index page. * @return Forward undefined access to index. */ - @RequestMapping(value = Array("/courses", "/sqlplayground", "/analytics", "/modelling", "/kanban")) // TODO: Remove as soon as possible + @RequestMapping(value = Array("/courses", "/sqlplayground", "/analytics", "/modelling", "/kanban", "/sci-check")) // TODO: Remove as soon as possible def redirectRoot: String = "forward:/" /** diff --git a/modules/fbs-core/web/src/app/app-routing.module.ts b/modules/fbs-core/web/src/app/app-routing.module.ts index eb0ecfea2..868f765d0 100644 --- a/modules/fbs-core/web/src/app/app-routing.module.ts +++ b/modules/fbs-core/web/src/app/app-routing.module.ts @@ -23,6 +23,7 @@ import { AnalyticsToolComponent } from "./page-components/analytics-tool/analyti import { FbsModellingComponent } from "./page-components/fbs-modelling/fbs-modelling.component"; import { GroupDetailComponent } from "./page-components/group-detail/group-detail.component"; import { FbsKanbanComponent } from "./page-components/fbs-kanban/fbs-kanban.component"; +import { FbsSciCheckComponent } from "./page-components/fbs-sci-check/fbs-sci-check.component"; const routes: Routes = [ { path: "login", component: LoginComponent }, @@ -115,6 +116,12 @@ const routes: Routes = [ component: FbsKanbanComponent, canActivate: [AuthGuard], }, + // Sci-Check + { + path: "sci-check", + component: FbsSciCheckComponent, + canActivate: [AuthGuard], + }, // Admin { path: "admin/user-management", diff --git a/modules/fbs-core/web/src/app/app.module.ts b/modules/fbs-core/web/src/app/app.module.ts index 0acfaa804..850260010 100644 --- a/modules/fbs-core/web/src/app/app.module.ts +++ b/modules/fbs-core/web/src/app/app.module.ts @@ -124,6 +124,7 @@ import { GroupPreviewComponent } from "./page-components/group-preview/group-pre import { GroupDetailComponent } from "./page-components/group-detail/group-detail.component"; import { GroupDeregisterDialogComponent } from "./dialogs/group-deregister-dialog/group-deregister-dialog.component"; import { FbsKanbanComponent } from "./page-components/fbs-kanban/fbs-kanban.component"; +import { FbsSciCheckComponent } from "./page-components/fbs-sci-check/fbs-sci-check.component"; @Injectable() export class ApiURIHttpInterceptor implements HttpInterceptor { @@ -232,6 +233,7 @@ export const httpInterceptorProviders = [ GroupDetailComponent, GroupDeregisterDialogComponent, FbsKanbanComponent, + FbsSciCheckComponent, ], imports: [ BrowserModule, diff --git a/modules/fbs-core/web/src/app/page-components/fbs-sci-check/fbs-sci-check.component.html b/modules/fbs-core/web/src/app/page-components/fbs-sci-check/fbs-sci-check.component.html new file mode 100644 index 000000000..c285f7357 --- /dev/null +++ b/modules/fbs-core/web/src/app/page-components/fbs-sci-check/fbs-sci-check.component.html @@ -0,0 +1 @@ + diff --git a/modules/fbs-core/web/src/app/page-components/fbs-sci-check/fbs-sci-check.component.scss b/modules/fbs-core/web/src/app/page-components/fbs-sci-check/fbs-sci-check.component.scss new file mode 100644 index 000000000..8ff5d6190 --- /dev/null +++ b/modules/fbs-core/web/src/app/page-components/fbs-sci-check/fbs-sci-check.component.scss @@ -0,0 +1,7 @@ +iframe{ + width: 100%; + position: absolute; + left: 0; + height: calc(100% - 64px); + margin-top: -10px; +} diff --git a/modules/fbs-core/web/src/app/page-components/fbs-sci-check/fbs-sci-check.component.ts b/modules/fbs-core/web/src/app/page-components/fbs-sci-check/fbs-sci-check.component.ts new file mode 100644 index 000000000..d635131fd --- /dev/null +++ b/modules/fbs-core/web/src/app/page-components/fbs-sci-check/fbs-sci-check.component.ts @@ -0,0 +1,33 @@ +import { Component, OnInit, ChangeDetectorRef } from "@angular/core"; +import { AuthService } from "src/app/service/auth.service"; +import { TitlebarService } from "src/app/service/titlebar.service"; +import { DomSanitizer, SafeResourceUrl } from "@angular/platform-browser"; + +@Component({ + selector: "app-fbs-sci-check", + templateUrl: "./fbs-sci-check.component.html", + styleUrls: ["./fbs-sci-check.component.scss"], +}) +export class FbsSciCheckComponent implements OnInit { + token: string; + safeUrl: SafeResourceUrl; + + constructor( + private titlebar: TitlebarService, + private auth: AuthService, + private sanitizer: DomSanitizer, + private cdr: ChangeDetectorRef + ) { + this.token = this.auth.loadToken(); + } + ngOnInit() { + this.titlebar.emitTitle("FBS SciCheck"); + } + + getURL(): SafeResourceUrl { + const url = `https://feedback.mni.thm.de/scicheck/#/login?token=${this.token}&iframe=true`; + this.safeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(url); + this.cdr.detach(); // stops iframe from reloading + return this.safeUrl; + } +} diff --git a/modules/fbs-core/web/src/app/page-components/sidebar/sidebar.component.html b/modules/fbs-core/web/src/app/page-components/sidebar/sidebar.component.html index 0bd5f943f..f1d92373f 100644 --- a/modules/fbs-core/web/src/app/page-components/sidebar/sidebar.component.html +++ b/modules/fbs-core/web/src/app/page-components/sidebar/sidebar.component.html @@ -83,6 +83,11 @@

view_kanban

FBS Kanban

+ +