Skip to content
Snippets Groups Projects
Commit 7606e2af authored by Callari, Roberto's avatar Callari, Roberto
Browse files

docker

parent 8265f87e
No related branches found
No related tags found
No related merge requests found
Showing
with 8 additions and 178 deletions
export class SKOSPrefLabel {
id?: string;
nodeID?: string;
language?: string;
value?: string;
constructor(){}
}
\ No newline at end of file
export enum SortMode {
Asc = "asc",
Desc = "desc",
}
\ No newline at end of file
import { SortMode } from "./sort-mode.enum";
export class SortOption {
field?: string = 'id';
mode?: SortMode = SortMode.Asc;
constructor(){}
}
\ No newline at end of file
export class SPDXChecksum {
id?: string;
nodeID?: string;
uri?: string;
algorithm?: string;
checksumValue?: string;
constructor(){}
}
\ No newline at end of file
export class VCardOrganization {
id?: string;
resourceUri?: string;
propertyUri?: string;
fn: string;
nodeID: string;
hasEmail?: string;
hasTelephoneValue?: string;
hasTelephoneType?: string;
constructor(){}
}
\ No newline at end of file
<p>search works!</p>
<p>{{searchResponse.count}}</p>
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { SearchComponent } from './search.component';
describe('SearchComponent', () => {
let component: SearchComponent;
let fixture: ComponentFixture<SearchComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ SearchComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(SearchComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { SearchRequest } from '../model/search-request';
import { SearchResult } from '../model/search-result';
import { RestAPIService } from '../services/rest-api.service';
@Component({
selector: 'ngx-search',
templateUrl: './search.component.html',
styleUrls: ['./search.component.scss']
})
export class SearchComponent implements OnInit {
searchResponse:SearchResult=new SearchResult();
searchRequest:SearchRequest=new SearchRequest();
constructor(private restApi:RestAPIService) { }
ngOnInit(): void {
this.restApi.getCataloguesInfo().subscribe(infos =>{
this.searchRequest.nodes = infos.map(x=>x.id)
this.restApi.searchDatasets(this.searchRequest).subscribe(res=>this.searchResponse=res);
})
}
}
import { TestBed } from '@angular/core/testing';
import { RestAPIService } from './rest-api.service';
describe('RestAPIService', () => {
let service: RestAPIService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(RestAPIService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { ConfigService } from '@ngx-config/core';
import { Observable } from 'rxjs';
import { DCATDataset } from '../model/dcatdataset';
import { ODMSCatalogue } from '../model/odmscatalogue';
import { ODMSCatalogueInfo } from '../model/odmscatalogue-info';
import { ODMSCatalogueResponse } from '../model/odmscatalogue-response';
import { SearchRequest } from '../model/search-request';
import { SearchResult } from '../model/search-result';
@Injectable({
providedIn: 'root'
})
export class RestAPIService {
private apiEndpoint;
constructor(private config:ConfigService,private http:HttpClient) {
this.apiEndpoint=this.config.getSettings("idra_base_url");
}
getDatasetById(id:string):Observable<DCATDataset>{
return this.http.get<DCATDataset>(`${this.apiEndpoint}/Idra/api/v1/client/datasets/${id}`);
}
getDataset(catalogueId:number, id:string):Observable<DCATDataset>{
return this.http.get<DCATDataset>(`${this.apiEndpoint}/Idra/api/v1/client/catalogues/${catalogueId}/datasets/${id}`);
}
getDatasets(catalogueId:number):Observable<Array<DCATDataset>>{
return this.http.get<Array<DCATDataset>>(`${this.apiEndpoint}/Idra/api/v1/client/catalogues/${catalogueId}/datasets`);
}
getCatalogue(catalogueId:number):Observable<ODMSCatalogue>{
return this.http.get<ODMSCatalogue>(`${this.apiEndpoint}/Idra/api/v1/client/catalogues/${catalogueId}`);
}
getCatalogues(/*Use the default server query parameter*/):Observable<ODMSCatalogueResponse>{
return this.http.get<ODMSCatalogueResponse>(`${this.apiEndpoint}/Idra/api/v1/client/catalogues`);
}
getCataloguesInfo():Observable<Array<ODMSCatalogueInfo>>{
return this.http.get<Array<ODMSCatalogueInfo>>(`${this.apiEndpoint}/Idra/api/v1/client/cataloguesInfo`);
}
searchDatasets(parameters:SearchRequest):Observable<SearchResult>{
return this.http.post<SearchResult>(`${this.apiEndpoint}/Idra/api/v1/client/search`,parameters);
}
}
......@@ -13,14 +13,6 @@ export const MENU_ITEMS: NbMenuItem[] = [
name:"home"
}
},
{
title: 'Data Catalogue',
icon: 'home-outline',
link: "/pages/catalogues",
data:{
name:"catalogues"
}
},
{
title: 'Maps',
icon: 'map-outline',
......
......@@ -39,11 +39,6 @@ const routes: Routes = [{
loadChildren: () => import('./charts/charts.module')
.then(m => m.ChartsModule),
},
{
path: 'catalogues',
loadChildren: () => import('./data-catalogue/data-catalogue.module')
.then(m => m.DataCatalogueModule),
},
{
path: '',
redirectTo: 'home',
......
import { Component, OnInit } from '@angular/core';
import { NbAccessChecker } from '@nebular/security';
import { NbMenuItem } from '@nebular/theme';
import { ConfigService } from '@ngx-config/core';
import { MENU_ITEMS } from './pages-menu';
......@@ -19,12 +20,15 @@ export class PagesComponent implements OnInit {
menu = MENU_ITEMS;
userRoles: string[];
constructor(
private accessChecker: NbAccessChecker) {
private accessChecker: NbAccessChecker,
private configService: ConfigService) {
}
ngOnInit() {
if (this.configService.getSettings('enableAuthentication')) {
this.authMenuItems();
}
}
authMenuItems() {
this.menu.forEach(item => {
......
{
"enableAuthentication":false,
"authProfile": "oidc",
"idmBaseURL":"http://192.168.99.103:8080/auth/realms/urbanite/protocol/openid-connect",
"idmBaseURL":"http://localhost:8080/auth/realms/urbanite/protocol/openid-connect",
"dashboardBaseURL":"http://localhost:4200",
"client_id":"urbanite",
"client_secret": "",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment