From 87df817768baa51e3a4690967ebc23566adadd8e Mon Sep 17 00:00:00 2001 From: "michele.artini" Date: Mon, 6 Feb 2023 16:21:57 +0100 Subject: [PATCH] setup for mdstore inspector ui --- .../manager/controller/SwaggerController.java | 16 ------------- .../src/app/app-routing.module.ts | 4 +++- .../dnet-is-application/src/app/app.module.ts | 5 +++- .../main-menu-panels.component.html | 10 +++++++- .../mdstores/mdstore-inspector.component.html | 1 + .../src/app/mdstores/mdstores.component.css | 0 .../src/app/mdstores/mdstores.component.html | 1 + .../app/mdstores/mdstores.component.spec.ts | 23 +++++++++++++++++++ .../src/app/mdstores/mdstores.component.ts | 19 +++++++++++++++ 9 files changed, 60 insertions(+), 19 deletions(-) delete mode 100644 apps/dhp-mdstore-manager/src/main/java/eu/dnetlib/data/mdstore/manager/controller/SwaggerController.java create mode 100644 frontends/dnet-is-application/src/app/mdstores/mdstore-inspector.component.html create mode 100644 frontends/dnet-is-application/src/app/mdstores/mdstores.component.css create mode 100644 frontends/dnet-is-application/src/app/mdstores/mdstores.component.html create mode 100644 frontends/dnet-is-application/src/app/mdstores/mdstores.component.spec.ts create mode 100644 frontends/dnet-is-application/src/app/mdstores/mdstores.component.ts diff --git a/apps/dhp-mdstore-manager/src/main/java/eu/dnetlib/data/mdstore/manager/controller/SwaggerController.java b/apps/dhp-mdstore-manager/src/main/java/eu/dnetlib/data/mdstore/manager/controller/SwaggerController.java deleted file mode 100644 index 31cf2839..00000000 --- a/apps/dhp-mdstore-manager/src/main/java/eu/dnetlib/data/mdstore/manager/controller/SwaggerController.java +++ /dev/null @@ -1,16 +0,0 @@ -package eu.dnetlib.data.mdstore.manager.controller; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; - -@Controller -public class SwaggerController { - - @RequestMapping(value = { - "/apidoc", "/api-doc", "/doc", "/swagger" - }, method = RequestMethod.GET) - public String apiDoc() { - return "redirect:swagger-ui/index.html"; - } -} diff --git a/frontends/dnet-is-application/src/app/app-routing.module.ts b/frontends/dnet-is-application/src/app/app-routing.module.ts index db17a49d..1647793e 100644 --- a/frontends/dnet-is-application/src/app/app-routing.module.ts +++ b/frontends/dnet-is-application/src/app/app-routing.module.ts @@ -7,6 +7,7 @@ import { ResourcesComponent } from './resources/resources.component'; import { VocabulariesComponent, VocabularyEditorComponent } from './vocabularies/vocabularies.component'; import { ContextViewerComponent, ContextsComponent } from './contexts/contexts.component'; import { DsmSearchComponent, DsmResultsComponent, DsmApiComponent } from './dsm/dsm.component'; +import { MdstoreInspectorComponent, MdstoresComponent } from './mdstores/mdstores.component'; const routes: Routes = [ { path:"" , redirectTo:'info', pathMatch: 'full' }, @@ -20,7 +21,8 @@ const routes: Routes = [ { path:"voc_editor" , component:VocabularyEditorComponent }, { path:"dsm/search" , component:DsmSearchComponent }, { path:"dsm/results/:page/:size" , component:DsmResultsComponent }, - { path:"dsm/api" , component:DsmApiComponent } + { path:"mdstores" , component:MdstoresComponent }, + { path:"mdstore/:id/:limit" , component:MdstoreInspectorComponent } ]; @NgModule({ diff --git a/frontends/dnet-is-application/src/app/app.module.ts b/frontends/dnet-is-application/src/app/app.module.ts index f881cb21..bf5eba88 100644 --- a/frontends/dnet-is-application/src/app/app.module.ts +++ b/frontends/dnet-is-application/src/app/app.module.ts @@ -34,6 +34,7 @@ import { DsmSearchComponent, DsmResultsComponent, DsmApiComponent, DsmAddApiDial import { MatPaginatorModule } from '@angular/material/paginator'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { SpinnerHttpInterceptor } from './common/spinner.service'; +import { MdstoresComponent, MdstoreInspectorComponent } from './mdstores/mdstores.component'; @NgModule({ declarations: [ @@ -59,7 +60,9 @@ import { SpinnerHttpInterceptor } from './common/spinner.service'; DsmResultsComponent, DsmApiComponent, DsmAddApiDialog, - DsmBrowseDialog + DsmBrowseDialog, + MdstoresComponent, + MdstoreInspectorComponent ], imports: [ BrowserModule, diff --git a/frontends/dnet-is-application/src/app/main-menu-panels/main-menu-panels.component.html b/frontends/dnet-is-application/src/app/main-menu-panels/main-menu-panels.component.html index 921a6b61..b55acbfa 100644 --- a/frontends/dnet-is-application/src/app/main-menu-panels/main-menu-panels.component.html +++ b/frontends/dnet-is-application/src/app/main-menu-panels/main-menu-panels.component.html @@ -19,7 +19,6 @@ - Simple Resources @@ -52,6 +51,15 @@ + + + Tools + +
+ MDStore Inspector +
+
+ Logs diff --git a/frontends/dnet-is-application/src/app/mdstores/mdstore-inspector.component.html b/frontends/dnet-is-application/src/app/mdstores/mdstore-inspector.component.html new file mode 100644 index 00000000..0fda12c2 --- /dev/null +++ b/frontends/dnet-is-application/src/app/mdstores/mdstore-inspector.component.html @@ -0,0 +1 @@ +

Metadata Store Inspector

\ No newline at end of file diff --git a/frontends/dnet-is-application/src/app/mdstores/mdstores.component.css b/frontends/dnet-is-application/src/app/mdstores/mdstores.component.css new file mode 100644 index 00000000..e69de29b diff --git a/frontends/dnet-is-application/src/app/mdstores/mdstores.component.html b/frontends/dnet-is-application/src/app/mdstores/mdstores.component.html new file mode 100644 index 00000000..60c736b3 --- /dev/null +++ b/frontends/dnet-is-application/src/app/mdstores/mdstores.component.html @@ -0,0 +1 @@ +

Metadata Stores

\ No newline at end of file diff --git a/frontends/dnet-is-application/src/app/mdstores/mdstores.component.spec.ts b/frontends/dnet-is-application/src/app/mdstores/mdstores.component.spec.ts new file mode 100644 index 00000000..96e6e962 --- /dev/null +++ b/frontends/dnet-is-application/src/app/mdstores/mdstores.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MdstoresComponent } from './mdstores.component'; + +describe('MdstoresComponent', () => { + let component: MdstoresComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ MdstoresComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(MdstoresComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/frontends/dnet-is-application/src/app/mdstores/mdstores.component.ts b/frontends/dnet-is-application/src/app/mdstores/mdstores.component.ts new file mode 100644 index 00000000..6daf9b3b --- /dev/null +++ b/frontends/dnet-is-application/src/app/mdstores/mdstores.component.ts @@ -0,0 +1,19 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-mdstores', + templateUrl: './mdstores.component.html', + styleUrls: ['./mdstores.component.css'] +}) +export class MdstoresComponent { + +} + +@Component({ + selector: 'app-mdstore-inspector', + templateUrl: './mdstore-inspector.component.html', + styleUrls: ['./mdstores.component.css'] +}) +export class MdstoreInspectorComponent { + +}