From d38a3f298ef7050db4cef4671751a350b3765cf0 Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Fri, 23 Sep 2016 09:50:02 +0000 Subject: [PATCH] incomplete commit git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@43794 d315682c-612b-4755-9ff5-7f18f6832af3 --- portal-2/src/main.browser.ts | 53 ++++++------------------------------ portal-2/src/main.node.ts | 42 ++++++++++++++++++++++------ portal-2/src/server.ts | 18 +++++++----- 3 files changed, 53 insertions(+), 60 deletions(-) diff --git a/portal-2/src/main.browser.ts b/portal-2/src/main.browser.ts index 914ba13c..63e6b697 100644 --- a/portal-2/src/main.browser.ts +++ b/portal-2/src/main.browser.ts @@ -10,50 +10,16 @@ import { Routes, RouterModule } from "@angular/router"; import {ClaimModule} from './app/claimPages/claim.module'; import {SearchModule} from './app/searchPages/search.module'; import {DepoditModule} from './app/deposit/deposit.module'; +import {LandingModule} from './app/landingPages/landing.module'; -//Entities -import {DatasetInfo} from './app/entities/datasetInfo'; -import {OrganizationInfo} from './app/entities/organizationInfo'; -import {PersonInfo} from './app/entities/personInfo'; -import {ProjectInfo} from './app/entities/projectInfo'; -import {Publication} from './app/entities/publication'; -import {PublicationInfo} from './app/entities/publicationInfo'; -import {SearchResult} from './app/entities/searchResult'; -import {OpenaireProperties} from './app/openaireProperties'; +import {ServicesModule} from './app/services/services.module'; - -//Services -import { ContextsService} from './app/services/contexts.service'; -import { DatasetService} from './app/services/dataset.service'; -import { OpenaireProjectsService } from './app/services/openaireProjects.service'; -import { OrganizationService} from './app/services/organization.service'; -import { PersonService} from './app/services/person.service'; -import { ProjectService} from './app/services/project.service'; -import { PublicationService} from './app/services/publication.service'; -import { SearchCrossrefService } from './app/services/searchCrossref.service'; -import { SearchDataciteService } from './app/services/searchDatacite.service'; -import { SearchOrcidService } from './app/services/searchOrcid.service'; -import {SearchPublicationsService} from './app/services/searchPublications.service'; //Main Router Components import {HomeComponent} from './app/home/home.component'; -import { PersonComponent } from './app/landingPages/person/person.component'; -import { ProjectComponent } from './app/landingPages/project/project.component'; -import { OrganizationComponent } from './app/landingPages/organization/organization.component'; -import { DatasetComponent } from './app/landingPages/dataset/dataset.component'; - -import { PublicationComponent } from './app/landingPages/publication/publication.component'; - //Other Components - -import {ExportCSVComponent} from './app/exportCSV.component.ts'; -import {TabPagingComponent} from './app/landingPages/tabPaging.component.ts'; -import {TabTableComponent} from './app/landingPages/tabTable.component.ts'; -import {ShowTitleComponent} from './app/landingPages/showTitle.component.ts'; -import {ShowAuthorsComponent} from './app/landingPages/showAuthors.component.ts'; -import {ShowIdentifiersComponent} from './app/landingPages/showIdentifiers.component.ts'; -import {ShowSubjectsComponent} from './app/landingPages/showSubjects.component.ts'; +import {ErrorPageComponent} from './app/error/errorPage.component'; @NgModule({ bootstrap: [ App ], @@ -63,20 +29,17 @@ import {ShowSubjectsComponent} from './app/landingPages/showSubjects.component.t ClaimModule, SearchModule, DepoditModule, + LandingModule, + ServicesModule, routing ], declarations: [ App, - HomeComponent, PersonComponent, ProjectComponent, - PublicationComponent, - ExportCSVComponent, OrganizationComponent, DatasetComponent, - TabPagingComponent, TabTableComponent, ShowTitleComponent, ShowAuthorsComponent, ShowIdentifiersComponent, ShowSubjectsComponent, + HomeComponent, + ErrorPageComponent + ], providers: [ - ContextsService, DatasetService, OpenaireProjectsService,OrganizationService, - PersonService, ProjectService, PublicationService, SearchCrossrefService, - SearchCrossrefService, SearchDataciteService, SearchOrcidService, - SearchPublicationsService ], }) export class MainModule { diff --git a/portal-2/src/main.node.ts b/portal-2/src/main.node.ts index e635b031..63e6b697 100644 --- a/portal-2/src/main.node.ts +++ b/portal-2/src/main.node.ts @@ -1,20 +1,46 @@ import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; -import { RouterModule } from '@angular/router'; import { UniversalModule } from 'angular2-universal'; -import { HomeComponent } from './app/home/home.component'; import { App } from './app/app'; +//for routing: +import { routing } from './app/app.routing'; +import { Routes, RouterModule } from "@angular/router"; + +// custom modules:: +import {ClaimModule} from './app/claimPages/claim.module'; +import {SearchModule} from './app/searchPages/search.module'; +import {DepoditModule} from './app/deposit/deposit.module'; +import {LandingModule} from './app/landingPages/landing.module'; + +import {ServicesModule} from './app/services/services.module'; + + +//Main Router Components + +import {HomeComponent} from './app/home/home.component'; + +import {ErrorPageComponent} from './app/error/errorPage.component'; @NgModule({ bootstrap: [ App ], - declarations: [ App, HomeComponent ], imports: [ - UniversalModule, // NodeModule, NodeHttpModule, and NodeJsonpModule are included + UniversalModule, // BrowserModule, HttpModule, and JsonpModule are included FormsModule, - RouterModule.forRoot([ - { path: '', component: HomeComponent, pathMatch: 'full' } - ]) - ] + ClaimModule, + SearchModule, + DepoditModule, + LandingModule, + ServicesModule, + routing + ], + declarations: [ App, + HomeComponent, + ErrorPageComponent + + + ], + providers: [ + ], }) export class MainModule { diff --git a/portal-2/src/server.ts b/portal-2/src/server.ts index 166bf2ad..eb6ad008 100644 --- a/portal-2/src/server.ts +++ b/portal-2/src/server.ts @@ -63,20 +63,24 @@ app.get('/person', ngApp); app.get('/project', ngApp); app.get('/organization', ngApp); app.get('/dataset', ngApp); +app.get('/dataprovider', ngApp); app.get('/publication', ngApp); app.get('/search', ngApp); app.get('/search-publications', ngApp); app.get('/advanced-search-publications', ngApp); app.get('/deposit', ngApp); +app.get('/deposit-result', ngApp); +app.get('/error', ngApp); +app.get('*', ngApp); - -app.get('*', function(req, res) { - res.setHeader('Content-Type', 'application/json'); - var pojo = { status: 404, message: 'No Content' }; - var json = JSON.stringify(pojo, null, 2); - res.status(404).send(json); -}); +// +// app.get('*', function(req, res) { +// res.setHeader('Content-Type', 'application/json'); +// var pojo = { status: 404, message: 'No Content' }; +// var json = JSON.stringify(pojo, null, 2); +// res.status(404).send(json); +// }); // Server let server = app.listen(process.env.PORT || 3000, () => {