[UI] UI enhancements 16/1116/6
authorIoakeim Samaras <ioakeim.samaras@ericsson.com>
Wed, 3 Jul 2019 11:43:32 +0000 (14:43 +0300)
committerIoakeim Samaras <ioakeim.samaras@ericsson.com>
Mon, 8 Jul 2019 13:11:23 +0000 (16:11 +0300)
- Representation of declarative result
  info
- Re-deployment of db when persistent
  storage already exists
- Searching matching fields should be
  supported in the front-end app
- Loading gif should be displayed when
  the front-end apps is trying to receive results
- Deletion of submissions should be disabled

JIRA: VAL-37

Signed-off-by: Ioakeim Samaras <ioakeim.samaras@ericsson.com>
Change-Id: Ie140cd595543790c90ab60d50288cc825bd07a6b

25 files changed:
.coafile
docker/README.rst
docker/mariadb/Dockerfile
docker/mariadb/deploy.sh
docker/mariadb/deploy_with_existing_persistent_storage.sh [new file with mode: 0755]
ui/CHANGELOG.md
ui/README.rst
ui/db-scripts/EcompSdkDMLMySql_2_4_Common.sql
ui/db-scripts/EcompSdkDMLMySql_2_4_OS.sql
ui/db-scripts/akraino-blueprint_validation_db.sql [deleted file]
ui/db-scripts/akraino_blueprint_validation_db.sql [new file with mode: 0644]
ui/pom.xml
ui/src/main/java/org/akraino/validation/ui/client/jenkins/resources/CrumbResponse.java
ui/src/main/java/org/akraino/validation/ui/client/jenkins/resources/QueueJobItem.java
ui/src/main/java/org/akraino/validation/ui/client/nexus/NexusExecutorClient.java
ui/src/main/java/org/akraino/validation/ui/client/nexus/resources/Kw.java [new file with mode: 0644]
ui/src/main/java/org/akraino/validation/ui/client/nexus/resources/RobotTestResult.java
ui/src/main/java/org/akraino/validation/ui/client/nexus/resources/Test.java [new file with mode: 0644]
ui/src/main/java/org/akraino/validation/ui/controller/SubmissionController.java
ui/src/main/webapp/app/AECBlueprintValidationUI/CommittedSubmissions/AECCommittedSubmissionsController.js
ui/src/main/webapp/app/AECBlueprintValidationUI/CommittedSubmissions/CommittedSubmissionsTemplate.html
ui/src/main/webapp/app/AECBlueprintValidationUI/GetBySubmissionId/AECGetBySubmissionIdController.js
ui/src/main/webapp/app/AECBlueprintValidationUI/GetBySubmissionId/GetBySubmissionIdTemplate.html
ui/src/main/webapp/app/AECBlueprintValidationUI/NewSubmission/AECNewSubmissionController.js
ui/src/main/webapp/static/fusion/images/giphy.gif [new file with mode: 0644]

index 0514a52..5096c4b 100644 (file)
--- a/.coafile
+++ b/.coafile
@@ -51,7 +51,9 @@ ignore = ui/target/**,
     ui/src/main/java/org/akraino/validation/ui/conf/ExternalAppInitializer.java,
     ui/src/main/java/org/akraino/validation/ui/scheduler/RegistryAdapter.java,
     ui/src/main/java/org/akraino/validation/ui/conf/ExternalAppConfig.java,
-    ui/src/main/java/org/akraino/validation/ui/filter/SecurityXssFilter.java
+    ui/src/main/java/org/akraino/validation/ui/filter/SecurityXssFilter.java,
+    ui/src/main/java/org/akraino/validation/ui/client/jenkins/resources/**.java,
+    ui/src/main/java/org/akraino/validation/ui/client/nexus/resources/**.java
 
 [all.JS]
 bears = ESLintBear,JSComplexityBear
index 5da7288..12c75be 100644 (file)
@@ -108,14 +108,38 @@ TAG_PRE, first part of the image version, default value is mariadb
 TAG_VER, last part of the image version, default value is latest
 MARIADB_HOST_PORT, port on which mariadb is exposed on host, default value is 3307
 
-If you want to deploy the container, you can run this script with the appropriate parameters.
+In order to deploy the container, this script can be executed with the appropriate parameters.
 
-Example (assuming you have used the default variables for building the image using the make command):
+Example (assuming the default variables have been utilized for building the image using the make command):
 
 .. code-block:: console
 
+    cd validation/docker/mariadb
     ./deploy.sh MARIADB_ROOT_PASSWORD=password UI_ADMIN_PASSWORD=admin UI_AKRAINO_PASSWORD=akraino
 
+Also, in order to re-deploy the database (it is assumed that the corresponding mariadb container has been stopped and deleted) while the persistent storage already exists (currently, the directory /var/lib/mariadb of the host is used), a different approach should be used after the image build process.
+
+To this end, another script has been developed, namely deploy_with_existing_storage.sh which easily deploys the container. This script accepts the following items as input parameters:
+
+CONTAINER_NAME, the name of the container, default value is akraino-validation-mariadb
+MARIADB_ROOT_PASSWORD, the desired mariadb root user password, this variable is required
+REGISTRY, the registry of the mariadb image, default value is akraino
+NAME, the name of the mariadb image, default value is validation
+TAG_PRE, the first part of the image version, default value is mariadb
+TAG_VER, the last part of the image version, default value is latest
+MARIADB_HOST_PORT, the port on which mariadb is exposed on host, default value is 3307
+
+In order to deploy the container, this script can be executed with the appropriate parameters.
+
+Example (assuming the default variables have been utilized for building the image using the make command):
+
+.. code-block:: console
+
+    cd validation/docker/mariadb
+    ./deploy_with_existing_persistent_storage.sh MARIADB_ROOT_PASSWORD=password
+
+More info can be found at the UI README file.
+
 The ui container
 ================
 
@@ -138,19 +162,19 @@ Using the container
 -------------------
 In order for the container to be easily created, the deploy.sh script has been developed. This script accepts the following as input parameters:
 
-CONTAINER_NAME, name of the contaner, default value is akraino-validation-ui
+CONTAINER_NAME, the name of the contaner, default value is akraino-validation-ui
 DB_CONNECTION_URL, the URL connection with the akraino database of the maridb instance, this variable is required
-MARIADB_ROOT_PASSWORD, mariadb root user password, this variable is required
-REGISTRY, registry of the mariadb image, default value is akraino
-NAME, name of the mariadb image, default value is validation
-TAG_PRE, first part of the image version, default value is ui
-TAG_VER, last part of the image version, default value is latest
+MARIADB_ROOT_PASSWORD, the mariadb root user password, this variable is required
+REGISTRY, the registry of the mariadb image, default value is akraino
+NAME, the name of the mariadb image, default value is validation
+TAG_PRE, the first part of the image version, default value is ui
+TAG_VER, the last part of the image version, default value is latest
 JENKINS_URL, the URL of the Jenkins instance, this variable is required
 JENKINS_USERNAME, the Jenkins user name, this variable is required
 JENKINS_USER_PASSWORD, the Jenkins user password, this variable is required
 JENKINS_JOB_NAME, the name of Jenkins job capable of executing the blueprint validation tests, this variable is required
-NEXUS_PROXY, the proxy needed in order for the Nexus server to be reachable, default value is none
-JENKINS_PROXY, the proxy needed in order for the Jenkins server to be reachable, default value is none
+NEXUS_PROXY, the needed proxy in order for the Nexus server to be reachable, default value is none
+JENKINS_PROXY, the needed proxy in order for the Jenkins server to be reachable, default value is none
 
 Note that, for a functional UI, the following prerequisites are needed:
 
@@ -158,14 +182,15 @@ Note that, for a functional UI, the following prerequisites are needed:
 - A Jenkins instance capable of running the blueprint validation test
 - A Nexus repo in which all the test results are stored.
 
-Look at the UI README file for more info.
+More info can be found at the UI README file.
 
-If you want to deploy the container, you can run the aforementioned script with the appropriate parameters.
+In order to deploy the container, the aforementioned script can be executed with the appropriate parameters.
 
-Example (assuming you have used the default variables for building the image using the make command):
+Example (assuming the default variables have been utilized for building the image using the make command):
 
 .. code-block:: console
 
+    cd validation/docker/ui
     ./deploy.sh DB_CONNECTION_URL=172.17.0.3:3306/akraino MARIADB_ROOT_PASSWORD=password JENKINS_URL=http://192.168.2.2:8080 JENKINS_USERNAME=name JENKINS_USER_PASSWORD=jenkins_pwd JENKINS_JOB_NAME=job1
 
 The kube-conformance container
index a2a1b19..52a0f52 100644 (file)
@@ -23,4 +23,4 @@ COPY --from=0 /opt/akraino/validation/ui/db-scripts/EcompSdkDDLMySql_2_4_Common.
 COPY --from=0 /opt/akraino/validation/ui/db-scripts/EcompSdkDDLMySql_2_4_OS.sql /docker-entrypoint-initdb.d
 COPY --from=0 /opt/akraino/validation/ui/db-scripts/EcompSdkDMLMySql_2_4_Common.sql /docker-entrypoint-initdb.d
 COPY --from=0 /opt/akraino/validation/ui/db-scripts/EcompSdkDMLMySql_2_4_OS.sql /docker-entrypoint-initdb.d
-COPY --from=0 /opt/akraino/validation/ui/db-scripts/akraino-blueprint_validation_db.sql /docker-entrypoint-initdb.d
+COPY --from=0 /opt/akraino/validation/ui/db-scripts/akraino_blueprint_validation_db.sql /docker-entrypoint-initdb.d
index 12c985c..fec5a2c 100755 (executable)
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# Use this script if the persistent storage does not exist
+
 # Directory on host in where database data will be stored
 HOST_STORAGE_DIR="/var/lib/mariadb"
 # Container name
@@ -68,4 +70,4 @@ fi
 IMAGE="$REGISTRY"/"$NAME":"$TAG_PRE"-"$TAG_VER"
 docker run --detach --name $CONTAINER_NAME --publish $MARIADB_HOST_PORT:3306 --volume $HOST_STORAGE_DIR:/var/lib/mysql -v "/$(pwd)/mariadb.conf:/etc/mysql/conf.d/my.cnf" -e MYSQL_ROOT_PASSWORD="$MARIADB_ROOT_PASSWORD" -e UI_ADMIN_PASSWORD="$UI_ADMIN_PASSWORD" -e UI_AKRAINO_PASSWORD="$UI_AKRAINO_PASSWORD" $IMAGE
 sleep 10
-docker exec $CONTAINER_NAME /bin/bash -c 'sed -i 's/admin_password/'"$UI_ADMIN_PASSWORD"'/g' /docker-entrypoint-initdb.d/EcompSdkDMLMySql_2_4_OS.sql ; sed -i 's/akraino_password/'"$UI_AKRAINO_PASSWORD"'/g' /docker-entrypoint-initdb.d/akraino-blueprint_validation_db.sql; continue=`ps aux | grep mysql` ; while [ -z "$continue" ]; do continue=`ps aux | grep mysql`; sleep 5; done ; sleep 10 ;'
+docker exec $CONTAINER_NAME /bin/bash -c 'sed -i 's/admin_password/'"$UI_ADMIN_PASSWORD"'/g' /docker-entrypoint-initdb.d/EcompSdkDMLMySql_2_4_OS.sql ; sed -i 's/akraino_password/'"$UI_AKRAINO_PASSWORD"'/g' /docker-entrypoint-initdb.d/EcompSdkDMLMySql_2_4_OS.sql; continue=`ps aux | grep mysql` ; while [ -z "$continue" ]; do continue=`ps aux | grep mysql`; sleep 5; done ; sleep 10 ;'
diff --git a/docker/mariadb/deploy_with_existing_persistent_storage.sh b/docker/mariadb/deploy_with_existing_persistent_storage.sh
new file mode 100755 (executable)
index 0000000..a20be5b
--- /dev/null
@@ -0,0 +1,51 @@
+#!/bin/bash
+#
+# Copyright (c) 2019 AT&T Intellectual Property.  All other 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.
+
+# Use this script if the persistent storage already exists and you want to use its data
+
+# Directory on host in where database data are stored
+HOST_STORAGE_DIR="/var/lib/mariadb"
+# Container name
+CONTAINER_NAME="akraino-validation-mariadb"
+# Container input variables
+MARIADB_ROOT_PASSWORD=""
+# Image data
+REGISTRY=akraino
+NAME=validation
+TAG_PRE=mariadb
+TAG_VER=latest
+MARIADB_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} ;;
+            MARIADB_HOST_PORT)    MARIADB_HOST_PORT=${VALUE} ;;
+            MARIADB_ROOT_PASSWORD)    MARIADB_ROOT_PASSWORD=${VALUE} ;;
+            *)
+    esac
+done
+
+IMAGE="$REGISTRY"/"$NAME":"$TAG_PRE"-"$TAG_VER"
+docker run --detach --name $CONTAINER_NAME --publish $MARIADB_HOST_PORT:3306 --volume $HOST_STORAGE_DIR:/var/lib/mysql -v "/$(pwd)/mariadb.conf:/etc/mysql/conf.d/my.cnf" -e MYSQL_ROOT_PASSWORD="$MARIADB_ROOT_PASSWORD" $IMAGE
+sleep 10
+docker exec $CONTAINER_NAME /bin/bash -c 'rm -rf /docker-entrypoint-initdb.d/*.sql'
index beb7192..ac72112 100644 (file)
@@ -95,3 +95,24 @@ All notable changes to this project will be documented in this file.
 - Definition of system architecture removed from the pom.xml
 
 ### Removed
+
+## [0.1.0-SNAPSHOT] - 8 Jule 2019
+### Added
+- Declarative info of the results is now displayed
+- README enhanced in order to display instructions regarding how each docker image can be built independently.
+- A new script, namely validation/docker/mariadb/deploy_with_existing_persistent_storage.sh has been developed in order to deploy the mariadb container when the persistent storage already exists. README files have been updated accordingly.
+- Searching matching fields have been added to the angularJS application
+- The angularJS application displays the submission id received from the back-end system
+- Whenever a new blueprint instance for validation is submitted, the corresponding labels are deleted
+- Scroll up/down feature is supported for the committed submissions
+- Loading gif is displayed while the angularJS application is trying to fetch results
+- Sanity checks in angularJS app
+
+### Changed
+- /db-scripts/akraino-blueprint_validation_db.sql has been renamed to /db-scripts/akraino_blueprint_validation_db.sql
+- User info declaration has been moved from the /db-scripts/akraino-blueprint_validation_db.sql and placed into /db-scripts/EcompSdkDMLMySql_2_4_Common.sql and /db-scripts/EcompSdkDMLMySql_2_4_OS.sql
+- Results can be retrieved only for submissions whose state is 'Completed'
+- README file has been updated to use impersonal phrases
+
+### Removed
+- Deletion of submissions
index afb7c16..eae8f30 100644 (file)
@@ -87,7 +87,7 @@ A mariadb database instance is needed for both modes of the UI with the appropri
 
 The pom.xml file supports the creation of an appropriate docker image for development purposes. The initialization scripts reside under the db-scripts directory.
 
-Also, a script has been developed, namely validation/docker/mariadb/deploy.sh which easily deploys the container. This script accepts the following as input parameters:
+Also, a script has been developed, namely validation/docker/mariadb/deploy.sh which easily deploys the container. This script accepts the following items as input parameters:
 
 CONTAINER_NAME, name of the container, default value is akraino-validation-mariadb
 MARIADB_ROOT_PASSWORD, the desired mariadb root user password, this variable is required
@@ -101,33 +101,57 @@ MARIADB_HOST_PORT, port on which mariadb is exposed on host, default value is 33
 
 Currently, two users are supported for the UI, namely admin (full privileges) and akraino (limited privileges). Their passwords must be defined in the database.
 
-Let's build and deploy the image using only the required parameters.
+In order to build and deploy the image using only the required parameters, the below instructions should be followed:
 
-Configure the mariadb root user password (currently the UI connects to the database using root privileges), the UI admin password and the UI akraino password in the appropriate variables and execute the following commands in order to build and deploy this database container:
+The mariadb root user password (currently the UI connects to the database using root privileges), the UI admin password and the UI akraino password should be configured using the appropriate variables and the following commands should be executed:
 
 .. code-block:: console
 
     cd validation/ui
-    mvn docker:build
+    mvn docker:build -Ddocker.filter=akraino/validation:dev-mariadb-latest
     cd ../docker/mariadb
     ./deploy.sh TAG_PRE=dev-mariadb MARIADB_ROOT_PASSWORD=<root user password> UI_ADMIN_PASSWORD=<UI admin user password> UI_AKRAINO_PASSWORD=<UI akraino user password>
     mysql -p<MARIADB_ROOT_PASSWORD> -uroot -h <IP of the mariadb container> < ../../ui/db-scripts/examples/initialize_db_example.sql
 
-In order to retrieve the IP of the mariadb container, execute the following command:
+In order to retrieve the IP of the mariadb container, the following command should be executed:
 
 .. code-block:: console
 
     docker inspect <name of the mariadb container>
 
-It should be noted that, currently, both images (UI and mariadb) are built using the mvn docker:build command.
+Furthermore, the TAG_PRE variable should be defined because the default value is 'mariadb' (note that the 'dev-mariadb' is used for development purposes - look at pom.xml file).
 
-Furthermore, the TAG_PRE variable should be defined as the default value is 'mariadb' (note that the 'dev-mariadb' is used for development purposes - look at pom.xml file).
+If the database must be re-deployed (it is assumed that the corresponding mariadb container has been stopped and deleted) while the persistent storage already exists (currently, the directory /var/lib/mariadb of the host is used), a different approach should be used after the image build process.
 
-If you want to re-deploy the database, you must first delete the container and the directory on the host machine where data are stored. To this end, execute the following command:
+To this end, another script has been developed, namely validation/docker/mariadb/deploy_with_existing_storage.sh which easily deploys the container. This script accepts the following as input parameters:
+
+CONTAINER_NAME, the name of the container, default value is akraino-validation-mariadb
+MARIADB_ROOT_PASSWORD, the desired mariadb root user password, this variable is required
+REGISTRY, the registry of the mariadb image, default value is akraino
+NAME, the name of the mariadb image, default value is validation
+TAG_PRE, the first part of the image version, default value is mariadb
+TAG_VER, the last part of the image version, default value is latest
+MARIADB_HOST_PORT, the port on which mariadb 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 mariadb root user password (currently the UI connects to the database using root privileges) should be configured using the appropriate variable and the following commands should be executed:
+
+.. code-block:: console
+
+    cd validation/docker/mariadb
+    ./deploy_with_existing_persistent_storage.sh TAG_PRE=dev-mariadb MARIADB_ROOT_PASSWORD=<root user password>
+
+Finally, if the database must be re-deployed (it is assumed that the corresponding mariadb container has been stopped and deleted) and the old persistent storage must be deleted, the directory on the host machine where data is stored 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:
 
 .. code-block:: console
 
-    docker stop <name of the mariadb container> ; docker rm <name of the mariadb container> ; sudo rm -rf /var/lib/mariadb
+    sudo rm -rf /var/lib/mariadb
+    cd validation/docker/mariadb
+    ./deploy.sh TAG_PRE=dev-mariadb MARIADB_ROOT_PASSWORD=<root user password> UI_ADMIN_PASSWORD=<UI admin user password> UI_AKRAINO_PASSWORD=<UI akraino user password>
+    mysql -p<MARIADB_ROOT_PASSWORD> -uroot -h <IP of the mariadb container> < ../../ui/db-scripts/examples/initialize_db_example.sql
 
 In the context of the full control loop mode, the following tables must be initialized with appropriate data:
 
@@ -137,7 +161,7 @@ In the context of the full control loop mode, the following tables must be initi
 - blueprint (here every blueprint owner should register the name of the blueprint)
 - blueprint_instance_for_validation (here every blueprint owner should register the blueprint instances for validation, i.e. version, layer and description of a layer)
 
-The following file can be used for initializing the aforementioned data (as we did in the above example using the 'mysql -p<MARIADB_ROOT_PASSWORD> -uroot -h <IP of the mariadb container> < ../../ui/db-scripts/examples/initialize_db_example.sql' command):
+The following file can be used for initializing the aforementioned data (as it was performed in the above example using the 'mysql -p<MARIADB_ROOT_PASSWORD> -uroot -h <IP of the mariadb container> < ../../ui/db-scripts/examples/initialize_db_example.sql' command):
 
     db-scripts/examples/initialize_db_example.sql
 
@@ -305,21 +329,21 @@ The pom.xml file supports the building of an appropriate container image using t
 
 This script accepts the following as input parameters:
 
-CONTAINER_NAME, name of the contaner, default value is akraino-validation-ui
+CONTAINER_NAME, the name of the contaner, default value is akraino-validation-ui
 DB_CONNECTION_URL, the URL connection with the akraino database of the maridb instance, this variable is required
-MARIADB_ROOT_PASSWORD, mariadb root user password, this variable is required
-REGISTRY, registry of the mariadb image, default value is akraino
-NAME, name of the mariadb image, default value is validation
-TAG_PRE, first part of the image version, default value is ui
-TAG_VER, last part of the image version, default value is latest
+MARIADB_ROOT_PASSWORD, the mariadb root user password, this variable is required
+REGISTRY, the registry of the mariadb image, default value is akraino
+NAME, the name of the mariadb image, default value is validation
+TAG_PRE, the first part of the image version, default value is ui
+TAG_VER, the last part of the image version, default value is latest
 JENKINS_URL, the URL of the Jenkins instance, this variable is required
 JENKINS_USERNAME, the Jenkins user name, this variable is required
 JENKINS_USER_PASSWORD, the Jenkins user password, this variable is required
 JENKINS_JOB_NAME, the name of Jenkins job capable of executing the blueprint validation tests, this variable is required
-NEXUS_PROXY, the proxy needed in order for the Nexus server to be reachable, default value is none
-JENKINS_PROXY, the proxy needed in order for the Jenkins server to be reachable, default value is none
+NEXUS_PROXY, the needed proxy in order for the Nexus server to be reachable, default value is none
+JENKINS_PROXY, the needed proxy in order for the Jenkins server to be reachable, default value is none
 
-Let's build the image using only the required parameters. To this end, the following data is needed:
+In order to build the image using only the required parameters, the following data is needed:
 
 - The mariadb root user password (look at the Database subsection)
 - The URL for connecting to the akraino database of the mariadb
@@ -327,12 +351,12 @@ Let's build the image using only the required parameters. To this end, the follo
 - The Jenkins username and password
 - The name of Jenkins Job
 
-Execute the following commands in order to build and deploy the UI container:
+Then, the following commands can be executed in order to build and deploy the UI container:
 
 .. code-block:: console
 
     cd validation/ui
-    mvn docker:build
+    mvn docker:build -Ddocker.filter=akraino/validation:dev-ui-latest
     cd ../docker/ui
     ./deploy.sh TAG_PRE=dev-ui DB_CONNECTION_URL=<Url in order to connect to akraino database of the mariadb> MARIADB_ROOT_PASSWORD=<mariadb root password> JENKINS_URL=<http://jenkinsIP:port> JENKINS_USERNAME=<Jenkins user> JENKINS_USER_PASSWORD=<Jenkins password> JENKINS_JOB_NAME=<Jenkins job name>
 
@@ -340,7 +364,7 @@ The content of the DB_CONNECTION_URL can be for example 172.17.0.3:3306/akraino
 
 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, just do not define proxy ip and port variables.
+If no proxy exists, the proxy ip and port variables should not be defined.
 
 The UI should be available in the following url:
 
index 611c6f8..bf18eab 100644 (file)
@@ -168,6 +168,7 @@ 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);
 
 -- fn_role_composite
 Insert into fn_role_composite (PARENT_ROLE_ID,CHILD_ROLE_ID) values (1,16);
@@ -202,6 +203,9 @@ 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');
+
 
 -- fn_tab
 Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB2_SUB1_S1','Left Tab 1','Sub - Sub Tab 1 Information','tab2_sub1.htm','menu_tab','Y',10,'TAB2_SUB1','APP');
index 781e8bc..c248b5b 100644 (file)
@@ -26,14 +26,28 @@ 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_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_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 by submission id', 23, 10, 'getBySubmissionId', '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 blueprint name', 23, 10, '', '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 by layer', 23, 10, '', '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 by execution dates', 23, 10, '', '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, 'Get by number of successful runs', 23, 10, '', '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 (29, 'Get by number of successful last runs', 23, 10, '', '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, 'Get by number of failed last runs', 23, 10, '', '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, 'Get all', 23, 10, '', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+
 
 -- 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,'User',null,null,null,'admin@email.com',null,null,null,'admin',null,'admin','admin_password',str_to_date('24-OCT-16','%d-%M-%Y'),'Y',null,str_to_date('17-OCT-16','%d-%M-%Y'),1,str_to_date('24-OCT-16','%d-%M-%Y'),'N',null,null,null,'NJ',null,'US',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,'User',null,null,null,'akraino@email.com',null,null,null,'akraino',null,'akraino','akraino_password',str_to_date('24-OCT-16','%d-%M-%Y'),'Y',null,str_to_date('17-OCT-16','%d-%M-%Y'),1,str_to_date('24-OCT-16','%d-%M-%Y'),'N',null,null,null,'NJ',null,'US',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
deleted file mode 100644 (file)
index c2d7320..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * 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.
- */
-
-SET FOREIGN_KEY_CHECKS=1;
-
-use akraino;
-
-DROP TABLE IF EXISTS submission;
-DROP TABLE IF EXISTS blueprint_instance_for_validation;
-DROP TABLE IF EXISTS blueprint;
-DROP TABLE IF EXISTS silo;
-DROP TABLE IF EXISTS timeslot;
-DROP TABLE IF EXISTS lab;
-
-create table lab (
-   id bigint not NULL AUTO_INCREMENT,
-   lab text not NULL,
-   CONSTRAINT id_pk PRIMARY KEY (id)
-);
-
-create table timeslot (
-   id bigint not NULL AUTO_INCREMENT,
-   start_date_time text,
-   duration text,
-   lab_id bigint not NULL,
-   CONSTRAINT id_pk PRIMARY KEY (id),
-   CONSTRAINT lab_id_fk FOREIGN KEY (lab_id)
-      REFERENCES lab (id) MATCH SIMPLE
-      ON UPDATE NO ACTION ON DELETE NO ACTION
-);
-
-create table silo (
-   id bigint not NULL AUTO_INCREMENT,
-   silo text not NULL,
-   lab_id bigint not NULL,
-   CONSTRAINT id_pk PRIMARY KEY (id),
-   CONSTRAINT lab_id_fk2 FOREIGN KEY (lab_id)
-      REFERENCES lab (id) MATCH SIMPLE
-      ON UPDATE NO ACTION ON DELETE NO ACTION
-);
-
-CREATE TABLE blueprint
-(
-   id bigint not NULL AUTO_INCREMENT,
-   blueprint_name varchar(20) not NULL unique,
-   CONSTRAINT id_pk PRIMARY KEY (id)
-);
-
-CREATE TABLE blueprint_instance_for_validation
-(
-   id bigint not NULL AUTO_INCREMENT,
-   blueprint_id bigint not NULL,
-   version text not NULL,
-   layer text not NULL,
-   layer_description text not NULL,
-   CONSTRAINT id_pk PRIMARY KEY (id),
-   CONSTRAINT blueprint_id_fk FOREIGN KEY (blueprint_id)
-      REFERENCES blueprint (id) MATCH SIMPLE
-      ON UPDATE NO ACTION ON DELETE NO ACTION
-);
-
-CREATE TABLE submission
-(
-   id bigint not NULL AUTO_INCREMENT,
-   status text not NULL,
-   jenkins_queue_job_item_url text,
-   nexus_result_url text,
-   blueprint_instance_for_validation_id bigint not NULL,
-   timeslot_id bigint not NULL,
-   CONSTRAINT id_pk PRIMARY KEY (id),
-   CONSTRAINT blueprint_instance_for_validation_id_fk FOREIGN KEY (blueprint_instance_for_validation_id)
-      REFERENCES blueprint_instance_for_validation (id) MATCH SIMPLE
-      ON UPDATE NO ACTION ON DELETE NO ACTION,
-   CONSTRAINT timeslot_id_fk FOREIGN KEY (timeslot_id)
-      REFERENCES timeslot (id) MATCH SIMPLE
-      ON UPDATE NO ACTION ON DELETE NO ACTION
-);
-
-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_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 by submission id', 23, 10, 'getBySubmissionId', '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 blueprint name', 23, 10, '', '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 by layer', 23, 10, '', '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 by execution dates', 23, 10, '', '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, 'Get by number of successful runs', 23, 10, '', '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 (29, 'Get by number of successful last runs', 23, 10, '', '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, 'Get by number of failed last runs', 23, 10, '', '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, 'Get all', 23, 10, '', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-
--- 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 (2,null,null,'akraino',null,null,null,null,null,null,null,null,null,'akraino',null,'akraino','akraino_password',now(),'Y',null,now(),1,now(),'N',null,null,null,'NJ',null,'US',null,null,null,null,null,10,null,null,null,null,null,null);
-
--- fn_role
-Insert into fn_role (ROLE_ID,ROLE_NAME,ACTIVE_YN,PRIORITY) values (17,'Blueprint Validation UI user','Y',5);
-
--- fn_role_function
-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');
-
--- fn_user_role
-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
new file mode 100644 (file)
index 0000000..06aa4a8
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ */
+
+SET FOREIGN_KEY_CHECKS=1;
+
+use akraino;
+
+DROP TABLE IF EXISTS submission;
+DROP TABLE IF EXISTS blueprint_instance_for_validation;
+DROP TABLE IF EXISTS blueprint;
+DROP TABLE IF EXISTS silo;
+DROP TABLE IF EXISTS timeslot;
+DROP TABLE IF EXISTS lab;
+
+create table lab (
+   id bigint not NULL AUTO_INCREMENT,
+   lab text not NULL,
+   CONSTRAINT id_pk PRIMARY KEY (id)
+);
+
+create table timeslot (
+   id bigint not NULL AUTO_INCREMENT,
+   start_date_time text,
+   duration text,
+   lab_id bigint not NULL,
+   CONSTRAINT id_pk PRIMARY KEY (id),
+   CONSTRAINT lab_id_fk FOREIGN KEY (lab_id)
+      REFERENCES lab (id) MATCH SIMPLE
+      ON UPDATE NO ACTION ON DELETE NO ACTION
+);
+
+create table silo (
+   id bigint not NULL AUTO_INCREMENT,
+   silo text not NULL,
+   lab_id bigint not NULL,
+   CONSTRAINT id_pk PRIMARY KEY (id),
+   CONSTRAINT lab_id_fk2 FOREIGN KEY (lab_id)
+      REFERENCES lab (id) MATCH SIMPLE
+      ON UPDATE NO ACTION ON DELETE NO ACTION
+);
+
+CREATE TABLE blueprint
+(
+   id bigint not NULL AUTO_INCREMENT,
+   blueprint_name varchar(20) not NULL unique,
+   CONSTRAINT id_pk PRIMARY KEY (id)
+);
+
+CREATE TABLE blueprint_instance_for_validation
+(
+   id bigint not NULL AUTO_INCREMENT,
+   blueprint_id bigint not NULL,
+   version text not NULL,
+   layer text not NULL,
+   layer_description text not NULL,
+   CONSTRAINT id_pk PRIMARY KEY (id),
+   CONSTRAINT blueprint_id_fk FOREIGN KEY (blueprint_id)
+      REFERENCES blueprint (id) MATCH SIMPLE
+      ON UPDATE NO ACTION ON DELETE NO ACTION
+);
+
+CREATE TABLE submission
+(
+   id bigint not NULL AUTO_INCREMENT,
+   status text not NULL,
+   jenkins_queue_job_item_url text,
+   nexus_result_url text,
+   blueprint_instance_for_validation_id bigint not NULL,
+   timeslot_id bigint not NULL,
+   CONSTRAINT id_pk PRIMARY KEY (id),
+   CONSTRAINT blueprint_instance_for_validation_id_fk FOREIGN KEY (blueprint_instance_for_validation_id)
+      REFERENCES blueprint_instance_for_validation (id) MATCH SIMPLE
+      ON UPDATE NO ACTION ON DELETE NO ACTION,
+   CONSTRAINT timeslot_id_fk FOREIGN KEY (timeslot_id)
+      REFERENCES timeslot (id) MATCH SIMPLE
+      ON UPDATE NO ACTION ON DELETE NO ACTION
+);
+
+commit;
index 46c647f..e4736ef 100644 (file)
@@ -35,7 +35,7 @@
         <maven-war-plugin-version>2.0.2</maven-war-plugin-version>
         <maven-deploy-plugin-version>2.8</maven-deploy-plugin-version>
         <eelf-core-version>1.0.0</eelf-core-version>
-        <jackson.version>2.8.10</jackson.version>
+        <jackson.version>2.9.9</jackson.version>
         <c3p0.version>0.9.5.2</c3p0.version>
         <io.searchbox.jest.version>2.0.0</io.searchbox.jest.version>
         <javax.servlet-api.version>3.1.0</javax.servlet-api.version>
                 </configuration>
             </plugin>
 
+            <!-- Currently, the docker-maven-plugin is used only for the development mode -->
             <plugin>
                 <groupId>io.fabric8</groupId>
                 <artifactId>docker-maven-plugin</artifactId>
                                 <runCmds>
                                     <!-- must be all on one line; use CDATA
                                         to turn off the Eclipse formatter -->
-                                    <run><![CDATA[mv /maven/db-scripts/EcompSdkDDLMySql_2_4_Common.sql /docker-entrypoint-initdb.d ; mv /maven/db-scripts/EcompSdkDDLMySql_2_4_OS.sql /docker-entrypoint-initdb.d ; mv /maven/db-scripts/EcompSdkDMLMySql_2_4_Common.sql /docker-entrypoint-initdb.d ; mv /maven/db-scripts/EcompSdkDMLMySql_2_4_OS.sql /docker-entrypoint-initdb.d ; mv /maven/db-scripts/akraino-blueprint_validation_db.sql /docker-entrypoint-initdb.d ; rm -fr /maven]]></run>
+                                    <run><![CDATA[mv /maven/db-scripts/EcompSdkDDLMySql_2_4_Common.sql /docker-entrypoint-initdb.d ; mv /maven/db-scripts/EcompSdkDDLMySql_2_4_OS.sql /docker-entrypoint-initdb.d ; mv /maven/db-scripts/EcompSdkDMLMySql_2_4_Common.sql /docker-entrypoint-initdb.d ; mv /maven/db-scripts/EcompSdkDMLMySql_2_4_OS.sql /docker-entrypoint-initdb.d ; mv /maven/db-scripts/akraino_blueprint_validation_db.sql /docker-entrypoint-initdb.d ; rm -fr /maven]]></run>
                                 </runCmds>
                             </build>
                         </image>
index 5cf4518..f7a4eb8 100644 (file)
@@ -1,17 +1,17 @@
 /*
  * 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
+ * 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
+ * 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.
+ * 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.client.jenkins.resources;
 
@@ -24,7 +24,7 @@ import org.codehaus.jackson.map.annotate.JsonSerialize;
 public class CrumbResponse implements IResource {
 
     @JsonProperty("_class")
-    private String classCrumb;
+    private String _class;
 
     @JsonProperty("crumb")
     private String crumb;
@@ -36,12 +36,12 @@ public class CrumbResponse implements IResource {
 
     }
 
-    public String getClassCrumb() {
-        return this.classCrumb;
+    public String get_class() {
+        return this._class;
     }
 
-    public void setClassCrumb(String classCrumb) {
-        this.classCrumb = classCrumb;
+    public void set_class(String _class) {
+        this._class = _class;
     }
 
     public String getCrumb() {
index 9da3891..c5fdd77 100644 (file)
@@ -1,17 +1,17 @@
 /*
  * 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
+ * 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
+ * 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.
+ * 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.client.jenkins.resources;
 
@@ -26,7 +26,7 @@ import org.codehaus.jackson.map.annotate.JsonSerialize;
 public class QueueJobItem implements IResource {
 
     @JsonProperty("_class")
-    private String classQueue;
+    private String _class;
 
     @JsonProperty("executable")
     private Executable executable;
@@ -35,12 +35,12 @@ public class QueueJobItem implements IResource {
 
     }
 
-    public String getClassQueue() {
-        return this.classQueue;
+    public String get_class() {
+        return this._class;
     }
 
-    public void setClassQueue(String classQueue) {
-        this.classQueue = classQueue;
+    public void set_class(String _class) {
+        this._class = _class;
     }
 
     public Executable getExecutable() {
@@ -53,7 +53,7 @@ public class QueueJobItem implements IResource {
 
     public class Executable {
         @JsonProperty("_class")
-        private String classQueue;
+        private String _class;
 
         @JsonProperty("number")
         private Integer number;
@@ -61,12 +61,12 @@ public class QueueJobItem implements IResource {
         @JsonProperty("url")
         private URL url;
 
-        public String getClassQueue() {
-            return this.classQueue;
+        public String get_class() {
+            return this._class;
         }
 
-        public void setClassQueue(String classQueue) {
-            this.classQueue = classQueue;
+        public void set_class(String _class) {
+            this._class = _class;
         }
 
         public Integer getNumber() {
index a0723c8..7ee7239 100644 (file)
@@ -45,6 +45,7 @@ import org.jsoup.nodes.Document;
 import org.jsoup.nodes.Element;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
 import com.fasterxml.jackson.core.JsonParseException;
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.JsonMappingException;
@@ -178,6 +179,8 @@ public final class NexusExecutorClient {
             JSONObject xmlJSONObj = XML.toJSONObject(result);
             ObjectMapper mapper = new ObjectMapper();
             mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
+            mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
+            mapper.setSerializationInclusion(Include.NON_NULL);
             RobotTestResult robotTestResult = mapper.readValue(xmlJSONObj.toString(), RobotTestResult.class);
             robotTestResult.setName(testSuiteName);
             robotTestResults.add(robotTestResult);
diff --git a/ui/src/main/java/org/akraino/validation/ui/client/nexus/resources/Kw.java b/ui/src/main/java/org/akraino/validation/ui/client/nexus/resources/Kw.java
new file mode 100644 (file)
index 0000000..d078bec
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * 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.client.nexus.resources;
+
+import java.util.List;
+
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
+public class Kw {
+    @JsonProperty("name")
+    private String name;
+
+    @JsonProperty("type")
+    private String type;
+
+    @JsonProperty("library")
+    private String library;
+
+    @JsonProperty("doc")
+    private String doc;
+
+    @JsonProperty("status")
+    private Kw.Status status;
+
+    @JsonProperty("kw")
+    private List<Kw> kw;
+
+    public Kw() {
+
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getType() {
+        return this.type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getLibrary() {
+        return this.library;
+    }
+
+    public void setLibrary(String library) {
+        this.library = library;
+    }
+
+    public String getDoc() {
+        return this.doc;
+    }
+
+    public void setDoc(String doc) {
+        this.doc = doc;
+    }
+
+    public Kw.Status getStatus() {
+        return this.status;
+    }
+
+    public void setStatus(Kw.Status status) {
+        this.status = status;
+    }
+
+    public List<Kw> getKw() {
+        return this.kw;
+    }
+
+    public void setKw(List<Kw> kw) {
+        this.kw = kw;
+    }
+
+    public class Status {
+        @JsonProperty("endtime")
+        private String endtime;
+
+        @JsonProperty("starttime")
+        private String starttime;
+
+        @JsonProperty("status")
+        private String status;
+
+        public Status() {
+
+        }
+
+        public String getEndtime() {
+            return this.endtime;
+        }
+
+        public void setEndtime(String endtime) {
+            this.endtime = endtime;
+        }
+
+        public String getStarttime() {
+            return this.starttime;
+        }
+
+        public void setStarttime(String starttime) {
+            this.starttime = starttime;
+        }
+
+        public String getStatus() {
+            return this.status;
+        }
+
+        public void setStatus(String status) {
+            this.status = status;
+        }
+    }
+
+}
index 44ddc56..b604438 100644 (file)
@@ -114,22 +114,28 @@ public class RobotTestResult implements IResource {
             @JsonProperty("status")
             private Suite.Status status;
 
-            @JsonProperty("_id")
-            private String suiteId;
+            @JsonProperty("suite")
+            private Suite.NestedSuite suite;
+
+            @JsonProperty("id")
+            private String id;
 
-            @JsonProperty("_name")
+            @JsonProperty("name")
             private String name;
 
+            @JsonProperty("source")
+            private String source;
+
             public Suite() {
 
             }
 
-            public String getSuiteId() {
-                return this.suiteId;
+            public String getId() {
+                return this.id;
             }
 
-            public void setSuiteId(String suiteId) {
-                this.suiteId = suiteId;
+            public void setId(String id) {
+                this.id = id;
             }
 
             public String getName() {
@@ -140,6 +146,14 @@ public class RobotTestResult implements IResource {
                 this.name = name;
             }
 
+            public String getSource() {
+                return this.source;
+            }
+
+            public void setSource(String source) {
+                this.source = source;
+            }
+
             public Suite.Status getStatus() {
                 return this.status;
             }
@@ -148,45 +162,175 @@ public class RobotTestResult implements IResource {
                 this.status = status;
             }
 
+            public Suite.NestedSuite getSuite() {
+                return this.suite;
+            }
+
+            public void setSuite(Suite.NestedSuite suite) {
+                this.suite = suite;
+            }
+
             public class Status {
-                @JsonProperty("_status")
-                private String statusValue;
+                @JsonProperty("status")
+                private String status;
 
-                @JsonProperty("_starttime")
-                private String startTime;
+                @JsonProperty("starttime")
+                private String starttime;
 
-                @JsonProperty("_endtime")
-                private String endTime;
+                @JsonProperty("endtime")
+                private String endtime;
 
                 public Status() {
 
                 }
 
-                public String getStatusValue() {
-                    return this.statusValue;
+                public String getStatus() {
+                    return this.status;
                 }
 
-                public void setStatusValue(String statusValue) {
-                    this.statusValue = statusValue;
+                public void setStatus(String status) {
+                    this.status = status;
                 }
 
-                public String getStartTime() {
-                    return this.startTime;
+                public String getStarttime() {
+                    return this.starttime;
                 }
 
-                public void setStartTime(String startTime) {
-                    this.startTime = startTime;
+                public void setStarttime(String starttime) {
+                    this.starttime = starttime;
                 }
 
-                public String getEndTime() {
-                    return this.endTime;
+                public String getEndtime() {
+                    return this.endtime;
                 }
 
-                public void setEndTime(String endTime) {
-                    this.endTime = endTime;
+                public void setEndtime(String endtime) {
+                    this.endtime = endtime;
                 }
             }
 
+            public class NestedSuite {
+                @JsonProperty("doc")
+                private String doc;
+
+                @JsonProperty("id")
+                private String id;
+
+                @JsonProperty("name")
+                private String name;
+
+                @JsonProperty("source")
+                private String source;
+
+                @JsonProperty("test")
+                private List<Test> test;
+
+                @JsonProperty("kw")
+                private List<Kw> kw;
+
+                @JsonProperty("status")
+                private NestedSuite.Status status;
+
+                public NestedSuite() {
+
+                }
+
+                public String getDoc() {
+                    return this.doc;
+                }
+
+                public void setDoc(String doc) {
+                    this.doc = doc;
+                }
+
+                public String getId() {
+                    return this.id;
+                }
+
+                public void setId(String id) {
+                    this.id = id;
+                }
+
+                public String getName() {
+                    return this.name;
+                }
+
+                public void setName(String name) {
+                    this.name = name;
+                }
+
+                public String getSource() {
+                    return this.source;
+                }
+
+                public void setSource(String source) {
+                    this.source = source;
+                }
+
+                public List<Test> getTest() {
+                    return this.test;
+                }
+
+                public void setTest(List<Test> test) {
+                    this.test = test;
+                }
+
+                public List<Kw> getKw() {
+                    return this.kw;
+                }
+
+                public void setKw(List<Kw> kw) {
+                    this.kw = kw;
+                }
+
+                public NestedSuite.Status getStatus() {
+                    return this.status;
+                }
+
+                public void setStatus(NestedSuite.Status status) {
+                    this.status = status;
+                }
+
+                public class Status {
+                    @JsonProperty("status")
+                    private String status;
+
+                    @JsonProperty("starttime")
+                    private String starttime;
+
+                    @JsonProperty("endtime")
+                    private String endtime;
+
+                    public Status() {
+
+                    }
+
+                    public String getStatus() {
+                        return this.status;
+                    }
+
+                    public void setStatus(String status) {
+                        this.status = status;
+                    }
+
+                    public String getStarttime() {
+                        return this.starttime;
+                    }
+
+                    public void setStarttime(String starttime) {
+                        this.starttime = starttime;
+                    }
+
+                    public String getEndtime() {
+                        return this.endtime;
+                    }
+
+                    public void setEndtime(String endtime) {
+                        this.endtime = endtime;
+                    }
+
+                }
+            }
         }
 
         public class Statistics {
diff --git a/ui/src/main/java/org/akraino/validation/ui/client/nexus/resources/Test.java b/ui/src/main/java/org/akraino/validation/ui/client/nexus/resources/Test.java
new file mode 100644 (file)
index 0000000..7a9f0c5
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * 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.client.nexus.resources;
+
+import java.util.List;
+
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
+public class Test {
+    @JsonProperty("doc")
+    private String doc;
+
+    @JsonProperty("id")
+    private String id;
+
+    @JsonProperty("name")
+    private String name;
+
+    @JsonProperty("status")
+    private Test.Status status;
+
+    @JsonProperty("kw")
+    private List<Kw> kw;
+
+    public Test() {
+
+    }
+
+    public String getDoc() {
+        return this.doc;
+    }
+
+    public void setDoc(String doc) {
+        this.doc = doc;
+    }
+
+    public String getId() {
+        return this.id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Test.Status getStatus() {
+        return this.status;
+    }
+
+    public void setStatus(Test.Status status) {
+        this.status = status;
+    }
+
+    public List<Kw> getKw() {
+        return this.kw;
+    }
+
+    public void setKw(List<Kw> kw) {
+        this.kw = kw;
+    }
+
+    public class Status {
+        @JsonProperty("status")
+        private String status;
+
+        @JsonProperty("starttime")
+        private String starttime;
+
+        @JsonProperty("endtime")
+        private String endtime;
+
+        @JsonProperty("critical")
+        private String critical;
+
+        @JsonProperty("content")
+        private String content;
+
+        public Status() {
+
+        }
+
+        public String getStatus() {
+            return this.status;
+        }
+
+        public void setStatus(String status) {
+            this.status = status;
+        }
+
+        public String getStarttime() {
+            return this.starttime;
+        }
+
+        public void setStarttime(String starttime) {
+            this.starttime = starttime;
+        }
+
+        public String getEndtime() {
+            return this.endtime;
+        }
+
+        public void setEndtime(String endtime) {
+            this.endtime = endtime;
+        }
+
+        public String getCritical() {
+            return this.critical;
+        }
+
+        public void setCritical(String critical) {
+            this.critical = critical;
+        }
+
+        public String getContent() {
+            return this.content;
+        }
+
+        public void setContent(String content) {
+            this.content = content;
+        }
+    }
+}
index bb898a9..fb6f8e0 100644 (file)
@@ -63,16 +63,4 @@ public class SubmissionController extends RestrictedBaseController {
         return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
     }
 
-    @RequestMapping(value = {"/"}, method = RequestMethod.DELETE)
-    public ResponseEntity<Boolean> deleteSubmission(@RequestBody Submission submission) {
-        try {
-            service.deleteSubmission(submission.getSubmissionId());
-            return new ResponseEntity<>(true, HttpStatus.OK);
-        } catch (Exception e) {
-            LOGGER.error(EELFLoggerDelegate.errorLogger,
-                    "Deletion of submission failed. " + UserUtils.getStackTrace(e));
-        }
-        return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
-    }
-
 }
index 538793e..27d4a14 100644 (file)
@@ -19,8 +19,6 @@ var app = angular.module('AECCommittedSubmissions');
 app.controller('AECCommittedSubmissionsController', function($scope,
         restAPISvc, $interval, refreshPeriod) {
 
-    $scope.submissionIdList = [];
-
     restAPISvc.getRestAPI("/api/submission/", function(data) {
         $scope.submissions = data;
     });
@@ -31,27 +29,6 @@ app.controller('AECCommittedSubmissionsController', function($scope,
         });
     }
 
-    $scope.modifySubmissionIdList = function(id) {
-        if ($scope.submissionIdList.indexOf(id) === -1) {
-            $scope.submissionIdList.push(id);
-        } else {
-            $scope.submissionIdList.splice($scope.submissionIdList.indexOf(id),
-                    1);
-        }
-    }
-
-    $scope.deleteSubmissions = function() {
-        var confirmation = confirm("Are you sure?");
-        if (confirmation == true) {
-            angular.forEach($scope.submissionIdList, function(id) {
-                var submission = {
-                    "submissionId" : id
-                };
-                restAPISvc.deleteRestAPI("/api/submission/", submission);
-            });
-        }
-    }
-
     $interval(function() {
         $scope.refreshCommittedSubmissions();
     }, refreshPeriod);
index 784810b..b2e3838 100644 (file)
@@ -47,34 +47,25 @@ body {
    Id:</label>
   <div class="form-field form-field__glued pull-left size-onefifth"
    style="float: left; width: 220px; margin-right: 20px;">
-   <input ng-model="submissionId" type="text"
+   <input ng-model="filterSubmission.submissionId" type="text"
     placeholder="Search for submission id?"
     style="margin-top: 5px; width: 220px;">
   </div>
 
-  <label style="float: left; margin-top: 10px; margin-right: 10px;">Blueprint
-   Name:</label>
+  <label style="float: left; margin-top: 10px; margin-right: 10px;">General
+   matching string:</label>
   <div class="form-field form-field__glued pull-left size-onefifth"
    style="float: left; width: 260px; margin-right: 40px;">
-   <input ng-model="blueprintName" type="text"
-    placeholder="Search for a blueprint name?"
+   <input ng-model="filterGeneralMatch" type="text" placeholder="?"
     style="margin-top: 5px; width: 260px;">
-
   </div>
 
   <div style="float: right;">
    <button style="margin-left: 25px; margin-top: 4px;" type="submit"
     class="btn btn-alt btn-small"
     ng-click="refreshCommittedSubmissions();">Refresh</button>
-   <button style="margin-left: 25px; margin-top: 4px;" type="submit"
-    class="btn btn-alt btn-small" ng-click="deleteSubmissions()">Delete
-    selected submissions</button>
-   <button style="margin-left: 25px; margin-top: 4px;" type="submit"
-    class="btn btn-alt btn-small" ng-click="deleteSubmissions()">Delete
-    all submissions</button>
   </div>
 
-
   <div ui-i18n="en"
    class="grid ui-grid ng-isolate-scope grid1560525896761" id="grid1"
    ui-grid="gridOptions" ui-grid-pagination="">
@@ -231,12 +222,61 @@ body {
     min-width: 118px;
     max-width: 118px;
 }
+
+.table-container {
+    display: inline-block;
+    height: 400px;
+    padding-top: 1.875em;
+    position: relative;
+}
+
+.table-container>div {
+    border-color: #888;
+    border-style: solid;
+    border-width: 1px 1px 2px 1px;
+    height: 1.7em;
+    left: 0;
+    position: absolute;
+    right: 0;
+    top: 0;
+}
+
+table {
+    display: block;
+    height: 400px;
+    overflow-y: auto;
+}
+
+th {
+    padding: 0 5px;
+    text-align: center;
+}
+
+th:first-child>div {
+    border-left: none;
+    padding-left: 7px;
+}
+
+th>div {
+    border-left: 2px solid #888;
+    line-height: 1.875em;
+    margin-left: -6px;
+    padding-left: 5px;
+    position: absolute;
+    top: 0;
+}
+
+td {
+    border-color: #888;
+    border-style: solid;
+    border-width: 0 1px 2px 1px;
+    padding: 5px;
+}
 </style>
-   <div class="ui-grid-contents-wrapper">
-    <table cellspacing="0" cellpadding="10" class="siteStatusTable">
+   <div class="table-container">
+    <table cellspacing="0">
      <thead>
       <tr>
-       <th>&nbsp;</th>
        <th>Id&nbsp;</th>
        <th>Status&nbsp;</th>
        <th>Blueprint&nbsp;</th>
@@ -247,12 +287,8 @@ body {
       </tr>
      </thead>
      <tbody>
-      <tr class="border_bottom" ng-repeat="submission in submissions">
-       <td><label class="checkbox"> <input type="checkbox"
-         name="name1" ng-model="temp"
-         ng-change="modifySubmissionIdList(submission.submissionId)"
-         class="ng-valid ng-dirty ng-valid-parse ng-touched"><i
-         class="skin"></i><span>&nbsp;</span></label></td>
+      <tr class="border_bottom"
+       ng-repeat="submission in submissions | filter:filterGeneralMatch | filter:filterSubmission">
        <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
         submission.submissionId }}</td>
        <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
@@ -278,20 +314,6 @@ body {
      </tbody>
     </table>
 
-    <div class="well" style="padding-bottom: 35px;">
-     <div class="row ddh-page short">
-      <div class="b2b-pager ng-isolate-scope" b2b-pagination=""
-       total-pages="totalPages1" current-page="currentPage1"
-       click-handler="customHandler1" role="navigation"
-       aria-label="Customer Data Pages">
-       <div ng-if="notMobile &amp;&amp; totalPages > 1" class="ng-scope">
-
-       </div>
-      </div>
-     </div>
-
-    </div>
-
    </div>
   </div>
  </div>
index d53bcc7..ebad5be 100644 (file)
@@ -23,6 +23,8 @@ app
                     initialize();
 
                     function initialize() {
+                        $scope.loading = false;
+                        $scope.showResults = false;
                         $scope.results = [];
                         $scope.resultsLayers = [];
                         $scope.resultsLayerTestSuitesNames = [];
@@ -38,24 +40,27 @@ app
                                                             $scope.submissions,
                                                             function(
                                                                     submissionData) {
-                                                                var temp = "id: "
-                                                                        + submissionData.submissionId
-                                                                        + " blueprint: "
-                                                                        + submissionData.blueprintInstanceForValidation.blueprint.blueprintName
-                                                                        + " version: "
-                                                                        + submissionData.blueprintInstanceForValidation.version
-                                                                        + " layer: "
-                                                                        + submissionData.blueprintInstanceForValidation.layer
-                                                                        + " lab: "
-                                                                        + submissionData.timeslot.lab.lab
-                                                                        + " Start date and time: "
-                                                                        + submissionData.timeslot.startDateTime
-                                                                /*
-                                                                 * + " duration: " +
-                                                                 * submissionData.blueprintInstanceForValidation.timeslot.duration
-                                                                 */;
-                                                                $scope.submissionsForDisplay
-                                                                        .push(temp);
+                                                                if (submissionData.submissionStatus === "Completed") {
+                                                                    var temp = "id: "
+                                                                            + submissionData.submissionId
+                                                                            + " blueprint: "
+                                                                            + submissionData.blueprintInstanceForValidation.blueprint.blueprintName
+                                                                            + " version: "
+                                                                            + submissionData.blueprintInstanceForValidation.version
+                                                                            + " layer: "
+                                                                            + submissionData.blueprintInstanceForValidation.layer
+                                                                            + " lab: "
+                                                                            + submissionData.timeslot.lab.lab
+                                                                            + " Start date and time: "
+                                                                            + submissionData.timeslot.startDateTime
+                                                                    /*
+                                                                     * + "
+                                                                     * duration: " +
+                                                                     * submissionData.blueprintInstanceForValidation.timeslot.duration
+                                                                     */;
+                                                                    $scope.submissionsForDisplay
+                                                                            .push(temp);
+                                                                }
                                                             });
                                         });
                     }
@@ -65,6 +70,8 @@ app
                         $scope.resultsLayers = [];
                         $scope.resultsLayerTestSuitesNames = [];
                         $scope.selectedRobotTestResult = [];
+                        $scope.loading = true;
+                        $scope.showResults = false;
                         var id = selectedSubmission.substring(
                                 selectedSubmission.indexOf("id:") + 4,
                                 selectedSubmission.indexOf("blueprint") - 1);
@@ -72,6 +79,7 @@ app
                                 .getRestAPI(
                                         "/api/results/getBySubmissionId/" + id,
                                         function(data) {
+                                            $scope.loading = false;
                                             if (data !== undefined) {
                                                 $scope.results = data;
                                                 angular
@@ -81,6 +89,7 @@ app
                                                                     $scope.resultsLayers
                                                                             .push(result.blueprintLayer);
                                                                 });
+                                                $scope.showResults = true;
                                             } else {
                                                 confirm("Error when committing the submission");
                                             }
index 3e86330..8d6324c 100644 (file)
@@ -32,175 +32,357 @@ limitations under the License.
     float: left;
     height: 100%;
 }
+
+div.box {
+    border: 1px solid black;
+}
 </style>
 
  <h1 class="heading-page">Get results by submission</h1>
 
+ <h2 class="heading-small">General matching string:</h2>
+ <div>
+  <input ng-model="filterGeneralMatch" type="text" placeholder="?"
+   style="margin-top: 5px; width: 260px;">
+ </div>
+
  <h2 class="heading-small">Select Submission:</h2>
 
  <div>
   <select ng-model="selectedSubmission"
    ng-init="selectedSubmission=submissionsForDisplay[0]"
    ng-change="selectedSubmissionChange(selectedSubmission)"
-   ng-options="n for n in submissionsForDisplay">
+   ng-options="n for n in submissionsForDisplay | filter:filterGeneralMatch">
   </select>
  </div>
 
- <h2 class="heading-small">Select a blueprint layer of the selected
-  submission:</h2>
- <div>
-  <select ng-model="selectedLayer" ng-init="resultsLayers[0]"
-   ng-change="selectedResultsLayerChange(selectedLayer)"
-   ng-options="n for n in resultsLayers">
-  </select>
+ <div ng-show="loading">
+  <img src=" static/fusion/images/giphy.gif" />
  </div>
 
- <h2 class="heading-small">Select a test suite of the selected
-  (submission, layer) pair in order to be displayed:</h2>
- <div>
-  <select ng-model="selectedTestSuiteName"
-   ng-init="resultsLayerTestSuitesNames[0]"
-   ng-change="selectedTestSuitesNameChange(selectedTestSuiteName)"
-   ng-options="n for n in resultsLayerTestSuitesNames">
-  </select>
- </div>
+ <h2 class="heading-small"></h2>
+ <div ng-show="showResults">
+  <h2 class="heading-small">Select a blueprint layer of the
+   selected submission:</h2>
+  <div>
+   <select ng-model="selectedLayer" ng-init="resultsLayers[0]"
+    ng-change="selectedResultsLayerChange(selectedLayer)"
+    ng-options="n for n in resultsLayers">
+   </select>
+  </div>
 
+  <h2 class="heading-small">Select a test suite of the selected
+   (submission, layer) pair in order to be displayed:</h2>
+  <div>
+   <select ng-model="selectedTestSuiteName"
+    ng-init="resultsLayerTestSuitesNames[0]"
+    ng-change="selectedTestSuitesNameChange(selectedTestSuiteName)"
+    ng-options="n for n in resultsLayerTestSuitesNames">
+   </select>
+  </div>
+ </div>
 
  <br> <br> <br>
 
- <div>
+ <div
+  ng-hide="selectedSubmission == null || selectedLayer == null || selectedTestSuiteName == null">
+  <div>
+   <h2 class="heading-small"></h2>
+   <div class="box">
+    <h3 class="heading-small">
+     <u>General Info</u>
+    </h3>
+    <p></p>
 
-  <h2>
-   <u>Test info</u>
-  </h2>
-
-  <p></p>
-  <p>Name: {{selectedRobotTestResult.name}}</p>
-  <p>Generated: {{selectedRobotTestResult.robot.generated}}</p>
-  <p>Generator: {{selectedRobotTestResult.robot.generator}}</p>
-  <p>Errors: {{selectedRobotTestResult.robot.errors}}</p>
-
-  <h2 class="heading-small"></h2>
-  <h3 class="heading-small">
-   <u>Test Statistics</u>
-  </h3>
-  <p></p>
-  <table class="striped" cellspacing="0" cellpadding="10">
-   <caption>
-    <h3></h3>
-   </caption>
-   <thead>
-    <th><p>&nbsp;Total statistics&nbsp;</p></th>
-    <th><p>Total&nbsp;</p></th>
-    <th><p>Pass&nbsp;</p></th>
-    <th><p>Fail&nbsp;</p></th>
-    <th><p>Pass / Fail&nbsp;</p></th>
-    </tr>
-   </thead>
-   <tbody>
-    <tr
-     ng-repeat="stat in selectedRobotTestResult.robot.statistics.total.stat">
-     <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
-      stat.content }}</td>
-     <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
-      (stat.fail * 1) + (stat.pass*1) }}</td>
-     <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
-      stat.pass }}</td>
-     <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
-      stat.fail}}</td>
-     <td style="padding-left: 10px; font-size: 15px; width: 13%;">
-      <div class="graph">
-       <div class="pass-bar"
-        ng-style="{ 'width': {{(100* stat.pass/((stat.fail * 1) + (stat.pass*1)) )| number:0}} + '%' }"
-        title="100%"></div>
-       <div class="fail-bar"
-        ng-style="{ 'width': {{(100* stat.fail/((stat.fail * 1) + (stat.pass*1)) )| number:0}} + '%' }"
-        title="0%"></div>
-      </div>
-     </td>
-    </tr>
-   </tbody>
-  </table>
-
-  <br>
-
-  <h3 class="heading-small"></h3>
-  <table class="striped" cellspacing="0" cellpadding="10">
-   <caption>
-    <h3></h3>
-   </caption>
-   <thead>
-    <th><p>&nbsp;Statistics by Tag&nbsp;</p></th>
-    <th><p>Total&nbsp;</p></th>
-    <th><p>Pass&nbsp;</p></th>
-    <th><p>Fail&nbsp;</p></th>
-    <th><p>Pass / Fail&nbsp;</p></th>
-    </tr>
-   </thead>
-   <tbody>
-    <tr
-     ng-repeat="stat in selectedRobotTestResult.robot.statistics.tag.stat">
-     <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
-      stat.content }}</td>
-     <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
-      (stat.fail * 1) + (stat.pass*1) }}</td>
-     <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
-      stat.pass }}</td>
-     <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
-      stat.fail}}</td>
-     <td style="padding-left: 10px; font-size: 15px; width: 13%;">
-      <div class="graph">
-       <div class="pass-bar"
-        ng-style="{ 'width': {{(100* stat.pass/((stat.fail * 1) + (stat.pass*1)) )| number:0}} + '%' }"
-        title="100%"></div>
-       <div class="fail-bar"
-        ng-style="{ 'width': {{(100* stat.fail/((stat.fail * 1) + (stat.pass*1)) )| number:0}} + '%' }"
-        title="0%"></div>
-      </div>
-     </td>
-    </tr>
-   </tbody>
-  </table>
-
-  <br>
-
-  <h3 class="heading-small"></h3>
-  <table class="striped" cellspacing="0" cellpadding="10">
-   <caption>
-    <h3></h3>
-   </caption>
-   <thead>
-    <th><p>&nbsp;Statistics by Suite&nbsp;</p></th>
-    <th><p>Total&nbsp;</p></th>
-    <th><p>Pass&nbsp;</p></th>
-    <th><p>Fail&nbsp;</p></th>
-    <th><p>Pass / Fail&nbsp;</p></th>
-    </tr>
-   </thead>
-   <tbody>
-    <tr
-     ng-repeat="stat in selectedRobotTestResult.robot.statistics.suite.stat">
-     <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
-      stat.content }}</td>
-     <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
-      (stat.fail * 1) + (stat.pass*1) }}</td>
-     <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
-      stat.pass }}</td>
-     <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
-      stat.fail}}</td>
-     <td style="padding-left: 10px; font-size: 15px; width: 13%;">
-      <div class="graph">
-       <div class="pass-bar"
-        ng-style="{ 'width': {{(100* stat.pass/((stat.fail * 1) + (stat.pass*1)) )| number:0}} + '%' }"
-        title="100%"></div>
-       <div class="fail-bar"
-        ng-style="{ 'width': {{(100* stat.fail/((stat.fail * 1) + (stat.pass*1)) )| number:0}} + '%' }"
-        title="0%"></div>
+    <p></p>
+    <p>Name: {{selectedRobotTestResult.name}}</p>
+    <p>Generated: {{selectedRobotTestResult.robot.generated}}</p>
+    <p>Generator: {{selectedRobotTestResult.robot.generator}}</p>
+    <p>Errors: {{selectedRobotTestResult.robot.errors}}</p>
+
+    <h2 class="heading-small"></h2>
+    <h3 class="heading-small">
+     <u>Test Statistics</u>
+    </h3>
+    <p></p>
+    <table class="striped" cellspacing="0" cellpadding="10">
+     <caption>
+      <h3></h3>
+     </caption>
+     <thead>
+      <th><p>&nbsp;Total statistics&nbsp;</p></th>
+      <th><p>Total&nbsp;</p></th>
+      <th><p>Pass&nbsp;</p></th>
+      <th><p>Fail&nbsp;</p></th>
+      <th><p>Pass / Fail&nbsp;</p></th>
+      </tr>
+     </thead>
+     <tbody>
+      <tr
+       ng-repeat="stat in selectedRobotTestResult.robot.statistics.total.stat">
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
+        stat.content }}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
+        (stat.fail * 1) + (stat.pass*1) }}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
+        stat.pass }}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
+        stat.fail}}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">
+        <div class="graph">
+         <div class="pass-bar"
+          ng-style="{ 'width': {{(100* stat.pass/((stat.fail * 1) + (stat.pass*1)) )| number:0}} + '%' }"
+          title="100%"></div>
+         <div class="fail-bar"
+          ng-style="{ 'width': {{(100* stat.fail/((stat.fail * 1) + (stat.pass*1)) )| number:0}} + '%' }"
+          title="0%"></div>
+        </div>
+       </td>
+      </tr>
+     </tbody>
+    </table>
+
+    <br>
+
+    <h3 class="heading-small"></h3>
+    <table class="striped" cellspacing="0" cellpadding="10">
+     <caption>
+      <h3></h3>
+     </caption>
+     <thead>
+      <th><p>&nbsp;Statistics by Tag&nbsp;</p></th>
+      <th><p>Total&nbsp;</p></th>
+      <th><p>Pass&nbsp;</p></th>
+      <th><p>Fail&nbsp;</p></th>
+      <th><p>Pass / Fail&nbsp;</p></th>
+      </tr>
+     </thead>
+     <tbody>
+      <tr
+       ng-repeat="stat in selectedRobotTestResult.robot.statistics.tag.stat">
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
+        stat.content }}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
+        (stat.fail * 1) + (stat.pass*1) }}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
+        stat.pass }}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
+        stat.fail}}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">
+        <div class="graph">
+         <div class="pass-bar"
+          ng-style="{ 'width': {{(100* stat.pass/((stat.fail * 1) + (stat.pass*1)) )| number:0}} + '%' }"
+          title="100%"></div>
+         <div class="fail-bar"
+          ng-style="{ 'width': {{(100* stat.fail/((stat.fail * 1) + (stat.pass*1)) )| number:0}} + '%' }"
+          title="0%"></div>
+        </div>
+       </td>
+      </tr>
+     </tbody>
+    </table>
+
+    <br>
+
+    <h3 class="heading-small"></h3>
+    <table class="striped" cellspacing="0" cellpadding="10">
+     <caption>
+      <h3></h3>
+     </caption>
+     <thead>
+      <th><p>&nbsp;Statistics by Suite&nbsp;</p></th>
+      <th><p>Total&nbsp;</p></th>
+      <th><p>Pass&nbsp;</p></th>
+      <th><p>Fail&nbsp;</p></th>
+      <th><p>Pass / Fail&nbsp;</p></th>
+      </tr>
+     </thead>
+     <tbody>
+      <tr
+       ng-repeat="stat in selectedRobotTestResult.robot.statistics.suite.stat">
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
+        stat.content }}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
+        (stat.fail * 1) + (stat.pass*1) }}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
+        stat.pass }}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
+        stat.fail}}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">
+        <div class="graph">
+         <div class="pass-bar"
+          ng-style="{ 'width': {{(100* stat.pass/((stat.fail * 1) + (stat.pass*1)) )| number:0}} + '%' }"
+          title="100%"></div>
+         <div class="fail-bar"
+          ng-style="{ 'width': {{(100* stat.fail/((stat.fail * 1) + (stat.pass*1)) )| number:0}} + '%' }"
+          title="0%"></div>
+        </div>
+       </td>
+      </tr>
+     </tbody>
+    </table>
+   </div>
+
+   <h2 class="heading-small"></h2>
+   <div class="box">
+    <h3 class="heading-small">
+     <a href="#" ng-click="showDetailsLog = ! showDetailsLog">Test
+      Execution Log</a>
+    </h3>
+    <div ng-show="showDetailsLog">
+     <p></p>
+     <p>Root Suite Full Name:
+      {{selectedRobotTestResult.robot.suite.name}}</p>
+     <p>Source: {{selectedRobotTestResult.robot.suite.source}}</p>
+     <p>Status:
+      {{selectedRobotTestResult.robot.suite.status.status}}</p>
+     <p>Start time:
+      {{selectedRobotTestResult.robot.suite.status.starttime}}</p>
+     <p>End time:
+      {{selectedRobotTestResult.robot.suite.status.endtime}}</p>
+
+     <h2 class="heading-small"></h2>
+     <p></p>
+     <p>Sub-suite Full Name:
+      {{selectedRobotTestResult.robot.suite.suite.name}}</p>
+     <p>Documentation:
+      {{selectedRobotTestResult.robot.suite.suite.doc}}</p>
+     <p>Source: {{selectedRobotTestResult.robot.suite.suite.source}}</p>
+     <p>Status:
+      {{selectedRobotTestResult.robot.suite.suite.status.status}}</p>
+     <p>Start time:
+      {{selectedRobotTestResult.robot.suite.suite.status.starttime}}</p>
+     <p>End time:
+      {{selectedRobotTestResult.robot.suite.suite.status.endtime}}</p>
+    </div>
+   </div>
+
+   <h2 class="heading-small"></h2>
+   <div class="box">
+    <ul>
+     <h4 class="heading-small">Sub-suite Robot keywords</h4>
+     <li ng-repeat="kw in selectedRobotTestResult.robot.suite.suite.kw">
+      <h2 class="heading-small"></h2>
+      <h4>
+       <a href="#" ng-click="showDetails = ! showDetails">
+        {{kw.name}}</a>
+      </h4>
+      <div ng-show="showDetails">
+       <p>&emsp;&emsp;&emsp;&emsp; Type: {{kw.type}}</p>
+       <p>&emsp;&emsp;&emsp;&emsp; Library: {{kw.library}}</p>
+       <p>&emsp;&emsp;&emsp;&emsp; Documentation: {{kw.doc}}</p>
+       <p>&emsp;&emsp;&emsp;&emsp; Start time:
+        {{kw.status.starttime}}</p>
+       <p>&emsp;&emsp;&emsp;&emsp; End time: {{kw.status.endtime}}</p>
+       <p>&emsp;&emsp;&emsp;&emsp; Status: {{kw.status.status}}</p>
+       <p></p>
+       <p>&emsp;&emsp;&emsp;&emsp; Used Robot keywords</p>
+       <ul>
+        <li ng-repeat="kw2 in kw.kw">
+         <h4>
+          <a href="#" ng-click="showDetails2 = ! showDetails2">&emsp;&emsp;&emsp;&emsp;
+           {{kw2.name}}</a>
+         </h4>
+         <div ng-show="showDetails2">
+          <p>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp; Type:
+           {{kw2.type}}</p>
+          <p>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
+           Library: {{kw2.library}}</p>
+          <p>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
+           Documentation: {{kw2.doc}}</p>
+          <p>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp; Start
+           time: {{kw2.status.starttime}}</p>
+          <p>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp; End
+           time: {{kw2.status.endtime}}</p>
+          <p>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
+           Status: {{kw2.status.status}}</p>
+         </div>
+        </li>
+       </ul>
       </div>
-     </td>
-    </tr>
-   </tbody>
-  </table>
+     </li>
+    </ul>
+   </div>
+
+   <h2 class="heading-small"></h2>
+   <div class="box">
+    <h3 class="heading-small">Test Cases</h3>
+    <table class="striped" cellspacing="0" cellpadding="10">
+     <caption>
+      <h3></h3>
+     </caption>
+     <thead>
+      <th><p>&nbsp;Full Name&nbsp;</p></th>
+      <th><p>Documentation&nbsp;</p></th>
+      <th><p>Status&nbsp;</p></th>
+      <th><p>Start Time&nbsp;</p></th>
+      <th><p>End Time&nbsp;</p></th>
+      <th><p>Critical&nbsp;</p></th>
+      <th><p>Message&nbsp;</p></th>
+      <th><p>Robot keywords&nbsp;</p></th>
+      </tr>
+     </thead>
+     <tbody>
+      <tr
+       ng-repeat="test in selectedRobotTestResult.robot.suite.suite.test">
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{
+        test.name }}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{test.doc}}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{test.status.status}}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{test.status.starttime}}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{test.status.endtime}}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{test.status.critical}}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">{{test.status.content}}</td>
+       <td style="padding-left: 10px; font-size: 15px; width: 13%;">
+
+        <ul>
+         <li ng-repeat="testKw in test.kw">
+          <h2 class="heading-small"></h2>
+          <h4>
+           <a href="#" ng-click="showDetails3 = ! showDetails3">
+            {{testKw.name}}</a>
+          </h4>
+          <div ng-show="showDetails3">
+           <p>&emsp;&emsp;&emsp;&emsp; Type: {{testKw.type}}</p>
+           <p>&emsp;&emsp;&emsp;&emsp; Library: {{testKw.library}}</p>
+           <p>&emsp;&emsp;&emsp;&emsp; Documentation: {{testKw.doc}}</p>
+           <p>&emsp;&emsp;&emsp;&emsp; Start time:
+            {{testKw.status.starttime}}</p>
+           <p>&emsp;&emsp;&emsp;&emsp; End time:
+            {{testKw.status.endtime}}</p>
+           <p>&emsp;&emsp;&emsp;&emsp; Status:
+            {{testKw.status.status}}</p>
+           <p></p>
+           <p>&emsp;&emsp;&emsp;&emsp; Used Robot keywords</p>
+           <ul>
+            <li ng-repeat="testKw2 in testKw.kw">
+             <h4>
+              <a href="#" ng-click="showDetails4 = ! showDetails4">&emsp;&emsp;&emsp;&emsp;
+               {{testKw2.name}}</a>
+             </h4>
+             <div ng-show="showDetails4">
+              <p>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
+               Type: {{testKw2.type}}</p>
+              <p>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
+               Library: {{testKw2.library}}</p>
+              <p>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
+               Documentation: {{testKw2.doc}}</p>
+              <p>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
+               Start time: {{testKw2.status.starttime}}</p>
+              <p>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
+               End time: {{testKw2.status.endtime}}</p>
+              <p>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
+               Status: {{testKw2.status.status}}</p>
+             </div>
+            </li>
+           </ul>
+       </td>
+
+      </tr>
+     </tbody>
+    </table>
+   </div>
 
+  </div>
  </div>
 </div>
\ No newline at end of file
index f7d0085..2135680 100644 (file)
@@ -94,6 +94,13 @@ app
                     }
 
                     $scope.submit = function() {
+                        if (!$scope.selectedBlueprintName
+                                || !$scope.selectedBlueprintVersion
+                                || !$scope.selectedBlueprintLayer
+                                || !$scope.selectedDeclerativeTimeslot) {
+                            confirm("You must specify all data fields");
+                            return;
+                        }
                         var finalBlueprint;
                         var finalTimeslot;
                         angular
@@ -134,11 +141,17 @@ app
                                         submission,
                                         function(data) {
                                             if (data !== undefined) {
-                                                confirm("Submission committed successfully");
+                                                var confirmText = "The blueprint instance for validation has been submitted successfully. Submissionn id:"
+                                                        + data.submissionId;
+                                                confirm(confirmText);
                                             } else {
                                                 confirm("Error when committing the submission");
                                             }
                                         });
+                        $scope.selectedBlueprintName = {};
+                        $scope.selectedBlueprintVersion = {};
+                        $scope.selectedBlueprintLayer = {};
+                        $scope.selectedDeclerativeTimeslot = {};
                     }
 
                 });
diff --git a/ui/src/main/webapp/static/fusion/images/giphy.gif b/ui/src/main/webapp/static/fusion/images/giphy.gif
new file mode 100644 (file)
index 0000000..7a880b3
Binary files /dev/null and b/ui/src/main/webapp/static/fusion/images/giphy.gif differ