use properties| add admin claims| guards
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@50682 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
224c280990
commit
5a4235eb25
|
@ -1,4 +1,4 @@
|
||||||
<navbar portal="connect" logoPath="imgs/" onlyTop=true userMenu=true [userMenuItems]=userMenuItems [menuItems]=menuItems [(logInUrl)]=logInUrl [(logOutUrl)]=logOutUrl></navbar>
|
<navbar portal="connect" logoPath="imgs/" onlyTop=true userMenu=true [userMenuItems]=userMenuItems [menuItems]=menuItems [(logInUrl)]=logInUrl [(logOutUrl)]=logOutUrl [(community)]=community></navbar>
|
||||||
|
|
||||||
<!--div class="">
|
<!--div class="">
|
||||||
<div class="uk-navbar-left uk-visible@l ">
|
<div class="uk-navbar-left uk-visible@l ">
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {Properties} from './utils/properties';
|
import {Properties} from './utils/properties';
|
||||||
import{MenuItem, RootMenuItem} from 'ng-openaire-library';
|
import{MenuItem, RootMenuItem} from 'ng-openaire-library';
|
||||||
|
import {ActivatedRoute} from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'metadata-registry-service',
|
selector: 'metadata-registry-service',
|
||||||
templateUrl: './app.component.html',
|
templateUrl: './app.component.html',
|
||||||
|
@ -32,9 +34,23 @@ export class AppComponent {
|
||||||
// ];
|
// ];
|
||||||
logInUrl = null;
|
logInUrl = null;
|
||||||
logOutUrl = null;
|
logOutUrl = null;
|
||||||
constructor( ) {}
|
community: {id:string, name:string, logoUrl:string};
|
||||||
|
|
||||||
|
constructor( private route: ActivatedRoute) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.route.queryParams.subscribe(data => {
|
||||||
|
|
||||||
|
if(data['community'] && data['community']!=""){
|
||||||
|
this.community = {id: data['community'], name: "Egi Federation", logoUrl:"https:\/\/egi.eu/wp-content/uploads/2016/05/cropped-logo_site-1-300x300.png"};
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.community = null;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
this.logInUrl = Properties.getLoginURL();
|
this.logInUrl = Properties.getLoginURL();
|
||||||
this.logOutUrl = Properties.getLogoutURL();
|
this.logOutUrl = Properties.getLogoutURL();
|
||||||
console.log("login url "+this.logInUrl)
|
console.log("login url "+this.logInUrl)
|
||||||
|
|
|
@ -38,9 +38,11 @@ import { DivHelpContentsComponent } from "./pages/divhelpcontent/div-help-conten
|
||||||
import { NewDivHelpContentComponent } from "./pages/divhelpcontent/new-div-help-content.component";
|
import { NewDivHelpContentComponent } from "./pages/divhelpcontent/new-div-help-content.component";
|
||||||
import { DivContentFormComponent } from "./pages/divhelpcontent/div-help-content-form.component";
|
import { DivContentFormComponent } from "./pages/divhelpcontent/div-help-content-form.component";
|
||||||
import { EditDivHelpContentComponent } from "./pages/divhelpcontent/edit-div-help-content.component";
|
import { EditDivHelpContentComponent } from "./pages/divhelpcontent/edit-div-help-content.component";
|
||||||
import {BottomModule, FeedbackModule, NavigationBarModule, CookieLawModule} from 'ng-openaire-library';
|
import {ClaimsComponent} from './pages/claims/claims.component';
|
||||||
import {FreeGuard, AdminLoginGuard} from 'ng-openaire-library';
|
|
||||||
|
|
||||||
|
import {BottomModule, FeedbackModule, NavigationBarModule, CookieLawModule} from 'ng-openaire-library';
|
||||||
|
import {FreeGuard, AdminLoginGuard, EnvironmentSpecificResolver, EnvironmentSpecificService} from 'ng-openaire-library';
|
||||||
|
import{ClaimsAdminModule, Meta} from 'ng-openaire-library';
|
||||||
//, , ErrorModule CookieLawModule
|
//, , ErrorModule CookieLawModule
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -55,7 +57,7 @@ import {FreeGuard, AdminLoginGuard} from 'ng-openaire-library';
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
// JWBootstrapSwitchModule,
|
// JWBootstrapSwitchModule,
|
||||||
CKEditorModule,
|
CKEditorModule,
|
||||||
BottomModule, FeedbackModule, NavigationBarModule, CookieLawModule
|
BottomModule, FeedbackModule, NavigationBarModule, CookieLawModule, ClaimsAdminModule
|
||||||
// , CookieLawModule, ErrorModule
|
// , CookieLawModule, ErrorModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@ -83,13 +85,14 @@ import {FreeGuard, AdminLoginGuard} from 'ng-openaire-library';
|
||||||
DivHelpContentsComponent,
|
DivHelpContentsComponent,
|
||||||
NewDivHelpContentComponent,
|
NewDivHelpContentComponent,
|
||||||
EditDivHelpContentComponent,
|
EditDivHelpContentComponent,
|
||||||
DivContentFormComponent
|
DivContentFormComponent,
|
||||||
|
ClaimsComponent
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
FAQService,
|
FAQService,
|
||||||
HelpContentService,
|
HelpContentService,
|
||||||
appRoutingProviders,
|
appRoutingProviders,
|
||||||
FreeGuard, AdminLoginGuard
|
FreeGuard, AdminLoginGuard, EnvironmentSpecificResolver,EnvironmentSpecificService, Meta
|
||||||
],
|
],
|
||||||
bootstrap: [ AppComponent ]
|
bootstrap: [ AppComponent ]
|
||||||
})
|
})
|
||||||
|
|
|
@ -16,8 +16,10 @@ import { DivIdsComponent } from "./pages/divId/divIds.component";
|
||||||
import { DivHelpContentsComponent } from "./pages/divhelpcontent/div-help-contents.component";
|
import { DivHelpContentsComponent } from "./pages/divhelpcontent/div-help-contents.component";
|
||||||
import { NewDivHelpContentComponent } from "./pages/divhelpcontent/new-div-help-content.component";
|
import { NewDivHelpContentComponent } from "./pages/divhelpcontent/new-div-help-content.component";
|
||||||
import { EditDivHelpContentComponent } from "./pages/divhelpcontent/edit-div-help-content.component";
|
import { EditDivHelpContentComponent } from "./pages/divhelpcontent/edit-div-help-content.component";
|
||||||
|
import {ClaimsComponent} from './pages/claims/claims.component';
|
||||||
|
|
||||||
import {FreeGuard, AdminLoginGuard} from 'ng-openaire-library';
|
import {FreeGuard, AdminLoginGuard} from 'ng-openaire-library';
|
||||||
|
import {EnvironmentSpecificResolver, EnvironmentSpecificService, ClaimsAdminComponent} from 'ng-openaire-library';
|
||||||
|
|
||||||
|
|
||||||
const appRoutes: Routes = [
|
const appRoutes: Routes = [
|
||||||
|
@ -29,66 +31,74 @@ const appRoutes: Routes = [
|
||||||
{
|
{
|
||||||
path: 'dashboard',
|
path: 'dashboard',
|
||||||
component: DashboardComponent,
|
component: DashboardComponent,
|
||||||
canActivate: [FreeGuard]
|
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: 'communities',
|
path: 'communities',
|
||||||
component: CommunitiesComponent,
|
component: CommunitiesComponent,
|
||||||
canActivate: [FreeGuard]
|
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'community-edit-form',
|
path: 'community-edit-form',
|
||||||
component: CommunityEditFormComponent,
|
component: CommunityEditFormComponent,
|
||||||
canActivate: [FreeGuard]
|
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'entities',
|
path: 'entities',
|
||||||
component: EntitiesComponent,
|
component: EntitiesComponent,
|
||||||
canActivate: [FreeGuard]
|
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'classes',
|
path: 'classes',
|
||||||
component: DivIdsComponent,
|
component: DivIdsComponent,canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'pages',
|
path: 'pages',
|
||||||
component: PagesComponent,
|
component: PagesComponent,
|
||||||
canActivate: [FreeGuard]
|
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'pageContents',
|
path: 'pageContents',
|
||||||
component: PageHelpContentsComponent,
|
component: PageHelpContentsComponent,
|
||||||
canActivate: [FreeGuard]
|
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'pageContents/new',
|
path: 'pageContents/new',
|
||||||
component: NewPageHelpContentComponent,
|
component: NewPageHelpContentComponent,
|
||||||
canActivate: [FreeGuard]
|
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
//path: 'pageContents/edit/:id',
|
//path: 'pageContents/edit/:id',
|
||||||
path: 'pageContents/edit',
|
path: 'pageContents/edit',
|
||||||
component: EditPageHelpContentComponent,
|
component: EditPageHelpContentComponent,
|
||||||
canActivate: [FreeGuard]
|
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: 'classContents',
|
path: 'classContents',
|
||||||
component: DivHelpContentsComponent,
|
component: DivHelpContentsComponent,canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'classContents/new',
|
path: 'classContents/new',
|
||||||
component: NewDivHelpContentComponent,
|
component: NewDivHelpContentComponent,canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'classContents/edit',
|
path: 'classContents/edit',
|
||||||
component: EditDivHelpContentComponent,
|
component: EditDivHelpContentComponent,canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'claims',
|
||||||
|
component: ClaimsComponent,canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
||||||
},
|
},
|
||||||
{ path: '**',pathMatch: 'full',component: DashboardComponent }
|
{ path: '**',pathMatch: 'full',component: DashboardComponent }
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
|
];
|
||||||
|
// @NgModule({
|
||||||
|
// imports: [RouterModule.forRoot(appRoutes)],
|
||||||
|
// exports: [RouterModule],
|
||||||
|
// providers: [EnvironmentSpecificResolver, EnvironmentSpecificService]
|
||||||
|
// })
|
||||||
export const appRoutingProviders: any[] = [
|
export const appRoutingProviders: any[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"deploy:server": "docker rm -f omtd-platform && docker run --name omtd-platform -d -p 80:80 omtd-platform",
|
"deploy:server": "docker rm -f omtd-platform && docker run --name omtd-platform -d -p 80:80 omtd-platform",
|
||||||
"deploy:complete": "npm run build:docker && npm run deploy:server",
|
"deploy:complete": "npm run build:docker && npm run deploy:server",
|
||||||
"watch": "npm run build --watch",
|
"watch": "npm run build --watch",
|
||||||
"server": "webpack-dev-server --inline --progress --port 3200 --content-base . --disable-host-check --host 0.0.0.0",
|
"server": "webpack-dev-server --inline --progress --port 5000 --content-base . --disable-host-check --host 0.0.0.0",
|
||||||
"start": "npm run server "
|
"start": "npm run server "
|
||||||
},
|
},
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
|
Loading…
Reference in New Issue