diff --git a/src/app/workspace/backend.service.ts b/src/app/workspace/backend.service.ts index 1f0e48d03813d9a74f52f5594bd49b1ba691227b..66d41e4ba047c4736204d46023d58b6f256873d5 100644 --- a/src/app/workspace/backend.service.ts +++ b/src/app/workspace/backend.service.ts @@ -4,18 +4,24 @@ import {Injectable, Inject} from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { catchError } from 'rxjs/operators'; +import {WorkspaceDataService} from "./workspacedata.service"; +import {MainDataService} from "../maindata.service"; import { ErrorHandler, ServerError } from 'iqb-components'; @Injectable() export class BackendService { private serverUrlSlim = ''; + private serverUrlSysCheck = ''; constructor( @Inject('SERVER_URL') private readonly serverUrl: string, - private http: HttpClient) { + private http: HttpClient, + private wds: WorkspaceDataService, + private mds: MainDataService) { this.serverUrlSlim = this.serverUrl + 'php/ws.php/'; + this.serverUrlSysCheck = this.serverUrl + 'php_admin/'; this.serverUrl = this.serverUrl + 'php/'; } @@ -117,8 +123,9 @@ export class BackendService { } getSysCheckReportList(): Observable<SysCheckStatistics[] | ServerError> { + const loginData = this.mds.loginData$.getValue(); return this.http - .post<SysCheckStatistics[]>(this.serverUrl + 'getSysCheckReportList.php', {}) + .post<SysCheckStatistics[]>(this.serverUrlSysCheck + 'getSysCheckReportList.php', {ws: this.wds.workspaceId$.getValue(), at: loginData.admintoken}) .pipe( catchError(ErrorHandler.handle) ); @@ -126,18 +133,20 @@ export class BackendService { getSysCheckReport(reports: string[], columnDelimiter: string, quoteChar: string): Observable<string[] | ServerError> { + const loginData = this.mds.loginData$.getValue(); return this.http - .post<string[]>(this.serverUrl + 'getSysCheckReport.php', - {r: reports, cd: columnDelimiter, q: quoteChar}) + .post<string[]>(this.serverUrlSysCheck + 'getSysCheckReport.php', + {r: reports, cd: columnDelimiter, q: quoteChar, ws: this.wds.workspaceId$.getValue(), at: loginData.admintoken}) .pipe( catchError(ErrorHandler.handle) ); } deleteSysCheckReports(reports: string[]): Observable<boolean | ServerError> { + const loginData = this.mds.loginData$.getValue(); return this.http - .post<boolean>(this.serverUrl + 'deleteSysCheckReports.php', - {r: reports}) + .post<boolean>(this.serverUrlSysCheck + 'deleteSysCheckReports.php', + {r: reports, ws: this.wds.workspaceId$.getValue(), at: loginData.admintoken}) .pipe( catchError(ErrorHandler.handle) ); diff --git a/src/app/workspace/workspacedata.service.ts b/src/app/workspace/workspacedata.service.ts index 4fee611b1d4b0bb3021e56ff0f5d39a094f98d84..07fc24f00f71db2011b2a7a8bc50cc343dfd82b2 100644 --- a/src/app/workspace/workspacedata.service.ts +++ b/src/app/workspace/workspacedata.service.ts @@ -27,13 +27,13 @@ export class WorkspaceDataService { private navLinksRW = [ {path: 'files', label: 'Dateien'}, - // {path: 'syscheck', label: 'System-Check Berichte'}, + {path: 'syscheck', label: 'System-Check Berichte'}, {path: 'monitor', label: 'Monitor'}, {path: 'results', label: 'Ergebnisse'} ]; private navLinksRO = [ {path: 'files', label: 'Dateien'}, - // {path: 'syscheck', label: 'System-Check Berichte'}, + {path: 'syscheck', label: 'System-Check Berichte'}, {path: 'monitor', label: 'Monitor'}, {path: 'results', label: 'Ergebnisse'} ]; diff --git a/src/environments/environment.build.ts b/src/environments/environment.build.ts index 6d22e96ae76880fc5de9246aefbca9845550538d..b60edfbc375642c3ef367e114779c0c170576792 100644 --- a/src/environments/environment.build.ts +++ b/src/environments/environment.build.ts @@ -2,7 +2,7 @@ export const environment = { production: false, - testcenterUrl: 'https://www.iqb-testcenter.de/admin/', + testcenterUrl: 'https://ocba.iqb.hu-berlin.de/admin/', appName: 'IQB-Testcenter Verwaltung', appPublisher: 'IQB - Institut zur Qualitätsentwicklung im Bildungswesen', appVersion: '1.0 - 8.4.2019' diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index d5f6ab4b49e7815254829a2c9b1211ef69259a24..8a5ba1565dc5453ca553addc4915e3f35b0eeb04 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -5,5 +5,5 @@ export const environment = { testcenterUrl: '/admin/', appName: 'IQB-Testcenter Verwaltung', appPublisher: 'IQB - Institut zur Qualitätsentwicklung im Bildungswesen', - appVersion: '1.0 - 8.4.2019' + appVersion: '1.1 - 10.2.2020' }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 0f4374865fc8a9e28f6c71a78de004af5473177a..aa95c755dfd361bf979fe973f4b11f1d2b7f5c73 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -5,8 +5,8 @@ export const environment = { production: false, - testcenterUrl: 'https://www.iqb-testcenter.de/admin/', + testcenterUrl: 'https://ocba.iqb.hu-berlin.de/admin/', appName: 'IQB-Testcenter Verwaltung', appPublisher: 'IQB - Institut zur Qualitätsentwicklung im Bildungswesen', - appVersion: '0.5 (dev)' + appVersion: '0.53.4 (dev)' };