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,
- ui/src/main/java/org/akraino/validation/ui/service/DbResultAdapter.java,
+ ui/src/main/java/org/akraino/validation/ui/service/DbAdapter.java,
ui/src/main/java/org/akraino/validation/ui/client/nexus/NexusExecutorClient.java,
ui/src/main/java/org/akraino/validation/ui/daoimpl/ValidationTestResultDAOImpl.java,
ui/src/main/java/org/akraino/validation/ui/entity/ValidationDbTestResult.java,
ui/src/main/java/org/akraino/validation/ui/entity/WRobotDbTestResult.java,
- ui/src/main/java/org/akraino/validation/ui/entity/Submission.java
+ ui/src/main/java/org/akraino/validation/ui/entity/Submission.java,
+ ui/src/main/java/org/akraino/validation/ui/controller/ModelsViewsController.java
[all.JS]
bears = ESLintBear,JSComplexityBear
ui/target/**,
ui/src/main/webapp/app/BluvalUI/NewSubmission/NewSubmission.js,
ui/src/main/webapp/app/BluvalUI/CommittedSubmissions/CommittedSubmissions.js,
- ui/src/main/webapp/app/BluvalUI/GetBySubmissionId/GetBySubmissionId.js,
ui/src/main/webapp/app/BluvalUI/GetMostRecent/GetMostRecent.js,
ui/src/main/webapp/app/BluvalUI/GetLastRun/GetLastRun.js,
ui/src/main/webapp/app/BluvalUI/GetByTimestamp/GetByTimestamp.js,
ui/src/main/webapp/app/BluvalUI/GetBasedOnDate/GetBasedOnDate.js,
- ui/src/main/webapp/app/BluvalUI/ValidationResults/ValidationResults.js
+ ui/src/main/webapp/app/BluvalUI/ValidationResults/ValidationResults.js,
+ ui/src/main/webapp/app/BluvalUI/ModifyBlueprintInstance/ModifyBlueprintInstance.js,
+ ui/src/main/webapp/app/BluvalUI/ModifyLab/ModifyLab.js,
+ ui/src/main/webapp/app/BluvalUI/RegisterBlueprint/RegisterBlueprint.js,
+ ui/src/main/webapp/app/BluvalUI/RegisterBlueprintInstance/RegisterBlueprintInstance.js,
+ ui/src/main/webapp/app/BluvalUI/RegisterLab/RegisterLab.js,
+ ui/src/main/webapp/app/BluvalUI/RegisterLayer/RegisterLayer.js,
+ ui/src/main/webapp/app/BluvalUI/RegisterTimeslot/RegisterTimeslot.js,
+ ui/src/main/webapp/app/BluvalUI/UnRegisterBlueprint/UnRegisterBlueprint.js,
+ ui/src/main/webapp/app/BluvalUI/UnRegisterBlueprintInstance/UnRegisterBlueprintInstance.js,
+ ui/src/main/webapp/app/BluvalUI/UnRegisterLab/UnRegisterLab.js,
+ ui/src/main/webapp/app/BluvalUI/UnRegisterLayer/UnRegisterLayer.js,
+ ui/src/main/webapp/app/BluvalUI/GetBlueprints/GetBlueprints.js,
+ ui/src/main/webapp/app/BluvalUI/GetBlueprintInstances/GetBlueprintInstances.js,
+ ui/src/main/webapp/app/BluvalUI/GetLabs/GetLabs.js,
+ ui/src/main/webapp/app/BluvalUI/GetLayers/GetLayers.js,
+ ui/src/main/webapp/app/BluvalUI/GetTimeslots/GetTimeslots.js
### Removed
+## [0.3.1-SNAPSHOT] - 20 September 2019
+### Added
+- Tabs for CRUD operations regarding labs, blueprints, layers, timeslots and blueprint instances have been added.
+
+### Changed
+- Timeslot is now referenced by a blueprint instance
+- The UI searches for results only under the 'bluval_results' directory in Nexus
+
+### Removed
- An appropriate mariadb instance is up and running (look at the Database subsection).
This prerequisite concerns both of the UI modes.
-- The available labs and their silos (i.e. which silo is used by a lab in order to store results in Nexus) for blueprint validation execution are defined by the corresponding lab owners (look at the Database subsection). It is their responsibility to publish them. Currently, this data is statically stored in the blueprint validation UI mariadb database. In order for a lab owner to update them, he/her must update the corresponding table entries. This inconvenience will be handled in the future.
- This prerequisite concerns only the full control loop mode.
+- The available labs and their silos (i.e. which silo is used by a lab in order to store results in Nexus) for blueprint validation execution are stored in mariadb (look at the Database subsection). It is the lab owner's responsibility to update them using the UI.
+ This prerequisite concerns both the partial and the full control loop modes.
-- The available timeslots for blueprint validation execution of every lab are defined by the corresponding lab owners (look at the Database subsection). It is their responsibility to publish them. Currently, this data is statically stored in the blueprint validation UI mariadb database. In order for a lab owner to update them, he/her must update the corresponding table entries. This inconvenience will be handled in the future.
+- The available timeslots for blueprint validation execution of every lab are stored in the mariadb (look at the Database subsection). It is the lab owner's responsibility to update them using the UI.
This prerequisite concerns only the full control loop mode.
-- The data of available blueprints (i.e. blueprint name) is stored in the mariadb database (look at the Database subsection). This data is automatically updated using info from Nexus. If a blueprint owner's is not satisfied with this info, he/her must update the corresponding table entries.
+- The data of available blueprints (i.e. blueprint name) is stored in the mariadb database (look at the Database subsection). This data is automatically updated by the UI using info from Nexus. If a blueprint owner's is not satisfied with this info, he/her must update it using the UI.
This prerequisite concerns only the full control loop mode.
-- The data of an available blueprint instance for validation (i.e. version and layer) is stored in the mariadb database (look at the Database subsection). This data is automatically updated using info from Nexus. If a blueprint owner's is not satisfied with this info, he/her must update the corresponding table entries.
+- The data of an available blueprint instance for validation (i.e. version and layer) is stored in the mariadb database (look at the Database subsection). This data is automatically updated by the UI using info from Nexus. If a blueprint owner's is not satisfied with this info, he/her must update it using the UI.
This prerequisite concerns only the full control loop mode.
- A Jenkins instance exists capable of executing blueprint validation tests on the specified lab and storing the results to Nexus server (look at the Jenkins configuration subsection).
./deploy.sh TAG_PRE=dev-mariadb MARIADB_ROOT_PASSWORD=<root user password> MARIADB_AKRAINO_PASSWORD=<mariadb akraino user password> UI_ADMIN_PASSWORD=<UI admin user password> UI_AKRAINO_PASSWORD=<UI akraino user password>
mysql -p<MARIADB_AKRAINO_PASSWORD> -uakraino -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:
+In the context of the UI application, the following tables exist in the database:
-- lab (here every lab owner should store the name of the lab and the silo used for storing results in Nexus)
-- timeslot (here every lab owner should register the available timeslots that can be used for blueprint validation test execution)
-- blueprint_layer (here all the blueprint layers should be registered. These layers will be referenced by the blueprint instances)
-- 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 and layer)
-- blueprint_instance_blueprint_layer (here the many-to-many relationship between blueprint instances and layers is formulated)
+- lab (here, every lab owner should store the name of the lab and the silo used for storing results in Nexus)
+- timeslot (here, every lab owner should register the available timeslots that can be used for blueprint validation test execution)
+- blueprint_layer (here, all the blueprint layers should be registered. These layers will be referenced by the blueprint instances)
+- 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 and layer)
+- blueprint_instance_blueprint_layer (here, the many-to-many relationship between blueprint instances and layers is formulated)
+- blueprint_instance_timeslot (here, the many-to-many relationship between blueprint instances and timeslots is formulated)
-As it has been already mentioned, these tables are initialized automatically by the UI by fetching data from Nexus.
+As it has been already mentioned, a user can perform CRUD operations on these tables using the UI. Also, all these tables except from lab and timeslot are initialized and updated automatically
+by the UI by fetching data from Nexus. It is the lab owners responsibility to update them if a modifications is needed (especially the data related to lab and timeslot tables).
-However, a user may wish to extend or change this data (for example a new blueprint has been created and no results have been pushed to Nexus yet). To this end, the following file can be used (that's why the command 'mysql -p<MARIADB_AKRAINO_PASSWORD> -uakraino -h <IP of the mariadb container> < ../../ui/db-scripts/examples/initialize_db_example.sql' has been used previously):
+An example of data initialization is stored in the following file:
db-scripts/examples/initialize_db_example.sql
+That is the reason why the command 'mysql -p<MARIADB_AKRAINO_PASSWORD> -uakraino -h <IP of the mariadb container> < ../../ui/db-scripts/examples/initialize_db_example.sql' has been used previously.
+
Some of this data is illustrated below:
.. code-block:: console
Blueprint Instances:
id: 2, blueprint_id: 2 (i.e. rec), version: "master"
-
+
blueprint_instances_blueprint_layers
blueprint_id: 2 (i.e. rec), layer_id: 1 (i.e. hardware)
+ blueprint_instances_timeslots
+ blueprint_instance_id: 2 (i.e. rec), timeslot_id: 1 (i.e. now in att lab)
+
It should be noted that currently the start date and time and the duration of the timeslot are not taken into account by the UI (see limitation section). Therefore, a user should define 'now' and null respectively for their content.
Based on this data, the UI enables the user to select an appropriate blueprint instance for validation.
+In the following lines it is explained how a user can update database using the mysql tool. However, it is advised that UI should be used for this purpose as it supports a more user-friendly way.
+
For example, if a user wants to define a new lab with the following data:
- lab: community, silo : 'community'
+ lab: community, silo : 'community'
the following file should be created:
mysql -p<MARIADB_AKRAINO_PASSWORD> -uakraino -h <IP of the mariadb container> < ./dbscript.sql
-Furthermore, if a user wants to define a new blueprint, namely "newBlueprint" and a new instance of this blueprint with the following data:
-
- version: "master", layer: k8s
-
-the following file should be created:
+Furthermore, if a user wants to define a new blueprint, namely "newBlueprint", and an instance of this blueprint with version "master" and layer "k8s" and assign a timeslot to it, the following file should be created:
name: dbscript
content:
insert into blueprint_instance (id, blueprint_id, version) values(3, 3, 'master');
insert into blueprint_layer (id, layer) values(4, 'k8s');
insert into blueprint_instance_blueprint_layer (blueprint_instance_id, blueprint_layer_id) values(3, 4);
+ insert into blueprint_instance_timeslot (blueprint_instance_id, timeslot_id) values(3, 2);
Then, the following command should be executed:
These results must be available in the following url:
- https://nexus.akraino.org/content/sites/logs/<lab_silo>/<Blueprint name>/<Blueprint version>/<timestamp>/results/<layer>/<name_of_the_test_suite>
+ https://nexus.akraino.org/content/sites/logs/<lab_silo>/bluval_results/<Blueprint name>/<Blueprint version>/<timestamp>/results/<layer>/<name_of_the_test_suite>
where <lab_silo> is the silo used by a lab for storing results in Nexus (for example 'att-blu-val'), <Blueprint name> is the name of the blueprint, <Blueprint version> the the blueprint version, <timestamp> is the timestamp used for producinf the results, <layer> is the blueprint layer and <name_of_the_test_suite> is the name of the corresponding test suite.
Below, an example URL is illustrated
- https://nexus.akraino.org/content/sites/logs/att-blu-val/rec/master/20190611-132818/results/hardware/bios_version/
+ https://nexus.akraino.org/content/sites/logs/att-blu-val/bluval_results/rec/master/20190611-132818/results/hardware/bios_version/
-Moreover, the results should be stored in the 'output.xml' file and placed in the aforementioned URL using the following format:
-
-TBD
+Moreover, the results should be stored in the 'output.xml' file and placed in the aforementioned URL.
Compiling
~~~~~~~~~
-----------
- The UI has been tested using Chrome and Firefox browsers.
- The back-end part of the UI does not take into account the start date and time and duration of the configured timeslot. It immediately triggers the corresponding Jenkins Job.
-- Results data manipulation (filtering, graphical representation, indexing in time order, etc) is not supported.
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 (21, 'New Submission', 1, 10, 'newsubmission', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-building-home');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (22, 'Committed Submissions', 1, 10, 'committedsubmissions', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-building-home');
Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (23, 'Validation Results', 1, 10, 'report.htm', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-misc-piechart');
Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (24, 'Get most recent', 23, 10, 'getmostrecent', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (25, 'Get by timestamp', 23, 10, 'getbytimestamp', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (26, 'Get last run', 23, 10, 'getlastrun', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (27, 'Get based on dates', 23, 10, 'getbasedondate', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (28, 'Register data', 1, 10, 'report.htm', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-misc-piechart');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (29, 'Lab', 28, 10, 'registerlab', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (30, 'Blueprint', 28, 10, 'registerblueprint', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (31, 'Layer', 28, 10, 'registerlayer', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (32, 'Timeslot', 28, 10, 'registertimeslot', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (33, 'Blueprint Instance', 28, 10, 'registerblueprintinstance', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (34, 'Unregister data', 1, 10, 'report.htm', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-misc-piechart');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (35, 'Lab', 34, 10, 'unregisterlab', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (36, 'Blueprint', 34, 10, 'unregisterblueprint', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (37, 'Layer', 34, 10, 'unregisterlayer', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (38, 'Blueprint Instance', 34, 10, 'unregisterblueprintinstance', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (39, 'Modify data', 1, 10, 'report.htm', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-misc-piechart');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (40, 'Lab', 39, 10, 'modifylab', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (41, 'Blueprint Instance', 39, 10, 'modifyblueprintinstance', 'menu_sample', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (42, 'Get data', 1, 10, 'report.htm', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-misc-piechart');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (43, 'Lab', 42, 10, 'getlabs', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (44, 'Blueprints', 42, 10, 'getblueprints', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (45, 'Layers', 42, 10, 'getlayers', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (46, 'Timeslots', 42, 10, 'gettimeslots', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+Insert into fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (47, 'Blueprint Instances', 42, 10, 'getblueprintinstances', 'menu_tab', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
-- 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);
DROP TABLE IF EXISTS blueprint_layer;
DROP TABLE IF EXISTS blueprint;
DROP TABLE IF EXISTS timeslot;
+DROP TABLE IF EXISTS blueprint_instance_timeslot;
DROP TABLE IF EXISTS lab;
create table lab (
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,
- unique (start_date_time, lab_id)
+ ON UPDATE NO ACTION ON DELETE NO ACTION
);
CREATE TABLE blueprint
unique (blueprint_instance_id, blueprint_layer_id)
);
+CREATE TABLE blueprint_instance_timeslot
+(
+ blueprint_instance_id bigint not NULL,
+ timeslot_id bigint not NULL,
+ CONSTRAINT blueprint_instance_id_fk3 FOREIGN KEY (blueprint_instance_id)
+ REFERENCES blueprint_instance (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,
+ unique (blueprint_instance_id, timeslot_id)
+);
+
CREATE TABLE submission
(
id bigint not NULL AUTO_INCREMENT,
status text not NULL,
timeslot_id bigint not NULL,
CONSTRAINT id_pk PRIMARY KEY (id),
- CONSTRAINT timeslot_id_fk FOREIGN KEY (timeslot_id)
+ CONSTRAINT timeslot_id_fk2 FOREIGN KEY (timeslot_id)
REFERENCES timeslot (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION
);
submission_id bigint,
date_of_storage text,
CONSTRAINT id_pk PRIMARY KEY (id),
- CONSTRAINT lab_id_fk3 FOREIGN KEY (lab_id)
+ CONSTRAINT lab_id_fk2 FOREIGN KEY (lab_id)
REFERENCES lab (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT submission_id_fk FOREIGN KEY (submission_id)
insert into blueprint_instance_blueprint_layer (blueprint_instance_id, blueprint_layer_id) values(2, 2); /* os layer is assigned to rec*/
insert into blueprint_instance_blueprint_layer (blueprint_instance_id, blueprint_layer_id) values(2, 4); /* k8s layer is assigned to rec*/
+insert into blueprint_instance_timeslot (blueprint_instance_id, timeslot_id) values(1, 1); /* dummy blueprint instance validation tests can run on ATT lab*/
+insert into blueprint_instance_timeslot (blueprint_instance_id, timeslot_id) values(2, 1); /* rec blueprint instance validation tests can run on ATT lab*/
+
commit;
<groupId>org.akraino.validation</groupId>
<artifactId>ui</artifactId>
- <version>0.2.1-SNAPSHOT</version>
+ <version>0.3.1-SNAPSHOT</version>
<name>Bluval UI Maven Webapp</name>
<packaging>war</packaging>
import org.akraino.validation.ui.entity.LabInfo;
import org.akraino.validation.ui.entity.ValidationDbTestResult;
import org.akraino.validation.ui.entity.WRobotDbTestResult;
-import org.akraino.validation.ui.service.DbResultAdapter;
+import org.akraino.validation.ui.service.DbAdapter;
import org.apache.commons.httpclient.HttpException;
import org.json.JSONObject;
import org.json.XML;
public final class NexusExecutorClient {
@Autowired
- DbResultAdapter dbAdapter;
+ DbAdapter dbAdapter;
private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(NexusExecutorClient.class);
@Nonnull String timestamp)
throws ClientHandlerException, UniformInterfaceException, JsonParseException, JsonMappingException,
IOException, KeyManagementException, NoSuchAlgorithmException, ParseException, NullPointerException {
- String nexusUrl = this.baseurl + "/" + siloText + "/" + name + "/" + version;
+ String nexusUrl = this.baseurl + "/" + siloText + "/" + "bluval_results/" + name + "/" + version;
LOGGER.info(EELFLoggerDelegate.applicationLogger, "Trying to get validation nexus test result");
WebResource webResource = this.client.resource(nexusUrl + "/");
LOGGER.debug(EELFLoggerDelegate.debugLogger, "Request URI of get: " + webResource.getURI().toString());
@Nonnull String siloText, int noOfLastElements)
throws ClientHandlerException, UniformInterfaceException, JsonParseException, JsonMappingException,
IOException, KeyManagementException, NoSuchAlgorithmException, ParseException {
- String nexusUrl = this.baseurl + "/" + siloText + "/" + name + "/" + version;
+ String nexusUrl = this.baseurl + "/" + siloText + "/" + "bluval_results/" + name + "/" + version;
LOGGER.info(EELFLoggerDelegate.applicationLogger, "Trying to get validation Nexus test results");
WebResource webResource = this.client.resource(nexusUrl + "/");
LOGGER.debug(EELFLoggerDelegate.debugLogger, "Request URI of get: " + webResource.getURI().toString());
@Nonnull String siloText, @Nonnull Date date)
throws ClientHandlerException, UniformInterfaceException, JsonParseException, JsonMappingException,
IOException, KeyManagementException, NoSuchAlgorithmException, ParseException, NullPointerException {
- String nexusUrl = this.baseurl + "/" + siloText + "/" + name + "/" + version;
+ String nexusUrl = this.baseurl + "/" + siloText + "/" + "bluval_results/" + name + "/" + version;
LOGGER.debug(EELFLoggerDelegate.applicationLogger, "Trying to get validation Nexus results based on date");
WebResource webResource = this.client.resource(nexusUrl + "/");
LOGGER.debug(EELFLoggerDelegate.debugLogger, "Request URI of get: " + webResource.getURI().toString());
@Nonnull String siloText, List<String> layers, Boolean optional, boolean outcome)
throws ClientHandlerException, UniformInterfaceException, JsonParseException, JsonMappingException,
IOException, KeyManagementException, NoSuchAlgorithmException, ParseException, NullPointerException {
- String nexusUrl = this.baseurl + "/" + siloText + "/" + name + "/" + version;
+ String nexusUrl = this.baseurl + "/" + siloText + "/" + "bluval_results/" + name + "/" + version;
LOGGER.info(EELFLoggerDelegate.applicationLogger, "Trying to get last result based on outcome");
WebResource webResource = this.client.resource(nexusUrl + "/");
LOGGER.debug(EELFLoggerDelegate.debugLogger, "Request URI of get: " + webResource.getURI().toString());
@Nonnull String siloText, Boolean allLayers, Boolean optional, boolean outcome)
throws ClientHandlerException, UniformInterfaceException, JsonParseException, JsonMappingException,
IOException, KeyManagementException, NoSuchAlgorithmException, ParseException, NullPointerException {
- String nexusUrl = this.baseurl + "/" + siloText + "/" + name + "/" + version;
+ String nexusUrl = this.baseurl + "/" + siloText + "/" + "bluval_results/" + name + "/" + version;
LOGGER.info(EELFLoggerDelegate.applicationLogger, "Trying to get last result based on outcome");
WebResource webResource = this.client.resource(nexusUrl + "/");
LOGGER.debug(EELFLoggerDelegate.debugLogger, "Request URI of get: " + webResource.getURI().toString());
@Nonnull String siloText, @Nonnull String timestamp)
throws ClientHandlerException, UniformInterfaceException, JsonParseException, JsonMappingException,
IOException, KeyManagementException, NoSuchAlgorithmException {
- String nexusUrl = this.baseurl + "/" + siloText + "/" + name + "/" + version + "/" + timestamp + "/results";
+ String nexusUrl = this.baseurl + "/" + siloText + "/" + "bluval_results/" + name + "/" + version + "/"
+ + timestamp + "/results";
List<WRobotNexusTestResult> listOfwrappers = new ArrayList<WRobotNexusTestResult>();
LOGGER.info(EELFLoggerDelegate.applicationLogger, "Trying to get the blueprint layers");
WebResource webResource = this.client.resource(nexusUrl + "/");
import java.util.concurrent.ExecutorService;
import org.akraino.validation.ui.entity.ValidationDbTestResult;
-import org.akraino.validation.ui.service.DbResultAdapter;
+import org.akraino.validation.ui.service.DbAdapter;
import org.akraino.validation.ui.service.IntegratedResultService;
import org.akraino.validation.ui.service.utils.PrioritySupplier;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
IntegratedResultService integratedService;
@Autowired
- DbResultAdapter dbAdapter;
+ DbAdapter dbAdapter;
@Override
public void onApplicationEvent(final ContextRefreshedEvent event) {
import java.util.List;
import org.akraino.validation.ui.entity.Blueprint;
-import org.akraino.validation.ui.service.BlueprintService;
+import org.akraino.validation.ui.service.DbAdapter;
import org.onap.portalsdk.core.controller.RestrictedBaseController;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.web.support.UserUtils;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(BlueprintController.class);
@Autowired
- BlueprintService service;
+ DbAdapter service;
public BlueprintController() {
super();
}
- @RequestMapping(value = {"/"}, method = RequestMethod.GET)
+ @RequestMapping(value = { "/" }, method = RequestMethod.GET)
public ResponseEntity<List<Blueprint>> getBlueprints() {
try {
return new ResponseEntity<>(service.getBlueprints(), HttpStatus.OK);
}
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
}
+
+ @RequestMapping(value = { "/" }, method = RequestMethod.POST)
+ public ResponseEntity<Blueprint> createBlueprint(@RequestBody Blueprint blueprint) {
+ try {
+ service.saveBlueprint(blueprint);
+ return new ResponseEntity<>(blueprint, HttpStatus.OK);
+ } catch (Exception e) {
+ LOGGER.error(EELFLoggerDelegate.errorLogger, "Creation of blueprint failed. " + UserUtils.getStackTrace(e));
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+ }
+ }
+
+ @RequestMapping(value = { "/" }, method = RequestMethod.DELETE)
+ public ResponseEntity<Boolean> deleteBlueprint(@RequestBody Blueprint blueprint) {
+ try {
+ service.deleteBlueprint(blueprint);
+ return new ResponseEntity<>(true, HttpStatus.OK);
+ } catch (Exception e) {
+ LOGGER.error(EELFLoggerDelegate.errorLogger, "Deletion of blueprint failed. " + UserUtils.getStackTrace(e));
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+ }
+ }
}
import java.util.List;
import org.akraino.validation.ui.entity.BlueprintInstance;
-import org.akraino.validation.ui.service.BlueprintInstanceService;
+import org.akraino.validation.ui.service.DbAdapter;
import org.onap.portalsdk.core.controller.RestrictedBaseController;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.web.support.UserUtils;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(BlueprintInstanceController.class);
@Autowired
- BlueprintInstanceService service;
+ DbAdapter service;
public BlueprintInstanceController() {
super();
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
}
+ @RequestMapping(value = { "/" }, method = RequestMethod.POST)
+ public ResponseEntity<BlueprintInstance> createBlueprintInstance(@RequestBody BlueprintInstance blueprintInstance) {
+ try {
+ service.saveBlueprintInstance(blueprintInstance);
+ return new ResponseEntity<>(blueprintInstance, HttpStatus.OK);
+ } catch (Exception e) {
+ LOGGER.error(EELFLoggerDelegate.errorLogger,
+ "Creation of blueprintInstance failed. " + UserUtils.getStackTrace(e));
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+ }
+ }
+
+ @RequestMapping(value = { "/" }, method = RequestMethod.DELETE)
+ public ResponseEntity<Boolean> deleteBlueprintInstance(@RequestBody BlueprintInstance inst) {
+ try {
+ service.deleteBlueprintInstance(inst);
+ return new ResponseEntity<>(true, HttpStatus.OK);
+ } catch (Exception e) {
+ LOGGER.error(EELFLoggerDelegate.errorLogger,
+ "Deletion of blueprint instance failed. " + UserUtils.getStackTrace(e));
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+ }
+ }
+
}
--- /dev/null
+/*
+ * 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.controller;
+
+import java.util.List;
+
+import org.akraino.validation.ui.entity.BlueprintLayer;
+import org.akraino.validation.ui.service.DbAdapter;
+import org.onap.portalsdk.core.controller.RestrictedBaseController;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.web.support.UserUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+@Controller
+@RequestMapping("/api/v1/layer")
+public class BlueprintLayerController extends RestrictedBaseController {
+
+ private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(BlueprintLayerController.class);
+
+ @Autowired
+ DbAdapter service;
+
+ public BlueprintLayerController() {
+ super();
+ }
+
+ @RequestMapping(value = { "/" }, method = RequestMethod.GET)
+ public ResponseEntity<List<BlueprintLayer>> getBlueprintLayers() {
+ try {
+ return new ResponseEntity<>(service.getBlueprintLayers(), HttpStatus.OK);
+ } catch (Exception e) {
+ LOGGER.error(EELFLoggerDelegate.errorLogger,
+ "Error when trying to get blueprint layers. " + UserUtils.getStackTrace(e));
+ }
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+ }
+
+ @RequestMapping(value = { "/" }, method = RequestMethod.POST)
+ public ResponseEntity<BlueprintLayer> createBlueprintLayer(@RequestBody BlueprintLayer blueprintLayer) {
+ try {
+ service.saveBlueprintLayer(blueprintLayer);
+ return new ResponseEntity<>(blueprintLayer, HttpStatus.OK);
+ } catch (Exception e) {
+ LOGGER.error(EELFLoggerDelegate.errorLogger,
+ "Creation of blueprint layer failed. " + UserUtils.getStackTrace(e));
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+ }
+ }
+
+ @RequestMapping(value = { "/" }, method = RequestMethod.DELETE)
+ public ResponseEntity<Boolean> deleteBlueprintLayer(@RequestBody BlueprintLayer blueprintLayer) {
+ try {
+ service.deleteBlueprintLayer(blueprintLayer);
+ return new ResponseEntity<>(true, HttpStatus.OK);
+ } catch (Exception e) {
+ LOGGER.error(EELFLoggerDelegate.errorLogger,
+ "Deletion of blueprint layer failed. " + UserUtils.getStackTrace(e));
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+ }
+ }
+}
import java.util.List;
import org.akraino.validation.ui.entity.LabInfo;
-import org.akraino.validation.ui.service.LabService;
+import org.akraino.validation.ui.service.DbAdapter;
import org.onap.portalsdk.core.controller.RestrictedBaseController;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.web.support.UserUtils;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(LabController.class);
@Autowired
- LabService service;
+ DbAdapter service;
public LabController() {
super();
}
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
}
+
+ @RequestMapping(value = { "/" }, method = RequestMethod.POST)
+ public ResponseEntity<LabInfo> saveLab(@RequestBody LabInfo labInfo) {
+ try {
+ service.saveLab(labInfo);
+ return new ResponseEntity<>(labInfo, HttpStatus.OK);
+ } catch (Exception e) {
+ LOGGER.error(EELFLoggerDelegate.errorLogger, "Save of lab failed. " + UserUtils.getStackTrace(e));
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+ }
+ }
+
+ @RequestMapping(value = { "/" }, method = RequestMethod.DELETE)
+ public ResponseEntity<Boolean> deleteLab(@RequestBody LabInfo labInfo) {
+ try {
+ service.deleteLab(labInfo);
+ return new ResponseEntity<>(true, HttpStatus.OK);
+ } catch (Exception e) {
+ LOGGER.error(EELFLoggerDelegate.errorLogger, "Deletion of lab failed. " + UserUtils.getStackTrace(e));
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+ }
+ }
}
return new ModelAndView(defaultViewName);
}
+ @RequestMapping(value = { "/registerlab" }, method = RequestMethod.GET)
+ public ModelAndView registerLab(HttpServletRequest request) {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
+ @RequestMapping(value = { "/unregisterlab" }, method = RequestMethod.GET)
+ public ModelAndView unRegisterLab(HttpServletRequest request) {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
+ @RequestMapping(value = { "/modifylab" }, method = RequestMethod.GET)
+ public ModelAndView modifyLab(HttpServletRequest request) {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
+ @RequestMapping(value = { "/getlabs" }, method = RequestMethod.GET)
+ public ModelAndView getLabs(HttpServletRequest request) {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
+ @RequestMapping(value = { "/registerblueprint" }, method = RequestMethod.GET)
+ public ModelAndView registerBlueprint(HttpServletRequest request) {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
+ @RequestMapping(value = { "/unregisterblueprint" }, method = RequestMethod.GET)
+ public ModelAndView unRegisterBlueprint(HttpServletRequest request) {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
+ @RequestMapping(value = { "/getblueprints" }, method = RequestMethod.GET)
+ public ModelAndView getBlueprints(HttpServletRequest request) {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
+ @RequestMapping(value = { "/registerlayer" }, method = RequestMethod.GET)
+ public ModelAndView registerLayer(HttpServletRequest request) {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
+ @RequestMapping(value = { "/unregisterlayer" }, method = RequestMethod.GET)
+ public ModelAndView unRegisterLayer(HttpServletRequest request) {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
+ @RequestMapping(value = { "/getlayers" }, method = RequestMethod.GET)
+ public ModelAndView getLayers(HttpServletRequest request) {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
+ @RequestMapping(value = { "/registertimeslot" }, method = RequestMethod.GET)
+ public ModelAndView registerTimeslot(HttpServletRequest request) {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
+ @RequestMapping(value = { "/gettimeslots" }, method = RequestMethod.GET)
+ public ModelAndView getTimeslots(HttpServletRequest request) {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
+ @RequestMapping(value = { "/registerblueprintinstance" }, method = RequestMethod.GET)
+ public ModelAndView registerBlueprintInstance(HttpServletRequest request) {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
+ @RequestMapping(value = { "/unregisterblueprintinstance" }, method = RequestMethod.GET)
+ public ModelAndView unRegisterBlueprintInstance(HttpServletRequest request) {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
+ @RequestMapping(value = { "/getblueprintinstances" }, method = RequestMethod.GET)
+ public ModelAndView getBlueprintInstances(HttpServletRequest request) {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
+ @RequestMapping(value = { "/modifyblueprintinstance" }, method = RequestMethod.GET)
+ public ModelAndView modifyBlueprintInstance(HttpServletRequest request) {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
@RequestMapping(value = { "/logout.htm" }, method = RequestMethod.GET)
public ModelAndView login() {
Map<String, Object> model = new HashMap<>();
import java.util.Set;
import org.akraino.validation.ui.entity.ValidationDbTestResult;
-import org.akraino.validation.ui.service.DbResultAdapter;
+import org.akraino.validation.ui.service.DbAdapter;
import org.akraino.validation.ui.service.IntegratedResultService;
import org.onap.portalsdk.core.controller.RestrictedBaseController;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
IntegratedResultService resultService;
@Autowired
- DbResultAdapter dbAdapter;
+ DbAdapter dbAdapter;
public ResultController() {
super();
import java.util.List;
import org.akraino.validation.ui.entity.Timeslot;
-import org.akraino.validation.ui.service.TimeslotService;
+import org.akraino.validation.ui.service.DbAdapter;
import org.onap.portalsdk.core.controller.RestrictedBaseController;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.web.support.UserUtils;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
-@RequestMapping("/api/v1/timeslots")
-public class TimeslotsController extends RestrictedBaseController {
+@RequestMapping("/api/v1/timeslot")
+public class TimeslotController extends RestrictedBaseController {
- private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(TimeslotsController.class);
+ private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(TimeslotController.class);
@Autowired
- TimeslotService service;
+ DbAdapter service;
- public TimeslotsController() {
+ public TimeslotController() {
super();
}
return new ResponseEntity<>(service.getTimeslots(), HttpStatus.OK);
} catch (Exception e) {
LOGGER.error(EELFLoggerDelegate.errorLogger,
- "Error occured when trying to retrieve timeslots. " + UserUtils.getStackTrace(e));
+ "Error occured when trying to retrieve timeslots." + UserUtils.getStackTrace(e));
}
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
}
+
+ @RequestMapping(value = { "/" }, method = RequestMethod.POST)
+ public ResponseEntity<Timeslot> createTimeslot(@RequestBody Timeslot timeslot) {
+ try {
+ service.saveTimeslot(timeslot);
+ return new ResponseEntity<>(timeslot, HttpStatus.OK);
+ } catch (Exception e) {
+ LOGGER.error(EELFLoggerDelegate.errorLogger, "Creation of timeslot failed. " + UserUtils.getStackTrace(e));
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+ }
+ }
+
+ @RequestMapping(value = { "/" }, method = RequestMethod.DELETE)
+ public ResponseEntity<Boolean> deleteTimeslot(@RequestBody Timeslot timeslot) {
+ try {
+ service.deleteTimeslot(timeslot);
+ return new ResponseEntity<>(true, HttpStatus.OK);
+ } catch (Exception e) {
+ LOGGER.error(EELFLoggerDelegate.errorLogger, "Deletion of timeslot failed. " + UserUtils.getStackTrace(e));
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+ }
+ }
}
*/
package org.akraino.validation.ui.entity;
+import java.io.IOException;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.web.support.UserUtils;
+
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+
@Entity
@Table(name = "blueprint_instance")
public class BlueprintInstance implements Serializable {
+ private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(BlueprintInstance.class);
+
/**
*
*/
@JoinColumn(name = "blueprint_layer_id") })
private Set<BlueprintLayer> blueprintLayers = new HashSet<>();
+ @ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
+ @JoinTable(name = "blueprint_instance_timeslot", joinColumns = {
+ @JoinColumn(name = "blueprint_instance_id") }, inverseJoinColumns = { @JoinColumn(name = "timeslot_id") })
+ @JsonSerialize(using = TimeslotsSerializer.class)
+ private Set<Timeslot> timeslots = new HashSet<>();
+
public int getBlueprintInstanceId() {
return blueprintInstId;
}
this.blueprintLayers = blueprintLayers;
}
+ public Set<Timeslot> getTimeslots() {
+ return timeslots;
+ }
+
+ public void setTimeslots(Set<Timeslot> timeslots) {
+ this.timeslots = timeslots;
+ }
+
+ static class TimeslotsSerializer extends StdSerializer<Set<Timeslot>> {
+
+ public TimeslotsSerializer() {
+ this(null);
+ }
+
+ public TimeslotsSerializer(Class<Set<Timeslot>> tclass) {
+ super(tclass);
+ }
+
+ @Override
+ public void serialize(Set<Timeslot> timeslots, com.fasterxml.jackson.core.JsonGenerator gen,
+ SerializerProvider provider) throws IOException {
+ Set<Timeslot> results = new HashSet<>();
+ for (Timeslot timeslot : timeslots) {
+ try {
+ Timeslot result = new Timeslot();
+ result.setDuration(timeslot.getDuration());
+ result.setLabInfo(timeslot.getLabInfo());
+ result.setStartDateTime(timeslot.getStartDateTime());
+ result.setTimeslotId(timeslot.getTimeslotId());
+ results.add(result);
+ } catch (Exception ex) {
+ LOGGER.error(EELFLoggerDelegate.errorLogger,
+ "Error when serializing." + UserUtils.getStackTrace(ex));
+ }
+ }
+ gen.writeObject(results);
+ }
+ }
+
}
public LabInfo getLabInfo() {
return labInfo;
}
+
}
+++ /dev/null
-/*
- * 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.service;
-
-import java.util.List;
-
-import org.akraino.validation.ui.dao.BlueprintInstanceDAO;
-import org.akraino.validation.ui.entity.Blueprint;
-import org.akraino.validation.ui.entity.BlueprintInstance;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-@Service
-@Transactional
-public class BlueprintInstanceService {
-
- @Autowired
- private BlueprintInstanceDAO dao;
-
- public void saveBlueprintInstance(BlueprintInstance blueprintIns) {
- dao.saveOrUpdate(blueprintIns);
- }
-
- public List<BlueprintInstance> getBlueprintInstances() {
- return dao.getBlueprintInstances();
- }
-
- public BlueprintInstance getBlueprintInstance(int instId) {
- return dao.getBlueprintInstance(instId);
- }
-
- public BlueprintInstance getBlueprintInstance(Blueprint blueprint, String version) {
- return dao.getBlueprintInstance(blueprint, version);
- }
-
- public void deleteAll() {
- dao.deleteAll();
- }
-
-}
+++ /dev/null
-/*
- * 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.service;
-
-import java.util.List;
-
-import org.akraino.validation.ui.dao.BlueprintLayerDAO;
-import org.akraino.validation.ui.entity.BlueprintLayer;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-@Service
-@Transactional
-public class BlueprintLayerService {
-
- @Autowired
- private BlueprintLayerDAO layerDAO;
-
- public void saveBlueprintLayer(BlueprintLayer layer) {
- layerDAO.saveOrUpdate(layer);
- }
-
- public BlueprintLayer getBlueprintLayer(Integer layerId) {
- return layerDAO.getBlueprintLayer(layerId);
- }
-
- public BlueprintLayer getBlueprintLayer(String layerData) {
- return layerDAO.getBlueprintLayer(layerData);
- }
-
- public List<BlueprintLayer> getBlueprintLayers() {
- return layerDAO.getBlueprintLayers();
- }
-
- public void deleteAll() {
- layerDAO.deleteAll();
- }
-
-}
+++ /dev/null
-/*
- * 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.service;
-
-import java.util.List;
-
-import org.akraino.validation.ui.dao.BlueprintDAO;
-import org.akraino.validation.ui.entity.Blueprint;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-@Service
-@Transactional
-public class BlueprintService {
-
- @Autowired
- private BlueprintDAO blueprintDAO;
-
- public void saveBlueprint(Blueprint blueprint) {
- blueprintDAO.saveOrUpdate(blueprint);
- }
-
- public Blueprint getBlueprint(String name) {
- return blueprintDAO.getBlueprint(name);
- }
-
- public List<Blueprint> getBlueprints() {
- return blueprintDAO.getBlueprints();
- }
-
- public void deleteAll() {
- blueprintDAO.deleteAll();
- }
-
-}
import javax.annotation.Nonnull;
+import org.akraino.validation.ui.dao.BlueprintDAO;
+import org.akraino.validation.ui.dao.BlueprintInstanceDAO;
+import org.akraino.validation.ui.dao.BlueprintLayerDAO;
+import org.akraino.validation.ui.dao.LabDAO;
+import org.akraino.validation.ui.dao.TimeslotDAO;
import org.akraino.validation.ui.dao.ValidationTestResultDAO;
import org.akraino.validation.ui.dao.WRobotTestResultDAO;
import org.akraino.validation.ui.data.JnksJobNotify;
import org.akraino.validation.ui.entity.BlueprintLayer;
import org.akraino.validation.ui.entity.LabInfo;
import org.akraino.validation.ui.entity.Submission;
+import org.akraino.validation.ui.entity.Timeslot;
import org.akraino.validation.ui.entity.ValidationDbTestResult;
import org.akraino.validation.ui.entity.WRobotDbTestResult;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
@Service
@Transactional
-public class DbResultAdapter {
+public class DbAdapter {
- private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(DbResultAdapter.class);
+ private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(DbAdapter.class);
private static final Object LOCK = new Object();
- @Autowired
- LabService labService;
-
@Autowired
private ValidationTestResultDAO vTestResultDAO;
private WRobotTestResultDAO wRobotDAO;
@Autowired
- DbSubmissionAdapter subService;
+ private LabDAO labDAO;
+
+ @Autowired
+ private BlueprintLayerDAO layerDAO;
@Autowired
- BlueprintService blueprintService;
+ private BlueprintInstanceDAO bluInstDao;
@Autowired
- BlueprintInstanceService blueprintInstService;
+ private BlueprintDAO blueprintDAO;
@Autowired
- BlueprintLayerService layerService;
+ private TimeslotDAO timeslotDAO;
+
+ @Autowired
+ DbSubmissionAdapter subService;
public void associateSubmissionWithValidationResult(Submission submission)
throws JsonParseException, JsonMappingException, IOException {
synchronized (LOCK) {
if (!compareBluInstances(submission.getValidationDbTestResult().getBlueprintInstance(),
- blueprintInstService.getBlueprintInstance(
+ bluInstDao.getBlueprintInstance(
submission.getValidationDbTestResult().getBlueprintInstance().getBlueprintInstanceId()))) {
throw new RuntimeException("Blueprint instance data changed.");
}
+ if (!compareTimeslots(submission.getTimeslot(),
+ timeslotDAO.getTimeslot(submission.getTimeslot().getTimeslotId()))) {
+ throw new RuntimeException("Timeslot data changed.");
+ }
+
+ boolean canContinue = false;
+ for (Timeslot timeslot : bluInstDao
+ .getBlueprintInstance(
+ submission.getValidationDbTestResult().getBlueprintInstance().getBlueprintInstanceId())
+ .getTimeslots()) {
+ if (compareTimeslots(timeslot, submission.getTimeslot())) {
+ canContinue = true;
+ break;
+ }
+ }
+ if (!canContinue) {
+ throw new RuntimeException("Configured timeslot is no longer assigned to the blueprint instance.");
+ }
submission.getValidationDbTestResult().setSubmission(submission);
vTestResultDAO.saveOrUpdate(submission.getValidationDbTestResult());
if (submission.getValidationDbTestResult().getWRobotDbTestResults() != null) {
if (!checkValidityOfNexusResult(vNexusResult)) {
continue;
}
- LabInfo labInfo = labService.getLabBasedOnSilo(vNexusResult.getLab().getSilo());
+ LabInfo labInfo = labDAO.getLabBasedOnSilo(vNexusResult.getLab().getSilo());
ValidationDbTestResult vDbResult = vTestResultDAO.getValidationTestResult(labInfo,
vNexusResult.getTimestamp());
if (vDbResult == null) {
vDbResult = vNexusResult;
vDbResult.setLab(labInfo);
- Blueprint blueprint = blueprintService
+ Blueprint blueprint = blueprintDAO
.getBlueprint(vNexusResult.getBlueprintInstance().getBlueprint().getBlueprintName());
if (blueprint == null) {
blueprint = vNexusResult.getBlueprintInstance().getBlueprint();
- blueprintService.saveBlueprint(blueprint);
+ blueprintDAO.saveOrUpdate(blueprint);
}
- BlueprintInstance blueprintInst = blueprintInstService.getBlueprintInstance(blueprint,
+ BlueprintInstance blueprintInst = bluInstDao.getBlueprintInstance(blueprint,
(vNexusResult.getBlueprintInstance().getVersion()));
if (blueprintInst == null) {
blueprintInst = vNexusResult.getBlueprintInstance();
blueprintInst.setBlueprint(blueprint);
- blueprintInstService.saveBlueprintInstance(blueprintInst);
+ bluInstDao.saveOrUpdate(blueprintInst);
}
vDbResult.setBlueprintInstance(blueprintInst);
}
synchronized (LOCK) {
LabInfo actualLabInfo = null;
if (lab != null) {
- actualLabInfo = labService.getLab(lab);
+ actualLabInfo = labDAO.getLab(lab);
if (actualLabInfo == null) {
return null;
}
}
Blueprint blueprint = null;
if (blueprintName != null) {
- blueprint = blueprintService.getBlueprint(blueprintName);
+ blueprint = blueprintDAO.getBlueprint(blueprintName);
if (blueprint == null) {
return null;
}
}
- BlueprintInstance blueprintInst = blueprintInstService.getBlueprintInstance(blueprint, version);
+ BlueprintInstance blueprintInst = bluInstDao.getBlueprintInstance(blueprint, version);
if (blueprintInst == null) {
return null;
}
public ValidationDbTestResult readResultFromDb(@Nonnull String lab, @Nonnull String timestamp)
throws JsonParseException, JsonMappingException, IOException {
synchronized (LOCK) {
- LabInfo actualLabInfo = labService.getLab(lab);
+ LabInfo actualLabInfo = labDAO.getLab(lab);
ValidationDbTestResult vDbResult = vTestResultDAO.getValidationTestResult(actualLabInfo, timestamp);
if (vDbResult == null) {
return null;
if (vNexusResults == null || vNexusResults.size() < 1) {
return;
}
- LabInfo labInfo = labService.getLabBasedOnSilo(vNexusResults.get(0).getLab().getSilo());
+ LabInfo labInfo = labDAO.getLabBasedOnSilo(vNexusResults.get(0).getLab().getSilo());
if (labInfo == null) {
return;
}
- Blueprint blueprint = blueprintService
+ Blueprint blueprint = blueprintDAO
.getBlueprint(vNexusResults.get(0).getBlueprintInstance().getBlueprint().getBlueprintName());
if (blueprint == null) {
return;
}
- BlueprintInstance blueInst = blueprintInstService.getBlueprintInstance(blueprint,
+ BlueprintInstance blueInst = bluInstDao.getBlueprintInstance(blueprint,
vNexusResults.get(0).getBlueprintInstance().getVersion());
if (blueInst == null) {
return;
String dbTimestamp = vDbResult.getTimestamp();
LabInfo dbLabInfo = vDbResult.getLab();
for (ValidationDbTestResult vNexusResult : vNexusResults) {
- LabInfo nexusLabInfo = labService.getLabBasedOnSilo(vNexusResult.getLab().getSilo());
+ LabInfo nexusLabInfo = labDAO.getLabBasedOnSilo(vNexusResult.getLab().getSilo());
if (nexusLabInfo == null) {
continue;
}
synchronized (LOCK) {
Blueprint blueprint = null;
if (blueprintName != null) {
- blueprint = blueprintService.getBlueprint(blueprintName);
+ blueprint = blueprintDAO.getBlueprint(blueprintName);
if (blueprint == null) {
return null;
}
}
- BlueprintInstance bluInst = blueprintInstService.getBlueprintInstance(blueprint, version);
+ BlueprintInstance bluInst = bluInstDao.getBlueprintInstance(blueprint, version);
if (bluInst == null) {
return null;
}
public ValidationDbTestResult getValidationTestResult(String labSilo, String timestamp) {
synchronized (LOCK) {
- return vTestResultDAO.getValidationTestResult(labService.getLabBasedOnSilo(labSilo), timestamp);
+ return vTestResultDAO.getValidationTestResult(labDAO.getLabBasedOnSilo(labSilo), timestamp);
}
}
}
}
+ public void saveLab(LabInfo lab) {
+ synchronized (LOCK) {
+ labDAO.saveOrUpdate(lab);
+ }
+ }
+
+ public void deleteLab(LabInfo lab) {
+ synchronized (LOCK) {
+ labDAO.deleteLab(lab);
+ }
+ }
+
+ public LabInfo getLab(String lab) {
+ synchronized (LOCK) {
+ return labDAO.getLab(lab);
+ }
+ }
+
+ public LabInfo getLabBasedOnSilo(String silo) {
+ synchronized (LOCK) {
+ return labDAO.getLabBasedOnSilo(silo);
+ }
+ }
+
+ public List<LabInfo> getLabs() {
+ synchronized (LOCK) {
+ return labDAO.getLabs();
+ }
+ }
+
+ public void deleteLabAll() {
+ synchronized (LOCK) {
+ labDAO.deleteAll();
+ }
+ }
+
+ public void saveBlueprintInstance(BlueprintInstance blueprintIns) {
+ synchronized (LOCK) {
+ Set<Timeslot> timeslots = blueprintIns.getTimeslots();
+ if (timeslots != null && timeslots.size() > 1) {
+ for (Timeslot timeslot : timeslots) {
+ if (!compareTimeslots(timeslot, timeslotDAO.getTimeslot(timeslot.getTimeslotId()))) {
+ throw new RuntimeException("Timeslot instance data changed.");
+ }
+ }
+ bluInstDao.merge(blueprintIns);
+ return;
+ }
+ bluInstDao.saveOrUpdate(blueprintIns);
+ }
+ }
+
+ public List<BlueprintInstance> getBlueprintInstances() {
+ synchronized (LOCK) {
+ return bluInstDao.getBlueprintInstances();
+ }
+ }
+
+ public BlueprintInstance getBlueprintInstance(int instId) {
+ synchronized (LOCK) {
+ return bluInstDao.getBlueprintInstance(instId);
+ }
+ }
+
+ public BlueprintInstance getBlueprintInstance(Blueprint blueprint, String version) {
+ synchronized (LOCK) {
+ return bluInstDao.getBlueprintInstance(blueprint, version);
+ }
+ }
+
+ public void deleteBlueprintInstance(BlueprintInstance blueprintIns) {
+ synchronized (LOCK) {
+ bluInstDao.deleteBlueprintInstance(blueprintIns);
+ }
+ }
+
+ public void deleteBluInstAll() {
+ synchronized (LOCK) {
+ bluInstDao.deleteAll();
+ }
+ }
+
+ public void saveBlueprintLayer(BlueprintLayer layer) {
+ synchronized (LOCK) {
+ layerDAO.saveOrUpdate(layer);
+ }
+ }
+
+ public BlueprintLayer getBlueprintLayer(Integer layerId) {
+ synchronized (LOCK) {
+ return layerDAO.getBlueprintLayer(layerId);
+ }
+ }
+
+ public BlueprintLayer getBlueprintLayer(String layerData) {
+ synchronized (LOCK) {
+ return layerDAO.getBlueprintLayer(layerData);
+ }
+ }
+
+ public List<BlueprintLayer> getBlueprintLayers() {
+ synchronized (LOCK) {
+ return layerDAO.getBlueprintLayers();
+ }
+ }
+
+ public void deleteBlueprintLayer(BlueprintLayer layer) {
+ synchronized (LOCK) {
+ layerDAO.deleteBlueprintLayer(layer);
+ }
+ }
+
+ public void deleteBluLayersAll() {
+ synchronized (LOCK) {
+ layerDAO.deleteAll();
+ }
+ }
+
+ public void saveBlueprint(Blueprint blueprint) {
+ synchronized (LOCK) {
+ blueprintDAO.saveOrUpdate(blueprint);
+ }
+ }
+
+ public Blueprint getBlueprint(String name) {
+ synchronized (LOCK) {
+ return blueprintDAO.getBlueprint(name);
+ }
+ }
+
+ public List<Blueprint> getBlueprints() {
+ synchronized (LOCK) {
+ return blueprintDAO.getBlueprints();
+ }
+ }
+
+ public void deleteBlueprint(Blueprint blueprint) {
+ synchronized (LOCK) {
+ blueprintDAO.deleteBlueprint(blueprint);
+ }
+ }
+
+ public void deleteBluAll() {
+ synchronized (LOCK) {
+ blueprintDAO.deleteAll();
+ }
+ }
+
+ public void saveTimeslot(Timeslot timeslot) {
+ synchronized (LOCK) {
+ LabInfo labInfo = timeslot.getLabInfo();
+ if (labInfo != null) {
+ if (!compareLabInfos(labInfo, labDAO.getLab(labInfo.getLabId()))) {
+ throw new RuntimeException("Lab data changed.");
+ }
+ }
+ timeslotDAO.saveOrUpdate(timeslot);
+ }
+ }
+
+ public List<Timeslot> getTimeslots() {
+ synchronized (LOCK) {
+ return timeslotDAO.getTimeslots();
+ }
+ }
+
+ public void deleteTimeslot(Timeslot timeslot) {
+ synchronized (LOCK) {
+ timeslotDAO.deleteTimeslot(timeslot);
+ }
+ }
+
+ public void deleteTimeslotAll() {
+ synchronized (LOCK) {
+ timeslotDAO.deleteAll();
+ }
+ }
+
public boolean checkValidityOfNexusResult(ValidationDbTestResult vNexusResult) {
if (vNexusResult == null) {
return true;
}
- LabInfo labInfo = labService.getLabBasedOnSilo(vNexusResult.getLab().getSilo());
+ LabInfo labInfo = labDAO.getLabBasedOnSilo(vNexusResult.getLab().getSilo());
if (labInfo == null) {
throw new RuntimeException("Lab silo : " + vNexusResult.getLab().getSilo() + " not found");
}
ValidationDbTestResult vDbResult = vTestResultDAO.getValidationTestResult(
- labService.getLabBasedOnSilo(vNexusResult.getLab().getSilo()), vNexusResult.getTimestamp());
+ labDAO.getLabBasedOnSilo(vNexusResult.getLab().getSilo()), vNexusResult.getTimestamp());
Blueprint blueprint = null;
BlueprintInstance bluInst = null;
List<WRobotDbTestResult> wRobotDbResults = null;
labInfo = vDbResult.getLab();
wRobotDbResults = wRobotDAO.getWRobotTestResult(vDbResult);
} else {
- blueprint = blueprintService
+ blueprint = blueprintDAO
.getBlueprint(vNexusResult.getBlueprintInstance().getBlueprint().getBlueprintName());
}
if (blueprint != null) {
if (vDbResult != null) {
bluInst = vDbResult.getBlueprintInstance();
} else {
- bluInst = blueprintInstService.getBlueprintInstance(blueprint,
- vNexusResult.getBlueprintInstance().getVersion());
+ bluInst = bluInstDao.getBlueprintInstance(blueprint, vNexusResult.getBlueprintInstance().getVersion());
}
}
// Start comparison, be elastic with allLayers and optional
.equals(vDbTimestamp.getBlueprintInstance().getBlueprint().getBlueprintName())
|| !vDbSubmission.getBlueprintInstance().getVersion()
.equals(vDbTimestamp.getBlueprintInstance().getVersion())
- || !vDbSubmission.getLab().equals(vDbTimestamp.getLab())) {
+ || !compareLabInfos(vDbSubmission.getLab(), vDbTimestamp.getLab())) {
LOGGER.error(EELFLoggerDelegate.errorLogger, "No consistency exists in database records.");
return false;
}
}
private void updateBlueInstLayers(ValidationDbTestResult vNexusResult) {
- for (BlueprintInstance blueprintInst : blueprintInstService.getBlueprintInstances()) {
+ for (BlueprintInstance blueprintInst : bluInstDao.getBlueprintInstances()) {
if (!blueprintInst.getBlueprint().getBlueprintName()
.equals(vNexusResult.getBlueprintInstance().getBlueprint().getBlueprintName())) {
continue;
blueprintLayers = new HashSet<BlueprintLayer>();
}
for (WRobotDbTestResult nexusResult : vNexusResult.getWRobotDbTestResults()) {
- BlueprintLayer layer = layerService.getBlueprintLayer(nexusResult.getLayer());
+ BlueprintLayer layer = layerDAO.getBlueprintLayer(nexusResult.getLayer());
if (layer == null) {
layer = new BlueprintLayer();
layer.setLayer(nexusResult.getLayer());
- layerService.saveBlueprintLayer(layer);
+ layerDAO.saveOrUpdate(layer);
}
if (!blueprintLayers.contains(layer)) {
blueprintLayers.add(layer);
}
}
blueprintInst.setBlueprintLayers(blueprintLayers);
- blueprintInstService.saveBlueprintInstance(blueprintInst);
+ bluInstDao.saveOrUpdate(blueprintInst);
}
}
return false;
}
}
- Blueprint blueprint1 = inst1.getBlueprint();
- Blueprint blueprint2 = inst2.getBlueprint();
- if (blueprint1.getBlueprintId() != blueprint2.getBlueprintId()) {
+ if (!compareBlueprints(inst1.getBlueprint(), inst2.getBlueprint())) {
+ return false;
+ }
+ return true;
+ }
+
+ private boolean compareTimeslots(Timeslot timeslot1, Timeslot timeslot2) {
+ if (!timeslot1.getStartDateTime().equals(timeslot2.getStartDateTime())
+ || timeslot1.getTimeslotId() != timeslot2.getTimeslotId()) {
return false;
}
- if (!blueprint1.getBlueprintName().equals(blueprint2.getBlueprintName())) {
+ if (!compareLabInfos(timeslot1.getLabInfo(), timeslot2.getLabInfo())) {
return false;
}
return true;
}
+ private boolean compareBlueprints(Blueprint blueprint1, Blueprint blueprint2) {
+ if (blueprint1 != null || blueprint2 != null) {
+ if (blueprint1 != null && blueprint2 == null) {
+ return false;
+ }
+ if (blueprint1 == null && blueprint2 != null) {
+ return false;
+ }
+ if (blueprint1.getBlueprintId() != blueprint2.getBlueprintId()) {
+ return false;
+ }
+ if (!blueprint1.getBlueprintName().equals(blueprint2.getBlueprintName())) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private boolean compareLabInfos(LabInfo labInfo1, LabInfo labInfo2) {
+ if (labInfo1 != null || labInfo2 != null) {
+ if (labInfo1 != null && labInfo2 == null) {
+ return false;
+ }
+ if (labInfo1 == null && labInfo2 != null) {
+ return false;
+ }
+ if (labInfo1.getLabId() != labInfo2.getLabId()) {
+ return false;
+ }
+ if (!labInfo1.getSilo().equals(labInfo2.getSilo())) {
+ return false;
+ }
+ if (!labInfo1.getLab().equals(labInfo2.getLab())) {
+ return false;
+ }
+ }
+ return true;
+ }
+
}
private JenkinsExecutorClient jenkinsService;
@Autowired
- private DbResultAdapter dbAdapter;
-
- @Autowired
- BlueprintInstanceService bluInstService;
+ private DbAdapter dbAdapter;
public Submission saveSubmission(Submission submission)
throws JsonParseException, JsonMappingException, IOException {
import org.akraino.validation.ui.entity.LabInfo;
import org.akraino.validation.ui.entity.Submission;
import org.akraino.validation.ui.entity.ValidationDbTestResult;
+import org.apache.commons.httpclient.HttpException;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.web.support.UserUtils;
import org.springframework.beans.factory.annotation.Autowired;
NexusExecutorClient nexusService;
@Autowired
- LabService labService;
-
- @Autowired
- DbResultAdapter dbAdapter;
+ DbAdapter dbAdapter;
public List<String> getLabsFromNexus()
throws JsonParseException, JsonMappingException, KeyManagementException, ClientHandlerException,
UniformInterfaceException, NoSuchAlgorithmException, IOException, IllegalArgumentException, ParseException {
List<String> labs = new ArrayList<String>();
for (String cLabSilo : nexusService.getResource(null)) {
- for (LabInfo labInfo : labService.getLabs()) {
+ for (LabInfo labInfo : dbAdapter.getLabs()) {
if (labInfo.getSilo().equals(cLabSilo)) {
labs.add(labInfo.getLab());
}
public List<String> getBlueprintNamesOfLabFromNexus(@Nonnull String lab)
throws JsonParseException, JsonMappingException, KeyManagementException, ClientHandlerException,
UniformInterfaceException, NoSuchAlgorithmException, IOException, IllegalArgumentException, ParseException {
- LabInfo labInfo = labService.getLab(lab);
+ LabInfo labInfo = dbAdapter.getLab(lab);
if (labInfo == null) {
throw new IllegalArgumentException("Could not retrieve lab : " + lab.toString());
}
- List<String> cNames = nexusService.getResource(labService.getLab(lab).getSilo());
List<String> rNames = new ArrayList<String>();
- for (String cName : cNames) {
- if (cName.equals("family") || cName.equals("ta") || cName.equals("job")) {
- continue;
+ try {
+ List<String> cNames = nexusService.getResource(dbAdapter.getLab(lab).getSilo() + "/bluval_results");
+ for (String cName : cNames) {
+ if (cName.equals("family") || cName.equals("ta") || cName.equals("job")) {
+ continue;
+ }
+ rNames.add(cName);
}
- rNames.add(cName);
+ } catch (HttpException ex) {
+ LOGGER.warn(EELFLoggerDelegate.auditLogger,
+ "Error when retrieving blueprint names from nexus" + UserUtils.getStackTrace(ex));
}
return rNames;
}
public List<String> getBlueprintVersionsFromNexus(@Nonnull String name, @Nonnull String lab)
throws JsonParseException, JsonMappingException, KeyManagementException, ClientHandlerException,
UniformInterfaceException, NoSuchAlgorithmException, IOException, IllegalArgumentException, ParseException {
- LabInfo labInfo = labService.getLab(lab);
+ LabInfo labInfo = dbAdapter.getLab(lab);
if (labInfo == null) {
throw new IllegalArgumentException("Could not retrieve lab : " + lab.toString());
}
- return nexusService.getResource(labInfo.getSilo(), name);
+ return nexusService.getResource(labInfo.getSilo() + "/bluval_results", name);
}
public List<String> getBlueprintTimeStampsFromNexus(@Nonnull String name, @Nonnull String version,
@Nonnull String lab) throws JsonParseException, JsonMappingException, KeyManagementException,
ClientHandlerException, UniformInterfaceException, NoSuchAlgorithmException, IOException, ParseException {
- LabInfo labInfo = labService.getLab(lab);
+ LabInfo labInfo = dbAdapter.getLab(lab);
if (labInfo == null) {
throw new IllegalArgumentException("Could not retrieve lab : " + lab.toString());
}
- return nexusService.getResource(labInfo.getSilo(), name, version);
+ List<String> timestamps = new ArrayList<String>();
+ try {
+ timestamps = nexusService.getResource(labInfo.getSilo() + "/bluval_results", name, version);
+ } catch (HttpException ex) {
+ LOGGER.warn(EELFLoggerDelegate.auditLogger,
+ "Error when retrieving blueprint names from nexus" + UserUtils.getStackTrace(ex));
+ }
+ return timestamps;
}
public List<ValidationDbTestResult> getResultsFromNexus(@Nonnull String name, @Nonnull String version,
@Nonnull String lab, int noTimestamps)
throws JsonParseException, JsonMappingException, KeyManagementException, ClientHandlerException,
UniformInterfaceException, NoSuchAlgorithmException, IOException, IllegalArgumentException, ParseException {
- LabInfo labInfo = labService.getLab(lab);
+ LabInfo labInfo = dbAdapter.getLab(lab);
if (labInfo == null) {
throw new IllegalArgumentException("Could not retrieve lab : " + lab.toString());
}
@Nonnull String timestamp) throws JsonParseException, JsonMappingException, IOException,
KeyManagementException, ClientHandlerException, UniformInterfaceException, NoSuchAlgorithmException,
NullPointerException, ParseException {
- LabInfo labInfo = labService.getLab(lab);
+ LabInfo labInfo = dbAdapter.getLab(lab);
if (labInfo == null) {
throw new IllegalArgumentException("Could not retrieve lab : " + lab.toString());
}
@Nonnull String lab, Boolean allLayers, Boolean optional, boolean outcome)
throws JsonParseException, JsonMappingException, KeyManagementException, ClientHandlerException,
UniformInterfaceException, NoSuchAlgorithmException, NullPointerException, IOException, ParseException {
- LabInfo labInfo = labService.getLab(lab);
+ LabInfo labInfo = dbAdapter.getLab(lab);
if (labInfo == null) {
throw new IllegalArgumentException("Could not retrieve lab : " + lab.toString());
}
@Nonnull String lab, @Nonnull List<String> layers, Boolean optional, boolean outcome)
throws JsonParseException, JsonMappingException, KeyManagementException, ClientHandlerException,
UniformInterfaceException, NoSuchAlgorithmException, NullPointerException, IOException, ParseException {
- LabInfo labInfo = labService.getLab(lab);
+ LabInfo labInfo = dbAdapter.getLab(lab);
if (labInfo == null) {
throw new IllegalArgumentException("Could not retrieve lab : " + lab.toString());
}
@Nonnull String lab, @Nonnull Date date)
throws JsonParseException, JsonMappingException, IOException, ParseException, KeyManagementException,
ClientHandlerException, UniformInterfaceException, NoSuchAlgorithmException, NullPointerException {
- LabInfo labInfo = labService.getLab(lab);
+ LabInfo labInfo = dbAdapter.getLab(lab);
if (labInfo == null) {
throw new IllegalArgumentException("Could not retrieve lab : " + lab.toString());
}
@Nonnull String timestamp)
throws JsonParseException, JsonMappingException, KeyManagementException, ClientHandlerException,
UniformInterfaceException, NoSuchAlgorithmException, NullPointerException, IOException, ParseException {
- LabInfo actualLabInfo = labService.getLab(lab);
+ LabInfo actualLabInfo = dbAdapter.getLab(lab);
if (actualLabInfo == null) {
return null;
}
@Nonnull String lab, Boolean allLayers, Boolean optional, boolean outcome)
throws JsonParseException, JsonMappingException, KeyManagementException, ClientHandlerException,
UniformInterfaceException, NoSuchAlgorithmException, IOException, NullPointerException, ParseException {
- LabInfo actualLabInfo = labService.getLab(lab);
+ LabInfo actualLabInfo = dbAdapter.getLab(lab);
if (actualLabInfo == null) {
return null;
}
@Nonnull String lab, List<String> layers, Boolean optional, boolean outcome)
throws JsonParseException, JsonMappingException, KeyManagementException, ClientHandlerException,
UniformInterfaceException, NoSuchAlgorithmException, IOException, NullPointerException, ParseException {
- LabInfo actualLabInfo = labService.getLab(lab);
+ LabInfo actualLabInfo = dbAdapter.getLab(lab);
if (actualLabInfo == null) {
return null;
}
private DbSubmissionAdapter submissionService;
@Autowired
- private DbResultAdapter dbAdapter;
+ private DbAdapter dbAdapter;
@Autowired
private IntegratedResultService iService;
- @Autowired
- private LabService labService;
-
@Autowired
private ValidationTestResultDAO vTestResultDAO;
LOGGER.debug(EELFLoggerDelegate.debugLogger, "No related submission was found");
return;
}
- LabInfo labInfo = labService.getLab(submission.getTimeslot().getLabInfo().getLab());
+ LabInfo labInfo = dbAdapter.getLab(submission.getTimeslot().getLabInfo().getLab());
if (labInfo == null) {
throw new IllegalArgumentException(
"Could not retrieve lab : " + submission.getTimeslot().getLabInfo().getLab().toString());
+++ /dev/null
-/*
- * 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.service;
-
-import java.util.List;
-
-import org.akraino.validation.ui.dao.LabDAO;
-import org.akraino.validation.ui.entity.LabInfo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-@Service
-@Transactional
-public class LabService {
-
- @Autowired
- private LabDAO labDAO;
-
- public void saveLab(LabInfo lab) {
- labDAO.saveOrUpdate(lab);
- }
-
- public LabInfo getLab(String lab) {
- return labDAO.getLab(lab);
- }
-
- public LabInfo getLabBasedOnSilo(String silo) {
- return labDAO.getLabBasedOnSilo(silo);
- }
-
- public List<LabInfo> getLabs() {
- return labDAO.getLabs();
- }
-
- public void deleteAll() {
- labDAO.deleteAll();
- }
-
-}
+++ /dev/null
-/*
- * 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.service;
-
-import java.util.List;
-
-import org.akraino.validation.ui.dao.TimeslotDAO;
-import org.akraino.validation.ui.entity.Timeslot;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-@Service
-@Transactional
-public class TimeslotService {
-
- @Autowired
- private TimeslotDAO timeslotDAO;
-
- public void saveTimeslot(Timeslot timeslot) {
- timeslotDAO.saveOrUpdate(timeslot);
- }
-
- public List<Timeslot> getTimeslots() {
- return timeslotDAO.getTimeslots();
- }
-
- public void deleteAll() {
- timeslotDAO.deleteAll();
- }
-
-}
<definition name="validationresults"
template="/app/BluvalUI/ValidationResults/ValidationResults.html" />
+ <definition name="registerlab"
+ template="/app/BluvalUI/RegisterLab/RegisterLab.html" />
+
+ <definition name="unregisterlab"
+ template="/app/BluvalUI/UnRegisterLab/UnRegisterLab.html" />
+
+ <definition name="registerblueprint"
+ template="/app/BluvalUI/RegisterBlueprint/RegisterBlueprint.html" />
+
+ <definition name="unregisterblueprint"
+ template="/app/BluvalUI/UnRegisterBlueprint/UnRegisterBlueprint.html" />
+
+ <definition name="registerlayer"
+ template="/app/BluvalUI/RegisterLayer/RegisterLayer.html" />
+
+ <definition name="unregisterlayer"
+ template="/app/BluvalUI/UnRegisterLayer/UnRegisterLayer.html" />
+
+ <definition name="registertimeslot"
+ template="/app/BluvalUI/RegisterTimeslot/RegisterTimeslot.html" />
+
+ <definition name="registerblueprintinstance"
+ template="/app/BluvalUI/RegisterBlueprintInstance/RegisterBlueprintInstance.html" />
+
+ <definition name="unregisterblueprintinstance"
+ template="/app/BluvalUI/UnRegisterBlueprintInstance/UnRegisterBlueprintInstance.html" />
+
+ <definition name="modifylab"
+ template="/app/BluvalUI/ModifyLab/ModifyLab.html" />
+
+ <definition name="modifyblueprintinstance"
+ template="/app/BluvalUI/ModifyBlueprintInstance/ModifyBlueprintInstance.html" />
+
+ <definition name="getlabs"
+ template="/app/BluvalUI/GetLabs/GetLabs.html" />
+
+ <definition name="getblueprints"
+ template="/app/BluvalUI/GetBlueprints/GetBlueprints.html" />
+
+ <definition name="getlayers"
+ template="/app/BluvalUI/GetLayers/GetLayers.html" />
+
+ <definition name="gettimeslots"
+ template="/app/BluvalUI/GetTimeslots/GetTimeslots.html" />
+
+ <definition name="getblueprintinstances"
+ template="/app/BluvalUI/GetBlueprintInstances/GetBlueprintInstances.html" />
+
</tiles-definitions>
* limitations under the License.
*/
-var services = angular.module('App.Services', ['App.Config']);
+var services = angular.module('App.Services', [ 'App.Config' ]);
services.factory('restAPISvc', [
- '$http',
- 'appContext',
- function ($http, appContext) {
- var svc = [];
- svc.getRestAPI = function (path, cb) {
- return $http({
- method: 'GET',
- url: appContext + path,
- headers: {
- 'Content-Type': "application/json",
- 'Accept': "application/json"
- }
- }).then(
- function (response) {
- if (response.status == 200) {
- cb(response.data);
- } else {
- /* eslint-disable no-console */
- console.log("Get REST API error: "
- + response.statusText);
- /* eslint-enable no-console */
- cb(null);
+ '$http',
+ 'appContext',
+ function($http, appContext) {
+ var svc = [];
+ svc.getRestAPI = function(path, cb) {
+ return $http({
+ method : 'GET',
+ url : appContext + path,
+ headers : {
+ 'Content-Type' : "application/json",
+ 'Accept' : "application/json"
}
- },
- function (error) {
- /* eslint-disable no-console */
- console.log("Get REST API error: "
- + error.statusText);
- /* eslint-enable no-console */
- cb(null);
- });
- };
- svc.postRestAPI = function (path, json, cb) {
- return $http({
- method: 'POST',
- url: appContext + path,
- headers: {
- 'Content-Type': "application/json",
- 'Accept': "application/json"
- },
- data: json
- }).then(
- function (response) {
- if (response.status == 200
- || response.status == 201) {
- cb(response.data);
- } else {
- /* eslint-disable no-console */
- console.log("Post REST API error: "
- + response.statusText);
- /* eslint-enable no-console */
- cb(null);
- }
- },
- function (error) {
- /* eslint-disable no-console */
- console.log("Post REST API error: "
- + error.statusText);
- /* eslint-enable no-console */
- cb(null);
- });
- };
- svc.deleteRestAPI = function (path, json) {
- return $http({
- method: 'DELETE',
- url: appContext + path,
- headers: {
- 'Content-Type': "application/json",
- 'Accept': "application/json"
- },
- data: json
- }).then(
- function (response) {
- if (response.status !== 200) {
- /* eslint-disable no-console */
- console.log("Delete REST API error: "
- + response.statusText);
- /* eslint-enable no-console */
- }
- },
- function (error) {
- /* eslint-disable no-console */
- console.log("Delete REST API error: "
- + error.statusText);
- /* eslint-enable no-console */
- });
- };
- return svc;
- }]);
+ }).then(
+ function(response) {
+ if (response.status == 200) {
+ cb(response.data);
+ } else {
+ /* eslint-disable no-console */
+ console.log("Get REST API error: "
+ + response.statusText);
+ /* eslint-enable no-console */
+ cb(null);
+ }
+ },
+ function(error) {
+ /* eslint-disable no-console */
+ console.log("Get REST API error: "
+ + error.statusText);
+ /* eslint-enable no-console */
+ cb(null);
+ });
+ };
+ svc.postRestAPI = function(path, json, cb) {
+ return $http({
+ method : 'POST',
+ url : appContext + path,
+ headers : {
+ 'Content-Type' : "application/json",
+ 'Accept' : "application/json"
+ },
+ data : json
+ }).then(
+ function(response) {
+ if (response.status == 200
+ || response.status == 201) {
+ cb(response.data);
+ } else {
+ /* eslint-disable no-console */
+ console.log("Post REST API error: "
+ + response.statusText);
+ /* eslint-enable no-console */
+ cb(null);
+ }
+ },
+ function(error) {
+ /* eslint-disable no-console */
+ console.log("Post REST API error: "
+ + error.statusText);
+ /* eslint-enable no-console */
+ cb(null);
+ });
+ };
+ svc.deleteRestAPI = function(path, json, cb) {
+ return $http({
+ method : 'DELETE',
+ url : appContext + path,
+ headers : {
+ 'Content-Type' : "application/json",
+ 'Accept' : "application/json"
+ },
+ data : json
+ }).then(
+ function(response) {
+ if (response.status !== 200) {
+ /* eslint-disable no-console */
+ console.log("Delete REST API error: "
+ + response.statusText);
+ /* eslint-enable no-console */
+ cb(null);
+ }
+ cb(response.data);
+ },
+ function(error) {
+ /* eslint-disable no-console */
+ console.log("Delete REST API error: "
+ + error.statusText);
+ /* eslint-enable no-console */
+ cb(null);
+ });
+ };
+ return svc;
+ } ]);
-services.factory("sharedContext", function () {
+services.factory("sharedContext", function() {
var context = [];
- var addData = function (key, value) {
+ var addData = function(key, value) {
var data = {
- key: key,
- value: value
+ key : key,
+ value : value
};
context.push(data);
}
- var getData = function (key) {
+ var getData = function(key) {
var data = [];
- angular
- .forEach(
- context,
- function (pair) {
- if (pair.key === key) {
- data = pair.value;
- }
- });
+ angular.forEach(context, function(pair) {
+ if (pair.key === key) {
+ data = pair.value;
+ }
+ });
return data;
}
return {
- addData: addData,
- getData: getData
+ addData : addData,
+ getData : getData
}
});
\ No newline at end of file
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Get Blueprint Instances</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/styles/ecomp.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+ src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+ src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+ src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script
+ src="app/BluvalUI/GetBlueprintInstances/GetBlueprintInstances.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script
+ src="app/BluvalUI/GetBlueprintInstances/GetBlueprintInstancesController.js"></script>
+<script src="app/BluvalUI/GetBlueprintInstances/Route.js"></script>
+
+<style>
+.controls {
+ margin-bottom: 20px;
+}
+
+.page-header {
+ margin-top: 20px;
+}
+
+ul {
+ list-style: none;
+}
+
+.box {
+ height: 100%;
+ border: 1px solid #ccc;
+ background-color: #fff;
+ position: relative;
+ overflow: hidden;
+}
+
+.box-header {
+ background-color: #eee;
+ padding: 0px 0px 0px 0px;
+ margin-bottom: -25px;
+ cursor: move;
+ position: relative;
+}
+
+.box-header h3 {
+ margin-top: 0px;
+ display: inline-block;
+}
+
+.box-content {
+ padding: 10px;
+ display: block;
+ height: 100%;
+ position: relative;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+
+.box-header-btns {
+ top: 15px;
+ right: 10px;
+ cursor: pointer;
+ position: absolute;
+}
+
+.gridster {
+ border: none;
+ position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+ border: none;
+ display: block;
+}
+
+.box table tr {
+ line-height: 20px;
+}
+
+.box table th {
+ border: none;
+ line-height: 20px;
+}
+
+.menu-container {
+ margin-top: 0px
+}
+
+.handle-e {
+ width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="GetBlueprintInstances">
+ <div ds2-Header class="header-container"></div>
+ <div ds2-menu id="menuContainer" class="menu-container"></div>
+ <div ng-view id="rightContentProfile" class="content-container"></div>
+ <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var appDS2 = angular.module("GetBlueprintInstances", [ 'ngRoute', 'ngMessages',
+ 'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+ 'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var app = angular.module('GetBlueprintInstances');
+app.controller('GetBlueprintInstancesController', function($scope, restAPISvc) {
+
+ initialize();
+
+ function initialize() {
+ $scope.loadingBlueprintInstances = true;
+ $scope.blueprintInstanceInfos = [];
+ restAPISvc.getRestAPI("/api/v1/blueprintinstance/", function(data) {
+ if (data) {
+ $scope.blueprintInstanceInfos = data;
+ } else {
+ confirm("No blueprint instances found");
+ }
+ $scope.loadingBlueprintInstances = false;
+ });
+ }
+});
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+ <style>
+ul.ul-layer {
+ list-style: none;
+ padding-left: 0;
+ margin-top: 25px;
+}
+
+li.li-layer {
+ border: 1px solid black;
+ display: inline-block;
+ padding: 5px 10px;
+ margin-right: 5px;
+ margin-bottom: 5px;
+ text-transform: capitalize;
+}
+</style>
+ <div>
+ <h1 class="heading-page">Get Blueprint Instances</h1>
+
+ <div ng-show="loadingBlueprintInstances">
+ <img src=" static/fusion/images/giphy.gif" />
+ </div>
+
+ <h2 class="heading-small"></h2>
+ <table class="table table-striped table-bordered">
+ <thead>
+ <tr style="background-color: grey;">
+ <th class>Id </th>
+ <th class>Version </th>
+ <th class>Blueprint </th>
+ <th class>Layer(s) </th>
+ <th class>Timeslot(s) </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr class="border_bottom"
+ ng-repeat="blueprintInstanceInfo in blueprintInstanceInfos">
+ <td class
+ style="padding-left: 10px; font-size: 15px; width: 13%;">
+ {{ blueprintInstanceInfo.blueprintInstanceId }}</td>
+ <td class
+ style="padding-left: 10px; font-size: 15px; width: 13%;">
+ {{ blueprintInstanceInfo.version }}</td>
+ <td class
+ style="padding-left: 10px; font-size: 15px; width: 13%;">
+ {{ blueprintInstanceInfo.blueprint.blueprintName
+ }}</td>
+ <td class
+ style="padding-left: 10px; font-size: 15px; width: 13%;">
+ <ul class="ul-layer">
+ <li
+ ng-repeat="layer in blueprintInstanceInfo.blueprintLayers"
+ class="li-layer">{{layer.layer}}</li>
+ </ul>
+ </td>
+ <td class
+ style="padding-left: 10px; font-size: 15px; width: 13%;">
+ <ul class="ul-layer">
+ <li
+ ng-repeat="timeslot in blueprintInstanceInfo.timeslots"
+ class="li-layer">Lab:
+ {{timeslot.labInfo.lab}}, Start Date and
+ Time: {{timeslot.startDateTime}}</li>
+ </ul>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+
+ </div>
+</div>
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+appDS2
+ .config(function($routeProvider) {
+ $routeProvider
+ .otherwise({
+ templateUrl : 'app/BluvalUI/GetBlueprintInstances/GetBlueprintInstancesTemplate.html',
+ controller : "GetBlueprintInstancesController"
+ });
+ });
\ No newline at end of file
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Get Blueprints</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/styles/ecomp.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+ src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+ src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+ src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script src="app/BluvalUI/GetBlueprints/GetBlueprints.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script src="app/BluvalUI/GetBlueprints/GetBlueprintsController.js"></script>
+<script src="app/BluvalUI/GetBlueprints/Route.js"></script>
+
+<style>
+.controls {
+ margin-bottom: 20px;
+}
+
+.page-header {
+ margin-top: 20px;
+}
+
+ul {
+ list-style: none;
+}
+
+.box {
+ height: 100%;
+ border: 1px solid #ccc;
+ background-color: #fff;
+ position: relative;
+ overflow: hidden;
+}
+
+.box-header {
+ background-color: #eee;
+ padding: 0px 0px 0px 0px;
+ margin-bottom: -25px;
+ cursor: move;
+ position: relative;
+}
+
+.box-header h3 {
+ margin-top: 0px;
+ display: inline-block;
+}
+
+.box-content {
+ padding: 10px;
+ display: block;
+ height: 100%;
+ position: relative;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+
+.box-header-btns {
+ top: 15px;
+ right: 10px;
+ cursor: pointer;
+ position: absolute;
+}
+
+.gridster {
+ border: none;
+ position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+ border: none;
+ display: block;
+}
+
+.box table tr {
+ line-height: 20px;
+}
+
+.box table th {
+ border: none;
+ line-height: 20px;
+}
+
+.menu-container {
+ margin-top: 0px
+}
+
+.handle-e {
+ width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="GetBlueprints">
+ <div ds2-Header class="header-container"></div>
+ <div ds2-menu id="menuContainer" class="menu-container"></div>
+ <div ng-view id="rightContentProfile" class="content-container"></div>
+ <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var appDS2 = angular.module("GetBlueprints", [ 'ngRoute', 'ngMessages',
+ 'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+ 'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var app = angular.module('GetBlueprints');
+app.controller('GetBlueprintsController', function($scope, restAPISvc) {
+
+ initialize();
+
+ function initialize() {
+ $scope.loadingBlueprints = true;
+ $scope.blueprintInfos = [];
+ restAPISvc.getRestAPI("/api/v1/blueprint/", function(data) {
+ if (data) {
+ $scope.blueprintInfos = data;
+ } else {
+ confirm("No blueprints found");
+ }
+ $scope.loadingBlueprints = false;
+ });
+ }
+
+});
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+ <div>
+ <h1 class="heading-page">Get Blueprints</h1>
+
+ <div ng-show="loadingBlueprints">
+ <img src=" static/fusion/images/giphy.gif" />
+ </div>
+
+ <h2 class="heading-small"></h2>
+ <table class="table table-striped table-bordered">
+ <thead>
+ <tr style="background-color: grey;">
+ <th class>Id </th>
+ <th class>Name </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr class="border_bottom"
+ ng-repeat="blueprintInfo in blueprintInfos">
+ <td class
+ style="padding-left: 10px; font-size: 15px; width: 13%;">
+ {{ blueprintInfo.blueprintId }}</td>
+ <td class
+ style="padding-left: 10px; font-size: 15px; width: 13%;">
+ {{ blueprintInfo.blueprintName }}</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+appDS2.config(function($routeProvider) {
+ $routeProvider.otherwise({
+ templateUrl : 'app/BluvalUI/GetBlueprints/GetBlueprintsTemplate.html',
+ controller : "GetBlueprintsController"
+ });
+});
\ No newline at end of file
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Get Lab</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/styles/ecomp.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+ src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+ src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+ src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script src="app/BluvalUI/GetLabs/GetLabs.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script src="app/BluvalUI/GetLabs/GetLabsController.js"></script>
+<script src="app/BluvalUI/GetLabs/Route.js"></script>
+
+<style>
+.controls {
+ margin-bottom: 20px;
+}
+
+.page-header {
+ margin-top: 20px;
+}
+
+ul {
+ list-style: none;
+}
+
+.box {
+ height: 100%;
+ border: 1px solid #ccc;
+ background-color: #fff;
+ position: relative;
+ overflow: hidden;
+}
+
+.box-header {
+ background-color: #eee;
+ padding: 0px 0px 0px 0px;
+ margin-bottom: -25px;
+ cursor: move;
+ position: relative;
+}
+
+.box-header h3 {
+ margin-top: 0px;
+ display: inline-block;
+}
+
+.box-content {
+ padding: 10px;
+ display: block;
+ height: 100%;
+ position: relative;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+
+.box-header-btns {
+ top: 15px;
+ right: 10px;
+ cursor: pointer;
+ position: absolute;
+}
+
+.gridster {
+ border: none;
+ position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+ border: none;
+ display: block;
+}
+
+.box table tr {
+ line-height: 20px;
+}
+
+.box table th {
+ border: none;
+ line-height: 20px;
+}
+
+.menu-container {
+ margin-top: 0px
+}
+
+.handle-e {
+ width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="GetLabs">
+ <div ds2-Header class="header-container"></div>
+ <div ds2-menu id="menuContainer" class="menu-container"></div>
+ <div ng-view id="rightContentProfile" class="content-container"></div>
+ <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var appDS2 = angular.module("GetLabs", [ 'ngRoute', 'ngMessages',
+ 'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+ 'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var app = angular.module('GetLabs');
+app.controller('GetLabsController', function($scope, restAPISvc) {
+
+ initialize();
+
+ function initialize() {
+ $scope.loadingLabs = true;
+ $scope.labInfos = [];
+ restAPISvc.getRestAPI("/api/v1/lab/", function(data) {
+ if (data) {
+ $scope.labInfos = data;
+ } else {
+ confirm("No labs found");
+ }
+ $scope.loadingLabs = false;
+ });
+ }
+
+});
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+ <div>
+ <h1 class="heading-page">Get Labs</h1>
+
+ <div ng-show="loadingLabs">
+ <img src=" static/fusion/images/giphy.gif" />
+ </div>
+
+ <h2 class="heading-small"></h2>
+ <table class="table table-striped table-bordered">
+ <thead>
+ <tr style="background-color: grey;">
+ <th class>Id </th>
+ <th class>Lab </th>
+ <th class>Silo </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr class="border_bottom"
+ ng-repeat="labInfo in labInfos">
+ <td class
+ style="padding-left: 10px; font-size: 15px; width: 13%;">
+ {{ labInfo.labId }}</td>
+ <td class
+ style="padding-left: 10px; font-size: 15px; width: 13%;">
+ {{ labInfo.lab }}</td>
+ <td class
+ style="padding-left: 10px; font-size: 15px; width: 13%;">{{
+ labInfo.silo }}</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+appDS2.config(function($routeProvider) {
+ $routeProvider.otherwise({
+ templateUrl : 'app/BluvalUI/GetLabs/GetLabsTemplate.html',
+ controller : "GetLabsController"
+ });
+});
\ No newline at end of file
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Get Layers</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/styles/ecomp.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+ src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+ src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+ src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script src="app/BluvalUI/GetLayers/GetLayers.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script src="app/BluvalUI/GetLayers/GetLayersController.js"></script>
+<script src="app/BluvalUI/GetLayers/Route.js"></script>
+
+<style>
+.controls {
+ margin-bottom: 20px;
+}
+
+.page-header {
+ margin-top: 20px;
+}
+
+ul {
+ list-style: none;
+}
+
+.box {
+ height: 100%;
+ border: 1px solid #ccc;
+ background-color: #fff;
+ position: relative;
+ overflow: hidden;
+}
+
+.box-header {
+ background-color: #eee;
+ padding: 0px 0px 0px 0px;
+ margin-bottom: -25px;
+ cursor: move;
+ position: relative;
+}
+
+.box-header h3 {
+ margin-top: 0px;
+ display: inline-block;
+}
+
+.box-content {
+ padding: 10px;
+ display: block;
+ height: 100%;
+ position: relative;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+
+.box-header-btns {
+ top: 15px;
+ right: 10px;
+ cursor: pointer;
+ position: absolute;
+}
+
+.gridster {
+ border: none;
+ position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+ border: none;
+ display: block;
+}
+
+.box table tr {
+ line-height: 20px;
+}
+
+.box table th {
+ border: none;
+ line-height: 20px;
+}
+
+.menu-container {
+ margin-top: 0px
+}
+
+.handle-e {
+ width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="GetLayers">
+ <div ds2-Header class="header-container"></div>
+ <div ds2-menu id="menuContainer" class="menu-container"></div>
+ <div ng-view id="rightContentProfile" class="content-container"></div>
+ <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var appDS2 = angular.module("GetLayers", [ 'ngRoute', 'ngMessages',
+ 'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+ 'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var app = angular.module('GetLayers');
+app.controller('GetLayersController', function($scope, restAPISvc) {
+
+ initialize();
+
+ function initialize() {
+ $scope.loadingLayers = true;
+ $scope.layerInfos = [];
+ restAPISvc.getRestAPI("/api/v1/layer/", function(data) {
+ if (data) {
+ $scope.layerInfos = data;
+ } else {
+ confirm("No blueprint layers found");
+ }
+ $scope.loadingLayers = false;
+ });
+ }
+});
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+ <div>
+ <h1 class="heading-page">Get Layers</h1>
+
+ <div ng-show="loadingLayers">
+ <img src=" static/fusion/images/giphy.gif" />
+ </div>
+
+ <h2 class="heading-small"></h2>
+ <table class="table table-striped table-bordered">
+ <thead>
+ <tr style="background-color: grey;">
+ <th class>Id </th>
+ <th class>Layer </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr class="border_bottom"
+ ng-repeat="layerInfo in layerInfos">
+ <td class
+ style="padding-left: 10px; font-size: 15px; width: 13%;">
+ {{ layerInfo.blueprintLayerId }}</td>
+ <td class
+ style="padding-left: 10px; font-size: 15px; width: 13%;">
+ {{ layerInfo.layer }}</td>
+ </tr>
+ </tbody>
+ </table>
+
+ </div>
+</div>
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+appDS2.config(function($routeProvider) {
+ $routeProvider.otherwise({
+ templateUrl : 'app/BluvalUI/GetLayers/GetLayersTemplate.html',
+ controller : "GetLayersController"
+ });
+});
\ No newline at end of file
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Get Timeslots</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/styles/ecomp.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+ src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+ src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+ src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script src="app/BluvalUI/GetTimeslots/GetTimeslots.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script src="app/BluvalUI/GetTimeslots/GetTimeslotsController.js"></script>
+<script src="app/BluvalUI/GetTimeslots/Route.js"></script>
+
+<style>
+.controls {
+ margin-bottom: 20px;
+}
+
+.page-header {
+ margin-top: 20px;
+}
+
+ul {
+ list-style: none;
+}
+
+.box {
+ height: 100%;
+ border: 1px solid #ccc;
+ background-color: #fff;
+ position: relative;
+ overflow: hidden;
+}
+
+.box-header {
+ background-color: #eee;
+ padding: 0px 0px 0px 0px;
+ margin-bottom: -25px;
+ cursor: move;
+ position: relative;
+}
+
+.box-header h3 {
+ margin-top: 0px;
+ display: inline-block;
+}
+
+.box-content {
+ padding: 10px;
+ display: block;
+ height: 100%;
+ position: relative;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+
+.box-header-btns {
+ top: 15px;
+ right: 10px;
+ cursor: pointer;
+ position: absolute;
+}
+
+.gridster {
+ border: none;
+ position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+ border: none;
+ display: block;
+}
+
+.box table tr {
+ line-height: 20px;
+}
+
+.box table th {
+ border: none;
+ line-height: 20px;
+}
+
+.menu-container {
+ margin-top: 0px
+}
+
+.handle-e {
+ width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="GetTimeslots">
+ <div ds2-Header class="header-container"></div>
+ <div ds2-menu id="menuContainer" class="menu-container"></div>
+ <div ng-view id="rightContentProfile" class="content-container"></div>
+ <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var appDS2 = angular.module("GetTimeslots", [ 'ngRoute', 'ngMessages',
+ 'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+ 'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var app = angular.module('GetTimeslots');
+app.controller('GetTimeslotsController', function($scope, restAPISvc) {
+
+ initialize();
+
+ function initialize() {
+ $scope.loadingTimeslots = true;
+ $scope.timeslotInfos = [];
+ restAPISvc.getRestAPI("/api/v1/timeslot/", function(data) {
+ if (data) {
+ $scope.timeslotInfos = data;
+ } else {
+ confirm("No timeslots found");
+ }
+ $scope.loadingTimeslots = false;
+ });
+ }
+});
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+ <div>
+ <h1 class="heading-page">Get Timeslots</h1>
+
+ <div ng-show="loadingTimeslots">
+ <img src=" static/fusion/images/giphy.gif" />
+ </div>
+
+ <h2 class="heading-small"></h2>
+ <table class="table table-striped table-bordered">
+ <thead>
+ <tr style="background-color: grey;">
+ <th class>Id </th>
+ <th class>Start date and time </th>
+ <th class>Lab </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr class="border_bottom"
+ ng-repeat="timeslotInfo in timeslotInfos">
+ <td class
+ style="padding-left: 10px; font-size: 15px; width: 13%;">
+ {{ timeslotInfo.timeslotId }}</td>
+ <td class
+ style="padding-left: 10px; font-size: 15px; width: 13%;">
+ {{ timeslotInfo.startDateTime }}</td>
+ <td class
+ style="padding-left: 10px; font-size: 15px; width: 13%;">
+ {{ timeslotInfo.labInfo.lab }}</td>
+ </tr>
+ </tbody>
+ </table>
+
+ </div>
+</div>
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+appDS2.config(function($routeProvider) {
+ $routeProvider.otherwise({
+ templateUrl : 'app/BluvalUI/GetTimeslots/GetTimeslotsTemplate.html',
+ controller : "GetTimeslotsController"
+ });
+});
\ No newline at end of file
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Modify Blueprint Instance</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/styles/ecomp.css">
+
+<link rel="stylesheet"
+ href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+ src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+ src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+ src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script
+ src="app/BluvalUI/ModifyBlueprintInstance/ModifyBlueprintInstance.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script
+ src="app/BluvalUI/ModifyBlueprintInstance/ModifyBlueprintInstanceController.js"></script>
+<script src="app/BluvalUI/ModifyBlueprintInstance/Route.js"></script>
+
+<style>
+.controls {
+ margin-bottom: 20px;
+}
+
+.page-header {
+ margin-top: 20px;
+}
+
+ul {
+ list-style: none;
+}
+
+.box {
+ height: 100%;
+ border: 1px solid #ccc;
+ background-color: #fff;
+ position: relative;
+ overflow: hidden;
+}
+
+.box-header {
+ background-color: #eee;
+ padding: 0px 0px 0px 0px;
+ margin-bottom: -25px;
+ cursor: move;
+ position: relative;
+}
+
+.box-header h3 {
+ margin-top: 0px;
+ display: inline-block;
+}
+
+.box-content {
+ padding: 10px;
+ display: block;
+ height: 100%;
+ position: relative;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+
+.box-header-btns {
+ top: 15px;
+ right: 10px;
+ cursor: pointer;
+ position: absolute;
+}
+
+.gridster {
+ border: none;
+ position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+ border: none;
+ display: block;
+}
+
+.box table tr {
+ line-height: 20px;
+}
+
+.box table th {
+ border: none;
+ line-height: 20px;
+}
+
+.menu-container {
+ margin-top: 0px
+}
+
+.handle-e {
+ width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="ModifyBlueprintInstance">
+ <div ds2-Header class="header-container"></div>
+ <div ds2-menu id="menuContainer" class="menu-container"></div>
+ <div ng-view id="rightContentProfile" class="content-container"></div>
+ <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var appDS2 = angular.module("ModifyBlueprintInstance", [ 'ngRoute',
+ 'ngMessages', 'modalServices', 'ngCookies', 'b2b.att', 'gridster',
+ 'ui.bootstrap', 'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var app = angular.module('ModifyBlueprintInstance');
+app
+ .controller(
+ 'ModifyBlueprintInstanceController',
+ function($scope, restAPISvc) {
+
+ initialize();
+
+ function initialize() {
+ $scope.loadingBlueprintInstances = true;
+ $scope.loadingLayers = true;
+ $scope.blueprintInstanceInfos = [];
+ $scope.declerativeInsts = [];
+ $scope.selectedBlueprintInstance = '';
+ $scope.layers = [];
+ $scope.layerInfos = [];
+ $scope.selectedLayer = '';
+ $scope.configuredLayers = [];
+ $scope.oldLayers = [];
+ $scope.newLayers = [];
+ restAPISvc
+ .getRestAPI(
+ "/api/v1/blueprintinstance/",
+ function(data) {
+ if (data) {
+ $scope.blueprintInstanceInfos = data;
+ angular
+ .forEach(
+ data,
+ function(
+ blueprintInstance) {
+ var temp = "id: "
+ + blueprintInstance.blueprintInstanceId
+ + " name: "
+ + blueprintInstance["blueprint"]["blueprintName"]
+ + " version: "
+ + blueprintInstance["version"];
+ $scope.declerativeInsts
+ .push(temp);
+ restAPISvc
+ .getRestAPI(
+ "/api/v1/layer/",
+ function(
+ data2) {
+ if (data2) {
+ $scope.layerInfos = data2;
+ angular
+ .forEach(
+ data2,
+ function(
+ layer) {
+ if ($scope.layers
+ .indexOf(layer.layer) === -1) {
+ $scope.layers
+ .push(layer.layer);
+ }
+ });
+ } else {
+ confirm("No layers found");
+ }
+ });
+ });
+ } else {
+ confirm("No blueprint instances found");
+ }
+ $scope.loadingBlueprintInstances = false;
+ $scope.loadingLayers = false;
+ });
+ }
+
+ $scope.selectedBlueprintInstanceChange = function() {
+ $scope.oldLayers = [];
+ $scope.newLayers = [];
+ var finalBlueprintInstanceInfo = '';
+ var id = $scope.selectedBlueprintInstance
+ .substring($scope.selectedBlueprintInstance
+ .indexOf("id:") + 4,
+ $scope.selectedBlueprintInstance
+ .indexOf("name") - 1);
+ angular
+ .forEach(
+ $scope.blueprintInstanceInfos,
+ function(blueprintInstanceInfo) {
+ if (blueprintInstanceInfo.blueprintInstanceId
+ .toString().trim() === id
+ .toString().trim()) {
+ finalBlueprintInstanceInfo = blueprintInstanceInfo;
+ }
+ });
+ if (!finalBlueprintInstanceInfo) {
+ confirm("Error in blueprint instance data");
+ return;
+ }
+ angular.forEach(
+ finalBlueprintInstanceInfo.blueprintLayers,
+ function(layer) {
+ $scope.oldLayers.push(layer.layer);
+ });
+ }
+
+ $scope.addConfiguredLayer = function(configuredLayer) {
+ if ($scope.configuredLayers.indexOf(configuredLayer
+ .trim()) === -1) {
+ $scope.configuredLayers.push(configuredLayer);
+ }
+ }
+
+ $scope.deleteConfiguredLayer = function(index) {
+ $scope.configuredLayers.splice(index, 1);
+ }
+
+ $scope.modify = function() {
+ if (!$scope.selectedBlueprintInstance
+ || !$scope.configuredLayers
+ || $scope.configuredLayers.length === 0) {
+ confirm("You must specify all the data");
+ return;
+ }
+ var finalBlueprintInstanceInfo = '';
+ var id = $scope.selectedBlueprintInstance
+ .substring($scope.selectedBlueprintInstance
+ .indexOf("id:") + 4,
+ $scope.selectedBlueprintInstance
+ .indexOf("name") - 1);
+ angular
+ .forEach(
+ $scope.blueprintInstanceInfos,
+ function(blueprintInstanceInfo) {
+ if (blueprintInstanceInfo.blueprintInstanceId
+ .toString().trim() === id
+ .toString().trim()) {
+ finalBlueprintInstanceInfo = blueprintInstanceInfo;
+ }
+ });
+ if (!finalBlueprintInstanceInfo) {
+ confirm("Error in blueprint instance data");
+ return;
+ }
+
+ var blueprintLayers = [];
+ angular.forEach($scope.layerInfos, function(layerInfo) {
+ if ($scope.configuredLayers
+ .indexOf(layerInfo.layer) !== -1) {
+ blueprintLayers.push(layerInfo);
+ }
+ });
+ if (!blueprintLayers || blueprintLayers.length === 0) {
+ confirm("Error in blueprint layers data");
+ return;
+ }
+ finalBlueprintInstanceInfo.blueprintLayers = blueprintLayers;
+ restAPISvc
+ .postRestAPI(
+ "/api/v1/blueprintinstance/",
+ finalBlueprintInstanceInfo,
+ function(data) {
+ if (data) {
+ var confirmText = "The blueprint instance has been modified successfully.";
+ confirm(confirmText);
+ } else {
+ confirm("Error when modifying the blueprint instance");
+ }
+ initialize();
+ });
+ }
+ });
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+ <style>
+$
+melon
+:
+
+#F97D75
+
+ ; $ black
+:
+
+#2E3641
+
+ ; *
+
+button {
+ background-color: $melon;
+ border: 0;
+ padding: 8px 20px;
+ color: white;
+ text-transform: uppercase;
+ cursor: pointer;
+ &:
+ focus
+ ,
+ &
+ :
+ active
+ {
+
+
+
+ outline
+ :
+
+
+
+ 0;
+}
+
+}
+ul.ul-layer {
+ list-style: none;
+ padding-left: 0;
+ margin-top: 25px;
+}
+
+li.li-layer {
+ border: 1px solid black;
+ display: inline-block;
+ padding: 5px 10px;
+ margin-right: 5px;
+ margin-bottom: 5px;
+ text-transform: capitalize;
+}
+
+.fa-close {
+ cursor: pointer;
+}
+</style>
+ <div>
+ <h1 class="heading-page">Modify Blueprint Instance</h1>
+
+ <div>
+ <div class="form-row">
+ <label for="textinputID-3a">Select Blueprint
+ Instance: </label> <select
+ ng-model="selectedBlueprintInstance"
+ ng-change="selectedBlueprintInstanceChange()"
+ ng-options="v for v in declerativeInsts">
+ </select>
+ </div>
+ </div>
+ <br> <label for="textinputID-3a">Old layers: </label>
+ <ul class="ul-layer">
+ <li ng-repeat="oldLayer in oldLayers" class="li-layer">
+ {{oldLayer}}</li>
+ </ul>
+ <br>
+
+ <div ng-show="loadingBlueprintInstances || loadingLayers">
+ <img src=" static/fusion/images/giphy.gif" />
+ </div>
+
+ <div ng-if="selectedBlueprintInstance">
+ <label for="textinputID-3a">New Layers: </label>
+ <div>
+ <div class="form-row">
+ <label for="textinputID-3a">Add Layer: </label> <select
+ ng-model="selectedLayer"
+ ng-change="selectedLayerChange()"
+ ng-options="v for v in layers">
+ </select>
+ <button ng-disabled="!selectedLayer"
+ ng-click="addConfiguredLayer(selectedLayer)">Add</button>
+ </div>
+ </div>
+ <br>
+
+ <ul class="ul-layer">
+ <li ng-repeat="configuredLayer in configuredLayers"
+ class="li-layer"><span
+ ng-click="deleteConfiguredLayer($index)"><i
+ class="fa fa-close"></i></span> {{configuredLayer}}</li>
+ </ul>
+
+ <div class="fn-ebz-container"
+ style="position: relative; top: 25px;">
+ <button href="javascript:void(0)" id="addbtn"
+ style="bottom: -17px;" size="small"
+ att-accessibility-click="13,32"
+ class="btn btn-alt btn-small" ng-click="modify();">Modify</button>
+ </div>
+ </div>
+ </div>
+</div>
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+appDS2
+ .config(function($routeProvider) {
+ $routeProvider
+ .otherwise({
+ templateUrl : 'app/BluvalUI/ModifyBlueprintInstance/ModifyBlueprintInstanceTemplate.html',
+ controller : "ModifyBlueprintInstanceController"
+ });
+ });
\ No newline at end of file
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Modify Lab</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/styles/ecomp.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+ src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+ src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+ src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script src="app/BluvalUI/ModifyLab/ModifyLab.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script src="app/BluvalUI/ModifyLab/ModifyLabController.js"></script>
+<script src="app/BluvalUI/ModifyLab/Route.js"></script>
+
+<style>
+.controls {
+ margin-bottom: 20px;
+}
+
+.page-header {
+ margin-top: 20px;
+}
+
+ul {
+ list-style: none;
+}
+
+.box {
+ height: 100%;
+ border: 1px solid #ccc;
+ background-color: #fff;
+ position: relative;
+ overflow: hidden;
+}
+
+.box-header {
+ background-color: #eee;
+ padding: 0px 0px 0px 0px;
+ margin-bottom: -25px;
+ cursor: move;
+ position: relative;
+}
+
+.box-header h3 {
+ margin-top: 0px;
+ display: inline-block;
+}
+
+.box-content {
+ padding: 10px;
+ display: block;
+ height: 100%;
+ position: relative;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+
+.box-header-btns {
+ top: 15px;
+ right: 10px;
+ cursor: pointer;
+ position: absolute;
+}
+
+.gridster {
+ border: none;
+ position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+ border: none;
+ display: block;
+}
+
+.box table tr {
+ line-height: 20px;
+}
+
+.box table th {
+ border: none;
+ line-height: 20px;
+}
+
+.menu-container {
+ margin-top: 0px
+}
+
+.handle-e {
+ width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="ModifyLab">
+ <div ds2-Header class="header-container"></div>
+ <div ds2-menu id="menuContainer" class="menu-container"></div>
+ <div ng-view id="rightContentProfile" class="content-container"></div>
+ <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var appDS2 = angular.module("ModifyLab", [ 'ngRoute', 'ngMessages',
+ 'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+ 'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var app = angular.module('ModifyLab');
+app
+ .controller(
+ 'ModifyLabController',
+ function($scope, restAPISvc) {
+
+ initialize();
+
+ function initialize() {
+ $scope.loadingLabs = true;
+ $scope.labInfos = [];
+ $scope.labs = [];
+ $scope.selectedLab = '';
+ $scope.oldName = '';
+ $scope.oldSilo = '';
+ $scope.newData = {};
+ restAPISvc.getRestAPI("/api/v1/lab/", function(data) {
+ if (data) {
+ $scope.labInfos = data;
+ angular.forEach(data, function(lab) {
+ $scope.labs.push(lab.lab);
+ });
+ } else {
+ confirm("No labs found");
+ }
+ $scope.loadingLabs = false;
+ });
+ }
+
+ $scope.selectedLabChange = function() {
+ $scope.oldName = '';
+ $scope.oldSilo = '';
+ $scope.newData = {};
+ var finalLabInfo = '';
+ angular.forEach($scope.labInfos, function(labInfo) {
+ if ($scope.selectedLab.trim() === labInfo.lab
+ .trim()) {
+ finalLabInfo = labInfo;
+ }
+ });
+ if (!finalLabInfo) {
+ confirm("Error in lab info");
+ return;
+ }
+ $scope.oldName = finalLabInfo.lab;
+ $scope.oldSilo = finalLabInfo.silo;
+ }
+
+ $scope.modify = function() {
+ if (!$scope.selectedLab || !$scope.newData.name
+ || !$scope.newData.silo) {
+ confirm("You must specify all the values");
+ return;
+ }
+ var finalLabInfo = '';
+ angular.forEach($scope.labInfos, function(labInfo) {
+ if ($scope.selectedLab.trim() === labInfo.lab
+ .trim()) {
+ finalLabInfo = labInfo;
+ }
+ });
+ if (!finalLabInfo) {
+ confirm("Error in lab info");
+ return;
+ }
+ finalLabInfo.lab = $scope.newData.name;
+ finalLabInfo.silo = $scope.newData.silo;
+ restAPISvc
+ .postRestAPI(
+ "/api/v1/lab/",
+ finalLabInfo,
+ function(data) {
+ if (data) {
+ var confirmText = "The lab has been modified successfully."
+ confirm(confirmText);
+ } else {
+ confirm("Error when modifying the lab");
+ }
+ initialize();
+ });
+ }
+ });
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+ <div>
+ <h1 class="heading-page">Modify Lab</h1>
+
+ <div>
+ <div class="form-row">
+ <label for="textinputID-3a">Select lab: </label> <select
+ ng-model="selectedLab"
+ ng-change="selectedLabChange()"
+ ng-options="v for v in labs">
+ </select>
+ </div>
+ </div>
+ <br>
+
+ <div ng-show="loadingLabs">
+ <img src=" static/fusion/images/giphy.gif" />
+ </div>
+
+ <div class="Column" ng-if="oldName">
+ <div class="form-row">
+ <label for="textinputID-3a">Old name : </label> <input
+ ng-model="oldName" readonly></input>
+ </div>
+ </div>
+ <br>
+
+ <div class="Column" ng-if="oldSilo">
+ <div class="form-row">
+ <label for="textinputID-3a">Old silo : </label> <input
+ ng-model="oldSilo" readonly></input>
+ </div>
+ </div>
+ <br>
+
+ <div class="Column" ng-if="oldName">
+ <div class="form-row">
+ <label for="textinputID-3a">Define new lab name:
+ </label> <input ng-model="newData.name"</input>
+ </div>
+ </div>
+ <br>
+
+ <div class="Column" ng-if="oldSilo">
+ <div class="form-row">
+ <label for="textinputID-3a">Define new lab silo:
+ </label> <input ng-model="newData.silo"</input>
+ </div>
+ </div>
+ <br>
+
+ <div class="fn-ebz-container"
+ style="position: relative; top: 25px;">
+ <button href="javascript:void(0)" id="addbtn"
+ style="bottom: -17px;" size="small"
+ att-accessibility-click="13,32"
+ class="btn btn-alt btn-small" ng-click="modify();">Modify</button>
+ </div>
+ </div>
+</div>
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+appDS2.config(function($routeProvider) {
+ $routeProvider.otherwise({
+ templateUrl : 'app/BluvalUI/ModifyLab/ModifyLabTemplate.html',
+ controller : "ModifyLabController"
+ });
+});
\ No newline at end of file
function initialize() {
$scope.blueprintInstances = [];
+ $scope.blueprintInstance = '';
$scope.blueprintNames = [];
$scope.blueprintVersions = [];
+ $scope.declerativeTimeslots = [];
$scope.blueprintLayers = [];
$scope.optionals = [];
- $scope.selectedBlueprintName = {};
- $scope.selectedBlueprintVersion = {};
- $scope.selectedBlueprintLayer = {};
- $scope.selectedOptional = "";
+ $scope.selectedBlueprintName = '';
+ $scope.selectedBlueprintVersion = '';
+ $scope.selectedDeclerativeTimeslot = '';
+ $scope.selectedBlueprintLayer = '';
+ $scope.selectedOptional = '';
restAPISvc
.getRestAPI(
"/api/v1/blueprintinstance/",
}
});
});
- restAPISvc.getRestAPI("/api/v1/timeslots/", function(
- data) {
- $scope.timeslots = data;
- $scope.declerativeTimeslots = [];
- angular.forEach($scope.timeslots,
- function(timeslot) {
- var temp = "id: " + timeslot.timeslotId
- + " Start date and time: "
- + timeslot.startDateTime
- /*
- * + " duration(in sec) :" +
- * blueprintInstance["timeslot"].duration
- */
- + " lab :"
- + timeslot.labInfo.lab;
- $scope.declerativeTimeslots.push(temp);
- });
- });
}
-
$scope.selectedBlueprintNameChange = function() {
+ $scope.blueprintInstance = '';
$scope.blueprintVersions = [];
+ $scope.declerativeTimeslots = [];
$scope.blueprintLayers = [];
$scope.optionals = [];
- $scope.selectedBlueprintVersion = {};
- $scope.selectedBlueprintLayer = {};
- $scope.selectedOptional = "";
+ $scope.selectedBlueprintVersion = '';
+ $scope.selectedDeclerativeTimeslot = '';
+ $scope.selectedBlueprintLayer = '';
+ $scope.selectedOptional = '';
angular
.forEach(
$scope.blueprintInstances,
if (!$scope.selectedBlueprintName) {
return;
}
+ $scope.blueprintInstance = '';
+ $scope.declerativeTimeslots = [];
$scope.blueprintLayers = [];
$scope.optionals = [];
- $scope.selectedBlueprintLayer = {};
- $scope.selectedOptional = "";
+ $scope.selectedDeclerativeTimeslot = '';
+ $scope.selectedBlueprintLayer = '';
+ $scope.selectedOptional = '';
angular
.forEach(
$scope.blueprintInstances,
if ($scope.selectedBlueprintVersion
.trim() === blueprintInstance["version"]
.trim()) {
- angular
- .forEach(
- blueprintInstance.blueprintLayers,
- function(
- layer) {
- $scope.blueprintLayers
- .push(layer.layer);
- });
+ $scope.blueprintInstance = blueprintInstance;
}
}
});
+ if (!$scope.blueprintInstance
+ || !$scope.blueprintInstance.timeslots
+ || $scope.blueprintInstance.timeslots.length === 0) {
+ confirm("No available timeslots for this blueprint instance in this lab");
+ return;
+ }
+ angular.forEach($scope.blueprintInstance.timeslots,
+ function(timeslot) {
+ var temp = "id: " + timeslot.timeslotId
+ + " Start date and time: "
+ + timeslot.startDateTime
+ /*
+ * + " duration(in sec) :" +
+ * blueprintInstance["timeslot"].duration
+ */
+ + " lab :" + timeslot.labInfo.lab;
+ $scope.declerativeTimeslots.push(temp);
+ });
+ }
+
+ $scope.selectedDeclerativeTimeslotChange = function() {
+ $scope.blueprintLayers = [];
+ $scope.optionals = [];
+ $scope.selectedBlueprintLayer = {};
+ $scope.selectedOptional = "";
+ angular.forEach(
+ $scope.blueprintInstance.blueprintLayers,
+ function(layer) {
+ $scope.blueprintLayers.push(layer.layer);
+ });
$scope.blueprintLayers.push("all");
}
$scope.selectedBlueprintLayerChange = function() {
+ $scope.optionals = [];
+ $scope.selectedOptional = "";
$scope.optionals = [ 'true', 'false' ];
}
$scope.submit = function() {
if (!$scope.selectedBlueprintName
|| !$scope.selectedBlueprintVersion
+ || !$scope.blueprintInstance
|| !$scope.selectedBlueprintLayer
|| !$scope.selectedOptional
|| !$scope.selectedDeclerativeTimeslot) {
.indexOf("Start date and time:") - 1);
angular
.forEach(
- $scope.timeslots,
+ $scope.blueprintInstance.timeslots,
function(timeslot) {
if (selectedDeclerativeTimeslotId
.toString().trim() === timeslot.timeslotId
} ];
}
- var blueprintInstanceData = "";
- angular
- .forEach(
- $scope.blueprintInstances,
- function(blueprintInstance) {
- if ($scope.selectedBlueprintName
- .trim() === blueprintInstance["blueprint"]["blueprintName"]
- .trim()) {
- if ($scope.selectedBlueprintVersion
- .trim() === blueprintInstance["version"]
- .trim()) {
- blueprintInstanceData = blueprintInstance;
- }
- }
- });
var validationDbTestResult = {
- "blueprintInstance" : blueprintInstanceData,
+ "blueprintInstance" : $scope.blueprintInstance,
"allLayers" : allLayers,
"wrobotDbTestResults" : wrobotTestResults,
"optional" : $scope.selectedOptional,
confirm("Error when committing the submission");
}
});
- $scope.selectedBlueprintName = {};
- $scope.selectedBlueprintVersion = {};
- $scope.selectedBlueprintLayer = {};
+ $scope.selectedBlueprintName = '';
+ $scope.selectedBlueprintVersion = '';
+ $scope.selectedBlueprintLayer = '';
$scope.selectedOptional = "";
- $scope.selectedDeclerativeTimeslot = {};
+ $scope.selectedDeclerativeTimeslot = '';
+ $scope.blueprintInstance = '';
}
});
</div>
<br>
+ <div>
+ <div class="form-row">
+ <label for="textinputID-3a">Select Timeslot: </label> <select
+ ng-model="selectedDeclerativeTimeslot"
+ ng-change="selectedDeclerativeTimeslotChange()"
+ ng-options="v for v in declerativeTimeslots">
+ </select>
+ </div>
+ </div>
+ <br>
+
<div>
<div class="form-row">
<label for="textinputID-3a">Select Blueprint
</div>
<br>
-
- <div>
- <div class="form-row">
- <label for="textinputID-3a">Select Timeslot: </label> <select
- ng-model="selectedDeclerativeTimeslot"
- ng-options="v for v in declerativeTimeslots">
- </select>
- </div>
- </div>
- <br>
-
<div class="fn-ebz-container"
style="position: relative; top: 25px;">
<button href="javascript:void(0)" id="addbtn"
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Register Blueprint</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/styles/ecomp.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+ src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+ src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+ src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script src="app/BluvalUI/RegisterBlueprint/RegisterBlueprint.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script
+ src="app/BluvalUI/RegisterBlueprint/RegisterBlueprintController.js"></script>
+<script src="app/BluvalUI/RegisterBlueprint/Route.js"></script>
+
+<style>
+.controls {
+ margin-bottom: 20px;
+}
+
+.page-header {
+ margin-top: 20px;
+}
+
+ul {
+ list-style: none;
+}
+
+.box {
+ height: 100%;
+ border: 1px solid #ccc;
+ background-color: #fff;
+ position: relative;
+ overflow: hidden;
+}
+
+.box-header {
+ background-color: #eee;
+ padding: 0px 0px 0px 0px;
+ margin-bottom: -25px;
+ cursor: move;
+ position: relative;
+}
+
+.box-header h3 {
+ margin-top: 0px;
+ display: inline-block;
+}
+
+.box-content {
+ padding: 10px;
+ display: block;
+ height: 100%;
+ position: relative;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+
+.box-header-btns {
+ top: 15px;
+ right: 10px;
+ cursor: pointer;
+ position: absolute;
+}
+
+.gridster {
+ border: none;
+ position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+ border: none;
+ display: block;
+}
+
+.box table tr {
+ line-height: 20px;
+}
+
+.box table th {
+ border: none;
+ line-height: 20px;
+}
+
+.menu-container {
+ margin-top: 0px
+}
+
+.handle-e {
+ width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="RegisterBlueprint">
+ <div ds2-Header class="header-container"></div>
+ <div ds2-menu id="menuContainer" class="menu-container"></div>
+ <div ng-view id="rightContentProfile" class="content-container"></div>
+ <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var appDS2 = angular.module("RegisterBlueprint", [ 'ngRoute', 'ngMessages',
+ 'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+ 'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var app = angular.module('RegisterBlueprint');
+app
+ .controller(
+ 'RegisterBlueprintController',
+ function($scope, restAPISvc) {
+
+ initialize();
+
+ function initialize() {
+ $scope.definedName = '';
+ }
+
+ $scope.register = function() {
+ if (!$scope.definedName) {
+ confirm("You must specify the blueprint name");
+ return;
+ }
+ var blueprint = {
+ "blueprintName" : $scope.definedName
+ };
+ restAPISvc
+ .postRestAPI(
+ "/api/v1/blueprint/",
+ blueprint,
+ function(data) {
+ if (data) {
+ var confirmText = "The blueprint has been registered successfully. Blueprint id:"
+ + data.blueprintId;
+ confirm(confirmText);
+ } else {
+ confirm("Error when registering the blueprint");
+ }
+ initialize();
+ });
+ }
+ });
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+ <div>
+ <h1 class="heading-page">Register Blueprint</h1>
+
+ <div class="Column">
+ <div class="form-row">
+ <label for="textinputID-3a">Define blueprint
+ name: </label> <input ng-model="definedName"</input>
+ </div>
+ </div>
+ <br>
+
+ <div class="fn-ebz-container"
+ style="position: relative; top: 25px;">
+ <button href="javascript:void(0)" id="addbtn"
+ style="bottom: -17px;" size="small"
+ att-accessibility-click="13,32"
+ class="btn btn-alt btn-small" ng-click="register();">Register</button>
+ </div>
+ </div>
+</div>
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+appDS2.config(function($routeProvider) {
+ $routeProvider.otherwise({
+ templateUrl : 'app/BluvalUI/RegisterBlueprint/RegisterBlueprintTemplate.html',
+ controller : "RegisterBlueprintController"
+ });
+});
\ No newline at end of file
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Register Blueprint Instance</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/styles/ecomp.css">
+
+<link rel="stylesheet"
+ href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+ src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+ src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+ src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script
+ src="app/BluvalUI/RegisterBlueprintInstance/RegisterBlueprintInstance.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script
+ src="app/BluvalUI/RegisterBlueprintInstance/RegisterBlueprintInstanceController.js"></script>
+<script src="app/BluvalUI/RegisterBlueprintInstance/Route.js"></script>
+
+<style>
+.controls {
+ margin-bottom: 20px;
+}
+
+.page-header {
+ margin-top: 20px;
+}
+
+ul {
+ list-style: none;
+}
+
+.box {
+ height: 100%;
+ border: 1px solid #ccc;
+ background-color: #fff;
+ position: relative;
+ overflow: hidden;
+}
+
+.box-header {
+ background-color: #eee;
+ padding: 0px 0px 0px 0px;
+ margin-bottom: -25px;
+ cursor: move;
+ position: relative;
+}
+
+.box-header h3 {
+ margin-top: 0px;
+ display: inline-block;
+}
+
+.box-content {
+ padding: 10px;
+ display: block;
+ height: 100%;
+ position: relative;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+
+.box-header-btns {
+ top: 15px;
+ right: 10px;
+ cursor: pointer;
+ position: absolute;
+}
+
+.gridster {
+ border: none;
+ position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+ border: none;
+ display: block;
+}
+
+.box table tr {
+ line-height: 20px;
+}
+
+.box table th {
+ border: none;
+ line-height: 20px;
+}
+
+.menu-container {
+ margin-top: 0px
+}
+
+.handle-e {
+ width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="RegisterBlueprintInstance">
+ <div ds2-Header class="header-container"></div>
+ <div ds2-menu id="menuContainer" class="menu-container"></div>
+ <div ng-view id="rightContentProfile" class="content-container"></div>
+ <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var appDS2 = angular.module("RegisterBlueprintInstance", [ 'ngRoute', 'ngMessages',
+ 'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+ 'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var app = angular.module('RegisterBlueprintInstance');
+app
+ .controller(
+ 'RegisterBlueprintInstanceController',
+ function($scope, restAPISvc) {
+
+ initialize();
+
+ function initialize() {
+ $scope.loadingBlueprints = true;
+ $scope.loadingLayers = true;
+ $scope.blueprints = [];
+ $scope.blueprintInfos = [];
+ $scope.layers = [];
+ $scope.layerInfos = [];
+ $scope.selectedLayer = '';
+ $scope.configuredLayers = [];
+ restAPISvc
+ .getRestAPI(
+ "/api/v1/blueprint/",
+ function(data) {
+ if (data) {
+ $scope.blueprintInfos = data;
+ angular
+ .forEach(
+ data,
+ function(
+ blueprint) {
+ $scope.blueprints
+ .push(blueprint.blueprintName);
+ restAPISvc
+ .getRestAPI(
+ "/api/v1/layer/",
+ function(
+ data2) {
+ if (data2) {
+ $scope.layerInfos = data2;
+ angular
+ .forEach(
+ data2,
+ function(
+ layer) {
+ if ($scope.layers
+ .indexOf(layer.layer) === -1) {
+ $scope.layers
+ .push(layer.layer);
+ }
+ });
+ } else {
+ confirm("No layers found");
+ }
+ });
+ });
+ } else {
+ confirm("No blueprints found");
+ }
+ $scope.loadingBlueprints = false;
+ $scope.loadingLayers = false;
+ });
+ }
+
+ $scope.addConfiguredLayer = function(configuredLayer) {
+ if ($scope.configuredLayers.indexOf(configuredLayer
+ .trim()) === -1) {
+ $scope.configuredLayers.push(configuredLayer);
+ }
+ }
+
+ $scope.deleteConfiguredLayer = function(index) {
+ $scope.configuredLayers.splice(index, 1);
+ }
+
+ $scope.register = function() {
+ if (!$scope.selectedBlueprint || !$scope.definedVersion
+ || !$scope.configuredLayers
+ || $scope.configuredLayers.length === 0) {
+ confirm("You must specify all the fields");
+ return;
+ }
+ var blueprint = '';
+ angular
+ .forEach(
+ $scope.blueprintInfos,
+ function(blueprintInfo) {
+ if (blueprintInfo.blueprintName
+ .toString().trim() === $scope.selectedBlueprint
+ .toString().trim()) {
+ blueprint = blueprintInfo;
+ }
+ });
+ if (!blueprint) {
+ confirm("Error in blueprint data");
+ return;
+ }
+ var blueprintLayers = [];
+ angular.forEach($scope.layerInfos, function(layerInfo) {
+ if ($scope.configuredLayers
+ .indexOf(layerInfo.layer) !== -1) {
+ blueprintLayers.push(layerInfo);
+ }
+ });
+ if (!blueprintLayers || blueprintLayers.length === 0) {
+ confirm("Error in blueprint layers data");
+ return;
+ }
+ var blueprintInstance = {
+ "blueprint" : blueprint,
+ "version" : $scope.definedVersion,
+ "blueprintLayers" : blueprintLayers
+ };
+ restAPISvc
+ .postRestAPI(
+ "/api/v1/blueprintinstance/",
+ blueprintInstance,
+ function(data) {
+ if (data) {
+ var confirmText = "The blueprint instance has been registered successfully. Blueprint instance id:"
+ + data.blueprintInstanceId;
+ confirm(confirmText);
+ } else {
+ confirm("Error when registering the blueprint instance");
+ }
+ initialize();
+ });
+ }
+ });
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+ <style>
+$
+melon
+:
+
+#F97D75
+
+ ; $ black
+:
+
+#2E3641
+
+ ; *
+
+button {
+ background-color: $melon;
+ border: 0;
+ padding: 8px 20px;
+ color: white;
+ text-transform: uppercase;
+ cursor: pointer;
+ &:
+ focus
+ ,
+ &
+ :
+ active
+ {
+
+
+ outline
+ :
+
+
+ 0;
+}
+
+}
+ul.ul-layer {
+ list-style: none;
+ padding-left: 0;
+ margin-top: 25px;
+}
+
+li.li-layer {
+ border: 1px solid black;
+ display: inline-block;
+ padding: 5px 10px;
+ margin-right: 5px;
+ margin-bottom: 5px;
+ text-transform: capitalize;
+}
+
+.fa-close {
+ cursor: pointer;
+}
+</style>
+ <div>
+ <h1 class="heading-page">Register Blueprint Instance</h1>
+
+ <div>
+ <div class="form-row">
+ <label for="textinputID-3a">Select Blueprint: </label> <select
+ ng-model="selectedBlueprint"
+ ng-change="selectedBlueprintChange()"
+ ng-options="v for v in blueprints">
+ </select>
+ </div>
+ </div>
+ <br>
+
+ <div class="Column">
+ <div class="form-row">
+ <label for="textinputID-3a">Define version: </label> <input
+ ng-model="definedVersion"</input>
+ </div>
+ </div>
+ <br>
+
+ <div>
+ <div class="form-row">
+ <label for="textinputID-3a">Add Layer: </label> <select
+ ng-model="selectedLayer"
+ ng-change="selectedLayerChange()"
+ ng-options="v for v in layers">
+ </select>
+ <button ng-disabled="!selectedLayer"
+ ng-click="addConfiguredLayer(selectedLayer)">Add</button>
+ </div>
+ </div>
+ <br>
+
+ <ul class="ul-layer">
+ <li ng-repeat="configuredLayer in configuredLayers"
+ class="li-layer"><span
+ ng-click="deleteConfiguredLayer($index)"><i
+ class="fa fa-close"></i></span> {{configuredLayer}}</li>
+ </ul>
+
+ <div ng-show="loadingBlueprints || loadingLayers">
+ <img src=" static/fusion/images/giphy.gif" />
+ </div>
+
+ <div class="fn-ebz-container"
+ style="position: relative; top: 25px;">
+ <button href="javascript:void(0)" id="addbtn"
+ style="bottom: -17px;" size="small"
+ att-accessibility-click="13,32"
+ class="btn btn-alt btn-small" ng-click="register();">Register</button>
+ </div>
+ </div>
+</div>
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+appDS2.config(function($routeProvider) {
+ $routeProvider.otherwise({
+ templateUrl : 'app/BluvalUI/RegisterBlueprintInstance/RegisterBlueprintInstanceTemplate.html',
+ controller : "RegisterBlueprintInstanceController"
+ });
+});
\ No newline at end of file
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Register Lab</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/styles/ecomp.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+ src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+ src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+ src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script src="app/BluvalUI/RegisterLab/RegisterLab.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script src="app/BluvalUI/RegisterLab/RegisterLabController.js"></script>
+<script src="app/BluvalUI/RegisterLab/Route.js"></script>
+
+<style>
+.controls {
+ margin-bottom: 20px;
+}
+
+.page-header {
+ margin-top: 20px;
+}
+
+ul {
+ list-style: none;
+}
+
+.box {
+ height: 100%;
+ border: 1px solid #ccc;
+ background-color: #fff;
+ position: relative;
+ overflow: hidden;
+}
+
+.box-header {
+ background-color: #eee;
+ padding: 0px 0px 0px 0px;
+ margin-bottom: -25px;
+ cursor: move;
+ position: relative;
+}
+
+.box-header h3 {
+ margin-top: 0px;
+ display: inline-block;
+}
+
+.box-content {
+ padding: 10px;
+ display: block;
+ height: 100%;
+ position: relative;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+
+.box-header-btns {
+ top: 15px;
+ right: 10px;
+ cursor: pointer;
+ position: absolute;
+}
+
+.gridster {
+ border: none;
+ position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+ border: none;
+ display: block;
+}
+
+.box table tr {
+ line-height: 20px;
+}
+
+.box table th {
+ border: none;
+ line-height: 20px;
+}
+
+.menu-container {
+ margin-top: 0px
+}
+
+.handle-e {
+ width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="RegisterLab">
+ <div ds2-Header class="header-container"></div>
+ <div ds2-menu id="menuContainer" class="menu-container"></div>
+ <div ng-view id="rightContentProfile" class="content-container"></div>
+ <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var appDS2 = angular.module("RegisterLab", [ 'ngRoute', 'ngMessages',
+ 'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+ 'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var app = angular.module('RegisterLab');
+app
+ .controller(
+ 'RegisterLabController',
+ function($scope, restAPISvc) {
+
+ initialize();
+
+ function initialize() {
+ $scope.definedName = '';
+ $scope.definedSilo = '';
+ }
+
+ $scope.register = function() {
+ if (!$scope.definedName || !$scope.definedSilo) {
+ confirm("You must specify all data fields");
+ return;
+ }
+ var labInfo = {
+ "lab" : $scope.definedName,
+ "silo" : $scope.definedSilo
+ };
+ restAPISvc
+ .postRestAPI(
+ "/api/v1/lab/",
+ labInfo,
+ function(data) {
+ if (data) {
+ var confirmText = "The lab has been registered successfully. Lab id:"
+ + data.labId;
+ confirm(confirmText);
+ } else {
+ confirm("Error when registering the lab");
+ }
+ initialize();
+ });
+ }
+ });
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+ <div>
+ <h1 class="heading-page">Register Lab</h1>
+
+ <div class="Column">
+ <div class="form-row">
+ <label for="textinputID-3a">Define lab name: </label> <input
+ ng-model="definedName"</input>
+ </div>
+ </div>
+ <br>
+
+ <div class="Column">
+ <div class="form-row">
+ <label for="textinputID-3a">Define lab silo: </label> <input
+ ng-model="definedSilo"</input>
+ </div>
+ </div>
+ <br>
+
+ <div class="fn-ebz-container"
+ style="position: relative; top: 25px;">
+ <button href="javascript:void(0)" id="addbtn"
+ style="bottom: -17px;" size="small"
+ att-accessibility-click="13,32"
+ class="btn btn-alt btn-small" ng-click="register();">Register</button>
+ </div>
+ </div>
+</div>
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+appDS2.config(function($routeProvider) {
+ $routeProvider.otherwise({
+ templateUrl : 'app/BluvalUI/RegisterLab/RegisterLabTemplate.html',
+ controller : "RegisterLabController"
+ });
+});
\ No newline at end of file
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Register Layer</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/styles/ecomp.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+ src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+ src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+ src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script src="app/BluvalUI/RegisterLayer/RegisterLayer.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script src="app/BluvalUI/RegisterLayer/RegisterLayerController.js"></script>
+<script src="app/BluvalUI/RegisterLayer/Route.js"></script>
+
+<style>
+.controls {
+ margin-bottom: 20px;
+}
+
+.page-header {
+ margin-top: 20px;
+}
+
+ul {
+ list-style: none;
+}
+
+.box {
+ height: 100%;
+ border: 1px solid #ccc;
+ background-color: #fff;
+ position: relative;
+ overflow: hidden;
+}
+
+.box-header {
+ background-color: #eee;
+ padding: 0px 0px 0px 0px;
+ margin-bottom: -25px;
+ cursor: move;
+ position: relative;
+}
+
+.box-header h3 {
+ margin-top: 0px;
+ display: inline-block;
+}
+
+.box-content {
+ padding: 10px;
+ display: block;
+ height: 100%;
+ position: relative;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+
+.box-header-btns {
+ top: 15px;
+ right: 10px;
+ cursor: pointer;
+ position: absolute;
+}
+
+.gridster {
+ border: none;
+ position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+ border: none;
+ display: block;
+}
+
+.box table tr {
+ line-height: 20px;
+}
+
+.box table th {
+ border: none;
+ line-height: 20px;
+}
+
+.menu-container {
+ margin-top: 0px
+}
+
+.handle-e {
+ width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="RegisterLayer">
+ <div ds2-Header class="header-container"></div>
+ <div ds2-menu id="menuContainer" class="menu-container"></div>
+ <div ng-view id="rightContentProfile" class="content-container"></div>
+ <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var appDS2 = angular.module("RegisterLayer", [ 'ngRoute', 'ngMessages',
+ 'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+ 'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var app = angular.module('RegisterLayer');
+app
+ .controller(
+ 'RegisterLayerController',
+ function($scope, restAPISvc) {
+
+ initialize();
+
+ function initialize() {
+ $scope.definedLayer = '';
+ }
+
+ $scope.register = function() {
+ if (!$scope.definedLayer) {
+ confirm("You must specify the blueprint layer");
+ return;
+ }
+ var blueprintLayer = {
+ "layer" : $scope.definedLayer
+ };
+ restAPISvc
+ .postRestAPI(
+ "/api/v1/layer/",
+ blueprintLayer,
+ function(data) {
+ if (data) {
+ var confirmText = "The blueprint layer has been registered successfully. Blueprint layer id:"
+ + data.blueprintLayerId;
+ confirm(confirmText);
+ } else {
+ confirm("Error when registering the blueprint layer");
+ }
+ initialize();
+ });
+ }
+ });
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+ <div>
+ <h1 class="heading-page">Register Blueprint Layer</h1>
+
+ <div class="Column">
+ <div class="form-row">
+ <label for="textinputID-3a">Define blueprint
+ layer: </label> <input ng-model="definedLayer"</input>
+ </div>
+ </div>
+ <br>
+
+ <div class="fn-ebz-container"
+ style="position: relative; top: 25px;">
+ <button href="javascript:void(0)" id="addbtn"
+ style="bottom: -17px;" size="small"
+ att-accessibility-click="13,32"
+ class="btn btn-alt btn-small" ng-click="register();">Register</button>
+ </div>
+ </div>
+</div>
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+appDS2.config(function($routeProvider) {
+ $routeProvider.otherwise({
+ templateUrl : 'app/BluvalUI/RegisterLayer/RegisterLayerTemplate.html',
+ controller : "RegisterLayerController"
+ });
+});
\ No newline at end of file
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Register Timeslot</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/styles/ecomp.css">
+
+<link rel="stylesheet"
+ href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+ src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+ src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+ src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script src="app/BluvalUI/RegisterTimeslot/RegisterTimeslot.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script
+ src="app/BluvalUI/RegisterTimeslot/RegisterTimeslotController.js"></script>
+<script src="app/BluvalUI/RegisterTimeslot/Route.js"></script>
+
+<style>
+.controls {
+ margin-bottom: 20px;
+}
+
+.page-header {
+ margin-top: 20px;
+}
+
+ul {
+ list-style: none;
+}
+
+.box {
+ height: 100%;
+ border: 1px solid #ccc;
+ background-color: #fff;
+ position: relative;
+ overflow: hidden;
+}
+
+.box-header {
+ background-color: #eee;
+ padding: 0px 0px 0px 0px;
+ margin-bottom: -25px;
+ cursor: move;
+ position: relative;
+}
+
+.box-header h3 {
+ margin-top: 0px;
+ display: inline-block;
+}
+
+.box-content {
+ padding: 10px;
+ display: block;
+ height: 100%;
+ position: relative;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+
+.box-header-btns {
+ top: 15px;
+ right: 10px;
+ cursor: pointer;
+ position: absolute;
+}
+
+.gridster {
+ border: none;
+ position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+ border: none;
+ display: block;
+}
+
+.box table tr {
+ line-height: 20px;
+}
+
+.box table th {
+ border: none;
+ line-height: 20px;
+}
+
+.menu-container {
+ margin-top: 0px
+}
+
+.handle-e {
+ width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="RegisterTimeslot">
+ <div ds2-Header class="header-container"></div>
+ <div ds2-menu id="menuContainer" class="menu-container"></div>
+ <div ng-view id="rightContentProfile" class="content-container"></div>
+ <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var appDS2 = angular.module("RegisterTimeslot", [ 'ngRoute', 'ngMessages',
+ 'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+ 'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var app = angular.module('RegisterTimeslot');
+app
+ .controller(
+ 'RegisterTimeslotController',
+ function($scope, restAPISvc, $q) {
+
+ initialize();
+
+ function initialize() {
+ $scope.loadingLabs = true;
+ $scope.loadingBlueprintInstances = true;
+ $scope.definedStart = "now";
+ $scope.labInfos = [];
+ $scope.labs = [];
+ $scope.selectedLab = '';
+ $scope.blueprintInstances = [];
+ $scope.declerativeInsts = [];
+ $scope.selectedDeclerativeInst = '';
+ $scope.insts = [];
+ restAPISvc
+ .getRestAPI(
+ "/api/v1/lab/",
+ function(data) {
+ if (data) {
+ $scope.labInfos = data;
+ angular.forEach(data, function(
+ lab) {
+ $scope.labs.push(lab.lab);
+ });
+ restAPISvc
+ .getRestAPI(
+ "/api/v1/blueprintinstance/",
+ function(data2) {
+ if (data2) {
+ $scope.blueprintInstances = data2;
+ angular
+ .forEach(
+ $scope.blueprintInstances,
+ function(
+ blueprintInstance) {
+ var temp = "id: "
+ + blueprintInstance.blueprintInstanceId
+ + " name: "
+ + blueprintInstance["blueprint"]["blueprintName"]
+ + " version: "
+ + blueprintInstance["version"];
+ $scope.declerativeInsts
+ .push(temp);
+ });
+ } else {
+ confirm("No blueprint instances found");
+ }
+ });
+ } else {
+ confirm("No labs found");
+ }
+ $scope.loadingLabs = false;
+ $scope.loadingBlueprintInstances = false;
+ });
+ }
+
+ $scope.addInst = function(selectedDeclerativeInst) {
+ if ($scope.insts
+ .indexOf(selectedDeclerativeInst.trim()) === -1) {
+ $scope.insts.push(selectedDeclerativeInst);
+ }
+ }
+
+ $scope.deleteInst = function(index) {
+ $scope.insts.splice(index, 1);
+ }
+
+ $scope.register = function() {
+ if (!$scope.selectedLab || !$scope.insts
+ || $scope.insts.length === 0) {
+ confirm("You must specify all the fields");
+ return;
+ }
+ var lab = '';
+ angular.forEach($scope.labInfos, function(labInfo) {
+ if (labInfo.lab.trim() === $scope.selectedLab) {
+ lab = labInfo;
+ }
+ });
+ if (!lab) {
+ confirm("Error in lab data");
+ return;
+ }
+ var timeslot = {
+ "startDateTime" : $scope.definedStart,
+ "labInfo" : lab
+ };
+ restAPISvc
+ .postRestAPI(
+ "/api/v1/timeslot/",
+ timeslot,
+ function(data) {
+ if (data) {
+ var confirmText = "The timeslot has been registered successfully. Timeslot id:"
+ + data.timeslotId;
+ confirm(confirmText);
+ updateBlusInsts(data);
+ } else {
+ confirm("Error when registering the timeslot");
+ }
+ });
+ }
+
+ function updateBlusInsts(timeslot) {
+ var blueprintInstances = [];
+ angular
+ .forEach(
+ $scope.insts,
+ function(inst) {
+ var id = inst.substring(inst
+ .indexOf("id:") + 4, inst
+ .indexOf("name") - 1);
+ angular
+ .forEach(
+ $scope.blueprintInstances,
+ function(
+ blueprintInstance) {
+ if (blueprintInstance.blueprintInstanceId
+ .toString()
+ .trim() === id
+ .toString()
+ .trim()) {
+ blueprintInstances
+ .push(blueprintInstance);
+ }
+ });
+ });
+ if (!blueprintInstances) {
+ confirm("Error in blueprint instances data");
+ return;
+ }
+ var promises = [];
+ angular
+ .forEach(
+ blueprintInstances,
+ function(blueprintInstance) {
+ if (blueprintInstance.timeslots) {
+ blueprintInstance.timeslots
+ .push(timeslot);
+ } else {
+ blueprintInstance.timeslots = [ timeslot ];
+ }
+ promises
+ .push(restAPISvc
+ .postRestAPI(
+ "/api/v1/blueprintinstance/",
+ blueprintInstance,
+ function(
+ data) {
+ if (data) {
+ var text = "Blueprint instance: "
+ + blueprintInstance.blueprint.blueprintName
+ + " version: "
+ + blueprintInstance.version
+ + " updated successfully";
+ confirm(text);
+ } else {
+ var text2 = "Failed to update blueprint instance: "
+ + blueprintInstance.blueprint.blueprintName
+ + " version: "
+ + blueprintInstance.version;
+ confirm(text2);
+ }
+ }));
+ });
+ $q
+ .all(promises)
+ .then(
+ function() {
+ confirm("All blueprint instances have been updated");
+ $scope.selectedLab = '';
+ $scope.selectedDeclerativeInst = '';
+ $scope.insts = [];
+ initialize();
+ });
+ }
+ });
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+ <style>
+$
+melon
+:
+
+#F97D75
+
+ ; $ black
+:
+
+#2E3641
+
+ ; *
+
+button {
+ background-color: $melon;
+ border: 0;
+ padding: 8px 20px;
+ color: white;
+ text-transform: uppercase;
+ cursor: pointer;
+ &:
+ focus
+ ,
+ &
+ :
+ active
+ {
+
+
+
+
+
+
+ outline
+ :
+
+
+
+
+
+
+ 0;
+}
+
+}
+ul.ul-timeslot {
+ list-style: none;
+ padding-left: 0;
+ margin-top: 25px;
+}
+
+li.li-timeslot {
+ border: 1px solid black;
+ display: inline-block;
+ padding: 5px 10px;
+ margin-right: 5px;
+ margin-bottom: 5px;
+ text-transform: capitalize;
+}
+
+.fa-close {
+ cursor: pointer;
+}
+</style>
+ <div>
+ <h1 class="heading-page">Register Timeslot</h1>
+
+ <div class="Column">
+ <div class="form-row">
+ <label for="textinputID-3a">Define start date
+ and time : </label> <input ng-model="definedStart" readonly></input>
+ </div>
+ </div>
+ <br>
+
+ <div>
+ <div class="form-row">
+ <label for="textinputID-3a">Select Lab: </label> <select
+ ng-model="selectedLab"
+ ng-change="selectedLabChange()"
+ ng-options="v for v in labs">
+ </select>
+ </div>
+ </div>
+ <br>
+
+ <div>
+ <div class="form-row">
+ <label for="textinputID-3a">Add Blueprint
+ Instance: </label> <select
+ ng-model="selectedDeclerativeInst"
+ ng-change="selectedDeclerativeInstChange()"
+ ng-options="v for v in declerativeInsts">
+ </select>
+ <button ng-disabled="!selectedDeclerativeInst"
+ ng-click="addInst(selectedDeclerativeInst)">Add</button>
+ </div>
+ </div>
+ <br>
+
+ <ul class="ul-timeslot">
+ <li ng-repeat="inst in insts" class="li-timeslot"><span
+ ng-click="deleteInst($index)"><i
+ class="fa fa-close"></i></span> {{inst}}</li>
+ </ul>
+
+ <div ng-show="loadingLabs || loadingBlueprintInstances">
+ <img src=" static/fusion/images/giphy.gif" />
+ </div>
+
+ <div class="fn-ebz-container"
+ style="position: relative; top: 25px;">
+ <button href="javascript:void(0)" id="addbtn"
+ style="bottom: -17px;" size="small"
+ att-accessibility-click="13,32"
+ class="btn btn-alt btn-small" ng-click="register();">Register</button>
+ </div>
+ </div>
+</div>
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+appDS2.config(function($routeProvider) {
+ $routeProvider.otherwise({
+ templateUrl : 'app/BluvalUI/RegisterTimeslot/RegisterTimeslotTemplate.html',
+ controller : "RegisterTimeslotController"
+ });
+});
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+appDS2
+ .config(function($routeProvider) {
+ $routeProvider
+ .otherwise({
+ templateUrl : 'app/BluvalUI/UnRegisterBlueprint/UnRegisterBlueprintTemplate.html',
+ controller : "UnRegisterBlueprintController"
+ });
+ });
\ No newline at end of file
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Unregister Blueprint</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/styles/ecomp.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+ src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+ src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+ src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script src="app/BluvalUI/UnRegisterBlueprint/UnRegisterBlueprint.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script
+ src="app/BluvalUI/UnRegisterBlueprint/UnRegisterBlueprintController.js"></script>
+<script src="app/BluvalUI/UnRegisterBlueprint/Route.js"></script>
+
+<style>
+.controls {
+ margin-bottom: 20px;
+}
+
+.page-header {
+ margin-top: 20px;
+}
+
+ul {
+ list-style: none;
+}
+
+.box {
+ height: 100%;
+ border: 1px solid #ccc;
+ background-color: #fff;
+ position: relative;
+ overflow: hidden;
+}
+
+.box-header {
+ background-color: #eee;
+ padding: 0px 0px 0px 0px;
+ margin-bottom: -25px;
+ cursor: move;
+ position: relative;
+}
+
+.box-header h3 {
+ margin-top: 0px;
+ display: inline-block;
+}
+
+.box-content {
+ padding: 10px;
+ display: block;
+ height: 100%;
+ position: relative;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+
+.box-header-btns {
+ top: 15px;
+ right: 10px;
+ cursor: pointer;
+ position: absolute;
+}
+
+.gridster {
+ border: none;
+ position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+ border: none;
+ display: block;
+}
+
+.box table tr {
+ line-height: 20px;
+}
+
+.box table th {
+ border: none;
+ line-height: 20px;
+}
+
+.menu-container {
+ margin-top: 0px
+}
+
+.handle-e {
+ width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="UnRegisterBlueprint">
+ <div ds2-Header class="header-container"></div>
+ <div ds2-menu id="menuContainer" class="menu-container"></div>
+ <div ng-view id="rightContentProfile" class="content-container"></div>
+ <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var appDS2 = angular.module("UnRegisterBlueprint", [ 'ngRoute', 'ngMessages',
+ 'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+ 'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var app = angular.module('UnRegisterBlueprint');
+app
+ .controller(
+ 'UnRegisterBlueprintController',
+ function($scope, restAPISvc) {
+
+ initialize();
+
+ function initialize() {
+ $scope.loadingBlueprints = true;
+ $scope.blueprintInfos = [];
+ $scope.blueprints = [];
+ $scope.selectedBlueprint = '';
+ restAPISvc.getRestAPI("/api/v1/blueprint/", function(
+ data) {
+ if (data) {
+ $scope.blueprintInfos = data;
+ angular.forEach(data, function(blueprint) {
+ $scope.blueprints
+ .push(blueprint.blueprintName);
+ });
+ } else {
+ confirm("No blueprints found");
+ }
+ $scope.loadingBlueprints = false;
+ });
+ }
+
+ $scope.unRegister = function() {
+ if (!$scope.selectedBlueprint) {
+ confirm("You must select a blueprint");
+ return;
+ }
+ var finalBlueprintInfo = '';
+ angular
+ .forEach(
+ $scope.blueprintInfos,
+ function(blueprintInfo) {
+ if ($scope.selectedBlueprint.trim() === blueprintInfo.blueprintName
+ .trim()) {
+ finalBlueprintInfo = blueprintInfo;
+ }
+ });
+ if (!finalBlueprintInfo) {
+ return;
+ }
+ restAPISvc
+ .deleteRestAPI(
+ "/api/v1/blueprint/",
+ finalBlueprintInfo,
+ function(data) {
+ if (data) {
+ var confirmText = "The blueprint has been unregistered successfully."
+ confirm(confirmText);
+ } else {
+ confirm("Error when unregistering the blueprint");
+ }
+ initialize();
+ });
+ }
+ });
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+ <div>
+ <h1 class="heading-page">Unregister Blueprint</h1>
+
+ <div>
+ <div class="form-row">
+ <label for="textinputID-3a">Select Blueprint: </label> <select
+ ng-model="selectedBlueprint"
+ ng-change="selectedBlueprintChange()"
+ ng-options="v for v in blueprints">
+ </select>
+ </div>
+ </div>
+ <br>
+
+ <div ng-show="loadingBlueprints">
+ <img src=" static/fusion/images/giphy.gif" />
+ </div>
+
+ <div class="fn-ebz-container"
+ style="position: relative; top: 25px;">
+ <button href="javascript:void(0)" id="addbtn"
+ style="bottom: -17px;" size="small"
+ att-accessibility-click="13,32"
+ class="btn btn-alt btn-small" ng-click="unRegister();">Unregister</button>
+ </div>
+ </div>
+</div>
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+appDS2
+ .config(function($routeProvider) {
+ $routeProvider
+ .otherwise({
+ templateUrl : 'app/BluvalUI/UnRegisterBlueprintInstance/UnRegisterBlueprintInstanceTemplate.html',
+ controller : "UnRegisterBlueprintInstanceController"
+ });
+ });
\ No newline at end of file
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Unregister Blueprint Instance</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/styles/ecomp.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+ src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+ src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+ src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script src="app/BluvalUI/UnRegisterBlueprintInstance/UnRegisterBlueprintInstance.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script
+ src="app/BluvalUI/UnRegisterBlueprintInstance/UnRegisterBlueprintInstanceController.js"></script>
+<script src="app/BluvalUI/UnRegisterBlueprintInstance/Route.js"></script>
+
+<style>
+.controls {
+ margin-bottom: 20px;
+}
+
+.page-header {
+ margin-top: 20px;
+}
+
+ul {
+ list-style: none;
+}
+
+.box {
+ height: 100%;
+ border: 1px solid #ccc;
+ background-color: #fff;
+ position: relative;
+ overflow: hidden;
+}
+
+.box-header {
+ background-color: #eee;
+ padding: 0px 0px 0px 0px;
+ margin-bottom: -25px;
+ cursor: move;
+ position: relative;
+}
+
+.box-header h3 {
+ margin-top: 0px;
+ display: inline-block;
+}
+
+.box-content {
+ padding: 10px;
+ display: block;
+ height: 100%;
+ position: relative;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+
+.box-header-btns {
+ top: 15px;
+ right: 10px;
+ cursor: pointer;
+ position: absolute;
+}
+
+.gridster {
+ border: none;
+ position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+ border: none;
+ display: block;
+}
+
+.box table tr {
+ line-height: 20px;
+}
+
+.box table th {
+ border: none;
+ line-height: 20px;
+}
+
+.menu-container {
+ margin-top: 0px
+}
+
+.handle-e {
+ width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="UnRegisterBlueprintInstance">
+ <div ds2-Header class="header-container"></div>
+ <div ds2-menu id="menuContainer" class="menu-container"></div>
+ <div ng-view id="rightContentProfile" class="content-container"></div>
+ <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var appDS2 = angular.module("UnRegisterBlueprintInstance", [ 'ngRoute', 'ngMessages',
+ 'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+ 'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var app = angular.module('UnRegisterBlueprintInstance');
+app
+ .controller(
+ 'UnRegisterBlueprintInstanceController',
+ function($scope, restAPISvc) {
+
+ initialize();
+
+ function initialize() {
+ $scope.loadingBlueprintInstances = true;
+ $scope.blueprintInstanceInfos = [];
+ $scope.declerativeInsts = [];
+ $scope.selectedBlueprintInstance = '';
+ restAPISvc
+ .getRestAPI(
+ "/api/v1/blueprintinstance/",
+ function(data) {
+ if (data) {
+ $scope.blueprintInstanceInfos = data;
+ angular
+ .forEach(
+ data,
+ function(
+ blueprintInstance) {
+ var temp = "id: "
+ + blueprintInstance.blueprintInstanceId
+ + " name: "
+ + blueprintInstance["blueprint"]["blueprintName"]
+ + " version: "
+ + blueprintInstance["version"];
+ $scope.declerativeInsts
+ .push(temp);
+ });
+ } else {
+ confirm("No blueprint instances found");
+ }
+ $scope.loadingBlueprintInstances = false;
+ });
+ }
+
+ $scope.unRegister = function() {
+ if (!$scope.selectedBlueprintInstance) {
+ confirm("You must select a blueprint instance");
+ return;
+ }
+ var finalBlueprintInstanceInfo = '';
+ var id = $scope.selectedBlueprintInstance
+ .substring($scope.selectedBlueprintInstance
+ .indexOf("id:") + 4,
+ $scope.selectedBlueprintInstance
+ .indexOf("name") - 1);
+ angular
+ .forEach(
+ $scope.blueprintInstanceInfos,
+ function(blueprintInstanceInfo) {
+ if (blueprintInstanceInfo.blueprintInstanceId
+ .toString().trim() === id
+ .toString().trim()) {
+ finalBlueprintInstanceInfo = blueprintInstanceInfo;
+ }
+ });
+ if (!finalBlueprintInstanceInfo) {
+ confirm("Error in blueprint instance data");
+ return;
+ }
+ restAPISvc
+ .deleteRestAPI(
+ "/api/v1/blueprintinstance/",
+ finalBlueprintInstanceInfo,
+ function(data) {
+ if (data) {
+ var confirmText = "The blueprint instance has been unregistered successfully."
+ confirm(confirmText);
+ } else {
+ confirm("Error when unregistering the blueprint instance");
+ }
+ initialize();
+ });
+ }
+ });
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+ <div>
+ <h1 class="heading-page">Unregister Blueprint Instance</h1>
+
+ <div>
+ <div class="form-row">
+ <label for="textinputID-3a">Select Blueprint
+ Instance: </label> <select
+ ng-model="selectedBlueprintInstance"
+ ng-change="selectedBlueprintInstanceChange()"
+ ng-options="v for v in declerativeInsts">
+ </select>
+ </div>
+ </div>
+ <br>
+
+ <div ng-show="loadingBlueprintInstances">
+ <img src=" static/fusion/images/giphy.gif" />
+ </div>
+
+ <div class="fn-ebz-container"
+ style="position: relative; top: 25px;">
+ <button href="javascript:void(0)" id="addbtn"
+ style="bottom: -17px;" size="small"
+ att-accessibility-click="13,32"
+ class="btn btn-alt btn-small" ng-click="unRegister();">Unregister</button>
+ </div>
+ </div>
+</div>
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+appDS2.config(function($routeProvider) {
+ $routeProvider.otherwise({
+ templateUrl : 'app/BluvalUI/UnRegisterLab/UnRegisterLabTemplate.html',
+ controller : "UnRegisterLabController"
+ });
+});
\ No newline at end of file
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Unregister Lab</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/styles/ecomp.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+ src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+ src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+ src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script src="app/BluvalUI/UnRegisterLab/UnRegisterLab.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script src="app/BluvalUI/UnRegisterLab/UnRegisterLabController.js"></script>
+<script src="app/BluvalUI/UnRegisterLab/Route.js"></script>
+
+<style>
+.controls {
+ margin-bottom: 20px;
+}
+
+.page-header {
+ margin-top: 20px;
+}
+
+ul {
+ list-style: none;
+}
+
+.box {
+ height: 100%;
+ border: 1px solid #ccc;
+ background-color: #fff;
+ position: relative;
+ overflow: hidden;
+}
+
+.box-header {
+ background-color: #eee;
+ padding: 0px 0px 0px 0px;
+ margin-bottom: -25px;
+ cursor: move;
+ position: relative;
+}
+
+.box-header h3 {
+ margin-top: 0px;
+ display: inline-block;
+}
+
+.box-content {
+ padding: 10px;
+ display: block;
+ height: 100%;
+ position: relative;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+
+.box-header-btns {
+ top: 15px;
+ right: 10px;
+ cursor: pointer;
+ position: absolute;
+}
+
+.gridster {
+ border: none;
+ position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+ border: none;
+ display: block;
+}
+
+.box table tr {
+ line-height: 20px;
+}
+
+.box table th {
+ border: none;
+ line-height: 20px;
+}
+
+.menu-container {
+ margin-top: 0px
+}
+
+.handle-e {
+ width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="UnRegisterLab">
+ <div ds2-Header class="header-container"></div>
+ <div ds2-menu id="menuContainer" class="menu-container"></div>
+ <div ng-view id="rightContentProfile" class="content-container"></div>
+ <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var appDS2 = angular.module("UnRegisterLab", [ 'ngRoute', 'ngMessages',
+ 'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+ 'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var app = angular.module('UnRegisterLab');
+app.controller('UnRegisterLabController', function($scope, restAPISvc) {
+
+ initialize();
+
+ function initialize() {
+ $scope.loadingLabs = true;
+ $scope.labInfos = [];
+ $scope.labs = [];
+ $scope.selectedLab = '';
+ restAPISvc.getRestAPI("/api/v1/lab/", function(data) {
+ if (data) {
+ $scope.labInfos = data;
+ angular.forEach(data, function(lab) {
+ $scope.labs.push(lab.lab);
+ });
+ } else {
+ confirm("No labs found");
+ }
+ $scope.loadingLabs = false;
+ });
+ }
+
+ $scope.unRegister = function() {
+ if (!$scope.selectedLab) {
+ confirm("You must select a lab");
+ return;
+ }
+ var finalLabInfo = '';
+ angular.forEach($scope.labInfos, function(labInfo) {
+ if ($scope.selectedLab.trim() === labInfo.lab.trim()) {
+ finalLabInfo = labInfo;
+ }
+ });
+ if (!finalLabInfo) {
+ return;
+ }
+ restAPISvc.deleteRestAPI("/api/v1/lab/", finalLabInfo, function(data) {
+ if (data) {
+ var confirmText = "The lab has been unregistered successfully."
+ confirm(confirmText);
+ } else {
+ confirm("Error when unregistering the lab");
+ }
+ initialize();
+ });
+ }
+});
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+ <div>
+ <h1 class="heading-page">Unregister Lab</h1>
+
+ <div>
+ <div class="form-row">
+ <label for="textinputID-3a">Select lab: </label> <select
+ ng-model="selectedLab"
+ ng-change="selectedLabChange()"
+ ng-options="v for v in labs">
+ </select>
+ </div>
+ </div>
+ <br>
+
+ <div ng-show="loadingLabs">
+ <img src=" static/fusion/images/giphy.gif" />
+ </div>
+
+ <div class="fn-ebz-container"
+ style="position: relative; top: 25px;">
+ <button href="javascript:void(0)" id="addbtn"
+ style="bottom: -17px;" size="small"
+ att-accessibility-click="13,32"
+ class="btn btn-alt btn-small" ng-click="unRegister();">Unregister</button>
+ </div>
+ </div>
+</div>
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+appDS2
+ .config(function($routeProvider) {
+ $routeProvider
+ .otherwise({
+ templateUrl : 'app/BluvalUI/UnRegisterLayer/UnRegisterLayerTemplate.html',
+ controller : "UnRegisterLayerController"
+ });
+ });
\ No newline at end of file
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE html>
+<!-- Single-page application for EPSDK-App using DS2 look and feel. -->
+<html>
+
+<head>
+<meta charset="ISO-8859-1">
+<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
+
+<title>Unregister Layer</title>
+
+<!-- B2b Library -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
+
+<!-- icons in open source -->
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/scribble.css" />
+<link rel="stylesheet" type="text/css"
+ href="static/fusion/sample/css/welcome.css" />
+
+<link rel="stylesheet" type="text/css"
+ href="app/fusion/styles/ecomp.css">
+
+<!-- Common scripts -->
+<script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
+<script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
+<script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
+<script
+ src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
+<script
+ src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
+<script
+ src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
+
+<!-- EPSDK App scripts and common services -->
+<!-- B2b Library -->
+<script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
+<script src="app/BluvalUI/App.Config.js"></script>
+<script src="app/BluvalUI/App.Services.js"></script>
+<script src="app/BluvalUI/UnRegisterLayer/UnRegisterLayer.js"></script>
+
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
+<script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
+
+<script src="app/fusion/scripts/DS2-directives/footer.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
+<script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
+<script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
+<script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
+
+<!-- Page specific items -->
+<script src="app/BluvalUI/UnRegisterLayer/UnRegisterLayerController.js"></script>
+<script src="app/BluvalUI/UnRegisterLayer/Route.js"></script>
+
+<style>
+.controls {
+ margin-bottom: 20px;
+}
+
+.page-header {
+ margin-top: 20px;
+}
+
+ul {
+ list-style: none;
+}
+
+.box {
+ height: 100%;
+ border: 1px solid #ccc;
+ background-color: #fff;
+ position: relative;
+ overflow: hidden;
+}
+
+.box-header {
+ background-color: #eee;
+ padding: 0px 0px 0px 0px;
+ margin-bottom: -25px;
+ cursor: move;
+ position: relative;
+}
+
+.box-header h3 {
+ margin-top: 0px;
+ display: inline-block;
+}
+
+.box-content {
+ padding: 10px;
+ display: block;
+ height: 100%;
+ position: relative;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+
+.box-header-btns {
+ top: 15px;
+ right: 10px;
+ cursor: pointer;
+ position: absolute;
+}
+
+.gridster {
+ border: none;
+ position: relative;
+}
+
+.box-content .box-content-frame {
+
+}
+
+.box table {
+ border: none;
+ display: block;
+}
+
+.box table tr {
+ line-height: 20px;
+}
+
+.box table th {
+ border: none;
+ line-height: 20px;
+}
+
+.menu-container {
+ margin-top: 0px
+}
+
+.handle-e {
+ width: 3px;
+}
+</style>
+</head>
+
+<body class="appBody" ng-app="UnRegisterLayer">
+ <div ds2-Header class="header-container"></div>
+ <div ds2-menu id="menuContainer" class="menu-container"></div>
+ <div ng-view id="rightContentProfile" class="content-container"></div>
+ <div ds2-Footer class="footer-container"></div>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var appDS2 = angular.module("UnRegisterLayer", [ 'ngRoute', 'ngMessages',
+ 'modalServices', 'ngCookies', 'b2b.att', 'gridster', 'ui.bootstrap',
+ 'ui.bootstrap.modal', 'App.Services' ]);
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var app = angular.module('UnRegisterLayer');
+app
+ .controller(
+ 'UnRegisterLayerController',
+ function($scope, restAPISvc) {
+
+ initialize();
+
+ function initialize() {
+ $scope.loadingLayers = true;
+ $scope.layerInfos = [];
+ $scope.layers = [];
+ $scope.selectedLayer = '';
+ restAPISvc.getRestAPI("/api/v1/layer/", function(data) {
+ if (data) {
+ $scope.layerInfos = data;
+ angular.forEach(data, function(layer) {
+ $scope.layers.push(layer.layer);
+ });
+ } else {
+ confirm("No blueprint layers found");
+ }
+ $scope.loadingLayers = false;
+ });
+ }
+
+ $scope.unRegister = function() {
+ if (!$scope.selectedLayer) {
+ confirm("You must select a blueprint layer");
+ return;
+ }
+ var finalLayerInfo = '';
+ angular.forEach($scope.layerInfos, function(layerInfo) {
+ if ($scope.selectedLayer.trim() === layerInfo.layer
+ .trim()) {
+ finalLayerInfo = layerInfo;
+ }
+ });
+ if (!finalLayerInfo) {
+ return;
+ }
+ restAPISvc
+ .deleteRestAPI(
+ "/api/v1/layer/",
+ finalLayerInfo,
+ function(data) {
+ if (data) {
+ var confirmText = "The blueprint layer has been unregistered successfully."
+ confirm(confirmText);
+ } else {
+ confirm("Error when unregistering the blueprint layer");
+ }
+ initialize();
+ });
+ }
+ });
--- /dev/null
+<!--
+Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<div id="page-content" class="content" style="padding: 25px;">
+ <div>
+ <h1 class="heading-page">Unregister Layer</h1>
+
+ <div>
+ <div class="form-row">
+ <label for="textinputID-3a">Select Layer: </label> <select
+ ng-model="selectedLayer"
+ ng-change="selectedLayerChange()"
+ ng-options="v for v in layers">
+ </select>
+ </div>
+ </div>
+ <br>
+
+ <div ng-show="loadingLayers">
+ <img src=" static/fusion/images/giphy.gif" />
+ </div>
+
+ <div class="fn-ebz-container"
+ style="position: relative; top: 25px;">
+ <button href="javascript:void(0)" id="addbtn"
+ style="bottom: -17px;" size="small"
+ att-accessibility-click="13,32"
+ class="btn btn-alt btn-small" ng-click="unRegister();">Unregister</button>
+ </div>
+ </div>
+</div>
<head>
<meta charset="UTF-8">
- <meta http-equiv="refresh" content="0; url=/bluvalui/committedsubmissions">
+ <meta http-equiv="refresh" content="0; url=/bluvalui/getmostrecent">
<script type="text/javascript">
- window.location.href = location.host + "/bluvalui/committedsubmissions"
+ window.location.href = location.host + "/bluvalui/getmostrecent"
</script>
<title>Page Redirection</title>
</head>