Project

General

Profile

« Previous | Next » 

Revision 52604

Detailed instructions for deployment, add content folder and modules

View differences:

modules/uoa-connect-portal/trunk/prepareDeploy.sh
1
cp connect-production-properties.json src/assets/env-properties.json;
2
rm -rf src/assets/common-assets/.svn/;
3
rm -rf src/app/openaireLibrary/.svn/;
4
pico src/app/openaireLibrary/utils/properties/environment-specific.service.ts;
5
npm run build:dynamic;
6
rm -rf src node_modules  .idea/ connect-production-properties.json installOpenaireLib.sh;
7
echo 'Ready!';
8
echo 'Now copy dist to the server!'
1
##ATTENTION
2
## DON'T run it in svn folder - it *REMOVES* files
3
## Copy project in another file "deploy-folder"
4
## cd "deploy-folder"
5
## run the script
6

  
7
## uncommect from here-->
8
# cp connect-production-properties.json src/assets/env-properties.json;
9
# rm -rf src/assets/common-assets/.svn/;
10
# rm -rf src/app/openaireLibrary/.svn/;
11
# pico src/app/openaireLibrary/utils/properties/environment-specific.service.ts;
12
# npm run build:dynamic;
13
# rm -rf src node_modules  .idea/ connect-production-properties.json installOpenaireLib.sh;
14
# echo 'Ready!';
15
# echo 'Now copy to the server!'
16
##<-- to here
17

  
18
##copy "deploy-folder" in beta.connect.openaire.eu
19
##coppies of previous deployments exist in  "/home/argiro.kokogiannaki/connect-portal/connectYYYY-MM-DD"
20
##run "npm i"
21
##become nodejs user: "sudo su nodejs -s /bin/bash"
22
##go to "cd /srv/www/portal"
23
##cp files from "cp -r HOME_PATH/deploy-folder/* ."
24
##restart portal "pm2 restart connect"
modules/uoa-connect-portal/trunk/src/app/content/contentPage.module.ts
1
import { NgModule,  ModuleWithProviders }            from '@angular/core';
2

  
3
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
4
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
5
import {IsRouteEnabled} from '../openaireLibrary/error/isRouteEnabled.guard'
6

  
7
import {ContentPageComponent} from './contentPage.component';
8
import {ContentPageRoutingModule} from './content-routing.module';
9

  
10

  
11
@NgModule({
12
  imports: [
13
    ContentPageRoutingModule
14
  ],
15
  declarations: [
16
    ContentPageComponent
17
  ],
18
  providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled],
19
  exports: [
20
    ContentPageComponent
21
  ]
22
})
23

  
24

  
25
export class ContentPageModule{}
modules/uoa-connect-portal/trunk/src/app/content/content-routing.module.ts
1
import { NgModule } from '@angular/core';
2
import { RouterModule } from '@angular/router';
3

  
4
import {ContentPageComponent} from './contentPage.component';
5
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
6
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
7

  
8
@NgModule({
9
  imports: [
10
    RouterModule.forChild([
11
     	{ path: '', component: ContentPageComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] }
12

  
13
    ])
14
  ]
15
})
16
export class ContentPageRoutingModule { }
modules/uoa-connect-portal/trunk/src/app/content/contentPage.component.html
1

  
2
<div class=" uk-section  uk-margin-small-top tm-middle uk-container" id="tm-main">
3
  <div class="uk-container  uk-margin-bottom">
4
      <div class="uk-article-title custom-article-title">
5
         About OpenAIRE Connect content
6
      </div>
7
      <p>
8
        In this page we will provide you information about  OpenAIRE Connect content.
9
        Comming soon...
10
      </p>
11
  </div>
12
</div>
modules/uoa-connect-portal/trunk/src/app/content/contentPage.component.ts
1
import {Component, Input, Output, EventEmitter, ViewChild, ElementRef} from '@angular/core';
2
import {Observable}       from 'rxjs/Observable';
3
import {ActivatedRoute, Router} from '@angular/router';
4
import {Title, Meta}                  from '@angular/platform-browser';
5

  
6
@Component({
7
    selector: 'content',
8
    templateUrl: './contentPage.component.html'
9
})
10
export class ContentPageComponent {
11

  
12
  constructor ( private  route: ActivatedRoute, private _router: Router,
13
                private _meta: Meta, private _title: Title) {}
14

  
15
  public ngOnInit() {
16
     this.updateTitle("Content");
17
     this.updateDescription("content, open access");
18

  
19
  }
20

  
21
  private updateDescription(description:string){
22
    this._meta.updateTag({content:description},"name='description'");
23
    this._meta.updateTag({content:description},"property='og:description'");
24
  }
25
  private updateTitle(title:string){
26
    var _prefix ="OpenAIRE | ";
27
    var _title = _prefix + ((title.length> 50 ) ?title.substring(0,50):title);
28
    this._title.setTitle(_title);
29
    this._meta.updateTag({content:_title},"property='og:title'");
30
  }
31
  private updateUrl(url:string){
32
    this._meta.updateTag({content:url},"property='og:url'");
33
  }
34
}
modules/uoa-connect-portal/trunk/src/assets/env-properties.json
56 56

  
57 57
  "cacheUrl" :"http://scoobydoo.di.uoa.gr:3000/get?url=",
58 58

  
59
  "adminToolsAPIURL" :"http://scoobydoo.di.uoa.gr:8080/uoa-admin-tools",
59
  "adminToolsAPIURL" :"http://duffy.di.uoa.gr:8080/uoa-admin-tools",
60 60

  
61 61
  "adminToolsCommunity" :"openaire",
62 62

  

Also available in: Unified diff