Merge "New container for logging"
authorNaga Sugguna <ns156u@att.com>
Thu, 10 Oct 2019 03:37:08 +0000 (03:37 +0000)
committerGerrit Code Review <gerrit@akraino.org>
Thu, 10 Oct 2019 03:37:08 +0000 (03:37 +0000)
47 files changed:
.coafile
docker/README.rst
docker/k8s/Dockerfile
docker/kube-conformance/Makefile
docker/mysql/deploy.sh
docker/mysql/deploy_with_existing_persistent_storage.sh
docker/ui/deploy.sh
docker/ui/server.xml
tests/k8s/conformance/conformance.robot
tests/variables.yaml
ui/CHANGELOG.md
ui/README.rst
ui/db-scripts/EcompSdkDDLMySql_2_4_Common.sql
ui/db-scripts/EcompSdkDDLMySql_2_4_OS.sql
ui/db-scripts/EcompSdkDMLMySql_2_4_Common.sql
ui/db-scripts/EcompSdkDMLMySql_2_4_OS.sql
ui/db-scripts/akraino_blueprint_validation_db.sql
ui/db-scripts/examples/initialize_db_example.sql
ui/pom.xml
ui/src/main/java/org/akraino/validation/ui/conf/ExternalAppConfig.java
ui/src/main/java/org/akraino/validation/ui/conf/UiInitializer.java
ui/src/main/java/org/akraino/validation/ui/controller/ModelsViewsController.java
ui/src/main/java/org/akraino/validation/ui/controller/UserController.java
ui/src/main/java/org/akraino/validation/ui/data/UserData.java [new file with mode: 0644]
ui/src/main/java/org/akraino/validation/ui/login/LoginStrategyImpl.java
ui/src/main/resources/portal.properties
ui/src/main/webapp/WEB-INF/conf/system.properties
ui/src/main/webapp/WEB-INF/defs/definitions.xml
ui/src/main/webapp/WEB-INF/jsp/login.jsp
ui/src/main/webapp/WEB-INF/jsp/login_external.jsp
ui/src/main/webapp/app/BluvalUI/CreateUser/CreateUserController.js
ui/src/main/webapp/app/BluvalUI/CreateUser/CreateUserTemplate.html
ui/src/main/webapp/app/BluvalUI/GetUser/GetUser.html [new file with mode: 0644]
ui/src/main/webapp/app/BluvalUI/GetUser/GetUser.js [new file with mode: 0644]
ui/src/main/webapp/app/BluvalUI/GetUser/GetUserController.js [new file with mode: 0644]
ui/src/main/webapp/app/BluvalUI/GetUser/GetUserTemplate.html [new file with mode: 0644]
ui/src/main/webapp/app/BluvalUI/GetUser/Route.js [new file with mode: 0644]
ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUser.html [new file with mode: 0644]
ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUser.js [new file with mode: 0644]
ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUserController.js [new file with mode: 0644]
ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUserTemplate.html [new file with mode: 0644]
ui/src/main/webapp/app/BluvalUI/ResetUser/Route.js [new file with mode: 0644]
ui/src/main/webapp/app/BluvalUI/UpdatePassword/Route.js [new file with mode: 0644]
ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePassword.html [new file with mode: 0644]
ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePassword.js [new file with mode: 0644]
ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePasswordController.js [new file with mode: 0644]
ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePasswordTemplate.html [new file with mode: 0644]

index 8ade5f5..50e636c 100644 (file)
--- a/.coafile
+++ b/.coafile
@@ -96,4 +96,7 @@ ignore = ui/src/main/webapp/app/fusion/**,
     ui/src/main/webapp/app/BluvalUI/GetLabs/GetLabs.js,
     ui/src/main/webapp/app/BluvalUI/GetLayers/GetLayers.js,
     ui/src/main/webapp/app/BluvalUI/GetTimeslots/GetTimeslots.js,
-    ui/src/main/webapp/app/BluvalUI/CreateUser/CreateUser.js
+    ui/src/main/webapp/app/BluvalUI/CreateUser/CreateUser.js,
+    ui/src/main/webapp/app/BluvalUI/GetUser/GetUser.js,
+    ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUser.js,
+    ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePassword.js
index 74f362d..6e0cc7d 100644 (file)
@@ -100,12 +100,12 @@ In order for the container to be easily created, the deploy.sh script has been d
 
 CONTAINER_NAME, name of the container, default value is akraino-validation-mysql
 MYSQL_ROOT_PASSWORD, the desired mysql root user password, this variable is required
-MYSQL_AKRAINO_PASSWORD, the desired mysql akraino user password, this variable is required
+MYSQL_USER, the desired mysql user, the default value is 'akraino'
+MYSQL_PASSWORD, the desired mysql user password, this variable is required
 REGISTRY, registry of the mysql image, default value is akraino
 NAME, name of the mysql image, default value is validation
 TAG_PRE, first part of the image version, default value is mysql
 TAG_VER, last part of the image version, default value is latest
-MYSQL_HOST_PORT, port on which mysql is exposed on host, default value is 3307
 
 In order to deploy the container, this script can be executed with the appropriate parameters.
 
@@ -114,7 +114,7 @@ Example (assuming the default variables have been utilized for building the imag
 .. code-block:: console
 
     cd validation/docker/mysql
-    ./deploy.sh MYSQL_ROOT_PASSWORD=root_password MYSQL_AKRAINO_PASSWORD=akraino_password
+    ./deploy.sh --MYSQL_ROOT_PASSWORD root_password --MYSQL_PASSWORD akraino_password
 
 Also, in order to re-deploy the database (it is assumed that the corresponding mysql container has been stopped and deleted) while the persistent storage already exists (currently, the 'akraino-validation-mysql' docker volume is used), a different approach should be used after the image building process.
 
@@ -125,7 +125,6 @@ REGISTRY, the registry of the mysql image, default value is akraino
 NAME, the name of the mysql image, default value is validation
 TAG_PRE, the first part of the image version, default value is mysql
 TAG_VER, the last part of the image version, default value is latest
-MYSQL_HOST_PORT, the port on which mysql is exposed on host, default value is 3307
 
 In order to deploy the container, this script can be executed with the appropriate parameters.
 
@@ -162,7 +161,8 @@ In order for the container to be easily created, the deploy.sh script has been d
 
 CONTAINER_NAME, the name of the contaner, default value is akraino-validation-ui
 DB_IP_PORT, the IP and port of the mysql instance, this variable is required
-MYSQL_AKRAINO_PASSWORD, the mysql akraino user password, this variable is required
+MYSQL_USER, the mysql user, the default value is 'akraino'
+MYSQL_PASSWORD, the mysql user password, this variable is required
 REGISTRY, the registry of the mysql image, default value is akraino
 NAME, the name of the mysql image, default value is validation
 TAG_PRE, the first part of the image version, default value is ui
@@ -176,7 +176,8 @@ JENKINS_PROXY, the needed proxy in order for the Jenkins server to be reachable,
 CERTDIR, the directory where the SSL certificates can be found, default value is the working directory where self signed certificates exist only for demo purposes
 ENCRYPTION_KEY, the key that should be used by the AES algorithm for encrypting passwords stored in database, this variable is required
 UI_ADMIN_PASSWORD, the desired Blueprint Validation UI password for the admin user, this variable is required
-UI_AKRAINO_PASSWORD, the desired Blueprint Validation UI password for the akraino user, this variable is required
+TRUST_ALL, the variable that defines whether the UI should trust all certificates or not, default value is false
+USE_NETWORK_HOST, the variable that defines whether the UI container should run in 'network host' mode or not, default value is "false"
 
 Note that, for a functional UI, the following prerequisites are needed:
 
@@ -193,7 +194,7 @@ Example (assuming the default variables have been utilized for building the imag
 .. code-block:: console
 
     cd validation/docker/ui
-    ./deploy.sh DB_IP_PORT=172.17.0.3:3306 MYSQL_AKRAINO_PASSWORD=akraino_password ENCRYPTION_KEY=AGADdG4D04BKm2IxIWEr8o== UI_ADMIN_PASSWORD=admin UI_AKRAINO_PASSWORD=akraino
+    ./deploy.sh --DB_IP_PORT 172.17.0.3:3306 --MYSQL_PASSWORD akraino_password --ENCRYPTION_KEY AGADdG4D04BKm2IxIWEr8o== --UI_ADMIN_PASSWORD admin
 
 The kube-conformance container
 ==============================
@@ -230,7 +231,7 @@ Example:
 
 .. code-block:: console
 
-    docker run -ti akraino/validation:kube-conformance-v1.16
+    docker run -ti akraino/validation:kube-conformance-v1.15
 
 By default, the container will run the `run_e2e.sh` script. If you want to
 enter the container, add */bin/sh* at the end of the command above
index 43c6d80..925ac3d 100644 (file)
@@ -19,9 +19,9 @@ FROM golang:alpine3.9 as build
 
 # Sonobuoy supports 3 Kubernetes minor versions: the current release and 2
 # minor versions before.
-ARG SB_TAG=v0.16.1
+ARG SB_TAG=v0.15.1
 # Determine the latest stable git tag at build time based on stable major version
-ARG K8S_VER=1.16
+ARG K8S_VER=1.15
 
 # Install dependencies
 COPY pip-requirements.txt /wheels/requirements/pip-requirements.txt
index ee7b40f..8e76e14 100644 (file)
@@ -15,7 +15,7 @@
 ##############################################################################
 
 export WORK_DIR?=$(TAG_PRE)
-export KUBE_VERSION=1.16
+export KUBE_VERSION=1.15
 export TAG_VER?=v$(KUBE_VERSION)
 
 .PHONY: .build
index 4184912..ef79b13 100755 (executable)
@@ -23,29 +23,20 @@ DOCKER_VOLUME_NAME="akraino-validation-mysql"
 CONTAINER_NAME="akraino-validation-mysql"
 # Container input variables
 MYSQL_ROOT_PASSWORD=""
-MYSQL_AKRAINO_PASSWORD=""
+MYSQL_USER="akraino"
+MYSQL_PASSWORD=""
 # Image data
 REGISTRY=akraino
 NAME=validation
 TAG_PRE=mysql
 TAG_VER=latest
-MYSQL_HOST_PORT=3307
 
-for ARGUMENT in "$@"
-do
-    KEY=$(echo $ARGUMENT | cut -f1 -d=)
-    VALUE=$(echo $ARGUMENT | cut -f2 -d=)
-    case "$KEY" in
-            REGISTRY)              REGISTRY=${VALUE} ;;
-            NAME)    NAME=${VALUE} ;;
-            TAG_VER)    TAG_VER=${VALUE} ;;
-            TAG_PRE)    TAG_PRE=${VALUE} ;;
-            MYSQL_ROOT_PASSWORD)    MYSQL_ROOT_PASSWORD=${VALUE} ;;
-            MYSQL_AKRAINO_PASSWORD)    MYSQL_AKRAINO_PASSWORD=${VALUE} ;;
-            CONTAINER_NAME)    CONTAINER_NAME=${VALUE} ;;
-            MYSQL_HOST_PORT)    MYSQL_HOST_PORT=${VALUE} ;;
-            *)
-    esac
+while [ $# -gt 0 ]; do
+   if [[ $1 == *"--"* ]]; then
+        v="${1/--/}"
+        declare $v="$2"
+   fi
+   shift
 done
 
 if [ -z "$MYSQL_ROOT_PASSWORD" ]
@@ -54,13 +45,13 @@ if [ -z "$MYSQL_ROOT_PASSWORD" ]
     exit 1
 fi
 
-if [ -z "$MYSQL_AKRAINO_PASSWORD" ]
+if [ -z "$MYSQL_PASSWORD" ]
   then
-    echo "ERROR: You must specify the mysql database akraino user password"
+    echo "ERROR: You must specify the mysql database user password"
     exit 1
 fi
 
 IMAGE="$REGISTRY"/"$NAME":"$TAG_PRE"-"$TAG_VER"
 chmod 0444 "/$(pwd)/mysql.conf"
-docker run --detach --name $CONTAINER_NAME --publish $MYSQL_HOST_PORT:3306 -v $DOCKER_VOLUME_NAME:/var/lib/mysql -v "/$(pwd)/mysql.conf:/etc/mysql/conf.d/my.cnf" -e MYSQL_ROOT_PASSWORD="$MYSQL_ROOT_PASSWORD" -e MYSQL_DATABASE="akraino" -e MYSQL_USER="akraino" -e MYSQL_PASSWORD="$MYSQL_AKRAINO_PASSWORD" $IMAGE
+docker run --detach --name $CONTAINER_NAME -v $DOCKER_VOLUME_NAME:/var/lib/mysql -v "$(pwd)/mysql.conf:/etc/mysql/conf.d/my.cnf" -e MYSQL_ROOT_PASSWORD="$MYSQL_ROOT_PASSWORD" -e MYSQL_DATABASE="akraino_bluvalui" -e MYSQL_USER="$MYSQL_USER" -e MYSQL_PASSWORD="$MYSQL_PASSWORD" $IMAGE
 sleep 10
index bd449ec..7a52f5c 100755 (executable)
@@ -26,23 +26,15 @@ REGISTRY=akraino
 NAME=validation
 TAG_PRE=mysql
 TAG_VER=latest
-MYSQL_HOST_PORT=3307
 
-for ARGUMENT in "$@"
-do
-    KEY=$(echo $ARGUMENT | cut -f1 -d=)
-    VALUE=$(echo $ARGUMENT | cut -f2 -d=)
-    case "$KEY" in
-            REGISTRY)              REGISTRY=${VALUE} ;;
-            NAME)    NAME=${VALUE} ;;
-            TAG_VER)    TAG_VER=${VALUE} ;;
-            TAG_PRE)    TAG_PRE=${VALUE} ;;
-            CONTAINER_NAME)    CONTAINER_NAME=${VALUE} ;;
-            MYSQL_HOST_PORT)    MYSQL_HOST_PORT=${VALUE} ;;
-            *)
-    esac
+while [ $# -gt 0 ]; do
+   if [[ $1 == *"--"* ]]; then
+        v="${1/--/}"
+        declare $v="$2"
+   fi
+   shift
 done
 
 IMAGE="$REGISTRY"/"$NAME":"$TAG_PRE"-"$TAG_VER"
-docker run --detach --name $CONTAINER_NAME --publish $MYSQL_HOST_PORT:3306 -v $DOCKER_VOLUME_NAME:/var/lib/mysql -v "/$(pwd)/mysql.conf:/etc/mysql/conf.d/my.cnf" $IMAGE
+docker run --detach --name $CONTAINER_NAME -v $DOCKER_VOLUME_NAME:/var/lib/mysql -v "$(pwd)/mysql.conf:/etc/mysql/conf.d/my.cnf" $IMAGE
 sleep 10
index faab064..6a0d58f 100755 (executable)
@@ -24,7 +24,8 @@ NAME=validation
 TAG_PRE=ui
 TAG_VER=latest
 # Container input parameters
-MYSQL_AKRAINO_PASSWORD=""
+MYSQL_USER="akraino"
+MYSQL_PASSWORD=""
 JENKINS_URL="https://jenkins.akraino.org/"
 JENKINS_USERNAME="demo"
 JENKINS_USER_PASSWORD="demo"
@@ -35,32 +36,15 @@ JENKINS_PROXY=""
 CERTDIR=$(pwd)
 ENCRYPTION_KEY=""
 UI_ADMIN_PASSWORD=""
-UI_AKRAINO_PASSWORD=""
+TRUST_ALL="false"
+USE_NETWORK_HOST="false"
 
-for ARGUMENT in "$@"
-do
-    KEY=$(echo $ARGUMENT | cut -f1 -d=)
-    VALUE=$(echo $ARGUMENT | cut -f2 -d=)
-    case "$KEY" in
-            REGISTRY)              REGISTRY=${VALUE} ;;
-            NAME)    NAME=${VALUE} ;;
-            TAG_PRE)    TAG_PRE=${VALUE} ;;
-            TAG_VER)    TAG_VER=${VALUE} ;;
-            MYSQL_AKRAINO_PASSWORD)    MYSQL_AKRAINO_PASSWORD=${VALUE} ;;
-            JENKINS_URL)    JENKINS_URL=${VALUE} ;;
-            JENKINS_USERNAME)    JENKINS_USERNAME=${VALUE} ;;
-            JENKINS_USER_PASSWORD)    JENKINS_USER_PASSWORD=${VALUE} ;;
-            JENKINS_JOB_NAME)    JENKINS_JOB_NAME=${VALUE} ;;
-            DB_IP_PORT)    DB_IP_PORT=${VALUE} ;;
-            CONTAINER_NAME)    CONTAINER_NAME=${VALUE} ;;
-            NEXUS_PROXY) NEXUS_PROXY=${VALUE} ;;
-            JENKINS_PROXY) JENKINS_PROXY=${VALUE} ;;
-            CERTDIR) CERTDIR=${VALUE} ;;
-            ENCRYPTION_KEY) ENCRYPTION_KEY=${VALUE} ;;
-            UI_ADMIN_PASSWORD) UI_ADMIN_PASSWORD=${VALUE} ;;
-            UI_AKRAINO_PASSWORD) UI_AKRAINO_PASSWORD=${VALUE} ;;
-            *)
-    esac
+while [ $# -gt 0 ]; do
+   if [[ $1 == *"--"* ]]; then
+        v="${1/--/}"
+        declare $v="$2"
+   fi
+   shift
 done
 
 if [ -z "$DB_IP_PORT" ]
@@ -69,9 +53,9 @@ if [ -z "$DB_IP_PORT" ]
     exit 1
 fi
 
-if [ -z "$MYSQL_AKRAINO_PASSWORD" ]
+if [ -z "$MYSQL_PASSWORD" ]
   then
-    echo "ERROR: You must specify the mysql akraino user password"
+    echo "ERROR: You must specify the mysql user password"
     exit 1
 fi
 
@@ -87,12 +71,13 @@ if [ -z "$UI_ADMIN_PASSWORD" ]
     exit 1
 fi
 
-if [ -z "$UI_AKRAINO_PASSWORD" ]
-  then
-    echo "ERROR: You must specify the UI akraino password"
-    exit 1
-fi
+echo "Note: If there is a password already stored in database, the supplied UI_ADMIN_PASSWORD will be ignored."
 
 IMAGE="$REGISTRY"/"$NAME":"$TAG_PRE"-"$TAG_VER"
-docker run --detach --name $CONTAINER_NAME --network="host" -v "$(pwd)/server.xml:/usr/local/tomcat/conf/server.xml" -v "$CERTDIR/bluval.key:/usr/local/tomcat/bluval.key" -v "$CERTDIR/bluval.crt:/usr/local/tomcat/bluval.crt" -v "$(pwd)/root_index.jsp:/usr/local/tomcat/webapps/ROOT/index.jsp" -e DB_IP_PORT="$DB_IP_PORT" -e MYSQL_AKRAINO_PASSWORD="$MYSQL_AKRAINO_PASSWORD" -e JENKINS_URL="$JENKINS_URL" -e JENKINS_USERNAME="$JENKINS_USERNAME" -e JENKINS_USER_PASSWORD="$JENKINS_USER_PASSWORD" -e JENKINS_JOB_NAME="$JENKINS_JOB_NAME" -e NEXUS_PROXY="$NEXUS_PROXY" -e JENKINS_PROXY="$JENKINS_PROXY" -e ENCRYPTION_KEY="$ENCRYPTION_KEY" -e UI_ADMIN_PASSWORD="$UI_ADMIN_PASSWORD" -e UI_AKRAINO_PASSWORD="$UI_AKRAINO_PASSWORD" $IMAGE
+if [[ $USE_NETWORK_HOST = "true" ]]
+  then
+    docker run --detach --name $CONTAINER_NAME --network="host" -v "$(pwd)/server.xml:/usr/local/tomcat/conf/server.xml" -v "$CERTDIR/bluval.key:/usr/local/tomcat/bluval.key" -v "$CERTDIR/bluval.crt:/usr/local/tomcat/bluval.crt" -v "$(pwd)/root_index.jsp:/usr/local/tomcat/webapps/ROOT/index.jsp" -e DB_IP_PORT="$DB_IP_PORT" -e MYSQL_USER="$MYSQL_USER" -e MYSQL_PASSWORD="$MYSQL_PASSWORD" -e JENKINS_URL="$JENKINS_URL" -e JENKINS_USERNAME="$JENKINS_USERNAME" -e JENKINS_USER_PASSWORD="$JENKINS_USER_PASSWORD" -e JENKINS_JOB_NAME="$JENKINS_JOB_NAME" -e NEXUS_PROXY="$NEXUS_PROXY" -e JENKINS_PROXY="$JENKINS_PROXY" -e ENCRYPTION_KEY="$ENCRYPTION_KEY" -e UI_ADMIN_PASSWORD="$UI_ADMIN_PASSWORD" -e TRUST_ALL="$TRUST_ALL" $IMAGE
+  else
+    docker run --detach --name $CONTAINER_NAME -v "$(pwd)/server.xml:/usr/local/tomcat/conf/server.xml" -v "$CERTDIR/bluval.key:/usr/local/tomcat/bluval.key" -v "$CERTDIR/bluval.crt:/usr/local/tomcat/bluval.crt" -v "$(pwd)/root_index.jsp:/usr/local/tomcat/webapps/ROOT/index.jsp" -e DB_IP_PORT="$DB_IP_PORT" -e MYSQL_USER="$MYSQL_USER" -e MYSQL_PASSWORD="$MYSQL_PASSWORD" -e JENKINS_URL="$JENKINS_URL" -e JENKINS_USERNAME="$JENKINS_USERNAME" -e JENKINS_USER_PASSWORD="$JENKINS_USER_PASSWORD" -e JENKINS_JOB_NAME="$JENKINS_JOB_NAME" -e NEXUS_PROXY="$NEXUS_PROXY" -e JENKINS_PROXY="$JENKINS_PROXY" -e ENCRYPTION_KEY="$ENCRYPTION_KEY" -e UI_ADMIN_PASSWORD="$UI_ADMIN_PASSWORD" -e TRUST_ALL="$TRUST_ALL" $IMAGE
+fi
 sleep 10
index 969d62b..801b98f 100644 (file)
         <!-- A "Connector" represents an endpoint by which requests are received
             and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html
             Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html
-            Define a non-SSL/TLS HTTP/1.1 Connector on port 8080 -->
-        <Connector port="8080" protocol="HTTP/1.1"
-            connectionTimeout="20000" redirectPort="8443" />
+            Define an SSL/TLS Connector on port 8443 for backwards compatibility-->
+        <Connector
+           protocol="org.apache.coyote.http11.Http11NioProtocol"
+           port="8443" maxThreads="200"
+           scheme="https" secure="true" SSLEnabled="true"
+           SSLCertificateFile="/usr/local/tomcat/bluval.crt"
+           SSLCertificateKeyFile="/usr/local/tomcat/bluval.key"
+           SSLVerifyClient="none" SSLProtocol="TLSv1+TLSv1.1+TLSv1.2" />
         <!-- A "Connector" using the shared thread pool -->
         <!-- <Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1"
             connectionTimeout="20000" redirectPort="8443" /> -->
@@ -69,7 +74,7 @@
             clientAuth="false" sslProtocol="TLS" />-->
         <Connector
            protocol="org.apache.coyote.http11.Http11NioProtocol"
-           port="8443" maxThreads="200"
+           port="443" maxThreads="200"
            scheme="https" secure="true" SSLEnabled="true"
            SSLCertificateFile="/usr/local/tomcat/bluval.crt"
            SSLCertificateKeyFile="/usr/local/tomcat/bluval.key"
@@ -89,7 +94,7 @@
 
         <!-- Define an AJP 1.3 Connector on port 8009 -->
         <Connector port="8009" protocol="AJP/1.3"
-            redirectPort="8443" />
+            redirectPort="443" />
 
 
         <!-- An Engine represents the entry point (within Catalina) that
index 9418772..0d0c002 100644 (file)
@@ -45,6 +45,13 @@ ${LOG}            ${LOG_PATH}${/}${SUITE_NAME.replace(' ','_')}.log
 ...                 e2e=&{E2E}
 ...                 systemd_logs=&{SYSTEMD_LOGS}
 
+# Following tests assume DNS domain is "cluster.local"
+${DNS_DOMAIN_TESTS}  SEPARATOR=
+...                 DNS should provide /etc/hosts entries for the cluster|
+...                 DNS should provide DNS for services|
+...                 DNS should provide DNS for ExternalName services|
+...                 DNS should provide DNS for the cluster
+
 *** Test Cases ***
 Run Sonobuoy Conformance Test
         # Start the test
@@ -126,10 +133,19 @@ Onboard Images
         Onboard Sonobuoy Images
         Onboard Kubernetes e2e Test Images
 
+Get Tests To Skip
+        ${flag}=                Set Variable  Aggregator|Alpha|\\[(Disruptive|Feature:[^\\]]+|Flaky)\\]
+        ${flag}=                Run Keyword If  '${DNS_DOMAIN}' != 'cluster.local'
+        ...                         Catenate  SEPARATOR=|  ${flag}  ${DNS_DOMAIN_TESTS}
+        ...                     ELSE
+        ...                         Set Variable  ${flag}
+        [Return]                ${flag}
+
 Create Manifest File
+        ${skip}=                Get Tests To Skip
         @{flags}=               Set Variable
         ...                         --e2e-focus  \\[Conformance\\\]
-        ...                         --e2e-skip  Aggregator|Alpha|\\[(Disruptive|Feature:[^\\]]+|Flaky)\\]
+        ...                         --e2e-skip  ${skip}
         ...                         --kube-conformance-image  ${SONOBUOY_IMGS.e2e.path}/${SONOBUOY_IMGS.e2e.name}
         ...                         --sonobuoy-image  ${SONOBUOY_IMGS.sonobuoy.path}/${SONOBUOY_IMGS.sonobuoy.name}
         ...                         --image-pull-policy  Always
index 121eb26..11e8779 100644 (file)
@@ -58,3 +58,4 @@ rootpswd: rootpassword   # Required root password to log in to the host
 
 ### Input variables for Conformance test
 internal_registry: ''                         # Docker internal registry
+dns_domain: cluster.local                     # cluster's DNS domain
index 1c801c7..bea59b6 100644 (file)
@@ -216,3 +216,30 @@ All notable changes to this project will be documented in this file.
 - MariaDB has been substituted with MySQL
 
 ### Removed
+
+## [0.4.2-SNAPSHOT] - 1 October 2019
+### Added
+
+### Changed
+- Redirection bug during session timeouts and unauthorized accesses of resources fixed.
+
+### Removed
+
+## [0.4.3-SNAPSHOT] - 3 October 2019
+### Added
+- Full CRUD operations on user data structure is supported.
+
+### Changed
+- 'akraino' database has been renamed to 'akraino_bluvalui'
+
+### Removed
+
+## [0.4.4-SNAPSHOT] - 4 October 2019
+### Added
+- The user can define whether the UI can trust all SSL certificates or not.
+- The mysql user name can be configured.
+
+### Changed
+- New approach is used for interpreting shell script input variables. Now, all symbols are recognized.
+
+### Removed
index 822808f..771973a 100644 (file)
@@ -169,25 +169,23 @@ Also, a script has been developed, namely validation/docker/mysql/deploy.sh whic
 
 CONTAINER_NAME, name of the container, default value is akraino-validation-mysql
 MYSQL_ROOT_PASSWORD, the desired mysql root user password, this variable is required
-MYSQL_AKRAINO_PASSWORD, the desired mysql akraino user password, this variable is required
+MYSQL_USER, the mysql user, the default value is 'akraino'
+MYSQL_PASSWORD, the desired mysql user password, this variable is required
 REGISTRY, registry of the mysql image, default value is akraino
 NAME, name of the mysql image, default value is validation
 TAG_PRE, first part of the image version, default value is mysql
 TAG_VER, last part of the image version, default value is latest
-MYSQL_HOST_PORT, port on which mysql is exposed on host, default value is 3307
-
-Currently, two users are supported by the UI, namely admin (full privileges) and akraino (limited privileges). Their passwords are changed and stored at UI deployment (refer to UI deployment section).
 
 In order to build and deploy the image using only the required parameters, the below instructions should be followed:
 
-The mysql root password, mysql akraino user password (currently the UI connects to the database using the akraino user), the UI admin password and the UI akraino password should be configured using the appropriate variables and the following commands should be executed:
+The mysql root password and the mysql user password (currently the UI connects to the database using the akraino user) should be configured using the appropriate variables and the following commands should be executed (the user should override default variables based on requirements):
 
 .. code-block:: console
 
     cd validation/ui
     mvn docker:build -Ddocker.filter=akraino/validation:dev-mysql-latest
     cd ../docker/mysql
-    ./deploy.sh TAG_PRE=dev-mysql MYSQL_ROOT_PASSWORD=<mysql root user password> MYSQL_AKRAINO_PASSWORD=<mysql akraino user password>
+    ./deploy.sh --TAG_PRE dev-mysql --MYSQL_ROOT_PASSWORD <mysql root user password> --MYSQL_PASSWORD <mysql akraino user password>
     mysql -p<MYSQL_AKRAINO_PASSWORD> -uakraino -h <IP of the mysql container> < ../../ui/db-scripts/examples/initialize_db_example.sql
 
 In order to retrieve the IP of the mysql container, the following command should be executed:
@@ -207,26 +205,23 @@ REGISTRY, the registry of the mysql image, default value is akraino
 NAME, the name of the mysql image, default value is validation
 TAG_PRE, the first part of the image version, default value is mysql
 TAG_VER, the last part of the image version, default value is latest
-MYSQL_HOST_PORT, the port on which mysql is exposed on host, default value is 3307
-
-In order to deploy the image using only the required parameters and the existing persistent storage, the below instructions should be followed:
 
-The mysql root user password should be configured using the appropriate variable and the following commands should be executed:
+In order to deploy the image using only the required parameters and the existing persistent storage, the below instructions should be followed (the user should override the default variables based on the requirements):
 
 .. code-block:: console
 
     cd validation/docker/mysql
-    ./deploy_with_existing_persistent_storage.sh TAG_PRE=dev-mysql
+    ./deploy_with_existing_persistent_storage.sh --TAG_PRE dev-mysql
 
 Finally, if the database must be re-deployed (it is assumed that the corresponding mysql container has been stopped and deleted) and the old persistent storage must be deleted, the used docker volume should be first deleted (note that all database's data will be lost).
 
-To this end, after the image build process, the following commands should be executed:
+To this end, after the image build process, the following commands should be executed (the user should override the default variables based on the requirements):
 
 .. code-block:: console
 
     docker volume rm akraino-validation-mysql
     cd validation/docker/mysql
-    ./deploy.sh TAG_PRE=dev-mysql MYSQL_ROOT_PASSWORD=<root user password> MYSQL_AKRAINO_PASSWORD=<mysql akraino user password>
+    ./deploy.sh --TAG_PRE dev-mysql --MYSQL_ROOT_PASSWORD <root user password> --MYSQL_PASSWORD <mysql akraino user password>
     mysql -p<MYSQL_AKRAINO_PASSWORD> -uakraino -h <IP of the mysql container> < ../../ui/db-scripts/examples/initialize_db_example.sql
 
 In the context of the UI application, the following tables exist in the database:
@@ -288,7 +283,7 @@ the following file should be created:
 name: dbscript
 content:
     SET FOREIGN_KEY_CHECKS=1;
-    use akraino;
+    use akraino_bluvalui;
     insert into lab (id, lab, silo) values(2, 'community', 'community');
 
 Then, the following command should be executed:
@@ -306,7 +301,7 @@ the following file should be created:
 name: dbscript
 content:
     SET FOREIGN_KEY_CHECKS=1;
-    use akraino;
+    use akraino_bluvalui;
     insert into timeslot values(2, 'now', null, 2);
 
 2 is the id of the community lab.
@@ -322,7 +317,7 @@ Furthermore, if a user wants to define a new blueprint, namely "newBlueprint", a
 name: dbscript
 content:
     SET FOREIGN_KEY_CHECKS=1;
-    use akraino;
+    use akraino_bluvalui;
     insert into blueprint (id, blueprint_name) values(3, 'newBlueprint');
     insert into blueprint_instance (id, blueprint_id, version) values(3, 3, 'master');
     insert into blueprint_layer (id, layer) values(4, 'k8s');
@@ -395,7 +390,8 @@ Also, a script has been developed, namely validation/docker/ui/deploy.sh which e
 
 CONTAINER_NAME, the name of the container, default value is akraino-validation-ui
 DB_IP_PORT, the IP and port of the mysql instance, this variable is required
-MYSQL_AKRAINO_PASSWORD, the mysql akraino user password, this variable is required
+MYSQL_USER, the mysql user, the default value is 'akraino'
+MYSQL_PASSWORD, the mysql user password, this variable is required
 REGISTRY, the registry of the ui image, default value is akraino
 NAME, the name of the ui image, default value is validation
 TAG_PRE, the first part of the image version, default value is ui
@@ -409,7 +405,8 @@ JENKINS_PROXY, the needed proxy in order for the Jenkins server to be reachable,
 CERTDIR, the directory where the SSL certificates can be found, default value is the working directory where self signed certificates exist only for demo purposes
 ENCRYPTION_KEY, the key that should be used by the AES algorithm for encrypting passwords stored in database, this variable is required
 UI_ADMIN_PASSWORD, the desired Blueprint Validation UI password for the admin user, this variable is required
-UI_AKRAINO_PASSWORD, the desired Blueprint Validation UI password for the akraino user, this variable is required
+TRUST_ALL, the variable that defines whether the UI should trust all certificates or not, default value is false
+USE_NETWORK_HOST, the variable that defines whether the UI container should run in 'network host' mode or not, default value is "false"
 
 So, for a functional UI, the following prerequisites are needed:
 
@@ -417,25 +414,29 @@ So, for a functional UI, the following prerequisites are needed:
 - A Jenkins instance capable of running the blueprint validation test (this is optional and is needed only for UI full control loop mode)
 - A Nexus repo in which all the test results are stored.
 
-Then, the following commands can be executed in order to deploy the UI container:
+Then, the following commands can be executed in order to deploy the UI container (the user should override the default variables based on requirements):
 
 .. code-block:: console
     cd ../docker/ui
-    ./deploy.sh TAG_PRE=dev-ui DB_IP_PORT=<IP and port of the mysql> MYSQL_AKRAINO_PASSWORD=<mysql akraino password> ENCRYPTION_KEY=<encryption key> UI_ADMIN_PASSWORD=<UI admin user password> UI_AKRAINO_PASSWORD=<UI akraino user password>
+    ./deploy.sh --TAG_PRE dev-ui --DB_IP_PORT <IP and port of the mysql> --MYSQL_PASSWORD <mysql akraino password> --ENCRYPTION_KEY <encryption key> --UI_ADMIN_PASSWORD <UI admin user password>
 
 The content of the DB_IP_PORT can be for example '172.17.0.3:3306'. Also, the value of the encryption key can be for example 'AGADdG4D04BKm2IxIWEr8o=='.
 
+Currently, one user is supported by the UI, namely admin (full privileges). Its password is initialized during UI deployment. This password can be modified using the UI. Furthermore, more users can be created/modified using the UI.
+
 Furthermore, the TAG_PRE variable should be defined as the default value is 'ui' (note that the 'dev-ui' is used for development purposes - look at pom.xml file).
 
 If no proxy exists, the proxy ip and port variables should not be defined.
 
 More users can be created using the 'Create User' tab of the UI. This tab is available only for the admin user.
 
-The UI should be available in the following url:
+If the content of the 'USE_NETWORK_HOST' is equal to true (in this case, the ports 8443 and 443 must be available on the host), the UI should be available in the following url:
+
+    https://<IP of the host>
 
-    https://<IP of UI container>:8443/bluvalui/
+Else, the UI should be available in the following url:
 
-Note that the deployment uses the network host mode, so the ports 8080 and 8443 must be available on the host.
+    https://<IP of the UI container>
 
 As far as the SSL certificates are concerned, self-signed built-in certificates exist in the 'validation/docker/ui' directory which are used by default. It should be noted that these
 certificates should be used only for demo purposes. If a user wants to use different ones which are more appropriate for a production environment, the directory that contains these new
index ebc838f..2be4d76 100644 (file)
@@ -20,9 +20,9 @@
 
 SET FOREIGN_KEY_CHECKS=1;
 
-CREATE DATABASE IF NOT EXISTS akraino;
+CREATE DATABASE IF NOT EXISTS akraino_bluvalui;
 
-USE akraino;
+USE akraino_bluvalui;
 
 -- ---------- create table SECTION
 --
index 4a35dd6..b1e5c7c 100644 (file)
@@ -5,7 +5,7 @@
 
 SET FOREIGN_KEY_CHECKS=1;
 
-USE akraino;
+USE akraino_bluvalui;
 
 -- No additional tables required at this time
 
index bf18eab..69146dd 100644 (file)
@@ -5,7 +5,7 @@
 
 SET FOREIGN_KEY_CHECKS=1;
 
-USE akraino;
+USE akraino_bluvalui;
 
 -- fn_function
 Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_process','Process List','menu','*');
@@ -168,7 +168,8 @@ INSERT INTO fn_restricted_url VALUES('report/wizard/retrieve_data/true','menu_re
 -- fn_role
 Insert into fn_role (ROLE_ID,ROLE_NAME,ACTIVE_YN,PRIORITY) values (16,'Standard User','Y',5);
 Insert into fn_role (ROLE_ID,ROLE_NAME,ACTIVE_YN,PRIORITY) values (1,'System Administrator','Y',1);
-Insert into fn_role (ROLE_ID,ROLE_NAME,ACTIVE_YN,PRIORITY) values (17,'Blueprint Validation UI user','Y',5);
+Insert into fn_role (ROLE_ID,ROLE_NAME,ACTIVE_YN,PRIORITY) values (17,'TSC','Y',5);
+Insert into fn_role (ROLE_ID,ROLE_NAME,ACTIVE_YN,PRIORITY) values (18,'Lab Owner','Y',5);
 
 -- fn_role_composite
 Insert into fn_role_composite (PARENT_ROLE_ID,CHILD_ROLE_ID) values (1,16);
@@ -203,8 +204,11 @@ Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_map');
 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_profile');
 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_reports');
 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_tab');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (17,'menu_home');
 Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (17,'menu_tab');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (17,'menu_customer');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (17,'menu_home');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (18,'menu_customer');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (18,'menu_home');
 
 
 -- fn_tab
index 0497529..6168ae4 100644 (file)
@@ -4,7 +4,7 @@
 -- ---------------------------------------------------------------------------------------------------------------
 
 SET FOREIGN_KEY_CHECKS=1;
-USE akraino;
+USE akraino_bluvalui;
 
 -- fn_menu
 INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (1, 'Root', NULL, 10, NULL, 'menu_home', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', NULL); --  we need even though it's inactive
@@ -26,44 +26,46 @@ INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD,
 INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (930, 'Search', 9, 15, 'userProfile', 'menu_admin', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/search_profile.png');
 INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (150022, 'Menus', 10, 60, 'admin#/admin_menu_edit', 'menu_admin', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', NULL);
 INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (150038,'Notebook',5000,135,'samplePage#/notebook','menu_sample','Y',NULL,NULL,NULL,NULL,'APP','N',NULL);
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (21, 'New Submission', 1, 10, 'newsubmission', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-building-home');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (22, 'Committed Submissions', 1, 10, 'committedsubmissions', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-building-home');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (23, 'Validation Results', 1, 10, 'report.htm', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-misc-piechart');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (24, 'Get most recent', 23, 10, 'getmostrecent', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (25, 'Get by timestamp', 23, 10, 'getbytimestamp', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (26, 'Get last run', 23, 10, 'getlastrun', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (27, 'Get based on dates', 23, 10, 'getbasedondate', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (28, 'Register data', 1, 10, 'report.htm', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-misc-piechart');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (29, 'Lab', 28, 10, 'registerlab', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (30, 'Blueprint', 28, 10, 'registerblueprint', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (31, 'Layer', 28, 10, 'registerlayer', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (32, 'Timeslot', 28, 10, 'registertimeslot', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (33, 'Blueprint Instance', 28, 10, 'registerblueprintinstance', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (34, 'Unregister data', 1, 10, 'report.htm', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-misc-piechart');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (35, 'Lab', 34, 10, 'unregisterlab', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (36, 'Blueprint', 34, 10, 'unregisterblueprint', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (37, 'Layer', 34, 10, 'unregisterlayer', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (38, 'Blueprint Instance', 34, 10, 'unregisterblueprintinstance', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (39, 'Modify data', 1, 10, 'report.htm', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-misc-piechart');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (40, 'Lab', 39, 10, 'modifylab', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (41, 'Blueprint Instance', 39, 10, 'modifyblueprintinstance', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (42, 'Get data', 1, 10, 'report.htm', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-misc-piechart');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (43, 'Lab', 42, 10, 'getlabs', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (44, 'Blueprints', 42, 10, 'getblueprints', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (45, 'Layers', 42, 10, 'getlayers', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (46, 'Timeslots', 42, 10, 'gettimeslots', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (47, 'Blueprint Instances', 42, 10, 'getblueprintinstances', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (48, 'Create User', 1, 10, 'createuser', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-building-home');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (21, 'New Submission', 1, 10, 'newsubmission', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-building-home');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (22, 'Committed Submissions', 1, 10, 'committedsubmissions', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-building-home');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (23, 'Validation Results', 1, 10, 'report.htm', 'menu_customer', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-misc-piechart');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (24, 'Get most recent', 23, 10, 'getmostrecent', 'menu_customer', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (25, 'Get by timestamp', 23, 10, 'getbytimestamp', 'menu_customer', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (26, 'Get last run', 23, 10, 'getlastrun', 'menu_customer', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (27, 'Get based on dates', 23, 10, 'getbasedondate', 'menu_customer', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (28, 'Register data', 1, 10, 'report.htm', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-misc-piechart');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (29, 'Lab', 28, 10, 'registerlab', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (30, 'Blueprint', 28, 10, 'registerblueprint', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (31, 'Layer', 28, 10, 'registerlayer', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (32, 'Timeslot', 28, 10, 'registertimeslot', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (33, 'Blueprint Instance', 28, 10, 'registerblueprintinstance', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (34, 'Unregister data', 1, 10, 'report.htm', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-misc-piechart');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (35, 'Lab', 34, 10, 'unregisterlab', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (36, 'Blueprint', 34, 10, 'unregisterblueprint', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (37, 'Layer', 34, 10, 'unregisterlayer', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (38, 'Blueprint Instance', 34, 10, 'unregisterblueprintinstance', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (39, 'Modify data', 1, 10, 'report.htm', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-misc-piechart');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (40, 'Lab', 39, 10, 'modifylab', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (41, 'Blueprint Instance', 39, 10, 'modifyblueprintinstance', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (42, 'Get data', 1, 10, 'report.htm', 'menu_customer', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-misc-piechart');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (43, 'Lab', 42, 10, 'getlabs', 'menu_customer', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (44, 'Blueprints', 42, 10, 'getblueprints', 'menu_customer', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (45, 'Layers', 42, 10, 'getlayers', 'menu_customer', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (46, 'Timeslots', 42, 10, 'gettimeslots', 'menu_customer', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (47, 'Blueprint Instances', 42, 10, 'getblueprintinstances', 'menu_customer', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (48, 'Users', 1, 10, 'report.htm', 'menu_admin', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-misc-piechart');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (49, 'Create User', 48, 10, 'createuser', 'menu_admin', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-building-home');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (50, 'Reset User', 48, 10, 'resetuser', 'menu_admin', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-building-home');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (51, 'Get Users', 48, 10, 'getuser', 'menu_admin', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-building-home');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (52, 'Update password', 1, 10, 'updatepassword', 'menu_customer', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-misc-piechart');
 
 -- fn_user
 Insert into fn_user (USER_ID,ORG_ID,MANAGER_ID,FIRST_NAME,MIDDLE_NAME,LAST_NAME,PHONE,FAX,CELLULAR,EMAIL,ADDRESS_ID,ALERT_METHOD_CD,HRID,ORG_USER_ID,ORG_CODE,LOGIN_ID,LOGIN_PWD,LAST_LOGIN_DATE,ACTIVE_YN,CREATED_ID,CREATED_DATE,MODIFIED_ID,MODIFIED_DATE,IS_INTERNAL_YN,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE_CD,ZIP_CODE,COUNTRY_CD,LOCATION_CLLI,ORG_MANAGER_USERID,COMPANY,DEPARTMENT_NAME,JOB_TITLE,TIMEZONE,DEPARTMENT,BUSINESS_UNIT,BUSINESS_UNIT_NAME,COST_CENTER,FIN_LOC_CODE,SILO_STATUS) values (1,null,null,'admin',null,null,null,null,null,null,null,null,null,'admin',null,'admin','admin_password',null,'Y',null,NOW(),1,NOW(),'N',null,null,null,null,null,null,null,null,null,null,null,10,null,null,null,null,null,null);
-Insert into fn_user (USER_ID,ORG_ID,MANAGER_ID,FIRST_NAME,MIDDLE_NAME,LAST_NAME,PHONE,FAX,CELLULAR,EMAIL,ADDRESS_ID,ALERT_METHOD_CD,HRID,ORG_USER_ID,ORG_CODE,LOGIN_ID,LOGIN_PWD,LAST_LOGIN_DATE,ACTIVE_YN,CREATED_ID,CREATED_DATE,MODIFIED_ID,MODIFIED_DATE,IS_INTERNAL_YN,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE_CD,ZIP_CODE,COUNTRY_CD,LOCATION_CLLI,ORG_MANAGER_USERID,COMPANY,DEPARTMENT_NAME,JOB_TITLE,TIMEZONE,DEPARTMENT,BUSINESS_UNIT,BUSINESS_UNIT_NAME,COST_CENTER,FIN_LOC_CODE,SILO_STATUS) values (2,null,null,'akraino',null,null,null,null,null,null,null,null,null,'akraino',null,'akraino','akraino_password',null,'Y',null,NOW(),1,NOW(),'N',null,null,null,null,null,null,null,null,null,null,null,10,null,null,null,null,null,null);
 
 -- fn_app
 Insert into fn_app (APP_ID,APP_NAME,APP_IMAGE_URL,APP_DESCRIPTION,APP_NOTES,APP_URL,APP_ALTERNATE_URL,APP_REST_ENDPOINT,ML_APP_NAME,ML_APP_ADMIN_ID,MOTS_ID,APP_PASSWORD,OPEN,ENABLED,THUMBNAIL,APP_USERNAME,UEB_KEY,UEB_SECRET,UEB_TOPIC_NAME) VALUES (1,'Default',null,'Some Default Description','Some Default Note',null,null,null,'ECPP','?','1','JuCerIRKt/faEcx8QdgncLEEv+IOZjpHe7Pi5DEPqKs=','N','N',null,'Default',null,null,'ECOMP-PORTAL-INBOX');
 
 -- fn_user_role
 Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (1,1,null,1);
-Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (2,17,null,1);
 
 commit;
index fbc7b21..b208564 100644 (file)
@@ -16,7 +16,7 @@
 
 SET FOREIGN_KEY_CHECKS=1;
 
-use akraino;
+use akraino_bluvalui;
 
 DROP TABLE IF EXISTS w_robot_test_result;
 DROP TABLE IF EXISTS validation_test_result;
index 6f8419e..549d81f 100644 (file)
@@ -16,7 +16,7 @@
 
 SET FOREIGN_KEY_CHECKS=1;
 
-use akraino;
+use akraino_bluvalui;
 
 insert into lab (id, lab, silo) values(1, 'att', 'att-blu-val');
 
index 3e39f70..d69dbd2 100644 (file)
@@ -14,7 +14,7 @@
 
     <groupId>org.akraino.validation</groupId>
     <artifactId>ui</artifactId>
-    <version>0.4.1-SNAPSHOT</version>
+    <version>0.4.4-SNAPSHOT</version>
     <name>Bluval UI Maven Webapp</name>
     <packaging>war</packaging>
 
index 85265c0..c4a92c0 100644 (file)
@@ -115,8 +115,8 @@ public class ExternalAppConfig extends AppConfig implements Configurable {
             dataSource.setDriverClass(SystemProperties.getProperty(SystemProperties.DB_DRIVER));
             dataSource.setJdbcUrl("jdbc:mysql://" + System.getenv("DB_IP_PORT") + "/"
                     + PortalApiProperties.getProperty("akraino_database_name"));
-            dataSource.setUser(SystemProperties.getProperty(SystemProperties.DB_USERNAME));
-            String password = System.getenv("MYSQL_AKRAINO_PASSWORD");
+            dataSource.setUser(System.getenv("MYSQL_USER"));
+            String password = System.getenv("MYSQL_PASSWORD");
             if (SystemProperties.containsProperty(SystemProperties.DB_ENCRYPT_FLAG)) {
                 String encryptFlag = SystemProperties.getProperty(SystemProperties.DB_ENCRYPT_FLAG);
                 if (encryptFlag != null && encryptFlag.equalsIgnoreCase("true")) {
@@ -169,7 +169,7 @@ public class ExternalAppConfig extends AppConfig implements Configurable {
     @Override
     public void addInterceptors(InterceptorRegistry registry) {
         super.setExcludeUrlPathsForSessionTimeout("/login_external", "*/login_external.htm", "login", "/login.htm",
-                "/api*", "/single_signon.htm", "/single_signon", "logout", "/logout.htm");
+                "/api*", "/single_signon.htm", "/single_signon", "logout", "/logout.htm", "/process_csp");
         super.addInterceptors(registry);
     }
 
index e93c25b..0520f58 100644 (file)
@@ -74,19 +74,21 @@ public class UiInitializer {
 
     @EventListener(ContextRefreshedEvent.class)
     public void setHttpProperties() throws NoSuchAlgorithmException, KeyManagementException {
-        SSLContext sslContext = SSLContext.getInstance("SSL");
-        sslContext.init(null, this.trustAll, new java.security.SecureRandom());
-        HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());
-        // Install the all-trusting host verifier
-        HttpsURLConnection.setDefaultHostnameVerifier(this.hostnameVerifier);
-        DefaultClientConfig config = new DefaultClientConfig();
-        Map<String, Object> properties = config.getProperties();
-        HTTPSProperties httpsProperties = new HTTPSProperties((str, sslSession) -> true, sslContext);
-        properties.put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, httpsProperties);
+        if (System.getenv("TRUST_ALL") != null && System.getenv("TRUST_ALL").equals("true")) {
+            SSLContext sslContext = SSLContext.getInstance("SSL");
+            sslContext.init(null, this.trustAll, new java.security.SecureRandom());
+            HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());
+            // Install the all-trusting host verifier
+            HttpsURLConnection.setDefaultHostnameVerifier(this.hostnameVerifier);
+            DefaultClientConfig config = new DefaultClientConfig();
+            Map<String, Object> properties = config.getProperties();
+            HTTPSProperties httpsProperties = new HTTPSProperties((str, sslSession) -> true, sslContext);
+            properties.put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, httpsProperties);
+        }
     }
 
     @EventListener(ContextRefreshedEvent.class)
-    public void updateUsers() throws RuntimeException, IOException, CipherUtilException {
+    public void updateAdminUser() throws RuntimeException, IOException, CipherUtilException {
         User admin = null;
         List<User> users = userService.findAllActive();
         for (User user : users) {
@@ -97,20 +99,11 @@ public class UiInitializer {
         if (admin == null) {
             throw new RuntimeException("Admin user does not exist");
         }
-        admin.setLoginPwd(CipherUtil.encryptPKC(System.getenv("UI_ADMIN_PASSWORD"), System.getenv("ENCRYPTION_KEY")));
-        userService.saveUser(admin);
-        User akraino = null;
-        for (User user : users) {
-            if (user.getLoginId().equals("akraino")) {
-                akraino = user;
-            }
-        }
-        if (akraino == null) {
-            throw new RuntimeException("Akraino user does not exist");
+        if (admin.getLoginPwd().equals("admin_password")) {
+            admin.setLoginPwd(
+                    CipherUtil.encryptPKC(System.getenv("UI_ADMIN_PASSWORD"), System.getenv("ENCRYPTION_KEY")));
+            userService.saveUser(admin);
         }
-        akraino.setLoginPwd(
-                CipherUtil.encryptPKC(System.getenv("UI_AKRAINO_PASSWORD"), System.getenv("ENCRYPTION_KEY")));
-        userService.saveUser(akraino);
     }
 
 }
index 2ae1c4f..4fa7b04 100644 (file)
@@ -20,6 +20,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 import org.onap.portalsdk.core.controller.RestrictedBaseController;
 import org.springframework.stereotype.Controller;
@@ -179,6 +180,29 @@ public class ModelsViewsController extends RestrictedBaseController {
         return new ModelAndView(defaultViewName);
     }
 
+    @RequestMapping(value = { "/process_csp" }, method = RequestMethod.GET)
+    public ModelAndView processCsp(HttpServletRequest request, HttpServletResponse response) throws Exception {
+        return new ModelAndView("redirect:login.htm?redirectUrl=" + request.getParameter("redirectUrl"));
+    }
+
+    @RequestMapping(value = { "/resetuser" }, method = RequestMethod.GET)
+    public ModelAndView resetUser(HttpServletRequest request) {
+        final String defaultViewName = null;
+        return new ModelAndView(defaultViewName);
+    }
+
+    @RequestMapping(value = { "/getuser" }, method = RequestMethod.GET)
+    public ModelAndView getUser(HttpServletRequest request) {
+        final String defaultViewName = null;
+        return new ModelAndView(defaultViewName);
+    }
+
+    @RequestMapping(value = { "/updatepassword" }, method = RequestMethod.GET)
+    public ModelAndView updatePassword(HttpServletRequest request) {
+        final String defaultViewName = null;
+        return new ModelAndView(defaultViewName);
+    }
+
     @RequestMapping(value = { "/logout.htm" }, method = RequestMethod.GET)
     public ModelAndView login() {
         Map<String, Object> model = new HashMap<>();
index 552ae94..e1755e3 100644 (file)
@@ -22,6 +22,7 @@ import java.util.List;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
+import org.akraino.validation.ui.data.UserData;
 import org.onap.portalsdk.core.controller.RestrictedBaseController;
 import org.onap.portalsdk.core.domain.Role;
 import org.onap.portalsdk.core.domain.User;
@@ -55,26 +56,84 @@ public class UserController extends RestrictedBaseController {
         super();
     }
 
+    @RequestMapping(value = { "/" }, method = RequestMethod.GET)
+    public ResponseEntity<List<User>> getUsers() {
+        try {
+            return new ResponseEntity<>(userService.findAllActive(), HttpStatus.OK);
+        } catch (Exception e) {
+            LOGGER.error(EELFLoggerDelegate.errorLogger,
+                    "Error when trying to get users. " + UserUtils.getStackTrace(e));
+        }
+        return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+    }
+
     @RequestMapping(value = { "/" }, method = RequestMethod.POST)
-    public ResponseEntity<User> createUser(@RequestBody User user) {
+    public ResponseEntity<Boolean> updateUser(@RequestBody User user) {
         try {
-            return new ResponseEntity<>(createUser(user.getFirstName(), user.getLoginId(), user.getLoginPwd()),
-                    HttpStatus.OK);
+            User actualUser = null;
+            List<User> actualUsers = userService.findAllActive();
+            for (User tempUser : actualUsers) {
+                if (tempUser.getLoginId().equals(user.getLoginId())) {
+                    actualUser = tempUser;
+                }
+            }
+            if (actualUser == null) {
+                throw new RuntimeException("User does not exist");
+            }
+            actualUser.setLoginPwd(CipherUtil.encryptPKC(user.getLoginPwd(), System.getenv("ENCRYPTION_KEY")));
+            userService.saveUser(actualUser);
+            return new ResponseEntity<>(true, HttpStatus.OK);
+        } catch (Exception e) {
+            LOGGER.error(EELFLoggerDelegate.errorLogger, "Update of user failed. " + UserUtils.getStackTrace(e));
+            return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+        }
+    }
+
+    @RequestMapping(value = { "/create" }, method = RequestMethod.POST)
+    public ResponseEntity<User> postUser(@RequestBody UserData userData) {
+        try {
+            return new ResponseEntity<>(createUser(userData.getUser(), userData.getRole()), HttpStatus.OK);
+        } catch (Exception e) {
+            LOGGER.error(EELFLoggerDelegate.errorLogger, "Creation of user failed. " + UserUtils.getStackTrace(e));
+            return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+        }
+    }
+
+    @RequestMapping(value = { "/updatepassword" }, method = RequestMethod.POST)
+    public ResponseEntity<Boolean> updatePassword(@RequestBody UserData userData) {
+        try {
+            User actualUser = null;
+            List<User> actualUsers = userService.findAllActive();
+            for (User tempUser : actualUsers) {
+                if (tempUser.getLoginId().equals(userData.getUser().getLoginId())) {
+                    actualUser = tempUser;
+                }
+            }
+            if (actualUser == null) {
+                throw new RuntimeException("User does not exist");
+            }
+            if (!CipherUtil.decryptPKC(actualUser.getLoginPwd(), System.getenv("ENCRYPTION_KEY"))
+                    .equals(userData.getUser().getLoginPwd())) {
+                throw new RuntimeException("Wrong password");
+            }
+            actualUser.setLoginPwd(CipherUtil.encryptPKC(userData.getNewPwd(), System.getenv("ENCRYPTION_KEY")));
+            userService.saveUser(actualUser);
+            return new ResponseEntity<>(true, HttpStatus.OK);
         } catch (Exception e) {
             LOGGER.error(EELFLoggerDelegate.errorLogger, "Creation of user failed. " + UserUtils.getStackTrace(e));
             return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
         }
     }
 
-    private User createUser(String firstName, String loginId, String loginPwd) throws IOException, CipherUtilException {
+    private User createUser(User user, String roleName) throws IOException, CipherUtilException {
         User newUser = new User();
         newUser.setActive(true);
         newUser.setCreated(new Date());
-        newUser.setFirstName(firstName);
+        newUser.setFirstName(user.getFirstName());
         newUser.setInternal(false);
-        newUser.setLoginId(loginId);
-        newUser.setOrgUserId(loginId);
-        newUser.setLoginPwd(CipherUtil.encryptPKC(loginPwd, System.getenv("ENCRYPTION_KEY")));
+        newUser.setLoginId(user.getLoginId());
+        newUser.setOrgUserId(user.getLoginId());
+        newUser.setLoginPwd(CipherUtil.encryptPKC(user.getLoginPwd(), System.getenv("ENCRYPTION_KEY")));
         newUser.setModified(new Date());
         newUser.setModifiedId(1L);
         newUser.setOnline(true);
@@ -83,13 +142,13 @@ public class UserController extends RestrictedBaseController {
         Role actualRole = null;
         List<Role> roles = roleService.getActiveRoles(null);
         for (Role role : roles) {
-            if (role.getName().equals("Blueprint Validation UI user")) {
+            if (role.getName().equals(roleName)) {
                 actualRole = role;
                 break;
             }
         }
         if (actualRole == null) {
-            throw new RuntimeException("Blueprint Validation UI user role does not exist");
+            throw new RuntimeException("User role does not exist");
         }
         SortedSet<Role> actualRoles = new TreeSet<Role>();
         actualRoles.add(actualRole);
diff --git a/ui/src/main/java/org/akraino/validation/ui/data/UserData.java b/ui/src/main/java/org/akraino/validation/ui/data/UserData.java
new file mode 100644 (file)
index 0000000..6a770a7
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+package org.akraino.validation.ui.data;
+
+import org.onap.portalsdk.core.domain.User;
+
+public class UserData {
+
+    private User user;
+
+    private String role;
+
+    private String newPwd;
+
+    public UserData() {
+
+    }
+
+    public User getUser() {
+        return this.user;
+    }
+
+    public void setUser(User user) {
+        this.user = user;
+    }
+
+    public String getRole() {
+        return this.role;
+    }
+
+    public void setRole(String role) {
+        this.role = role;
+    }
+
+    public String getNewPwd() {
+        return this.newPwd;
+    }
+
+    public void setNewPwd(String newPwd) {
+        this.newPwd = newPwd;
+    }
+
+}
index ea14483..bebc35a 100644 (file)
@@ -65,6 +65,7 @@ public class LoginStrategyImpl extends LoginStrategy {
         LoginBean commandBean = new LoginBean();
         String loginId = request.getParameter("loginId");
         String password = request.getParameter("password");
+        String redirectUrl = request.getParameter("redirectUrl");
         commandBean.setLoginId(loginId);
         commandBean.setLoginPwd(password);
         commandBean.setUserid(loginId);
@@ -77,15 +78,25 @@ public class LoginStrategyImpl extends LoginStrategy {
                     : "login.error.external.invalid";
             Map<String, String> model = new HashMap<>();
             model.put("error", loginErrorMessage);
-            return new ModelAndView("login_external", "model", model);
+            if (redirectUrl == null || redirectUrl.equals("")) {
+                return new ModelAndView("login_external", "model", model);
+            } else {
+                return new ModelAndView(
+                        "redirect:login_external.htm?redirectUrl=" + request.getParameter("redirectUrl"));
+            }
         } else {
             // store the currently logged in user's information in the session
             UserUtils.setUserSession(request, commandBean.getUser(), commandBean.getMenu(),
                     commandBean.getBusinessDirectMenu(),
                     SystemProperties.getProperty(SystemProperties.LOGIN_METHOD_BACKDOOR), roleFunctionList);
             initateSessionMgtHandler(request);
-            // user has been authenticated, now take them to the welcome page
-            return new ModelAndView("redirect:welcome.htm");
+            // user has been authenticated, now take them to the welcome or redirection page
+            if (redirectUrl == null || redirectUrl.equals("")) {
+                return new ModelAndView("redirect:welcome.htm");
+            } else {
+                return new ModelAndView("redirect:"
+                        + redirectUrl.substring(redirectUrl.lastIndexOf("/bluvalui/") + 10, redirectUrl.length()));
+            }
         }
     }
 
@@ -97,6 +108,7 @@ public class LoginStrategyImpl extends LoginStrategy {
         LoginBean commandBean = new LoginBean();
         String loginId = request.getParameter("loginId");
         String password = request.getParameter("password");
+        String redirectUrl = request.getParameter("redirectUrl");
         commandBean.setLoginId(loginId);
         commandBean.setLoginPwd(password);
         commandBean.setUserid(loginId);
@@ -113,15 +125,25 @@ public class LoginStrategyImpl extends LoginStrategy {
                                 : "login.error.external.invalid";
                         Map<String, String> model = new HashMap<>();
                         model.put("error", loginErrorMessage);
-                        return new ModelAndView("login_external", "model", model);
+                        if (redirectUrl == null || redirectUrl.equals("")) {
+                            return new ModelAndView("login_external", "model", model);
+                        } else {
+                            return new ModelAndView(
+                                    "redirect:login_external.htm?redirectUrl=" + request.getParameter("redirectUrl"));
+                        }
             } else {
                 // store the currently logged in user's information in the session
                 UserUtils.setUserSession(request, commandBean.getUser(), commandBean.getMenu(),
                         commandBean.getBusinessDirectMenu(),
                         SystemProperties.getProperty(SystemProperties.LOGIN_METHOD_BACKDOOR), roleFunctionList);
                 initateSessionMgtHandler(request);
-                // user has been authenticated, now take them to the welcome page
-                return new ModelAndView("redirect:welcome");
+                // user has been authenticated, now take them to the welcome or redirection page
+                if (redirectUrl == null || redirectUrl.equals("")) {
+                    return new ModelAndView("redirect:welcome.htm");
+                } else {
+                    return new ModelAndView("redirect:"
+                            + redirectUrl.substring(redirectUrl.lastIndexOf("/bluvalui/") + 10, redirectUrl.length()));
+                }
             }
         } catch (CipherUtilException e) {
             LOGGER.error(EELFLoggerDelegate.errorLogger, "Error in Cipher." + UserUtils.getStackTrace(e));
@@ -130,8 +152,13 @@ public class LoginStrategyImpl extends LoginStrategy {
                     commandBean.getBusinessDirectMenu(),
                     SystemProperties.getProperty(SystemProperties.LOGIN_METHOD_BACKDOOR), roleFunctionList);
             initateSessionMgtHandler(request);
-            // user has been authenticated, now take them to the welcome page
-            return new ModelAndView("redirect:welcome");
+            // user has been authenticated, now take them to the welcome or redirection page
+            if (redirectUrl == null || redirectUrl.equals("")) {
+                return new ModelAndView("redirect:welcome.htm");
+            } else {
+                return new ModelAndView("redirect:"
+                        + redirectUrl.substring(redirectUrl.lastIndexOf("/bluvalui/") + 10, redirectUrl.length()));
+            }
         }
     }
 
index 8269919..d870e02 100644 (file)
@@ -56,7 +56,7 @@ use_rest_for_functional_menu=true
 portal.api.impl.class = org.onap.portalapp.service.OnBoardingApiServiceImpl
 
 # URL of the Portal where this app is onboarded
-ecomp_redirect_url =
+ecomp_redirect_url = https://bluval.akraino.org:8443/bluvalui/
 
 # URL of the ECOMP Portal REST API
 ecomp_rest_url = http://portal.onap.org:50580/ecompportal/auxapi
@@ -70,7 +70,7 @@ ueb_listeners_enable = false
 ueb_app_key = REPLACE-ME-UEB-APP-KEY-EPSDK-APP-OS
 
 # Name of the akraino database
-akraino_database_name = akraino
+akraino_database_name = akraino_bluvalui
 
 # Nexus URL
 nexus_url = https://nexus.akraino.org/content/sites/logs
index 0a4930f..0ab13fc 100644 (file)
@@ -78,8 +78,9 @@ instance_uuid=8da691c9-987d-43ed-a358-00ac2f35685d
 # Application base URL has the host and app context only; a proper prefix of the on-boarded URL.
 # Only required for applications using FE/BE separation.  For example:
 # app_base_url = https://www.onap.org/app_context/
+app_base_url = https://bluval.akraino.org:8443/bluvalui
 
 #authenticate user server
 authenticate_user_server=http://todo_enter_auth_server_hostname:8383/openid-connect-server-webapp/allUsers
 #cookie domain
-cookie_domain = onap.org
\ No newline at end of file
+cookie_domain =
\ No newline at end of file
index dd5296e..1ee22e9 100644 (file)
     <definition name="createuser"
         template="/app/BluvalUI/CreateUser/CreateUser.html" />
 
+    <definition name="resetuser"
+        template="/app/BluvalUI/ResetUser/ResetUser.html" />
+
+    <definition name="getuser"
+        template="/app/BluvalUI/GetUser/GetUser.html" />
+
+    <definition name="updatepassword"
+        template="/app/BluvalUI/UpdatePassword/UpdatePassword.html" />
+
 </tiles-definitions>
index b1554a7..3730375 100644 (file)
@@ -99,6 +99,7 @@ limitations under the License.
                 style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;" maxlength="30">
             <br />
             <br />
+            <input type="hidden" id="redirectUrl" name="redirectUrl" value="${param.redirectUrl}">
             <input id="loginBtn" type="submit" alt="Login" value="Login">
         </form>
     </div>
index a007d05..7861541 100644 (file)
@@ -99,6 +99,7 @@ limitations under the License.
                 style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;" maxlength="30">
             <br />
             <br />
+            <input type="hidden" id="redirectUrl" name="redirectUrl" value="${param.redirectUrl}">
             <input id="loginBtn" type="submit" alt="Login" value="Login">
         </form>
     </div>
index 91a4b50..3485dd9 100644 (file)
@@ -26,11 +26,13 @@ app
                         $scope.definedLoginId = '';
                         $scope.definedFirstName = '';
                         $scope.definedLoginPwd = '';
+                        $scope.roles = [ 'TSC', 'Lab Owner' ];
                     }
 
                     $scope.register = function() {
                         if (!$scope.definedLoginId || !$scope.definedFirstName
-                                || !$scope.definedLoginPwd) {
+                                || !$scope.definedLoginPwd
+                                || !$scope.selectedRole) {
                             confirm("You must specify all data fields");
                             return;
                         }
@@ -39,10 +41,14 @@ app
                             "loginPwd" : $scope.definedLoginPwd,
                             "firstName" : $scope.definedFirstName
                         };
+                        var userData = {
+                            "user" : userInfo,
+                            "role" : $scope.selectedRole
+                        };
                         restAPISvc
                                 .postRestAPI(
-                                        "/api/v1/user/",
-                                        userInfo,
+                                        "/api/v1/user/create",
+                                        userData,
                                         function(data) {
                                             if (data) {
                                                 var confirmText = "The user has been registered successfully. User id:"
index e601725..898648c 100644 (file)
@@ -37,7 +37,19 @@ limitations under the License.
         <div class="Column">
             <div class="form-row">
                 <label for="textinputID-3a">Define login
-                    password: </label> <input ng-model="definedLoginPwd"</input>
+                    password: </label> <input type="password"
+                    ng-model="definedLoginPwd"</input>
+            </div>
+        </div>
+        <br>
+
+        <div>
+            <div class="form-row">
+                <label for="textinputID-3a">Define user role: </label> <select
+                    ng-model="selectedRole"
+                    ng-change="selectedRoleChange()"
+                    ng-options="y for y in roles">
+                </select>
             </div>
         </div>
         <br>
diff --git a/ui/src/main/webapp/app/BluvalUI/GetUser/GetUser.html b/ui/src/main/webapp/app/BluvalUI/GetUser/GetUser.html
new file mode 100644 (file)
index 0000000..d04f161
--- /dev/null
@@ -0,0 +1,179 @@
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+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.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Get User</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+    href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+    href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/styles/ecomp.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+    src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+    src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+    src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script src="app/BluvalUI/GetUser/GetUser.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script src="app/BluvalUI/GetUser/GetUserController.js"></script>
+<script src="app/BluvalUI/GetUser/Route.js"></script>
+
+<style>
+.controls {
+    margin-bottom: 20px;
+}
+
+.page-header {
+    margin-top: 20px;
+}
+
+ul {
+    list-style: none;
+}
+
+.box {
+    height: 100%;
+    border: 1px solid #ccc;
+    background-color: #fff;
+    position: relative;
+    overflow: hidden;
+}
+
+.box-header {
+    background-color: #eee;
+    padding: 0px 0px 0px 0px;
+    margin-bottom: -25px;
+    cursor: move;
+    position: relative;
+}
+
+.box-header h3 {
+    margin-top: 0px;
+    display: inline-block;
+}
+
+.box-content {
+    padding: 10px;
+    display: block;
+    height: 100%;
+    position: relative;
+    overflow-x: auto;
+    overflow-y: auto;
+}
+
+.box-header-btns {
+    top: 15px;
+    right: 10px;
+    cursor: pointer;
+    position: absolute;
+}
+
+.gridster {
+    border: none;
+    position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+    border: none;
+    display: block;
+}
+
+.box table tr {
+    line-height: 20px;
+}
+
+.box table th {
+    border: none;
+    line-height: 20px;
+}
+
+.menu-container {
+    margin-top: 0px
+}
+
+.handle-e {
+    width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="GetUser">
+    <div ds2-Header class="header-container"></div>
+    <div ds2-menu id="menuContainer" class="menu-container"></div>
+    <div ng-view id="rightContentProfile" class="content-container"></div>
+    <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/ui/src/main/webapp/app/BluvalUI/GetUser/GetUser.js b/ui/src/main/webapp/app/BluvalUI/GetUser/GetUser.js
new file mode 100644 (file)
index 0000000..7cf5eb7
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+var appDS2 = angular.module("GetUser", [ 'ngRoute', 'ngMessages',
+        'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+        'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
diff --git a/ui/src/main/webapp/app/BluvalUI/GetUser/GetUserController.js b/ui/src/main/webapp/app/BluvalUI/GetUser/GetUserController.js
new file mode 100644 (file)
index 0000000..fafcd66
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+var app = angular.module('GetUser');
+app.controller('GetUserController', function($scope, restAPISvc) {
+
+    initialize();
+
+    function initialize() {
+        $scope.loadingUsers = true;
+        $scope.userInfos = [];
+        restAPISvc.getRestAPI("/api/v1/user/", function(data) {
+            if (data) {
+                $scope.userInfos = data;
+            } else {
+                confirm("No users found");
+            }
+            $scope.loadingUsers = false;
+        });
+    }
+
+});
diff --git a/ui/src/main/webapp/app/BluvalUI/GetUser/GetUserTemplate.html b/ui/src/main/webapp/app/BluvalUI/GetUser/GetUserTemplate.html
new file mode 100644 (file)
index 0000000..7b8176d
--- /dev/null
@@ -0,0 +1,74 @@
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+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.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+    <style>
+ul.ul-role {
+    list-style: none;
+    padding-left: 0;
+    margin-top: 25px;
+}
+
+li.li-role {
+    border: 1px solid black;
+    display: inline-block;
+    padding: 5px 10px;
+    margin-right: 5px;
+    margin-bottom: 5px;
+    text-transform: capitalize;
+}
+</style>
+    <div>
+        <h1 class="heading-page">Get User</h1>
+
+        <div ng-show="loadingUsers">
+            <img src=" static/fusion/images/giphy.gif" />
+        </div>
+
+        <h2 class="heading-small"></h2>
+        <table class="table table-striped table-bordered">
+            <thead>
+                <tr style="background-color: grey;">
+                    <th class>Id&nbsp;</th>
+                    <th class>Login Id&nbsp;</th>
+                    <th class>First name&nbsp;</th>
+                    <th class>Role(s):&nbsp;</th>
+                </tr>
+            </thead>
+            <tbody>
+                <tr class="border_bottom"
+                    ng-repeat="userInfo in userInfos">
+                    <td class
+                        style="padding-left: 10px; font-size: 15px; width: 13%;">
+                        {{ userInfo.id }}</td>
+                    <td class
+                        style="padding-left: 10px; font-size: 15px; width: 13%;">
+                        {{ userInfo.loginId }}</td>
+                    <td class
+                        style="padding-left: 10px; font-size: 15px; width: 13%;">{{
+                        userInfo.firstName }}</td>
+                    <td class
+                        style="padding-left: 10px; font-size: 15px; width: 13%;">
+                        <ul class="ul-role">
+                            <li ng-repeat="role in userInfo.roles"
+                                class="li-role">{{role.name}}</li>
+                        </ul>
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+</div>
diff --git a/ui/src/main/webapp/app/BluvalUI/GetUser/Route.js b/ui/src/main/webapp/app/BluvalUI/GetUser/Route.js
new file mode 100644 (file)
index 0000000..ff82745
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+appDS2.config(function($routeProvider) {
+    $routeProvider.otherwise({
+        templateUrl : 'app/BluvalUI/GetUser/GetUserTemplate.html',
+        controller : "GetUserController"
+    });
+});
\ No newline at end of file
diff --git a/ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUser.html b/ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUser.html
new file mode 100644 (file)
index 0000000..34573d5
--- /dev/null
@@ -0,0 +1,179 @@
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+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.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Reset User</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+    href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+    href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/styles/ecomp.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+    src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+    src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+    src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script src="app/BluvalUI/ResetUser/ResetUser.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script src="app/BluvalUI/ResetUser/ResetUserController.js"></script>
+<script src="app/BluvalUI/ResetUser/Route.js"></script>
+
+<style>
+.controls {
+    margin-bottom: 20px;
+}
+
+.page-header {
+    margin-top: 20px;
+}
+
+ul {
+    list-style: none;
+}
+
+.box {
+    height: 100%;
+    border: 1px solid #ccc;
+    background-color: #fff;
+    position: relative;
+    overflow: hidden;
+}
+
+.box-header {
+    background-color: #eee;
+    padding: 0px 0px 0px 0px;
+    margin-bottom: -25px;
+    cursor: move;
+    position: relative;
+}
+
+.box-header h3 {
+    margin-top: 0px;
+    display: inline-block;
+}
+
+.box-content {
+    padding: 10px;
+    display: block;
+    height: 100%;
+    position: relative;
+    overflow-x: auto;
+    overflow-y: auto;
+}
+
+.box-header-btns {
+    top: 15px;
+    right: 10px;
+    cursor: pointer;
+    position: absolute;
+}
+
+.gridster {
+    border: none;
+    position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+    border: none;
+    display: block;
+}
+
+.box table tr {
+    line-height: 20px;
+}
+
+.box table th {
+    border: none;
+    line-height: 20px;
+}
+
+.menu-container {
+    margin-top: 0px
+}
+
+.handle-e {
+    width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="ResetUser">
+    <div ds2-Header class="header-container"></div>
+    <div ds2-menu id="menuContainer" class="menu-container"></div>
+    <div ng-view id="rightContentProfile" class="content-container"></div>
+    <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUser.js b/ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUser.js
new file mode 100644 (file)
index 0000000..a716a82
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+var appDS2 = angular.module("ResetUser", [ 'ngRoute', 'ngMessages',
+        'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+        'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
diff --git a/ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUserController.js b/ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUserController.js
new file mode 100644 (file)
index 0000000..99bbd1e
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+var app = angular.module('ResetUser');
+app.controller('ResetUserController', function($scope, restAPISvc) {
+
+    initialize();
+
+    function initialize() {
+        $scope.definedLoginId = '';
+        $scope.definedNewLoginPwd = '';
+    }
+
+    $scope.register = function() {
+        if (!$scope.definedLoginId || !$scope.definedNewLoginPwd) {
+            confirm("You must specify all data fields");
+            return;
+        }
+        var userInfo = {
+            "loginId" : $scope.definedLoginId,
+            "loginPwd" : $scope.definedNewLoginPwd
+        };
+        restAPISvc.postRestAPI("/api/v1/user/", userInfo, function(data) {
+            if (data) {
+                var confirmText = "The user has been reset successfully.";
+                confirm(confirmText);
+            } else {
+                confirm("Error when resetting the user");
+            }
+            initialize();
+        });
+    }
+});
diff --git a/ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUserTemplate.html b/ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUserTemplate.html
new file mode 100644 (file)
index 0000000..a9c7dd1
--- /dev/null
@@ -0,0 +1,45 @@
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+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.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+    <div>
+        <h1 class="heading-page">Reset User</h1>
+
+        <div class="Column">
+            <div class="form-row">
+                <label for="textinputID-3a">Define login id: </label> <input
+                    ng-model="definedLoginId"</input>
+            </div>
+        </div>
+        <br>
+
+        <div class="Column">
+            <div class="form-row">
+                <label for="textinputID-3a">Define new password:
+                </label> <input type="password" ng-model="definedNewLoginPwd"</input>
+            </div>
+        </div>
+        <br>
+
+        <div class="fn-ebz-container"
+            style="position: relative; top: 25px;">
+            <button href="javascript:void(0)" id="addbtn"
+                style="bottom: -17px;" size="small"
+                att-accessibility-click="13,32"
+                class="btn btn-alt btn-small" ng-click="register();">Reset</button>
+        </div>
+    </div>
+</div>
diff --git a/ui/src/main/webapp/app/BluvalUI/ResetUser/Route.js b/ui/src/main/webapp/app/BluvalUI/ResetUser/Route.js
new file mode 100644 (file)
index 0000000..fad2de0
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+appDS2.config(function($routeProvider) {
+    $routeProvider.otherwise({
+        templateUrl : 'app/BluvalUI/ResetUser/ResetUserTemplate.html',
+        controller : "ResetUserController"
+    });
+});
\ No newline at end of file
diff --git a/ui/src/main/webapp/app/BluvalUI/UpdatePassword/Route.js b/ui/src/main/webapp/app/BluvalUI/UpdatePassword/Route.js
new file mode 100644 (file)
index 0000000..41fe928
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+appDS2
+        .config(function($routeProvider) {
+            $routeProvider
+                    .otherwise({
+                        templateUrl : 'app/BluvalUI/UpdatePassword/UpdatePasswordTemplate.html',
+                        controller : "UpdatePasswordController"
+                    });
+        });
\ No newline at end of file
diff --git a/ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePassword.html b/ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePassword.html
new file mode 100644 (file)
index 0000000..a6b56e6
--- /dev/null
@@ -0,0 +1,179 @@
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+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.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Update Password</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+    href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+    href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+    href="app/fusion/styles/ecomp.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+    src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+    src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+    src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script src="app/BluvalUI/UpdatePassword/UpdatePassword.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script src="app/BluvalUI/UpdatePassword/UpdatePasswordController.js"></script>
+<script src="app/BluvalUI/UpdatePassword/Route.js"></script>
+
+<style>
+.controls {
+    margin-bottom: 20px;
+}
+
+.page-header {
+    margin-top: 20px;
+}
+
+ul {
+    list-style: none;
+}
+
+.box {
+    height: 100%;
+    border: 1px solid #ccc;
+    background-color: #fff;
+    position: relative;
+    overflow: hidden;
+}
+
+.box-header {
+    background-color: #eee;
+    padding: 0px 0px 0px 0px;
+    margin-bottom: -25px;
+    cursor: move;
+    position: relative;
+}
+
+.box-header h3 {
+    margin-top: 0px;
+    display: inline-block;
+}
+
+.box-content {
+    padding: 10px;
+    display: block;
+    height: 100%;
+    position: relative;
+    overflow-x: auto;
+    overflow-y: auto;
+}
+
+.box-header-btns {
+    top: 15px;
+    right: 10px;
+    cursor: pointer;
+    position: absolute;
+}
+
+.gridster {
+    border: none;
+    position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+    border: none;
+    display: block;
+}
+
+.box table tr {
+    line-height: 20px;
+}
+
+.box table th {
+    border: none;
+    line-height: 20px;
+}
+
+.menu-container {
+    margin-top: 0px
+}
+
+.handle-e {
+    width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="UpdatePassword">
+    <div ds2-Header class="header-container"></div>
+    <div ds2-menu id="menuContainer" class="menu-container"></div>
+    <div ng-view id="rightContentProfile" class="content-container"></div>
+    <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePassword.js b/ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePassword.js
new file mode 100644 (file)
index 0000000..f0d0e6b
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+var appDS2 = angular.module("UpdatePassword", [ 'ngRoute', 'ngMessages',
+        'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+        'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
diff --git a/ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePasswordController.js b/ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePasswordController.js
new file mode 100644 (file)
index 0000000..8493b2d
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+var app = angular.module('UpdatePassword');
+app
+        .controller(
+                'UpdatePasswordController',
+                function($scope, restAPISvc) {
+
+                    initialize();
+
+                    function initialize() {
+                        $scope.definedLoginId = '';
+                        $scope.definedOldLoginPwd = '';
+                        $scope.definedNewLoginPwd = '';
+                    }
+
+                    $scope.register = function() {
+                        if (!$scope.definedLoginId
+                                || !$scope.definedOldLoginPwd
+                                || !$scope.definedNewLoginPwd) {
+                            confirm("You must specify all data fields");
+                            return;
+                        }
+                        var userInfo = {
+                            "loginId" : $scope.definedLoginId,
+                            "loginPwd" : $scope.definedOldLoginPwd
+                        };
+                        var userData = {
+                            "user" : userInfo,
+                            "newPwd" : $scope.definedNewLoginPwd
+                        };
+
+                        restAPISvc
+                                .postRestAPI(
+                                        "/api/v1/user/updatepassword",
+                                        userData,
+                                        function(data) {
+                                            if (data) {
+                                                var confirmText = "The password has been updated successfully.";
+                                                confirm(confirmText);
+                                            } else {
+                                                confirm("Error when updating the password");
+                                            }
+                                            initialize();
+                                        });
+                    }
+                });
diff --git a/ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePasswordTemplate.html b/ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePasswordTemplate.html
new file mode 100644 (file)
index 0000000..312b3fa
--- /dev/null
@@ -0,0 +1,53 @@
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+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.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+    <div>
+        <h1 class="heading-page">Update password</h1>
+
+        <div class="Column">
+            <div class="form-row">
+                <label for="textinputID-3a">Define login id: </label> <input
+                    ng-model="definedLoginId"</input>
+            </div>
+        </div>
+        <br>
+
+        <div class="Column">
+            <div class="form-row">
+                <label for="textinputID-3a">Define old password:
+                </label> <input type="password" ng-model="definedOldLoginPwd"</input>
+            </div>
+        </div>
+        <br>
+
+        <div class="Column">
+            <div class="form-row">
+                <label for="textinputID-3a">Define new password:
+                </label> <input type="password" ng-model="definedNewLoginPwd"</input>
+            </div>
+        </div>
+        <br>
+
+        <div class="fn-ebz-container"
+            style="position: relative; top: 25px;">
+            <button href="javascript:void(0)" id="addbtn"
+                style="bottom: -17px;" size="small"
+                att-accessibility-click="13,32"
+                class="btn btn-alt btn-small" ng-click="register();">Update</button>
+        </div>
+    </div>
+</div>