Minor fixes
This commit is contained in:
parent
30e3aac428
commit
f169394f07
|
@ -102,11 +102,11 @@
|
||||||
|
|
||||||
|
|
||||||
<!-- new profile editor -->
|
<!-- new profile editor -->
|
||||||
|
<!--
|
||||||
<div [ngClass]="{true:'visible', false:'invisible'}[viewingComponent==2]">
|
<div [ngClass]="{true:'visible', false:'invisible'}[viewingComponent==2]">
|
||||||
<dataset-profile-gui-editor [profile]=profile (notifyClick)="goToMain()" ></dataset-profile-gui-editor>
|
<dataset-profile-gui-editor [profile]=profile (notifyClick)="goToMain()" ></dataset-profile-gui-editor>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
<!-- end of new profile editor -->
|
<!-- end of new profile editor -->
|
||||||
|
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@
|
||||||
|
|
||||||
<!-- OLD Profile Editor -->
|
<!-- OLD Profile Editor -->
|
||||||
|
|
||||||
<!--
|
|
||||||
<div [ngClass]="{true:'visible', false:'invisible'}[viewingComponent==2]">
|
<div [ngClass]="{true:'visible', false:'invisible'}[viewingComponent==2]">
|
||||||
<div class="panel panel-default margin10">
|
<div class="panel panel-default margin10">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
|
@ -189,6 +189,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
-->
|
|
||||||
<!-- End of OLD Profile Editor -->
|
<!-- End of OLD Profile Editor -->
|
||||||
|
|
||||||
|
|
|
@ -38,19 +38,18 @@
|
||||||
</div><!-- /.navbar-collapse -->
|
</div><!-- /.navbar-collapse -->
|
||||||
</div><!-- /.container-fluid -->
|
</div><!-- /.container-fluid -->
|
||||||
</nav>
|
</nav>
|
||||||
<!--
|
|
||||||
-->
|
<router-outlet [ngClass]="{true:'visible'}[tokenService.isLoggedIn() == true]" ></router-outlet>
|
||||||
<router-outlet ></router-outlet>
|
|
||||||
<!--
|
<!--
|
||||||
<main-window [ngClass]="{false:'invisible'}[tokenService.isLoggedIn() == true]"></main-window>
|
<main-window [ngClass]="{false:'invisible'}[tokenService.isLoggedIn() == true]"></main-window>
|
||||||
-->
|
-->
|
||||||
<!--
|
|
||||||
<app-main-sign-in [ngClass]="{true:'invisible'}[tokenService.isLoggedIn() == true]"></app-main-sign-in>
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--this should be invisible -->
|
||||||
<router-outlet></router-outlet>
|
<app-main-sign-in [ngClass]="'invisible'"></app-main-sign-in>
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component, OnInit} from '@angular/core';
|
||||||
import { ServerService } from './services/server.service';
|
import { ServerService } from './services/server.service';
|
||||||
import { FieldBase } from '../app/form/fields/field-base';
|
import { FieldBase } from '../app/form/fields/field-base';
|
||||||
import { JsonObjest } from '../app/entities/JsonObject.class';
|
import { JsonObjest } from '../app/entities/JsonObject.class';
|
||||||
|
@ -12,13 +12,19 @@ import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component
|
||||||
styleUrls: ['./app.component.css'],
|
styleUrls: ['./app.component.css'],
|
||||||
providers: []
|
providers: []
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent implements OnInit {
|
||||||
|
|
||||||
fields: any[];
|
fields: any[];
|
||||||
|
|
||||||
|
|
||||||
constructor(private tokenService : TokenService, private router: Router) {
|
constructor(private tokenService : TokenService, private router: Router) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -92,10 +92,10 @@ export class DatasetsComponent implements OnInit {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() { debugger;
|
ngOnInit() {
|
||||||
//this.projects = this.serverService.getDummyProjects();
|
//this.projects = this.serverService.getDummyProjects();
|
||||||
this.datasets = [];
|
this.datasets = [];
|
||||||
console.log(this.dmpIdforDatasets);debugger;
|
console.log(this.dmpIdforDatasets);
|
||||||
this.serverService.getDatasetForDmp({ "id": this.dmpIdforDatasets }).subscribe(
|
this.serverService.getDatasetForDmp({ "id": this.dmpIdforDatasets }).subscribe(
|
||||||
response => {
|
response => {
|
||||||
this.tableData = response;
|
this.tableData = response;
|
||||||
|
|
|
@ -93,19 +93,12 @@ export class DmpComponent implements OnInit{
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
//this.projects = this.serverService.getDummyProjects();
|
//this.projects = this.serverService.getDummyProjects();
|
||||||
gapi.load('auth2', function() {
|
|
||||||
gapi.auth2.init({});
|
|
||||||
});
|
|
||||||
this.serverService.getDmpOfUser().subscribe(
|
this.serverService.getDmpOfUser().subscribe(
|
||||||
response => {
|
response => {
|
||||||
this.tableData = response;
|
this.tableData = response;
|
||||||
},
|
},
|
||||||
(err: HttpErrorResponse) => {
|
(err: HttpErrorResponse) => {
|
||||||
if (err.error instanceof Error) {
|
|
||||||
console.log("An error occurred:", err.error.message);
|
|
||||||
} else {
|
|
||||||
console.log("Backend returned code ${err.status}, body was: ${err.error}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -135,11 +128,7 @@ getDmps(){
|
||||||
this.tableData = response;
|
this.tableData = response;
|
||||||
},
|
},
|
||||||
(err: HttpErrorResponse) => {
|
(err: HttpErrorResponse) => {
|
||||||
if (err.error instanceof Error) {
|
|
||||||
console.log("An error occurred:", err.error.message);
|
|
||||||
} else {
|
|
||||||
console.log("Backend returned code ${err.status}, body was: ${err.error}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -169,8 +158,7 @@ updateDMP(){
|
||||||
this.serverService.updateDmp(this.dmp)
|
this.serverService.updateDmp(this.dmp)
|
||||||
.subscribe(
|
.subscribe(
|
||||||
response =>{
|
response =>{
|
||||||
console.log("response");
|
this.getDmps();
|
||||||
console.log(response);
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
$("#newDmpModal").modal("hide");
|
$("#newDmpModal").modal("hide");
|
||||||
|
|
|
@ -195,6 +195,3 @@
|
||||||
|
|
||||||
<!--DATASET TABLE-->
|
<!--DATASET TABLE-->
|
||||||
<datasets-table *ngIf="dataSetVisibe" [dmpIdforDatasets]="dmpIdforDatasets" [dmpLabelforDatasets]="dmpLabelforDatasets" [(dataSetVisibe)]="dataSetVisibe"></datasets-table>
|
<datasets-table *ngIf="dataSetVisibe" [dmpIdforDatasets]="dmpIdforDatasets" [dmpLabelforDatasets]="dmpLabelforDatasets" [(dataSetVisibe)]="dataSetVisibe"></datasets-table>
|
||||||
|
|
||||||
<a href="#" (click)="signOut();" #isignOutBtn>Sign out</a>
|
|
||||||
<router-outlet></router-outlet>
|
|
|
@ -60,7 +60,7 @@ export class GooggleSignInComponent implements OnInit, AfterViewInit {
|
||||||
this.router.navigate(['/dmps'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
this.router.navigate(['/dmps'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
simple_notifier("danger",null,"Failed to login");
|
//simple_notifier("danger",null,"Failed to login");
|
||||||
console.log(JSON.stringify(error, undefined, 2));
|
console.log(JSON.stringify(error, undefined, 2));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { Pipe, PipeTransform } from "@angular/core";
|
||||||
export class DatasetStatusFilterPipe implements PipeTransform {
|
export class DatasetStatusFilterPipe implements PipeTransform {
|
||||||
|
|
||||||
transform(array: any[], status: string): any {
|
transform(array: any[], status: string): any {
|
||||||
debugger;
|
|
||||||
|
|
||||||
if (status) {
|
if (status) {
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,3 @@
|
||||||
|
|
||||||
<!--DATASET TABLE-->
|
<!--DATASET TABLE-->
|
||||||
<datasets-table *ngIf="dataSetVisibe" [(dataSetVisibe)]="dataSetVisibe"></datasets-table> <!--*ngIf="dataSetVisibe == true"-->
|
<datasets-table *ngIf="dataSetVisibe" [(dataSetVisibe)]="dataSetVisibe"></datasets-table> <!--*ngIf="dataSetVisibe == true"-->
|
||||||
|
|
||||||
<a href="#" (click)="signOut();" #isignOutBtn >Sign out</a>
|
|
||||||
<router-outlet></router-outlet>
|
|
|
@ -83,17 +83,13 @@ export class ProjectsComponent implements OnInit{
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
gapi.load('auth2', function() {
|
|
||||||
gapi.auth2.init({});
|
|
||||||
});
|
|
||||||
this.getProjects();
|
|
||||||
//this.projects = this.serverService.getDummyProjects();
|
|
||||||
this.projects = [];
|
this.projects = [];
|
||||||
|
this.getProjects();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getProjects(){
|
getProjects(){
|
||||||
this.serverService.getProjectOfUer().subscribe( //getProjects()
|
this.serverService.getProjectOfUer().subscribe(
|
||||||
response => {
|
response => {
|
||||||
this.tableData = response;
|
this.tableData = response;
|
||||||
|
|
||||||
|
@ -191,10 +187,6 @@ editRow(item, event){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
signOut() {
|
|
||||||
this.serverService.logOut();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ export class GlobalInterceptor implements HttpInterceptor {
|
||||||
}, (err: any) => {
|
}, (err: any) => {
|
||||||
if (err instanceof HttpErrorResponse) {
|
if (err instanceof HttpErrorResponse) {
|
||||||
if (err.status === 401) {
|
if (err.status === 401) {
|
||||||
|
console.log("Received an unauthorized... redirecting to login page");
|
||||||
this.tokenService.logout();
|
this.tokenService.logout();
|
||||||
this.router.navigate(['/login'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
this.router.navigate(['/login'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,18 +17,21 @@ export class RestBase {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
protocol: string = "http";
|
protocol: string = "http";
|
||||||
hostname: string ="dl010.madgik.di.uoa.gr" ;//"localhost";//"dl010.madgik.di.uoa.gr";//
|
hostname: string ="dl010.madgik.di.uoa.gr" ;//"localhost";//"dl010.madgik.di.uoa.gr";//
|
||||||
port: number = 8080;//8080;//
|
port: number = 8080;//8080;//
|
||||||
webappname: string = "dmp-backend";//"dmp-backend-new";//
|
webappname: string = "dmp-backend";//"dmp-backend-new";//
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*protocol: string = "http";
|
protocol: string = "http";
|
||||||
hostname: string = "dionysus.di.uoa.gr" ;
|
hostname: string = "dionysus.di.uoa.gr" ;
|
||||||
port: number = 7070;
|
port: number = 7070;
|
||||||
webappname: string = "dmp-backend";*/
|
webappname: string = "dmp-backend";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
proxyPath : string = this.protocol+"://"+this.hostname+":"+this.port+"/"+this.webappname+"/proxy/";
|
proxyPath : string = this.protocol+"://"+this.hostname+":"+this.port+"/"+this.webappname+"/proxy/";
|
||||||
|
|
Loading…
Reference in New Issue