[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:
argiro.kokogiannaki 2019-06-13 14:54:39 +00:00
parent 51aef8b025
commit 1329c108e5
4 changed files with 560 additions and 472 deletions

File diff suppressed because it is too large Load Diff

View File

@ -20,6 +20,8 @@ import { EnvProperties} from '../openaireLibrary/utils/properties/env-properties
import { ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import { SEOService } from '../openaireLibrary/sharedComponents/SEO/SEO.service';
import {SearchSoftwareService} from "../openaireLibrary/services/searchSoftware.service";
import {SearchOrpsService} from "../openaireLibrary/services/searchOrps.service";
@Component({
selector: 'home',
@ -38,6 +40,8 @@ export class HomeComponent {
public publicationsSize:any = null;
public datasetsSize:any = null;
public softwareSize: any = null;
public otherSize: any = null;
public fundersSize:any = null;
public projectsSize:any = null;
public datasourcesSize:any = null;
@ -47,15 +51,20 @@ export class HomeComponent {
showPublications:boolean= false;
showDatasets:boolean= false;
showSoftware: boolean = false;
showOrp: boolean = false;
showProjects:boolean= false;
showDataProviders:boolean= false;
properties: EnvProperties;
public subPub;public subData;public subProjects;public subOrg; public subDataPr;
public subSoft;
public subOrp;
constructor (
private route: ActivatedRoute,
private _router: Router,
private _searchPublicationsService: SearchPublicationsService,
private _searchSoftwareService: SearchSoftwareService,
private _searchOrpsService: SearchOrpsService,
private _searchDataprovidersService: SearchDataprovidersService,
private _searchProjectsService: SearchProjectsService,
private _searchDatasetsService: SearchDatasetsService,
@ -98,6 +107,8 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
}
this.showPublications = showEntity["publication"];
this.showDatasets = showEntity["dataset"];
this.showSoftware = showEntity["software"];
this.showOrp = showEntity["orp"];
this.showProjects = showEntity["project"];
this.showDataProviders = showEntity["datasource"];
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){
this.subfunders = this._refineFieldResultsService.getRefineFieldsResultsByEntityName(["funder"],"project", this.properties).subscribe(
data => {

View File

@ -24,13 +24,15 @@ import {Schema2jsonldModule} from '../openaireLibrary/sharedComponents/schema2js
import { SEOServiceModule } from '../openaireLibrary/sharedComponents/SEO/SEOService.module';
import {ErrorMessagesModule} from '../openaireLibrary/utils/errorMessages.module';
import {OrpsServiceModule} from "../openaireLibrary/services/orpsService.module";
import {SoftwareServiceModule} from "../openaireLibrary/services/softwareService.module";
@NgModule({
imports: [
CommonModule, FormsModule, RouterModule,
RefineFieldResultsServiceModule,
DataProvidersServiceModule, DatasetsServiceModule, ProjectsServiceModule,
PublicationsServiceModule,
PublicationsServiceModule, SoftwareServiceModule, OrpsServiceModule,
OrganizationsServiceModule,
SearchFormModule,
PiwikServiceModule,

View File

@ -121,6 +121,6 @@
.portal-color.emphasis {
color: #37C7E9;
font-size: 60px;
font-size: 50px;
font-weight: 300;
}