[Explore|Trunk]
Home Page: add numbers about software/orp git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@56075 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
51aef8b025
commit
1329c108e5
File diff suppressed because it is too large
Load Diff
|
@ -20,6 +20,8 @@ import { EnvProperties} from '../openaireLibrary/utils/properties/env-properties
|
||||||
import { ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
|
import { ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
|
||||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||||
import { SEOService } from '../openaireLibrary/sharedComponents/SEO/SEO.service';
|
import { SEOService } from '../openaireLibrary/sharedComponents/SEO/SEO.service';
|
||||||
|
import {SearchSoftwareService} from "../openaireLibrary/services/searchSoftware.service";
|
||||||
|
import {SearchOrpsService} from "../openaireLibrary/services/searchOrps.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'home',
|
selector: 'home',
|
||||||
|
@ -38,6 +40,8 @@ export class HomeComponent {
|
||||||
|
|
||||||
public publicationsSize:any = null;
|
public publicationsSize:any = null;
|
||||||
public datasetsSize:any = null;
|
public datasetsSize:any = null;
|
||||||
|
public softwareSize: any = null;
|
||||||
|
public otherSize: any = null;
|
||||||
public fundersSize:any = null;
|
public fundersSize:any = null;
|
||||||
public projectsSize:any = null;
|
public projectsSize:any = null;
|
||||||
public datasourcesSize:any = null;
|
public datasourcesSize:any = null;
|
||||||
|
@ -47,15 +51,20 @@ export class HomeComponent {
|
||||||
|
|
||||||
showPublications:boolean= false;
|
showPublications:boolean= false;
|
||||||
showDatasets:boolean= false;
|
showDatasets:boolean= false;
|
||||||
|
showSoftware: boolean = false;
|
||||||
|
showOrp: boolean = false;
|
||||||
showProjects:boolean= false;
|
showProjects:boolean= false;
|
||||||
showDataProviders:boolean= false;
|
showDataProviders:boolean= false;
|
||||||
properties: EnvProperties;
|
properties: EnvProperties;
|
||||||
public subPub;public subData;public subProjects;public subOrg; public subDataPr;
|
public subPub;public subData;public subProjects;public subOrg; public subDataPr;
|
||||||
|
public subSoft;
|
||||||
|
public subOrp;
|
||||||
constructor (
|
constructor (
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private _router: Router,
|
private _router: Router,
|
||||||
private _searchPublicationsService: SearchPublicationsService,
|
private _searchPublicationsService: SearchPublicationsService,
|
||||||
|
private _searchSoftwareService: SearchSoftwareService,
|
||||||
|
private _searchOrpsService: SearchOrpsService,
|
||||||
private _searchDataprovidersService: SearchDataprovidersService,
|
private _searchDataprovidersService: SearchDataprovidersService,
|
||||||
private _searchProjectsService: SearchProjectsService,
|
private _searchProjectsService: SearchProjectsService,
|
||||||
private _searchDatasetsService: SearchDatasetsService,
|
private _searchDatasetsService: SearchDatasetsService,
|
||||||
|
@ -98,6 +107,8 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
|
||||||
}
|
}
|
||||||
this.showPublications = showEntity["publication"];
|
this.showPublications = showEntity["publication"];
|
||||||
this.showDatasets = showEntity["dataset"];
|
this.showDatasets = showEntity["dataset"];
|
||||||
|
this.showSoftware = showEntity["software"];
|
||||||
|
this.showOrp = showEntity["orp"];
|
||||||
this.showProjects = showEntity["project"];
|
this.showProjects = showEntity["project"];
|
||||||
this.showDataProviders = showEntity["datasource"];
|
this.showDataProviders = showEntity["datasource"];
|
||||||
this.getNumbers();
|
this.getNumbers();
|
||||||
|
@ -166,6 +177,34 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (this.showSoftware) {
|
||||||
|
this.subSoft = this._searchSoftwareService.numOfSearchSoftware("", this.properties).subscribe(
|
||||||
|
data => {
|
||||||
|
if (data && data > 0) {
|
||||||
|
this.softwareSize = NumberUtils.roundNumber(data);
|
||||||
|
}else{
|
||||||
|
this.showSoftware = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
err => {
|
||||||
|
this.handleError("Error getting number of software data", err);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (this.showOrp) {
|
||||||
|
this.subOrp = this._searchOrpsService.numOfSearchOrps("", this.properties).subscribe(
|
||||||
|
data => {
|
||||||
|
if (data && data > 0) {
|
||||||
|
this.otherSize = NumberUtils.roundNumber(data);
|
||||||
|
}else{
|
||||||
|
this.showOrp = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
err => {
|
||||||
|
this.handleError("Error getting number of software data", err);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
if(this.showProjects){
|
if(this.showProjects){
|
||||||
this.subfunders = this._refineFieldResultsService.getRefineFieldsResultsByEntityName(["funder"],"project", this.properties).subscribe(
|
this.subfunders = this._refineFieldResultsService.getRefineFieldsResultsByEntityName(["funder"],"project", this.properties).subscribe(
|
||||||
data => {
|
data => {
|
||||||
|
|
|
@ -24,13 +24,15 @@ import {Schema2jsonldModule} from '../openaireLibrary/sharedComponents/schema2js
|
||||||
import { SEOServiceModule } from '../openaireLibrary/sharedComponents/SEO/SEOService.module';
|
import { SEOServiceModule } from '../openaireLibrary/sharedComponents/SEO/SEOService.module';
|
||||||
|
|
||||||
import {ErrorMessagesModule} from '../openaireLibrary/utils/errorMessages.module';
|
import {ErrorMessagesModule} from '../openaireLibrary/utils/errorMessages.module';
|
||||||
|
import {OrpsServiceModule} from "../openaireLibrary/services/orpsService.module";
|
||||||
|
import {SoftwareServiceModule} from "../openaireLibrary/services/softwareService.module";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule, FormsModule, RouterModule,
|
CommonModule, FormsModule, RouterModule,
|
||||||
RefineFieldResultsServiceModule,
|
RefineFieldResultsServiceModule,
|
||||||
DataProvidersServiceModule, DatasetsServiceModule, ProjectsServiceModule,
|
DataProvidersServiceModule, DatasetsServiceModule, ProjectsServiceModule,
|
||||||
PublicationsServiceModule,
|
PublicationsServiceModule, SoftwareServiceModule, OrpsServiceModule,
|
||||||
OrganizationsServiceModule,
|
OrganizationsServiceModule,
|
||||||
SearchFormModule,
|
SearchFormModule,
|
||||||
PiwikServiceModule,
|
PiwikServiceModule,
|
||||||
|
|
|
@ -121,6 +121,6 @@
|
||||||
|
|
||||||
.portal-color.emphasis {
|
.portal-color.emphasis {
|
||||||
color: #37C7E9;
|
color: #37C7E9;
|
||||||
font-size: 60px;
|
font-size: 50px;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue