summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Lott (cl778h) <clott@research.att.com>2017-07-26 11:49:07 -0400
committerChristopher Lott (cl778h) <clott@research.att.com>2017-07-26 13:47:31 -0400
commita9627f8c54b7e9d5712320621e8a0b748ad9baf4 (patch)
tree5d43d73ff9b0e47f74aed77be03bbf761e3b621b
parent134cb7f97684487cf8a0245617c339a3fe2d54b0 (diff)
Repair Portal defects; upgrade Docker build.
PORTAL-39 Remove MojoHaus Maven plug-in from pom file PORTAL-38 VID tab is not showing portal for VID PORTAL-37 Portal cannot resolve UEB host vm1-message-router; use ueb.api.simpledemo.openecomp.org instead PORTAL-36 Show Portal app version number in footer; unpack war file instead of copying directory PORTAL-35 update ECOMP Portal to ONAP logo on login page PORTAL-34 Portal partners (Policy, VID) got 404 on landing page; recognize process_csp as valid endpoint in Portal PORTAL-30 Failed to communicate with the widget microservice; add configuration properties with widget-ms host name and protocol. Issue: PORTAL-30, PORTAL-34, PORTAL-35, PORTAL-36, PORTAL-37, PORTAL-38, PORTAL-39 Change-Id: I1e53e4985266f736ddad4ed49b287a23178ea3c3 Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
-rw-r--r--deliveries/Dockerfile.mariadb28
-rw-r--r--deliveries/Dockerfile.portalapps54
-rwxr-xr-xdeliveries/build_portalapps_dockers.sh116
-rwxr-xr-x[-rw-r--r--]deliveries/dbstop.sh0
-rw-r--r--deliveries/etc.zipbin9872 -> 11434 bytes
-rwxr-xr-xdeliveries/new_start.sh13
-rwxr-xr-xdeliveries/new_stop.sh11
-rwxr-xr-xdeliveries/os_settings.sh6
-rwxr-xr-xdeliveries/run.sh6
-rw-r--r--ecomp-portal-BE-common-test/pom.xml42
-rw-r--r--ecomp-portal-BE-common/pom.xml43
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ConsulHealthServiceImpl.java5
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EPCommonSystemProperties.java1
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EcompPortalUtils.java15
-rw-r--r--ecomp-portal-BE-common/src/main/webapp/static/fusion/images/onap-portal-logo.pngbin0 -> 71199 bytes
-rw-r--r--ecomp-portal-BE-os/README.md1
-rw-r--r--ecomp-portal-BE-os/pom.xml14
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginController.java9
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginService.java2
-rw-r--r--ecomp-portal-BE-os/src/main/resources/cache.ccf2
-rw-r--r--ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/login.jsp34
-rw-r--r--ecomp-portal-FE-common/pom.xml48
-rw-r--r--ecomp-portal-FE-os/pom.xml41
-rw-r--r--ecomp-portal-widget-ms/pom.xml4
24 files changed, 263 insertions, 232 deletions
diff --git a/deliveries/Dockerfile.mariadb b/deliveries/Dockerfile.mariadb
index 871637f5..004e7af8 100644
--- a/deliveries/Dockerfile.mariadb
+++ b/deliveries/Dockerfile.mariadb
@@ -9,20 +9,26 @@ ARG SDK_SCRIPT_DIR=${SDK_SCRIPT_DIR}
ARG SDK_COMMON_SCRIPT_DIR=${SDK_COMMON_SCRIPT_DIR}
ARG DBC_COMMON_SCRIPT_DIR=${DBC_COMMON_SCRIPT_DIR}
ARG DBC_SCRIPT_DIR=${DBC_SCRIPT_DIR}
+
+# constant
#Add config file
ADD my.cnf /etc/mysql/my.cnf
#ADD cluster.cnf /etc/mysql/conf.d
-#Add DDL and DML SQL files
-ADD ${SCRIPT_COMMON_DIR}/EcompPortalDDLMySql_1707_Common.sql docker-entrypoint-initdb.d/EcompPortalDDLMySql_1707_Common.sql
-ADD ${SCRIPT_DIR}/EcompPortalDDLMySql_1707_OS.sql docker-entrypoint-initdb.d/EcompPortalDDLMySql_1707_OS.sql
-ADD ${SCRIPT_COMMON_DIR}/EcompPortalDMLMySql_1707_Common.sql docker-entrypoint-initdb.d/EcompPortalDMLMySql_1707_Common.sql
-ADD ${SCRIPT_DIR}/EcompPortalDMLMySql_1707_OS.sql docker-entrypoint-initdb.d/EcompPortalDMLMySql_1707_OS.sql
+# Scripts are executed in alphabetical order
+
+# Portal DDL and DML
+ADD ${SCRIPT_COMMON_DIR}/EcompPortalDDLMySql_1707_Common.sql docker-entrypoint-initdb.d
+ADD ${SCRIPT_DIR}/EcompPortalDDLMySql_1707_OS.sql docker-entrypoint-initdb.d
+ADD ${SCRIPT_COMMON_DIR}/EcompPortalDMLMySql_1707_Common.sql docker-entrypoint-initdb.d
+ADD ${SCRIPT_DIR}/EcompPortalDMLMySql_1707_OS.sql docker-entrypoint-initdb.d
+ADD Apps_Users_OnBoarding_Script.sql docker-entrypoint-initdb.d/EcompPortalDMLMySql_1707_z_apps_users.sql
-ADD ${SDK_COMMON_SCRIPT_DIR}/EcompSdkDDLMySql_1707_Common.sql docker-entrypoint-initdb.d/EcompSdkDDLMySql_1707_Common.sql
-ADD ${SDK_SCRIPT_DIR}/EcompSdkDDLMySql_1707_OS.sql docker-entrypoint-initdb.d/EcompSdkDDLMySql_1707_OS.sql
-ADD ${SDK_COMMON_SCRIPT_DIR}/EcompSdkDMLMySql_1707_Common.sql docker-entrypoint-initdb.d/EcompSdkDMLMySql_1707_Common.sql
-ADD ${SDK_SCRIPT_DIR}/EcompSdkDMLMySql_1707_OS.sql docker-entrypoint-initdb.d/EcompSdkDMLMySql_1707_OS.sql
+# SDK App DDL and DML
+ADD ${SDK_COMMON_SCRIPT_DIR}/EcompSdkDDLMySql_1707_Common.sql docker-entrypoint-initdb.d
+ADD ${SDK_SCRIPT_DIR}/EcompSdkDDLMySql_1707_OS.sql docker-entrypoint-initdb.d
+ADD ${SDK_COMMON_SCRIPT_DIR}/EcompSdkDMLMySql_1707_Common.sql docker-entrypoint-initdb.d
+ADD ${SDK_SCRIPT_DIR}/EcompSdkDMLMySql_1707_OS.sql docker-entrypoint-initdb.d
-# This file was built by os_build_febe.sh
-ADD ${DBC_SCRIPT_DIR}/dbca-complete-mysql-1707-os.sql docker-entrypoint-initdb.d/dbca-complete-mysql-1707-os.sql
+# DBC App combined DDL/DML, built by os_build_febe.sh
+ADD ${DBC_SCRIPT_DIR}/dbca-complete-mysql-1707-os.sql docker-entrypoint-initdb.d
diff --git a/deliveries/Dockerfile.portalapps b/deliveries/Dockerfile.portalapps
new file mode 100644
index 00000000..3e295e8f
--- /dev/null
+++ b/deliveries/Dockerfile.portalapps
@@ -0,0 +1,54 @@
+# Dockerfile for image with ONAP applications:
+# Portal app, Portal-SDK app, Portal-DBC app.
+
+FROM openjdk:8-jdk
+
+# Arguments are supplied by build.sh script
+# the defaults below only support testing
+ARG PORTAL_WAR=build/ecompportal-be-os.war
+ARG FE_DIR=build/public
+ARG SDK_WAR=build/epsdk-app-os.war
+ARG DBC_WAR=build/dmaap-bc-app-os.war
+ARG HTTP_PROXY
+ARG HTTPS_PROXY
+
+# This is just a variable, never passed in
+ARG TOMCATHOME=/opt/apache-tomcat-8.0.37
+
+ENV http_proxy $HTTP_PROXY
+ENV https_proxy $HTTPS_PROXY
+RUN if [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \
+ if [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf; fi
+
+# Install Tomcat; curl is already part of this image
+WORKDIR /tmp
+RUN curl -s -O https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.37/bin/apache-tomcat-8.0.37.tar.gz
+RUN tar -xzf apache-tomcat-8.0.37.tar.gz
+# Remove manager and sample apps
+RUN rm -fr apache-tomcat-8.0.37/webapps/[a-z]*
+RUN mv apache-tomcat-8.0.37 /opt
+
+WORKDIR ${TOMCATHOME}/webapps
+RUN mkdir ECOMPPORTAL && mkdir ECOMPSDKAPP && mkdir ECOMPDBCAPP
+
+# Portal has many parts
+COPY $PORTAL_WAR ECOMPPORTAL
+RUN cd ECOMPPORTAL && unzip -q *.war && rm *.war
+COPY ${FE_DIR} ECOMPPORTAL/public
+
+# SDK app has only a war
+COPY $SDK_WAR ECOMPSDKAPP
+RUN cd ECOMPSDKAPP && unzip -q *.war && rm *.war
+
+# DBC app has only a war
+COPY $DBC_WAR ECOMPDBCAPP
+RUN cd ECOMPDBCAPP && unzip -q *.war && rm *.war
+
+VOLUME ${TOMCATHOME}/logs
+
+# Define commonly used ENV variables
+ENV PATH $PATH:$JAVA_HOME/bin:${TOMCATHOME}/bin
+COPY configure-and-run.sh /
+
+# Define default command.
+CMD ["/configure-and-run.sh"]
diff --git a/deliveries/build_portalapps_dockers.sh b/deliveries/build_portalapps_dockers.sh
new file mode 100755
index 00000000..eba1cb6d
--- /dev/null
+++ b/deliveries/build_portalapps_dockers.sh
@@ -0,0 +1,116 @@
+#!/bin/bash
+# Builds Portal, Portal-SDK and DMaaP-BC webapps;
+# then packages all into a docker.
+# Prereq: all three projects have been cloned from git.
+# Expects to be invoked with CWD=portal/deliveries
+# Caches files in local directory for docker build.
+
+# Stop on error; show output
+set -e -x
+
+# For debugging only bcox the FE build takes a long time
+SKIPFE=N
+if [ $# -gt 0 -a "$1" == "skipfe" ] ; then
+ echo "Skipping Portal-FE build step"
+ SKIPFE=Y
+fi
+
+# Establish environment variables
+echo "Set variables"
+source $(dirname $0)/os_settings.sh
+
+# Work standalone AND in the ONAP Jenkins.
+# Pick up Jenkins settings for this script.
+# Use -B for batch operation to skip download progress output
+if [ -n "$MVN" ]; then
+ export MVN="${MVN} -B -gs ${GLOBAL_SETTINGS_FILE} -s ${SETTINGS_FILE}"
+else
+ MVN=mvn
+fi
+
+# This expects to start in the deliveries folder; make sure
+DOCKERFILE=Dockerfile.portalapps
+if [ ! -f $DOCKERFILE ] ; then
+ echo "Failed to find expected file; must start in deliveries folder"
+ exit 1
+fi
+
+# Establish directories and variables
+DELIV="$(pwd)"
+# Relative path of temp directory
+BUILD="build"
+# Absolute path of temp directory
+OUT=$DELIV/$BUILD
+if [ $SKIPFE == "Y" ]; then
+ echo "Skipping clean/recreate of $OUT"
+else
+ rm -fr $OUT
+ mkdir $OUT
+fi
+# parent directory
+cd ..
+BASE="$(pwd)"
+
+# Copy DDL/DML to required directories (old scripts use long path /PROJECT/...)
+cd $DELIV
+rm -fr PROJECT
+# copy over DB scripts for the dockerfiles
+# forgive the ugly trick with the .. at end.
+mkdir -p ${SCRIPT_COMMON_DIR} && cp -r $BASE/ecomp-portal-DB-common ${SCRIPT_COMMON_DIR}/..
+mkdir -p ${SCRIPT_DIR} && cp -r $BASE/ecomp-portal-DB-os ${SCRIPT_DIR}/..
+mkdir -p ${SDK_COMMON_SCRIPT_DIR} && cp -r $BASE/sdk/ecomp-sdk/epsdk-app-common/db-scripts ${SDK_COMMON_SCRIPT_DIR}/..
+mkdir -p ${SDK_SCRIPT_DIR} && cp -r $BASE/sdk/ecomp-sdk/epsdk-app-os/db-scripts ${SDK_SCRIPT_DIR}/..
+# Build complete database script for DBC
+DBCA_OPEN_SD=$BASE/dmaapbc/dcae_dmaapbc_webapp/dbca-os/db-scripts
+DBCA_COMM_SD=$BASE/dmaapbc/dcae_dmaapbc_webapp/dbca-common/db-scripts
+# Old scripts expect this path
+mkdir -p $DBC_SCRIPT_DIR
+cat $DBCA_OPEN_SD/dbca-create-mysql-1707-os.sql $DBCA_COMM_SD/dbca-ddl-mysql-1707-common.sql $DBCA_OPEN_SD/dbca-dml-mysql-1707-os.sql > $DBC_SCRIPT_DIR/dbca-complete-mysql-1707-os.sql
+
+cd $BASE/ecomp-portal-BE-common
+${MVN} clean install
+
+cd $BASE/ecomp-portal-BE-os
+${MVN} clean package
+cp target/ecompportal-be-os.war $OUT
+
+cd $BASE/ecomp-portal-FE-os/
+if [ $SKIPFE == "Y" ]; then
+ echo "Skipping MVN in $(pwd)"
+else
+ ${MVN} clean package
+ cp -r dist/public $OUT
+fi
+
+cd $BASE/sdk/ecomp-sdk/epsdk-app-os
+${MVN} clean package
+cp target/epsdk-app-os.war $OUT
+
+cd $BASE/dmaapbc/dcae_dmaapbc_webapp
+${MVN} clean package
+cp dbca-os/target/dmaap-bc-app-os.war $OUT
+
+PROXY_ARGS=""
+if [ $HTTP_PROXY ]; then
+ PROXY_ARGS+="--build-arg HTTP_PROXY=${HTTP_PROXY}"
+fi
+if [ $HTTPS_PROXY ]; then
+ PROXY_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}"
+fi
+
+# build portal docker
+cd $DELIV
+PORTAL_DOCKER_CMD="
+ docker build -t ${IMGNAME} ${PROXY_ARGS}
+ --build-arg FE_DIR=$BUILD/public
+ --build-arg PORTAL_WAR=$BUILD/ecompportal-be-os.war
+ --build-arg SDK_WAR=$BUILD/epsdk-app-os.war
+ --build-arg DBC_WAR=$BUILD/dmaap-bc-app-os.war
+ -f $DOCKERFILE .
+"
+echo "Invoking portal docker build"
+$PORTAL_DOCKER_CMD
+
+# Build widget-ms docker
+cd $BASE/ecomp-portal-widget-ms
+${MVN} package docker:build
diff --git a/deliveries/dbstop.sh b/deliveries/dbstop.sh
index 319b28ba..319b28ba 100644..100755
--- a/deliveries/dbstop.sh
+++ b/deliveries/dbstop.sh
diff --git a/deliveries/etc.zip b/deliveries/etc.zip
index a5577c1d..30e6898f 100644
--- a/deliveries/etc.zip
+++ b/deliveries/etc.zip
Binary files differ
diff --git a/deliveries/new_start.sh b/deliveries/new_start.sh
index 80847a85..0710c83d 100755
--- a/deliveries/new_start.sh
+++ b/deliveries/new_start.sh
@@ -1,3 +1,8 @@
+#!/bin/bash
+
+# Establish environment variables
+source $(dirname $0)/os_settings.sh
+
BASEDIR=/PROJECT/OpenSource/UbuntuEP
PORTALDIR=/opt/apache-tomcat-8.0.37/webapps/ECOMPPORTAL
SDKAPPDIR=/opt/apache-tomcat-8.0.37/webapps/ECOMPSDKAPP
@@ -6,17 +11,19 @@ PORTALPROPDIR=ECOMPPORTALAPP
SDKAPPPROPDIR=ECOMPSDKAPP
DBCAPPPROPDIR=ECOMPDBCAPP
#docker rm ep_1610
-docker run -d --name "1610-1" \
+echo "Running docker image ${IMGNAME} as name ${CONTNAME}"
+docker run -d --name ${CONTNAME} \
-p 8989:8080 -p 8010:8009 -p 8006:8005 \
-v ${BASEDIR}/etc/${PORTALPROPDIR}/system.properties:${PORTALDIR}/WEB-INF/conf/system.properties \
-v ${BASEDIR}/etc/${PORTALPROPDIR}/fusion.properties:${PORTALDIR}/WEB-INF/fusion/conf/fusion.properties \
-v ${BASEDIR}/etc/${PORTALPROPDIR}/portal.properties:${PORTALDIR}/WEB-INF/classes/portal.properties \
-v ${BASEDIR}/etc/${PORTALPROPDIR}/openid-connect.properties:${PORTALDIR}/WEB-INF/classes/openid-connect.properties \
+-v ${BASEDIR}/etc/${SDKAPPPROPDIR}/fusion.properties:${SDKAPPDIR}/WEB-INF/fusion/conf/fusion.properties \
-v ${BASEDIR}/etc/${SDKAPPPROPDIR}/system.properties:${SDKAPPDIR}/WEB-INF/conf/system.properties \
-v ${BASEDIR}/etc/${SDKAPPPROPDIR}/portal.properties:${SDKAPPDIR}/WEB-INF/classes/portal.properties \
-v ${BASEDIR}/etc/${DBCAPPPROPDIR}/system.properties:${DBCAPPDIR}/WEB-INF/conf/system.properties \
-v ${BASEDIR}/etc/${DBCAPPPROPDIR}/portal.properties:${DBCAPPDIR}/WEB-INF/classes/portal.properties \
-v ${BASEDIR}/etc/${DBCAPPPROPDIR}/dbcapp.properties:${DBCAPPDIR}/WEB-INF/dbcapp/dbcapp.properties \
--v ${BASEDIR}/etc/${DBCAPPPROPDIR}/fusion.properties:${DBCAPPDIR}/WEB-INF/fusion/fusion.properties \
+-v ${BASEDIR}/etc/${DBCAPPPROPDIR}/fusion.properties:${DBCAPPDIR}/WEB-INF/fusion/conf/fusion.properties \
-v ${BASEDIR}/log:/opt/apache-tomcat-8.0.37/logs \
-ep:1610-1
+${IMGNAME}
diff --git a/deliveries/new_stop.sh b/deliveries/new_stop.sh
index 6a1de1ad..6c4bf7a2 100755
--- a/deliveries/new_stop.sh
+++ b/deliveries/new_stop.sh
@@ -1,2 +1,9 @@
-docker stop 1610-1
-docker rm 1610-1
+#!/bin/sh
+
+# Establish environment variables
+source $(dirname $0)/os_settings.sh
+
+echo "Stopping docker container named ${CONTNAME}"
+docker stop ${CONTNAME}
+echo "Removing docker container named ${CONTNAME}"
+docker rm ${CONTNAME}
diff --git a/deliveries/os_settings.sh b/deliveries/os_settings.sh
index 68d3db80..f8b4f560 100755
--- a/deliveries/os_settings.sh
+++ b/deliveries/os_settings.sh
@@ -1,7 +1,9 @@
#!/bin/bash
-IMGNAME=ep:1610-1
-VERSION=1.1.0-SNAPSHOT
+#IMGNAME=ep:1610-1
+IMGNAME=onap-portal:1.1.0
+CONTNAME=ep-1.1.0
+VERSION=1.1.0
ETCDIR=etc
WORKINGDIR=PROJECT
SDK_DIR=PROJECT/Source/ecomp-portal-core/ecomp-portal-BE-os/target/ecompportal-be-os
diff --git a/deliveries/run.sh b/deliveries/run.sh
index ff214161..bd2a5dd1 100755
--- a/deliveries/run.sh
+++ b/deliveries/run.sh
@@ -1,6 +1,10 @@
#!/bin/bash
+
# Stop on errors; show output
set -e -x
-./os_build_febe.sh
+# 1610 builder
+# ./os_build_febe.sh
+# 1707 builder
+./build_portalapps_dockers.sh
./createMaria.sh
docker images
diff --git a/ecomp-portal-BE-common-test/pom.xml b/ecomp-portal-BE-common-test/pom.xml
index 8ef820c5..2e47388b 100644
--- a/ecomp-portal-BE-common-test/pom.xml
+++ b/ecomp-portal-BE-common-test/pom.xml
@@ -60,48 +60,6 @@
<skip>true</skip>
</configuration>
</plugin>
- <!--
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>license-maven-plugin</artifactId>
- <version>1.10</version>
- <configuration>
- <encoding>UTF-8</encoding>
- <licenseName>my_license</licenseName>
- <licenseResolver>${project.baseUri}/license</licenseResolver>
- <inceptionYear>2017</inceptionYear>
- <organizationName>AT&amp;T Intellectual Property</organizationName>
- <projectName>ECOMP Portal</projectName>
- <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
- <processStartTag>================================================================================</processStartTag>
- <sectionDelimiter>================================================================================</sectionDelimiter>
- <processEndTag>================================================================================</processEndTag>
- <roots>
- <root>src/main</root>
- <root>src/test</root>
- </roots>
- <excludes>
- <exclude>*.png</exclude>
- <exclude>*.drl</exclude>
- <exclude>*.gif</exclude>
- <exclude>*.jpeg</exclude>
- <exclude>*.jpg</exclude>
- <exclude>*.bmp</exclude>
- <exclude>*.ico</exclude>
- <exclude>*.svg</exclude>
- </excludes>
- </configuration>
- <executions>
- <execution>
- <id>first</id>
- <goals>
- <goal>update-file-header</goal>
- </goals>
- <phase>process-sources</phase>
- </execution>
- </executions>
- </plugin>
- -->
</plugins>
<resources>
diff --git a/ecomp-portal-BE-common/pom.xml b/ecomp-portal-BE-common/pom.xml
index 7f8da046..f5f925b8 100644
--- a/ecomp-portal-BE-common/pom.xml
+++ b/ecomp-portal-BE-common/pom.xml
@@ -125,49 +125,6 @@
</configuration>
</plugin>
- <!--
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>license-maven-plugin</artifactId>
- <version>1.10</version>
- <configuration>
- <encoding>UTF-8</encoding>
- <licenseName>my_license</licenseName>
- <licenseResolver>${project.baseUri}/license</licenseResolver>
- <inceptionYear>2017</inceptionYear>
- <organizationName>AT&amp;T Intellectual Property</organizationName>
- <projectName>ECOMP Portal</projectName>
- <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
- <processStartTag>================================================================================</processStartTag>
- <sectionDelimiter>================================================================================</sectionDelimiter>
- <processEndTag>================================================================================</processEndTag>
- <roots>
- <root>src/main</root>
- <root>src/test</root>
- </roots>
- <excludes>
- <exclude>*.png</exclude>
- <exclude>*.drl</exclude>
- <exclude>*.gif</exclude>
- <exclude>*.jpeg</exclude>
- <exclude>*.jpg</exclude>
- <exclude>*.bmp</exclude>
- <exclude>*.ico</exclude>
- <exclude>*.svg</exclude>
- </excludes>
- </configuration>
- <executions>
- <execution>
- <id>first</id>
- <goals>
- <goal>update-file-header</goal>
- </goals>
- <phase>process-sources</phase>
- </execution>
- </executions>
- </plugin>
- -->
-
</plugins>
<testResources>
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ConsulHealthServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ConsulHealthServiceImpl.java
index 175a1c71..0cfa4f81 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ConsulHealthServiceImpl.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ConsulHealthServiceImpl.java
@@ -21,6 +21,7 @@ package org.openecomp.portalapp.portal.service;
import java.util.List;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.springframework.stereotype.Component;
@@ -44,7 +45,7 @@ public class ConsulHealthServiceImpl implements ConsulHealthService {
HealthClient healthClient = consul.healthClient();
nodes = healthClient.getHealthyServiceInstances(service).getResponse();
} catch (Exception e) {
- String localFallbackServiceLocation = "localhost:" + fallbackPortOnLocalHost;
+ String localFallbackServiceLocation = EcompPortalUtils.localOrDockerHost() + ":" + fallbackPortOnLocalHost;
logger.debug(EELFLoggerDelegate.debugLogger,
" problem getting nodes for service {1}. Defaulting to {2}. Exception: {3}", service,
localFallbackServiceLocation, e.getMessage());
@@ -57,7 +58,7 @@ public class ConsulHealthServiceImpl implements ConsulHealthService {
if (nodes == null || nodes.size() == 0) {
logger.debug(EELFLoggerDelegate.debugLogger, "No healthy node found in the consul cluster running service " + service
+ ". Defaulting to localhost");
- return "localhost:" + fallbackPortOnLocalHost;
+ return EcompPortalUtils.localOrDockerHost() + ":" + fallbackPortOnLocalHost;
} else {
String locationFromConsul;
ServiceHealth node = nodes.get(0);
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EPCommonSystemProperties.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EPCommonSystemProperties.java
index 23bb3567..dd33bf6e 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EPCommonSystemProperties.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EPCommonSystemProperties.java
@@ -62,5 +62,6 @@ public class EPCommonSystemProperties extends SystemProperties {
public static final String AUTH_USER_SERVER = "auth_user_server";
public static final String EXTERNAL_ACCESS_ENABLE = "external_access_enable";
public static final String WIDGET_MS_PROTOCOL = "microservices.widget.protocol";
+ public static final String WIDGET_MS_HOSTNAME = "microservices.widget.hostname";
} \ No newline at end of file
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EcompPortalUtils.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EcompPortalUtils.java
index 2b39da0a..d471d90b 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EcompPortalUtils.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EcompPortalUtils.java
@@ -354,5 +354,20 @@ public class EcompPortalUtils {
return "https";
}
}
+
+ public static String localOrDockerHost(){
+ final String effectiveHost;
+ try{
+ effectiveHost = SystemProperties.getProperty(EPCommonSystemProperties.WIDGET_MS_HOSTNAME);
+ return (effectiveHost == null || effectiveHost.trim().equals("")) ? "localhost" : effectiveHost ;
+ }
+ catch(IllegalStateException ese){
+ //looks like SystemProperties.getProperty throws IllegalStateException if it cannot find a property you are looking for
+ //In order to not break the code if a non-required property is missing from system.properties, returning https as default
+ //when this exception is caught.
+ return "localhost";
+ }
+ }
+
}
diff --git a/ecomp-portal-BE-common/src/main/webapp/static/fusion/images/onap-portal-logo.png b/ecomp-portal-BE-common/src/main/webapp/static/fusion/images/onap-portal-logo.png
new file mode 100644
index 00000000..f48d3d47
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/webapp/static/fusion/images/onap-portal-logo.png
Binary files differ
diff --git a/ecomp-portal-BE-os/README.md b/ecomp-portal-BE-os/README.md
index 47f1cfb9..829fd86f 100644
--- a/ecomp-portal-BE-os/README.md
+++ b/ecomp-portal-BE-os/README.md
@@ -16,6 +16,7 @@ https://www.eclipse.org/m2e-wtp/
Version 1.1.?, July 2017
- [Portal-30] Failed to communicate with the widget microservice: Fixed
+- [Portal-35] Replaced the portal logo with onap logo on the login screen.
Version 1.1.0, July 2017
- [Portal-7] Improvements added as part of the rebasing process
diff --git a/ecomp-portal-BE-os/pom.xml b/ecomp-portal-BE-os/pom.xml
index 1e64f7cd..1e4b4922 100644
--- a/ecomp-portal-BE-os/pom.xml
+++ b/ecomp-portal-BE-os/pom.xml
@@ -207,20 +207,6 @@
</execution>
</executions>
</plugin>
- <!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>license-maven-plugin</artifactId>
- <version>1.10</version> <configuration> <encoding>UTF-8</encoding> <licenseName>my_license</licenseName>
- <licenseResolver>${project.baseUri}/license</licenseResolver> <inceptionYear>2017</inceptionYear>
- <organizationName>AT&amp;T Intellectual Property</organizationName> <projectName>ECOMP
- Portal</projectName> <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
- <processStartTag>================================================================================</processStartTag>
- <sectionDelimiter>================================================================================</sectionDelimiter>
- <processEndTag>================================================================================</processEndTag>
- <roots> <root>src/main</root> <root>src/test</root> </roots> <excludes> <exclude>*.png</exclude>
- <exclude>*.drl</exclude> <exclude>*.gif</exclude> <exclude>*.jpeg</exclude>
- <exclude>*.jpg</exclude> <exclude>*.bmp</exclude> <exclude>*.ico</exclude>
- <exclude>*.svg</exclude> </excludes> </configuration> <executions> <execution>
- <id>first</id> <goals> <goal>update-file-header</goal> </goals> <phase>process-sources</phase>
- </execution> </executions> </plugin> -->
</plugins>
<testResources>
diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginController.java b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginController.java
index 09e10e38..6f3d2278 100644
--- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginController.java
+++ b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginController.java
@@ -174,8 +174,15 @@ public class LoginController extends EPUnRestrictedBaseController implements Log
}
+ /* Work around a bug in ecompsdkos version 1.1.0 which hard-codes this endpoint. */
+ @RequestMapping(value = {"/process_csp" }, method = RequestMethod.GET)
+ public ModelAndView processCsp(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ return processSingleSignOn(request, response);
+ }
+ /* Remove this method after epsdk-app-common/.../SingleSignOnController.java is repaired. */
+
@RequestMapping(value = {"/processSingleSignOn" }, method = RequestMethod.GET)
- public ModelAndView processSingelSignOn(HttpServletRequest request, HttpServletResponse response) throws Exception{
+ public ModelAndView processSingleSignOn(HttpServletRequest request, HttpServletResponse response) throws Exception{
Map<Object, Object> model = new HashMap<Object, Object>();
HashMap<Object, Object> additionalParamsMap = new HashMap<Object, Object>();
diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginService.java b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginService.java
index 7d2e4518..d2c53028 100644
--- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginService.java
+++ b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginService.java
@@ -31,6 +31,6 @@ public interface LoginService {
public @ResponseBody String loginValidate(HttpServletRequest request, HttpServletResponse response) throws Exception;
- public ModelAndView processSingelSignOn(HttpServletRequest request, HttpServletResponse response) throws Exception;
+ public ModelAndView processSingleSignOn(HttpServletRequest request, HttpServletResponse response) throws Exception;
}
diff --git a/ecomp-portal-BE-os/src/main/resources/cache.ccf b/ecomp-portal-BE-os/src/main/resources/cache.ccf
index 6f5c6f92..d21404b0 100644
--- a/ecomp-portal-BE-os/src/main/resources/cache.ccf
+++ b/ecomp-portal-BE-os/src/main/resources/cache.ccf
@@ -20,7 +20,7 @@ jcs.default.elementattributes.IsSpool=true
# AUXILLARY CACHE CONFIGURATION
jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
-jcs.auxiliary.DC.attributes.DiskPath=c:/projects/fusion/war/WEB-INF/cache
+jcs.auxiliary.DC.attributes.DiskPath=/tmp
# PRE-DEFINED REGION FOR LOOKUP DATA
diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/login.jsp b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/login.jsp
index 7ca8531c..c37d6d6f 100644
--- a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/login.jsp
+++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/login.jsp
@@ -75,23 +75,25 @@
<div class="centered style="-webkit-transform: translateZ(0);background:white, z-index:0;">
<div align="center" id="errorInfo" style="display:none;float:left;font-size:12px;margin-left:5px"><span style="color:red">Invaild username or password, Please try again</span></div>
<br/>
- <div align="center" style="margin-left:auto;margin-right:auto;width:40%;padding:6px;opacity:0.7;background-color:white">
- <img src="static/fusion/images/ecomp-login.jpg" height="250"/>
+ <div align="center" style="margin-left:auto;margin-right:auto;width:40%;padding:6px;background-color:white">
+ <img src="static/fusion/images/onap-portal-logo.png" height="250"/>
<br>
- <label>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label class="form-field__label">Login ID:</label>
- </label>
- <input type="text" class="fn-ebz-text" ng-model="loginId" style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;"
- maxlength="30" />
- <br/>
- <br/>
- <label >&nbsp;Password:</label>
- <input type="password" class="span3" ng-model="password" style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;"
- maxlength="30" onkeydown="if (event.keyCode == 13) document.getElementById('loginBtn').click()"/>
- <br />
- <br />
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- <a class="login-btn" id="loginBtn" ng-click="loginExternal();">LOGIN</a>
+ <div style="opacity: 0.7;">
+ <label>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label class="form-field__label">Login ID:</label>
+ </label>
+ <input type="text" class="fn-ebz-text" ng-model="loginId" style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;"
+ maxlength="30" />
+ <br/>
+ <br/>
+ <label >&nbsp;Password:</label>
+ <input type="password" class="span3" ng-model="password" style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;"
+ maxlength="30" onkeydown="if (event.keyCode == 13) document.getElementById('loginBtn').click()"/>
+ <br />
+ <br />
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <a class="login-btn" id="loginBtn" ng-click="loginExternal();">LOGIN</a>
+ </div>
<br>
</div>
</div>
diff --git a/ecomp-portal-FE-common/pom.xml b/ecomp-portal-FE-common/pom.xml
index b74783ad..111b2881 100644
--- a/ecomp-portal-FE-common/pom.xml
+++ b/ecomp-portal-FE-common/pom.xml
@@ -4,52 +4,4 @@
<artifactId>ecompportal-FE-common</artifactId>
<version>1.1</version>
<!-- This file exists primarily to allow easy import of this project into Eclipse. -->
-
-
- <build>
- <plugins>
- <!--
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>license-maven-plugin</artifactId>
- <version>1.10</version>
- <configuration>
- <encoding>UTF-8</encoding>
- <licenseName>my_license</licenseName>
- <licenseResolver>${project.baseUri}/license</licenseResolver>
- <inceptionYear>2017</inceptionYear>
- <organizationName>AT&amp;T Intellectual Property</organizationName>
- <projectName>ECOMP Portal</projectName>
- <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
- <processStartTag>================================================================================</processStartTag>
- <sectionDelimiter>================================================================================</sectionDelimiter>
- <processEndTag>================================================================================</processEndTag>
- <roots>
- <root>client/app</root>
- </roots>
- <excludes>
- <exclude>*.png</exclude>
- <exclude>*.drl</exclude>
- <exclude>*.gif</exclude>
- <exclude>*.jpeg</exclude>
- <exclude>*.jpg</exclude>
- <exclude>*.bmp</exclude>
- <exclude>*.ico</exclude>
- <exclude>*.svg</exclude>
- </excludes>
- </configuration>
- <executions>
- <execution>
- <id>first</id>
- <goals>
- <goal>update-file-header</goal>
- </goals>
- <phase>process-sources</phase>
- </execution>
- </executions>
- </plugin>
- -->
-
- </plugins>
- </build>
</project>
diff --git a/ecomp-portal-FE-os/pom.xml b/ecomp-portal-FE-os/pom.xml
index e54b518a..2ee46044 100644
--- a/ecomp-portal-FE-os/pom.xml
+++ b/ecomp-portal-FE-os/pom.xml
@@ -187,47 +187,6 @@
<skip>true</skip>
</configuration>
</plugin>
- <!--
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>license-maven-plugin</artifactId>
- <version>1.10</version>
- <configuration>
- <encoding>UTF-8</encoding>
- <licenseName>my_license</licenseName>
- <licenseResolver>${project.baseUri}/license</licenseResolver>
- <inceptionYear>2017</inceptionYear>
- <organizationName>AT&amp;T Intellectual Property</organizationName>
- <projectName>ECOMP Portal</projectName>
- <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
- <processStartTag>================================================================================</processStartTag>
- <sectionDelimiter>================================================================================</sectionDelimiter>
- <processEndTag>================================================================================</processEndTag>
- <roots>
- <root>client/src</root>
- </roots>
- <excludes>
- <exclude>*.png</exclude>
- <exclude>*.drl</exclude>
- <exclude>*.gif</exclude>
- <exclude>*.jpeg</exclude>
- <exclude>*.jpg</exclude>
- <exclude>*.bmp</exclude>
- <exclude>*.ico</exclude>
- <exclude>*.svg</exclude>
- </excludes>
- </configuration>
- <executions>
- <execution>
- <id>first</id>
- <goals>
- <goal>update-file-header</goal>
- </goals>
- <phase>process-sources</phase>
- </execution>
- </executions>
- </plugin>
- -->
</plugins>
</build>
</project>
diff --git a/ecomp-portal-widget-ms/pom.xml b/ecomp-portal-widget-ms/pom.xml
index 35727c1e..5438ad13 100644
--- a/ecomp-portal-widget-ms/pom.xml
+++ b/ecomp-portal-widget-ms/pom.xml
@@ -29,10 +29,6 @@
</properties>
- <!-- <repositories> <repository> SWM repository has EELF jars <id>att-swm-repo</id>
- <name>ATT SWM Repository</name> <url>http://mavencentral.it.att.com:8084/nexus/content/repositories/swm-releases</url>
- </repository> </repositories> -->
-
<dependencies>
<dependency>
<!-- Setup Spring Data JPA Repository support -->