[Monitor Dashboard|Trunk]

-apply changes for baseLink, domain properties

-add jsonld in monitor page
-add files for production version (robots.txt, index.html)




git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@59412 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
Argiro Kokogiannaki 2020-09-18 09:19:47 +00:00
parent 3ed79c718a
commit 6a8ed470f7
14 changed files with 105 additions and 23 deletions

View File

@ -46,6 +46,14 @@
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
},
{
"replace": "src/index.html",
"with": "src/index.prod.html"
},
{
"replace": "src/robots.txt",
"with": "src/robots.prod.txt"
}
]
},
@ -134,6 +142,14 @@
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
},
{
"replace": "src/index.html",
"with": "src/index.prod.html"
},
{
"replace": "src/robots.txt",
"with": "src/robots.prod.txt"
}
]
},

View File

@ -8,7 +8,7 @@
],
"scripts": {
"ng": "ng",
"start": " ng serve --port 4600 --disable-host-check --host 0.0.0.0",
"start": " ng serve --port 4600 --disable-host-check --host 0.0.0.0 --base-href /dashboard/",
"start:ssr": "npm run build:ssr && npm run serve:ssr",
"start:prerender": "npm run build:prerender && npm run serve:prerender",
"start:ssr-beta": "npm run build:ssr-beta && npm run serve:ssr",

View File

@ -9,6 +9,12 @@
[alt]="properties.environment">
<nav class="uk-navbar" [class.uk-light]="!isFrontPage">
<div *ngIf="stakeholder" class="uk-navbar-center">
<schema2jsonld *ngIf="properties" [URL]="properties.domain + properties.baseLink + '/' + stakeholder.alias"
[logoURL]="stakeholder.logoUrl" type="home"
[searchActionRoute]="properties.searchLinkToResults" [searchAction]="false"
[name]="'Monitor Dashboard | ' + this.stakeholder.name"
[description]="stakeholder.name + ' monitoring dashboard'">
</schema2jsonld>
<ul class="uk-navbar-nav user_actions uk-padding uk-padding-remove-vertical uk-padding-remove-right">
<!--<li>
<a class="uk-logo uk-navbar-item uk-link uk-margin-left "
@ -50,10 +56,10 @@
[activeItem]="activeTopic?activeTopic.alias:null" [showHeader]=true
[searchLink]="(properties.showContent)?properties.searchLinkToResults:null"
[searchParams]="createSearchParameters()"
[headerUrl]="properties.baseLink" queryParamsHandling="preserve"
[headerUrl]="properties.domain + properties.baseLink" queryParamsHandling="preserve"
></dashboard-sidebar>
<dashboard-sidebar *ngIf="hasAdminMenu" [items]="adminMenuItems" headerName="Monitor"
headerDashboard="Administration Panel" [headerUrl]="properties.baseLink"
headerDashboard="Administration Panel" [headerUrl]="properties.domain + properties.baseLink"
></dashboard-sidebar>
<div *ngIf="hasSidebar" id="hide_controls">
<div id="toggle" [class.sidebar_main_open]="open" (click)="toggleOpen($event)" class="uk-margin-auto">

View File

@ -151,7 +151,7 @@ export class AppComponent implements OnInit, OnDestroy {
}
private navigateToError() {
this.router.navigate(['/error'], {queryParams: {'page': this.router.url}});
this.router.navigate(['/error'], {queryParams: {'page': this.properties.baseLink + this.router.url}});
}
public get open() {

View File

@ -18,6 +18,7 @@ import {SubscribeModule} from './utils/subscribe/subscribe.module';
import {UserMiniModule} from "./openaireLibrary/login/userMiniModule.module";
import {SideBarModule} from "./openaireLibrary/dashboard/sharedComponents/sidebar/sideBar.module";
import {SharedModule} from "./openaireLibrary/shared/shared.module";
import {Schema2jsonldModule} from "./openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
@NgModule({
@ -34,7 +35,7 @@ import {SharedModule} from "./openaireLibrary/shared/shared.module";
SubscribeModule.forRoot(),
BrowserModule.withServerTransition({appId: 'my-app'}),
AppRoutingModule,
UserMiniModule, SideBarModule
UserMiniModule, SideBarModule, Schema2jsonldModule
],
declarations: [AppComponent, OpenaireErrorPageComponent],

View File

@ -22,6 +22,7 @@ import {RangeFilter} from "../openaireLibrary/utils/rangeFilter/rangeFilterHelpe
import {Filter, Value} from "../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class";
import {Location} from "@angular/common";
import {RouterHelper} from "../openaireLibrary/utils/routerHelper.class";
import {properties} from "../../environments/environment";
@Component({
selector: 'monitor',
@ -81,8 +82,6 @@ export class MonitorComponent implements OnInit, OnDestroy {
console.log("Keyword Changed!");
//TODO do a real action
});
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
let subscription: Subscription;
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
this.user = user;
@ -96,8 +95,8 @@ export class MonitorComponent implements OnInit, OnDestroy {
if (subscription) {
subscription.unsubscribe();
}
this.properties = data.envSpecific;
var url = data.envSpecific.baseLink + this._router.url;
this.properties = properties;
var url = properties.domain + properties.baseLink + this._router.url;
this.route.queryParams.subscribe(params => {
this.queryParams = Object.assign({}, params);
this.isViewPublic = (params['view'] == 'public');
@ -157,7 +156,7 @@ export class MonitorComponent implements OnInit, OnDestroy {
}
});
}));
});
}
private initializeFilters(){
this.periodFilter.selectedFromValue = (this.queryParams['year'] && this.queryParams['year'].indexOf("range")==0)?this.queryParams['year'].split("range")[1].split(":")[0]:"";

View File

@ -7,7 +7,7 @@
<!-- <div *ngIf="!stakeholder.defaultId" class="uk-badge default">Default</div>-->
<!-- <img class="logo" *ngIf="stakeholder.logoUrl" [src]="stakeholder.logoUrl">-->
<!-- <div class="uk-margin-top" *ngIf="!stakeholder.logoUrl" >{{stakeholder.name}}</div>-->
<a [href]="properties.baseLink"><div class="portalLogo logo" ></div></a>
<a [href]="properties.domain + properties.baseLink"><div class="portalLogo logo" ></div></a>
</div>
</div>
<div *ngIf="stakeholder" class="menu_section">

View File

@ -7,7 +7,7 @@
<!-- <div *ngIf="!stakeholder.defaultId" class="uk-badge default">Default</div>-->
<!-- <img class="logo" *ngIf="stakeholder.logoUrl" [src]="stakeholder.logoUrl">-->
<!-- <div class="uk-margin-top" *ngIf="!stakeholder.logoUrl" >{{stakeholder.name}}</div>-->
<a [href]="properties.baseLink"><div class="portalLogo logo" ></div></a>
<a [href]="properties.domain + properties.baseLink"><div class="portalLogo logo" ></div></a>
</div>
</div>
<div *ngIf="stakeholder && stakeholder.topics[topicIndex]" class="menu_section">

View File

@ -127,7 +127,7 @@ export class SubscribeComponent {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.ACTION_REQUIRES_LOGIN,
"redirectUrl": this.router.url
"redirectUrl": this.properties.baseLink + this.router.url
}
});
} else {

View File

@ -71,8 +71,8 @@ export let properties: EnvProperties = {
pagingLimit: 20,
resultsPerPage: 10,
baseLink: "https://beta.monitor.openaire.eu",
baseLink: "/dashboard",
domain: "https://beta.monitor.openaire.eu",
searchLinkToResult: "/search/result?id=",
searchLinkToPublication: "/search/publication?articleId=",
searchLinkToProject: "/search/project?projectId=",

View File

@ -3,7 +3,7 @@ import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-propert
export let properties: EnvProperties = {
environment: "production",
isDashboard: true,
enablePiwikTrack: false,
enablePiwikTrack: true,
useCache: false,
useLongCache: true,
showContent: true,
@ -45,8 +45,8 @@ export let properties: EnvProperties = {
vocabulariesAPI: "https://services.openaire.eu/provision/mvc/vocabularies/",
piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=",
piwikSiteId: "112",
loginUrl: "https://services.openaire.eu/_UPDATE_/openid_connect_login",
piwikSiteId: "104",
loginUrl: "https://services.openaire.eu/monitor-dashboard-login/openid_connect_login",
logoutUrl: "https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=",
@ -58,7 +58,7 @@ export let properties: EnvProperties = {
datasourcesAPI: "https://services.openaire.eu/openaire/ds/search/",
monitorServiceAPIURL: "http://duffy.di.uoa.gr:8080/uoa-monitor-service",
monitorServiceAPIURL: "https://services.openaire.eu/uoa-monitor-service",
adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/",
@ -71,8 +71,9 @@ export let properties: EnvProperties = {
csvLimit: 2000,
pagingLimit: 20,
resultsPerPage: 10,
baseLink: "https://connect.openaire.eu",
baseLink: "/dashboard",
domain: "https://monitor.openaire.eu",
afterLoginRedirectLink: "/myCommunities",
searchLinkToResult: "/search/result?id=",
@ -113,7 +114,7 @@ export let properties: EnvProperties = {
shareInZenodoPage: "/participate/deposit/zenodo",
reCaptchaSiteKey: "6LezhVIUAAAAAOb4nHDd87sckLhMXFDcHuKyS76P",
admins: ["rcd-helpdesk@openaire.eu"],
admins: ["argirok@di.uoa.gr"],
lastIndexUpdate: "2019-07-24",
indexInfoAPI: "http://services.openaire.eu/openaire/info/",
altMetricsAPIURL: "https://api.altmetric.com/v1/doi/",

View File

@ -68,7 +68,8 @@ export let properties: EnvProperties = {
csvLimit: 2000,
pagingLimit: 20,
resultsPerPage: 10,
baseLink: "http://dl170.madgik.di.uoa.gr/monitor",
baseLink: "/dashboard",
domain: "https://beta.monitor.openaire.eu",
searchLinkToResult: "/search/result?id=",
searchLinkToPublication: "/search/publication?articleId=",
searchLinkToProject: "/search/project?projectId=",

54
src/index.prod.html Normal file
View File

@ -0,0 +1,54 @@
<!DOCTYPE html>
<html lang="en-gb" dir="ltr" vocab="http://schema.org/">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="/"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="description" content="OpenAIRE Monitor, funder, funding, research, "/>
<meta property="og:description" content="OpenAIRE Monitor, funder, funding"/>
<meta property="og:title" content="OpenAIRE - Monitor "/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="https://monitor.openaire.eu"/>
<meta property="og:site_name" content="OpenAIRE - Monitor"/>
<meta property="og:image" content="assets/common-assets/common/Symbol.png"/>
<meta property="og:image:secure_url" content="assets/common-assets/common/Symbol.png"/>
<meta property="og:image:type" content="image/png"/>
<meta property="og:image:width" content="360"/>
<meta property="og:image:height" content="359"/>
<meta name="robots" content="noindex">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
</head>
<body class="app_my_theme dashboard">
<div>
<app-root></app-root>
</div>
</body>
<script src="assets/theme-assets/js/common.min.js"></script>
<script src="assets/theme-assets/js/altair_admin_common.min.js"></script>
<script src="assets/theme-assets/uikit/js/uikit.min.js"></script>
<script src="assets/theme-assets/uikit/js/uikit-icons.min.js"></script>
<script>
if(Modernizr.touch) {
// fastClick (touch devices)
FastClick.attach(document.body);
}
$window.load(function() {
// ie fixes
altair_helpers.ie_fix();
});
</script>
<script type="text/javascript">
function loadAltmetrics(e, t, n) {
var d = "createElement", c = "getElementsByTagName", m = "setAttribute", n = document.getElementById(e);
return n && n.parentNode && n.parentNode.removeChild(n), n = document[d + "NS"] && document.documentElement.namespaceURI, n = n ? document[d + "NS"](n, "script") : document[d]("script"), n[m]("id", e), n[m]("src", t), (document[c]("head")[0] || document[c]("body")[0]).appendChild(n), n = new Image, void n[m]("src", "https://d1uo4w7k31k5mn.cloudfront.net/donut/0.png")
}
</script>
</html>

4
src/robots.prod.txt Normal file
View File

@ -0,0 +1,4 @@
User-Agent: *
Disallow: /cache
Disallow: /upload
Disallow: /