-
+
+ class="uk-logo uk-navbar-item uk-flex uk-flex-middle" [class.small]="activeHeader.logoInfo">
@@ -322,7 +329,7 @@
+ class="uk-logo uk-navbar-item uk-flex uk-flex-middle" [class.small]="activeHeader.logoInfo">
diff --git a/sharedComponents/navigationBar.component.ts b/sharedComponents/navigationBar.component.ts
index a24eb2d0..4f3cf8e4 100644
--- a/sharedComponents/navigationBar.component.ts
+++ b/sharedComponents/navigationBar.component.ts
@@ -8,6 +8,7 @@ import {Subscription} from 'rxjs';
import {HelpContentService} from '../services/help-content.service';
import {properties} from "../../../environments/environment";
import {LayoutService} from "../dashboard/sharedComponents/sidebar/layout.service";
+import {NotificationConfiguration} from "../notifications/notifications-sidebar/notifications-sidebar.component";
declare var UIkit;
@@ -48,6 +49,7 @@ export class NavigationBarComponent implements OnInit, OnDestroy, OnChanges {
@Input() searchRoute: string = '/search/find';
@Input() searchPlaceHolder: string = 'Search for research results';
@Input() showLogo: boolean = true;
+ @Input() notificationConfiguration: NotificationConfiguration;
replaceHeader: boolean = false;
public activeHeader: Header;
keyword: string = '';
diff --git a/sharedComponents/quick-contact/quick-contact.service.ts b/sharedComponents/quick-contact/quick-contact.service.ts
index 0ddcdcc7..c31a742c 100644
--- a/sharedComponents/quick-contact/quick-contact.service.ts
+++ b/sharedComponents/quick-contact/quick-contact.service.ts
@@ -5,7 +5,7 @@ import { BehaviorSubject, Observable } from "rxjs";
providedIn: "root"
})
export class QuickContactService {
- private display: BehaviorSubject = new BehaviorSubject(true);
+ private display: BehaviorSubject = new BehaviorSubject(false);
public get isDisplayed(): Observable {
return this.display.asObservable();
diff --git a/sharedComponents/slider-utils/slider-arrow.component.ts b/sharedComponents/slider-utils/slider-arrow.component.ts
index 37f28509..3119934e 100644
--- a/sharedComponents/slider-utils/slider-arrow.component.ts
+++ b/sharedComponents/slider-utils/slider-arrow.component.ts
@@ -3,7 +3,7 @@ import {Component, Input} from "@angular/core";
@Component({
selector: 'slider-arrow',
template: `
-
+
@@ -22,4 +22,4 @@ export class SliderArrowComponent {
get icon() {
return (this.type == 'previous')?'chevron_left':'chevron_right'
}
-}
\ No newline at end of file
+}
diff --git a/sharedComponents/tabs/slider-tabs.component.ts b/sharedComponents/tabs/slider-tabs.component.ts
index 6c420987..59149387 100644
--- a/sharedComponents/tabs/slider-tabs.component.ts
+++ b/sharedComponents/tabs/slider-tabs.component.ts
@@ -27,21 +27,21 @@ declare var UIkit;
[attr.uk-switcher]="type === 'static'?('connect:' + connect):null"
[ngClass]="'uk-flex-' + flexPosition + ' ' + tabsClass">
- -
+
-
{{tab.title}}
- -
{{tab.title}}
- -
+
-
{{tab.title}}
- -
- -
+
-
{{tab.title}}
- -
{{tab.title}}
@@ -206,6 +206,7 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
public showActive(index) {
this.activeIndex = index;
+ this.activeEmitter.emit(this.tabs.get(this.activeIndex).id);
if(this.slider) {
this.slider.show(this.activeIndex);
}
diff --git a/utils/dataTransfer/transferData.component.ts b/utils/dataTransfer/transferData.component.ts
index 18876f96..3f2ee259 100644
--- a/utils/dataTransfer/transferData.component.ts
+++ b/utils/dataTransfer/transferData.component.ts
@@ -89,7 +89,7 @@ export class EGIDataTransferComponent {
}
ngAfterViewInit() {
- if(this.isOpen){
+ if(this.isOpen && typeof document !== 'undefined'){
this.open();
}
}
diff --git a/utils/full-page-slider/full-page-slider.module.ts b/utils/full-page-slider/full-page-slider.module.ts
index 5931bef7..1dd8a466 100644
--- a/utils/full-page-slider/full-page-slider.module.ts
+++ b/utils/full-page-slider/full-page-slider.module.ts
@@ -4,16 +4,10 @@ import {FullPageSliderComponent} from "./full-page-slider.component";
import {SlideComponent} from "./slide.component";
import {BottomModule} from '../../sharedComponents/bottom.module';
import {IconsModule} from '../icons/icons.module';
-import {IconsService} from '../icons/icons.service';
-import {arrow_down, arrow_up} from '../icons/icons';
@NgModule({
imports: [CommonModule, BottomModule, IconsModule],
declarations: [FullPageSliderComponent, SlideComponent],
exports: [FullPageSliderComponent, SlideComponent],
})
-export class FullPageSliderModule {
- constructor(private iconsService: IconsService) {
- this.iconsService.registerIcons([arrow_up, arrow_down]);
- }
-}
+export class FullPageSliderModule {}
diff --git a/utils/modal/alert.ts b/utils/modal/alert.ts
index be4bb605..2c79afbb 100644
--- a/utils/modal/alert.ts
+++ b/utils/modal/alert.ts
@@ -1,4 +1,14 @@
-import {Component, ElementRef, EventEmitter, Input, Output, ViewChild, ViewEncapsulation} from '@angular/core';
+import {
+ AfterViewInit,
+ Component,
+ ElementRef,
+ EventEmitter,
+ Input, OnDestroy,
+ OnInit,
+ Output,
+ ViewChild,
+ ViewEncapsulation
+} from '@angular/core';
declare var UIkit: any;
@@ -48,7 +58,7 @@ declare var UIkit: any;
/**
* API to an open alert window.
*/
-export class AlertModal {
+export class AlertModal implements OnInit, AfterViewInit, OnDestroy {
private static MODAL_COUNTER: number = 0;
id: string = "modal";
@@ -136,6 +146,7 @@ export class AlertModal {
@Output() public cancelOutput: EventEmitter
= new EventEmitter();
@ViewChild('element') element: ElementRef;
+ private subscriptions: any[] = [];
constructor() {
}
@@ -145,6 +156,14 @@ export class AlertModal {
this.id = 'modal-' + AlertModal.MODAL_COUNTER;
}
+ ngAfterViewInit() {
+ if(this.element && typeof document !== "undefined") {
+ this.subscriptions.push(UIkit.util.on(document, 'hide', '#' + this.id, () => {
+ this.cancelOutput.emit(true);
+ }));
+ }
+ }
+
ngOnDestroy() {
if(typeof document !== "undefined") {
const element = document.getElementById("modal-container");
@@ -155,20 +174,27 @@ export class AlertModal {
}
}
}
+ this.subscriptions.forEach(subscription => {
+ if(subscription instanceof Function) {
+ subscription();
+ }
+ });
}
/**
* Opens an alert window creating backdrop.
*/
open() {
- UIkit.modal(this.element.nativeElement).show();
+ if(typeof UIkit !== "undefined") {
+ UIkit.modal(this.element.nativeElement).show();
+ }
}
/**
* ok method closes the modal and emits modalOutput.
*/
ok() {
- if (!this.stayOpen) {
+ if (!this.stayOpen && typeof UIkit !== "undefined") {
UIkit.modal(this.element.nativeElement).hide();
}
if (!this.choice) {
@@ -185,7 +211,8 @@ export class AlertModal {
* cancel method closes the modal.
*/
cancel() {
- UIkit.modal(this.element.nativeElement).hide();
- this.cancelOutput.emit(true);
+ if(typeof UIkit !== "undefined") {
+ UIkit.modal(this.element.nativeElement).hide();
+ }
}
}
diff --git a/utils/number-utils.class.ts b/utils/number-utils.class.ts
index 61054a75..4e17cfb1 100644
--- a/utils/number-utils.class.ts
+++ b/utils/number-utils.class.ts
@@ -1,5 +1,5 @@
export enum Level {
- NONE,
+ ALL,
K,
M,
B
@@ -14,7 +14,8 @@ export interface NumberSize {
export class NumberUtils {
- public static roundNumber(num: number, level: Level = Level.NONE, decimal = 0): any {
+ public static roundNumber(num: number | string, level: Level = Level.ALL, decimal = 0): any {
+ num = Number.parseFloat(num.toString());
let roundNum: NumberSize;
let initialNum = num;
let variance = Math.pow(10, decimal);
@@ -30,11 +31,6 @@ export class NumberUtils {
num = num / 1000;
num = Math.round(num * variance) / variance;
roundNum = {number: num, size: "K", count: initialNum};
- } else if (num >= 100) {
- num = num / 100;
- num = Math.round(num * variance) / variance;
- num = num * 100;
- roundNum = {number: num, size: "", count: initialNum};
} else {
roundNum = {number: num, size: "", count: initialNum};
}
diff --git a/utils/pipes/number-round.pipe.ts b/utils/pipes/number-round.pipe.ts
index 62608761..b42a93aa 100644
--- a/utils/pipes/number-round.pipe.ts
+++ b/utils/pipes/number-round.pipe.ts
@@ -5,19 +5,24 @@ import {DecimalPipe} from "@angular/common";
@Pipe({name: 'numberRound'})
export class NumberRoundPipe implements PipeTransform {
decimalPipe: DecimalPipe = new DecimalPipe("en");
-
- constructor() {}
-
- transform(value: number, ...args: any[]): any {
- let level = Level.NONE;
+
+ constructor() {
+ }
+
+ /**
+ * Args: Level: 0 (default): ALL, 1: K, 2: M, 3:B
+ * Decimal: how many decimals should be shown (e.g 1 -> 62.1)
+ * */
+ transform(value: number | string, ...args: any[]): any {
+ let level = Level.ALL;
let decimal = 0;
- if(args[0]) {
+ if (args[0]) {
level = args[0];
}
- if(args[1]) {
+ if (args[1]) {
decimal = args[1];
}
let size: NumberSize = NumberUtils.roundNumber(value, level, decimal);
- return this.decimalPipe.transform(size.number) + (size.size?'' + size.size + '':'');
+ return this.decimalPipe.transform(size.number) + (size.size ? '' + size.size + '' : '');
}
}
diff --git a/utils/properties/env-properties.ts b/utils/properties/env-properties.ts
index a414667b..868e2e97 100644
--- a/utils/properties/env-properties.ts
+++ b/utils/properties/env-properties.ts
@@ -145,4 +145,5 @@ export interface EnvProperties {
eoscDataTransferAPI?;
eoscDataTransferLoginUrl?;
eoscDataTransferDestinations?;
+ hasMachineCache?: boolean;
}
diff --git a/utils/result-preview/result-preview.component.html b/utils/result-preview/result-preview.component.html
index 23c67d02..e115d92e 100644
--- a/utils/result-preview/result-preview.component.html
+++ b/utils/result-preview/result-preview.component.html
@@ -37,7 +37,7 @@
-