From 0a46c82e91de6d98c02bd67f70f024bd95751a64 Mon Sep 17 00:00:00 2001 From: Ioakeim Samaras Date: Thu, 3 Oct 2019 16:26:17 +0300 Subject: [PATCH] [UI] Handling users and passwords The UI does not reset passwords on startup. Also, only the admin user is created during startup. Then, new users can be created by the admin. Moreover, 3 level of privileges are supported, namely admin, tsc and lab owner. Finally, the admin user is enabled to reset users. JIRA: VAL-62 Signed-off-by: Ioakeim Samaras Change-Id: Ie799c5b7eedf557855cccdc5a60395ec074ac381 --- .coafile | 5 +- docker/README.rst | 3 +- docker/mysql/deploy.sh | 2 +- docker/ui/deploy.sh | 10 +- ui/CHANGELOG.md | 9 ++ ui/README.rst | 13 +- ui/db-scripts/EcompSdkDDLMySql_2_4_Common.sql | 4 +- ui/db-scripts/EcompSdkDDLMySql_2_4_OS.sql | 2 +- ui/db-scripts/EcompSdkDMLMySql_2_4_Common.sql | 10 +- ui/db-scripts/EcompSdkDMLMySql_2_4_OS.sql | 64 ++++---- ui/db-scripts/akraino_blueprint_validation_db.sql | 2 +- ui/db-scripts/examples/initialize_db_example.sql | 2 +- ui/pom.xml | 2 +- .../akraino/validation/ui/conf/UiInitializer.java | 19 +-- .../ui/controller/ModelsViewsController.java | 18 +++ .../validation/ui/controller/UserController.java | 79 +++++++-- .../org/akraino/validation/ui/data/UserData.java | 56 +++++++ ui/src/main/resources/portal.properties | 2 +- ui/src/main/webapp/WEB-INF/defs/definitions.xml | 9 ++ .../BluvalUI/CreateUser/CreateUserController.js | 12 +- .../BluvalUI/CreateUser/CreateUserTemplate.html | 14 +- .../main/webapp/app/BluvalUI/GetUser/GetUser.html | 179 +++++++++++++++++++++ ui/src/main/webapp/app/BluvalUI/GetUser/GetUser.js | 19 +++ .../app/BluvalUI/GetUser/GetUserController.js | 35 ++++ .../app/BluvalUI/GetUser/GetUserTemplate.html | 74 +++++++++ ui/src/main/webapp/app/BluvalUI/GetUser/Route.js | 22 +++ .../webapp/app/BluvalUI/ResetUser/ResetUser.html | 179 +++++++++++++++++++++ .../webapp/app/BluvalUI/ResetUser/ResetUser.js | 19 +++ .../app/BluvalUI/ResetUser/ResetUserController.js | 46 ++++++ .../app/BluvalUI/ResetUser/ResetUserTemplate.html | 45 ++++++ ui/src/main/webapp/app/BluvalUI/ResetUser/Route.js | 22 +++ .../webapp/app/BluvalUI/UpdatePassword/Route.js | 24 +++ .../BluvalUI/UpdatePassword/UpdatePassword.html | 179 +++++++++++++++++++++ .../app/BluvalUI/UpdatePassword/UpdatePassword.js | 19 +++ .../UpdatePassword/UpdatePasswordController.js | 61 +++++++ .../UpdatePassword/UpdatePasswordTemplate.html | 53 ++++++ 36 files changed, 1225 insertions(+), 88 deletions(-) create mode 100644 ui/src/main/java/org/akraino/validation/ui/data/UserData.java create mode 100644 ui/src/main/webapp/app/BluvalUI/GetUser/GetUser.html create mode 100644 ui/src/main/webapp/app/BluvalUI/GetUser/GetUser.js create mode 100644 ui/src/main/webapp/app/BluvalUI/GetUser/GetUserController.js create mode 100644 ui/src/main/webapp/app/BluvalUI/GetUser/GetUserTemplate.html create mode 100644 ui/src/main/webapp/app/BluvalUI/GetUser/Route.js create mode 100644 ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUser.html create mode 100644 ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUser.js create mode 100644 ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUserController.js create mode 100644 ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUserTemplate.html create mode 100644 ui/src/main/webapp/app/BluvalUI/ResetUser/Route.js create mode 100644 ui/src/main/webapp/app/BluvalUI/UpdatePassword/Route.js create mode 100644 ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePassword.html create mode 100644 ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePassword.js create mode 100644 ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePasswordController.js create mode 100644 ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePasswordTemplate.html diff --git a/.coafile b/.coafile index 8ade5f5..50e636c 100644 --- 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 diff --git a/docker/README.rst b/docker/README.rst index 74f362d..9ddbc27 100644 --- a/docker/README.rst +++ b/docker/README.rst @@ -176,7 +176,6 @@ 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 Note that, for a functional UI, the following prerequisites are needed: @@ -193,7 +192,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_AKRAINO_PASSWORD=akraino_password ENCRYPTION_KEY=AGADdG4D04BKm2IxIWEr8o== UI_ADMIN_PASSWORD=admin The kube-conformance container ============================== diff --git a/docker/mysql/deploy.sh b/docker/mysql/deploy.sh index 4184912..7357cd1 100755 --- a/docker/mysql/deploy.sh +++ b/docker/mysql/deploy.sh @@ -62,5 +62,5 @@ 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 --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_bluvalui" -e MYSQL_USER="akraino" -e MYSQL_PASSWORD="$MYSQL_AKRAINO_PASSWORD" $IMAGE sleep 10 diff --git a/docker/ui/deploy.sh b/docker/ui/deploy.sh index faab064..8e782c6 100755 --- a/docker/ui/deploy.sh +++ b/docker/ui/deploy.sh @@ -35,7 +35,6 @@ JENKINS_PROXY="" CERTDIR=$(pwd) ENCRYPTION_KEY="" UI_ADMIN_PASSWORD="" -UI_AKRAINO_PASSWORD="" for ARGUMENT in "$@" do @@ -58,7 +57,6 @@ do CERTDIR) CERTDIR=${VALUE} ;; ENCRYPTION_KEY) ENCRYPTION_KEY=${VALUE} ;; UI_ADMIN_PASSWORD) UI_ADMIN_PASSWORD=${VALUE} ;; - UI_AKRAINO_PASSWORD) UI_AKRAINO_PASSWORD=${VALUE} ;; *) esac done @@ -87,12 +85,8 @@ 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 +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" $IMAGE sleep 10 diff --git a/ui/CHANGELOG.md b/ui/CHANGELOG.md index 0125a8e..0e73fa8 100644 --- a/ui/CHANGELOG.md +++ b/ui/CHANGELOG.md @@ -224,3 +224,12 @@ All notable changes to this project will be documented in this file. - 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 diff --git a/ui/README.rst b/ui/README.rst index 822808f..e8051f4 100644 --- a/ui/README.rst +++ b/ui/README.rst @@ -176,7 +176,7 @@ 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). +Currently, one user is supported by the UI, namely admin (full privileges). Its password is initialized during UI deployment (refer to UI deployment section). This password can be modified using the UI. Furthermore, more users can be created/modified using the UI. In order to build and deploy the image using only the required parameters, the below instructions should be followed: @@ -288,7 +288,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 +306,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 +322,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'); @@ -409,7 +409,6 @@ 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 So, for a functional UI, the following prerequisites are needed: @@ -421,9 +420,9 @@ Then, the following commands can be executed in order to deploy the UI container .. code-block:: console cd ../docker/ui - ./deploy.sh TAG_PRE=dev-ui DB_IP_PORT= MYSQL_AKRAINO_PASSWORD= ENCRYPTION_KEY= UI_ADMIN_PASSWORD= UI_AKRAINO_PASSWORD= + ./deploy.sh TAG_PRE=dev-ui DB_IP_PORT= MYSQL_AKRAINO_PASSWORD= ENCRYPTION_KEY= UI_ADMIN_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=='. +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'. Note that the symbol '=' is not recognized. 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). diff --git a/ui/db-scripts/EcompSdkDDLMySql_2_4_Common.sql b/ui/db-scripts/EcompSdkDDLMySql_2_4_Common.sql index ebc838f..2be4d76 100644 --- a/ui/db-scripts/EcompSdkDDLMySql_2_4_Common.sql +++ b/ui/db-scripts/EcompSdkDDLMySql_2_4_Common.sql @@ -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 -- diff --git a/ui/db-scripts/EcompSdkDDLMySql_2_4_OS.sql b/ui/db-scripts/EcompSdkDDLMySql_2_4_OS.sql index 4a35dd6..b1e5c7c 100644 --- a/ui/db-scripts/EcompSdkDDLMySql_2_4_OS.sql +++ b/ui/db-scripts/EcompSdkDDLMySql_2_4_OS.sql @@ -5,7 +5,7 @@ SET FOREIGN_KEY_CHECKS=1; -USE akraino; +USE akraino_bluvalui; -- No additional tables required at this time diff --git a/ui/db-scripts/EcompSdkDMLMySql_2_4_Common.sql b/ui/db-scripts/EcompSdkDMLMySql_2_4_Common.sql index bf18eab..69146dd 100644 --- a/ui/db-scripts/EcompSdkDMLMySql_2_4_Common.sql +++ b/ui/db-scripts/EcompSdkDMLMySql_2_4_Common.sql @@ -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 diff --git a/ui/db-scripts/EcompSdkDMLMySql_2_4_OS.sql b/ui/db-scripts/EcompSdkDMLMySql_2_4_OS.sql index 0497529..6168ae4 100644 --- a/ui/db-scripts/EcompSdkDMLMySql_2_4_OS.sql +++ b/ui/db-scripts/EcompSdkDMLMySql_2_4_OS.sql @@ -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; diff --git a/ui/db-scripts/akraino_blueprint_validation_db.sql b/ui/db-scripts/akraino_blueprint_validation_db.sql index fbc7b21..b208564 100644 --- a/ui/db-scripts/akraino_blueprint_validation_db.sql +++ b/ui/db-scripts/akraino_blueprint_validation_db.sql @@ -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; diff --git a/ui/db-scripts/examples/initialize_db_example.sql b/ui/db-scripts/examples/initialize_db_example.sql index 6f8419e..549d81f 100644 --- a/ui/db-scripts/examples/initialize_db_example.sql +++ b/ui/db-scripts/examples/initialize_db_example.sql @@ -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'); diff --git a/ui/pom.xml b/ui/pom.xml index 357c073..e0be1e0 100644 --- a/ui/pom.xml +++ b/ui/pom.xml @@ -14,7 +14,7 @@ org.akraino.validation ui - 0.4.2-SNAPSHOT + 0.4.3-SNAPSHOT Bluval UI Maven Webapp war diff --git a/ui/src/main/java/org/akraino/validation/ui/conf/UiInitializer.java b/ui/src/main/java/org/akraino/validation/ui/conf/UiInitializer.java index e93c25b..0052040 100644 --- a/ui/src/main/java/org/akraino/validation/ui/conf/UiInitializer.java +++ b/ui/src/main/java/org/akraino/validation/ui/conf/UiInitializer.java @@ -86,7 +86,7 @@ public class UiInitializer { } @EventListener(ContextRefreshedEvent.class) - public void updateUsers() throws RuntimeException, IOException, CipherUtilException { + public void updateAdminUser() throws RuntimeException, IOException, CipherUtilException { User admin = null; List users = userService.findAllActive(); for (User user : users) { @@ -97,20 +97,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); } } diff --git a/ui/src/main/java/org/akraino/validation/ui/controller/ModelsViewsController.java b/ui/src/main/java/org/akraino/validation/ui/controller/ModelsViewsController.java index db75754..4fa7b04 100644 --- a/ui/src/main/java/org/akraino/validation/ui/controller/ModelsViewsController.java +++ b/ui/src/main/java/org/akraino/validation/ui/controller/ModelsViewsController.java @@ -185,6 +185,24 @@ public class ModelsViewsController extends RestrictedBaseController { 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 model = new HashMap<>(); diff --git a/ui/src/main/java/org/akraino/validation/ui/controller/UserController.java b/ui/src/main/java/org/akraino/validation/ui/controller/UserController.java index 552ae94..e1755e3 100644 --- a/ui/src/main/java/org/akraino/validation/ui/controller/UserController.java +++ b/ui/src/main/java/org/akraino/validation/ui/controller/UserController.java @@ -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> 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 createUser(@RequestBody User user) { + public ResponseEntity updateUser(@RequestBody User user) { try { - return new ResponseEntity<>(createUser(user.getFirstName(), user.getLoginId(), user.getLoginPwd()), - HttpStatus.OK); + User actualUser = null; + List 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 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 updatePassword(@RequestBody UserData userData) { + try { + User actualUser = null; + List 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 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 actualRoles = new TreeSet(); 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 index 0000000..6a770a7 --- /dev/null +++ b/ui/src/main/java/org/akraino/validation/ui/data/UserData.java @@ -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; + } + +} diff --git a/ui/src/main/resources/portal.properties b/ui/src/main/resources/portal.properties index cdc5496..d870e02 100644 --- a/ui/src/main/resources/portal.properties +++ b/ui/src/main/resources/portal.properties @@ -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 diff --git a/ui/src/main/webapp/WEB-INF/defs/definitions.xml b/ui/src/main/webapp/WEB-INF/defs/definitions.xml index dd5296e..1ee22e9 100644 --- a/ui/src/main/webapp/WEB-INF/defs/definitions.xml +++ b/ui/src/main/webapp/WEB-INF/defs/definitions.xml @@ -89,4 +89,13 @@ + + + + + + diff --git a/ui/src/main/webapp/app/BluvalUI/CreateUser/CreateUserController.js b/ui/src/main/webapp/app/BluvalUI/CreateUser/CreateUserController.js index 91a4b50..3485dd9 100644 --- a/ui/src/main/webapp/app/BluvalUI/CreateUser/CreateUserController.js +++ b/ui/src/main/webapp/app/BluvalUI/CreateUser/CreateUserController.js @@ -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:" diff --git a/ui/src/main/webapp/app/BluvalUI/CreateUser/CreateUserTemplate.html b/ui/src/main/webapp/app/BluvalUI/CreateUser/CreateUserTemplate.html index e601725..898648c 100644 --- a/ui/src/main/webapp/app/BluvalUI/CreateUser/CreateUserTemplate.html +++ b/ui/src/main/webapp/app/BluvalUI/CreateUser/CreateUserTemplate.html @@ -37,7 +37,19 @@ limitations under the License.
+ password: +
+
+
+ +
+
+

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 index 0000000..d04f161 --- /dev/null +++ b/ui/src/main/webapp/app/BluvalUI/GetUser/GetUser.html @@ -0,0 +1,179 @@ + + + + + + + + + + +Get User + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + \ 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 index 0000000..7cf5eb7 --- /dev/null +++ b/ui/src/main/webapp/app/BluvalUI/GetUser/GetUser.js @@ -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 index 0000000..fafcd66 --- /dev/null +++ b/ui/src/main/webapp/app/BluvalUI/GetUser/GetUserController.js @@ -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 index 0000000..7b8176d --- /dev/null +++ b/ui/src/main/webapp/app/BluvalUI/GetUser/GetUserTemplate.html @@ -0,0 +1,74 @@ + + +
+ +
+

Get User

+ +
+ +
+ +

+ + + + + + + + + + + + + + + + + +
Id Login Id First name Role(s): 
+ {{ userInfo.id }} + {{ userInfo.loginId }}{{ + userInfo.firstName }} +
    +
  • {{role.name}}
  • +
+
+
+
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 index 0000000..ff82745 --- /dev/null +++ b/ui/src/main/webapp/app/BluvalUI/GetUser/Route.js @@ -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 index 0000000..34573d5 --- /dev/null +++ b/ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUser.html @@ -0,0 +1,179 @@ + + + + + + + + + + +Reset User + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + \ 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 index 0000000..a716a82 --- /dev/null +++ b/ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUser.js @@ -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 index 0000000..99bbd1e --- /dev/null +++ b/ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUserController.js @@ -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 index 0000000..a9c7dd1 --- /dev/null +++ b/ui/src/main/webapp/app/BluvalUI/ResetUser/ResetUserTemplate.html @@ -0,0 +1,45 @@ + + +
+
+

Reset User

+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+ +
+
+
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 index 0000000..fad2de0 --- /dev/null +++ b/ui/src/main/webapp/app/BluvalUI/ResetUser/Route.js @@ -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 index 0000000..41fe928 --- /dev/null +++ b/ui/src/main/webapp/app/BluvalUI/UpdatePassword/Route.js @@ -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 index 0000000..a6b56e6 --- /dev/null +++ b/ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePassword.html @@ -0,0 +1,179 @@ + + + + + + + + + + +Update Password + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + \ 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 index 0000000..f0d0e6b --- /dev/null +++ b/ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePassword.js @@ -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 index 0000000..8493b2d --- /dev/null +++ b/ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePasswordController.js @@ -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 index 0000000..312b3fa --- /dev/null +++ b/ui/src/main/webapp/app/BluvalUI/UpdatePassword/UpdatePasswordTemplate.html @@ -0,0 +1,53 @@ + + +
+
+

Update password

+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+ +
+
+
-- 2.16.6