[Admin|Trunk]

package json: build add flag --prod
make corrections for the build to succeed.




git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@56471 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2019-07-10 12:55:16 +00:00
parent f171414020
commit c1ffb065e4
22 changed files with 42 additions and 40 deletions

View File

@ -5,7 +5,7 @@
"scripts": {
"ng": "ng",
"start": "ng serve --host 0.0.0.0 --disable-host-check --port=5000",
"build": "ng build --output-hashing all",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"

View File

@ -31,6 +31,7 @@ import {SubscribeService} from './openaireLibrary/utils/subscribe/subscribe.serv
import {ConnectRIGuard} from './openaireLibrary/connect/communityGuard/connectRIGuard.guard';
import {SideBarModule} from "./openaireLibrary/sharedComponents/sidebar/sideBar.module";
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {CommunityErrorModule} from './openaireLibrary/connect/communityGuard/communityError.module';
@NgModule({
imports: [
@ -44,11 +45,11 @@ import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
AlertModalModule, SafeHtmlPipeModule, FABModule,
InteractiveMiningModule,
SideBarModule,
BrowserAnimationsModule
BrowserAnimationsModule, CommunityErrorModule
],
declarations: [
AppComponent,
CommunityErrorPageComponent,
// CommunityErrorPageComponent,
AdminErrorPageComponent
],
providers: [

View File

@ -2,8 +2,8 @@
<div>
<form class="uk-text-center uk-animation uk-card uk-card-default uk-padding">
<div>
<input type="text" class="uk-input uk-width-1-2" placeholder="Search content providers in OpenAIRE..." aria-describedby="sizing-addon2" [(ngModel)]="keyword" name="keyword" >
<button (click)="keywordChanged(keyword)" type="submit" class=" uk-button">
<input type="text" class="uk-input uk-width-1-2" placeholder="Search content providers in OpenAIRE..." aria-describedby="sizing-addon2" [(ngModel)]="openaireSearchUtils.keyword" name="keyword" >
<button (click)="keywordChanged(openaireSearchUtils.keyword)" type="submit" class=" uk-button">
<span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
</span>Search

View File

@ -34,7 +34,7 @@ export class AddContentProvidersComponent implements OnInit {
public rowsOnPage:number = 10;
public routerHelper:RouterHelper = new RouterHelper();
private errorCodes: ErrorCodes;
public errorCodes: ErrorCodes;
public openaireSearchUtils:SearchUtilsClass = new SearchUtilsClass();
public properties:EnvProperties = null;
public pagingLimit:number = 0;

View File

@ -12,8 +12,8 @@
<div>
<form class="uk-text-center uk-animation uk-card uk-card-default uk-padding">
<div>
<input type="text" class="uk-input uk-width-1-2" placeholder="Project name or ID" aria-describedby="sizing-addon2" [(ngModel)]="keyword" name="keyword" >
<button (click)="keywordChanged(keyword)" type="submit" class=" uk-button">
<input type="text" class="uk-input uk-width-1-2" placeholder="Project name or ID" aria-describedby="sizing-addon2" [(ngModel)]="openaireSearchUtils.keyword" name="keyword" >
<button (click)="keywordChanged(openaireSearchUtils.keyword)" type="submit" class=" uk-button">
<span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
</span>Search

View File

@ -41,7 +41,7 @@ export class AddProjectsComponent implements OnInit {
public rowsOnPage:number = 10;
public routerHelper:RouterHelper = new RouterHelper();
private errorCodes: ErrorCodes;
public errorCodes: ErrorCodes;
public openaireSearchUtils:SearchUtilsClass = new SearchUtilsClass();
public properties:EnvProperties = null;
public pagingLimit:number = 0;

View File

@ -32,7 +32,7 @@ export class RemoveProjectsComponent implements OnInit {
private community: string = '';
private communityUrl = "https://beta.explore.openaire.eu";
private errorCodes: ErrorCodes;
public errorCodes: ErrorCodes;
@Output() communityProjectsChanged = new EventEmitter();
public communityProjects = [];

View File

@ -36,7 +36,7 @@ export class CuratorComponent implements OnInit {
private file: File = null;
private maxsize: number = 200*1024;
private enabled = true;
public enabled = true;
private deletePhoto = false;
constructor(private element: ElementRef,
@ -168,7 +168,7 @@ export class CuratorComponent implements OnInit {
this.affiliationsChanged = false;
}
private resetMessages() {
public resetMessages() {
this.successfulSaveMessage = '';
this.updateErrorMessage = '';
}

View File

@ -14,7 +14,8 @@
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'" class="uk-animation-fade uk-width-1-1" role="alert"><img class="uk-align-center loading-gif"></div>
<div-content-form [communityPid]="communityPid" [pageId]="pageId" [editMode]="true" [group]="formGroup" [updateErrorMessage]="updateErrorMessage"></div-content-form>
<div-content-form [communityPid]="communityPid" [pageId]="pageId" [editMode]="true"
[updateErrorMessage]="updateErrorMessage"></div-content-form>
<button (click)="saveCustom()" class="uk-button uk-button-primary">Update class help text</button>
<button (click)="cancelCustom()" class="uk-button">Cancel</button>
</div>

View File

@ -117,7 +117,7 @@ export class EditDivHelpContentComponent implements OnInit, OnDestroy{
this.formComponent.myForm.patchValue((divHelpContent));
}
private saveCustom() {
public saveCustom() {
if(!Session.isLoggedIn()){
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
@ -144,7 +144,7 @@ export class EditDivHelpContentComponent implements OnInit, OnDestroy{
}
}
private cancelCustom() {
public cancelCustom() {
this.errorMessage = "";
this.updateErrorMessage = "";

View File

@ -14,7 +14,7 @@
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'" class="uk-animation-fade uk-width-1-1" role="alert"><img class="uk-align-center loading-gif"></div>
<div-content-form [communityPid]="communityPid" [pageId]="pageId" [group]="formGroup" [updateErrorMessage]="updateErrorMessage"></div-content-form>
<div-content-form [communityPid]="communityPid" [pageId]="pageId" [updateErrorMessage]="updateErrorMessage"></div-content-form>
<button (click)="saveCustom()" class="uk-button uk-button-primary">Save class help text</button>
<button (click)="cancelCustom()" class="uk-button">Cancel</button>
</div>

View File

@ -21,9 +21,9 @@ export class NewDivHelpContentComponent {
//private errorMessage : string = null;
private communityPid: string;
public communityPid: string;
private pageId: string;
public pageId: string;
public properties:EnvProperties = null;
public showLoading: boolean = false;
@ -49,7 +49,7 @@ export class NewDivHelpContentComponent {
});
}
private saveCustom() {
public saveCustom() {
if(!Session.isLoggedIn()){
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
@ -76,7 +76,7 @@ export class NewDivHelpContentComponent {
}
}
private cancelCustom() {
public cancelCustom() {
if(this.pageId) {
this.router.navigate( ['/classContents/'], { queryParams: { "communityId": this.communityPid, "pageId": this.pageId } } );
} else {

View File

@ -14,7 +14,7 @@
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'" class="uk-animation-fade uk-width-1-1" role="alert"><img class="uk-align-center loading-gif"></div>
<page-content-form [communityPid]="communityPid" [pageId]="pageId" [group]="formGroup" [updateErrorMessage]="updateErrorMessage"></page-content-form>
<page-content-form [communityPid]="communityPid" [pageId]="pageId" [updateErrorMessage]="updateErrorMessage"></page-content-form>
<button (click)="saveCustom()" class="uk-button uk-button-primary">Update help text</button>
<button (click)="cancelCustom()" class="uk-button">Cancel</button>
</div>

View File

@ -23,9 +23,9 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
@ViewChild(PageContentFormComponent)
public formComponent : PageContentFormComponent;
private communityPid: string;
public communityPid: string;
private pageId: string;
public pageId: string;
private sub: Subscription;
@ -98,7 +98,7 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
// console.log("patching",pageHelpContent);
}
private saveCustom() {
public saveCustom() {
if(!Session.isLoggedIn()){
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
@ -124,7 +124,7 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
}
}
private cancelCustom() {
public cancelCustom() {
this.errorMessage = "";
this.updateErrorMessage = "";

View File

@ -15,7 +15,7 @@
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'" class="uk-animation-fade uk-width-1-1" role="alert"><img class="uk-align-center loading-gif"></div>
<page-content-form [communityPid]="communityPid" [pageId]="pageId" [group]="formGroup" [updateErrorMessage]="updateErrorMessage"></page-content-form>
<page-content-form [communityPid]="communityPid" [pageId]="pageId" [updateErrorMessage]="updateErrorMessage"></page-content-form>
<button (click)="saveCustom()" class="uk-button uk-button-primary">Save help text</button>
<button (click)="cancelCustom()" class="uk-button">Cancel</button>
</div>

View File

@ -24,9 +24,9 @@ export class NewPageHelpContentComponent {
//private errorMessage : string = null;
private communityPid: string;
public communityPid: string;
private pageId: string;
public pageId: string;
public properties:EnvProperties = null;
public showLoading: boolean = false;
@ -52,7 +52,7 @@ export class NewPageHelpContentComponent {
});
}
private saveCustom() {
public saveCustom() {
if(!Session.isLoggedIn()){
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
@ -81,7 +81,7 @@ export class NewPageHelpContentComponent {
}
}
private cancelCustom() {
public cancelCustom() {
if(this.pageId) {
this.router.navigate( ['/pageContents/'], { queryParams: { "communityId": this.communityPid, "pageId": this.pageId } } );
} else {

View File

@ -15,7 +15,7 @@
<div [style.display]="showLoading ? 'inline' : 'none'" class="uk-animation-fade uk-width-1-1" role="alert"><img class="uk-align-center loading-gif"></div>
<!-- [mode]="mode" -->
<html-page-content-form [communityPid]="communityPid" [pageId]="pageId" [group]="formGroup" [updateErrorMessage]="updateErrorMessage"></html-page-content-form>
<html-page-content-form [communityPid]="communityPid" [pageId]="pageId" [updateErrorMessage]="updateErrorMessage"></html-page-content-form>
<button (click)="saveCustom()" class="uk-button uk-button-primary">Update html page</button>
<button (click)="cancelCustom()" class="uk-button">Cancel</button>
</div>

View File

@ -24,9 +24,9 @@ export class EditHtmlPageContentComponent implements OnInit {
@ViewChild(HtmlPageContentFormComponent)
public formComponent : HtmlPageContentFormComponent;
private communityPid: string;
private pageId: string;
private pageName: string = "";
communityPid: string;
pageId: string;
pageName: string = "";
//public mode: string = "edit";
private sub: Subscription;
@ -118,7 +118,7 @@ export class EditHtmlPageContentComponent implements OnInit {
this.formComponent.myForm.patchValue((htmlPageContent));
}
private saveCustom() {
saveCustom() {
if(!Session.isLoggedIn()){
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
@ -152,7 +152,7 @@ export class EditHtmlPageContentComponent implements OnInit {
}
}
private cancelCustom() {
cancelCustom() {
this.errorMessage = "";
this.updateErrorMessage = "";
this.router.navigate(['/pages'], { queryParams: { "type": "html", "communityId": this.communityPid}});

View File

@ -5,7 +5,7 @@
<span class="uk-margin-small-right uk-icon" uk-icon="info"></span>
Edit html page content
</div>
<form *ngIf="!errorMessage && !showLoading" [formGroup]="myForm">
<form *ngIf="!errorMessage" [formGroup]="myForm">
<div class="form-group" [ngClass]="{'has-error':!myForm.controls.content.valid && myForm.controls.content.dirty}">
<!-- uk-tab="connect: #html-tab-content" -->
<ul id="html-tab" uk-tab>

View File

@ -59,4 +59,4 @@
</div>
<modal-alert #AlertModalDeleteSubscriber (alertOutput)="confirmedDeleteSubscriber($event)"></modal-alert>
<modal-alert #AlertModalDeleteSubscriber (alertOutput)="confirmedDeleteSubscriber()"></modal-alert>

View File

@ -28,7 +28,7 @@ export class AddZenodoCommunitiesComponent implements OnInit {
public zenodoCommunitySearchUtils:SearchUtilsClass = new SearchUtilsClass();
private errorCodes: ErrorCodes;
errorCodes: ErrorCodes;
public rowsOnPage = 10;
@Input() masterCommunity = null;
@Input() selectedCommunities = [];

View File

@ -36,7 +36,7 @@ export class ManageZenodoCommunitiesComponent implements OnInit {
@Input() searchUtils:SearchUtilsClass = null;
private errorCodes: ErrorCodes;
errorCodes: ErrorCodes;
public rowsOnPage = 10;
@Input() masterCommunity = null;
@Input() selectedCommunities = [];