From 2239b1d982aafe5e7dce4dbbec5100f3e3191249 Mon Sep 17 00:00:00 2001 From: "Lott, Christopher (cl778h)" Date: Tue, 14 May 2019 19:43:50 -0400 Subject: [PATCH] Add AC controller with get/put policy methods Upgrade ANR spec to version 0.0.4. Drop the A1 Mediation Controller for pendulum demo. Add footer with version info. Add get-version endpoints for clients. Change-Id: Ie45d412b8f126853fa59d74bb50e74fdecd94688 Signed-off-by: Lott, Christopher (cl778h) --- a1-med-client/pom.xml | 22 +- anr-xapp-client/pom.xml | 27 ++- ...r_swagger_0.0.3.yaml => anr_swagger_0.0.4.yaml} | 73 +++---- docs/release-notes.rst | 8 + e2-mgr-client/pom.xml | 22 +- pom.xml | 2 +- webapp-backend/pom.xml | 4 +- .../ric/portal/dashboard/DashboardApplication.java | 12 +- .../ric/portal/dashboard/DashboardConstants.java | 3 + .../dashboard/config/AnrXappMockConfiguration.java | 20 +- .../controller/A1MediationController.java | 229 --------------------- .../dashboard/controller/AcXappController.java | 92 +++++++++ .../dashboard/controller/AnrXappController.java | 17 +- .../dashboard/controller/E2ManagerController.java | 9 + .../controller/HealthcheckController.java | 60 ++++++ .../controller/XappManagerController.java | 9 + webapp-frontend/package-lock.json | 63 ++++++ webapp-frontend/package.json | 1 + webapp-frontend/pom.xml | 2 +- webapp-frontend/src/app/app.component.css | 17 +- webapp-frontend/src/app/app.component.html | 18 +- webapp-frontend/src/app/app.module.ts | 11 +- .../src/app/footer/footer.component.html | 24 +++ .../src/app/footer/footer.component.scss | 24 +++ .../src/app/footer/footer.component.spec.ts | 44 ++++ webapp-frontend/src/app/footer/footer.component.ts | 45 ++++ .../src/app/interfaces/ac-xapp.types.ts | 31 +++ .../src/app/interfaces/anr-xapp.types.ts | 46 +++++ .../src/app/interfaces/dashboard.types.ts | 26 +++ webapp-frontend/src/app/interfaces/e2-mgr.types.ts | 32 +++ .../src/app/interfaces/xapp-mgr.types.ts | 56 +++-- .../src/app/services/catalog/catalog.service.ts | 15 +- .../src/app/services/signal/signal.service.ts | 10 +- .../app/services/version/version.service.spec.ts | 31 +++ .../src/app/services/version/version.service.ts | 73 +++++++ .../signal/signal.component.ranconnect-dialog.html | 29 ++- webapp-frontend/src/app/signal/signal.component.ts | 216 +++++++++---------- .../ui/catalog-card/catalog-card.component.html | 5 +- .../ui/control-card/control-card.component.html | 4 +- webapp-frontend/src/index.html | 21 +- xapp-mgr-client/pom.xml | 24 ++- 41 files changed, 977 insertions(+), 500 deletions(-) rename anr-xapp-client/src/main/resources/{anr_swagger_0.0.3.yaml => anr_swagger_0.0.4.yaml} (84%) delete mode 100644 webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/A1MediationController.java create mode 100644 webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AcXappController.java create mode 100644 webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/HealthcheckController.java create mode 100644 webapp-frontend/src/app/footer/footer.component.html create mode 100644 webapp-frontend/src/app/footer/footer.component.scss create mode 100644 webapp-frontend/src/app/footer/footer.component.spec.ts create mode 100644 webapp-frontend/src/app/footer/footer.component.ts create mode 100644 webapp-frontend/src/app/interfaces/ac-xapp.types.ts create mode 100644 webapp-frontend/src/app/interfaces/anr-xapp.types.ts create mode 100644 webapp-frontend/src/app/interfaces/dashboard.types.ts create mode 100644 webapp-frontend/src/app/interfaces/e2-mgr.types.ts rename webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/UrlTransport.java => webapp-frontend/src/app/interfaces/xapp-mgr.types.ts (59%) create mode 100644 webapp-frontend/src/app/services/version/version.service.spec.ts create mode 100644 webapp-frontend/src/app/services/version/version.service.ts diff --git a/a1-med-client/pom.xml b/a1-med-client/pom.xml index c586b662..8c106b04 100644 --- a/a1-med-client/pom.xml +++ b/a1-med-client/pom.xml @@ -25,7 +25,7 @@ limitations under the License. org.o-ran-sc.portal.ric-dashboard ric-dash-parent - 1.0.2-SNAPSHOT + 1.0.3-SNAPSHOT org.o-ran-sc.ric.a1med.client @@ -35,6 +35,9 @@ limitations under the License. UTF-8 UTF-8 + + 0 + org.oransc.ric.a1med.client @@ -145,6 +148,23 @@ limitations under the License. + + + org.apache.maven.plugins + maven-jar-plugin + + + + + true + + + ${project.version}-b${build.number} + + + + org.apache.maven.plugins diff --git a/anr-xapp-client/pom.xml b/anr-xapp-client/pom.xml index 08689f92..e450c1d5 100644 --- a/anr-xapp-client/pom.xml +++ b/anr-xapp-client/pom.xml @@ -25,16 +25,18 @@ limitations under the License. org.o-ran-sc.portal.ric-dashboard ric-dash-parent - 1.0.2-SNAPSHOT + 1.0.3-SNAPSHOT org.o-ran-sc.ric.anrxapp.client anr-xapp-client RIC ANR xApp client - 0.0.3-SNAPSHOT + 0.0.4-SNAPSHOT UTF-8 UTF-8 + + 0 org.oransc.ric.anrxapp.client @@ -102,7 +104,7 @@ limitations under the License. generate - ${project.basedir}/src/main/resources/anr_swagger_0.0.3.yaml + ${project.basedir}/src/main/resources/anr_swagger_0.0.4.yaml java ${project.groupId} @@ -148,6 +150,23 @@ limitations under the License. + + + org.apache.maven.plugins + maven-jar-plugin + + + + + true + + + ${project.version}-b${build.number} + + + + org.apache.maven.plugins @@ -179,7 +198,7 @@ limitations under the License. - + diff --git a/anr-xapp-client/src/main/resources/anr_swagger_0.0.3.yaml b/anr-xapp-client/src/main/resources/anr_swagger_0.0.4.yaml similarity index 84% rename from anr-xapp-client/src/main/resources/anr_swagger_0.0.3.yaml rename to anr-xapp-client/src/main/resources/anr_swagger_0.0.4.yaml index 9b0bbd70..55bba184 100644 --- a/anr-xapp-client/src/main/resources/anr_swagger_0.0.3.yaml +++ b/anr-xapp-client/src/main/resources/anr_swagger_0.0.4.yaml @@ -18,7 +18,7 @@ swagger : '2.0' info : description : REST API specification for RIC ANR closed xAPP - version : 0.0.3 + version : 0.0.4 title : RIC ANR license: name : Nokia Closed App @@ -31,7 +31,7 @@ paths : /health/alive : get : summary : Health check of ANR - Liveness probe - tags : + tags : - health operationId : getHealthAlive responses : @@ -40,7 +40,7 @@ paths : /health/ready : get : summary : Health check of ANR - Readiness probe - tags : + tags : - health operationId : getHealthReady responses : @@ -53,7 +53,7 @@ paths : - $ref : '#/parameters/limit' get : summary : Returns neighbor cell relation table for all gnodeBs or based on query string - tags : + tags : - ncrt operationId : getNcrtInfo produces : @@ -68,35 +68,36 @@ paths : /ncrt/cell/{cellIdentifier} : parameters : - $ref : '#/parameters/cellIdentifier' - - $ref : '#/parameters/startIndex' - - $ref : '#/parameters/limit' - - $ref : '#/parameters/neighborCellIdentifierNrpci' - - $ref : '#/parameters/neighborCellIdentifierNrcgi' + - $ref : '#/parameters/neighborCellNrpci' + - $ref : '#/parameters/neighborCellNrcgi' get : summary : Returns neighbor cell relation table for a Source Cell (NR CGI) and optionally a neighbor cell based on query string - tags : + tags : - ncrt operationId : getCellNcrtInfo produces : - application/json + parameters : + - $ref : '#/parameters/startIndex' + - $ref : '#/parameters/limit' responses : '200' : description : successful operation schema : $ref : '#/definitions/neighborCellRelationTable' '400' : - description : Non-existant identifier {cellIdentifier | neighborCellIdentifierNrpci | neighborCellIdentifierNrcgi} in request + description : Non-existant identifier {cellIdentifier | neighborCellNrpci | neighborCellNrcgi} in request put : summary : Modify neighbor cell relation based on Source Cell NR CGI and Target Cell NR PCI / NR CGI - tags : + tags : - ncrt - operationId : modifyNCRT + operationId : modifyNcrt consumes : - application/json produces : - application/json parameters : - - name : NCRTModificationParameters + - name : NcrtModificationParameters in : body description : Parameters to modify neighbor cell relation required : true @@ -107,29 +108,29 @@ paths : description : Successfully modified neighbor cell relation '400' : description : Modification failed. - { Identifier neighborCellIdentifierNrpci / neighborCellIdentifierNrcgi not provided | - Non-existant identifier {cellIdentifier | neighborCellIdentifierNrpci | neighborCellIdentifierNrcgi} in request | + { Identifier neighborCellNrpci / neighborCellNrcgi not provided | + Non-existant identifier {cellIdentifier | neighborCellNrpci | neighborCellNrcgi} in request | Invalid data in body } delete : summary : Delete neighbor cell relation based on Source Cell NR CGI and Target Cell NR PCI / NR CGI - tags : + tags : - ncrt operationId : deleteNcrt parameters : - - name : NCRTDeletionParameters + - name : NcrtDeletionParameters in : body description : Parameters to delete neighbor cell relation required : true schema : - $ref : '#/definitions/neighborCellRelationDelTable' + $ref : '#/definitions/neighborCellRelationDelTable' responses : '204' : description : Successfully deleted neighbor cell relation '400' : description : Deletion failed. - { Identifier neighborCellIdentifierNrpci / neighborCellIdentifierNrcgi not provided | - Non-existant identifier {cellIdentifier | neighborCellIdentifierNrpci | neighborCellIdentifierNrcgi} in request + { Identifier neighborCellNrpci / neighborCellNrcgi not provided | + Non-existant identifier {cellIdentifier | neighborCellNrpci | neighborCellNrcgi} in request } parameters : ggnbId : @@ -153,21 +154,21 @@ parameters : description : Source Cell Identifier (NR CGI) in : path required : true - neighborCellIdentifierNrpci : + neighborCellNrpci : type : string - name : neighborCellIdentifierNrpci + name : neighborCellNrpci description : Neighbor Cell Identifier (NR PCI) in : query - neighborCellIdentifierNrcgi : + neighborCellNrcgi : type : string - name : neighborCellIdentifierNrcgi + name : neighborCellNrcgi description : Neigbhor Cell Identifier (NR CGI) in : query definitions : neighborCellRelationTable : type : object - properties : - ncrtRelations : + properties : + ncrtRelations : type : array items : $ref : '#/definitions/neighborCellRelation' @@ -181,14 +182,14 @@ definitions : $ref : '#/definitions/neighborCellRelationMod' neighborCellRelationDelTable : type : array - items : + items : $ref : '#/definitions/neighborCellRelationDel' neighborCellRelation : type : object - required : + required : - cellIdentifierNrcgi - - neighborCellIdentifierNrpci - - neighborCellIdentifierNrcgi + - neighborCellNrpci + - neighborCellNrcgi - flagNoHo - flagNoXn - flagNoRemove @@ -197,11 +198,11 @@ definitions : type : string description : Source / Serving Cell Identifier (NR CGI) example : E12345 - neighborCellIdentifierNrpci : + neighborCellNrpci : type : string description : Neighbor Cell Identifier (NR PCI) example : E12345 - neighborCellIdentifierNrcgi : + neighborCellNrcgi : type : string description : Neighbor Cell Identifier (NR CGI) example : E12345 @@ -236,11 +237,11 @@ definitions : - nrpciToNrcgiMapping - flagUpdates - nrcgiMappingAndFlagUpdates - neighborCellIdentifierNrpci : + neighborCellNrpci : type : string description : Neighbor Cell Identifier (NR PCI) example : E12345 - neighborCellIdentifierNrcgi : + neighborCellNrcgi : type : string description : Neighbor Cell Identifier (NR CGI) example : E12345 @@ -267,11 +268,11 @@ definitions : enum : - nrpci - nrcgi - neighborCellIdentifierNrpci : + neighborCellNrpci : type : string description : Neighbor Cell Identifier (NR PCI) example : E12345 - neighborCellIdentifierNrcgi : + neighborCellNrcgi : type : string description : Neighbor Cell Identifier (NR PCI) example : E12345 diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 19f3b57a..7f752076 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -20,6 +20,14 @@ RIC Dashboard Release Notes =========================== +Version 1.0.3, 15 May 2019 +-------------------------- +* Add AC xapp controller +* Add RAN type radio selector to connection setup +* Update ANR xApp client to spec version 0.0.4 +* Add get-version methods to all controllers +* Add simple page footer with copyright and version + Version 1.0.2, 13 May 2019 -------------------------- * Update A1 mediator client to version 0.4.0 diff --git a/e2-mgr-client/pom.xml b/e2-mgr-client/pom.xml index 46f86d99..48caf8e2 100644 --- a/e2-mgr-client/pom.xml +++ b/e2-mgr-client/pom.xml @@ -25,7 +25,7 @@ limitations under the License. org.o-ran-sc.portal.ric-dashboard ric-dash-parent - 1.0.2-SNAPSHOT + 1.0.3-SNAPSHOT org.o-ran-sc.ric.e2mgr.client @@ -35,6 +35,9 @@ limitations under the License. UTF-8 UTF-8 + + 0 + org.oransc.ric.e2mgr.client @@ -145,6 +148,23 @@ limitations under the License. + + + org.apache.maven.plugins + maven-jar-plugin + + + + + true + + + ${project.version}-b${build.number} + + + + org.apache.maven.plugins diff --git a/pom.xml b/pom.xml index c9b2878e..19468235 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ limitations under the License. ric-dash-parent RIC Dashboard project pom - 1.0.2-SNAPSHOT + 1.0.3-SNAPSHOT AT&T Intellectual Property and Nokia diff --git a/webapp-backend/pom.xml b/webapp-backend/pom.xml index 426e7ce4..f14db0cf 100644 --- a/webapp-backend/pom.xml +++ b/webapp-backend/pom.xml @@ -25,7 +25,7 @@ limitations under the License. org.o-ran-sc.portal.ric-dashboard ric-dash-parent - 1.0.2-SNAPSHOT + 1.0.3-SNAPSHOT ric-dash-be RIC Dashboard Webapp backend @@ -42,7 +42,7 @@ limitations under the License. org.o-ran-sc.ric.anrxapp.client anr-xapp-client - 0.0.3-SNAPSHOT + 0.0.4-SNAPSHOT org.o-ran-sc.ric.e2mgr.client diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardApplication.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardApplication.java index 8c86a609..c9a98e43 100644 --- a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardApplication.java +++ b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardApplication.java @@ -38,19 +38,21 @@ public class DashboardApplication { public static void main(String[] args) { SpringApplication.run(DashboardApplication.class, args); // Force this onto the console by using level WARN - logger.warn("main: version '{}' successful start", getVersion()); + logger.warn("main: version '{}' successful start", getImplementationVersion(MethodHandles.lookup().lookupClass())); } /** - * Gets version details. + * Gets version details for the specified class. + * + * @param clazz + * Class to get the version * * @return the value of the MANIFEST.MF property Implementation-Version as * written by maven when packaged in a jar; 'unknown' otherwise. */ - private static String getVersion() { - Class clazz = MethodHandles.lookup().lookupClass(); + public static String getImplementationVersion(Class clazz) { String classPath = clazz.getResource(clazz.getSimpleName() + ".class").toString(); - return classPath.startsWith("jar") ? clazz.getPackage().getImplementationVersion() : "unknown"; + return classPath.startsWith("jar") ? clazz.getPackage().getImplementationVersion() : "unknown-not-jar"; } } diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardConstants.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardConstants.java index e73f697d..c913efb1 100644 --- a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardConstants.java +++ b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardConstants.java @@ -26,4 +26,7 @@ public abstract class DashboardConstants { } public static final String ENDPOINT_PREFIX = "/api/"; + public static final String HEALTHCHECK_PATH = "health"; + public static final String VERSION_PATH = "version"; + } diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/AnrXappMockConfiguration.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/AnrXappMockConfiguration.java index 32b507fa..275f047c 100644 --- a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/AnrXappMockConfiguration.java +++ b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/AnrXappMockConfiguration.java @@ -80,28 +80,26 @@ public class AnrXappMockConfiguration { NcrtApi mockApi = mock(NcrtApi.class); when(mockApi.getApiClient()).thenReturn(apiClient); - NeighborCellRelation a = new NeighborCellRelation().cellIdentifierNrcgi("A12345") - .neighborCellIdentifierNrpci("A123456").neighborCellIdentifierNrcgi("A12347").flagNoHo(true) - .flagNoXn(true).flagNoRemove(true); - NeighborCellRelation e = new NeighborCellRelation().cellIdentifierNrcgi("E12345") - .neighborCellIdentifierNrpci("E123456").neighborCellIdentifierNrcgi("E12347").flagNoHo(true) - .flagNoXn(true).flagNoRemove(true); + NeighborCellRelation a = new NeighborCellRelation().cellIdentifierNrcgi("A12345").neighborCellNrpci("A123456") + .neighborCellNrcgi("A12347").flagNoHo(true).flagNoXn(true).flagNoRemove(true); + NeighborCellRelation e = new NeighborCellRelation().cellIdentifierNrcgi("E12345").neighborCellNrpci("E123456") + .neighborCellNrcgi("E12347").flagNoHo(true).flagNoXn(true).flagNoRemove(true); NeighborCellRelationTable ncrt = new NeighborCellRelationTable().addNcrtRelationsItem(a) .addNcrtRelationsItem(e); when(mockApi.getNcrtInfo(any(String.class), any(String.class), any(Integer.class))).thenReturn(ncrt); - when(mockApi.getCellNcrtInfo(any(String.class), any(String.class), any(Integer.class), any(String.class), - any(String.class))).thenReturn(ncrt); + when(mockApi.getCellNcrtInfo(any(String.class), any(String.class), any(String.class), any(String.class), + any(Integer.class))).thenReturn(ncrt); doAnswer(i -> { return null; }).when(mockApi).deleteNcrt(any(String.class), any(NeighborCellRelationDelTable.class), any(String.class), - any(Integer.class), any(String.class), any(String.class)); + any(String.class)); doAnswer(i -> { return null; - }).when(mockApi).modifyNCRT(any(String.class), any(NeighborCellRelationModTable.class), any(String.class), - any(Integer.class), any(String.class), any(String.class)); + }).when(mockApi).modifyNcrt(any(String.class), any(NeighborCellRelationModTable.class), any(String.class), + any(String.class)); return mockApi; } diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/A1MediationController.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/A1MediationController.java deleted file mode 100644 index 1cbda95e..00000000 --- a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/A1MediationController.java +++ /dev/null @@ -1,229 +0,0 @@ -/*- - * ========================LICENSE_START================================= - * O-RAN-SC - * %% - * Copyright (C) 2019 AT&T Intellectual Property and Nokia - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================LICENSE_END=================================== - */ -package org.oransc.ric.portal.dashboard.controller; - -import java.lang.invoke.MethodHandles; -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URL; - -import javax.servlet.http.HttpServletResponse; - -import org.oransc.ric.portal.dashboard.DashboardConstants; -import org.oransc.ric.portal.dashboard.model.DelayTransport; -import org.oransc.ric.portal.dashboard.model.ErrorTransport; -import org.oransc.ric.portal.dashboard.model.IDashboardResponse; -import org.oransc.ric.portal.dashboard.model.LoadTransport; -import org.oransc.ric.portal.dashboard.model.MetricsTransport; -import org.oransc.ric.portal.dashboard.model.PathTransport; -import org.oransc.ric.portal.dashboard.model.SuccessTransport; -import org.oransc.ric.portal.dashboard.model.UrlTransport; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.http.HttpMethod; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.client.RestTemplate; -import org.springframework.web.util.UriComponentsBuilder; - -import io.swagger.annotations.ApiOperation; - -/** - * Provides endpoints to get/set paths, AND to access the REST resources at - * those paths. This allows very late binding of deployment details. - */ -@Configuration -@RestController -@RequestMapping(value = DashboardConstants.ENDPOINT_PREFIX + "/a1med", produces = MediaType.APPLICATION_JSON_VALUE) -public class A1MediationController { - - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - private static final String A1_MEDIATION_URL = "url"; - private static final String A1_MEDIATION_DELAY = "delay"; - private static final String A1_MEDIATION_DELAY_PATH = A1_MEDIATION_DELAY + "path"; - private static final String A1_MEDIATION_LOAD = "load"; - private static final String A1_MEDIATION_LOAD_PATH = A1_MEDIATION_LOAD + "path"; - private static final String A1_MEDIATION_METRICS = "metrics"; - private static final String A1_MEDIATION_METRICS_PATH = A1_MEDIATION_METRICS + "path"; - - @Value("${a1med.basepath}") - private String a1MediationUrl; - @Value("${a1med.delaypath}") - private String a1MediationDelayPath; - @Value("${a1med.loadpath}") - private String a1MediationLoadPath; - @Value("${a1med.metricspath}") - private String a1MediationMetricsPath; - - // For demo purposes - private final boolean mockData = true; - private final DelayTransport mockDelay = new DelayTransport(10); - private final LoadTransport mockLoad = new LoadTransport(1); - private final MetricsTransport mockMetrics = new MetricsTransport(11, 100, 123); - - private final RestTemplate restTemplate = new RestTemplate(); - - private URI buildUri(final String baseUrl, final String[] paths) { - UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(baseUrl); - for (int p = 0; p < paths.length; ++p) { - if (paths[p] == null) - throw new IllegalArgumentException("Unexpected null at index " + Integer.toString(p)); - // this allows slashes - builder.path(paths[p]); - } - return builder.build().encode().toUri(); - } - - @ApiOperation(value = "Gets the A1 Mediation URL.", response = IDashboardResponse.class) - @RequestMapping(value = A1_MEDIATION_URL, method = RequestMethod.GET) - public IDashboardResponse getA1MediationUrl() { - return new UrlTransport(a1MediationUrl); - } - - @ApiOperation(value = "Sets the A1 Mediation URL.", response = IDashboardResponse.class) - @RequestMapping(value = A1_MEDIATION_URL, method = RequestMethod.PUT) - public IDashboardResponse setA1MediationUrl(@RequestBody UrlTransport st, HttpServletResponse response) { - try { - this.a1MediationUrl = new URL(st.getUrl()).toString(); - return new SuccessTransport(HttpServletResponse.SC_OK, null); - } catch (MalformedURLException ex) { - logger.error("Failed to parse url " + st.getUrl(), ex); - response.setStatus(HttpServletResponse.SC_BAD_REQUEST); - return new ErrorTransport(400, "Bad URL", ex); - } - } - - @ApiOperation(value = "Gets the A1 Mediation delay path.", response = IDashboardResponse.class) - @RequestMapping(value = A1_MEDIATION_DELAY_PATH, method = RequestMethod.GET) - public IDashboardResponse getA1MediationDelayPath() { - return new PathTransport(a1MediationDelayPath); - } - - @ApiOperation(value = "Sets the A1 Mediation delay path.", response = IDashboardResponse.class) - @RequestMapping(value = A1_MEDIATION_DELAY_PATH, method = RequestMethod.PUT) - public IDashboardResponse setA1MediationDelayPath(@RequestBody PathTransport st) { - this.a1MediationDelayPath = st.getPath(); - return new SuccessTransport(HttpServletResponse.SC_OK, null); - } - - @ApiOperation(value = "Gets the A1 Mediation load path.", response = IDashboardResponse.class) - @RequestMapping(value = A1_MEDIATION_LOAD_PATH, method = RequestMethod.GET) - public IDashboardResponse getA1MediationLoadPath() { - return new PathTransport(a1MediationLoadPath); - } - - @ApiOperation(value = "Sets the A1 Mediation load path.", response = IDashboardResponse.class) - @RequestMapping(value = A1_MEDIATION_LOAD_PATH, method = RequestMethod.PUT) - public IDashboardResponse setA1MediationLoadPath(@RequestBody PathTransport st) { - this.a1MediationLoadPath = st.getPath(); - return new SuccessTransport(HttpServletResponse.SC_OK, null); - } - - @ApiOperation(value = "Gets the A1 Mediation metrics path.", response = IDashboardResponse.class) - @RequestMapping(value = A1_MEDIATION_METRICS_PATH, method = RequestMethod.GET) - public IDashboardResponse getA1MediationMetricsPath() { - return new PathTransport(a1MediationMetricsPath); - } - - @ApiOperation(value = "Sets the A1 Mediation metrics path.", response = IDashboardResponse.class) - @RequestMapping(value = A1_MEDIATION_METRICS_PATH, method = RequestMethod.PUT) - public IDashboardResponse setA1MediationMetricsPath(@RequestBody PathTransport st) { - this.a1MediationMetricsPath = st.getPath(); - return new SuccessTransport(HttpServletResponse.SC_OK, null); - } - - @ApiOperation(value = "Gets the A1 Mediation delay value.", response = DelayTransport.class) - @RequestMapping(value = A1_MEDIATION_DELAY, method = RequestMethod.GET) - public DelayTransport getA1MediationDelay() { - if (mockData) { - return mockDelay; - } else { - URI uri = buildUri(a1MediationUrl, new String[] { a1MediationDelayPath }); - logger.debug("getA1MediationDelay: uri {}", uri); - ResponseEntity response = restTemplate.exchange(uri, HttpMethod.GET, null, - new ParameterizedTypeReference() { - }); - return response.getBody(); - } - } - - @ApiOperation(value = "Sets the A1 Mediation delay value.") - @RequestMapping(value = A1_MEDIATION_DELAY, method = RequestMethod.PUT) - public void putA1MediationDelay(DelayTransport value) { - if (mockData) { - mockDelay.setDelay(value.getDelay()); - } else { - URI uri = buildUri(a1MediationUrl, new String[] { a1MediationDelayPath }); - logger.debug("putA1MediationDelay: uri {}", uri); - restTemplate.put(uri, value); - } - } - - @ApiOperation(value = "Gets the A1 Mediation load value.", response = LoadTransport.class) - @RequestMapping(value = A1_MEDIATION_LOAD, method = RequestMethod.GET) - public LoadTransport getA1MediationLoad() { - if (mockData) { - return mockLoad; - } else { - URI uri = buildUri(a1MediationUrl, new String[] { a1MediationLoadPath }); - logger.debug("getA1MediationLoad: uri {}", uri); - ResponseEntity response = restTemplate.exchange(uri, HttpMethod.GET, null, - new ParameterizedTypeReference() { - }); - return response.getBody(); - } - } - - @ApiOperation(value = "Sets the A1 Mediation delay value.") - @RequestMapping(value = A1_MEDIATION_LOAD, method = RequestMethod.PUT) - public void putA1MediationLoad(LoadTransport value) { - if (mockData) { - mockLoad.setLoad(value.getLoad()); - } else { - URI uri = buildUri(a1MediationUrl, new String[] { a1MediationDelayPath }); - logger.debug("putA1MediationLoad: uri {}", uri); - restTemplate.put(uri, value); - } - } - - @ApiOperation(value = "Gets the A1 Mediation metrics object.", response = MetricsTransport.class) - @RequestMapping(value = A1_MEDIATION_METRICS, method = RequestMethod.GET) - public MetricsTransport getA1MediationMetrics() { - if (mockData) { - return mockMetrics; - } else { - URI uri = buildUri(a1MediationUrl, new String[] { a1MediationLoadPath }); - logger.debug("getA1MediationMetrics: uri {}", uri); - ResponseEntity response = restTemplate.exchange(uri, HttpMethod.GET, null, - new ParameterizedTypeReference() { - }); - return response.getBody(); - } - } - -} diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AcXappController.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AcXappController.java new file mode 100644 index 00000000..859efb8d --- /dev/null +++ b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AcXappController.java @@ -0,0 +1,92 @@ +/*- + * ========================LICENSE_START================================= + * O-RAN-SC + * %% + * Copyright (C) 2019 AT&T Intellectual Property and Nokia + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================LICENSE_END=================================== + */ +package org.oransc.ric.portal.dashboard.controller; + +import java.lang.invoke.MethodHandles; + +import javax.servlet.http.HttpServletResponse; + +import org.oransc.ric.a1med.client.api.A1MediatorApi; +import org.oransc.ric.portal.dashboard.DashboardApplication; +import org.oransc.ric.portal.dashboard.DashboardConstants; +import org.oransc.ric.portal.dashboard.model.SuccessTransport; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +import org.springframework.util.Assert; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import com.fasterxml.jackson.databind.JsonNode; + +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; + +/** + * Provides methods to manage policies of the Admission Control xApp. All + * messages go via the A1 Mediatior. + */ +@RestController +@RequestMapping(value = DashboardConstants.ENDPOINT_PREFIX + "/xapp/ac", produces = MediaType.APPLICATION_JSON_VALUE) +public class AcXappController { + + private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + + private static final String POLICY_NAME = "policyname"; + + // Populated by the autowired constructor + private final A1MediatorApi a1MediatorApi; + + @Autowired + public AcXappController(final A1MediatorApi a1MediatorApi) { + Assert.notNull(a1MediatorApi, "API must not be null"); + this.a1MediatorApi = a1MediatorApi; + } + + @ApiOperation(value = "Gets the A1 client library MANIFEST.MF property Implementation-Version.", response = SuccessTransport.class) + @RequestMapping(value = DashboardConstants.VERSION_PATH, method = RequestMethod.GET) + public SuccessTransport getVersion() { + logger.debug("getVersion enter"); + return new SuccessTransport(200, DashboardApplication.getImplementationVersion(A1MediatorApi.class)); + } + + @ApiOperation(value = "Gets the named policy for AC xApp via the A1 Mediator") + @RequestMapping(value = "policy/{" + POLICY_NAME + "}", method = RequestMethod.GET) + public Object getPolicy(@PathVariable(POLICY_NAME) String policyName) { + logger.debug("getPolicy: policy {}", policyName); + a1MediatorApi.a1ControllerGetHandler(policyName); + return null; + } + + @ApiOperation(value = "Sets the named policy for AC xApp via the A1 Mediator") + @RequestMapping(value = "policy/{" + POLICY_NAME + "}", method = RequestMethod.PUT) + public void putPolicy(@PathVariable(POLICY_NAME) String policyName, // + @ApiParam(value = "JSON formatted policy") @RequestBody JsonNode policy, // + HttpServletResponse response) { + logger.debug("putPolicy: policy {}", policyName); + a1MediatorApi.a1ControllerPutHandler(policyName, policy); + response.setStatus(a1MediatorApi.getApiClient().getStatusCode().value()); + } + +} diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AnrXappController.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AnrXappController.java index 36543568..5692c5e4 100644 --- a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AnrXappController.java +++ b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AnrXappController.java @@ -28,7 +28,9 @@ import org.oransc.ric.anrxapp.client.api.NcrtApi; import org.oransc.ric.anrxapp.client.model.NeighborCellRelationDelTable; import org.oransc.ric.anrxapp.client.model.NeighborCellRelationModTable; import org.oransc.ric.anrxapp.client.model.NeighborCellRelationTable; +import org.oransc.ric.portal.dashboard.DashboardApplication; import org.oransc.ric.portal.dashboard.DashboardConstants; +import org.oransc.ric.portal.dashboard.model.SuccessTransport; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -50,7 +52,7 @@ import io.swagger.annotations.ApiOperation; */ @Configuration @RestController -@RequestMapping(value = DashboardConstants.ENDPOINT_PREFIX + "/ncrt", produces = MediaType.APPLICATION_JSON_VALUE) +@RequestMapping(value = DashboardConstants.ENDPOINT_PREFIX + "/xapp/anr", produces = MediaType.APPLICATION_JSON_VALUE) public class AnrXappController { private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); @@ -74,6 +76,13 @@ public class AnrXappController { this.ncrtApi = ncrtApi; } + @ApiOperation(value = "Gets the ANR client library MANIFEST.MF property Implementation-Version.", response = SuccessTransport.class) + @RequestMapping(value = DashboardConstants.VERSION_PATH, method = RequestMethod.GET) + public SuccessTransport getVersion() { + logger.debug("getVersion enter"); + return new SuccessTransport(200, DashboardApplication.getImplementationVersion(HealthApi.class)); + } + @ApiOperation(value = "Performs a liveness probe on the ANR xApp, result expressed as the response code.") @RequestMapping(value = "/health/alive", method = RequestMethod.GET) public void getHealthAlive(HttpServletResponse response) { @@ -109,7 +118,7 @@ public class AnrXappController { @RequestParam(name = NRCGI, required = false) String nrcgi) { logger.debug("queryNcrtAllCells: cellIdentifier {}, startIndex {} limit {} nrpci {} nrcgi {}", cellIdentifier, startIndex, limit, nrpci, nrcgi); - return ncrtApi.getCellNcrtInfo(cellIdentifier, startIndex, limit, nrpci, nrcgi); + return ncrtApi.getCellNcrtInfo(cellIdentifier, nrpci, nrcgi, startIndex, limit); } @ApiOperation(value = "Modify neighbor cell relation based on Source Cell NR CGI and Target Cell NR PCI / NR CGI") @@ -118,7 +127,7 @@ public class AnrXappController { @RequestBody NeighborCellRelationModTable ncrtModTable, // HttpServletResponse response) { logger.debug("modifyNcrt: cellIdentifier {} modTable {}", cellIdentifier, ncrtModTable); - ncrtApi.modifyNCRT(cellIdentifier, ncrtModTable, null, null, null, null); + ncrtApi.modifyNcrt(cellIdentifier, ncrtModTable, null, null); response.setStatus(healthApi.getApiClient().getStatusCode().value()); } @@ -128,7 +137,7 @@ public class AnrXappController { @RequestBody NeighborCellRelationDelTable ncrtDelTable, // HttpServletResponse response) { logger.debug("modifyNcrt: cellIdentifier {} delTable {}", cellIdentifier, ncrtDelTable); - ncrtApi.deleteNcrt(cellIdentifier, ncrtDelTable, null, null, null, null); + ncrtApi.deleteNcrt(cellIdentifier, ncrtDelTable, null, null); response.setStatus(healthApi.getApiClient().getStatusCode().value()); } } diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java index 26b404a5..8b1fe724 100644 --- a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java +++ b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java @@ -27,10 +27,12 @@ import javax.servlet.http.HttpServletResponse; import org.oransc.ric.e2mgr.client.api.E2ManagerApi; import org.oransc.ric.e2mgr.client.model.SetupRequest; +import org.oransc.ric.portal.dashboard.DashboardApplication; import org.oransc.ric.portal.dashboard.DashboardConstants; import org.oransc.ric.portal.dashboard.model.E2SetupRequestType; import org.oransc.ric.portal.dashboard.model.E2SetupResponse; import org.oransc.ric.portal.dashboard.model.IDashboardResponse; +import org.oransc.ric.portal.dashboard.model.SuccessTransport; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -82,6 +84,13 @@ public class E2ManagerController { throw new IllegalArgumentException("Empty not permitted"); } + @ApiOperation(value = "Gets the E2 manager client library MANIFEST.MF property Implementation-Version.", response = SuccessTransport.class) + @RequestMapping(value = DashboardConstants.VERSION_PATH, method = RequestMethod.GET) + public SuccessTransport getVersion() { + logger.debug("getVersion enter"); + return new SuccessTransport(200, DashboardApplication.getImplementationVersion(E2ManagerApi.class)); + } + @ApiOperation(value = "Gets the health from the E2 manager, expressed as the response code.") @RequestMapping(value = "/health", method = RequestMethod.GET) public void getHealth(HttpServletResponse response) { diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/HealthcheckController.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/HealthcheckController.java new file mode 100644 index 00000000..9509c71e --- /dev/null +++ b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/HealthcheckController.java @@ -0,0 +1,60 @@ +/*- + * ========================LICENSE_START================================= + * O-RAN-SC + * %% + * Copyright (C) 2019 AT&T Intellectual Property and Nokia + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================LICENSE_END=================================== + */ +package org.oransc.ric.portal.dashboard.controller; + +import java.lang.invoke.MethodHandles; + +import org.oransc.ric.portal.dashboard.DashboardApplication; +import org.oransc.ric.portal.dashboard.DashboardConstants; +import org.oransc.ric.portal.dashboard.model.SuccessTransport; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import io.swagger.annotations.ApiOperation; + +/** + * Answers REST requests for the API service health etc. + */ +@RestController +@RequestMapping(value = DashboardConstants.ENDPOINT_PREFIX + "/dashboard", produces = MediaType.APPLICATION_JSON_VALUE) +public class HealthcheckController { + + private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + + @ApiOperation(value = "Checks the health of the application by (TBD).", response = SuccessTransport.class) + @RequestMapping(value = DashboardConstants.HEALTHCHECK_PATH, method = RequestMethod.GET) + public SuccessTransport getHealth() { + logger.debug("getHealth enter"); + long count = 0; + return new SuccessTransport(200, "(TBD) reports count is " + count); + } + + @ApiOperation(value = "Gets the Dashboard MANIFEST.MF property Implementation-Version.", response = SuccessTransport.class) + @RequestMapping(value = DashboardConstants.VERSION_PATH, method = RequestMethod.GET) + public SuccessTransport getVersion() { + logger.debug("getVersion enter"); + return new SuccessTransport(200, DashboardApplication.getImplementationVersion(MethodHandles.lookup().lookupClass())); + } + +} diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/XappManagerController.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/XappManagerController.java index ef1a9186..002bf0e7 100644 --- a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/XappManagerController.java +++ b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/XappManagerController.java @@ -23,8 +23,10 @@ import java.lang.invoke.MethodHandles; import javax.servlet.http.HttpServletResponse; +import org.oransc.ric.portal.dashboard.DashboardApplication; import org.oransc.ric.portal.dashboard.DashboardConstants; import org.oransc.ric.portal.dashboard.model.ErrorTransport; +import org.oransc.ric.portal.dashboard.model.SuccessTransport; import org.oransc.ric.xappmgr.client.api.HealthApi; import org.oransc.ric.xappmgr.client.api.XappApi; import org.oransc.ric.xappmgr.client.model.AllXapps; @@ -71,6 +73,13 @@ public class XappManagerController { this.xappApi = xappApi; } + @ApiOperation(value = "Gets the XApp manager client library MANIFEST.MF property Implementation-Version.", response = SuccessTransport.class) + @RequestMapping(value = DashboardConstants.VERSION_PATH, method = RequestMethod.GET) + public SuccessTransport getVersion() { + logger.debug("getVersion enter"); + return new SuccessTransport(200, DashboardApplication.getImplementationVersion(HealthApi.class)); + } + @ApiOperation(value = "Calls the xApp Manager health check.") @RequestMapping(value = "/health", method = RequestMethod.GET) public void getHealth(HttpServletResponse response) { diff --git a/webapp-frontend/package-lock.json b/webapp-frontend/package-lock.json index add9d36a..e7ccfa19 100644 --- a/webapp-frontend/package-lock.json +++ b/webapp-frontend/package-lock.json @@ -667,6 +667,69 @@ "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.7.2.tgz", "integrity": "sha512-Ha4HshKdCVKgu4TVCtG8XyPPYdzTzNW4/fvPnn+LT7AosRABryhlRv4cc4+o84dgpvVJN9reN7jo/c+nYujFug==" }, + "@material/animation": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@material/animation/-/animation-1.0.0.tgz", + "integrity": "sha512-Ed5/vggn6ZhSJ87yn3ZS1d826VJNFz73jHF2bSsgRtHDoB8KCuOwQMfdgAgDa4lKDF6CDIPCKBZPKrs2ubehdw==", + "requires": { + "tslib": "^1.9.3" + } + }, + "@material/base": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@material/base/-/base-1.0.0.tgz", + "integrity": "sha512-5dxFp46x5FA+Epg6YHLzN+5zRt9S2wR84UdvVAEJ1egea94m9UHUg7y9tAnNSN16aexRSywmzyLwPr+i8PGEYA==", + "requires": { + "tslib": "^1.9.3" + } + }, + "@material/dom": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@material/dom/-/dom-1.1.0.tgz", + "integrity": "sha512-+HWW38ZaM2UBPu4+7QCusLDSf4tFT31rsEXHkTkxYSg/QpDivfPx6YDz4OmYtafmhPR1d1YjqB3MYysUHdodyw==", + "requires": { + "tslib": "^1.9.3" + } + }, + "@material/feature-targeting": { + "version": "0.44.1", + "resolved": "https://registry.npmjs.org/@material/feature-targeting/-/feature-targeting-0.44.1.tgz", + "integrity": "sha512-90cc7njn4aHbH9UxY8qgZth1W5JgOgcEdWdubH1t7sFkwqFxS5g3zgxSBt46TygFBVIXNZNq35Xmg80wgqO7Pg==" + }, + "@material/radio": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@material/radio/-/radio-2.1.1.tgz", + "integrity": "sha512-srbafm+JP4HhfvqLKOsLaIH1L67Y2EDfmeHbkI5Ag2zLsLLqGT8BI3AtytrOeg9xSvChqex/Bg8So8+i9FcalA==", + "requires": { + "@material/animation": "^1.0.0", + "@material/base": "^1.0.0", + "@material/feature-targeting": "^0.44.1", + "@material/ripple": "^2.1.1", + "@material/theme": "^1.1.0", + "tslib": "^1.9.3" + } + }, + "@material/ripple": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@material/ripple/-/ripple-2.1.1.tgz", + "integrity": "sha512-/WIOBen3OLasJrr2ZXo9wpVJo6Z+1qFxnOvC61iXWqnDctq1fgTAQQbiMaRtsbfU68jDfhgLFJlwjgzvqAvFWQ==", + "requires": { + "@material/animation": "^1.0.0", + "@material/base": "^1.0.0", + "@material/dom": "^1.1.0", + "@material/feature-targeting": "^0.44.1", + "@material/theme": "^1.1.0", + "tslib": "^1.9.3" + } + }, + "@material/theme": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@material/theme/-/theme-1.1.0.tgz", + "integrity": "sha512-YYUV9Rhbx4r/EMb/zoOYJUWjhXChNaLlH1rqt3vpNVyxRcxGqoVMGp5u1XALBCFiD9dACPKLIkKyRYa928nmPQ==", + "requires": { + "@material/feature-targeting": "^0.44.1" + } + }, "@ngtools/webpack": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-7.2.3.tgz", diff --git a/webapp-frontend/package.json b/webapp-frontend/package.json index 9b4810e6..58773278 100644 --- a/webapp-frontend/package.json +++ b/webapp-frontend/package.json @@ -22,6 +22,7 @@ "@angular/platform-browser-dynamic": "~7.2.0", "@angular/router": "~7.2.0", "@fortawesome/fontawesome-free": "^5.7.2", + "@material/radio": "^2.1.1", "@types/chart.js": "^2.7.46", "angular-bootstrap-md": "^7.4.2", "bootstrap": "^4.3.1", diff --git a/webapp-frontend/pom.xml b/webapp-frontend/pom.xml index 2ac083ed..9a8e84e7 100644 --- a/webapp-frontend/pom.xml +++ b/webapp-frontend/pom.xml @@ -25,7 +25,7 @@ limitations under the License. org.o-ran-sc.portal.ric-dashboard ric-dash-parent - 1.0.2-SNAPSHOT + 1.0.3-SNAPSHOT ric-dash-fe RIC Dashboard Webapp frontend diff --git a/webapp-frontend/src/app/app.component.css b/webapp-frontend/src/app/app.component.css index 19ac23e1..43e88c17 100644 --- a/webapp-frontend/src/app/app.component.css +++ b/webapp-frontend/src/app/app.component.css @@ -329,15 +329,22 @@ main { */ .main__footer { background: transparent; - position: absolute; + /* position: absolute; bottom: 1rem; - left: 1.5rem; + left: 1.5rem; */ + margin: 10px; z-index: 100; } -.copyright__text { - letter-spacing: 0.1rem; - color: gray; +.main__footer-dark { + background-color: #2B244D; + color: white; +} + +.main-footer__bg-dark { + opacity: 1; + background: linear-gradient(to bottom, #B290FF, #2E1D65); + transition: opacity 300ms linear; } @media only screen and (max-width: 300px) { diff --git a/webapp-frontend/src/app/app.component.html b/webapp-frontend/src/app/app.component.html index ef2405a9..2d4834f1 100644 --- a/webapp-frontend/src/app/app.component.html +++ b/webapp-frontend/src/app/app.component.html @@ -29,7 +29,7 @@