Project

General

Profile

« Previous | Next » 

Revision 57321

Create monitor component. Move stakeholders.json to assets.

View differences:

modules/uoa-monitor-portal/trunk/monitor/package.json
8 8
  ],
9 9
  "scripts": {
10 10
    "ng": "ng",
11
    "start": " ng serve --disable-host-check --host 0.0.0.0",
11
    "start": " ng serve --port 4500 --disable-host-check --host 0.0.0.0",
12 12
    "start:ssr": "npm run build:ssr && npm run serve:ssr",
13 13
    "start:prerender": "npm run build:prerender && npm run serve:prerender",
14 14
    "build": "ng build",
modules/uoa-monitor-portal/trunk/monitor/src/app/stakeholders.json
1
{
2
 "stakeholders":[
3
  {
4
    "type": "funder",
5
    "name": "European Comission",
6
    "id": "EC",
7
    "isDefaultProfile": false,
8
    "isActive": true,
9
    "isPublic": true,
10
    "creationDate": "08-10-2019",
11
    "updateDate": "08-10-2019",
12
    "managers": null,
13

  
14
    "topics": [{
15
      "name": "Open Science",
16
      "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
17
      "isActive": true,
18
      "isPublic": true,
19
      "categories": [
20
        {
21
        "name": "Overview",
22
        "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
23
        "isOverview": true,
24
        "isActive": true,
25
        "isPublic": true,
26
        "subCategories": [{
27
          "name": null,
28
          "description": null,
29
          "isActive": true,
30
          "isPublic": true,
31
          "numbers": ["1","2","3"],
32
          "charts": ["4"]
33
        }]
34
      },
35
        {
36
          "name": "Publications",
37
          "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
38
          "isOverview": false,
39
          "isActive": true,
40
          "isPublic": true,
41
          "subCategories": [{
42
            "name": null,
43
            "description": null,
44
            "isActive": true,
45
            "isPublic": true,
46
            "numbers": ["1","2","3"],
47
            "charts": ["4"]
48
          }]
49
        },
50
        {
51
          "name": "Research data",
52
          "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
53
          "isOverview": false,
54
          "isActive": true,
55
          "isPublic": true,
56
          "subCategories": [{
57
            "name": null,
58
            "description": null,
59
            "isActive": true,
60
            "isPublic": true,
61
            "numbers": [
62
            ],
63
            "charts": [
64
            ]
65
          }]
66
        },
67
        {
68
          "name": "Software",
69
          "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
70
          "isOverview": false,
71
          "isActive": true,
72
          "isPublic": true,
73
          "subCategories": [{
74
            "name": null,
75
            "description": null,
76
            "isActive": true,
77
            "isPublic": true,
78
            "numbers": [
79
            ],
80
            "charts": [
81
            ]
82
          }]
83
        }, {
84
          "name": "Other",
85
          "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
86
          "isOverview": false,
87
          "isActive": true,
88
          "isPublic": true,
89
          "subCategories": [{
90
            "name": null,
91
            "description": null,
92
            "isActive": true,
93
            "isPublic": true,
94
            "numbers": [
95
            ],
96
            "charts": [
97
            ]
98
          }]
99
        }
100
      ]
101
    }]
102
  }],
103
  "indicators": [{
104
    "id": "1",
105
    "type": "number",
106
    "name": "Total",
107
    "description": "Total number of publications",
108
    "tags":["publications"],
109
    "width": "small",
110
    "indicatorPaths":[{"type":"",
111
      "url": "/stats-api/funders/{index_shortname}",
112
      "jsonPath":["statistics","publications"]}]
113
  },
114
    {
115
      "id": "2",
116
      "type": "number",
117
      "name": "Open",
118
      "description": "Total number of open access publications",
119
      "tags":["publication", "open access"],
120
      "width": "small",
121
      "indicatorPaths": [{"type":"",
122
        "url": "/stats-api/funders/{index_shortname}",
123
        "jsonPath":["statistics","open"]}]
124
    },
125
    {
126
      "id": "3",
127
      "type": "number",
128
      "name": "Embargo",
129
      "description": "Total number of embargoed publications",
130
      "tags":["publication", "embargo"],
131
      "width": "small",
132
      "indicatorPaths": [{"type":"",
133
        "url": "/stats-api/funders/{index_shortname}",
134
        "jsonPath":["statistics","embargo"]}]
135
    },
136
    {
137
      "id": "4",
138
      "type": "charts",
139
      "name": "Number of publications by project",
140
      "description": "Number of publications by project",
141
      "tags":["publication", "project"],
142
      "width": "large",
143
      "indicatorPaths":[{ "type":"bar graph",
144
        "url": "https://www.openaire.eu/stats/chart.php?com=query&data={%22table%22%3A%22result%22%2C%22fields%22%3A[{%22fld%22%3A%22number%22%2C%22agg%22%3A%22count%22%2C%22type%22%3A%22bar%22%2C%22yaxis%22%3A1%2C%22c%22%3Afalse}]%2C%22xaxis%22%3A{%22name%22%3A%22result_projects-project-acronym%22%2C%22agg%22%3A%22avg%22}%2C%22group%22%3A%22%22%2C%22color%22%3A%22%22%2C%22type%22%3A%22chart%22%2C%22size%22%3A30%2C%22sort%22%3A%22count-number%22%2C%22yaxisheaders%22%3A[%22%22]%2C%22fieldsheaders%22%3A[%22publications%22]%2C%22in%22%3A[]%2C%22filters%22%3A[{%22name%22%3A%22result_projects-project-funding_lvl0%22%2C%22values%22%3A[%22H2020%22]%2C%22to%22%3A%22-1%22}%2C{%22name%22%3A%22type%22%2C%22values%22%3A[%22publication%22]%2C%22to%22%3A%22-1%22}]%2C%22having%22%3A[]%2C%22xStyle%22%3A{%22r%22:%22-%22,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:%22-%22,%22wt%22:%22-%22}%2C%22title%22%3A%22H2020%20Publications%20per%20project%20%28top%2030%29%22%2C%22subtitle%22%3A%22%22%2C%22xaxistitle%22%3A%22project%22%2C%22order%22%3A%22d%22}&h=100%&w=80%",
145
        "jsonPath":[]},
146
        { "type":"table",
147
          "url":"https://www.openaire.eu/stats/gtable.php?com=query&data={%22table%22:%22result%22,%22fields%22:[{%22fld%22:%22number%22,%22agg%22:%22count%22,%22type%22:%22pie%22,%22yaxis%22:1,%22c%22:false}],%22xaxis%22:{%22name%22:%22result_projects-project-title%22,%22agg%22:%22avg%22},%22group%22:%22%22,%22color%22:%22%22,%22type%22:%22chart%22,%22size%22:%2230%22,%22sort%22:%22count-number%22,%22yaxisheaders%22:[%22%22],%22fieldsheaders%22:[%22publications%22],%22in%22:[],%22filters%22:[{%22name%22:%22result_projects-project-funder%22,%22values%22:[%22{index_name}%22],%22to%22:%22-1%22},{%22name%22:%22type%22,%22values%22:[%22publication%22],%22to%22:%22-1%22}],%22having%22:[],%22xStyle%22:{%22r%22:-90,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:10,%22wt%22:%22-%22},%22title%22:%22{index_shortname}%20Publications%20by%20project%20(top%2030)%22,%22subtitle%22:%22%22,%22xaxistitle%22:%22project%22,%22order%22:%22d%22}",
148
          "jsonPath":[]}
149
      ]
150
    }]
151
}
modules/uoa-monitor-portal/trunk/monitor/src/app/services/stakeholder.service.ts
1
import {Injectable} from "@angular/core";
2
import {HttpClient, HttpErrorResponse} from "@angular/common/http";
3
import {Observable} from "rxjs";
4
import {Stakeholder} from "../stakeholder";
5
import {map} from "rxjs/operators";
6

  
7
@Injectable()
8
export class StakeholderService {
9

  
10

  
11
  constructor(private http: HttpClient) {
12
  }
13

  
14
  getStakeholder(id: string): Observable<Stakeholder> {
15
    return this.http.get<any>('./assets/stakeholders.json').pipe(map(json => {
16
      let stakeholder = json.stakeholders.filter(stakeholder => stakeholder.index_id === id)[0];
17
      if(stakeholder) {
18
        return stakeholder;
19
      } else {
20
        throw new HttpErrorResponse({
21
          error: {
22
            message: 'No Stakeholder has been found',
23
            status: 404
24
          }
25
        })
26
      }
27
    }));
28
  }
29
}
modules/uoa-monitor-portal/trunk/monitor/src/app/monitor/monitor.module.ts
1
import {NgModule} from '@angular/core';
2
import {CommonModule} from '@angular/common';
3
import {FormsModule} from '@angular/forms';
4
import {RouterModule} from '@angular/router';
5

  
6
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
7
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
8

  
9
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
10
import {ErrorMessagesModule} from '../openaireLibrary/utils/errorMessages.module';
11
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
12
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
13
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
14
import {MonitorRoutingModule} from "./monitor-routing.module";
15
import {MonitorComponent} from "./monitor.component";
16
import {StakeholderService} from "../services/stakeholder.service";
17

  
18
@NgModule({
19
  imports: [
20
    CommonModule, FormsModule, RouterModule, ErrorMessagesModule,
21
    HelperModule, Schema2jsonldModule, SEOServiceModule, MonitorRoutingModule
22
  ],
23
  declarations: [
24
    MonitorComponent
25
  ],
26
  providers: [
27
    FreeGuard, PreviousRouteRecorder,
28
    PiwikService, StakeholderService
29
  ],
30
  exports: [
31
    MonitorComponent
32
  ]
33
})
34
export class MonitorModule {
35
}
modules/uoa-monitor-portal/trunk/monitor/src/app/monitor/monitor-routing.module.ts
1
import { NgModule } from '@angular/core';
2
import { RouterModule } from '@angular/router';
3
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
4
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
5
import {MonitorComponent} from "./monitor.component";
6

  
7
@NgModule({
8
  imports: [
9
    RouterModule.forChild([
10
     	{ path: ':id', component: MonitorComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] }
11
    ])
12
  ]
13
})
14
export class MonitorRoutingModule { }
modules/uoa-monitor-portal/trunk/monitor/src/app/monitor/monitor.component.html
1
<schema2jsonld [URL]="properties.baseLink"
2
               [logoURL]="properties.baseLink+'/assets/common-assets/logo-small-monitor.png'" type="home"
3
               name="OpenAIRE Monitor">
4
</schema2jsonld>
5
<div
6
  class="image-front-topbar uk-margin-large-top"
7
  uk-scrollspy="{&quot;target&quot;:&quot;[uk-scrollspy-class]&quot;,&quot;cls&quot;:&quot;uk-animation-fade&quot;,&quot;delay&quot;:false}"
8
  tm-header-transparent="light" tm-header-transparent-placeholder="">
9
  <helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
10
          [texts]="pageContents['top']"></helper>
11
</div>
modules/uoa-monitor-portal/trunk/monitor/src/app/monitor/monitor.component.ts
1
import {Component} from '@angular/core';
2
import {ActivatedRoute, Router} from '@angular/router';
3
import {Meta, Title} from '@angular/platform-browser';
4
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
5
import {CommunitiesService} from '../openaireLibrary/connect/communities/communities.service';
6
import {SubscribeService} from '../openaireLibrary/utils/subscribe/subscribe.service';
7
import {CommunityInfo} from '../openaireLibrary/connect/community/communityInfo';
8

  
9
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
10
import {StringUtils} from '../openaireLibrary/utils/string-utils.class';
11

  
12
import {ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
13
import {ErrorMessagesComponent} from '../openaireLibrary/utils/errorMessages.component';
14
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
15
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
16
import {StakeholderService} from "../services/stakeholder.service";
17
import {Stakeholder} from "../stakeholder";
18

  
19
@Component({
20
  selector: 'monitor',
21
  templateUrl: 'monitor.component.html',
22
})
23

  
24
export class MonitorComponent {
25
  public piwiksub: any;
26
  public pageContents = null;
27
  public divContents = null;
28
  public status: number;
29
  public loading: boolean = true;
30
  public errorCodes: ErrorCodes;
31
  public stakeholder: Stakeholder;
32
  private errorMessages: ErrorMessagesComponent;
33
  properties: EnvProperties;
34

  
35
  constructor(
36
    private route: ActivatedRoute,
37
    private _router: Router,
38
    private _meta: Meta,
39
    private _title: Title,
40
    private _piwikService: PiwikService,
41
    private helper: HelperService,
42
    private stakeholderService: StakeholderService,
43
    private seoService: SEOService) {
44
    this.errorCodes = new ErrorCodes();
45
    this.errorMessages = new ErrorMessagesComponent();
46
    this.status = this.errorCodes.LOADING;
47
  }
48

  
49
  public ngOnInit() {
50
    this.route.data
51
      .subscribe((data: { envSpecific: EnvProperties }) => {
52
        this.route.params.subscribe( params => {
53
          this.properties = data.envSpecific;
54
          var url = data.envSpecific.baseLink + this._router.url;
55
          this.stakeholderService.getStakeholder(params['id']).subscribe(stakeholder => {
56
            this.stakeholder = stakeholder;
57
            this.seoService.createLinkForCanonicalURL(url, false);
58
            this._meta.updateTag({content: url}, "property='og:url'");
59
            var description = "Monitor | " + this.stakeholder.index_name;
60
            var title = "Monitor | " + this.stakeholder.index_shortName;
61
            this._meta.updateTag({content: description}, "name='description'");
62
            this._meta.updateTag({content: description}, "property='og:description'");
63
            this._meta.updateTag({content: title}, "property='og:title'");
64
            this._title.setTitle(title);
65
            if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
66
              this.piwiksub = this._piwikService.trackView(this.properties, title, this.properties.piwikSiteId).subscribe();
67
            }
68
            //this.getDivContents();
69
            this.getPageContents();
70
          }, error => {
71
            console.log(error);
72
            this._router.navigate(['']);
73
          })
74
        });
75
      });
76
  }
77

  
78
  private getPageContents() {
79
    this.helper.getPageHelpContents(this._router.url, this.properties, 'monitor').subscribe(contents => {
80
      this.pageContents = contents;
81
    })
82
  }
83

  
84
  private getDivContents() {
85
    this.helper.getDivHelpContents(this._router.url, this.properties, 'monitor').subscribe(contents => {
86
      this.divContents = contents;
87
    })
88
  }
89

  
90
  public quote(param: string): string {
91
    return StringUtils.quote(param);
92
  }
93

  
94
  public ngOnDestroy() {
95
    if (this.piwiksub) {
96
      this.piwiksub.unsubscribe();
97
    }
98
  }
99

  
100
  private handleError(message: string, error): number {
101
    var code = "";
102
    if (!error.status) {
103
      var error = error.json();
104
      code = error.code;
105
    } else {
106
      code = error.status;
107
    }
108

  
109
    console.error("Monitor (component): " + message, error);
110

  
111
    return this.errorMessages.getErrorCode(code);
112
  }
113
}
modules/uoa-monitor-portal/trunk/monitor/src/app/stakeholder.ts
1 1
export class Stakeholder {
2
  id: string;
2 3
  type: string;
3
  name: string;
4
  shortName:string;
5
  id: string;
4
  index_id;
5
  index_name: string;
6
  index_shortName:string;
6 7
  isDefaultProfile: boolean;
7 8
  isActive: boolean;
8 9
  isPublic: boolean;
modules/uoa-monitor-portal/trunk/monitor/src/app/utils/customization/customization.component.ts
58 58
  }
59 59

  
60 60
  private buildCss() {
61
    // console.log(this.layout);
61
    console.log(this.layout);
62

  
62 63
    document.documentElement.style.setProperty('--portal-main-color', this.layout.mainColor);
63 64
    document.documentElement.style.setProperty('--portal-dark-color', this.layout.secondaryColor);
64 65
    let css = `
......
66 67
.communityPanelBackground:not(bottom)  {   
67 68
    border-style: ` + (this.layout.panel.background.borderStyle != null ? this.layout.panel.background.borderStyle : 'solid') + `;
68 69
    border-color:` + (this.layout.panel.background.borderColor != null ? this.layout.panel.background.borderColor : 'transparent') + `;
69
    border-width: ` + (this.layout.panel.background.borderWidth != null ? this.layout.panel.background.borderWidth : '1px') + `;`+`
70
    border-width: ` + (this.layout.panel.background.borderWidth != null ? this.layout.panel.background.borderWidth: '1') + `px;`+`
71
    
70 72
}
71 73
.communityPanelBackground, .communityPanelBackground .uk-section-primary {
72
        background-color:  ` + this.layout.mainColor + `;    
74
        background-color:  ` + (this.layout.panel.background.color?this.layout.panel.background.color:this.layout.mainColor) + `;    
73 75
}
74 76

  
75 77
/*Panel fonts*/
......
77 79
.communityPanelBackground {
78 80
    color:` + (this.layout.panel.fonts.color != null ? this.layout.panel.fonts.color : 'white') + ` !important;` +
79 81
      (this.layout.panel.fonts.family != null ? ('font-family: ' + this.layout.panel.fonts.family + ' !important;') : '') +
80
      (this.layout.panel.fonts.size != null ? ('font-size: ' + this.layout.panel.fonts.size + ' !important;') : '') +
82
      (this.layout.panel.fonts.size != null ? ('font-size: ' + this.layout.panel.fonts.size + 'px !important;') : '') +
83
      (this.layout.panel.fonts.weight != null ? ('font-weight: ' + this.layout.panel.fonts.weight + '!important;') : '') +
81 84

  
82 85
      `
83 86
}
......
87 90

  
88 91
.communityPanelBackground .uk-h6:not(.ignoreCommunityPanelBackground),.communityPanelBackground .uk-h5:not(.ignoreCommunityPanelBackground),.communityPanelBackground .uk-h4:not(.ignoreCommunityPanelBackground),.communityPanelBackground .uk-h3:not(.ignoreCommunityPanelBackground), .communityPanelBackground .uk-h2:not(.ignoreCommunityPanelBackground),.communityPanelBackground .uk-h1:not(.ignoreCommunityPanelBackground) {
89 92
    color: ` + (this.layout.panel.title.color != null ? this.layout.panel.title.color : 'white') + ` !important;` +
90

  
93
      (this.layout.panel.title.weight != null ? ('font-weight: ' + this.layout.panel.title.weight + '!important;') : '') +
91 94
      `
92 95
}
93 96
.communityPanelBackground .uk-h5:not(.ignoreCommunityPanelBackground){
94 97
`+
95 98
      (this.layout.panel.title.family != null ? ('font-family: ' + this.layout.panel.title.family + ' !important;') : '') +
96
      (this.layout.panel.title.size != null ? ('font-size: ' + this.layout.panel.title.size + ' !important;') : '') +
99
      (this.layout.panel.title.size != null ? ('font-size: ' + this.layout.panel.title.size + 'px !important;') : '') +
97 100
      `
98 101
}
99 102
/* Panel links */
100 103
.communityPanelBackground .uk-link:not(.ignoreCommunityPanelBackground), .communityPanelBackground a:not(.uk-button):not(.uk-button-text):not(.ignoreCommunityPanelBackground), .portal-card a {
101 104
    color: `
102
      + (this.layout.panel.links.color != null ? this.layout.panel.links.color : 'white') + ` !important;` +
103
      (this.layout.panel.links.family != null ? ('font-family: ' + this.layout.panel.links.family + ' !important;') : '') +
104
      (this.layout.panel.links.size != null ? ('font-size: ' + this.layout.panel.links.size + ' !important;') : '') +
105
      `
105
      + (this.layout.panel.onDarkBackground ? (this.layout.links.darkBackground.color?this.layout.links.darkBackground.color:'white') :(this.layout.links.lightBackground.color?this.layout.links.lightBackground.color:'var(--portal-main-color)') ) + ` !important;`
106
      + (this.layout.panel.onDarkBackground ? (this.layout.links.darkBackground.family?('font-family: ' + this.layout.links.darkBackground.family + ' !important;') : '') :'' )
107
      + (this.layout.panel.onDarkBackground ? (this.layout.links.darkBackground.size?('font-size: ' + this.layout.links.darkBackground.size + 'px !important;') : '') :'' )
108
      +`
106 109
}
107 110
/* Panel links - hover */
108 111

  
109 112
.communityPanelBackground .uk-link:not(.ignoreCommunityPanelBackground):hover, .communityPanelBackground a:not(.uk-button):not(.uk-button-text):not(.ignoreCommunityPanelBackground):hover, .portal-card a:hover {
110 113
    color: `
111
      + (this.layout.panel.links.onHover.color != null ? this.layout.panel.links.onHover.color : `rgba(255, 255, 255, 0.5)`) + ` !important;` + `
114
      + (this.layout.panel.onDarkBackground ? (this.layout.links.darkBackground.onHover.color?this.layout.links.darkBackground.onHover.color:`rgba(255, 255, 255, 0.5)`) :(this.layout.links.lightBackground.onHover.color?this.layout.links.lightBackground.onHover.color:'var(--portal-dark-color)') ) + ` !important;`
115
      + `
112 116
}
113 117
 
114 118
.uk-link, a:not(.uk-button), .uk-navbar-dropdown-nav > li > a, .uk-navbar-nav > li > a, .loginLink,
115 119
.uk-tab > .uk-active > a, .uk-tab > * > a:focus, .uk-tab > * > a:hover {
116
    color:` + (this.layout.links.color != null ? this.layout.links.color : `var(--portal-main-color)`) + `     
120
    color:` + (this.layout.links.lightBackground.color != null ? this.layout.links.lightBackground.color : `var(--portal-main-color)`) + `     
117 121
}
118 122

  
119 123
.uk-link:hover, a:not(.uk-button):hover,
120 124
.uk-navbar-dropdown-nav > li > a:focus, .uk-navbar-dropdown-nav > li > a:hover, .uk-navbar-nav > li > a:hover, .uk-navbar-nav > li > a:focus, .uk-navbar-nav > li > a:active, .uk-navbar-nav > li:hover > a,
121 125
.uk-navbar-dropdown-nav > li.uk-active > a, .uk-tab > .uk-active > a, .uk-navbar-nav > li.uk-active > a, .uk-navbar-container:not(.uk-navbar-transparent) .uk-navbar-nav > li.uk-active > a {
122
    color:` + (this.layout.links.onHover.color != null ? this.layout.links.onHover.color : `var(--portal-dark-color)`) + `     
126
    color:` + (this.layout.links.lightBackground.onHover.color != null ? this.layout.links.lightBackground.onHover.color : `var(--portal-dark-color)`) + `     
123 127
}
124 128

  
125 129
.communityBorder {
126 130
    border-color: ` + (this.layout.box.borderColor != null ? this.layout.box.borderColor : `var(--portal-main-color)`) + `;
127 131
    border-style: ` + (this.layout.box.borderStyle != null ? this.layout.box.borderStyle : `solid`) + `;
128
    border-width: ` + (this.layout.box.borderWidth != null ? this.layout.box.borderWidth : `2px`) + `;
129
    border-radius: ` + (this.layout.box.borderRadius != null ? this.layout.box.borderRadius : `6px`) + `;
132
    border-width: ` + (this.layout.box.borderWidth != null ? this.layout.box.borderWidth : `2`) + `px;
133
    border-radius: ` + (this.layout.box.borderRadius != null ? this.layout.box.borderRadius : `6`) + `px;
130 134
}
131 135

  
132 136
/*Panel Elements & cards*/
......
135 139
    border-color: ` + (this.layout.panel.panelElements.borderColor != null ? this.layout.panel.panelElements.borderColor : `rgba(255, 255, 255, 0.5)`) + `;
136 140
}
137 141
.communityPanelBackground .uk-label:not(.ignoreCommunityPanelBackground) a{    
138
    border-color: ` + (this.layout.panel.links.color != null ? this.layout.panel.links.color : `rgba(255, 255, 255, 0.8)`) + `;
142
    border-color: ` +
143
      + (this.layout.panel.onDarkBackground ? (this.layout.links.darkBackground.color?this.layout.links.darkBackground.color:'rgba(255, 255, 255, 0.8)') :(this.layout.links.lightBackground.color?this.layout.links.lightBackground.color:'var(--portal-main-color)') )   +
144
       + `;
139 145
    border-bottom: 1px solid;
140 146
}
141 147
.communityPanelBackground .uk-label:not(.ignoreCommunityPanelBackground) a:hover{    
142
    border-color: ` + (this.layout.panel.links.onHover.color != null ? this.layout.panel.links.onHover.color : `rgba(255, 255, 255, 0.5)`) + `;
148
    border-color: ` +
149
      (this.layout.panel.onDarkBackground ? (this.layout.links.darkBackground.onHover.color?this.layout.links.darkBackground.onHover.color:'rgba(255, 255, 255, 0.5)') :(this.layout.links.lightBackground.onHover.color?this.layout.links.lightBackground.onHover.color:'var(--portal-dark-color)') )+
150
      + `;
143 151
}
144 152
.communityPanelBackground .uk-card:not(.ignoreCommunityPanelBackground), .communityPanelBackground .uk-label:not(.ignoreCommunityPanelBackground) {
145 153
    color: ` + (this.layout.panel.panelElements.color != null ? this.layout.panel.panelElements.color : `rgba(255, 255, 255, 0.5)`) + `;
......
147 155

  
148 156

  
149 157
.uk-button:not(.uk-button-text){
150
  border-radius:` + (this.layout.buttons.borderRadius != null ? this.layout.buttons.borderRadius : `4px`) + `;
158
  border-radius:` + (this.layout.buttons.lightBackground.borderRadius != null ? this.layout.buttons.lightBackground.borderRadius : `4`) + `px;
151 159
}
152 160
.uk-button:not(.uk-button-text):not(.uk-button-default):not(.uk-button-primary), .portal-button {
153
    background-color:` + (this.layout.buttons.backgroundColor != null ? this.layout.buttons.backgroundColor : `#003052`) + `;
154
    color: ` + (this.layout.buttons.color != null ? this.layout.buttons.color : `white`) + `;
155
    border-color: ` + (this.layout.buttons.borderColor != null ? this.layout.buttons.borderColor : `transparent`) + `;
156
    border-style: ` + (this.layout.buttons.borderStyle != null ? this.layout.buttons.borderStyle : `solid`) + `;
157
    border-width: ` + (this.layout.buttons.borderWidth != null ? this.layout.buttons.borderWidth : `1px`) + `;
161
    background-color:` + (this.layout.buttons.lightBackground.backgroundColor != null ? this.layout.buttons.lightBackground.backgroundColor : `#003052`) + `;
162
    color: ` + (this.layout.buttons.lightBackground.color != null ? this.layout.buttons.lightBackground.color : `white`) + `;
163
    border-color: ` + (this.layout.buttons.lightBackground.borderColor != null ? this.layout.buttons.lightBackground.borderColor : `transparent`) + `;
164
    border-style: ` + (this.layout.buttons.lightBackground.borderStyle != null ? this.layout.buttons.lightBackground.borderStyle : `solid`) + `;
165
    border-width: ` + (this.layout.buttons.lightBackground.borderWidth != null ? this.layout.buttons.lightBackground.borderWidth : `1`) + `px;
158 166
  
159 167

  
160 168
}
161 169

  
162 170
.uk-button:not(.uk-button-text):not(.uk-button-default):not(.uk-button-primary):hover, .portal-button:hover {
163
    background-color: ` + (this.layout.buttons.onHover.backgroundColor != null ? this.layout.buttons.onHover.backgroundColor : `#154B71`) + `;
164
    color: ` + (this.layout.buttons.onHover.color != null ? this.layout.buttons.onHover.color : `white`) + `;
165
    border-color: ` + (this.layout.buttons.onHover.color != null ? this.layout.buttons.onHover.color : `transparent`) + `;
171
    background-color: ` + (this.layout.buttons.lightBackground.onHover.backgroundColor != null ? this.layout.buttons.lightBackground.onHover.backgroundColor : `#154B71`) + `;
172
    color: ` + (this.layout.buttons.lightBackground.onHover.color != null ? this.layout.buttons.lightBackground.onHover.color : `white`) + `;
173
    border-color: ` + (this.layout.buttons.lightBackground.onHover.color != null ? this.layout.buttons.lightBackground.onHover.color : `transparent`) + `;
166 174
}
167 175

  
168 176
/*Buttons*/
169 177
.communityPanelBackground .uk-button:not(.ignoreCommunityPanelBackground) {
170
    background-color: ` + (this.layout.panel.buttons.backgroundColor != null ? this.layout.panel.buttons.backgroundColor : `white`) + `  !important;
171
    color: ` + (this.layout.panel.buttons.color != null ? this.layout.panel.buttons.color : `var(--portal-main-color)`) + ` !important;
172
    border-color: ` + (this.layout.panel.buttons.borderColor != null ? this.layout.panel.buttons.borderColor : `transparent`) + ` !important;
173
    border-style: ` + (this.layout.panel.buttons.borderStyle != null ? this.layout.panel.buttons.borderStyle : `solid`) + `  !important;
174
    border-width: ` + (this.layout.panel.buttons.borderWidth != null ? this.layout.panel.buttons.borderWidth : `1px`) + ` !important;
175
    border-radius:` + (this.layout.panel.buttons.borderRadius != null ? this.layout.panel.buttons.borderRadius : `4px`) + ` !important;
176
    font-weight:` + (this.layout.panel.buttons.fontWeight != null ? this.layout.panel.buttons.fontWeight : `600`) + `;
177

  
178
    background-color: `
179
      + (this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.backgroundColor?this.layout.buttons.darkBackground.backgroundColor:'white') :(this.layout.buttons.lightBackground.backgroundColor?this.layout.buttons.lightBackground.backgroundColor:'var(--portal-main-color)') )
180
        +`  !important;
181
    color: `
182
      + (this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.color?this.layout.buttons.darkBackground.color:'var(--portal-main-color)') :(this.layout.buttons.lightBackground.color?this.layout.buttons.lightBackground.color:'white') )
183
      +  ` !important;
184
    border-color: `
185
      + (this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.borderColor?this.layout.buttons.darkBackground.borderColor:'white') :(this.layout.buttons.lightBackground.borderColor?this.layout.buttons.lightBackground.borderColor:'var(--portal-main-color)') )
186
       + ` !important;
187
    border-style: ` +
188
       (this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.borderStyle?this.layout.buttons.darkBackground.borderStyle:'solid') :(this.layout.buttons.lightBackground.borderStyle?this.layout.buttons.lightBackground.borderStyle:'solid') )
189
       + `  !important;
190
    border-width: ` +
191
      (this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.borderWidth?this.layout.buttons.darkBackground.borderWidth:'1px') :(this.layout.buttons.lightBackground.borderWidth?this.layout.buttons.lightBackground.borderWidth:'1px') )
192
      + ` !important;
193
    border-radius:` +
194
      (this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.borderRadius?this.layout.buttons.darkBackground.borderRadius:'4px') :(this.layout.buttons.lightBackground.borderRadius?this.layout.buttons.lightBackground.borderRadius:'4px') )+
195
       + ` !important;
196
    font-weight:`
197
      // (this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.fontWeight?this.layout.buttons.darkBackground.fontWeight:'4px') :(this.layout.buttons.lightBackground.borderRadius?this.layout.buttons.lightBackground.borderRadius:'4px') )+
198
      // (this.layout.panel.buttons.fontWeight != null ? this.layout.panel.buttons.fontWeight : `600`) + `;
199
+`
178 200
}
179 201

  
180 202
.communityPanelBackground .uk-button:not(.ignoreCommunityPanelBackground):hover {
181
    background-color: ` + (this.layout.panel.buttons.onHover.backgroundColor != null ? this.layout.panel.buttons.onHover.backgroundColor : ` #eeeeee `) + ` !important;
182
    color: ` + (this.layout.panel.buttons.onHover.color != null ? this.layout.panel.buttons.onHover.color : ` var(--portal-main-color) `) + `  !important;
183
    border-color:` + (this.layout.panel.buttons.onHover.borderColor != null ? this.layout.panel.buttons.onHover.borderColor : `transparent`) + `  !important;
203
    background-color: ` +
204
       (this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.onHover.backgroundColor?this.layout.buttons.darkBackground.onHover.backgroundColor:' #eeeeee') :(this.layout.buttons.lightBackground.onHover.backgroundColor?this.layout.buttons.lightBackground.onHover.backgroundColor:'var(--portal-dark-color)') )
205
      + ` !important;
206
    color: ` +
207
      (this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.onHover.color?this.layout.buttons.darkBackground.onHover.color:' var(--portal-main-color) ') :(this.layout.buttons.lightBackground.onHover.color?this.layout.buttons.lightBackground.onHover.color:'white') )
208
       + `  !important;
209
    border-color:`
210
       +(this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.onHover.borderColor?this.layout.buttons.darkBackground.onHover.borderColor:' #eeeeee ') :(this.layout.buttons.lightBackground.onHover.borderColor?this.layout.buttons.lightBackground.onHover.borderColor:'var(--portal-dark-color)') )
211
      + `  !important;
184 212
}
185 213

  
186 214

  
modules/uoa-monitor-portal/trunk/monitor/src/app/app-routing.module.ts
9 9

  
10 10
const routes: Routes = [
11 11
  // Other Pages
12
  { path: '', loadChildren: './home/home.module#HomeModule', resolve: { envSpecific: EnvironmentSpecificResolver  }},
13

  
12
  { path: '', loadChildren: './home/home.module#HomeModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
13
  { path: 'monitor', loadChildren: './monitor/monitor.module#MonitorModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
14 14
  { path: 'about',  redirectTo: 'about/learn-how', pathMatch: 'full'},
15 15
  { path: 'about/learn-how', loadChildren: './learn-how/learn-how.module#LearnHowModule', resolve: { envSpecific:  EnvironmentSpecificResolver }},
16 16
  { path: 'about/learn-in-depth', loadChildren: './learn-how/learnInDepth/learn-in-depth.module#LearnInDepthModule', resolve: { envSpecific:  EnvironmentSpecificResolver }},
modules/uoa-monitor-portal/trunk/monitor/src/assets/stakeholders.json
1
{
2
 "stakeholders":[
3
  {
4
    "id": "1",
5
    "type": "funder",
6
    "index_id": "EC",
7
    "index_name": "European Comission",
8
    "index_shortName": "EC",
9
    "isDefaultProfile": false,
10
    "isActive": true,
11
    "isPublic": true,
12
    "creationDate": "08-10-2019",
13
    "updateDate": "08-10-2019",
14
    "managers": null,
15

  
16
    "topics": [{
17
      "name": "Open Science",
18
      "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
19
      "isActive": true,
20
      "isPublic": true,
21
      "categories": [
22
        {
23
        "name": "Overview",
24
        "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
25
        "isOverview": true,
26
        "isActive": true,
27
        "isPublic": true,
28
        "subCategories": [{
29
          "name": null,
30
          "description": null,
31
          "isActive": true,
32
          "isPublic": true,
33
          "numbers": ["1","2","3"],
34
          "charts": ["4"]
35
        }]
36
      },
37
        {
38
          "name": "Publications",
39
          "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
40
          "isOverview": false,
41
          "isActive": true,
42
          "isPublic": true,
43
          "subCategories": [{
44
            "name": null,
45
            "description": null,
46
            "isActive": true,
47
            "isPublic": true,
48
            "numbers": ["1","2","3"],
49
            "charts": ["4"]
50
          }]
51
        },
52
        {
53
          "name": "Research data",
54
          "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
55
          "isOverview": false,
56
          "isActive": true,
57
          "isPublic": true,
58
          "subCategories": [{
59
            "name": null,
60
            "description": null,
61
            "isActive": true,
62
            "isPublic": true,
63
            "numbers": [
64
            ],
65
            "charts": [
66
            ]
67
          }]
68
        },
69
        {
70
          "name": "Software",
71
          "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
72
          "isOverview": false,
73
          "isActive": true,
74
          "isPublic": true,
75
          "subCategories": [{
76
            "name": null,
77
            "description": null,
78
            "isActive": true,
79
            "isPublic": true,
80
            "numbers": [
81
            ],
82
            "charts": [
83
            ]
84
          }]
85
        }, {
86
          "name": "Other",
87
          "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
88
          "isOverview": false,
89
          "isActive": true,
90
          "isPublic": true,
91
          "subCategories": [{
92
            "name": null,
93
            "description": null,
94
            "isActive": true,
95
            "isPublic": true,
96
            "numbers": [
97
            ],
98
            "charts": [
99
            ]
100
          }]
101
        }
102
      ]
103
    }]
104
  }],
105
  "indicators": [{
106
    "id": "1",
107
    "type": "number",
108
    "name": "Total",
109
    "description": "Total number of publications",
110
    "tags":["publications"],
111
    "width": "small",
112
    "indicatorPaths":[{"type":"",
113
      "url": "/stats-api/funders/{index_shortname}",
114
      "jsonPath":["statistics","publications"]}]
115
  },
116
    {
117
      "id": "2",
118
      "type": "number",
119
      "name": "Open",
120
      "description": "Total number of open access publications",
121
      "tags":["publication", "open access"],
122
      "width": "small",
123
      "indicatorPaths": [{"type":"",
124
        "url": "/stats-api/funders/{index_shortname}",
125
        "jsonPath":["statistics","open"]}]
126
    },
127
    {
128
      "id": "3",
129
      "type": "number",
130
      "name": "Embargo",
131
      "description": "Total number of embargoed publications",
132
      "tags":["publication", "embargo"],
133
      "width": "small",
134
      "indicatorPaths": [{"type":"",
135
        "url": "/stats-api/funders/{index_shortname}",
136
        "jsonPath":["statistics","embargo"]}]
137
    },
138
    {
139
      "id": "4",
140
      "type": "charts",
141
      "name": "Number of publications by project",
142
      "description": "Number of publications by project",
143
      "tags":["publication", "project"],
144
      "width": "large",
145
      "indicatorPaths":[{ "type":"bar graph",
146
        "url": "https://www.openaire.eu/stats/chart.php?com=query&data={%22table%22%3A%22result%22%2C%22fields%22%3A[{%22fld%22%3A%22number%22%2C%22agg%22%3A%22count%22%2C%22type%22%3A%22bar%22%2C%22yaxis%22%3A1%2C%22c%22%3Afalse}]%2C%22xaxis%22%3A{%22name%22%3A%22result_projects-project-acronym%22%2C%22agg%22%3A%22avg%22}%2C%22group%22%3A%22%22%2C%22color%22%3A%22%22%2C%22type%22%3A%22chart%22%2C%22size%22%3A30%2C%22sort%22%3A%22count-number%22%2C%22yaxisheaders%22%3A[%22%22]%2C%22fieldsheaders%22%3A[%22publications%22]%2C%22in%22%3A[]%2C%22filters%22%3A[{%22name%22%3A%22result_projects-project-funding_lvl0%22%2C%22values%22%3A[%22H2020%22]%2C%22to%22%3A%22-1%22}%2C{%22name%22%3A%22type%22%2C%22values%22%3A[%22publication%22]%2C%22to%22%3A%22-1%22}]%2C%22having%22%3A[]%2C%22xStyle%22%3A{%22r%22:%22-%22,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:%22-%22,%22wt%22:%22-%22}%2C%22title%22%3A%22H2020%20Publications%20per%20project%20%28top%2030%29%22%2C%22subtitle%22%3A%22%22%2C%22xaxistitle%22%3A%22project%22%2C%22order%22%3A%22d%22}&h=100%&w=80%",
147
        "jsonPath":[]},
148
        { "type":"table",
149
          "url":"https://www.openaire.eu/stats/gtable.php?com=query&data={%22table%22:%22result%22,%22fields%22:[{%22fld%22:%22number%22,%22agg%22:%22count%22,%22type%22:%22pie%22,%22yaxis%22:1,%22c%22:false}],%22xaxis%22:{%22name%22:%22result_projects-project-title%22,%22agg%22:%22avg%22},%22group%22:%22%22,%22color%22:%22%22,%22type%22:%22chart%22,%22size%22:%2230%22,%22sort%22:%22count-number%22,%22yaxisheaders%22:[%22%22],%22fieldsheaders%22:[%22publications%22],%22in%22:[],%22filters%22:[{%22name%22:%22result_projects-project-funder%22,%22values%22:[%22{index_name}%22],%22to%22:%22-1%22},{%22name%22:%22type%22,%22values%22:[%22publication%22],%22to%22:%22-1%22}],%22having%22:[],%22xStyle%22:{%22r%22:-90,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:10,%22wt%22:%22-%22},%22title%22:%22{index_shortname}%20Publications%20by%20project%20(top%2030)%22,%22subtitle%22:%22%22,%22xaxistitle%22:%22project%22,%22order%22:%22d%22}",
150
          "jsonPath":[]}
151
      ]
152
    }]
153
}

Also available in: Unified diff