From 3982f4f67314ec37fd9b22ae54049958af777c1b Mon Sep 17 00:00:00 2001 From: jimmydot Date: Sun, 7 May 2017 14:58:24 -0400 Subject: [VID-6] Initial rebase push Change-Id: I9077be9663754d9b22f77c6a7b3109b361b39346 Signed-off-by: jimmydot --- .../src/main/webapp/app/vid/icons/7450-icon.png | Bin 0 -> 465 bytes .../src/main/webapp/app/vid/icons/7450-text.png | Bin 0 -> 295 bytes .../src/main/webapp/app/vid/icons/7750-icon.png | Bin 0 -> 565 bytes .../src/main/webapp/app/vid/icons/7750-text.png | Bin 0 -> 632 bytes .../src/main/webapp/app/vid/icons/apn-dns-icon.png | Bin 0 -> 1065 bytes .../src/main/webapp/app/vid/icons/apn-dns-text.png | Bin 0 -> 901 bytes .../src/main/webapp/app/vid/icons/atcf-icon.png | Bin 0 -> 388 bytes .../src/main/webapp/app/vid/icons/atcf-text.png | Bin 0 -> 650 bytes .../src/main/webapp/app/vid/icons/atgw-icon.png | Bin 0 -> 388 bytes .../src/main/webapp/app/vid/icons/atgw-text.png | Bin 0 -> 780 bytes .../src/main/webapp/app/vid/icons/bgcf-icon.png | Bin 0 -> 388 bytes .../src/main/webapp/app/vid/icons/bgcf-text.png | Bin 0 -> 645 bytes .../src/main/webapp/app/vid/icons/com-icon.png | Bin 0 -> 437 bytes .../src/main/webapp/app/vid/icons/cpm-icon.png | Bin 0 -> 201 bytes .../src/main/webapp/app/vid/icons/cpm-text.png | Bin 0 -> 572 bytes .../src/main/webapp/app/vid/icons/default-icon.png | Bin 0 -> 329 bytes .../src/main/webapp/app/vid/icons/dra-epc-icon.png | Bin 0 -> 700 bytes .../src/main/webapp/app/vid/icons/dra-epc-text.png | Bin 0 -> 820 bytes .../src/main/webapp/app/vid/icons/dra-ims-icon.png | Bin 0 -> 700 bytes .../src/main/webapp/app/vid/icons/dra-ims-text.png | Bin 0 -> 851 bytes .../src/main/webapp/app/vid/icons/dslam-icon.png | Bin 0 -> 774 bytes .../src/main/webapp/app/vid/icons/dslam-text.png | Bin 0 -> 739 bytes .../src/main/webapp/app/vid/icons/eatf-icon.png | Bin 0 -> 437 bytes .../src/main/webapp/app/vid/icons/eatf-text.png | Bin 0 -> 439 bytes .../src/main/webapp/app/vid/icons/ecscf-icon.png | Bin 0 -> 855 bytes .../src/main/webapp/app/vid/icons/ecscf-text.png | Bin 0 -> 604 bytes .../src/main/webapp/app/vid/icons/emsc-icon.png | Bin 0 -> 388 bytes .../src/main/webapp/app/vid/icons/enb-icon.png | Bin 0 -> 1127 bytes .../src/main/webapp/app/vid/icons/enb-text.png | Bin 0 -> 627 bytes .../src/main/webapp/app/vid/icons/enum-icon.png | Bin 0 -> 646 bytes .../src/main/webapp/app/vid/icons/enum-text.png | Bin 0 -> 551 bytes .../src/main/webapp/app/vid/icons/esmlc-icon.png | Bin 0 -> 388 bytes .../src/main/webapp/app/vid/icons/esmlc-text.png | Bin 0 -> 701 bytes .../src/main/webapp/app/vid/icons/ettcs-icon.png | Bin 0 -> 95 bytes .../src/main/webapp/app/vid/icons/ettcs-text.png | Bin 0 -> 95 bytes .../src/main/webapp/app/vid/icons/gmlc-icon.png | Bin 0 -> 388 bytes .../src/main/webapp/app/vid/icons/gmlc-text.png | Bin 0 -> 755 bytes .../src/main/webapp/app/vid/icons/hlr-icon.png | Bin 0 -> 646 bytes .../src/main/webapp/app/vid/icons/hlr-text.png | Bin 0 -> 376 bytes .../src/main/webapp/app/vid/icons/hss-epc-icon.png | Bin 0 -> 646 bytes .../src/main/webapp/app/vid/icons/hss-epc-text.png | Bin 0 -> 726 bytes .../src/main/webapp/app/vid/icons/hss-ims-icon.png | Bin 0 -> 646 bytes .../src/main/webapp/app/vid/icons/hss-ims-text.png | Bin 0 -> 757 bytes .../src/main/webapp/app/vid/icons/icscf-icon.png | Bin 0 -> 855 bytes .../src/main/webapp/app/vid/icons/icscf-text.png | Bin 0 -> 657 bytes .../src/main/webapp/app/vid/icons/ipag-icon.png | Bin 0 -> 95 bytes .../src/main/webapp/app/vid/icons/ipag-text.png | Bin 0 -> 95 bytes .../src/main/webapp/app/vid/icons/isbc-icon.png | Bin 0 -> 855 bytes .../src/main/webapp/app/vid/icons/isbc-text.png | Bin 0 -> 649 bytes .../src/main/webapp/app/vid/icons/iwf-icon.png | Bin 0 -> 696 bytes .../src/main/webapp/app/vid/icons/iwf-text.png | Bin 0 -> 595 bytes .../src/main/webapp/app/vid/icons/lrf-rdf-icon.png | Bin 0 -> 953 bytes .../src/main/webapp/app/vid/icons/lrf-rdf-text.png | Bin 0 -> 638 bytes .../src/main/webapp/app/vid/icons/lrg-rdf-text.png | Bin 0 -> 769 bytes .../src/main/webapp/app/vid/icons/mgc8-icon.png | Bin 0 -> 388 bytes .../src/main/webapp/app/vid/icons/mgc8-text.png | Bin 0 -> 771 bytes .../main/webapp/app/vid/icons/mgcf-emsc-icon.png | Bin 0 -> 388 bytes .../main/webapp/app/vid/icons/mgcf-emsc-text.png | Bin 0 -> 1140 bytes .../src/main/webapp/app/vid/icons/mgw-icon.png | Bin 0 -> 388 bytes .../src/main/webapp/app/vid/icons/mgw-text.png | Bin 0 -> 823 bytes .../src/main/webapp/app/vid/icons/mind-icon.png | Bin 0 -> 646 bytes .../src/main/webapp/app/vid/icons/mind-text.png | Bin 0 -> 550 bytes .../src/main/webapp/app/vid/icons/mme-icon.png | Bin 0 -> 232 bytes .../src/main/webapp/app/vid/icons/mme-text.png | Bin 0 -> 252 bytes .../src/main/webapp/app/vid/icons/mrf-icon.png | Bin 0 -> 437 bytes .../src/main/webapp/app/vid/icons/mrf-text.png | Bin 0 -> 504 bytes .../src/main/webapp/app/vid/icons/msc-icon.png | Bin 0 -> 388 bytes .../src/main/webapp/app/vid/icons/msn-icon.png | Bin 0 -> 465 bytes .../src/main/webapp/app/vid/icons/msn-text.png | Bin 0 -> 318 bytes .../src/main/webapp/app/vid/icons/multi-icon.png | Bin 0 -> 329 bytes .../src/main/webapp/app/vid/icons/n7450-icon.png | Bin 0 -> 464 bytes .../src/main/webapp/app/vid/icons/n7450-text.png | Bin 0 -> 295 bytes .../src/main/webapp/app/vid/icons/n7750a-icon.png | Bin 0 -> 393 bytes .../src/main/webapp/app/vid/icons/n7750a-text.png | Bin 0 -> 258 bytes .../src/main/webapp/app/vid/icons/n7750b-icon.png | Bin 0 -> 393 bytes .../src/main/webapp/app/vid/icons/n7750b-text.png | Bin 0 -> 258 bytes .../src/main/webapp/app/vid/icons/n7750c-icon.png | Bin 0 -> 391 bytes .../src/main/webapp/app/vid/icons/n7750c-text.png | Bin 0 -> 258 bytes .../src/main/webapp/app/vid/icons/n7750d-icon.png | Bin 0 -> 391 bytes .../src/main/webapp/app/vid/icons/n7750d-text.png | Bin 0 -> 258 bytes .../src/main/webapp/app/vid/icons/nb-icon.png | Bin 0 -> 1127 bytes .../src/main/webapp/app/vid/icons/nb-text.png | Bin 0 -> 499 bytes .../src/main/webapp/app/vid/icons/pas-icon.png | Bin 0 -> 700 bytes .../src/main/webapp/app/vid/icons/pas-text.png | Bin 0 -> 596 bytes .../src/main/webapp/app/vid/icons/pcef-icon.png | Bin 0 -> 785 bytes .../src/main/webapp/app/vid/icons/pcef-text.png | Bin 0 -> 539 bytes .../src/main/webapp/app/vid/icons/pcrf-icon.png | Bin 0 -> 785 bytes .../src/main/webapp/app/vid/icons/pcrf-text.png | Bin 0 -> 594 bytes .../src/main/webapp/app/vid/icons/pcscf-icon.png | Bin 0 -> 855 bytes .../src/main/webapp/app/vid/icons/pcscf-text.png | Bin 0 -> 744 bytes .../src/main/webapp/app/vid/icons/pgw-icon.png | Bin 0 -> 388 bytes .../src/main/webapp/app/vid/icons/pgw-text.png | Bin 0 -> 807 bytes .../src/main/webapp/app/vid/icons/plrf-icon.png | Bin 0 -> 953 bytes .../src/main/webapp/app/vid/icons/plrf-text.png | Bin 0 -> 735 bytes .../src/main/webapp/app/vid/icons/psap-icon.png | Bin 0 -> 322 bytes .../main/webapp/app/vid/icons/pstn-tdm-icon.png | Bin 0 -> 95 bytes .../main/webapp/app/vid/icons/pstn-tdm-text.png | Bin 0 -> 95 bytes .../src/main/webapp/app/vid/icons/rg-icon.png | Bin 0 -> 388 bytes .../src/main/webapp/app/vid/icons/rg-text.png | Bin 0 -> 540 bytes .../src/main/webapp/app/vid/icons/rnc-icon.png | Bin 0 -> 591 bytes .../src/main/webapp/app/vid/icons/rnc-text.png | Bin 0 -> 646 bytes .../src/main/webapp/app/vid/icons/sbc-icon.png | Bin 0 -> 855 bytes .../src/main/webapp/app/vid/icons/sbc-text.png | Bin 0 -> 632 bytes .../src/main/webapp/app/vid/icons/sccas-icon.png | Bin 0 -> 437 bytes .../src/main/webapp/app/vid/icons/sccas-text.png | Bin 0 -> 861 bytes .../src/main/webapp/app/vid/icons/scscf-icon.png | Bin 0 -> 855 bytes .../src/main/webapp/app/vid/icons/scscf-text.png | Bin 0 -> 704 bytes .../src/main/webapp/app/vid/icons/sdg-icon.png | Bin 0 -> 491 bytes .../src/main/webapp/app/vid/icons/sdg-text.png | Bin 0 -> 696 bytes .../src/main/webapp/app/vid/icons/sgsns4-icon.png | Bin 0 -> 230 bytes .../src/main/webapp/app/vid/icons/sgsns4-text.png | Bin 0 -> 469 bytes .../src/main/webapp/app/vid/icons/sgw-icon.png | Bin 0 -> 388 bytes .../src/main/webapp/app/vid/icons/sgw-text.png | Bin 0 -> 884 bytes .../src/main/webapp/app/vid/icons/siad-icon.png | Bin 0 -> 774 bytes .../src/main/webapp/app/vid/icons/siad-text.png | Bin 0 -> 753 bytes .../main/webapp/app/vid/icons/ss7-gport-icon.png | Bin 0 -> 286 bytes .../main/webapp/app/vid/icons/ss7-gport-text.png | Bin 0 -> 418 bytes .../main/webapp/app/vid/icons/ss7gport-icon.png | Bin 0 -> 646 bytes .../main/webapp/app/vid/icons/ss7gport-text.png | Bin 0 -> 1011 bytes .../src/main/webapp/app/vid/icons/switch-icon.png | Bin 0 -> 877 bytes .../src/main/webapp/app/vid/icons/tas-icon.png | Bin 0 -> 437 bytes .../src/main/webapp/app/vid/icons/tas-text.png | Bin 0 -> 858 bytes .../main/webapp/app/vid/icons/transcoder-icon.png | Bin 0 -> 774 bytes .../main/webapp/app/vid/icons/transcoder-text.png | Bin 0 -> 1242 bytes .../src/main/webapp/app/vid/icons/ue-icon.png | Bin 0 -> 577 bytes .../src/main/webapp/app/vid/icons/uephone-icon.png | Bin 0 -> 1190 bytes .../src/main/webapp/app/vid/icons/usp-dns-icon.png | Bin 0 -> 1065 bytes .../src/main/webapp/app/vid/icons/usp-dns-text.png | Bin 0 -> 826 bytes .../src/main/webapp/app/vid/images/asterisk.png | Bin 0 -> 2289 bytes .../src/main/webapp/app/vid/images/dummy.txt | 0 .../src/main/webapp/app/vid/images/error.png | Bin 0 -> 2297 bytes .../src/main/webapp/app/vid/images/spinner.gif | Bin 0 -> 7358 bytes .../main/webapp/app/vid/scripts/angular-ui-tree.js | 1656 ++++++++++++++++++++ .../vid/scripts/constants/componentConstants.js | 148 ++ .../app/vid/scripts/constants/fieldConstants.js | 378 +++++ .../vid/scripts/constants/parameterConstants.js | 52 + .../app/vid/scripts/constants/vidConfiguration.js | 99 ++ .../scripts/controller/InstantiationController.js | 1217 ++++++++++++++ .../scripts/controller/ServiceModelController.js | 227 +++ .../webapp/app/vid/scripts/controller/VidApp.js | 79 + .../scripts/controller/aaiSubscriberController.js | 821 ++++++++++ .../scripts/controller/creationDialogController.js | 163 ++ .../scripts/controller/deletionDialogController.js | 119 ++ .../scripts/controller/detailsDialogController.js | 84 + .../vid/scripts/controller/msoCommitController.js | 300 ++++ .../scripts/controller/statusDialogController.js | 233 +++ .../app/vid/scripts/controller/subscriberSearch.js | 246 +++ .../vid/scripts/directives/extensionsDirective.js | 79 + .../scripts/directives/parameterBlockDirective.js | 420 +++++ .../vid/scripts/directives/popupWindowDirective.js | 88 ++ .../vid/scripts/directives/progressBarDirective.js | 173 ++ .../webapp/app/vid/scripts/services/aaiService.js | 339 ++++ .../webapp/app/vid/scripts/services/asdcService.js | 40 + .../app/vid/scripts/services/componentService.js | 178 +++ .../app/vid/scripts/services/creationService.js | 924 +++++++++++ .../webapp/app/vid/scripts/services/dataService.js | 243 +++ .../app/vid/scripts/services/deletionService.js | 502 ++++++ .../app/vid/scripts/services/detailsService.js | 98 ++ .../webapp/app/vid/scripts/services/msoService.js | 175 +++ .../app/vid/scripts/services/propertyService.js | 89 ++ .../app/vid/scripts/services/statusService.js | 185 +++ .../app/vid/scripts/services/utilityService.js | 640 ++++++++ .../webapp/app/vid/scripts/services/vnfService.js | 82 + .../app/vid/scripts/view-models/aaiGetSubs.htm | 83 + .../scripts/view-models/aaiGetSubscriberList.htm | 67 + .../vid/scripts/view-models/aaiServiceTypes.htm | 80 + .../app/vid/scripts/view-models/aaiSubDetails.htm | 95 ++ .../app/vid/scripts/view-models/aaiSubViewEdit.htm | 147 ++ .../view-models/createInstanceServiceModels.htm | 125 ++ .../app/vid/scripts/view-models/creationDialog.htm | 64 + .../app/vid/scripts/view-models/deletionDialog.htm | 70 + .../app/vid/scripts/view-models/detailsDialog.htm | 48 + .../app/vid/scripts/view-models/instantiate.htm | 248 +++ .../app/vid/scripts/view-models/msoCommit.htm | 47 + .../app/vid/scripts/view-models/popupWindow.htm | 30 + .../app/vid/scripts/view-models/serviceModels.htm | 91 ++ .../app/vid/scripts/view-models/statusDialog.htm | 66 + .../src/main/webapp/app/vid/styles/aaiGetSubs.css | 62 + .../main/webapp/app/vid/styles/aaiSubDetails.css | 62 + .../main/webapp/app/vid/styles/aaiSubViewEdit.css | 62 + .../main/webapp/app/vid/styles/angular-ui-tree.css | 61 + .../src/main/webapp/app/vid/styles/dialogs.css | 133 ++ .../src/main/webapp/app/vid/styles/dummy.txt | 0 .../src/main/webapp/app/vid/styles/instantiate.css | 62 + .../main/webapp/app/vid/styles/serviceModels.css | 70 + .../webapp/app/vid/styles/subscriberSearch.css | 8 + .../src/main/webapp/app/vid/styles/vidTree.css | 67 + .../src/main/webapp/app/vid/test/testAaiData.js | 254 +++ .../src/main/webapp/app/vid/test/testMso.css | 22 + .../src/main/webapp/app/vid/test/testMso.js | 486 ++++++ .../src/main/webapp/app/vid/test/testViewEdit.css | 30 + .../src/main/webapp/app/vid/test/testViewEdit.js | 376 +++++ 192 files changed, 13093 insertions(+) create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/7450-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/7450-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/7750-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/7750-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/apn-dns-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/apn-dns-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/atcf-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/atcf-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/atgw-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/atgw-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/bgcf-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/bgcf-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/com-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/cpm-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/cpm-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/default-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/dra-epc-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/dra-epc-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/dra-ims-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/dra-ims-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/dslam-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/dslam-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/eatf-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/eatf-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/ecscf-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/ecscf-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/emsc-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/enb-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/enb-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/enum-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/enum-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/esmlc-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/esmlc-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/ettcs-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/ettcs-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/gmlc-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/gmlc-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/hlr-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/hlr-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/hss-epc-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/hss-epc-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/hss-ims-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/hss-ims-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/icscf-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/icscf-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/ipag-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/ipag-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/isbc-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/isbc-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/iwf-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/iwf-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/lrf-rdf-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/lrf-rdf-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/lrg-rdf-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/mgc8-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/mgc8-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/mgcf-emsc-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/mgcf-emsc-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/mgw-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/mgw-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/mind-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/mind-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/mme-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/mme-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/mrf-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/mrf-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/msc-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/msn-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/msn-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/multi-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/n7450-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/n7450-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/n7750a-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/n7750a-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/n7750b-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/n7750b-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/n7750c-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/n7750c-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/n7750d-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/n7750d-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/nb-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/nb-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/pas-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/pas-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/pcef-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/pcef-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/pcrf-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/pcrf-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/pcscf-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/pcscf-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/pgw-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/pgw-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/plrf-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/plrf-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/psap-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/pstn-tdm-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/pstn-tdm-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/rg-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/rg-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/rnc-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/rnc-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/sbc-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/sbc-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/sccas-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/sccas-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/scscf-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/scscf-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/sdg-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/sdg-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/sgsns4-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/sgsns4-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/sgw-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/sgw-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/siad-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/siad-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/ss7-gport-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/ss7-gport-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/ss7gport-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/ss7gport-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/switch-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/tas-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/tas-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/transcoder-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/transcoder-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/ue-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/uephone-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/usp-dns-icon.png create mode 100755 vid-app-common/src/main/webapp/app/vid/icons/usp-dns-text.png create mode 100755 vid-app-common/src/main/webapp/app/vid/images/asterisk.png create mode 100755 vid-app-common/src/main/webapp/app/vid/images/dummy.txt create mode 100755 vid-app-common/src/main/webapp/app/vid/images/error.png create mode 100755 vid-app-common/src/main/webapp/app/vid/images/spinner.gif create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/angular-ui-tree.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/constants/fieldConstants.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/constants/parameterConstants.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/controller/VidApp.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/controller/creationDialogController.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/controller/deletionDialogController.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/controller/detailsDialogController.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitController.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/controller/statusDialogController.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/controller/subscriberSearch.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/directives/extensionsDirective.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/directives/parameterBlockDirective.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/directives/popupWindowDirective.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/directives/progressBarDirective.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/services/componentService.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/services/deletionService.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/services/detailsService.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/services/propertyService.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/services/statusService.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/services/utilityService.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/services/vnfService.js create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubs.htm create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubscriberList.htm create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiServiceTypes.htm create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiSubDetails.htm create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiSubViewEdit.htm create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/view-models/createInstanceServiceModels.htm create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/view-models/creationDialog.htm create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/view-models/deletionDialog.htm create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/view-models/detailsDialog.htm create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/view-models/instantiate.htm create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/view-models/msoCommit.htm create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/view-models/popupWindow.htm create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceModels.htm create mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/view-models/statusDialog.htm create mode 100755 vid-app-common/src/main/webapp/app/vid/styles/aaiGetSubs.css create mode 100755 vid-app-common/src/main/webapp/app/vid/styles/aaiSubDetails.css create mode 100755 vid-app-common/src/main/webapp/app/vid/styles/aaiSubViewEdit.css create mode 100755 vid-app-common/src/main/webapp/app/vid/styles/angular-ui-tree.css create mode 100755 vid-app-common/src/main/webapp/app/vid/styles/dialogs.css create mode 100755 vid-app-common/src/main/webapp/app/vid/styles/dummy.txt create mode 100755 vid-app-common/src/main/webapp/app/vid/styles/instantiate.css create mode 100755 vid-app-common/src/main/webapp/app/vid/styles/serviceModels.css create mode 100755 vid-app-common/src/main/webapp/app/vid/styles/subscriberSearch.css create mode 100755 vid-app-common/src/main/webapp/app/vid/styles/vidTree.css create mode 100755 vid-app-common/src/main/webapp/app/vid/test/testAaiData.js create mode 100755 vid-app-common/src/main/webapp/app/vid/test/testMso.css create mode 100755 vid-app-common/src/main/webapp/app/vid/test/testMso.js create mode 100755 vid-app-common/src/main/webapp/app/vid/test/testViewEdit.css create mode 100755 vid-app-common/src/main/webapp/app/vid/test/testViewEdit.js (limited to 'vid-app-common/src/main/webapp/app/vid') diff --git a/vid-app-common/src/main/webapp/app/vid/icons/7450-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/7450-icon.png new file mode 100755 index 000000000..52ab2b54c Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/7450-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/7450-text.png b/vid-app-common/src/main/webapp/app/vid/icons/7450-text.png new file mode 100755 index 000000000..9b3c33251 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/7450-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/7750-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/7750-icon.png new file mode 100755 index 000000000..9ee5499a9 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/7750-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/7750-text.png b/vid-app-common/src/main/webapp/app/vid/icons/7750-text.png new file mode 100755 index 000000000..aeb2dd002 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/7750-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/apn-dns-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/apn-dns-icon.png new file mode 100755 index 000000000..0ba5c5235 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/apn-dns-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/apn-dns-text.png b/vid-app-common/src/main/webapp/app/vid/icons/apn-dns-text.png new file mode 100755 index 000000000..466311630 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/apn-dns-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/atcf-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/atcf-icon.png new file mode 100755 index 000000000..2904d2770 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/atcf-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/atcf-text.png b/vid-app-common/src/main/webapp/app/vid/icons/atcf-text.png new file mode 100755 index 000000000..1566d5be0 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/atcf-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/atgw-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/atgw-icon.png new file mode 100755 index 000000000..2904d2770 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/atgw-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/atgw-text.png b/vid-app-common/src/main/webapp/app/vid/icons/atgw-text.png new file mode 100755 index 000000000..f7c50c602 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/atgw-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/bgcf-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/bgcf-icon.png new file mode 100755 index 000000000..2904d2770 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/bgcf-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/bgcf-text.png b/vid-app-common/src/main/webapp/app/vid/icons/bgcf-text.png new file mode 100755 index 000000000..b1e0869ec Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/bgcf-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/com-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/com-icon.png new file mode 100755 index 000000000..59463a917 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/com-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/cpm-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/cpm-icon.png new file mode 100755 index 000000000..9176a0d20 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/cpm-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/cpm-text.png b/vid-app-common/src/main/webapp/app/vid/icons/cpm-text.png new file mode 100755 index 000000000..5b35e77d0 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/cpm-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/default-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/default-icon.png new file mode 100755 index 000000000..296a6f5c2 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/default-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/dra-epc-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/dra-epc-icon.png new file mode 100755 index 000000000..74bfcfcec Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/dra-epc-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/dra-epc-text.png b/vid-app-common/src/main/webapp/app/vid/icons/dra-epc-text.png new file mode 100755 index 000000000..00f2a2e45 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/dra-epc-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/dra-ims-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/dra-ims-icon.png new file mode 100755 index 000000000..74bfcfcec Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/dra-ims-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/dra-ims-text.png b/vid-app-common/src/main/webapp/app/vid/icons/dra-ims-text.png new file mode 100755 index 000000000..1d54d9aa9 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/dra-ims-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/dslam-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/dslam-icon.png new file mode 100755 index 000000000..b2a0585aa Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/dslam-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/dslam-text.png b/vid-app-common/src/main/webapp/app/vid/icons/dslam-text.png new file mode 100755 index 000000000..1452d2e6a Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/dslam-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/eatf-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/eatf-icon.png new file mode 100755 index 000000000..59463a917 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/eatf-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/eatf-text.png b/vid-app-common/src/main/webapp/app/vid/icons/eatf-text.png new file mode 100755 index 000000000..ba9b216d0 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/eatf-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/ecscf-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/ecscf-icon.png new file mode 100755 index 000000000..dafbe9e0a Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/ecscf-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/ecscf-text.png b/vid-app-common/src/main/webapp/app/vid/icons/ecscf-text.png new file mode 100755 index 000000000..ca98a51d2 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/ecscf-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/emsc-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/emsc-icon.png new file mode 100755 index 000000000..2904d2770 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/emsc-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/enb-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/enb-icon.png new file mode 100755 index 000000000..e03be510d Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/enb-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/enb-text.png b/vid-app-common/src/main/webapp/app/vid/icons/enb-text.png new file mode 100755 index 000000000..9fbf8c298 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/enb-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/enum-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/enum-icon.png new file mode 100755 index 000000000..daee75ac8 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/enum-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/enum-text.png b/vid-app-common/src/main/webapp/app/vid/icons/enum-text.png new file mode 100755 index 000000000..f04e3d5c5 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/enum-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/esmlc-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/esmlc-icon.png new file mode 100755 index 000000000..2904d2770 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/esmlc-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/esmlc-text.png b/vid-app-common/src/main/webapp/app/vid/icons/esmlc-text.png new file mode 100755 index 000000000..0a29e736f Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/esmlc-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/ettcs-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/ettcs-icon.png new file mode 100755 index 000000000..6f15bdbf4 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/ettcs-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/ettcs-text.png b/vid-app-common/src/main/webapp/app/vid/icons/ettcs-text.png new file mode 100755 index 000000000..6f15bdbf4 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/ettcs-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/gmlc-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/gmlc-icon.png new file mode 100755 index 000000000..2904d2770 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/gmlc-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/gmlc-text.png b/vid-app-common/src/main/webapp/app/vid/icons/gmlc-text.png new file mode 100755 index 000000000..43cf74d9b Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/gmlc-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/hlr-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/hlr-icon.png new file mode 100755 index 000000000..daee75ac8 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/hlr-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/hlr-text.png b/vid-app-common/src/main/webapp/app/vid/icons/hlr-text.png new file mode 100755 index 000000000..b2762502b Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/hlr-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/hss-epc-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/hss-epc-icon.png new file mode 100755 index 000000000..daee75ac8 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/hss-epc-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/hss-epc-text.png b/vid-app-common/src/main/webapp/app/vid/icons/hss-epc-text.png new file mode 100755 index 000000000..9739214fb Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/hss-epc-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/hss-ims-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/hss-ims-icon.png new file mode 100755 index 000000000..daee75ac8 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/hss-ims-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/hss-ims-text.png b/vid-app-common/src/main/webapp/app/vid/icons/hss-ims-text.png new file mode 100755 index 000000000..ec69f2599 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/hss-ims-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/icscf-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/icscf-icon.png new file mode 100755 index 000000000..dafbe9e0a Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/icscf-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/icscf-text.png b/vid-app-common/src/main/webapp/app/vid/icons/icscf-text.png new file mode 100755 index 000000000..6dbfc819c Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/icscf-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/ipag-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/ipag-icon.png new file mode 100755 index 000000000..6f15bdbf4 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/ipag-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/ipag-text.png b/vid-app-common/src/main/webapp/app/vid/icons/ipag-text.png new file mode 100755 index 000000000..6f15bdbf4 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/ipag-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/isbc-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/isbc-icon.png new file mode 100755 index 000000000..dafbe9e0a Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/isbc-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/isbc-text.png b/vid-app-common/src/main/webapp/app/vid/icons/isbc-text.png new file mode 100755 index 000000000..a842e9ffd Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/isbc-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/iwf-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/iwf-icon.png new file mode 100755 index 000000000..a82e73c19 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/iwf-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/iwf-text.png b/vid-app-common/src/main/webapp/app/vid/icons/iwf-text.png new file mode 100755 index 000000000..4d0092eb0 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/iwf-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/lrf-rdf-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/lrf-rdf-icon.png new file mode 100755 index 000000000..82b5c473b Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/lrf-rdf-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/lrf-rdf-text.png b/vid-app-common/src/main/webapp/app/vid/icons/lrf-rdf-text.png new file mode 100755 index 000000000..14daba855 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/lrf-rdf-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/lrg-rdf-text.png b/vid-app-common/src/main/webapp/app/vid/icons/lrg-rdf-text.png new file mode 100755 index 000000000..3f7e2245f Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/lrg-rdf-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/mgc8-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/mgc8-icon.png new file mode 100755 index 000000000..2904d2770 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/mgc8-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/mgc8-text.png b/vid-app-common/src/main/webapp/app/vid/icons/mgc8-text.png new file mode 100755 index 000000000..2ba933a74 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/mgc8-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/mgcf-emsc-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/mgcf-emsc-icon.png new file mode 100755 index 000000000..2904d2770 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/mgcf-emsc-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/mgcf-emsc-text.png b/vid-app-common/src/main/webapp/app/vid/icons/mgcf-emsc-text.png new file mode 100755 index 000000000..74bf8f2c6 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/mgcf-emsc-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/mgw-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/mgw-icon.png new file mode 100755 index 000000000..2904d2770 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/mgw-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/mgw-text.png b/vid-app-common/src/main/webapp/app/vid/icons/mgw-text.png new file mode 100755 index 000000000..a2470f5d1 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/mgw-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/mind-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/mind-icon.png new file mode 100755 index 000000000..daee75ac8 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/mind-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/mind-text.png b/vid-app-common/src/main/webapp/app/vid/icons/mind-text.png new file mode 100755 index 000000000..84f9d86d7 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/mind-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/mme-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/mme-icon.png new file mode 100755 index 000000000..58ab86c59 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/mme-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/mme-text.png b/vid-app-common/src/main/webapp/app/vid/icons/mme-text.png new file mode 100755 index 000000000..e524f192c Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/mme-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/mrf-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/mrf-icon.png new file mode 100755 index 000000000..59463a917 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/mrf-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/mrf-text.png b/vid-app-common/src/main/webapp/app/vid/icons/mrf-text.png new file mode 100755 index 000000000..fa9a61cce Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/mrf-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/msc-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/msc-icon.png new file mode 100755 index 000000000..2904d2770 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/msc-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/msn-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/msn-icon.png new file mode 100755 index 000000000..8386fcb44 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/msn-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/msn-text.png b/vid-app-common/src/main/webapp/app/vid/icons/msn-text.png new file mode 100755 index 000000000..954982f15 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/msn-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/multi-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/multi-icon.png new file mode 100755 index 000000000..296a6f5c2 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/multi-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/n7450-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/n7450-icon.png new file mode 100755 index 000000000..1ed07db41 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/n7450-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/n7450-text.png b/vid-app-common/src/main/webapp/app/vid/icons/n7450-text.png new file mode 100755 index 000000000..9b3c33251 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/n7450-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/n7750a-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/n7750a-icon.png new file mode 100755 index 000000000..79ba2fc22 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/n7750a-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/n7750a-text.png b/vid-app-common/src/main/webapp/app/vid/icons/n7750a-text.png new file mode 100755 index 000000000..afad34de6 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/n7750a-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/n7750b-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/n7750b-icon.png new file mode 100755 index 000000000..bfce0b12d Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/n7750b-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/n7750b-text.png b/vid-app-common/src/main/webapp/app/vid/icons/n7750b-text.png new file mode 100755 index 000000000..afad34de6 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/n7750b-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/n7750c-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/n7750c-icon.png new file mode 100755 index 000000000..47870bc53 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/n7750c-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/n7750c-text.png b/vid-app-common/src/main/webapp/app/vid/icons/n7750c-text.png new file mode 100755 index 000000000..afad34de6 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/n7750c-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/n7750d-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/n7750d-icon.png new file mode 100755 index 000000000..f407a0f6b Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/n7750d-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/n7750d-text.png b/vid-app-common/src/main/webapp/app/vid/icons/n7750d-text.png new file mode 100755 index 000000000..6e25a269f Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/n7750d-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/nb-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/nb-icon.png new file mode 100755 index 000000000..e03be510d Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/nb-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/nb-text.png b/vid-app-common/src/main/webapp/app/vid/icons/nb-text.png new file mode 100755 index 000000000..bbc1357ba Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/nb-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/pas-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/pas-icon.png new file mode 100755 index 000000000..74bfcfcec Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/pas-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/pas-text.png b/vid-app-common/src/main/webapp/app/vid/icons/pas-text.png new file mode 100755 index 000000000..48b1e273b Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/pas-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/pcef-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/pcef-icon.png new file mode 100755 index 000000000..17ed4a4a6 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/pcef-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/pcef-text.png b/vid-app-common/src/main/webapp/app/vid/icons/pcef-text.png new file mode 100755 index 000000000..23faa7d7f Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/pcef-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/pcrf-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/pcrf-icon.png new file mode 100755 index 000000000..17ed4a4a6 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/pcrf-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/pcrf-text.png b/vid-app-common/src/main/webapp/app/vid/icons/pcrf-text.png new file mode 100755 index 000000000..e48c305e2 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/pcrf-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/pcscf-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/pcscf-icon.png new file mode 100755 index 000000000..dafbe9e0a Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/pcscf-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/pcscf-text.png b/vid-app-common/src/main/webapp/app/vid/icons/pcscf-text.png new file mode 100755 index 000000000..b8d2c3dc8 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/pcscf-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/pgw-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/pgw-icon.png new file mode 100755 index 000000000..2904d2770 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/pgw-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/pgw-text.png b/vid-app-common/src/main/webapp/app/vid/icons/pgw-text.png new file mode 100755 index 000000000..d5f86b59a Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/pgw-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/plrf-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/plrf-icon.png new file mode 100755 index 000000000..82b5c473b Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/plrf-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/plrf-text.png b/vid-app-common/src/main/webapp/app/vid/icons/plrf-text.png new file mode 100755 index 000000000..72662ef42 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/plrf-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/psap-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/psap-icon.png new file mode 100755 index 000000000..2145c5f6a Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/psap-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/pstn-tdm-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/pstn-tdm-icon.png new file mode 100755 index 000000000..6f15bdbf4 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/pstn-tdm-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/pstn-tdm-text.png b/vid-app-common/src/main/webapp/app/vid/icons/pstn-tdm-text.png new file mode 100755 index 000000000..6f15bdbf4 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/pstn-tdm-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/rg-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/rg-icon.png new file mode 100755 index 000000000..2904d2770 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/rg-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/rg-text.png b/vid-app-common/src/main/webapp/app/vid/icons/rg-text.png new file mode 100755 index 000000000..ab93224c1 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/rg-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/rnc-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/rnc-icon.png new file mode 100755 index 000000000..733d3da5d Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/rnc-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/rnc-text.png b/vid-app-common/src/main/webapp/app/vid/icons/rnc-text.png new file mode 100755 index 000000000..24cab754a Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/rnc-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/sbc-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/sbc-icon.png new file mode 100755 index 000000000..dafbe9e0a Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/sbc-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/sbc-text.png b/vid-app-common/src/main/webapp/app/vid/icons/sbc-text.png new file mode 100755 index 000000000..f71bfba57 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/sbc-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/sccas-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/sccas-icon.png new file mode 100755 index 000000000..59463a917 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/sccas-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/sccas-text.png b/vid-app-common/src/main/webapp/app/vid/icons/sccas-text.png new file mode 100755 index 000000000..1ca4e1dcf Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/sccas-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/scscf-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/scscf-icon.png new file mode 100755 index 000000000..dafbe9e0a Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/scscf-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/scscf-text.png b/vid-app-common/src/main/webapp/app/vid/icons/scscf-text.png new file mode 100755 index 000000000..fd3cab537 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/scscf-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/sdg-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/sdg-icon.png new file mode 100755 index 000000000..b4c0288b5 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/sdg-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/sdg-text.png b/vid-app-common/src/main/webapp/app/vid/icons/sdg-text.png new file mode 100755 index 000000000..3881e6622 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/sdg-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/sgsns4-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/sgsns4-icon.png new file mode 100755 index 000000000..8df1aac14 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/sgsns4-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/sgsns4-text.png b/vid-app-common/src/main/webapp/app/vid/icons/sgsns4-text.png new file mode 100755 index 000000000..92cbd290a Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/sgsns4-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/sgw-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/sgw-icon.png new file mode 100755 index 000000000..2904d2770 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/sgw-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/sgw-text.png b/vid-app-common/src/main/webapp/app/vid/icons/sgw-text.png new file mode 100755 index 000000000..0801d7974 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/sgw-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/siad-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/siad-icon.png new file mode 100755 index 000000000..b2a0585aa Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/siad-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/siad-text.png b/vid-app-common/src/main/webapp/app/vid/icons/siad-text.png new file mode 100755 index 000000000..323c125e6 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/siad-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/ss7-gport-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/ss7-gport-icon.png new file mode 100755 index 000000000..319bb37c9 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/ss7-gport-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/ss7-gport-text.png b/vid-app-common/src/main/webapp/app/vid/icons/ss7-gport-text.png new file mode 100755 index 000000000..1ba8a76d7 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/ss7-gport-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/ss7gport-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/ss7gport-icon.png new file mode 100755 index 000000000..daee75ac8 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/ss7gport-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/ss7gport-text.png b/vid-app-common/src/main/webapp/app/vid/icons/ss7gport-text.png new file mode 100755 index 000000000..8656f9f84 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/ss7gport-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/switch-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/switch-icon.png new file mode 100755 index 000000000..6e512719d Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/switch-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/tas-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/tas-icon.png new file mode 100755 index 000000000..59463a917 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/tas-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/tas-text.png b/vid-app-common/src/main/webapp/app/vid/icons/tas-text.png new file mode 100755 index 000000000..7a843e8b8 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/tas-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/transcoder-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/transcoder-icon.png new file mode 100755 index 000000000..b2a0585aa Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/transcoder-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/transcoder-text.png b/vid-app-common/src/main/webapp/app/vid/icons/transcoder-text.png new file mode 100755 index 000000000..975dd30b0 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/transcoder-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/ue-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/ue-icon.png new file mode 100755 index 000000000..e23dfd365 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/ue-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/uephone-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/uephone-icon.png new file mode 100755 index 000000000..50182db98 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/uephone-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/usp-dns-icon.png b/vid-app-common/src/main/webapp/app/vid/icons/usp-dns-icon.png new file mode 100755 index 000000000..0ba5c5235 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/usp-dns-icon.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/icons/usp-dns-text.png b/vid-app-common/src/main/webapp/app/vid/icons/usp-dns-text.png new file mode 100755 index 000000000..46de0c265 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/icons/usp-dns-text.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/images/asterisk.png b/vid-app-common/src/main/webapp/app/vid/images/asterisk.png new file mode 100755 index 000000000..2e02da869 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/images/asterisk.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/images/dummy.txt b/vid-app-common/src/main/webapp/app/vid/images/dummy.txt new file mode 100755 index 000000000..e69de29bb diff --git a/vid-app-common/src/main/webapp/app/vid/images/error.png b/vid-app-common/src/main/webapp/app/vid/images/error.png new file mode 100755 index 000000000..4fad9853c Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/images/error.png differ diff --git a/vid-app-common/src/main/webapp/app/vid/images/spinner.gif b/vid-app-common/src/main/webapp/app/vid/images/spinner.gif new file mode 100755 index 000000000..8ed30cb63 Binary files /dev/null and b/vid-app-common/src/main/webapp/app/vid/images/spinner.gif differ diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/angular-ui-tree.js b/vid-app-common/src/main/webapp/app/vid/scripts/angular-ui-tree.js new file mode 100755 index 000000000..6ec907992 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/angular-ui-tree.js @@ -0,0 +1,1656 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 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. + * ============LICENSE_END========================================================= + */ + +/** + * @license Angular UI Tree v2.17.0 + * (c) 2010-2016. https://github.com/angular-ui-tree/angular-ui-tree + * License: MIT + */ +(function () { + 'use strict'; + + angular.module('ui.tree', []) + .constant('treeConfig', { + treeClass: 'angular-ui-tree', + emptyTreeClass: 'angular-ui-tree-empty', + hiddenClass: 'angular-ui-tree-hidden', + nodesClass: 'angular-ui-tree-nodes', + nodeClass: 'angular-ui-tree-node', + handleClass: 'angular-ui-tree-handle', + placeholderClass: 'angular-ui-tree-placeholder', + dragClass: 'angular-ui-tree-drag', + dragThreshold: 3, + levelThreshold: 30, + defaultCollapsed: false + }); + +})(); + +(function () { + 'use strict'; + + angular.module('ui.tree') + + .controller('TreeHandleController', ['$scope', '$element', + function ($scope, $element) { + this.scope = $scope; + + $scope.$element = $element; + $scope.$nodeScope = null; + $scope.$type = 'uiTreeHandle'; + + } + ]); +})(); + +(function () { + 'use strict'; + + angular.module('ui.tree') + .controller('TreeNodeController', ['$scope', '$element', + function ($scope, $element) { + this.scope = $scope; + + $scope.$element = $element; + $scope.$modelValue = null; // Model value for node; + $scope.$parentNodeScope = null; // uiTreeNode Scope of parent node; + $scope.$childNodesScope = null; // uiTreeNodes Scope of child nodes. + $scope.$parentNodesScope = null; // uiTreeNodes Scope of parent nodes. + $scope.$treeScope = null; // uiTree scope + $scope.$handleScope = null; // it's handle scope + $scope.$type = 'uiTreeNode'; + $scope.$$allowNodeDrop = false; + $scope.collapsed = false; + $scope.expandOnHover = false; + + $scope.init = function (controllersArr) { + var treeNodesCtrl = controllersArr[0]; + $scope.$treeScope = controllersArr[1] ? controllersArr[1].scope : null; + + // find the scope of it's parent node + $scope.$parentNodeScope = treeNodesCtrl.scope.$nodeScope; + // modelValue for current node + $scope.$modelValue = treeNodesCtrl.scope.$modelValue[$scope.$index]; + $scope.$parentNodesScope = treeNodesCtrl.scope; + treeNodesCtrl.scope.initSubNode($scope); // init sub nodes + + $element.on('$destroy', function () { + treeNodesCtrl.scope.destroySubNode($scope); // destroy sub nodes + }); + }; + + $scope.index = function () { + return $scope.$parentNodesScope.$modelValue.indexOf($scope.$modelValue); + }; + + $scope.dragEnabled = function () { + return !($scope.$treeScope && !$scope.$treeScope.dragEnabled); + }; + + $scope.isSibling = function (targetNode) { + return $scope.$parentNodesScope == targetNode.$parentNodesScope; + }; + + $scope.isChild = function (targetNode) { + var nodes = $scope.childNodes(); + return nodes && nodes.indexOf(targetNode) > -1; + }; + + $scope.prev = function () { + var index = $scope.index(); + if (index > 0) { + return $scope.siblings()[index - 1]; + } + return null; + }; + + $scope.siblings = function () { + return $scope.$parentNodesScope.childNodes(); + }; + + $scope.childNodesCount = function () { + return $scope.childNodes() ? $scope.childNodes().length : 0; + }; + + $scope.hasChild = function () { + return $scope.childNodesCount() > 0; + }; + + $scope.childNodes = function () { + return $scope.$childNodesScope && $scope.$childNodesScope.$modelValue ? + $scope.$childNodesScope.childNodes() : + null; + }; + + $scope.accept = function (sourceNode, destIndex) { + return $scope.$childNodesScope && + $scope.$childNodesScope.$modelValue && + $scope.$childNodesScope.accept(sourceNode, destIndex); + }; + + $scope.remove = function () { + return $scope.$parentNodesScope.removeNode($scope); + }; + + $scope.toggle = function () { + $scope.collapsed = !$scope.collapsed; + $scope.$treeScope.$callbacks.toggle($scope.collapsed, $scope); + }; + + $scope.collapse = function () { + $scope.collapsed = true; + }; + + $scope.expand = function () { + $scope.collapsed = false; + }; + + $scope.depth = function () { + var parentNode = $scope.$parentNodeScope; + if (parentNode) { + return parentNode.depth() + 1; + } + return 1; + }; + + /** + * Returns the depth of the deepest subtree under this node + * @param scope a TreeNodesController scope object + * @returns Depth of all nodes *beneath* this node. If scope belongs to a leaf node, the + * result is 0 (it has no subtree). + */ + function countSubTreeDepth(scope) { + var thisLevelDepth = 0, + childNodes = scope.childNodes(), + childNode, + childDepth, + i; + if (!childNodes || childNodes.length === 0) { + return 0; + } + for (i = childNodes.length - 1; i >= 0 ; i--) { + childNode = childNodes[i], + childDepth = 1 + countSubTreeDepth(childNode); + thisLevelDepth = Math.max(thisLevelDepth, childDepth); + } + return thisLevelDepth; + } + + $scope.maxSubDepth = function () { + return $scope.$childNodesScope ? countSubTreeDepth($scope.$childNodesScope) : 0; + }; + } + ]); +})(); + +(function () { + 'use strict'; + + angular.module('ui.tree') + + .controller('TreeNodesController', ['$scope', '$element', + function ($scope, $element) { + this.scope = $scope; + + $scope.$element = $element; + $scope.$modelValue = null; + $scope.$nodeScope = null; // the scope of node which the nodes belongs to + $scope.$treeScope = null; + $scope.$type = 'uiTreeNodes'; + $scope.$nodesMap = {}; + + $scope.nodropEnabled = false; + $scope.maxDepth = 0; + $scope.cloneEnabled = false; + + $scope.initSubNode = function (subNode) { + if (!subNode.$modelValue) { + return null; + } + $scope.$nodesMap[subNode.$modelValue.$$hashKey] = subNode; + }; + + $scope.destroySubNode = function (subNode) { + if (!subNode.$modelValue) { + return null; + } + $scope.$nodesMap[subNode.$modelValue.$$hashKey] = null; + }; + + $scope.accept = function (sourceNode, destIndex) { + return $scope.$treeScope.$callbacks.accept(sourceNode, $scope, destIndex); + }; + + $scope.beforeDrag = function (sourceNode) { + return $scope.$treeScope.$callbacks.beforeDrag(sourceNode); + }; + + $scope.isParent = function (node) { + return node.$parentNodesScope == $scope; + }; + + $scope.hasChild = function () { + return $scope.$modelValue.length > 0; + }; + + $scope.safeApply = function (fn) { + var phase = this.$root.$$phase; + if (phase == '$apply' || phase == '$digest') { + if (fn && (typeof (fn) === 'function')) { + fn(); + } + } else { + this.$apply(fn); + } + }; + + $scope.removeNode = function (node) { + var index = $scope.$modelValue.indexOf(node.$modelValue); + if (index > -1) { + $scope.safeApply(function () { + $scope.$modelValue.splice(index, 1)[0]; + }); + return $scope.$treeScope.$callbacks.removed(node); + } + return null; + }; + + $scope.insertNode = function (index, nodeData) { + $scope.safeApply(function () { + $scope.$modelValue.splice(index, 0, nodeData); + }); + }; + + $scope.childNodes = function () { + var i, nodes = []; + if ($scope.$modelValue) { + for (i = 0; i < $scope.$modelValue.length; i++) { + nodes.push($scope.$nodesMap[$scope.$modelValue[i].$$hashKey]); + } + } + return nodes; + }; + + $scope.depth = function () { + if ($scope.$nodeScope) { + return $scope.$nodeScope.depth(); + } + return 0; // if it has no $nodeScope, it's root + }; + + // check if depth limit has reached + $scope.outOfDepth = function (sourceNode) { + var maxDepth = $scope.maxDepth || $scope.$treeScope.maxDepth; + if (maxDepth > 0) { + return $scope.depth() + sourceNode.maxSubDepth() + 1 > maxDepth; + } + return false; + }; + + } + ]); +})(); + +(function () { + 'use strict'; + + angular.module('ui.tree') + + .controller('TreeController', ['$scope', '$element', + function ($scope, $element) { + this.scope = $scope; + + $scope.$element = $element; + $scope.$nodesScope = null; // root nodes + $scope.$type = 'uiTree'; + $scope.$emptyElm = null; + $scope.$callbacks = null; + + $scope.dragEnabled = true; + $scope.emptyPlaceholderEnabled = true; + $scope.maxDepth = 0; + $scope.dragDelay = 0; + $scope.cloneEnabled = false; + $scope.nodropEnabled = false; + + // Check if it's a empty tree + $scope.isEmpty = function () { + return ($scope.$nodesScope && $scope.$nodesScope.$modelValue + && $scope.$nodesScope.$modelValue.length === 0); + }; + + // add placeholder to empty tree + $scope.place = function (placeElm) { + $scope.$nodesScope.$element.append(placeElm); + $scope.$emptyElm.remove(); + }; + + this.resetEmptyElement = function () { + if ((!$scope.$nodesScope.$modelValue || $scope.$nodesScope.$modelValue.length === 0) && + $scope.emptyPlaceholderEnabled) { + $element.append($scope.$emptyElm); + } else { + $scope.$emptyElm.remove(); + } + }; + + $scope.resetEmptyElement = this.resetEmptyElement; + } + ]); +})(); + +(function () { + 'use strict'; + + angular.module('ui.tree') + .directive('uiTree', ['treeConfig', '$window', + function (treeConfig, $window) { + return { + restrict: 'A', + scope: true, + controller: 'TreeController', + link: function (scope, element, attrs, ctrl) { + var callbacks = { + accept: null, + beforeDrag: null + }, + config = {}, + tdElm, + $trElm, + emptyElmColspan; + + angular.extend(config, treeConfig); + if (config.treeClass) { + element.addClass(config.treeClass); + } + + if (element.prop('tagName').toLowerCase() === 'table') { + scope.$emptyElm = angular.element($window.document.createElement('tr')); + $trElm = element.find('tr'); + // If we can find a tr, then we can use its td children as the empty element colspan. + if ($trElm.length > 0) { + emptyElmColspan = angular.element($trElm).children().length; + } else { + // If not, by setting a huge colspan we make sure it takes full width. + emptyElmColspan = 1000000; + } + tdElm = angular.element($window.document.createElement('td')) + .attr('colspan', emptyElmColspan); + scope.$emptyElm.append(tdElm); + } else { + scope.$emptyElm = angular.element($window.document.createElement('div')); + } + + if (config.emptyTreeClass) { + scope.$emptyElm.addClass(config.emptyTreeClass); + } + + scope.$watch('$nodesScope.$modelValue.length', function (val) { + if (!angular.isNumber(val)) { + return; + } + + ctrl.resetEmptyElement(); + }, true); + + scope.$watch(attrs.dragEnabled, function (val) { + if ((typeof val) == 'boolean') { + scope.dragEnabled = val; + } + }); + + scope.$watch(attrs.emptyPlaceholderEnabled, function (val) { + if ((typeof val) == 'boolean') { + scope.emptyPlaceholderEnabled = val; + ctrl.resetEmptyElement(); + } + }); + + scope.$watch(attrs.nodropEnabled, function (val) { + if ((typeof val) == 'boolean') { + scope.nodropEnabled = val; + } + }); + + scope.$watch(attrs.cloneEnabled, function (val) { + if ((typeof val) == 'boolean') { + scope.cloneEnabled = val; + } + }); + + scope.$watch(attrs.maxDepth, function (val) { + if ((typeof val) == 'number') { + scope.maxDepth = val; + } + }); + + scope.$watch(attrs.dragDelay, function (val) { + if ((typeof val) == 'number') { + scope.dragDelay = val; + } + }); + + /** + * Callback checks if the destination node can accept the dragged node. + * By default, ui-tree will check that 'data-nodrop-enabled' is not set for the + * destination ui-tree-nodes, and that the 'max-depth' attribute will not be exceeded + * if it is set on the ui-tree or ui-tree-nodes. + * This callback can be overridden, but callers must manually enforce nodrop and max-depth + * themselves if they need those to be enforced. + * @param sourceNodeScope Scope of the ui-tree-node being dragged + * @param destNodesScope Scope of the ui-tree-nodes where the node is hovering + * @param destIndex Index in the destination nodes array where the source node will drop + * @returns {boolean} True if the node is permitted to be dropped here + */ + callbacks.accept = function (sourceNodeScope, destNodesScope, destIndex) { + return !(destNodesScope.nodropEnabled || destNodesScope.$treeScope.nodropEnabled || destNodesScope.outOfDepth(sourceNodeScope)); + }; + + callbacks.beforeDrag = function (sourceNodeScope) { + return true; + }; + + callbacks.expandTimeoutStart = function() + { + + }; + + callbacks.expandTimeoutCancel = function() + { + + }; + + callbacks.expandTimeoutEnd = function() + { + + }; + + callbacks.removed = function (node) { + + }; + + /** + * Callback is fired when a node is successfully dropped in a new location + * @param event + */ + callbacks.dropped = function (event) { + + }; + + /** + * Callback is fired each time the user starts dragging a node + * @param event + */ + callbacks.dragStart = function (event) { + + }; + + /** + * Callback is fired each time a dragged node is moved with the mouse/touch. + * @param event + */ + callbacks.dragMove = function (event) { + + }; + + /** + * Callback is fired when the tree exits drag mode. If the user dropped a node, the drop may have been + * accepted or reverted. + * @param event + */ + callbacks.dragStop = function (event) { + + }; + + /** + * Callback is fired when a user drops a node (but prior to processing the drop action) + * beforeDrop can return a Promise, truthy, or falsy (returning nothing is falsy). + * If it returns falsy, or a resolve Promise, the node move is accepted + * If it returns truthy, or a rejected Promise, the node move is reverted + * @param event + * @returns {Boolean|Promise} Truthy (or rejected Promise) to cancel node move; falsy (or resolved promise) + */ + callbacks.beforeDrop = function (event) { + + }; + + /** + * Callback is fired when a user toggles node (but after processing the toggle action) + * @param sourceNodeScope + * @param collapsed + */ + callbacks.toggle = function (collapsed, sourceNodeScope) { + + }; + + scope.$watch(attrs.uiTree, function (newVal, oldVal) { + angular.forEach(newVal, function (value, key) { + if (callbacks[key]) { + if (typeof value === 'function') { + callbacks[key] = value; + } + } + }); + + scope.$callbacks = callbacks; + }, true); + + + } + }; + } + ]); +})(); + +(function () { + 'use strict'; + + angular.module('ui.tree') + .directive('uiTreeHandle', ['treeConfig', + function (treeConfig) { + return { + require: '^uiTreeNode', + restrict: 'A', + scope: true, + controller: 'TreeHandleController', + link: function (scope, element, attrs, treeNodeCtrl) { + var config = {}; + angular.extend(config, treeConfig); + if (config.handleClass) { + element.addClass(config.handleClass); + } + // connect with the tree node. + if (scope != treeNodeCtrl.scope) { + scope.$nodeScope = treeNodeCtrl.scope; + treeNodeCtrl.scope.$handleScope = scope; + } + } + }; + } + ]); +})(); + +(function () { + 'use strict'; + + angular.module('ui.tree') + + .directive('uiTreeNode', ['treeConfig', 'UiTreeHelper', '$window', '$document', '$timeout', '$q', + function (treeConfig, UiTreeHelper, $window, $document, $timeout, $q) { + return { + require: ['^uiTreeNodes', '^uiTree'], + restrict: 'A', + controller: 'TreeNodeController', + link: function (scope, element, attrs, controllersArr) { + // todo startPos is unused + var config = {}, + hasTouch = 'ontouchstart' in window, + startPos, firstMoving, dragInfo, pos, + placeElm, hiddenPlaceElm, dragElm, + treeScope = null, + elements, // As a parameter for callbacks + dragDelaying = true, + dragStarted = false, + dragTimer = null, + body = document.body, + html = document.documentElement, + document_height, + document_width, + dragStart, + tagName, + dragMove, + dragEnd, + dragStartEvent, + dragMoveEvent, + dragEndEvent, + dragCancelEvent, + dragDelay, + bindDragStartEvents, + bindDragMoveEvents, + unbindDragMoveEvents, + keydownHandler, + outOfBounds, + isHandleChild, + el; + + angular.extend(config, treeConfig); + if (config.nodeClass) { + element.addClass(config.nodeClass); + } + scope.init(controllersArr); + + scope.collapsed = !!UiTreeHelper.getNodeAttribute(scope, 'collapsed') || treeConfig.defaultCollapsed; + scope.expandOnHover = !!UiTreeHelper.getNodeAttribute(scope, 'expandOnHover'); + scope.sourceOnly = scope.nodropEnabled || scope.$treeScope.nodropEnabled; + + scope.$watch(attrs.collapsed, function (val) { + if ((typeof val) == 'boolean') { + scope.collapsed = val; + } + }); + + scope.$watch('collapsed', function (val) { + UiTreeHelper.setNodeAttribute(scope, 'collapsed', val); + attrs.$set('collapsed', val); + }); + + scope.$watch(attrs.expandOnHover, function(val) { + if ((typeof val) == 'boolean') { + scope.expandOnHover = val; + } + }); + + scope.$watch('expandOnHover', function (val) { + UiTreeHelper.setNodeAttribute(scope, 'expandOnHover', val); + attrs.$set('expandOnHover', val); + }); + + scope.$on('angular-ui-tree:collapse-all', function () { + scope.collapsed = true; + }); + + scope.$on('angular-ui-tree:expand-all', function () { + scope.collapsed = false; + }); + + /** + * Called when the user has grabbed a node and started dragging it + * @param e + */ + dragStart = function (e) { + // disable right click + if (!hasTouch && (e.button === 2 || e.which === 3)) { + return; + } + + // event has already fired in other scope + if (e.uiTreeDragging || (e.originalEvent && e.originalEvent.uiTreeDragging)) { + return; + } + + // the node being dragged + var eventElm = angular.element(e.target), + isHandleChild, cloneElm, eventElmTagName, tagName, + eventObj, tdElm, hStyle, + isTreeNode, + isTreeNodeHandle; + + // if the target element is a child element of a ui-tree-handle, + // use the containing handle element as target element + isHandleChild = UiTreeHelper.treeNodeHandlerContainerOfElement(eventElm); + if (isHandleChild) { + eventElm = angular.element(isHandleChild); + } + + cloneElm = element.clone(); + isTreeNode = UiTreeHelper.elementIsTreeNode(eventElm); + isTreeNodeHandle = UiTreeHelper.elementIsTreeNodeHandle(eventElm); + + if (!isTreeNode && !isTreeNodeHandle) { + return; + } + + if (isTreeNode && UiTreeHelper.elementContainsTreeNodeHandler(eventElm)) { + return; + } + + eventElmTagName = eventElm.prop('tagName').toLowerCase(); + if (eventElmTagName == 'input' || + eventElmTagName == 'textarea' || + eventElmTagName == 'button' || + eventElmTagName == 'select') { // if it's a input or button, ignore it + return; + } + + // check if it or it's parents has a 'data-nodrag' attribute + el = angular.element(e.target); + while (el && el[0] && el[0] !== element) { + if (UiTreeHelper.nodrag(el)) { // if the node mark as `nodrag`, DONOT drag it. + return; + } + el = el.parent(); + } + + if (!scope.beforeDrag(scope)) { + return; + } + + e.uiTreeDragging = true; // stop event bubbling + if (e.originalEvent) { + e.originalEvent.uiTreeDragging = true; + } + e.preventDefault(); + eventObj = UiTreeHelper.eventObj(e); + + firstMoving = true; + dragInfo = UiTreeHelper.dragInfo(scope); + + tagName = element.prop('tagName'); + + if (tagName.toLowerCase() === 'tr') { + placeElm = angular.element($window.document.createElement(tagName)); + tdElm = angular.element($window.document.createElement('td')) + .addClass(config.placeholderClass) + .attr('colspan', element[0].children.length); + placeElm.append(tdElm); + } else { + placeElm = angular.element($window.document.createElement(tagName)) + .addClass(config.placeholderClass); + } + hiddenPlaceElm = angular.element($window.document.createElement(tagName)); + if (config.hiddenClass) { + hiddenPlaceElm.addClass(config.hiddenClass); + } + + pos = UiTreeHelper.positionStarted(eventObj, element); + placeElm.css('height', UiTreeHelper.height(element) + 'px'); + + dragElm = angular.element($window.document.createElement(scope.$parentNodesScope.$element.prop('tagName'))) + .addClass(scope.$parentNodesScope.$element.attr('class')).addClass(config.dragClass); + dragElm.css('width', UiTreeHelper.width(element) + 'px'); + dragElm.css('z-index', 9999); + + // Prevents cursor to change rapidly in Opera 12.16 and IE when dragging an element + hStyle = (element[0].querySelector('.angular-ui-tree-handle') || element[0]).currentStyle; + if (hStyle) { + document.body.setAttribute('ui-tree-cursor', $document.find('body').css('cursor') || ''); + $document.find('body').css({'cursor': hStyle.cursor + '!important'}); + } + + if (scope.sourceOnly) { + placeElm.css('display', 'none'); + } + element.after(placeElm); + element.after(hiddenPlaceElm); + if (dragInfo.isClone() && scope.sourceOnly) { + dragElm.append(cloneElm); + } else { + dragElm.append(element); + } + + $document.find('body').append(dragElm); + + dragElm.css({ + 'left': eventObj.pageX - pos.offsetX + 'px', + 'top': eventObj.pageY - pos.offsetY + 'px' + }); + elements = { + placeholder: placeElm, + dragging: dragElm + }; + + bindDragMoveEvents(); + // Fire dragStart callback + scope.$apply(function () { + scope.$treeScope.$callbacks.dragStart(dragInfo.eventArgs(elements, pos)); + }); + + document_height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight); + document_width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth); + }; + + dragMove = function (e) { + var eventObj = UiTreeHelper.eventObj(e), + prev, + next, + leftElmPos, + topElmPos, + top_scroll, + bottom_scroll, + target, + decrease, + targetX, + targetY, + displayElm, + targetNode, + targetElm, + isEmpty, + scrollDownBy, + targetOffset, + targetBefore; + + if (dragElm) { + e.preventDefault(); + + if ($window.getSelection) { + $window.getSelection().removeAllRanges(); + } else if ($window.document.selection) { + $window.document.selection.empty(); + } + + leftElmPos = eventObj.pageX - pos.offsetX; + topElmPos = eventObj.pageY - pos.offsetY; + + //dragElm can't leave the screen on the left + if (leftElmPos < 0) { + leftElmPos = 0; + } + + //dragElm can't leave the screen on the top + if (topElmPos < 0) { + topElmPos = 0; + } + + //dragElm can't leave the screen on the bottom + if ((topElmPos + 10) > document_height) { + topElmPos = document_height - 10; + } + + //dragElm can't leave the screen on the right + if ((leftElmPos + 10) > document_width) { + leftElmPos = document_width - 10; + } + + dragElm.css({ + 'left': leftElmPos + 'px', + 'top': topElmPos + 'px' + }); + + top_scroll = window.pageYOffset || $window.document.documentElement.scrollTop; + bottom_scroll = top_scroll + (window.innerHeight || $window.document.clientHeight || $window.document.clientHeight); + + // to scroll down if cursor y-position is greater than the bottom position the vertical scroll + if (bottom_scroll < eventObj.pageY && bottom_scroll < document_height) { + scrollDownBy = Math.min(document_height - bottom_scroll, 10); + window.scrollBy(0, scrollDownBy); + } + + // to scroll top if cursor y-position is less than the top position the vertical scroll + if (top_scroll > eventObj.pageY) { + window.scrollBy(0, -10); + } + + UiTreeHelper.positionMoved(e, pos, firstMoving); + if (firstMoving) { + firstMoving = false; + return; + } + + // check if add it as a child node first + // todo decrease is unused + decrease = (UiTreeHelper.offset(dragElm).left - UiTreeHelper.offset(placeElm).left) >= config.threshold; + + targetX = eventObj.pageX - ($window.pageXOffset || + $window.document.body.scrollLeft || + $window.document.documentElement.scrollLeft) - + ($window.document.documentElement.clientLeft || 0); + + targetY = eventObj.pageY - ($window.pageYOffset || + $window.document.body.scrollTop || + $window.document.documentElement.scrollTop) - + ($window.document.documentElement.clientTop || 0); + + // Select the drag target. Because IE does not support CSS 'pointer-events: none', it will always + // pick the drag element itself as the target. To prevent this, we hide the drag element while + // selecting the target. + if (angular.isFunction(dragElm.hide)) { + dragElm.hide(); + } else { + displayElm = dragElm[0].style.display; + dragElm[0].style.display = 'none'; + } + + // when using elementFromPoint() inside an iframe, you have to call + // elementFromPoint() twice to make sure IE8 returns the correct value + $window.document.elementFromPoint(targetX, targetY); + + targetElm = angular.element($window.document.elementFromPoint(targetX, targetY)); + + // if the target element is a child element of a ui-tree-handle, + // use the containing handle element as target element + isHandleChild = UiTreeHelper.treeNodeHandlerContainerOfElement(targetElm); + if (isHandleChild) { + targetElm = angular.element(isHandleChild); + } + + if (angular.isFunction(dragElm.show)) { + dragElm.show(); + } else { + dragElm[0].style.display = displayElm; + } + + outOfBounds = !UiTreeHelper.elementIsTreeNodeHandle(targetElm) && + !UiTreeHelper.elementIsTreeNode(targetElm) && + !UiTreeHelper.elementIsTreeNodes(targetElm) && + !UiTreeHelper.elementIsTree(targetElm) && + !UiTreeHelper.elementIsPlaceholder(targetElm); + + // Detect out of bounds condition, update drop target display, and prevent drop + if (outOfBounds) { + + // Remove the placeholder + placeElm.remove(); + + // If the target was an empty tree, replace the empty element placeholder + if (treeScope) { + treeScope.resetEmptyElement(); + treeScope = null; + } + } + + // move horizontal + if (pos.dirAx && pos.distAxX >= config.levelThreshold) { + pos.distAxX = 0; + + // increase horizontal level if previous sibling exists and is not collapsed + if (pos.distX > 0) { + prev = dragInfo.prev(); + if (prev && !prev.collapsed + && prev.accept(scope, prev.childNodesCount())) { + prev.$childNodesScope.$element.append(placeElm); + dragInfo.moveTo(prev.$childNodesScope, prev.childNodes(), prev.childNodesCount()); + } + } + + // decrease horizontal level + if (pos.distX < 0) { + // we can't decrease a level if an item preceeds the current one + next = dragInfo.next(); + if (!next) { + target = dragInfo.parentNode(); // As a sibling of it's parent node + if (target + && target.$parentNodesScope.accept(scope, target.index() + 1)) { + target.$element.after(placeElm); + dragInfo.moveTo(target.$parentNodesScope, target.siblings(), target.index() + 1); + } + } + } + } + + // move vertical + if (!pos.dirAx) { + if (UiTreeHelper.elementIsTree(targetElm)) { + targetNode = targetElm.controller('uiTree').scope; + } else if (UiTreeHelper.elementIsTreeNodeHandle(targetElm)) { + targetNode = targetElm.controller('uiTreeHandle').scope; + } else if (UiTreeHelper.elementIsTreeNode(targetElm)) { + targetNode = targetElm.controller('uiTreeNode').scope; + } else if (UiTreeHelper.elementIsTreeNodes(targetElm)) { + targetNode = targetElm.controller('uiTreeNodes').scope; + } else if (UiTreeHelper.elementIsPlaceholder(targetElm)) { + targetNode = targetElm.controller('uiTreeNodes').scope; + } else if (targetElm.controller('uiTreeNode')) { + // is a child element of a node + targetNode = targetElm.controller('uiTreeNode').scope; + } + + // check it's new position + isEmpty = false; + if (!targetNode) { + return; + } + + // Show the placeholder if it was hidden for nodrop-enabled and this is a new tree + if (targetNode.$treeScope && !targetNode.$parent.nodropEnabled && !targetNode.$treeScope.nodropEnabled) { + placeElm.css('display', ''); + } + + if (targetNode.$type == 'uiTree' && targetNode.dragEnabled) { + isEmpty = targetNode.isEmpty(); // Check if it's empty tree + } + + if (targetNode.$type == 'uiTreeHandle') { + targetNode = targetNode.$nodeScope; + } + + if (targetNode.$type != 'uiTreeNode' + && !isEmpty) { // Check if it is a uiTreeNode or it's an empty tree + return; + } + + // if placeholder move from empty tree, reset it. + if (treeScope && placeElm.parent()[0] != treeScope.$element[0]) { + treeScope.resetEmptyElement(); + treeScope = null; + } + + if (isEmpty) { // it's an empty tree + treeScope = targetNode; + if (targetNode.$nodesScope.accept(scope, 0)) { + targetNode.place(placeElm); + dragInfo.moveTo(targetNode.$nodesScope, targetNode.$nodesScope.childNodes(), 0); + } + } else if (targetNode.dragEnabled()) { // drag enabled + if (angular.isDefined(scope.expandTimeoutOn) && scope.expandTimeoutOn !== targetNode.id) { + $timeout.cancel(scope.expandTimeout); + delete scope.expandTimeout; + delete scope.expandTimeoutOn; + + scope.$callbacks.expandTimeoutCancel(); + } + + if (targetNode.collapsed) { + if (scope.expandOnHover === true || (angular.isNumber(scope.expandOnHover) && scope.expandOnHover === 0)) { + targetNode.collapsed = false; + } else if (scope.expandOnHover !== false && angular.isNumber(scope.expandOnHover) && scope.expandOnHover > 0) { + if (angular.isUndefined(scope.expandTimeoutOn)) { + scope.expandTimeoutOn = targetNode.$id; + + scope.$callbacks.expandTimeoutStart(); + scope.expandTimeout = $timeout(function() + { + scope.$callbacks.expandTimeoutEnd(); + targetNode.collapsed = false; + }, scope.expandOnHover); + } + } + } + + targetElm = targetNode.$element; // Get the element of ui-tree-node + targetOffset = UiTreeHelper.offset(targetElm); + targetBefore = targetNode.horizontal ? eventObj.pageX < (targetOffset.left + UiTreeHelper.width(targetElm) / 2) + : eventObj.pageY < (targetOffset.top + UiTreeHelper.height(targetElm) / 2); + + if (targetNode.$parentNodesScope.accept(scope, targetNode.index())) { + if (targetBefore) { + targetElm[0].parentNode.insertBefore(placeElm[0], targetElm[0]); + dragInfo.moveTo(targetNode.$parentNodesScope, targetNode.siblings(), targetNode.index()); + } else { + targetElm.after(placeElm); + dragInfo.moveTo(targetNode.$parentNodesScope, targetNode.siblings(), targetNode.index() + 1); + } + } else if (!targetBefore && targetNode.accept(scope, targetNode.childNodesCount())) { // we have to check if it can add the dragging node as a child + targetNode.$childNodesScope.$element.append(placeElm); + dragInfo.moveTo(targetNode.$childNodesScope, targetNode.childNodes(), targetNode.childNodesCount()); + } else { + outOfBounds = true; + } + } + } + + scope.$apply(function () { + scope.$treeScope.$callbacks.dragMove(dragInfo.eventArgs(elements, pos)); + }); + } + }; + + dragEnd = function (e) { + var dragEventArgs = dragInfo.eventArgs(elements, pos); + e.preventDefault(); + unbindDragMoveEvents(); + + $timeout.cancel(scope.expandTimeout); + + scope.$treeScope.$apply(function () { + $q.when(scope.$treeScope.$callbacks.beforeDrop(dragEventArgs)) + // promise resolved (or callback didn't return false) + .then(function (allowDrop) { + if (allowDrop !== false && scope.$$allowNodeDrop && !outOfBounds) { // node drop accepted) + dragInfo.apply(); + // fire the dropped callback only if the move was successful + scope.$treeScope.$callbacks.dropped(dragEventArgs); + } else { // drop canceled - revert the node to its original position + bindDragStartEvents(); + } + }) + // promise rejected - revert the node to its original position + .catch(function () { + bindDragStartEvents(); + }) + .finally(function () { + hiddenPlaceElm.replaceWith(scope.$element); + placeElm.remove(); + + if (dragElm) { // drag element is attached to the mouse pointer + dragElm.remove(); + dragElm = null; + } + scope.$treeScope.$callbacks.dragStop(dragEventArgs); + scope.$$allowNodeDrop = false; + dragInfo = null; + + // Restore cursor in Opera 12.16 and IE + var oldCur = document.body.getAttribute('ui-tree-cursor'); + if (oldCur !== null) { + $document.find('body').css({'cursor': oldCur}); + document.body.removeAttribute('ui-tree-cursor'); + } + }); + }); + }; + + dragStartEvent = function (e) { + if (scope.dragEnabled()) { + dragStart(e); + } + }; + + dragMoveEvent = function (e) { + dragMove(e); + }; + + dragEndEvent = function (e) { + scope.$$allowNodeDrop = true; + dragEnd(e); + }; + + dragCancelEvent = function (e) { + dragEnd(e); + }; + + dragDelay = (function () { + var to; + + return { + exec: function (fn, ms) { + if (!ms) { + ms = 0; + } + this.cancel(); + to = $timeout(fn, ms); + }, + cancel: function () { + $timeout.cancel(to); + } + }; + })(); + + /** + * Binds the mouse/touch events to enable drag start for this node + */ + bindDragStartEvents = function () { + element.bind('touchstart mousedown', function (e) { + dragDelay.exec(function () { + dragStartEvent(e); + }, scope.dragDelay || 0); + }); + element.bind('touchend touchcancel mouseup', function () { + dragDelay.cancel(); + }); + }; + bindDragStartEvents(); + + /** + * Binds mouse/touch events that handle moving/dropping this dragged node + */ + bindDragMoveEvents = function () { + angular.element($document).bind('touchend', dragEndEvent); + angular.element($document).bind('touchcancel', dragEndEvent); + angular.element($document).bind('touchmove', dragMoveEvent); + angular.element($document).bind('mouseup', dragEndEvent); + angular.element($document).bind('mousemove', dragMoveEvent); + angular.element($document).bind('mouseleave', dragCancelEvent); + }; + + /** + * Unbinds mouse/touch events that handle moving/dropping this dragged node + */ + unbindDragMoveEvents = function () { + angular.element($document).unbind('touchend', dragEndEvent); + angular.element($document).unbind('touchcancel', dragEndEvent); + angular.element($document).unbind('touchmove', dragMoveEvent); + angular.element($document).unbind('mouseup', dragEndEvent); + angular.element($document).unbind('mousemove', dragMoveEvent); + angular.element($document).unbind('mouseleave', dragCancelEvent); + }; + + keydownHandler = function (e) { + if (e.keyCode == 27) { + scope.$$allowNodeDrop = false; + dragEnd(e); + } + }; + + angular.element($window.document).bind('keydown', keydownHandler); + + //unbind handler that retains scope + scope.$on('$destroy', function () { + angular.element($window.document).unbind('keydown', keydownHandler); + }); + } + }; + } + ]); + +})(); + +(function () { + 'use strict'; + + angular.module('ui.tree') + .directive('uiTreeNodes', ['treeConfig', '$window', + function (treeConfig) { + return { + require: ['ngModel', '?^uiTreeNode', '^uiTree'], + restrict: 'A', + scope: true, + controller: 'TreeNodesController', + link: function (scope, element, attrs, controllersArr) { + + var config = {}, + ngModel = controllersArr[0], + treeNodeCtrl = controllersArr[1], + treeCtrl = controllersArr[2]; + + angular.extend(config, treeConfig); + if (config.nodesClass) { + element.addClass(config.nodesClass); + } + + if (treeNodeCtrl) { + treeNodeCtrl.scope.$childNodesScope = scope; + scope.$nodeScope = treeNodeCtrl.scope; + } else { + // find the root nodes if there is no parent node and have a parent ui-tree + treeCtrl.scope.$nodesScope = scope; + } + scope.$treeScope = treeCtrl.scope; + + if (ngModel) { + ngModel.$render = function () { + scope.$modelValue = ngModel.$modelValue; + }; + } + + scope.$watch(function () { + return attrs.maxDepth; + }, function (val) { + if ((typeof val) == 'number') { + scope.maxDepth = val; + } + }); + + scope.$watch(function () { + return attrs.nodropEnabled; + }, function (newVal) { + if ((typeof newVal) != 'undefined') { + scope.nodropEnabled = true; + } + }, true); + + attrs.$observe('horizontal', function (val) { + scope.horizontal = ((typeof val) != 'undefined'); + }); + + } + }; + } + ]); +})(); + +(function () { + 'use strict'; + + angular.module('ui.tree') + + /** + * @ngdoc service + * @name ui.tree.service:UiTreeHelper + * @requires ng.$document + * @requires ng.$window + * + * @description + * angular-ui-tree. + */ + .factory('UiTreeHelper', ['$document', '$window', 'treeConfig', + function ($document, $window, treeConfig) { + return { + + /** + * A hashtable used to storage data of nodes + * @type {Object} + */ + nodesData: {}, + + setNodeAttribute: function (scope, attrName, val) { + if (!scope.$modelValue) { + return null; + } + var data = this.nodesData[scope.$modelValue.$$hashKey]; + if (!data) { + data = {}; + this.nodesData[scope.$modelValue.$$hashKey] = data; + } + data[attrName] = val; + }, + + getNodeAttribute: function (scope, attrName) { + if (!scope.$modelValue) { + return null; + } + var data = this.nodesData[scope.$modelValue.$$hashKey]; + if (data) { + return data[attrName]; + } + return null; + }, + + /** + * @ngdoc method + * @methodOf ui.tree.service:$nodrag + * @param {Object} targetElm angular element + * @return {Bool} check if the node can be dragged. + */ + nodrag: function (targetElm) { + if (typeof targetElm.attr('data-nodrag') != 'undefined') { + return targetElm.attr('data-nodrag') !== 'false'; + } + return false; + }, + + /** + * get the event object for touches + * @param {[type]} e [description] + * @return {[type]} [description] + */ + eventObj: function (e) { + var obj = e; + if (e.targetTouches !== undefined) { + obj = e.targetTouches.item(0); + } else if (e.originalEvent !== undefined && e.originalEvent.targetTouches !== undefined) { + obj = e.originalEvent.targetTouches.item(0); + } + return obj; + }, + + dragInfo: function (node) { + return { + source: node, + sourceInfo: { + cloneModel: node.$treeScope.cloneEnabled === true ? angular.copy(node.$modelValue) : undefined, + nodeScope: node, + index: node.index(), + nodesScope: node.$parentNodesScope + }, + index: node.index(), + siblings: node.siblings().slice(0), + parent: node.$parentNodesScope, + + // Move the node to a new position + moveTo: function (parent, siblings, index) { + this.parent = parent; + this.siblings = siblings.slice(0); + + // If source node is in the target nodes + var i = this.siblings.indexOf(this.source); + if (i > -1) { + this.siblings.splice(i, 1); + if (this.source.index() < index) { + index--; + } + } + + this.siblings.splice(index, 0, this.source); + this.index = index; + }, + + parentNode: function () { + return this.parent.$nodeScope; + }, + + prev: function () { + if (this.index > 0) { + return this.siblings[this.index - 1]; + } + + return null; + }, + + next: function () { + if (this.index < this.siblings.length - 1) { + return this.siblings[this.index + 1]; + } + + return null; + }, + + isClone: function () { + return this.source.$treeScope.cloneEnabled === true; + }, + + clonedNode: function (node) { + return angular.copy(node); + }, + + isDirty: function () { + return this.source.$parentNodesScope != this.parent || + this.source.index() != this.index; + }, + + isForeign: function () { + return this.source.$treeScope !== this.parent.$treeScope; + }, + + eventArgs: function (elements, pos) { + return { + source: this.sourceInfo, + dest: { + index: this.index, + nodesScope: this.parent + }, + elements: elements, + pos: pos + }; + }, + + apply: function () { + + var nodeData = this.source.$modelValue; + + // nodrop enabled on tree or parent + if (this.parent.nodropEnabled || this.parent.$treeScope.nodropEnabled) { + return; + } + + // node was dropped in the same place - do nothing + if (!this.isDirty()) { + return; + } + + // cloneEnabled and cross-tree so copy and do not remove from source + if (this.isClone() && this.isForeign()) { + this.parent.insertNode(this.index, this.sourceInfo.cloneModel); + } else { // Any other case, remove and reinsert + this.source.remove(); + this.parent.insertNode(this.index, nodeData); + } + } + }; + }, + + /** + * @ngdoc method + * @name ui.tree#height + * @methodOf ui.tree.service:UiTreeHelper + * + * @description + * Get the height of an element. + * + * @param {Object} element Angular element. + * @returns {String} Height + */ + height: function (element) { + return element.prop('scrollHeight'); + }, + + /** + * @ngdoc method + * @name ui.tree#width + * @methodOf ui.tree.service:UiTreeHelper + * + * @description + * Get the width of an element. + * + * @param {Object} element Angular element. + * @returns {String} Width + */ + width: function (element) { + return element.prop('scrollWidth'); + }, + + /** + * @ngdoc method + * @name ui.tree#offset + * @methodOf ui.nestedSortable.service:UiTreeHelper + * + * @description + * Get the offset values of an element. + * + * @param {Object} element Angular element. + * @returns {Object} Object with properties width, height, top and left + */ + offset: function (element) { + var boundingClientRect = element[0].getBoundingClientRect(); + + return { + width: element.prop('offsetWidth'), + height: element.prop('offsetHeight'), + top: boundingClientRect.top + ($window.pageYOffset || $document[0].body.scrollTop || $document[0].documentElement.scrollTop), + left: boundingClientRect.left + ($window.pageXOffset || $document[0].body.scrollLeft || $document[0].documentElement.scrollLeft) + }; + }, + + /** + * @ngdoc method + * @name ui.tree#positionStarted + * @methodOf ui.tree.service:UiTreeHelper + * + * @description + * Get the start position of the target element according to the provided event properties. + * + * @param {Object} e Event + * @param {Object} target Target element + * @returns {Object} Object with properties offsetX, offsetY, startX, startY, nowX and dirX. + */ + positionStarted: function (e, target) { + var pos = {}, + pageX = e.pageX, + pageY = e.pageY; + + if (e.originalEvent && e.originalEvent.touches && (e.originalEvent.touches.length > 0)) { + pageX = e.originalEvent.touches[0].pageX; + pageY = e.originalEvent.touches[0].pageY; + } + pos.offsetX = pageX - this.offset(target).left; + pos.offsetY = pageY - this.offset(target).top; + pos.startX = pos.lastX = pageX; + pos.startY = pos.lastY = pageY; + pos.nowX = pos.nowY = pos.distX = pos.distY = pos.dirAx = 0; + pos.dirX = pos.dirY = pos.lastDirX = pos.lastDirY = pos.distAxX = pos.distAxY = 0; + return pos; + }, + + positionMoved: function (e, pos, firstMoving) { + var pageX = e.pageX, + pageY = e.pageY, + newAx; + if (e.originalEvent && e.originalEvent.touches && (e.originalEvent.touches.length > 0)) { + pageX = e.originalEvent.touches[0].pageX; + pageY = e.originalEvent.touches[0].pageY; + } + // mouse position last events + pos.lastX = pos.nowX; + pos.lastY = pos.nowY; + + // mouse position this events + pos.nowX = pageX; + pos.nowY = pageY; + + // distance mouse moved between events + pos.distX = pos.nowX - pos.lastX; + pos.distY = pos.nowY - pos.lastY; + + // direction mouse was moving + pos.lastDirX = pos.dirX; + pos.lastDirY = pos.dirY; + + // direction mouse is now moving (on both axis) + pos.dirX = pos.distX === 0 ? 0 : pos.distX > 0 ? 1 : -1; + pos.dirY = pos.distY === 0 ? 0 : pos.distY > 0 ? 1 : -1; + + // axis mouse is now moving on + newAx = Math.abs(pos.distX) > Math.abs(pos.distY) ? 1 : 0; + + // do nothing on first move + if (firstMoving) { + pos.dirAx = newAx; + pos.moving = true; + return; + } + + // calc distance moved on this axis (and direction) + if (pos.dirAx !== newAx) { + pos.distAxX = 0; + pos.distAxY = 0; + } else { + pos.distAxX += Math.abs(pos.distX); + if (pos.dirX !== 0 && pos.dirX !== pos.lastDirX) { + pos.distAxX = 0; + } + + pos.distAxY += Math.abs(pos.distY); + if (pos.dirY !== 0 && pos.dirY !== pos.lastDirY) { + pos.distAxY = 0; + } + } + + pos.dirAx = newAx; + }, + + elementIsTreeNode: function (element) { + return typeof element.attr('ui-tree-node') !== 'undefined'; + }, + + elementIsTreeNodeHandle: function (element) { + return typeof element.attr('ui-tree-handle') !== 'undefined'; + }, + elementIsTree: function (element) { + return typeof element.attr('ui-tree') !== 'undefined'; + }, + elementIsTreeNodes: function (element) { + return typeof element.attr('ui-tree-nodes') !== 'undefined'; + }, + elementIsPlaceholder: function (element) { + return element.hasClass(treeConfig.placeholderClass); + }, + elementContainsTreeNodeHandler: function (element) { + return element[0].querySelectorAll('[ui-tree-handle]').length >= 1; + }, + treeNodeHandlerContainerOfElement: function (element) { + return findFirstParentElementWithAttribute('ui-tree-handle', element[0]); + } + }; + } + ]); + + // TODO: optimize this loop + function findFirstParentElementWithAttribute(attributeName, childObj) { + // undefined if the mouse leaves the browser window + if (childObj === undefined) { + return null; + } + var testObj = childObj.parentNode, + count = 1, + // check for setAttribute due to exception thrown by Firefox when a node is dragged outside the browser window + res = (typeof testObj.setAttribute === 'function' && testObj.hasAttribute(attributeName)) ? testObj : null; + while (testObj && typeof testObj.setAttribute === 'function' && !testObj.hasAttribute(attributeName)) { + testObj = testObj.parentNode; + res = testObj; + if (testObj === document.documentElement) { + res = null; + break; + } + count++; + } + + return res; + } + +})(); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js b/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js new file mode 100755 index 000000000..855f99087 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js @@ -0,0 +1,148 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 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. + * ============LICENSE_END========================================================= + */ + +"use strict"; + +appDS2.constant("COMPONENT", (function() { + return { + A_LA_CARTE : "a la carte", + CLOUD_REGION_ID : "cloudRegionID", + COMPONENT_STATUS : "ComponentStatus", + CREATE_COMPONENT : "createComponent", + DELETE_COMPONENT : "deleteComponent", + ENTITY : "entity", + GET_COMPONENT_LIST : "getComponentList", + GET_SUBS : "getSubs", + GET_SUB_DETAILS : "getSubDetails", + GLOBAL_CUSTOMER_ID : "globalCustomerId", + MACRO : "Macro", + MODEL_VERSION_1 : "1", + MSO_CREATE_REQ : "createInstance", + MSO_DELETE_REQ : "deleteInstance", + NAME : "name", + NETWORK : "network", + NETWORKS : "networks", + + QUERY_SERVICE_INSTANCE : "queryServiceInstance", + REFRESH_PROPERTIES : "refreshProperties", + SERVICE : "service", + SERVICE_TYPE : "serviceType", + SHOW_COMPONENT_DETAILS : "showComponentDetails", + STATUS : "status", + SUBSCRIBER_NAME : "subscriberName", + TENANT_ID : "tenantID", + TENANT_NAME : "tenantName", + TRUE : "true", + + VF_MODULE : "vfModule", + VNF : "vnf", + VNF_CODE : "vnfCode", + VNF_FUNCTION : "vnfFunction", + VNF_ROLE : "vnfRole", + VNF_TYPE : "vnfType", + VOLUME_GROUP : "volumeGroup", + + + // IDs + CIDR_MASK_1 : "255.255.255.000", + //COMPONENT_LIST_NAMED_QUERY_ID : "ed0a0f5b-cf79-4784-88b2-911cd726cd3d", + CUSTOMER_ID_1 : "icore9883749", + DELETE_INSTANCE_ID_1 : "ff305d54-75b4-ff1b-fff1-eb6b9e5460ff", + GATEWAY_ADDRESS_1 : "10.10.125.1", + GLOBAL_SUBSCRIBER_ID_1 : "C12345", + INSTANCE_ID_1 : "ff305d54-75b4-431b-adb2-eb6b9e5ff000", + INSTANCE_ID_2 : "ff305d54-75b4-ff1b-adb2-eb6b9e5460ff", + INSTANCE_ID_3 : "ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff", + MODEL_ID_1 : "sn5256d1-5a33-55df-13ab-12abad84e764", + MODEL_ID_2 : "ff5256d1-5a33-55df-aaaa-12abad84e7ff", + MODEL_ID_3 : "ff3514e3-5a33-55df-13ab-12abad84e7ff", + MODEL_ID_4 : "ff5256d1-5a33-55df-13ab-12abad84e7ff", + MODEL_ID_5 : "ff5256d1-5a33-55df-13ab-22abad84e7ff", + MODEL_NAME_VERSION_ID_1 : "ab6478e4-ea33-3346-ac12-ab121484a333", + MODEL_NAME_VERSION_ID_2 : "fe6478e4-ea33-3346-aaaa-ab121484a3fe", + MODEL_NAME_VERSION_ID_3 : "fe6985cd-ea33-3346-ac12-ab121484a3fe", + MODEL_NAME_VERSION_ID_4 : "fe6478e4-ea33-3346-ac12-ab121484a3fe", + MODEL_NAME_VERSION_ID_5 : "fe6478e4-ea33-3346-bc12-ab121484a3fe", + SERVICE_INSTANCE_ID_1 : "bc305d54-75b4-431b-adb2-eb6b9e546014", + SUBSCRIBER_NAME_GED12 : "General Electric Division 12", + VNF_INSTANCE_ID : "VNF_INSTANCE_ID_12345", + VPN_ID_1 : "1a2b3c4d5e6f", + + // PATHS + ASSIGN : "?r=", + AAI_GET_SERVICE_INSTANCE_PATH : "aai_get_service_instance/", + AAI_GET_SERVICES : "aai_get_services", + AAI_GET_TENANTS : "aai_get_tenants/", + AAI_SUB_DETAILS_PATH : "aai_sub_details/", + AAI_SUB_VIEWEDIT_PATH : "aai_sub_viewedit", + ASDC_GETMODEL_PATH : "asdc/getModel/", + CREATE_INSTANCE_PATH : "/models/services/createInstance", + FORWARD_SLASH : "/", + GET_SYSTEM_PROP_VNF_PROV_STATUS_PATH : "get_system_prop_vnf_prov_status", + GET_USER_ID : "getuserID", + INSTANTIATE_ROOT_PATH : "#/instantiate?subscriberId=", + INSTANTIATE_PATH : "/instantiate", + INVALID_STRING : "/INVALID_STRING/", + INVALID_STRING_MSO_CREATE_SVC_INSTANCE : "INVALID_STRING_mso_create_svc_instance", + MSO_CREATE_NW_INSTANCE : "mso_create_nw_instance", + MSO_CREATE_NW_INSTANCE_PATH : "mso_create_nw_instance/", + MSO_CREATE_SVC_INSTANCE : "mso_create_svc_instance", + MSO_DELETE_SVC_INSTANCE_PATH : "mso_delete_svc_instance/", + SELECTED_SERVICE_SUB_PATH : "#/instances/subdetails?selectedServiceSubscription=", + SELECTED_SUB_PATH : "#/instances/subdetails?selectedSubscriber=", + SELECTEDSERVICEINSTANCE_SUB_PATH : "&selectedServiceInstance=", + SELECTEDSUBSCRIBER_SUB_PATH : "&selectedSubscriber=", + SERVICE_TYPE_LIST_PATH : "#/instances/serviceTypes?serviceTypeList=", + SERVICE_MODLES_INSTANCES_SUBSCRIBERS_PATH : 'serviceModels.htm#/instances/subscribers', + SERVICES_DIST_STATUS_PATH : "rest/models/services?distributionStatus=", + SERVICES_PATH : "rest/models/services/", + SERVICETYPE_SUB_PATH : "&serviceType=", + SERVICEINSTANCEID_SUB_PATH : "&serviceInstanceId=", + SERVICEMODELS_INSTANCES_SERVICES_PATH : "serviceModels.htm#/instances/services", + SERVICEMODELS_MODELS_SERVICES_PATH : "serviceModels.htm#/models/services", + SUBDETAILS_SELECTEDSUBSCRIBER : "#subdetails?selectedSubscriber=", + SUBSCRIBERNAME_SUB_PATH : "&subscriberName=", + WELCOME_PATH : "welcome.htm", + + //Template Urls + AAI_GET_SUBS_URL : "app/vid/scripts/view-models/aaiGetSubs.htm", + AAI_GET_SUBSCRIBER_URL : "app/vid/scripts/view-models/aaiGetSubscriberList.htm", + AAI_SERVICE_TYPES_URL : "app/vid/scripts/view-models/aaiServiceTypes.htm", + AAI_SUB_DETAILS_URL : "app/vid/scripts/view-models/aaiSubDetails.htm", + CREATE_INSTANCE_SERVICE_MODELS_URL : "app/vid/scripts/view-models/createInstanceServiceModels.htm", + INSTANTIATE_URL : "app/vid/scripts/view-models/instantiate.htm", + SERVICE_MODELS : "app/vid/scripts/view-models/serviceModels.htm", + + + + FULL_NAME_MAP : { + "model-invariant-id" : "Model ID", + "model-version-id" : "Model Version ID" + }, + PARTIAL_NAME_MAP : { + "id" : "ID", + "uuid" : "UUID", + "vfmodule" : "VF Module", + "vnf" : "VNF", + "volumegroup" : "Volume Group" + } + + }; +})()) diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/fieldConstants.js b/vid-app-common/src/main/webapp/app/vid/scripts/constants/fieldConstants.js new file mode 100755 index 000000000..6dbcbc2f8 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/fieldConstants.js @@ -0,0 +1,378 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 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. + * ============LICENSE_END========================================================= + */ + +"use strict"; + +appDS2.factory("FIELD", [ "PARAMETER", function(PARAMETER) { + + /* + * ID values are typically used internally. + */ + var ID = { + AVAILABLE_VOLUME_GROUP : "availableVolumeGroup", + INSTANCE_NAME : "instanceName", + LCP_REGION : "lcpRegion", + LCP_REGION_TEXT : "lcpRegionText", + PRODUCT_FAMILY : "productFamily", + SERVICE_TYPE : "serviceType", + SUBSCRIBER_NAME : "subscriberName", + SUPPRESS_ROLLBACK : "suppressRollback", + TENANT : "tenant", + VNF_TARGETPROVSTATUS : "target", + + AAI_GET_FULL_SUBSCRIBERS : "aai_get_full_subscribers", + AAI_REFRESH_FULL_SUBSCRIBERS : "aai_refresh_full_subscribers", + AAI_GET_SERVICES : "aai_get_services", + AAI_GET_SUBSCRIBERS : "aai_get_subscribers", + AAI_GET_TENTANTS : "aai_get_tenants", + AAI_REFRESH_SUBSCRIBERS : "aai_refresh_subscribers", + AAI_SUB_DETAILS : "aai_sub_details", + AAI_SUB_VIEWEDIT : "aai_sub_viewedit", + ANGULAR_UI_TREE_COLLAPSEALL : "angular-ui-tree:collapse-all", + ANGULAR_UI_TREE_EXPANDALL : "angular-ui-tree:expand-all", + CATEGORY : "category", + COLOR_8F8 : "#8F8", + COLOR_F88 : "#F88", + COLOR_NONE : "none", + CUSTOMER : "customer", + CUSTOMIZATION_UUID : "customizationUuid", + DESCRIPTION : "description", + GENERIC_VNF : "generic-vnf", + GLOBAL_CUSTOMER_ID : "global-customer-id", + GLOBAL_CUST_ID : "globalCustomerId", + IN_MAINT : "in-maint", + INVENTORY_RESPONSE_ITEMS : "inventory-response-items", + INVENTORY_RESPONSE_ITEM : "inventory-response-item", + L3_NETWORK : "l3-network", + SUB_NET : "subnet", + SUBNET_NAME : "subnet-name", + SUBNET_ID : "subnet-id", + GATEWAY_ADDRESS : "gateway-address", + NETWORK_START_ADDRESS : "network-start-address", + CIDR_MASK : "cidr-mask", + MODEL_CUSTOMIZATION_ID : "model-customization-id", + MODEL_CUSTOMIZATION_NAME : "modelCustomizationName", + MODEL_INVARIANT_ID : "modelInvariantId", + MODEL_INVAR_ID : "model-invariant-id", + MODEL_NAME : "modelName", + MODEL_NAME_VERSION_ID : "modelNameVersionId", + MODEL_VERSION : "modelVersion", + MODEL_VERSION_ID : "model-version-id", + NETWORK_NAME : "network-name", + NETWORK_ID : "network-id", + NETWORK_TYPE : "network-type", + NETWORKS : "networks", + OPERATIONAL_STATUS : "operational-status", + ORCHESTRATION_STATUS : "orchestration-status", + PERCENT_PROGRESS : "precentProgress", + PERSONA_MODEL_ID : "persona-model-id", + PERSONA_MODEL_VERSION : "persona-model-version", + PERSONA_MODEL_CUSTOMIZATION_ID : "persona-model-customization-id", + PROV_STATUS : "prov-status", + REQUEST : "request", + REQUEST_ID : "requestId", + REQUEST_LIST : "requestList", + REQUEST_TYPE : "requestType", + REQUEST_REFERENCES : "requestReferences", + REQUEST_STATE : "requestState", + REQUEST_STATUS : "requestStatus", + RESOURCE_LINK : "resource-link", + RESULT_DATA : "result-data", + SERVICE_DESCRIPTION : "service-description", + SERVICE_ID : "service-id", + SERVICE_INSTANCE : "service-instance", + SERVICE_INSTANCES : "service-instances", + SERVICE_INSTANCE_ID : "service-instance-id", + SERVICE_INSTANCE_NAME : "service-instance-name", + SERVICE_SUBSCRIPTION : "service-subscription", + SERVICE_SUBSCRIPTIONS : "service-subscriptions", + SERVICE_TYPE : "service-type", + STATUS_MESSAGE : "statusMessage", + SUBNAME : "subscriber-name", + TIMESTAMP : "timestamp", + VF_MODULE : "vf-module", + VF_MODULES : "vfModules", + VF_MODULE_ID : "vf-module-id", + VF_MODULE_NAME : "vf-module-name", + VID : "VID", + VNF_ID : "vnf-id", + VNF_NAME : "vnf-name", + VNF_TYPE : "vnf-type", + VNFS : "vnfs", + AVAILABLEVOLUMEGROUPS : "availableVolumeGroups", + VOLUMEGROUPS : "volumeGroups", + VOLUME_GROUP : "volume-group", + VOLUME_GROUP_ID : "volume-group-id", + VOLUME_GROUP_NAME : "volume-group-name", + }; + + var KEY = { + LCP_REGION_TEXT : "LEGACYREGION" + }; + + /* + * NAME values are displayed on GUI pages. + */ + var NAME = { + AVAILABLE_VOLUME_GROUP : "Available Volume Group", + INSTANCE_NAME : "Instance Name", + CUSTOMER_ID : "Customer ID", + LCP_REGION : "LCP Region", + LCP_REGION_TEXT : "Legacy Region", + MODEL_INVARIANT_UUID: "Model Invariant UUID", + MODEL_NAME: "Model Name", + MODEL_VERSION: "Model Version", + MODEL_UUID: "Model UUID", + MODEL_CUSTOMIZATION_UUID: "Model Customization UUID", + MODEL_VNF_TYPE: "NF Type", + MODEL_VNF_ROLE: "NF Role", + MODEL_VNF_FUNCTION: "NF Function", + MODEL_VNF_CODE: "NF Code", + MODEL_CUSTOMIZATION_NAME: "Resource Name", + PRODUCT_FAMILY : "Product Family", + RESOURCE_DESCRIPTION : "Resource Description", + RESOURCE_NAME : "Resource Name", + SERVICE_CATEGORY : "Service Category", + SERVICE_DESCRIPTION : "Service Description", + SERVICE_INSTANCE_ID : "Service Instance ID", + SERVICE_INSTANCE_Id : "Service Instance Id", + SERVICE_INSTANCE_NAME : "Service Instance Name", + SERVICE_INVARIANT_UUID : "Service Invariant UUID", + SERVICE_NAME : "Service Name", + SERVICE_TYPE : "Service Type", + SERVICE_UUID : "Service UUID", + SERVICE_VERSION : "Service Version", + SUBSCRIBER_NAME : "Subscriber Name", + SUPPRESS_ROLLBACK : "Suppress Rollback on Failure", + TENANT : "Tenant", + USER_SERVICE_INSTANCE_NAME : "User Service Instance Name", + VF_MODULE_DESCRIPTION : "VF Module Description", + VF_MODULE_LABEL : "VF Module Label", + VF_MODULE_TYPE : "VF Module Type", + VNF_ORCHESTRATION_STATUS : "Orchestration Status", + VNF_Operational_Status: "Operational Status", + VNF_Current_Prov_Status: "Current Prov_Status", + VNF_Target_Prov_Status: "Target Prov Status", + VNF_VNF_ID : "VNF ID", + VNF_VNF_Name: "VNF Name", + VNF_VNF_Type: "VNF Type", + VNF_Service_ID: "Service ID", + VNF_In_Maint: "In Maint", + VFMDULE_CUSTOMIZATIONUUID: "VF Module Model Customization UUID", + RESOURCE_CUSTOMIZATION_UUID: "Resource Model Customization UUID" + }; + + /* + * PROMPT values are initial values displayed in select lists. + */ + var PROMPT = { + AVAILABLE_VOLUME_GROUP : "Select Volume Group", + DEFAULT_A : "A default", + DEFAULT_B : "B default", + LCP_REGION : "Select LCP Region", + NO_SERVICE_INSTANCE : "No Service Instance Found", + NO_SERVICE_SUB : "No Service Subscription Found", + PRODUCT_FAMILY : "Select Product Family", + REGION : "Please choose a region", + SERVICE_TYPE : "Select Service Type", + SUBSCRIBER_NAME : "Select Subscriber Name", + TARGETPROVSTATUS : "Select Target Prov Status", + TENANT : "Select Tenant Name", + TEXT_INPUT : "Enter data", + SELECT_SERVICE : "Select a service type", + SELECT_SUB : "Select a subscriber name", + FETCHING_SUBS : " Fetching subscriber list from A&AI", + REFRESH_SUB_LIST : "Refreshing subscriber list from A&AI...", + VAR_DESCRIPTION_A : "This variable is 'a'", + VAR_DESCRIPTION_B : "This variable is 'b'", + + }; + + var STATUS = { + // Status + ALL : "ALL", + COMPLETE : "Complete", + DONE : "Done", + ERROR : "Error", + FAILED : "Failed", + FAILED_SERVICE_MODELS_ASDC : "Failed to get service models from SDC.", + FETCHING_SERVICE_TYPES : "Fetching service types list from A&AI", + FETCHING_SERVICE_CATALOG : "Fetching service catalog from AAI. Please wait.", + FETCHING_SERVICE_CATALOG_ASDC : "Fetching service catalog from SDC. Please wait.", + FETCHING_SUB_DETAILS : "Fetching subscriber details from A&AI for ", + FETCHING_SERVICE_INST_DATA : "Fetching service instance data from A&AI for service-instance-id=", + FETCHING_SUBSCRIBER_LIST_AAI : "Fetching subscriber list from A&AI...", + IN_PROGRESS : "In Progress", + IS_SUCCESSFUL : " isSuccessful: ", + MSO_FAILURE : "msoFailure", + NONE : "None", + NOT_FOUND : "Not Found", + NO_SERVICE_SUBSCRIPTION_FOUND : "No Service Subscription Found", + SUBMITTING_REQUEST : "Submitting Request", + SUCCESS_VNF_PROV_STATUS : "Successfully set the VNF's Prov_Status to ", + UNLOCKED : "Unlocked", + + }; + + var STYLE = { + TABLE : "width: auto; margin: 0 auto; border-collapse: collapse; border: none;", + NAME : "width: 220px; text-align: left; vertical-align: middle; font-weight: bold; padding: 3px 5px; border: none;", + VALUE : "width: 400px; text-align: left; vertical-align: middle; padding: 3px 5px; border: none;", + CHECKBOX_VALUE : "width: 400px; text-align: center; vertical-align: middle; padding: 3px 5px; border: none;", + TEXT_INPUT : "height: 25px; padding: 2px 5px;", + CHECKBOX_INPUT : "height: 18px; width: 18px; padding: 2px 5px;", + SELECT : "height: 25px; padding: 2px; text-align: center;", + REQUIRED_LABEL : "width: 25px; padding: 5px 10px 10px 5px;", + + DISABLED : "disabled", + BTN_INACTIVE : "button--inactive", + BTN_PRIMARY : "button--primary", + BTN_TYPE : "btn-type", + MSO_CTRL_BTN : "div[ng-controller=msoCommitController] button", + PRIMARY : "primary", + PROGRESS_BAR_INFO : "progress-bar progress-bar-info", + PROGRESS_BAR_SUCCESS : "progress-bar progress-bar-success", + } + + var ERROR = { + AAI : "A&AI failure - see log below for details", + AAI_ERROR : "A&AI Error", + AAI_FETCHING_CUST_DATA : "Failed to fetch customer data from A&AI: Response Code: ", + FETCHING_SERVICE_TYPES : "Failed to fetch service types from A&AI: Response Code: ", + FETCHING_SERVICES : "Failed to fetch services from A&AI: Response Code: ", + FETCHING_SERVICE_INSTANCE_DATA : "Failed to fetch service instance data from A&AI: Response Code: ", + INVALID_INSTANCE_NAME : "Invalid instance name: ", + INSTANCE_NAME_VALIDATE : "The instance name must contain only alphanumeric or \"_-.\" characters, and must start with an alphabetic character", + MAX_POLLS_EXCEEDED : "Maximum number of poll attempts exceeded", + MISSING_DATA : "Missing data", + MODEL_VERSION_ID_MISSING : "Error: model-version-id is not populated in A&AI", + MSO : "MSO failure - see log below for details", + NO_MATCHING_MODEL : "No matching model found matching the persona Model Id = ", + NO_MATCHING_MODEL_AAI : "No matching model found matching the A&AI model version ID = ", + SELECT : "Please select a subscriber or enter a service instance", + SERVICE_INST_DNE : "That service instance does not exist. Please try again.", + SYSTEM_FAILURE : "System failure", + + } + + /* + * PARAMETER values indicate field configurations that are provided to + * parameter block directives. + */ + + var PARAMETER = { + AVAILABLE_VOLUME_GROUP : { + name : NAME.AVAILABLE_VOLUME_GROUP, + id : ID.AVAILABLE_VOLUME_GROUP, + type : PARAMETER.SELECT, + prompt : PROMPT.AVAILABLE_VOLUME_GROUP, + isRequired : true + }, + INSTANCE_NAME : { + name : NAME.INSTANCE_NAME, + id : ID.INSTANCE_NAME, + isRequired : true + }, + LCP_REGION : { + name : NAME.LCP_REGION, + id : ID.LCP_REGION, + type : PARAMETER.SELECT, + prompt : PROMPT.LCP_REGION, + isRequired : true + }, + VNF_TARGET_PROVSTATUS : { + name : NAME.VNF_Target_Prov_Status, + id : ID.VNF_TARGETPROVSTATUS, + type : PARAMETER.SELECT, + prompt : PROMPT.TARGETPROVSTATUS, + isRequired : true + }, + LCP_REGION_TEXT_HIDDEN : { + id : ID.LCP_REGION_TEXT, + isVisible : false + }, + LCP_REGION_TEXT_VISIBLE : { + name : NAME.LCP_REGION_TEXT, + id : ID.LCP_REGION_TEXT, + isRequired : true, + isVisible : true + }, + PRODUCT_FAMILY : { + name : NAME.PRODUCT_FAMILY, + id : ID.PRODUCT_FAMILY, + type : PARAMETER.SELECT, + prompt : PROMPT.PRODUCT_FAMILY, + isRequired : true + }, + SERVICE_TYPE : { + name : NAME.SERVICE_TYPE, + id : ID.SERVICE_TYPE, + type : PARAMETER.SELECT, + prompt : PROMPT.SERVICE_TYPE, + isRequired : true + }, + SERVICE_TYPE_DISABLED : { + name : NAME.SERVICE_TYPE, + id : ID.SERVICE_TYPE, + type : PARAMETER.SELECT, + isEnabled : false, + isRequired : true + }, + SUPPRESS_ROLLBACK : { + name : NAME.SUPPRESS_ROLLBACK, + id : ID.SUPPRESS_ROLLBACK, + type : PARAMETER.BOOLEAN, + value : false + }, + SUBSCRIBER_NAME : { + name : NAME.SUBSCRIBER_NAME, + id : ID.SUBSCRIBER_NAME, + type : PARAMETER.SELECT, + prompt : PROMPT.SUBSCRIBER_NAME, + isRequired : true + }, + TENANT_DISABLED : { + name : NAME.TENANT, + id : ID.TENANT, + type : PARAMETER.SELECT, + isEnabled : false, + isRequired : true + }, + TENANT_ENABLED : { + name : NAME.TENANT, + id : ID.TENANT, + type : PARAMETER.SELECT, + isEnabled : true, + prompt : PROMPT.TENANT, + isRequired : true + } + }; + + return { + ID : ID, + KEY : KEY, + NAME : NAME, + PARAMETER : PARAMETER, + PROMPT : PROMPT, + STATUS : STATUS, + STYLE : STYLE, + ERROR : ERROR, + } +} ]); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/parameterConstants.js b/vid-app-common/src/main/webapp/app/vid/scripts/constants/parameterConstants.js new file mode 100755 index 000000000..4e3ad29d1 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/parameterConstants.js @@ -0,0 +1,52 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 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. + * ============LICENSE_END========================================================= + */ + +"use strict"; + +appDS2.constant("PARAMETER", (function() { + return { + BOOLEAN : "boolean", + SELECT : "select", + STRING : "string", + NUMBER : "number", + VALID_VALUES : "valid_values", + EQUAL : "equal", + LENGTH : "length", + MAX_LENGTH : "max_length", + MIN_LENGTH : "min_length", + IN_RANGE : "in_range", + CONSTRAINTS : "constraints", + OPERATOR : "operator", + CONSTRAINT_VALUES : "constraintValues", + DEFAULT : "default", + DESCRIPTION : "description", + TYPE: "type", + INTEGER: "integer", + RANGE: "range", + LIST: "list", + MAP: "map", + REQUIRED: "required", + GREATER_THAN: "greater_than", + LESS_THAN: "less_than", + GREATER_OR_EQUAL: "greater_or_equal", + LESS_OR_EQUAL: "less_or_equal" + + }; +})()) diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js b/vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js new file mode 100755 index 000000000..8fdfd3fcb --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js @@ -0,0 +1,99 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 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. + * ============LICENSE_END========================================================= + */ + +"use strict"; + +appDS2.constant("VIDCONFIGURATION", (function() { + /* + * VNF_STATUS_CHECK_ENABLED: Determines whether VID will check the VNF valid status combination list, before allowing VNF updates. + * Set to false, to disable the check. + */ + var VNF_STATUS_CHECK_ENABLED = false; + /* + * List of valid VNF status combinations + */ + var vnfValidStatusList = [ + { + "provStatus": "preprov", + "orchestrationStatus": "pending-create", + "inMaint": false, + "operationalStatus": null + }, + { + "provStatus": "preprov", + "orchestrationStatus": "created", + "inMaint": false, + "operationalStatus": null + }, + { + "provStatus": "preprov", + "orchestrationStatus": "active", + "inMaint": false, + "operationalStatus": null + }, + { + "provStatus": "nvtprov", + "orchestrationStatus": "active", + "inMaint": false, + "operationalStatus": null + }, + { + "provStatus": "prov", + "orchestrationStatus": "active", + "inMaint": false, + "operationalStatus": "out-of-service-path" + } + ]; + /* + * The model status VID uses to query SDC for a list of models. The possible values are: + * DISTRIBUTION_NOT_APPROVED, + * DISTRIBUTION_APPROVED, + * DISTRIBUTED, + * DISTRIBUTION_REJECTED, + * ALL, + * In the production env, this should always be set to DISTRIBUTED + */ + var ASDC_MODEL_STATUS = "DISTRIBUTED"; + /* + * Max number of times that VID will poll MSO for a given request status + */ + var MSO_MAX_POLLS = 10; + /* + * Number of msecs that VID will wait between MSO polls. + */ + var MSO_POLLING_INTERVAL_MSECS = 10000; + /* + * List of all service model invariant UUIDs that need macro instantiation. + * Example: + * MACRO_SERVICES : ["3cf30cbb-5fe7-4fb3-b049-559a4997b221", "b135a703-bab5-4295-a37f-580a4f2d0961"] + * + */ + var COMPONENT_LIST_NAMED_QUERY_ID = "0367193e-c785-4d5f-9cb8-7bc89dc9ddb7"; + var MACRO_SERVICES = []; + return { + ASDC_MODEL_STATUS : ASDC_MODEL_STATUS, + MSO_MAX_POLLS : MSO_MAX_POLLS, + MSO_POLLING_INTERVAL_MSECS : MSO_POLLING_INTERVAL_MSECS, + VNF_STATUS_CHECK_ENABLED : VNF_STATUS_CHECK_ENABLED, + VNF_VALID_STATUS_LIST : vnfValidStatusList, + MACRO_SERVICES : MACRO_SERVICES, + COMPONENT_LIST_NAMED_QUERY_ID : COMPONENT_LIST_NAMED_QUERY_ID + }; +})()) diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js new file mode 100755 index 000000000..f928f4ec1 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js @@ -0,0 +1,1217 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 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. + * ============LICENSE_END========================================================= + */ + +/** + * The Instantiation (or View/Edit) Controller controls the instantiation/removal of + * deployable objects (Services, VNFs, VF-Modules, Networks, and Volume-Groups) + */ +(function () { + "use strict"; + + appDS2.requires.push('ui.tree'); + + appDS2.controller("InstantiationController", function ($scope, $route, $location, $timeout, COMPONENT, VIDCONFIGURATION, FIELD, DataService, PropertyService, UtilityService, VnfService, $http, vidService) { + + $scope.popup = new Object(); + $scope.defaultBaseUrl = ""; + $scope.responseTimeoutMsec = 60000; + $scope.properties = UtilityService.getProperties(); + $scope.init = function() { + + /* + * These 2 statements should be included in non-test code. + */ + // takes a default value, retrieves the prop value from the file system and sets it + var msecs = PropertyService.retrieveMsoMaxPollingIntervalMsec(); + PropertyService.setMsoMaxPollingIntervalMsec(msecs); + + // takes a default value, retrieves the prop value from the file system and sets it + var polls = PropertyService.retrieveMsoMaxPolls(); + PropertyService.setMsoMaxPolls(polls); + + PropertyService.setServerResponseTimeoutMsec(10000); + + /* + * Common parameters that shows an example of how the view edit screen + * is expected to pass some common service instance values to the + * popups. + */ + +// DataService.setSubscriberName("Mobility"); +// DataService.setGlobalCustomerId("CUSTID12345") +// DataService.setServiceType("Mobility Type 1"); +// DataService.setServiceInstanceName("Example Service Instance Name"); +// DataService.setServiceName("Mobility Service 1"); +// DataService.setServiceInstanceId("mmsc-test-service-instance"); +// DataService.setServiceUuid("XXXX-YYYY-ZZZZ"); +// DataService.setUserServiceInstanceName("USER_SERVICE_INSTANCE_NAME"); + } + + //PropertyService.setMsoBaseUrl("testmso"); + + $scope.convertModel = function(asdcModel) { + if (!asdcModel) return undefined; + var convertedAsdcModel = UtilityService.convertModel(asdcModel); + return convertedAsdcModel; + }; + + $scope.service = { + "model": vidService.getModel(), + "convertedModel": $scope.convertModel(vidService.getModel()), + "instance": vidService.getInstance() + }; + + $scope.returnVfModules = function (vnfInstance) { + + var svcModel = $scope.service.convertedModel; + //var vnfModelInvariantUuid = vnfInstance[FIELD.ID.MODEL_INVAR_ID]; + var vnfModelVersionId = vnfInstance[FIELD.ID.MODEL_VERSION_ID]; // model uuid + var vnfModelCustomizationUuid = vnfInstance[FIELD.ID.MODEL_CUSTOMIZATION_ID]; + + var vnfModel = null; + + if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.vnfs) ) ) ) { + if ( (svcModel.isNewFlow) && (vnfModelCustomizationUuid != null ) ) { + vnfModel = svcModel.vnfs[vnfModelCustomizationUuid]; + if ( !($scope.isObjectEmpty(vnfModel.vfModules) ) ) { + //console.log ("vnfModel.vfModules: "); console.log (JSON.stringify(vnfModel.vfModules, null, 4)); + return (vnfModel.vfModules); + } + } + else { + // old flow + if ( vnfModelVersionId != null ) { + vnfModel = svcModel.vnfs[vnfModelVersionId]; + if ( !($scope.isObjectEmpty(vnfModel.vfModules) ) ) { + //console.log ("vnfModel.vfModules: "); console.log (JSON.stringify(vnfModel.vfModules, null, 4)); + return (vnfModel.vfModules); + } + } + } + + } + return null; + } + $scope.hasVfModules = function (vnfInstance) { + if ($scope.returnVfModules(vnfInstance) != null ){ + return true; + } + return false; + } + $scope.returnVolumeGroups = function (vnfInstance) { + + var svcModel = $scope.service.convertedModel; + + //var vnfModelInvariantUuid = vnfInstance[FIELD.ID.MODEL_INVAR_ID]; + var vnfModelVersionId = vnfInstance[FIELD.ID.MODEL_VERSION_ID]; + var vnfModelCustomizationUuid = vnfInstance[FIELD.ID.MODEL_CUSTOMIZATION_ID]; + + var vnfModel = null; + + if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.vnfs) ) ) ) { + if ( (svcModel.isNewFlow) && (vnfModelCustomizationUuid != null ) ) { + vnfModel = svcModel.vnfs[vnfModelCustomizationUuid]; + if ( !($scope.isObjectEmpty(vnfModel.volumeGroups) ) ) { + //console.log ("vnfModel.volumeGroups: "); console.log (JSON.stringify(vnfModel.volumeGroups, null, 4)); + return (vnfModel.volumeGroups); + } + } + else { + // old flow + if ( vnfModelVersionId != null ) { + vnfModel = svcModel.vnfs[vnfModelVersionId]; + if ( !($scope.isObjectEmpty(vnfModel.volumeGroups) ) ) { + //console.log ("vnfModel.vfModules: "); console.log (JSON.stringify(vnfModel.volumeGroups, null, 4)); + return (vnfModel.volumeGroups); + } + } + } + + } + return null; + } + $scope.hasVolumeGroups = function (vnfInstance) { + if ($scope.returnVolumeGroups(vnfInstance) != null ){ + return true; + } + return false; + } + $scope.deleteNetwork = function(serviceObject, network) { + + console.log("Removing Network " + network.name); + + //Send delete network request to MSO + + //var networks = this.service.instance.networks; + + //networks.splice(networks.indexOf(network), 1); + + //Retrieve updated data from A&AI + var serviceInstance = serviceObject.object; + var svcModel = $scope.service.convertedModel; + var netModel; + DataService.setInventoryItem(network.object); + // set model default and override later if found + DataService.setModelInfo(COMPONENT.NETWORK, {}); + + if ( network.object != null ) { + + //var netModelInvariantUuid = network.object[FIELD.ID.MODEL_INVAR_ID]; + var netModelVersionId = network.object[FIELD.ID.MODEL_VERSION_ID]; // model uuid + var netModelCustomizationUuid = network.object[FIELD.ID.MODEL_CUSTOMIZATION_ID]; + + if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.networks) ) ) ) { + if ( (svcModel.isNewFlow) && (UtilityService.hasContents(netModelCustomizationUuid) ) ) { + netModel = svcModel.networks[netModelCustomizationUuid]; + } + else { + + if ( UtilityService.hasContents(netModelVersionId) ) { + netModel = svcModel.networks[netModelVersionId]; + } + + } + } + } + if (!($scope.isObjectEmpty(netModel) ) ) { + DataService.setModelInfo(COMPONENT.NETWORK, { + "modelInvariantId": netModel.invariantUuid, + "modelVersion": netModel.version, + "modelNameVersionId": netModel.uuid, + "modelCustomizationName": netModel.modelCustomizationName, + "customizationUuid": netModel.customizationUuid, + "modelName": netModel.name, + "inputs": "" + }); + } + + DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]); + DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]); + DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]); + + DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]); + DataService.setServiceInstanceName($scope.service.instance.name); + DataService.setServiceName($scope.service.model.service.name); + DataService.setServiceUuid($scope.service.model.service.uuid); + DataService.setNetworkInstanceId(network.object[FIELD.ID.NETWORK_ID]); + + $scope.$broadcast(COMPONENT.DELETE_COMPONENT, { + componentId : COMPONENT.NETWORK, + callbackFunction : deleteCallbackFunction + }); + }; + + $scope.deleteService = function(serviceObject) { + + var serviceInstance = serviceObject.object; + + console.log("Removing Service " + $scope.service.instance.name); + + DataService.setALaCarte (true); + DataService.setInventoryItem(serviceInstance); + + DataService.setModelInfo(COMPONENT.SERVICE, { + "modelInvariantId": serviceInstance[FIELD.ID.MODEL_INVAR_ID], + "modelVersion": $scope.service.model.service.version, + "modelNameVersionId": $scope.service.model.service.uuid, + "modelName": $scope.service.model.service.name, + "inputs": "" + }); + + DataService.setSubscriberName(serviceObject[FIELD.ID.SUBSCRIBER_NAME]); + DataService.setServiceType(serviceObject[FIELD.ID.SERVICE_TYPE]); + DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]); + + DataService.setGlobalCustomerId(serviceObject[COMPONENT.GLOBAL_CUSTOMER_ID]); + DataService.setServiceInstanceName($scope.service.instance.name); + + DataService.setServiceName($scope.service.model.service.name); + + DataService.setServiceUuid($scope.service.model.service.uuid); + + $scope.$broadcast(COMPONENT.DELETE_COMPONENT, { + componentId : COMPONENT.SERVICE, + callbackFunction : deleteServiceInstanceCallbackFunction + }); + + }; + + $scope.deleteVfModule = function(serviceObject, vfModule, vnf) { + + console.log("Removing VF-Module " + vfModule.name); + + var serviceInstance = serviceObject.object; + + DataService.setInventoryItem(vfModule.object); + + var svcModel = $scope.service.convertedModel; + + //var vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID]; + var vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID]; + var vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];; + var vfModuleInstanceID = vfModule.object[FIELD.ID.VF_MODULE_ID]; + if (vfModuleInstanceID == null) { + vfModuleInstanceID = ""; + } + + var vnfModel = null; + var vfModuleModel = null; + + DataService.setModelInfo(COMPONENT.VF_MODULE, { + "modelInvariantId": "", + "modelVersion": "", + "modelNameVersionId": "", + "modelCustomizationName": "", + "customizationUuid": "", + "modelName": "", + "inputs": "" + }); + + if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.vnfs) ) ) ) { + if ( (svcModel.isNewFlow) && (vnfModelCustomizationUuid != null ) ) { + vnfModel = svcModel.vnfs[vnfModelCustomizationUuid]; + + var vfModuleCustomizationUuid = vfModule.object[FIELD.ID.MODEL_CUSTOMIZATION_ID]; + if ( !($scope.isObjectEmpty(vnfModel.vfModules) ) && UtilityService.hasContents(vfModuleCustomizationUuid) ) { + + vfModuleModel = vnfModel.vfModules[vfModuleCustomizationUuid]; + + } + } + else { + // old flow + if (vnfModelVersionId != null ) { + vnfModel = svcModel.vnfs[vnfModelVersionId]; + } + //var vfModuleInvariantUuid = vfModule.object[FIELD.ID.MODEL_INVAR_ID]; + var vfModuleModelVersionId = vfModule.object[FIELD.ID.MODEL_VERSION_ID]; + if ( (!($scope.isObjectEmpty(vnfModel))) && (!($scope.isObjectEmpty(vnfModel.vfModules))) && + UtilityService.hasContents(vfModuleModelVersionId) ) { + vfModuleModel = vnfModel.vfModules[vfModuleModelVersionId]; + } + } + if ( !($scope.isObjectEmpty(vfModuleModel)) ) { + DataService.setModelInfo(COMPONENT.VF_MODULE, { + "modelInvariantId": vfModuleModel.invariantUuid, + "modelVersion": vfModuleModel.version, + "modelNameVersionId": vfModuleModel.uuid, + "modelCustomizationName": vfModuleModel.modelCustomizationName, + "customizationUuid": vfModuleModel.customizationUuid, + "modelName": vfModuleModel.name, + "inputs": "" + }); + } + } + + DataService.setVnfInstanceId(vnf.object[FIELD.ID.VNF_ID]); + DataService.setVfModuleInstanceId(vfModuleInstanceID); + + DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]); + DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]); + DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]); + + DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]); + DataService.setServiceInstanceName($scope.service.instance.name); + + DataService.setServiceName($scope.service.model.service.name); + + DataService.setServiceUuid($scope.service.model.service.uuid); + + $scope.$broadcast(COMPONENT.DELETE_COMPONENT, { + componentId : COMPONENT.VF_MODULE, + callbackFunction : deleteCallbackFunction + }); + + return; + + }; + + $scope.deleteVnf = function(serviceObject, vnf) { + + console.log("Removing VNF " + vnf.name); + + var serviceInstance = serviceObject.object; + var svcModel = $scope.service.convertedModel; + DataService.setInventoryItem(vnf.object); + + /*var vnftype = vnf.object['vnf-type']; + if (vnftype == null) + vnftype = ""; + else + { + var n = vnftype.search("/"); + if (n >= 0) + vnftype = vnftype.substring(n+1); + }*/ + + var svcModel = $scope.service.convertedModel; + var vnfModelInvariantUuid = null; + var vnfModelVersion = null; + var vnfModelCustomizationUuid = null; + var vnfModel = null; + + vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID]; + vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID]; + vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID]; + + DataService.setModelInfo(COMPONENT.VNF, { + "modelInvariantId": vnfModelInvariantUuid, + "modelVersion": "", + "modelNameVersionId": vnfModelVersionId, + "modelCustomizationName": "", + "customizationUuid": vnfModelCustomizationUuid, + "modelName": "", + "inputs": "" + }); + + if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.vnfs) ) ) ) { + if ( (svcModel.isNewFlow) && (vnfModelCustomizationUuid != null ) ) { + vnfModel = svcModel.vnfs[vnfModelCustomizationUuid]; + } + else { + vnfModel = svcModel.vnfs[vnfModelVersionId]; + } + //console.log ( "vnf models: "); console.log ( JSON.stringify ($scope.service.convertedModel.vnfs, null, 4) ); + if ( !($scope.isObjectEmpty(vnfModel) ) ) { + + DataService.setModelInfo(COMPONENT.VNF, { + "modelInvariantId": vnfModel.invariantUuid, + "modelVersion": vnfModel.version, + "modelNameVersionId": vnfModel.uuid, + "modelCustomizationName": vnfModel.modelCustomizationName, + "customizationUuid": vnfModel.customizationUuid, + "modelName": vnfModel.name, + "inputs": "" + }); + } + } + + DataService.setVnfInstanceId(vnf.object[FIELD.ID.VNF_ID]); + + DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]); + DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]); + DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]); + + DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]); + DataService.setServiceInstanceName($scope.service.instance.name); + + DataService.setServiceName($scope.service.model.service.name); + + DataService.setServiceUuid($scope.service.model.service.uuid); + + $scope.$broadcast(COMPONENT.DELETE_COMPONENT, { + componentId : COMPONENT.VNF, + callbackFunction : deleteCallbackFunction + }); + + }; + + + + $scope.deleteVolumeGroup = function(serviceObject, vnf, vfModule, volumeGroup) { + + console.log("Removing Volume Group " + volumeGroup.name); + var haveModel = false; + var svcModel = $scope.service.convertedModel; + + var vnfModelInvariantUuid = null; + var vnfModelVersion = null; + var vnfModelCustomizationUuid = null; + var vnfModel = null; + + vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID]; + vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID]; + vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID]; + + DataService.setModelInfo(COMPONENT.VOLUME_GROUP, { + "modelInvariantId": "", + "modelVersion": "", + "modelNameVersionId": "", + "modelCustomizationName": "", + "customizationUuid": "", + "modelName": "", + "inputs": "" + }); + + if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.vnfs) ) ) ) { + if ( (svcModel.isNewFlow) && (vnfModelCustomizationUuid != null ) ) { + vnfModel = svcModel.vnfs[vnfModelCustomizationUuid]; + } + else { + vnfModel = svcModel.vnfs[vnfModelVersionId]; + } + } + + + // volume groups don't have model-invariant-id/version in a&ai. + // Their model-invariant-id/version is the one for the associated vfModule + + var vfModuleInvariantUuid = vfModule.object[FIELD.ID.MODEL_INVAR_ID]; + var vfModuleModelVersionId = vfModule.object[FIELD.ID.MODEL_VERSION_ID]; + var vfModuleCustomizationUuid = vfModule.object[FIELD.ID.MODEL_CUSTOMIZATION_ID]; + var volGroupModel = null; + + if ( !($scope.isObjectEmpty(vnfModel.volumeGroups) ) ) { + if ( ( !($scope.isObjectEmpty(vnfModel) ) ) && ( !($scope.isObjectEmpty(vnfModel.volumeGroups) ) ) ) { + if ( (svcModel.isNewFlow) && (UtilityService.hasContents(vfModuleCustomizationUuid) ) ){ + volGroupModel = vnfModel.volumeGroups[vfModuleCustomizationUuid]; + } + else { + volGroupModel = vnfModel.volumeGroups[vfModuleModelVersionId]; + } + if ( !($scope.isObjectEmpty(volGroupModel) ) ) { + DataService.setModelInfo(COMPONENT.VOLUME_GROUP, { + "modelInvariantId": volGroupModel.invariantUuid, + "modelVersion": volGroupModel.version, + "modelNameVersionId": volGroupModel.uuid, + "modelCustomizationName": volGroupModel.modelCustomizationName, + "customizationUuid": volGroupModel.customizationUuid, + "modelName": volGroupModel.name, + "inputs": "" + }); + + } + } + } + + var serviceInstance = serviceObject.object; + + DataService.setInventoryItem(volumeGroup.object); + + DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]); + DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]); + DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]); + + DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]); + DataService.setServiceInstanceName($scope.service.instance.name); + + DataService.setServiceName($scope.service.model.service.name); + + DataService.setServiceUuid($scope.service.model.service.uuid); + DataService.setVnfInstanceId(vnf.nodeId); + DataService.setVolumeGroupInstanceId(volumeGroup.nodeId); + + $scope.$broadcast(COMPONENT.DELETE_COMPONENT, { + componentId : COMPONENT.VOLUME_GROUP, + }); + }; + + $scope.deleteVnfVolumeGroup = function(serviceObject, vnf, volumeGroup) { + + console.log("Removing Volume Group " + volumeGroup.name); + var serviceInstance = serviceObject.object; + + DataService.setInventoryItem(volumeGroup.object); + + var svcModel = $scope.service.convertedModel; + + var vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID]; + var vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID]; + var vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID]; + + var volGroupModelInvariantUuid = volumeGroup.object[FIELD.ID.MODEL_INVAR_ID]; + var volGroupModelVersionId = volumeGroup.object[FIELD.ID.MODEL_VERSION_ID]; + var volGroupModelCustomizationUuid = volumeGroup.object[FIELD.ID.MODEL_CUSTOMIZATION_ID]; + + var vnfModel = null; + var volGroupModel = null; + + // send an empty model by default since model is not required for deletes + DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {}); + + if ( svcModel.isNewFlow ) { + vnfModel = svcModel.vnfs[vnfModelCustomizationUuid]; + if ( UtilityService.hasContents (volGroupModelCustomizationUuid) ) { + volGroupModel = vnfModel.volumeGroups[volGroupModelCustomizationUuid]; + } + } + else { + + vnfModel = svcModel.vnfs[vnfModelVersionId]; + if ( UtilityService.hasContents (volGroupModelVersionId) ) { + volGroupModel = vnfModel.volumeGroups[volGroupModelVersionId]; + } + } + if ( !($scope.isObjectEmpty(volGroupModel) ) ) { + DataService.setModelInfo(COMPONENT.VOLUME_GROUP, { + "modelInvariantId": volGroupModel.invariantUuid, + "modelVersion": volGroupModel.version, + "modelNameVersionId": volGroupModel.uuid, + "modelName": volGroupModel.name, + "modelCustomizationName": volGroupModel.modelCustomizationName, + "customizationUuid": volGroupModel.customizationUuid, + "inputs": "" + }); + } + + DataService.setVnfInstanceId(vnf.object[FIELD.ID.VNF_ID]); + + DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]); + DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]); + DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]); + + DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]); + DataService.setServiceInstanceName($scope.service.instance.name); + + DataService.setServiceName($scope.service.model.service.name); + + DataService.setServiceUuid($scope.service.model.service.uuid); + DataService.setVnfInstanceId(vnf.nodeId); + DataService.setVolumeGroupInstanceId(volumeGroup.nodeId); + + $scope.$broadcast(COMPONENT.DELETE_COMPONENT, { + componentId : COMPONENT.VOLUME_GROUP, + callbackFunction : deleteCallbackFunction + }); + }; + + $scope.describeNetwork = function(serviceObject, networkObject) { + var serviceInstance = serviceObject.object; + var network = networkObject.object; + //console.log ("networkObject="); console.log (JSON.stringify(networkObject, null, 4)); + + DataService.setResCustomizationUuid(" "); + + var svcModel = $scope.service.convertedModel; + var netModel = null; + + if ( !($scope.isObjectEmpty(network) ) ) { + + var netModelInvariantUuid = network[FIELD.ID.MODEL_INVAR_ID]; + var netModelVersionId = network[FIELD.ID.MODEL_VERSION_ID]; + var netModelCustomizationUuid = network[FIELD.ID.MODEL_CUSTOMIZATION_ID]; + + if ( UtilityService.hasContents (netModelCustomizationUuid) ) { + // set it to what came from a&ai + DataService.setResCustomizationUuid(netModelCustomizationUuid); + } + + if ( (!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.networks))) ) { + if ( svcModel.isNewFlow ) { + netModel = svcModel.networks[netModelCustomizationUuid]; + } + else { + netModel = svcModel.networks[netModelVersionId]; + } + /* + * The details pop-up should use a&ai info + * if ( !($scope.isObjectEmpty(netModel) ) ) { + if (UtilityService.hasContents(netModel.customizationUuid)) { + DataService.setResCustomizationUuid(netModel.customizationUuid); + } + }*/ + } + } + + DataService.setNetworkInstanceId(network[FIELD.ID.NETWORK_ID]); + DataService.setInventoryItem(networkObject); + DataService.setSubscriberName(serviceObject.subscriberName); + DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]); + DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]); + + $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, { + componentId : COMPONENT.NETWORK + }); + }; + + // for service instance id - no need for this! + $scope.describeService = function(serviceObject) { + var serviceInstance = serviceObject.object; + + DataService.setInventoryItem(serviceInstance); + //DataService.setModelInfo(serviceInstance['service-instance-id'], serviceInstance); + + DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]); + DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]); + DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]); + + //Display popup with additional service information + $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, { + componentId : COMPONENT.SERVICE + }); + + }; + + $scope.describeVfModule = function(serviceObject, vfModuleObject, vnf) { + var serviceInstance = serviceObject.object; + var vfModule = vfModuleObject.object; + + /*var vfModuleInvariantUuid = vfModule[FIELD.ID.MODEL_INVAR_ID]; + var vfModuleModelVersionId = vfModule[FIELD.ID.MODEL_VERSION_ID];*/ + var vfModuleCustomizationUuid = vfModule[FIELD.ID.MODEL_CUSTOMIZATION_ID]; + + DataService.setCustomizationUuid(" "); + if ( UtilityService.hasContents (vfModuleCustomizationUuid) ) { + DataService.setCustomizationUuid(vfModuleCustomizationUuid); + } + + //Display popup with additional VF-Module information + DataService.setVfModuleInstanceId(vfModule[FIELD.ID.VF_MODULE_ID]); + DataService.setInventoryItem(vfModule) + + DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]); + DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]); + DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]); + + $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, { + componentId : COMPONENT.VF_MODULE + }); + }; + + $scope.getStatusOfVnf = function(serviceObject, vnfObject) { + var serviceInstance = serviceObject.object; + var vnf = vnfObject.object; + + DataService.setVnfInstanceId(vnf[FIELD.ID.VNF_ID]); + DataService.setInventoryItem(vnf); + + DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]); + DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]); + DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]); + DataService.setServiceInstanceName(serviceInstance[FIELD.ID.SERVICE_INSTANCE_NAME]); + + $scope.$broadcast(COMPONENT.COMPONENT_STATUS, { + componentId : COMPONENT.VNF, + callbackFunction : updateProvStatusVnfCallbackFunction + }); + }; + + $scope.describeVnf = function(serviceObject, vnfObject) { + var serviceInstance = serviceObject.object; + var vnf = vnfObject.object; + DataService.setResCustomizationUuid(" "); + + //var vnfInvariantUuid = vnf[FIELD.ID.MODEL_INVAR_ID]; + //var vnfVersionId = vnf[FIELD.ID.MODEL_VERSION_ID]; + var vnfCustomizationUuid = vnf[FIELD.ID.MODEL_CUSTOMIZATION_ID]; + + if ( UtilityService.hasContents (vnfCustomizationUuid) ) { + DataService.setResCustomizationUuid(vnfCustomizationUuid); + } + //Display popup with additional VNF information + DataService.setVnfInstanceId(vnf[FIELD.ID.VNF_ID]); + DataService.setInventoryItem(vnf); + + DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]); + DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]); + DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]); + + $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, { + componentId : COMPONENT.VNF + }); + }; + + $scope.describeVolumeGroup = function(serviceObject, vnf, volumeGroupObject) { + + var serviceInstance = serviceObject.object; + var volumeGroup = volumeGroupObject.object; + + //var volGroupInvariantUuid = volumeGroup[FIELD.ID.MODEL_INVAR_ID]; + //var volGroupVersionId = volumeGroup[FIELD.ID.MODEL_VERSION_ID]; + var volGroupCustomizationUuid = volumeGroup[FIELD.ID.MODEL_CUSTOMIZATION_ID]; + + DataService.setCustomizationUuid(" "); + if ( UtilityService.hasContents(volGroupCustomizationUuid) ) { + DataService.setCustomizationUuid(volGroupCustomizationUuid); + } + DataService.setVolumeGroupInstanceId(volumeGroup[FIELD.ID.VOLUME_GROUP_ID]); + DataService.setInventoryItem(volumeGroup); + + DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]); + DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]); + DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]); + + + $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, { + componentId : COMPONENT.VOLUME_GROUP + }); + }; + + $scope.addNetworkInstance = function(netModel, existingVnfs) { + + // For networks we assume that we always follow the new flow + console.log("Adding network to service instance" + this.service.instance.name); + if ( VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED && (UtilityService.hasContents(existingVnfs)) && (existingVnfs.length > 0) ) { + var msg = VnfService.isVnfListStatusValid (existingVnfs); + if ( msg != "" ) { + alert ( msg ); + return; + } + } + + DataService.setSubscriberName($scope.service.instance.subscriberName); + DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId); + DataService.setServiceType($scope.service.instance.serviceType); + DataService.setServiceInstanceName($scope.service.instance.name); + DataService.setServiceInstanceId($scope.service.instance.id); + DataService.setServiceName($scope.service.model.service.name); + + DataService.setModelInfo(COMPONENT.NETWORK, { + "modelType": "network", + "modelInvariantId": netModel.invariantUuid, + "modelVersion": netModel.version, + "modelNameVersionId": netModel.uuid, + "modelName": netModel.name, + "modelCustomizationName": netModel.modelCustomizationName, + "customizationUuid": netModel.customizationUuid, + "inputs": "", + "displayInputs": netModel.displayInputs + }); + + DataService.setModelInfo(COMPONENT.SERVICE, { + "modelInvariantId": $scope.service.model.service.invariantUuid, + "modelVersion": $scope.service.model.service.version, + "modelNameVersionId": $scope.service.model.service.uuid, + "modelName": $scope.service.model.service.name, + "inputs": "" + }); + + $scope.$broadcast(COMPONENT.CREATE_COMPONENT, { + componentId : COMPONENT.NETWORK, + callbackFunction : createVnfCallbackFunction + }); + }; + + $scope.addVnfInstance = function(vnf, existingVnfs) { + + if ( VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED && (UtilityService.hasContents(existingVnfs)) && (existingVnfs.length > 0) ) { + var msg = VnfService.isVnfListStatusValid (existingVnfs); + if ( msg != "" ) { + alert ( msg ); + return; + } + } + DataService.setSubscriberName($scope.service.instance.subscriberName); + DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId); + DataService.setServiceType($scope.service.instance.serviceType); + DataService.setServiceInstanceName($scope.service.instance.name); + DataService.setServiceInstanceId($scope.service.instance.id); + DataService.setServiceName($scope.service.model.service.name); + + console.log ( "existingVnfs: " ); console.log (JSON.stringify ( existingVnfs, null, 4)); + var vnf_type = ""; + var vnf_role = ""; + var vnf_function = ""; + var vnf_code = ""; + + if (UtilityService.hasContents (vnf.nfType) ) { + vnf_type = vnf.nfType; + } + if (UtilityService.hasContents (vnf.nfRole) ) { + vnf_role = vnf.nfRole; + } + if (UtilityService.hasContents (vnf.nfFunction) ) { + vnf_function = vnf.nfFunction; + } + if (UtilityService.hasContents (vnf.nfCode) ) { + vnf_code = vnf.nfCode; + } + DataService.setModelInfo(COMPONENT.VNF, { + "modelType": "vnf", + "modelInvariantId": vnf.invariantUuid, + "modelVersion": vnf.version, + "modelNameVersionId": vnf.uuid, + "modelName": vnf.name, + "modelCustomizationName": vnf.modelCustomizationName, + "customizationUuid": vnf.customizationUuid, + "inputs": "", + "displayInputs": vnf.displayInputs, + "vnfType": vnf_type, + "vnfRole": vnf_role, + "vnfFunction": vnf_function, + "vnfCode": vnf_code + }); + + DataService.setModelInstanceName($scope.service.model.service.name); + + DataService.setModelInfo(COMPONENT.SERVICE, { + "modelInvariantId": $scope.service.model.service.invariantUuid, + "modelVersion": $scope.service.model.service.version, + "modelNameVersionId": $scope.service.model.service.uuid, + "modelName": $scope.service.model.service.name, + "inputs": "" + }); + + $scope.$broadcast(COMPONENT.CREATE_COMPONENT, { + componentId : COMPONENT.VNF, + callbackFunction : createVnfCallbackFunction + }); + }; + + $scope.addVfModuleInstance = function(vnfInstance, vfModuleModel) { + + if ( VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED ) { + var msg = VnfService.isVnfStatusValid (vnfInstance); + if ( msg != "" ) { + alert ( msg ); + return; + } + + } + var svcModel = $scope.service.convertedModel; + DataService.setSubscriberName($scope.service.instance.subscriberName); + DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId); + DataService.setServiceType($scope.service.instance.serviceType); + DataService.setServiceInstanceName($scope.service.instance.name); + DataService.setServiceInstanceId($scope.service.instance.id); + DataService.setServiceName($scope.service.model.service.name); + + var vnfModelInvariantUuid = vnfInstance.object[FIELD.ID.MODEL_INVAR_ID]; + var vnfModelVersionId = vnfInstance.object[FIELD.ID.MODEL_VERSION_ID]; + var vnfModelCustomizationUuid = vnfInstance.object[FIELD.ID.MODEL_CUSTOMIZATION_ID]; + var vnfModel = null; + if ( svcModel.isNewFlow ) { + vnfModel = svcModel.vnfs[vnfModelCustomizationUuid]; + } + else { + vnfModel = svcModel.vnfs[vnfModelVersionId]; + } + + var availableVolumeGroupList = []; + angular.forEach(vnfInstance[FIELD.ID.AVAILABLEVOLUMEGROUPS], function(volumeGroupInstance, key) { + availableVolumeGroupList.push({"instance": volumeGroupInstance}); + }); + + if (vfModuleModel.volumeGroupAllowed) { + DataService.setAvailableVolumeGroupList(availableVolumeGroupList); + } + + DataService.setModelInfo(COMPONENT.SERVICE, { + "modelInvariantId": $scope.service.model.service.invariantUuid, + "modelVersion": $scope.service.model.service.version, + "modelNameVersionId": $scope.service.model.service.uuid, + "modelName": $scope.service.model.service.name, + "inputs": "" + }); + + DataService.setVnfInstanceId(vnfInstance.object[FIELD.ID.VNF_ID]); + + DataService.setModelInfo(COMPONENT.VNF, { + "modelInvariantId": vnfModel.invariantUuid, + "modelVersion": vnfModel.version, + "modelNameVersionId": vnfModel.uuid, + "modelName": vnfModel.name, + "modelCustomizationName": vnfModel.modelCustomizationName, + "customizationUuid": vnfModel.customizationUuid, + "inputs": "" + }); + + DataService.setModelInfo(COMPONENT.VF_MODULE, { + "modelInvariantId": vfModuleModel.invariantUuid, + "modelVersion": vfModuleModel.version, + "modelNameVersionId": vfModuleModel.uuid, + "customizationUuid": vfModuleModel.customizationUuid, + "modelCustomizationName": vfModuleModel.modelCustomizationName, + "modelName": vfModuleModel.name, + "inputs": "" + }); + + $scope.$broadcast(COMPONENT.CREATE_COMPONENT, { + componentId : COMPONENT.VF_MODULE, + callbackFunction : createVfModuleCallbackFunction + }); + + }; + + $scope.addVolumeGroupInstance = function(vnfInstance, volumeGroupModel) { + if ( VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED ) { + var msg = VnfService.isVnfStatusValid (vnfInstance); + if ( msg != "" ) { + alert ( msg ); + return; + } + } + var svcModel = $scope.service.convertedModel; + DataService.setSubscriberName($scope.service.instance.subscriberName); + DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId); + DataService.setServiceType($scope.service.instance.serviceType); + DataService.setServiceInstanceName($scope.service.instance.name); + DataService.setServiceInstanceId($scope.service.instance.id); + DataService.setServiceName($scope.service.model.service.name); + + DataService.setModelInfo(COMPONENT.SERVICE, { + "modelInvariantId": $scope.service.model.service.invariantUuid, + "modelVersion": $scope.service.model.service.version, + "modelNameVersionId": $scope.service.model.service.uuid, + "modelName": $scope.service.model.service.name, + "inputs": "" + }); + + DataService.setVnfInstanceId(vnfInstance.object[FIELD.ID.VNF_ID]); + + var vnfModelInvariantUuid = vnfInstance.object[FIELD.ID.MODEL_INVAR_ID]; + var vnfModelVersionId = vnfInstance.object[FIELD.ID.MODEL_VERSION_ID]; + var vnfCustomizationUuid = vnfInstance.object[FIELD.ID.MODEL_CUSTOMIZATION_ID]; + var vnfModel = null; + + if ( svcModel.isNewFlow ) { + vnfModel = svcModel.vnfs[vnfCustomizationUuid]; + } + else { + vnfModel = svcModel.vnfs[vnfModelVersionId]; + } + + DataService.setModelInfo(COMPONENT.VNF, { + "modelInvariantId": vnfModel.invariantUuid, + "modelVersion": vnfModel.version, + "modelNameVersionId": vnfModel.uuid, + "modelName": vnfModel.name, + "modelCustomizationName": vnfModel.modelCustomizationName, + "customizationUuid": vnfModel.customizationUuid, + "inputs": "" + }); + + DataService.setModelInfo(COMPONENT.VOLUME_GROUP, { + "modelInvariantId": volumeGroupModel.invariantUuid, + "modelVersion": volumeGroupModel.version, + "modelNameVersionId": volumeGroupModel.uuid, + "modelName": volumeGroupModel.name, + "modelCustomizationName": volumeGroupModel.modelCustomizationName, + "customizationUuid": volumeGroupModel.customizationUuid, + "inputs": "" + }); + + $scope.$broadcast(COMPONENT.CREATE_COMPONENT, { + componentId : COMPONENT.VOLUME_GROUP, + callbackFunction : createVolumeGroupCallbackFunction + }); + }; + + $scope.resetProgress = function() { + $scope.percentProgress = 0; + $scope.progressClass = FIELD.STYLE.PROGRESS_BAR_INFO; + }; + + $scope.setProgress = function(percentProgress) { + percentProgress = parseInt(percentProgress); + if (percentProgress >= 100) { + $scope.progressClass = FIELD.STYLE.PROGRESS_BAR_SUCCESS; + } + + if (percentProgress < $scope.percentProgress) { + return; + } + + $scope.percentProgress = percentProgress; + $scope.progressWidth = {width: percentProgress + "%"}; + if (percentProgress >= 5) { + $scope.progressText = percentProgress + " %"; + } else { + // Hidden since color combination is barely visible when progress portion is narrow. + $scope.progressText = ""; + } + }; + $scope.isObjectEmpty = function(o) { + var len = 0; + if (UtilityService.hasContents(o)){ + var keys = Object.keys(o); + len = keys.length; + if ( len == 0 ) { + return true; + } + else { + return false; + } + } + else { + return true; + } + } + $scope.isMacro = function() { + if (UtilityService.arrayContains (VIDCONFIGURATION.MACRO_SERVICES, $scope.service.model.service.invariantUuid )) { + return(true); + + } + else { + return (false); + } + } + $scope.reloadRoute = function() { + $route.reload(); + } + + var updateProvStatusVnfCallbackFunction = function(response) { + $scope.callbackResults = ""; + var color = FIELD.ID.COLOR_NONE; + $scope.callbackStyle = { + "background-color" : color + }; + $scope.reloadRoute(); + /* + * This 1/2 delay was only added to visually highlight the status + * change. Probably not needed in the real application code. + */ + $timeout(function() { + $scope.callbackResults = UtilityService.getCurrentTime() + + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful; + if (response.isSuccessful) { + color = FIELD.ID.COLOR_8F8; + + } else { + color = FIELD.ID.COLOR_F88; + } + $scope.callbackStyle = { + "background-color" : color + }; + }, 500); + + }; + + var createVnfCallbackFunction = function(response) { + $scope.callbackResults = ""; + var color = FIELD.ID.COLOR_NONE; + $scope.callbackStyle = { + "background-color" : color + }; + + /* + * This 1/2 delay was only added to visually highlight the status + * change. Probably not needed in the real application code. + */ + $timeout(function() { + $scope.callbackResults = UtilityService.getCurrentTime() + + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful; + if (response.isSuccessful) { + color = FIELD.ID.COLOR_8F8; + $scope.reloadRoute(); + } else { + color = FIELD.ID.COLOR_F88; + } + $scope.callbackStyle = { + "background-color" : color + }; + }, 500); + + + + }; + + var deleteCallbackFunction = function(response) { + $scope.callbackResults = ""; + var color = FIELD.ID.COLOR_NONE; + $scope.callbackStyle = { + "background-color" : color + }; + + /* + * This 1/2 delay was only added to visually highlight the status + * change. Probably not needed in the real application code. + */ + $timeout(function() { + $scope.callbackResults = UtilityService.getCurrentTime() + + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful; + if (response.isSuccessful) { + color = FIELD.ID.COLOR_8F8; + $scope.reloadRoute(); + } else { + color = FIELD.ID.COLOR_F88; + } + $scope.callbackStyle = { + "background-color" : color + }; + }, 500); + + }; + + var createVfModuleCallbackFunction = function(response) { + $scope.callbackResults = ""; + var color = FIELD.ID.COLOR_NONE; + $scope.callbackStyle = { + "background-color" : color + }; + + /* + * This 1/2 delay was only added to visually highlight the status + * change. Probably not needed in the real application code. + */ + $timeout(function() { + $scope.callbackResults = UtilityService.getCurrentTime() + + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful; + if (response.isSuccessful) { + color = FIELD.ID.COLOR_8F8; + $scope.reloadRoute(); + } else { + color = FIELD.ID.COLOR_F88; + } + $scope.callbackStyle = { + "background-color" : color + }; + }, 500); + + }; + + var deleteServiceInstanceCallbackFunction = function(response) { + $scope.callbackResults = ""; + var color = FIELD.ID.COLOR_NONE; + $scope.callbackStyle = { + "background-color" : color + }; + + /* + * This 1/2 delay was only added to visually highlight the status + * change. Probably not needed in the real application code. + */ + $timeout(function() { + $scope.callbackResults = UtilityService.getCurrentTime() + + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful; + if (response.isSuccessful) { + color = FIELD.ID.COLOR_8F8; + $location.path(COMPONENT.SERVICEMODELS_MODELS_SERVICES_PATH) + } else { + color = FIELD.ID.COLOR_F88; + } + $scope.callbackStyle = { + "background-color" : color + }; + }, 500); + + }; + + var createVolumeGroupCallbackFunction = function(response) { + $scope.callbackResults = ""; + var color = FIELD.ID.COLOR_NONE; + $scope.callbackStyle = { + "background-color" : color + }; + + /* + * This 1/2 delay was only added to visually highlight the status + * change. Probably not needed in the real application code. + */ + $timeout(function() { + $scope.callbackResults = UtilityService.getCurrentTime() + + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful; + if (response.isSuccessful) { + color = FIELD.ID.COLOR_8F8; + $scope.reloadRoute(); + } else { + color = FIELD.ID.COLOR_F88; + } + $scope.callbackStyle = { + "background-color" : color + }; + }, 500); + + + + }; + + }); +})(); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js new file mode 100755 index 000000000..5d382e9e9 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js @@ -0,0 +1,227 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 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. + * ============LICENSE_END========================================================= + */ + +(function () { + 'use strict'; + + appDS2.controller("ServiceModelController", function ($scope, $http, $location, COMPONENT, VIDCONFIGURATION, FIELD, DataService, vidService, + PropertyService, UtilityService) { + + $scope.popup = {}; + + // var baseEndpoint = "vid"; + var pathQuery = COMPONENT.SERVICES_DIST_STATUS_PATH + VIDCONFIGURATION.ASDC_MODEL_STATUS; + + if ( VIDCONFIGURATION.ASDC_MODEL_STATUS === FIELD.STATUS.ALL) { + pathQuery = COMPONENT.SERVICES_PATH; + } + + $scope.getServiceModels = function() { + $scope.status = FIELD.STATUS.FETCHING_SERVICE_CATALOG_ASDC; + + $http.get(pathQuery) + .then(function successCallback(response) { + $scope.services = []; + if (angular.isArray(response.data)) { + $scope.services = response.data; + $scope.viewPerPage=10; + $scope.totalPage=$scope.services.length/$scope.viewPerPage; + $scope.sortBy=COMPONENT.NAME; + $scope.scrollViewPerPage=2; + $scope.currentPage=1; + $scope.searchCategory; + $scope.searchString=""; + $scope.currentPageNum=1; + $scope.isSpinnerVisible = false; + $scope.isProgressVisible = false; + } else { + $scope.status = FIELD.STATUS.FAILED_SERVICE_MODELS_ASDC; + $scope.error = true; + $scope.isSpinnerVisible = false; + } + }, function errorCallback(response) { + console.log("Error: " + response); + }); + } + + $scope.init = function() { + var msecs = PropertyService.retrieveMsoMaxPollingIntervalMsec(); + PropertyService.setMsoMaxPollingIntervalMsec(msecs); + + var polls = PropertyService.retrieveMsoMaxPolls(); + PropertyService.setMsoMaxPolls(polls); + + //PropertyService.setMsoBaseUrl("testmso"); + PropertyService.setServerResponseTimeoutMsec(10000); + } + + $scope.prevPage = function() { + $scope.currentPage--; + } + + $scope.nextPage = function() { + $scope.currentPage++; + } + + $scope.createType = COMPONENT.A_LA_CARTE; + $scope.deployService = function(service) { + + + console.log("Instantiating SDC service " + service.uuid); + + $http.get(COMPONENT.SERVICES_PATH + service.uuid) + .then(function successCallback(getServiceResponse) { + + var serviceModel = getServiceResponse.data; + DataService.setServiceName(serviceModel.service.name); + + DataService.setModelInfo(COMPONENT.SERVICE, { + "modelInvariantId": serviceModel.service.invariantUuid, + "modelVersion": serviceModel.service.version, + "modelNameVersionId": serviceModel.service.uuid, + "modelName": serviceModel.service.name, + "description": serviceModel.service.description, + "category":serviceModel.service.category + }); + DataService.setALaCarte (true); + $scope.createType = COMPONENT.A_LA_CARTE; + var broadcastType = COMPONENT.CREATE_COMPONENT; + + if (UtilityService.arrayContains (VIDCONFIGURATION.MACRO_SERVICES, serviceModel.service.invariantUuid )) { + DataService.setALaCarte (false); + $scope.createType = COMPONENT.MACRO; + var convertedAsdcModel = UtilityService.convertModel(serviceModel); + + //console.log ("display inputs "); + //console.log (JSON.stringify ( convertedAsdcModel.completeDisplayInputs)); + + DataService.setModelInfo(COMPONENT.SERVICE, { + "modelInvariantId": serviceModel.service.invariantUuid, + "modelVersion": serviceModel.service.version, + "modelNameVersionId": serviceModel.service.uuid, + "modelName": serviceModel.service.name, + "description": serviceModel.service.description, + "category":serviceModel.service.category, + "serviceEcompNaming": serviceModel.service.serviceEcompNaming, + "inputs": serviceModel.service.inputs, + "displayInputs": convertedAsdcModel.completeDisplayInputs + }); + }; + + $scope.$broadcast(broadcastType, { + componentId : COMPONENT.SERVICE, + callbackFunction : function(response) { + if (response.isSuccessful) { + vidService.setModel(serviceModel); + + var subscriberId = FIELD.STATUS.NOT_FOUND; + var serviceType = FIELD.STATUS.NOT_FOUND; + + var serviceInstanceId = response.instanceId; + + for (var i = 0; i < response.control.length; i++) { + if (response.control[i].id == COMPONENT.SUBSCRIBER_NAME) { + subscriberId = response.control[i].value; + } else if (response.control[i].id == "service-type") { + serviceType = response.control[i].value; + } + } + + + $scope.refreshSubs(subscriberId,serviceType,serviceInstanceId); + + } + } + }); + + }, function errorCallback(response) { + console.log("Error: " + response); + }); + }; + + $scope.refreshSubs = function(subscriberId, serviceType, serviceInstanceId) { + $scope.status = FIELD.STATUS.FETCHING_SUBSCRIBER_LIST_AAI; + $scope.init(); + $http.get( FIELD.ID.AAI_REFRESH_FULL_SUBSCRIBERS, { + + },{ + timeout: $scope.responseTimeoutMsec + }).then(function(response){ + + if (response.data.status < 200 || response.data.status > 202) { + $scope.showError(FIELD.ERROR.MSO) + return; + } + + $scope.customer = response.data.customer; // get data from json + + $scope.customerList = []; + + $scope.serviceInstanceToCustomer = []; + + angular.forEach($scope.customer, function(subVal, subKey) { + var cust = { "globalCustomerId": subVal[FIELD.ID.GLOBAL_CUSTOMER_ID], "subscriberName": subVal[FIELD.ID.SUBNAME] }; + $scope.customerList.push(cust); + if (subVal[FIELD.ID.SERVICE_SUBSCRIPTIONS] != null) { + angular.forEach(subVal[FIELD.ID.SERVICE_SUBSCRIPTIONS][FIELD.ID.SERVICE_SUBSCRIPTION], function(serviceSubscription, key) { + $scope.serviceInstanceId = []; + if (serviceSubscription[FIELD.ID.SERVICE_TYPE] != null) { + $scope.serviceType = serviceSubscription[FIELD.ID.SERVICE_TYPE]; + } else { + $scope.serviceType = FIELD.STATUS.NO_SERVICE_SUBSCRIPTION_FOUND; + } + if (serviceSubscription[FIELD.ID.SERVICE_INSTANCES] != null) { + angular.forEach(serviceSubscription[FIELD.ID.SERVICE_INSTANCES][FIELD.ID.SERVICE_INSTANCE], function(instValue, instKey) { + var foo = { "serviceInstanceId": instValue[FIELD.ID.SERVICE_INSTANCE_ID], + "globalCustomerId": subVal[FIELD.ID.GLOBAL_CUSTOMER_ID], + "subscriberName": subVal[FIELD.ID.SUBNAME] }; + $scope.serviceInstanceToCustomer.push(foo); + }); + } + }); + } + }); + DataService.setServiceInstanceToCustomer($scope.serviceInstanceToCustomer); + var serviceIdList = []; + $http.get( FIELD.ID.AAI_GET_SERVICES, { + },{ + timeout: $scope.responseTimeoutMsec + }).then(function(response) { + angular.forEach(response.data, function(value, key) { + angular.forEach(value, function(subVal, key) { + var newVal = { "id" : subVal[FIELD.ID.SERVICE_ID], "description" : subVal[FIELD.ID.SERVICE_DESCRIPTION] }; + serviceIdList.push(newVal); + DataService.setServiceIdList(serviceIdList); + + $location.search({ + "subscriberId": subscriberId, + "serviceType": serviceType, + "serviceInstanceId": serviceInstanceId + }); + + $location.path(COMPONENT.INSTANTIATE_PATH); + }); + }); + }); + }) + ["catch"]($scope.handleServerError); + }; + }); +})(); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/VidApp.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/VidApp.js new file mode 100755 index 000000000..dcde2ecc6 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/VidApp.js @@ -0,0 +1,79 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 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. + * ============LICENSE_END========================================================= + */ + +(function () { + 'use strict'; + + appDS2.config(['$routeProvider', '$locationProvider', function ($routeProvider) { + $routeProvider + .when('/models/services', { + controller: 'ServiceModelController', + templateUrl: 'app/vid/scripts/view-models/serviceModels.htm' + }) + .when('/models/services/createInstance', { + controller: 'aaiSubscriberController', + templateUrl: 'app/vid/scripts/view-models/createInstanceServiceModels.htm' + }) + .when('/instances/services', { + templateUrl : "app/vid/scripts/view-models/aaiGetSubs.htm", + controller : "aaiSubscriberController" + }) + .when('/instances/subscribers', { + templateUrl : "app/vid/scripts/view-models/aaiGetSubscriberList.htm", + controller : "aaiSubscriberController" + }) + .when('/instances/serviceTypes', { + templateUrl : "app/vid/scripts/view-models/aaiServiceTypes.htm", + controller : "aaiSubscriberController" + }) + .when('/instances/subdetails', { + templateUrl : "app/vid/scripts/view-models/aaiSubDetails.htm", + controller : "aaiSubscriberController" + }) + .when('/instantiate', { + controller: 'InstantiationController', + templateUrl: 'app/vid/scripts/view-models/instantiate.htm' + }) + .otherwise({ + redirectTo: '/models/services' + }); + }]); + + appDS2.service('vidService', function() { + var _model = undefined; + var _instance = undefined; + + this.setModel = function(model) { + _model = model; + }; + + this.getModel = function() { + return _model; + }; + + this.setInstance = function(instance) { + _instance = instance; + }; + + this.getInstance = function() { + return _instance; + }; + }); +})(); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js new file mode 100755 index 000000000..5caa3298f --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js @@ -0,0 +1,821 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 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. + * ============LICENSE_END========================================================= + */ + +"use strict"; + +appDS2.controller("aaiSubscriberController", [ "COMPONENT", "FIELD", "PARAMETER", "DataService", "PropertyService", "$scope", "$http", "$timeout", "$location", "$log", "$route", "VIDCONFIGURATION", "UtilityService", "vidService","AaiService", + function(COMPONENT, FIELD, PARAMETER, DataService, PropertyService, $scope, $http, $timeout, $location, $log, $route, VIDCONFIGURATION, UtilityService, vidService, AaiService) { + + $scope.showVnfDetails = function(vnf) { + console.log("showVnfDetails"); + DataService.setVnfInstanceId(COMPONENT.VNF_INSTANCE_ID); + DataService + .setInventoryItem(aaiResult[FIELD.ID.INVENTORY_RESPONSE_ITEMS][FIELD.ID.INVENTORY_RESPONSE_ITEM][0]); + + $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, { + componentId : COMPONENT.VNF, + callbackFunction : callbackFunction + }); + } + $scope.popup = new Object(); + + + $scope.isPopupVisible = false; + $scope.defaultBaseUrl = ""; + $scope.responseTimeoutMsec = 60000; + + $scope.serviceTypes=[ FIELD.PROMPT.SELECT_SERVICE ]; + $scope.defaultSubscriberName=[ FIELD.PROMPT.SELECT_SUB ]; + + var callbackFunction = function(response) { + alert(response); + }; + + $scope.getSubs = function() { + $scope.init(); + $scope.fetchSubs(FIELD.PROMPT.FETCHING_SUBS); + $scope.fetchServices(); + + }; + + $scope.cancelCreateSI = function(){ + + window.location.href = COMPONENT.WELCOME_PATH; + + }; + + $scope.getServiceTypes = function(globalCustomerId){ + DataService.setGlobalCustomerId(globalCustomerId); + DataService.setServiceIdList($scope.customerList) + + if (globalCustomerId !== "" && globalCustomerId !== undefined ) { + window.location.href = COMPONENT.SERVICE_TYPE_LIST_PATH + $scope.serviceTypeList; + } + } + + $scope.refreshServiceTypes = function(globalCustomerId){ + DataService.setGlobalCustomerId(globalCustomerId); + + $scope.getServiceTypesList(); + } + + $scope.subId=""; + $scope.createSubscriberName=""; + $scope.serviceTypeList={}; + $scope.custSubList=[]; + $scope.getServiceTypesList = function(){ + var notFound = true; + var globalCustomerId = DataService.getGlobalCustomerId(); + $scope.custSubList = DataService.getServiceIdList(); + if(globalCustomerId !== "" && globalCustomerId !== undefined ){ + $scope.subId=globalCustomerId; + $scope.init(); + $scope.status = FIELD.PROMPT.FETCHING_SERVICE_TYPES; + DataService.setGlobalCustomerId(globalCustomerId); + + AaiService.getSubscriptionServiceTypeList(DataService + .getGlobalCustomerId(), function(response) { + notFound = false; + $scope.setProgress(100); // done + $scope.status = FIELD.STATUS.DONE; + $scope.isSpinnerVisible = false; + $scope.serviceTypeList = response; + for(var i=0; i<$scope.custSubList.length;i++){ + if(globalCustomerId === $scope.custSubList[i].globalCustomerId){ + $scope.createSubscriberName = $scope.custSubList[i].subscriberName; + } + } + }, function(response) { // failure + $scope.showError(FIELD.ERROR.AAI); + $scope.errorMsg = FIELD.ERROR.FETCHING_SERVICE_TYPES + response.status; + $scope.errorDetails = response.data; + }); + } else { + alert(FIELD.ERROR.SELECT); + } + + }; + + $scope.subList = []; + $scope.getAaiServiceModels = function(selectedServicetype,subName){ + DataService.setGlobalCustomerId(selectedServicetype); + DataService.setServiceIdList($scope.serviceTypeList) + DataService.setSubscriberName(subName); + + DataService.setSubscribers($scope.custSubList); + + if (selectedServicetype !== "" && selectedServicetype !== 'undefined') { + $location.path(COMPONENT.CREATE_INSTANCE_PATH); + } + }; + + $scope.serviceTypeName=""; + $scope.getAaiServiceModelsList = function(){ + var globalCustomerId=""; + var serviceTypeId = DataService.getGlobalCustomerId(); + $scope.serviceTypeList = DataService.getServiceIdList(); + $scope.createSubscriberName = DataService.getSubscriberName(); + $scope.status = FIELD.STATUS.FETCHING_SERVICE_CATALOG; + $scope.custSubList = DataService.getSubscribers(); + for(var i=0; i<$scope.serviceTypeList.length;i++){ + if(parseInt(serviceTypeId) === i ){ + $scope.serviceTypeName = $scope.serviceTypeList[i]; + } + }; + for(var i=0; i<$scope.custSubList.length;i++){ + if($scope.createSubscriberName === $scope.custSubList[i].subscriberName){ + globalCustomerId = $scope.custSubList[i].globalCustomerId; + } + }; + + var pathQuery =""; + + if(null !== globalCustomerId && "" !== globalCustomerId && undefined !== globalCustomerId + && null !== serviceTypeId && "" !== serviceTypeId && undefined !== serviceTypeId){ + pathQuery = COMPONENT.SERVICES_PATH +globalCustomerId+"/"+$scope.serviceTypeName; + } + + AaiService.getServiceModels(globalCustomerId,$scope.serviceTypeName,function(response) { // success + console.log("service models : "+response.data); + DataService.setServiceIdList(response); + }, function(response) { // failure + $scope.showError(FIELD.ERROR.AAI); + $scope.errorMsg = FIELD.ERROR.FETCHING_SERVICES+ response.status; + $scope.errorDetails = response.data; + }); + + /*$http.get('/aai_get_services/'+globalCustomerId+''+$scope.serviceTypeName) + .then(function successCallback(response) { + $scope.services = []; + if (angular.isArray(response.data)) { + $scope.services = response.data; + $scope.viewPerPage=10; + $scope.totalPage=$scope.services.length/$scope.viewPerPage; + $scope.sortBy="name"; + $scope.scrollViewPerPage=2; + $scope.currentPage=1; + $scope.searchCategory; + $scope.searchString=""; + $scope.currentPageNum=1; + $scope.isSpinnerVisible = false; + $scope.isProgressVisible = false; + } else { + $scope.status = "Failed to get service models from SDC."; + $scope.error = true; + $scope.isSpinnerVisible = false; + } + }, function errorCallback(response) { + console.log("Error: " + response); + }); */ + + + }; + + $scope.cancelCreateSIType = function(){ + + window.location.href = COMPONENT.SERVICE_MODLES_INSTANCES_SUBSCRIBERS_PATH; + + } + + $scope.fetchServices = function() { + var serviceIdList = []; + + AaiService.getServices2(function(response) { // success + DataService.setServiceIdList(response); + }, function(response) { // failure + $scope.showError(FIELD.ERROR.AAI); + $scope.errorMsg = FIELD.ERROR.FETCHING_SERVICES + response.status; + $scope.errorDetails = response.data; + }); + } + + $scope.refreshSubs = function() { + $scope.fetchSubs(FIELD.PROMPT.REFRESH_SUB_LIST); + $scope.fetchServices(); + }; + + $scope.fetchSubs = function(status) { + $scope.status = status; + + AaiService.getSubList(function(response) { // sucesss + $scope.setProgress(100); // done + $scope.status = FIELD.STATUS.DONE; + $scope.isSpinnerVisible = false; + $scope.customerList = response; + }, function(response) { // failure + $scope.showError(FIELD.ERROR.AAI); + $scope.errorMsg = FIELD.ERROR.AAI_FETCHING_CUST_DATA + response.status; + $scope.errorDetails = response.data; + }); + } + + + $scope.getSubDetails = function(request) { + + $scope.init(); + $scope.selectedSubscriber = $location.search().selectedSubscriber; + $scope.selectedServiceInstance = $location.search().selectedServiceInstance; + $scope.status = FIELD.STATUS.FETCHING_SUB_DETAILS + $scope.selectedSubscriber; + + $scope.displayData = []; + AaiService.getSubDetails($scope.selectedSubscriber, $scope.selectedServiceInstance, function(displayData, subscriberName) { + $scope.displayData = displayData; + $scope.viewPerPage=10; + $scope.totalPage=$scope.displayData.length/$scope.viewPerPage; + $scope.scrollViewPerPage=2; + $scope.currentPage=1; + $scope.searchCategory; + $scope.searchString=""; + $scope.currentPageNum=1; + $scope.defaultSort=COMPONENT.SUBSCRIBER_NAME; + $scope.setProgress(100); // done + $scope.status = FIELD.STATUS.DONE; + $scope.isSpinnerVisible = false; + $scope.subscriberName = subscriberName; + }, function(response) { + $scope.showError(FIELD.ERROR.AAI); + $scope.errorMsg = FIELD.ERROR.AAI_FETCHING_CUST_DATA + response.status; + $scope.errorDetails = response.data; + }); + } + + + $scope.$on(COMPONENT.MSO_DELETE_REQ, function(event, request) { + // $log.debug("deleteInstance: request:"); + // $log.debug(request); + $scope.init(); + + $http.post($scope.baseUrl + request.url, { + requestDetails: request.requestDetails + },{ + timeout: $scope.responseTimeoutMsec + }).then($scope.handleInitialResponse) + ["catch"]($scope.handleServerError); + }); + + $scope.init = function() { + + //PropertyService.setAaiBaseUrl("testaai"); + //PropertyService.setAsdcBaseUrl("testasdc"); + + // takes a default value, retrieves the prop value from the file system and sets it + var msecs = PropertyService.retrieveMsoMaxPollingIntervalMsec(); + PropertyService.setMsoMaxPollingIntervalMsec(msecs); + + // takes a default value, retrieves the prop value from the file system and sets it + var polls = PropertyService.retrieveMsoMaxPolls(); + PropertyService.setMsoMaxPolls(polls); + + //PropertyService.setMsoBaseUrl("testmso"); + PropertyService.setServerResponseTimeoutMsec(); + + /* + * Common parameters that would typically be set when the page is + * displayed for a specific service instance id. + */ + + $scope.baseUrl = $scope.defaultBaseUrl; + + $scope.isSpinnerVisible = true; + $scope.isProgressVisible = true; + $scope.isPopupVisible = true; + $scope.requestId = ""; + $scope.error = ""; + $scope.pollAttempts = 0; + $scope.log = ""; + $scope.enableCloseButton(false); + $scope.resetProgress(); + $scope.setProgress(2); // Show "a little" progress + } + + $scope.getComponentList = function(event, request) { + + $scope.isSpinnerVisible = true; + $scope.isProgressVisible = true; + $scope.isPopupVisible = true; + $scope.requestId = ""; + $scope.error = ""; + $scope.pollAttempts = 0; + $scope.log = ""; + + $scope.resetProgress(); + $scope.setProgress(2); // Show "a little" progress + + $scope.globalCustomerId = $location.search().subscriberId; + $scope.serviceType = $location.search().serviceType; + $scope.serviceInstanceId = $location.search().serviceInstanceId; + $scope.subscriberName = $location.search().subscriberName; + + //$scope.getAsdcModel($location.search().modelUuid); + + $scope.namedQueryId = VIDCONFIGURATION.COMPONENT_LIST_NAMED_QUERY_ID; + $scope.status = FIELD.STATUS.FETCHING_SERVICE_INST_DATA + $scope.serviceInstanceId; + + AaiService.runNamedQuery($scope.namedQueryId, $scope.globalCustomerId, $scope.serviceType, $scope.serviceInstanceId, + function(response) { //success + $scope.handleInitialResponseInventoryItems(response); + $scope.setProgress(100); // done + $scope.status = FIELD.STATUS.DONE; + $scope.isSpinnerVisible = false; + }, + function(response){ //failure + $scope.showError(FIELD.ERROR.AAI); + $scope.errorMsg = FIELD.ERROR.FETCHING_SERVICE_INSTANCE_DATA + response.status; + $scope.errorDetails = response.data; + } + ); + + } + + $scope.handleServerError = function(response, status) { + alert(response.statusText); + } + + $scope.getAsdcModel = function(disData) { + + console.log ("disData"); console.log (JSON.stringify (disData, null, 4)); + + if ( !(UtilityService.hasContents (disData.aaiModelVersionId)) ) { + $scope.errorMsg = FIELD.ERROR.MODEL_VERSION_ID_MISSING; + alert($scope.errorMsg); + return; + } + + // aaiModelVersionId is the model uuid + var pathQuery = COMPONENT.SERVICES_PATH + disData.aaiModelVersionId; + $http({ + method: 'GET', + url: pathQuery + }).then(function successCallback(response) { + vidService.setModel(response.data); + window.location.href = COMPONENT.INSTANTIATE_ROOT_PATH + disData.globalCustomerId + COMPONENT.SUBSCRIBERNAME_SUB_PATH + disData.subscriberName + COMPONENT.SERVICETYPE_SUB_PATH + disData.serviceType + COMPONENT.SERVICEINSTANCEID_SUB_PATH + disData.serviceInstanceId; + console.log("aaiSubscriber getAsdcModel DONE!!!!"); + }, function errorCallback(response) { + console.log("aaiSubscriber getAsdcModel - No matching model found matching the A&AI model version ID = " + disData.aaiModelVersionId); + $scope.errorMsg = FIELD.ERROR.NO_MATCHING_MODEL_AAI + disData.aaiModelVersionId; + alert($scope.errorMsg); + }); + + } + + $scope.getTenants = function(globalCustomerId) { + $http.get(FIELD.ID.AAI_GET_TENTANTS + globalCustomerId) + .then(function successCallback(response) { + return response.data; + //$location.path("/instantiate"); + }, function errorCallback(response) { + //TODO + }); + } + + $scope.handleInitialResponseInventoryItems = function(response) { + + $scope.inventoryResponseItemList = response.data[FIELD.ID.INVENTORY_RESPONSE_ITEM]; // get data from json + console.log($scope.inventoryResponseItemList.toString()); + + $scope.displayData = []; + $scope.vnfs = []; + + $scope.counter = 100; + + $scope.subscriberName = ""; + // just look up the subscriber name in A&AI here... + AaiService.getSubscriberName($scope.globalCustomerId, function(response) { + $scope.subscriberName = response; + DataService.setSubscriberName($scope.subscriberName); + + angular.forEach($scope.inventoryResponseItemList, function(inventoryResponseItem, key) { + + $scope.inventoryResponseItem = inventoryResponseItem; + + $scope.service.instance = { + "name": $scope.inventoryResponseItem[FIELD.ID.SERVICE_INSTANCE][FIELD.ID.SERVICE_INSTANCE_NAME], + "serviceInstanceId": $scope.serviceInstanceId, + "serviceType": $scope.serviceType, + "globalCustomerId": $scope.globalCustomerId, + "subscriberName": $scope.subscriberName, + "id": $scope.serviceInstanceId, + "inputs": { + "a": { + "type": PARAMETER.STRING, + "description": FIELD.PROMPT.VAR_DESCRIPTION_A, + "default": FIELD.PROMPT.DEFAULT_A + }, + "b": { + "type": PARAMETER.STRING, + "description": FIELD.PROMPT.VAR_DESCRIPTION_B, + "default": FIELD.PROMPT.DEFAULT_B + }, + }, + "object": $scope.inventoryResponseItem[FIELD.ID.SERVICE_INSTANCE], + "vnfs": [], + "networks": [] + } + + if (inventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS] != null) { + + angular.forEach(inventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS][FIELD.ID.INVENTORY_RESPONSE_ITEM], function(subInventoryResponseItem, key) { + // i expect to find vnfs now + + if (subInventoryResponseItem[FIELD.ID.L3_NETWORK] != null) { + var l3NetworkObject = subInventoryResponseItem[FIELD.ID.L3_NETWORK]; + var l3Network = { "id": $scope.counter++, + "name": l3NetworkObject[FIELD.ID.NETWORK_NAME], + "itemType": FIELD.ID.L3_NETWORK, + "nodeId": l3NetworkObject[FIELD.ID.NETWORK_ID], + "nodeType": l3NetworkObject[FIELD.ID.NETWORK_TYPE], + "nodeStatus": l3NetworkObject[FIELD.ID.ORCHESTRATION_STATUS], + "object": l3NetworkObject, + "nodes": [], + "subnets": [] + }; + if (subInventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS] != null) { + //console.log ("subInventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS]="); + //console.log (JSON.stringify (subInventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS], null, 4 )); + angular.forEach(subInventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS][FIELD.ID.INVENTORY_RESPONSE_ITEM], function(subSubInventoryResponseItem, key) { + //console.log (JSON.stringify (subSubInventoryResponseItem, null, 4 )); + var subnet = {}; + var subnetObject; + if (subSubInventoryResponseItem[FIELD.ID.SUB_NET] != null) { + subnetObject = subSubInventoryResponseItem[FIELD.ID.SUB_NET]; + subnet = { + "subnet-id": subnetObject[FIELD.ID.SUBNET_ID], + "subnet-name": subnetObject[FIELD.ID.SUBNET_NAME], + "gateway-address": subnetObject[FIELD.ID.GATEWAY_ADDRESS], + "network-start-address": subnetObject[FIELD.ID.NETWORK_START_ADDRESS], + "cidr-mask": subnetObject[FIELD.ID.CIDR_MASK] + }; + l3Network.subnets.push(subnet); + } + }); + } + $scope.service.instance[FIELD.ID.NETWORKS].push(l3Network); + } + + if (subInventoryResponseItem[FIELD.ID.GENERIC_VNF] != null) { + var genericVnfObject = subInventoryResponseItem[FIELD.ID.GENERIC_VNF]; + + var genericVnf = { + "name": genericVnfObject[FIELD.ID.VNF_NAME], + "id": $scope.counter++, + "itemType": COMPONENT.VNF, + "nodeType": genericVnfObject[FIELD.ID.VNF_TYPE], + "nodeId": genericVnfObject[FIELD.ID.VNF_ID], + "nodeStatus": genericVnfObject[FIELD.ID.ORCHESTRATION_STATUS], + "object": genericVnfObject, + "vfModules": [], + "volumeGroups": [], + "availableVolumeGroups": [] + }; + $scope.service.instance[FIELD.ID.VNFS].push(genericVnf); + + // look for volume-groups + if (subInventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS] != null) { + angular.forEach(subInventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS][FIELD.ID.INVENTORY_RESPONSE_ITEM], function(vfmodules, key) { + + if (vfmodules[FIELD.ID.VOLUME_GROUP] != null) { + var volumeGroupObject = vfmodules[FIELD.ID.VOLUME_GROUP]; + var volumeGroup = { "id": $scope.counter++, + "name": volumeGroupObject[FIELD.ID.VOLUME_GROUP_NAME], + "itemType": FIELD.ID.VOLUME_GROUP, + "nodeId": volumeGroupObject[FIELD.ID.VOLUME_GROUP_ID], + "nodeType": volumeGroupObject[FIELD.ID.VNF_TYPE], + "nodeStatus": volumeGroupObject[FIELD.ID.ORCHESTRATION_STATUS], + "object": volumeGroupObject, + "nodes": [] + }; + genericVnf[FIELD.ID.VOLUMEGROUPS].push(volumeGroup); + genericVnf[FIELD.ID.AVAILABLEVOLUMEGROUPS].push(volumeGroup); + } + }); + } + // now we've loaded up the availableVolumeGroups, we can use it + if (subInventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS] != null) { + angular.forEach(subInventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS][FIELD.ID.INVENTORY_RESPONSE_ITEM], function(vfmodules, key) { + + if (vfmodules[FIELD.ID.VF_MODULE] != null) { + var vfModuleObject = vfmodules[FIELD.ID.VF_MODULE]; + var vfModule = { "id": $scope.counter++, + "name": vfModuleObject[FIELD.ID.VF_MODULE_NAME], + "itemType": FIELD.ID.VF_MODULE, + "nodeType": FIELD.ID.VF_MODULE, + "nodeStatus": vfModuleObject[FIELD.ID.ORCHESTRATION_STATUS], + "volumeGroups": [], + "object": vfModuleObject, + "networks": [] + }; + genericVnf[FIELD.ID.VF_MODULES].push(vfModule); + if (vfmodules[FIELD.ID.INVENTORY_RESPONSE_ITEMS] != null) { + angular.forEach(vfmodules[FIELD.ID.INVENTORY_RESPONSE_ITEMS][FIELD.ID.INVENTORY_RESPONSE_ITEM], function(networks, key) { + if (networks[FIELD.ID.L3_NETWORK] != null) { + var l3NetworkObject = networks[FIELD.ID.L3_NETWORK]; + var l3Network = { "id": $scope.counter++, + "name": l3NetworkObject[FIELD.ID.NETWORK_NAME], + "itemType": FIELD.ID.L3_NETWORK, + "nodeId": l3NetworkObject[FIELD.ID.NETWORK_ID], + "nodeType": l3NetworkObject[FIELD.ID.NETWORK_TYPE], + "nodeStatus": l3NetworkObject[FIELD.ID.ORCHESTRATION_STATUS], + "object": l3NetworkObject, + "nodes": [] + }; + vfModule[FIELD.ID.NETWORKS].push(l3Network); + } + if (networks[FIELD.ID.VOLUME_GROUP] != null) { + var volumeGroupObject = networks[FIELD.ID.VOLUME_GROUP]; + + var volumeGroup = { "id": $scope.counter++, + "name": volumeGroupObject[FIELD.ID.VOLUME_GROUP_NAME], + "itemType": FIELD.ID.VOLUME_GROUP, + "nodeId": volumeGroupObject[FIELD.ID.VOLUME_GROUP_ID], + "nodeType": volumeGroupObject[FIELD.ID.VNF_TYPE], + "nodeStatus": volumeGroupObject[FIELD.ID.ORCHESTRATION_STATUS], + "object": volumeGroupObject, + "nodes": [] + }; + var tmpVolGroup = []; + + angular.forEach(genericVnf[FIELD.ID.AVAILABLEVOLUMEGROUPS], function(avgroup, key) { + if (avgroup.name != volumeGroup.name) { + tmpVolGroup.push(avgroup); + } + }); + + genericVnf[FIELD.ID.AVAILABLEVOLUMEGROUPS] = tmpVolGroup; + + vfModule[FIELD.ID.VOLUMEGROUPS].push(volumeGroup); + } + + }); + } + } + }); + } + } + }); + } + }); + }); + } + + $scope.handleInitialResponse = function(response) { + try { + $scope.enableCloseButton(true); + $scope.updateLog(response); + if (response.data.status < 200 || response.data.status > 202) { + $scope.showError(FIELD.ERROR.MSO); + $scope.status = FIELD.ERROR.AAI_FETCHING_CUST_DATA + response.data.status; + + return; + } + + $scope.setProgress(100); // done + $scope.status = FIELD.STATUS.DONE; + $scope.isSpinnerVisible = false; + + $scope.customer = response.data.customer; // get data from json + + $scope.customerList = []; + + angular.forEach($scope.customer, function(subVal, subKey) { + var cust = { "globalCustomerId": subVal[FIELD.ID.GLOBAL_CUSTOMER_ID], "subscriberName": subVal[FIELD.ID.SUBNAME] }; + $scope.customerList.push(cust); + }); + + } catch (error) { + $scope.showContentError(error); + } + } + + $scope.autoGetSubs = function() { + /* + * Optionally comment in / out one of these method calls (or add a similar + * entry) to auto-invoke an entry when the test screen is redrawn. + */ + $scope.getSubs(); + + } + + $scope.updateLog = function(response) { +// $scope.log = UtilityService.getCurrentTime() + " HTTP Status: " + +// UtilityService.getHttpStatusText(response.data.status) + "\n" + +// angular.toJson(response.data.entity, true) + "\n\n" + $scope.log; +// UtilityService.checkUndefined("entity", response.data.entity); +// UtilityService.checkUndefined("status", response.data.status); + } + + $scope.handleServerError = function(response, status) { + $scope.enableCloseButton(true); + var message = UtilityService.getHttpErrorMessage(response); + if (message != ""){ + message = " (" + message + ")"; + } + $scope.showError(FIELD.ERROR.SYSTEM_ERROR + message); + } + + $scope.showContentError = function(message) { + // $log.debug(message); + console.log(message); + if (UtilityService.hasContents(message)) { + $scope.showError("System failure (" + message + ")"); + } else { + $scope.showError(FIELD.ERROR.SYSTEM_ERROR); + } + } + + $scope.showError = function(message) { + $scope.isSpinnerVisible = false; + $scope.isProgressVisible = false; + $scope.error = message; + $scope.status = FIELD.STATUS.ERROR; + } + + $scope.close = function() { + if ($scope.timer != undefined) { + $timeout.cancel($scope.timer); + } + $scope.isPopupVisible = false; + } + + + + /* + * Consider converting the progress bar mechanism, the disabled button handling + * and the following methods to generic Angular directive(s) and/or approach. + */ + + $scope.enableCloseButton = function(isEnabled) { + var selector = FIELD.STYLE.MSO_CTRL_BTN; + + $scope.isCloseEnabled = isEnabled; + + if (isEnabled) { + $(selector).addClass(FIELD.STYLE.BTN_PRIMARY).removeClass(FIELD.STYLE.BTN_INACTIVE).attr(FIELD.STYLE.BTN_TYPE, FIELD.STYLE.PRIMARY); + } else { + $(selector).removeClass(FIELD.STYLE.BTN_PRIMARY).addClass(FIELD.STYLE.BTN_INACTIVE).attr(FIELD.STYLE.BTN_TYPE, FIELD.STYLE.DISABLED); + } + } + + $scope.resetProgress = function() { + $scope.percentProgress = 0; + $scope.progressClass = FIELD.STYLE.PROGRESS_BAR_INFO; + } + + $scope.setProgress = function(percentProgress) { + percentProgress = parseInt(percentProgress); + if (percentProgress >= 100) { + $scope.progressClass = FIELD.STYLE.PROGRESS_BAR_SUCCESS; + } + + if (percentProgress < $scope.percentProgress) { + return; + } + + $scope.percentProgress = percentProgress; + $scope.progressWidth = {width: percentProgress + "%"}; + if (percentProgress >= 5) { + $scope.progressText = percentProgress + " %"; + } else { + // Hidden since color combination is barely visible when progress portion is narrow. + $scope.progressText = ""; + } + } + + $scope.reloadRoute = function() { + $route.reload(); + } + + $scope.prevPage = function() { + $scope.currentPage--; + } + + $scope.nextPage = function() { + $scope.currentPage++; + } + $scope.serviceInstanceses = [{"sinstance":FIELD.NAME.SERVICE_INSTANCE_Id},{"sinstance":FIELD.NAME.SERVICE_INSTANCE_NAME}] + $scope.getSubscriberDet = function(selectedCustomer,selectedserviceinstancetype,selectedServiceInstance){ + + var sintype =selectedserviceinstancetype; + if (selectedServiceInstance != "" && selectedServiceInstance != undefined) { + selectedServiceInstance.trim(); + + // check with A&AI + $http.get(COMPONENT.AAI_GET_SERVICE_INSTANCE_PATH + selectedServiceInstance+"/"+sintype + "?r=" + Math.random(), { + + },{ + timeout: $scope.responseTimeoutMsec + }).then(function(response) { + var notFound = true; + if (angular.isArray(response.data[FIELD.ID.RESULT_DATA])) { + var item = []; + var urlParts = []; + item = response.data[FIELD.ID.RESULT_DATA][0]; + var url = item[FIELD.ID.RESOURCE_LINK]; + var globalCustomerId = ""; + var serviceSubscription = ""; + // split it and find the customer Id and service-subscription + urlParts = url.split("/"); + if (urlParts[7] === FIELD.ID.CUSTOMER) { + globalCustomerId = urlParts[8]; + } + if (urlParts[10] === FIELD.ID.SERVICE_SUBSCRIPTION) { + serviceSubscription = urlParts[11]; + } + + if (globalCustomerId !== "") { + notFound = false; + window.location.href = COMPONENT.SELECTED_SERVICE_SUB_PATH + serviceSubscription + COMPONENT.SELECTEDSUBSCRIBER_SUB_PATH + globalCustomerId + COMPONENT.SELECTEDSERVICEINSTANCE_SUB_PATH + selectedServiceInstance; + } + } + if (notFound) { + alert(FIELD.ERROR.SERVICE_INST_DNE); + } + }); // add a failure callback... + } else if (selectedCustomer != null) { + window.location.href = COMPONENT.SELECTED_SUB_PATH + selectedCustomer; + } else { + alert(FIELD.ERROR.SELECT); + } + }; + }]).directive('restrictInput', function(){ + + return { + + restrict: 'A', + require: 'ngModel', + link: function($scope, element, attr, ctrl){ + ctrl.$parsers.unshift(function(viewValue){ + + var types = $scope.$eval(attr.restrictInput); + if(!types.regex && types.type){ + + switch(types.type){ + case 'Service Instance Name' : types.regex = '^[a-zA-Z0-9-_]*$'; break; + default: types.regex= ''; + } + } + var reg = new RegExp(types.regex); + if(reg.test(viewValue)){ + return viewValue; + } else { + var overrideValue = (reg.test(viewValue) ? viewValue : ''); + element.val(overrideValue); + return overrideValue; + } + }); + } + }; + + }); +appDS2.controller('TreeCtrl', ['$scope', function ($scope) { + $scope.remove = function (scope) { + scope.remove(); + }; + + $scope.toggle = function (scope) { + scope.toggle(); + }; + + $scope.moveLastToTheBeginning = function () { + var a = $scope.data.pop(); + $scope.data.splice(0, 0, a); + }; + + $scope.newSubItem = function (scope) { + var nodeData = scope.$modelValue; + nodeData.nodes.push({ + id: nodeData.id * 10 + nodeData.nodes.length, + title: nodeData.title + '.' + (nodeData.nodes.length + 1), + nodes: [] + }); + }; + + $scope.collapseAll = function () { + $scope.$broadcast(FIELD.ID.ANGULAR_UI_TREE_COLLAPSEALL); + }; + + $scope.expandAll = function () { + $scope.$broadcast(FIELD.ID.ANGULAR_UI_TREE_EXPANDALL); + }; + + +}]); + + + diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/creationDialogController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/creationDialogController.js new file mode 100755 index 000000000..6a1c14c5b --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/creationDialogController.js @@ -0,0 +1,163 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 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. + * ============LICENSE_END========================================================= + */ + +"use strict"; + +var creationDialogController = function( COMPONENT, FIELD, $scope, $http, $timeout, $log, + CreationService, UtilityService, DataService) { + + $scope.isDialogVisible = false; + $scope.summaryControl = {}; + $scope.userProvidedControl = {}; + + var callbackFunction = undefined; + var componentId = undefined; + + $scope.$on(COMPONENT.CREATE_COMPONENT, function(event, request) { + + $scope.isSpinnerVisible = true; + $scope.isErrorVisible = false; + $scope.isDataVisible = false; + $scope.isConfirmEnabled = false; + $scope.isDialogVisible = true; + $scope.popup.isVisible = true; + + callbackFunction = request.callbackFunction; + componentId = request.componentId; + CreationService.initializeComponent(request.componentId); + + CreationService.setHttpErrorHandler(function(response) { + showError(FIELD.ERROR.SYSTEM_FAILURE, UtilityService + .getHttpErrorMessage(response)); + }); + + $scope.componentName = CreationService.getComponentDisplayName(); + + CreationService.getParameters(handleGetParametersResponse); + + }); + + var handleGetParametersResponse = function(parameters) { + $scope.summaryControl.setList(parameters.summaryList); + $scope.userProvidedControl.setList(parameters.userProvidedList); + + $scope.isSpinnerVisible = false; + $scope.isDataVisible = true; + $scope.isConfirmEnabled = true; + }; + + var validateInstanceName = function(iname) { + var patt1 = /^([a-z])+([0-9a-z\-_\.]*)$/i; + + if ( iname == null ){ + return false; + } + if ( !iname.match(patt1) ) { + return false; + } + return true; + } + + $scope.userParameterChanged = function(id) { + CreationService.updateUserParameterList(id, $scope.userProvidedControl); + } + + $scope.confirm = function() { + + var requiredFields = $scope.userProvidedControl.getRequiredFields(); + if (requiredFields !== "") { + showError(FIELD.ERROR.MISSING_DATA, requiredFields); + return; + } + + var paramList = $scope.userProvidedControl.getList(); + var instanceName = ""; + + if ( DataService.getALaCarte() ) { + if ( paramList != null ) { + for (var i = 0; i < paramList.length; i++) { + if (paramList[i].id === FIELD.ID.INSTANCE_NAME) { + instanceName = paramList[i].value; + break; + } + } + } + var isValid = validateInstanceName (instanceName); + if ( isValid ) { + $scope.isErrorVisible = false; + } else { + showError(FIELD.ERROR.INVALID_INSTANCE_NAME + instanceName, + FIELD.ERROR.INSTANCE_NAME_VALIDATE); + return; + } + } + + var requestDetails = CreationService + .getMsoRequestDetails($scope.userProvidedControl.getList()); + + $scope.isDialogVisible = false; + + $scope.$broadcast(COMPONENT.MSO_CREATE_REQ, { + url : CreationService.getMsoUrl(), + requestDetails : requestDetails, + componentId: componentId, + callbackFunction : function(response) { + if (response.isSuccessful) { + $scope.popup.isVisible = false; + runCallback(response); + } else { + $scope.isDialogVisible = false; + $scope.popup.isVisible = false; + } + } + }); + } + + $scope.cancel = function() { + $scope.isDialogVisible = false; + $scope.popup.isVisible = false; + runCallback(false); + } + + var runCallback = function(response) { + if (angular.isFunction(callbackFunction)) { + callbackFunction({ + isSuccessful : response.isSuccessful, + control : $scope.userProvidedControl.getList(), + instanceId : response.instanceId + }); + } + } + + var showError = function(summary, details) { + var message = summary; + if (UtilityService.hasContents(details)) { + message += " (" + details + ")"; + } + $scope.isSpinnerVisible = false; + $scope.isErrorVisible = true; + $scope.error = message; + } + +} + +appDS2.controller("creationDialogController", [ "COMPONENT", "FIELD", "$scope", "$http", + "$timeout", "$log", "CreationService", "UtilityService", "DataService", + creationDialogController ]); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/deletionDialogController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/deletionDialogController.js new file mode 100755 index 000000000..137673d47 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/deletionDialogController.js @@ -0,0 +1,119 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 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. + * ============LICENSE_END========================================================= + */ + +"use strict"; + +var deletionDialogController = function( COMPONENT, FIELD, $scope, $http, $timeout, $log, + DeletionService, UtilityService) { + + $scope.isDialogVisible = false; + $scope.summaryControl = {}; + $scope.userProvidedControl = {}; + + var callbackFunction = undefined; + var componentId = undefined; + + $scope.$on(COMPONENT.DELETE_COMPONENT, function(event, request) { + + $scope.isDataVisible = false; + $scope.isSpinnerVisible = false; + $scope.isErrorVisible = false; + $scope.isDialogVisible = true; + $scope.popup.isVisible = true; + $scope.isConfirmEnabled = false; + + callbackFunction = request.callbackFunction; + componentId = request.componentId; + + DeletionService.initializeComponent(request.componentId); + + $scope.componentName = DeletionService.getComponentDisplayName(); + + $scope.summaryControl.setList(DeletionService.getSummaryList()); + + DeletionService.getParameters(handleGetParametersResponse); + + }); + + var handleGetParametersResponse = function(parameters, dontshow) { + $scope.summaryControl.setList(parameters.summaryList); + $scope.userProvidedControl.setList(parameters.userProvidedList); + + $scope.isSpinnerVisible = false; + if (dontshow) + $scope.isDataVisible = false; + else + $scope.isDataVisible = true; + $scope.isConfirmEnabled = true; + }; + + $scope.userParameterChanged = function(id) { + DeletionService.updateUserParameterList(id, $scope.userProvidedControl); + } + + $scope.confirm = function() { + + var requiredFields = $scope.userProvidedControl.getRequiredFields(); + if (requiredFields === "") { + $scope.isErrorVisible = false; + } else { + showError(FIELD.ERROR.MISSING_DATA, requiredFields); + return; + } + + + var requestDetails = DeletionService.getMsoRequestDetails($scope.userProvidedControl.getList()); + + $scope.isDialogVisible = false; + + $scope.$broadcast(COMPONENT.MSO_DELETE_REQ, { + url : DeletionService.getMsoUrl(), + requestDetails : requestDetails, + componentId: componentId, + callbackFunction : function(isSuccessful) { + if (isSuccessful) { + $scope.popup.isVisible = false; + runCallback(true); + } else { + $scope.isDialogVisible = true; + } + } + }); + + } + + $scope.cancel = function() { + $scope.isDialogVisible = false; + $scope.popup.isVisible = false; + runCallback(false); + } + + var runCallback = function(isSuccessful) { + if (angular.isFunction(callbackFunction)) { + callbackFunction({ + isSuccessful : isSuccessful + }); + } + } +} + +appDS2.controller("deletionDialogController", [ "COMPONENT", "FIELD", "$scope", "$http", + "$timeout", "$log", "DeletionService", "UtilityService", + deletionDialogController ]); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/detailsDialogController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/detailsDialogController.js new file mode 100755 index 000000000..ddb1ac1d5 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/detailsDialogController.js @@ -0,0 +1,84 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 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. + * ============LICENSE_END========================================================= + */ + +"use strict"; + +var detailsDialogController = function($scope, $http, $timeout, $log, + MsoService, DetailsService, UtilityService, COMPONENT, FIELD) { + + $scope.isDialogVisible = false; + $scope.summaryControl = {}; + $scope.detailsControl = {}; + + $scope.$on(COMPONENT.SHOW_COMPONENT_DETAILS, function(event, request) { + + $scope.log = ""; + $scope.isSpinnerVisible = true; + $scope.isErrorVisible = false; + $scope.isDialogVisible = true; + $scope.popup.isVisible = true; + + DetailsService.initializeComponent(request.componentId); + + $scope.componentName = DetailsService.getComponentDisplayName(); + + $scope.summaryControl.setList(DetailsService.getSummaryList()); + + $scope.detailsControl.setList(DetailsService.getDetailsList()); + + UtilityService.setHttpErrorHandler(function(response) { + showError(FIELD.ERROR.SYSTEM_FAILURE, UtilityService + .getHttpErrorMessage(response)); + }); + + MsoService.getOrchestrationRequests( + DetailsService.getMsoFilterString(), handleGetResponse); + }); + + var handleGetResponse = function(response) { + $scope.isSpinnerVisible = false; + try { + $scope.log = MsoService + .getFormattedGetOrchestrationRequestsResponse(response); + } catch (error) { + $scope.log = MsoService.getFormattedCommonResponse(response); + MsoService.showResponseContentError(error, showError); + } + } + + $scope.close = function() { + $scope.isDialogVisible = false; + $scope.popup.isVisible = false; + } + + var showError = function(summary, details) { + var message = summary; + if (UtilityService.hasContents(details)) { + message += " (" + details + ")"; + } + $scope.isSpinnerVisible = false; + $scope.isErrorVisible = true; + $scope.error = message; + } +} + +appDS2.controller("detailsDialogController", [ "$scope", "$http", "$timeout", + "$log", "MsoService", "DetailsService", "UtilityService", "COMPONENT", "FIELD", + detailsDialogController ]); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitController.js new file mode 100755 index 000000000..65fac289a --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitController.js @@ -0,0 +1,300 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 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. + * ============LICENSE_END========================================================= + */ + +"use strict"; + +/* + * "msoCommitController.js" provides controller code to commit MSO requests. + * + * HIGHLIGHTS: + * + * Parent HTML/JSP code is expected to include "msoCommit.htm" (via + * "ng-include") and this file (via " +
+ +
+
+ + {{status}} +
+ +
{{errorMsg}}
{{errorDetails | json}}
+ +

Search Existing Service Instances

+
+ Please search by the Subscriber name or enter Service Instance Id or Service Instance Name below: 

+ + + + + + + + + + + + + + + + +
+
+ +
+
+
+ +    +
+
+
+ +
+
+
+ +
+
+ +
+ +
+
+ + +
+ +
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubscriberList.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubscriberList.htm new file mode 100755 index 000000000..6a911be16 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubscriberList.htm @@ -0,0 +1,67 @@ + + + + + +
+ +
+
+ + {{status}} +
+ +
{{errorMsg}}
{{errorDetails | json}}
+ +

Create New Service Instance

+ + + + + + + + + + + +
+
+ +
+
+
+ +    +
+
+ +
+ +    +
+
+ + +
+ +
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiServiceTypes.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiServiceTypes.htm new file mode 100755 index 000000000..6711bfaf7 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiServiceTypes.htm @@ -0,0 +1,80 @@ + + + + + +
+ +
+
+ + {{status}} +
+
{{errorMsg}}
{{errorDetails | json}}
+

Create New Service Instance

+ + + + + + + + + + + + + + + + + +
+
+ +
+
+
+ + +
+
+
+ +
+
+
+ +    +
+
+ +
+ +    +
+
+ + +
+ +
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiSubDetails.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiSubDetails.htm new file mode 100755 index 000000000..2426f152f --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiSubDetails.htm @@ -0,0 +1,95 @@ + + +
+ +
+
+ + + {{status}} +
+ +
{{errorMsg}}
{{errorDetails | json}}
+ +

Subscriber Details for {{selectedSubscriber}} ({{selectedSubscriberName}})

+
+
+ Filter: + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
View/EditGlobal Customer IDSubscriber NameService TypeService Instance NameService Instance ID
+ +
+ + + + + + +
+ + + Jump to page: + + Results per page: 10 + | 25 + | 50 + + +
+ + +
+ +
+ + +
+ +
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiSubViewEdit.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiSubViewEdit.htm new file mode 100755 index 000000000..a7ea8336f --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiSubViewEdit.htm @@ -0,0 +1,147 @@ + + +
+ +
+
+
+
+
+ +
+
+ + {{status}} +
+ +

+
VIEW/EDIT SERVICE INSTANCE
+

+ + +
+ + +
+ + + + + + + + + +
SUBSCRIBER: + {{globalCustomerId}}SERVICE TYPE: + {{serviceType}}SERVICE INSTANCE + ID: {{serviceInstanceId}}
Service Instance + Name: {{serviceInstanceName || "Not defined"}} +
+ +
+ + +
+ +
+ + EXISTING +
+
+
+
    +
  1. +
+
+
+ +
+ AVAILABLE + + + +
+
+
+
    +
  1. +
+
+
+
+
+
+ + + +
+  				{{inventoryResponseItem | json}}
+			
+
+
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/createInstanceServiceModels.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/createInstanceServiceModels.htm new file mode 100755 index 000000000..a78b95eed --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/createInstanceServiceModels.htm @@ -0,0 +1,125 @@ + + + +
+
+
+
+ + + + + + Error: {{status}} + +

+ + + + + + + + + + + + + + + +
+
+ +
+
+
+ + +
+
+
+ +
+
+
+ + +
+
+ +
+ Filter: + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ActionUUIDInvariant UUIDNameVersionCategoryDistribution StatusLast Updated ByTosca Model
+ + + + + + +
+ + + Jump to page: + + Results per page: 10 + | 25 + | 50 + + +
+ +
+
+ diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/creationDialog.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/creationDialog.htm new file mode 100755 index 000000000..0ac74a9a5 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/creationDialog.htm @@ -0,0 +1,64 @@ + + +
+ +
+
+ +

Create {{componentName}} -- {{createType}}

+
+ +
+ {{error}} +
+ +
+ +

+ User Provided Data ( indicates required field) +

+ + +
+

+ Enter Data and Confirm to
Create {{componentName}} +

+

+ Cancel to Return to Previous Page.
Data entered + will be lost +

+
+ +
+
+ + +
+
+ +
+ +
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/deletionDialog.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/deletionDialog.htm new file mode 100755 index 000000000..b4b93166b --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/deletionDialog.htm @@ -0,0 +1,70 @@ + + +
+ +
+
+ +

Delete {{componentName}}

+
+ +
+ {{error}} +
+ + + +
+ +

+ User Provided Data ( indicates required field) +

+ + +
+

+ Enter Data and Confirm to
Delete {{componentName}} +

+

+ Cancel to Return to Previous Page.
Data entered + will be lost +

+
+
+ +
+ + + +
+
+ +
+ +
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/detailsDialog.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/detailsDialog.htm new file mode 100755 index 000000000..0e72e772c --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/detailsDialog.htm @@ -0,0 +1,48 @@ + + +
+ +
+ +

Service Instance Details

+
+ +
+ {{error}} +
+ + + +

{{componentName}} Details

+ + + +

Instantiation Transactions

+ +
{{log}}
+ +
+ +
+ +
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/instantiate.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/instantiate.htm new file mode 100755 index 000000000..e4bb67ff7 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/instantiate.htm @@ -0,0 +1,248 @@ + + +
+ +
+
+
+
+
+
+
+
+ + {{status}} +
+ +
{{errorMsg}}
{{errorDetails | json}}
+ +

View/Edit Service Instance

+ + +
+ +
+ + + + + + + + + +
SUBSCRIBER: + {{service.instance.subscriberName}}SERVICE TYPE: + {{service.instance.serviceType}}SERVICE INSTANCE + ID: {{service.instance.serviceInstanceId}}
Service Instance + Name: {{service.instance.name || "Not defined"}} +
+ +
+ +
+ +
    +
  1. +
    + + + + SERVICE INSTANCE: {{aService.instance.name}} + + + +
    + + +
    + + +
    + + + +
    + + + +
    +
      +
    1. +
      + + + + VNF: {{vnf.name}} | TYPE: {{vnf.nodeType}} | ORCH STATUS: {{vnf.nodeStatus}} + + + + +
      + + + +
      + + +
      + + + + +
      + +
      + + + +
      + +
      + + + + +
      + + + + + +
      +
        +
      1. +
        + + + + VFMODULE: {{vfModule.name}} | TYPE: {{vfModule.nodeType}} | ORCH STATUS: {{vfModule.nodeStatus}} + + + + +
        + +
        + + + +
        +
          +
        1. +
          + VOLUME GROUP: {{volumeGroup.name}} | TYPE: {{volumeGroup.nodeType}} | ORCH STATUS: {{volumeGroup.nodeStatus}} + + + + +
          +
        2. +
        +
      2. +
      +
        +
      1. +
        + VOLUME GROUP: {{volumeGroup.name}} | TYPE: {{volumeGroup.nodeType}} | ORCH STATUS: {{volumeGroup.nodeStatus}} + + + + + + +
        +
      2. +
      +
    2. +
    +
      +
    1. +
      + NETWORK: {{network.name}} | TYPE: {{network.nodeType}} | ORCH STATUS: {{network.nodeStatus}} + + + + + + + + +
      +
    2. +
    +
  2. +
+
+
+
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/msoCommit.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/msoCommit.htm new file mode 100755 index 000000000..e3f415c45 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/msoCommit.htm @@ -0,0 +1,47 @@ + + +
+ +
+ {{status}} +
+ + + +
{{log}}
+ +
+ +
+
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/popupWindow.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/popupWindow.htm new file mode 100755 index 000000000..b932f25d9 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/popupWindow.htm @@ -0,0 +1,30 @@ + + +
+ + + + +
+
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceModels.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceModels.htm new file mode 100755 index 000000000..c0a8ee54e --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceModels.htm @@ -0,0 +1,91 @@ + + + +
+
+
+
+ + + + + + Error: {{status}} + +

+ +
+ Filter: + +
+ +

Browse SDC Service Models

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ActionUUIDInvariant UUIDNameVersionCategoryDistribution StatusLast Updated ByTosca Model
+ + + + + + +
+ + + Jump to page: + + Results per page: 10 + | 25 + | 50 + + +
+ +
+
+ diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/statusDialog.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/statusDialog.htm new file mode 100755 index 000000000..914516b89 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/statusDialog.htm @@ -0,0 +1,66 @@ + + +
+ +
+ +

VNF Update Prov Status

+
+ +
+ {{error}} +
+ +
+

{{success}}

+
+ + + +

{{componentName}} Status

+ + + +

+ Modify Prov_Status: ( indicates required field) +

+ + +
+

+ Select Target Prov Status and Submit to
to Change the Prov Status of {{componentName}} +

+

+ Close to Return to Previous Page.
+

+
+ +
+ + +
+ +
diff --git a/vid-app-common/src/main/webapp/app/vid/styles/aaiGetSubs.css b/vid-app-common/src/main/webapp/app/vid/styles/aaiGetSubs.css new file mode 100755 index 000000000..feabda8ed --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/aaiGetSubs.css @@ -0,0 +1,62 @@ +div[ng-controller=aaiSubscriberController] .popupContents { + text-align: left; +} + +div[ng-controller=aaiSubscriberController] .statusLine { + vertical-align: center; +} + +div[ng-controller=aaiSubscriberController] .statusLine img { + width: 20px; + margin: 10px; +} + +div[ng-controller=aaiSubscriberController] .status { + margin-left: 5px; +} + +div[ng-controller=aaiSubscriberController] .feedback { + height: 35px; + vertical-align: center; +} + +div[ng-controller=aaiSubscriberController] .progress { + margin: 0px 10px; + font-weight: bold; +} + +div[ng-controller=aaiSubscriberController] .error { + width: 630px; + font-weight: bold; + font-size: 16px; + color: red; + margin: 0px 10px 0px 45px; +} + +div[ng-controller=aaiSubscriberController] .error img { + width: 25px; + margin: 0px 10px; +} + +div[ng-controller=aaiSubscriberController] .buttonRow { + text-align: center; + margin-bottom: 10px; +} + +div[ng-controller=aaiSubscriberController] .log { + width: 700px; + height: 500px; + border: solid black 1px; + text-align: left !important; + margin: 10px; + padding: 10px; + overflow: auto; +} + +div[ng-controller=aaiSubscriberController] .aaiHidden { + visibility: hidden; +} + +div[ng-controller=aaiSubscriberController] .aaiVisible { + visibility: visible; +} \ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/aaiSubDetails.css b/vid-app-common/src/main/webapp/app/vid/styles/aaiSubDetails.css new file mode 100755 index 000000000..feabda8ed --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/aaiSubDetails.css @@ -0,0 +1,62 @@ +div[ng-controller=aaiSubscriberController] .popupContents { + text-align: left; +} + +div[ng-controller=aaiSubscriberController] .statusLine { + vertical-align: center; +} + +div[ng-controller=aaiSubscriberController] .statusLine img { + width: 20px; + margin: 10px; +} + +div[ng-controller=aaiSubscriberController] .status { + margin-left: 5px; +} + +div[ng-controller=aaiSubscriberController] .feedback { + height: 35px; + vertical-align: center; +} + +div[ng-controller=aaiSubscriberController] .progress { + margin: 0px 10px; + font-weight: bold; +} + +div[ng-controller=aaiSubscriberController] .error { + width: 630px; + font-weight: bold; + font-size: 16px; + color: red; + margin: 0px 10px 0px 45px; +} + +div[ng-controller=aaiSubscriberController] .error img { + width: 25px; + margin: 0px 10px; +} + +div[ng-controller=aaiSubscriberController] .buttonRow { + text-align: center; + margin-bottom: 10px; +} + +div[ng-controller=aaiSubscriberController] .log { + width: 700px; + height: 500px; + border: solid black 1px; + text-align: left !important; + margin: 10px; + padding: 10px; + overflow: auto; +} + +div[ng-controller=aaiSubscriberController] .aaiHidden { + visibility: hidden; +} + +div[ng-controller=aaiSubscriberController] .aaiVisible { + visibility: visible; +} \ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/aaiSubViewEdit.css b/vid-app-common/src/main/webapp/app/vid/styles/aaiSubViewEdit.css new file mode 100755 index 000000000..feabda8ed --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/aaiSubViewEdit.css @@ -0,0 +1,62 @@ +div[ng-controller=aaiSubscriberController] .popupContents { + text-align: left; +} + +div[ng-controller=aaiSubscriberController] .statusLine { + vertical-align: center; +} + +div[ng-controller=aaiSubscriberController] .statusLine img { + width: 20px; + margin: 10px; +} + +div[ng-controller=aaiSubscriberController] .status { + margin-left: 5px; +} + +div[ng-controller=aaiSubscriberController] .feedback { + height: 35px; + vertical-align: center; +} + +div[ng-controller=aaiSubscriberController] .progress { + margin: 0px 10px; + font-weight: bold; +} + +div[ng-controller=aaiSubscriberController] .error { + width: 630px; + font-weight: bold; + font-size: 16px; + color: red; + margin: 0px 10px 0px 45px; +} + +div[ng-controller=aaiSubscriberController] .error img { + width: 25px; + margin: 0px 10px; +} + +div[ng-controller=aaiSubscriberController] .buttonRow { + text-align: center; + margin-bottom: 10px; +} + +div[ng-controller=aaiSubscriberController] .log { + width: 700px; + height: 500px; + border: solid black 1px; + text-align: left !important; + margin: 10px; + padding: 10px; + overflow: auto; +} + +div[ng-controller=aaiSubscriberController] .aaiHidden { + visibility: hidden; +} + +div[ng-controller=aaiSubscriberController] .aaiVisible { + visibility: visible; +} \ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/angular-ui-tree.css b/vid-app-common/src/main/webapp/app/vid/styles/angular-ui-tree.css new file mode 100755 index 000000000..8a0ea7873 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/angular-ui-tree.css @@ -0,0 +1,61 @@ +.angular-ui-tree { +} + +.angular-ui-tree-empty { + border: 1px dashed #bbb; + min-height: 100px; + background-color: #e5e5e5; + background-image: -webkit-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff), -webkit-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff); + background-image: -moz-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff), -moz-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff); + background-image: linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff), linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff); + background-size: 60px 60px; + background-position: 0 0, 30px 30px; + pointer-events: none; +} + +.angular-ui-tree-nodes { + position: relative; + margin: 0; + padding: 0; + list-style: none; +} + +.angular-ui-tree-nodes .angular-ui-tree-nodes { + padding-left: 20px; +} + +.angular-ui-tree-node, .angular-ui-tree-placeholder { + position: relative; + margin: 0; + padding: 0; + min-height: 20px; + line-height: 20px; +} + +.angular-ui-tree-hidden { + display: none; +} + +.angular-ui-tree-placeholder { + margin: 5px 0; + padding: 0; + min-height: 30px; +} + +.angular-ui-tree-handle { + cursor: move; + text-decoration: none; + font-weight: bold; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + min-height: 20px; + line-height: 20px; +} + +.angular-ui-tree-drag { + position: absolute; + pointer-events: none; + z-index: 999; + opacity: .8; +} diff --git a/vid-app-common/src/main/webapp/app/vid/styles/dialogs.css b/vid-app-common/src/main/webapp/app/vid/styles/dialogs.css new file mode 100755 index 000000000..f199aaa0d --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/dialogs.css @@ -0,0 +1,133 @@ +/* + * Common style sheet for the pop-up dialogs. + */ + +/* + * Common style settings ... + */ +.popupContents .titleLine img { + float: left; + margin: 5px; + width: 20px; +} + +.popupContents .titleLine>h3 { + display: inline-block; + padding-right: 40px; +} + +.popupContents .requiredIndicator { + width: 14px; + padding-bottom: 5px; +} + +.popupContents div[control=summaryControl] { + display: inline-block; + width: 600px; + margin: 0px 10px 10px 10px; +} + +.popupContents div[control=detailsControl], .popupContents div[control=userProvidedControl] + { + display: inline-block; + border: solid black 1px; + margin: 10px; + padding: 10px; + max-height: 300px; + width: 600px; + overflow: auto; +} + +.popupContents .prompt { + margin: 10px; +} + +.popupContents .prompt p { + margin: 5px; +} + +.popupContents .prompt span { + font-weight: bold; +} + +.popupContents .statusLine { + vertical-align: center; +} + +.popupContents .statusLine img { + width: 20px; + margin: 10px; +} + +.popupContents .status { + margin-left: 5px; +} + +.popupContents .feedback { + height: 35px; + vertical-align: center; +} + +.popupContents .progress { + margin: 0px 10px; +} + +.popupContents .error { + width: 630px; + text-align: left; + font-weight: bold; + font-size: 16px; + color: red; + margin: 0px 10px 0px 45px; + font-weight: bold; +} + +.popupContents .error img { + width: 25px; + margin: 0px 10px; +} + +.popupContents .buttonRow { + text-align: center; + margin-bottom: 10px; +} + +.popupContents .log { + width: 700px; + height: 500px; + border: solid black 1px; + text-align: left !important; + margin: 10px; + padding: 10px; + overflow: auto; +} + +::-webkit-input-placeholder { + text-align: center; +} + +::-moz-placeholder { + text-align: center; +} + +:-ms-input-placeholder { + text-align: center; +} + +/* + * Styling for specific screens ... + */ +div[ng-controller=detailsDialogController] .log { + height: 200px; +} + +/* + * Styling for specific screens ... + */ +div[ng-controller=statusDialogController] .log { + height: 200px; +} + +div[ng-controller=msoCommitController] { + text-align: left; +} \ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/dummy.txt b/vid-app-common/src/main/webapp/app/vid/styles/dummy.txt new file mode 100755 index 000000000..e69de29bb diff --git a/vid-app-common/src/main/webapp/app/vid/styles/instantiate.css b/vid-app-common/src/main/webapp/app/vid/styles/instantiate.css new file mode 100755 index 000000000..13e2cf0a5 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/instantiate.css @@ -0,0 +1,62 @@ +div[ng-controller=InstantiationController] .popupContents { + text-align: left; +} + +div[ng-controller=InstantiationController] .statusLine { + vertical-align: center; +} + +div[ng-controller=InstantiationController] .statusLine img { + width: 20px; + margin: 10px; +} + +div[ng-controller=InstantiationController] .status { + margin-left: 5px; +} + +div[ng-controller=InstantiationController] .feedback { + height: 35px; + vertical-align: center; +} + +div[ng-controller=InstantiationController] .progress { + margin: 0px 10px; + font-weight: bold; +} + +div[ng-controller=InstantiationController] .error { + width: 630px; + font-weight: bold; + font-size: 16px; + color: red; + margin: 0px 10px 0px 45px; +} + +div[ng-controller=InstantiationController] .error img { + width: 25px; + margin: 0px 10px; +} + +div[ng-controller=InstantiationController] .buttonRow { + text-align: center; + margin-bottom: 10px; +} + +div[ng-controller=InstantiationController] .log { + width: 700px; + height: 500px; + border: solid black 1px; + text-align: left !important; + margin: 10px; + padding: 10px; + overflow: auto; +} + +div[ng-controller=InstantiationController] .aaiHidden { + visibility: hidden; +} + +div[ng-controller=InstantiationController] .aaiVisible { + visibility: visible; +} \ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/serviceModels.css b/vid-app-common/src/main/webapp/app/vid/styles/serviceModels.css new file mode 100755 index 000000000..0a642993e --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/serviceModels.css @@ -0,0 +1,70 @@ +div[ng-controller=ServiceModelController] .popupContents { + text-align: left; +} + +div[ng-controller=ServiceModelController] .statusLine { + vertical-align: center; +} + +div[ng-controller=ServiceModelController] .statusLine img { + width: 20px; + margin: 10px; +} + +div[ng-controller=ServiceModelController] .status { + margin-left: 5px; +} + +div[ng-controller=ServiceModelController] .feedback { + height: 35px; + vertical-align: center; +} + +div[ng-controller=ServiceModelController] .progress { + margin: 0px 10px; + font-weight: bold; +} + +div[ng-controller=ServiceModelController] .error { + width: 630px; + font-weight: bold; + font-size: 16px; + color: red; + margin: 0px 10px 0px 45px; +} + +div[ng-controller=ServiceModelController] .error img { + width: 25px; + margin: 0px 10px; +} + +div[ng-controller=ServiceModelController] .buttonRow { + text-align: center; + margin-bottom: 10px; +} + +div[ng-controller=ServiceModelController] .log { + width: 700px; + height: 500px; + border: solid black 1px; + text-align: left !important; + margin: 10px; + padding: 10px; + overflow: auto; +} + +div[ng-controller=ServiceModelController] .smcHidden { + visibility: hidden; +} + +div[ng-controller=ServiceModelController] .smcVisible { + visibility: visible; +} + +div[ng-controller=ServiceModelController] .progHidden { + visibility: hidden; +} + +div[ng-controller=ServiceModelController] .progVisible { + visibility: visible; +} \ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/subscriberSearch.css b/vid-app-common/src/main/webapp/app/vid/styles/subscriberSearch.css new file mode 100755 index 000000000..461de01a1 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/subscriberSearch.css @@ -0,0 +1,8 @@ +div[ng-controller=aaiSubscriberSearchController] button { + width: 200px; + margin: 3px; +} + +h3 { + margin-bottom: 5px; +} diff --git a/vid-app-common/src/main/webapp/app/vid/styles/vidTree.css b/vid-app-common/src/main/webapp/app/vid/styles/vidTree.css new file mode 100755 index 000000000..1aec73d81 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/vidTree.css @@ -0,0 +1,67 @@ + +.btn { + margin-right: 8px; +} + +.angular-ui-tree-handle { + background: #f8faff; + border: 1px solid #dae2ea; + color: #7c9eb2; + padding: 10px 10px; +} + +.angular-ui-tree-handle:hover { + color: #438eb9; + background: #f4f6f7; + border-color: #dce2e8; +} + +.angular-ui-tree-placeholder { + background: #f0f9ff; + border: 2px dashed #bed2db; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +tr.angular-ui-tree-empty { + height:100px +} + +.group-title { + background-color: #687074 !important; + color: #FFF !important; +} + + +/* --- Tree --- */ +.tree-node { + border: 1px solid #dae2ea; + background: #f8faff; + color: #7c9eb2; +} + +.nodrop { + background-color: #f2dede; +} + +.tree-node-content { + margin: 10px; +} +.tree-handle { + padding: 10px; + background: #428bca; + color: #FFF; + margin-right: 10px; +} + +.angular-ui-tree-handle:hover { +} + +.angular-ui-tree-placeholder { + background: #f0f9ff; + border: 2px dashed #bed2db; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} \ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/test/testAaiData.js b/vid-app-common/src/main/webapp/app/vid/test/testAaiData.js new file mode 100755 index 000000000..95dd158ff --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/test/testAaiData.js @@ -0,0 +1,254 @@ +var exampleServiceModelInfo = { + modelInvariantId : "SERVICE_INVARIANT_ID_c99-b43e0d88a9a1", + modelNameVersionId : "SERVICE_NAME_VERSION_ID-4d54-8548-5d0ed23e962b", + modelName : "SERVICE_NAME_DE220127", + modelVersion : "SERVICE_VERSION_0.1" +}; + +var exampleVnfModelInfo = { + modelInvariantId : "VNF_INVARIANT_ID_c99-b43e0d88a9a1", + modelNameVersionId : "VNF_NAME_VERSION_ID-4d54-8548-5d0ed23e962b", + modelName : "VNF_NAME_DE220127", + modelVersion : "VNF_VERSION_0.1" +}; + +var exampleVfModuleModelInfo = { + modelInvariantId : "VF_MODULE_INVARIANT_ID_c99-b43e0d88a9a1", + modelNameVersionId : "VF_MODULE_NAME_VERSION_ID-4d54-8548-5d0ed23e962b", + modelName : "VF_MODULE_NAME_DE220127", + modelVersion : "VF_MODULE_VERSION_0.1" +}; + +var exampleVolumeGroupModelInfo = { + modelInvariantId : "VOLUME_GROUP_INVARIANT_ID_c99-b43e0d88a9a1", + modelNameVersionId : "VOLUME_GROUP_NAME_VERSION_ID-4d54-8548-5d0ed23e962b", + modelName : "VOLUME_GROUP_NAME_DE220127", + modelVersion : "VOLUME_GROUP_VERSION_0.1" +}; + +var exampleAvailableVolumeGroupList = [ "Volume Group Alpha", + "Volume Group Baker", "Volume Group Charlie" ]; + +var exampleNetworkModelInfo = { + modelInvariantId : "NETWORK_INVARIANT_ID_c99-b43e0d88a9a1", + modelNameVersionId : "NETWORK_NAME_VERSION_ID-4d54-8548-5d0ed23e962b", + modelName : "NETWORK_NAME_DE220127", + modelVersion : "NETWORK_VERSION_0.1" +}; + +var exampleCloudRegionTenantList = [ { + cloudRegionId : "LEGACYREGION", + tenantId : "ebe382f38e414b4dbf45b408c7e5bf9f", + tenantName : "vMOG-AKRON-123" +}, { + cloudRegionId : "LEGACYREGION", + tenantId : "abcdefhi38e414b4dbf45b408c7e5bf9f", + tenantName : "tenant 2" +}, { + cloudRegionId : "LEGACYREGION", + tenantId : "rstuvwzyx38e414b4dbf45b408c7e5bf9f", + tenantName : "tenant 3" +}, { + cloudRegionId : "cloudR2", + tenantId : "jklmnop38e414b4dbf45b408c7e5bf9f", + tenantName : "tenant4" +}, { + cloudRegionId : "cloudR2", + tenantId : "qurstuv38e414b4dbf45b408c7e5bf9f", + tenantName : "tenant 5" +}, { + cloudRegionId : "cloudR3", + tenantId : "zyxw38e414b4dbf45b408c7e5bf9f", + tenantName : "tenant 6" +} ]; + +var exampleServiceIdList = [ { + id : "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + description : "Mobility" +}, { + id : "e433710f-9217-458d-a79d-1c7aff376d89", + description : "VIRTUAL USP" +}, { + id : "c7611ebe-c324-48f1-8085-94aef0c6ef3d", + description : "HOSTED COMMUNICATIONS" +} ]; + +var exampleServiceItem = { + "generic-service" : { + "service-id" : "415d4d6c-19e8-44ed-bd28-28d41c5b5185", + "service-name" : "ZRDM1MMSC01", + "service-type" : "vMMSC Svc Jul 12/vMMSC VOLUME VF new Jul 12 13", + "service-id" : "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "orchestration-status" : "active", + "in-maint" : false, + "is-closed-loop-disabled" : false, + "resource-version" : "1469558690", + "persona-model-id" : "1fe5c0e1-7ae8-4a3b-bf06-e64b9fa7e7c9", + "persona-model-version" : "1.0" + } +}; + +var exampleVfModuleItem = { + "generic-vfModule" : { + "vfModule-id" : "415d4d6c-19e8-44ed-bd28-28d41c5b5185", + "vfModule-name" : "ZRDM1MMSC01", + "vfModule-type" : "vMMSC Svc Jul 12/vMMSC VOLUME VF new Jul 12 13", + "vfModule-id" : "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "orchestration-status" : "active", + "in-maint" : false, + "is-closed-loop-disabled" : false, + "resource-version" : "1469558690", + "persona-model-id" : "1fe5c0e1-7ae8-4a3b-bf06-e64b9fa7e7c9", + "persona-model-version" : "1.0" + } +}; + +var exampleVolumeGroupItem = { + "generic-volumeGroup" : { + "volumeGroup-id" : "415d4d6c-19e8-44ed-bd28-28d41c5b5185", + "volumeGroup-name" : "ZRDM1MMSC01", + "volumeGroup-type" : "vMMSC Svc Jul 12/vMMSC VOLUME VF new Jul 12 13", + "volumeGroup-id" : "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "orchestration-status" : "active", + "in-maint" : false, + "is-closed-loop-disabled" : false, + "resource-version" : "1469558690", + "persona-model-id" : "1fe5c0e1-7ae8-4a3b-bf06-e64b9fa7e7c9", + "persona-model-version" : "1.0" + } +}; + +var exampleNetworkItem = { + "generic-network" : { + "network-id" : "415d4d6c-19e8-44ed-bd28-28d41c5b5185", + "network-name" : "ZRDM1MMSC01", + "network-type" : "vMMSC Svc Jul 12/vMMSC VOLUME VF new Jul 12 13", + "network-id" : "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "orchestration-status" : "active", + "in-maint" : false, + "is-closed-loop-disabled" : false, + "resource-version" : "1469558690", + "persona-model-id" : "1fe5c0e1-7ae8-4a3b-bf06-e64b9fa7e7c9", + "persona-model-version" : "1.0" + } +}; + +/* + * Sample query provided by Jimmy on 8/11/16. + */ + +var exampleAaiResult = { + "service-instance" : { + "service-instance-id" : "mmsc-test-service-instance", + "resource-version" : "1470921501" + }, + "extra-properties" : {}, + "inventory-response-items" : { + "inventory-response-item" : [ { + "generic-vnf" : { + "vnf-id" : "415d4d6c-19e8-44ed-bd28-28d41c5b5185", + "vnf-name" : "ZRDM1MMSC01", + "vnf-type" : "vMMSC Svc Jul 12/vMMSC VOLUME VF new Jul 12 13", + "service-id" : "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "orchestration-status" : "active", + "in-maint" : false, + "is-closed-loop-disabled" : false, + "resource-version" : "1469558690", + "persona-model-id" : "1fe5c0e1-7ae8-4a3b-bf06-e64b9fa7e7c9", + "persona-model-version" : "1.0" + }, + "extra-properties" : {}, + "inventory-response-items" : { + "inventory-response-item" : [ { + "vf-module" : { + "vf-module-id" : "4dd25057-0b2b-4255-b9cd-669443c9b470", + "vf-module-name" : "ZRDM1MMSC01_base", + "heat-stack-id" : "ZRDM1MMSC01_base/6261554c-6c34-4604-b91c-68afd148a096", + "orchestration-status" : "active", + "is-base-vf-module" : true, + "resource-version" : "1469559159", + "persona-model-id" : "6e3b9ac7-cb21-4f39-99ba-f248ba2a597a", + "persona-model-version" : "1" + }, + "extra-properties" : {}, + "inventory-response-items" : { + "inventory-response-item" : [ + { + "l3-network" : { + "network-id" : "b13635a1-5ab8-4dee-9598-768a83eea099", + "network-name" : "MMS-24413-LAB-vMMSC-01_int_eca_mgmt_net_1", + "network-type" : "CONTRAIL_BASIC", + "network-role" : "int_eca_mgmt", + "network-technology" : "contrail", + "neutron-network-id" : "07919187-754f-49c2-abb3-9888cfd8ec7d", + "is-bound-to-vpn" : false, + "service-id" : "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "network-role-instance" : 0, + "resource-version" : "1469558694", + "orchestration-status" : "active", + "heat-stack-id" : "MMS-24413-LAB-vMMSC-01_int_eca_mgmt_net_1/8d34d139-c95f-4d80-86df-d7d13af01067" + }, + "extra-properties" : {}, + "inventory-response-items" : {} + }, + { + "l3-network" : { + "network-id" : "44e0d9e0-9334-4ec6-9344-07a96dac629f", + "network-name" : "dmz_protected_net_0", + "network-type" : "CONTRAIL_EXTERNAL", + "network-role" : "dmz_protected", + "network-technology" : "contrail", + "neutron-network-id" : "1ad6b2c5-97d0-4298-b016-7e28939e0baf", + "is-bound-to-vpn" : false, + "service-id" : "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "resource-version" : "1469563787", + "orchestration-status" : "active", + "heat-stack-id" : "dmz_protected_net_0/3f93df5c-f4f1-484f-a269-12d3a6b1ec82" + }, + "extra-properties" : {}, + "inventory-response-items" : {} + }, + { + "l3-network" : { + "network-id" : "ac49d99b-5daf-4624-9f8e-188b126ea166", + "network-name" : "cor_direct_net_0", + "network-type" : "CONTRAIL_BASIC", + "network-role" : "cor_direct", + "network-technology" : "contrail", + "neutron-network-id" : "ac49d99b-5daf-4624-9f8e-188b126ea166", + "is-bound-to-vpn" : false, + "service-id" : "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "network-role-instance" : 0, + "resource-version" : "1470846979", + "orchestration-status" : "active", + "heat-stack-id" : "", + "mso-catalog-key" : "" + }, + "extra-properties" : {}, + "inventory-response-items" : {} + }, + { + "l3-network" : { + "network-id" : "c597ab81-fece-49f4-a4f5-710cebb13c29", + "network-name" : "oam_protected_net_0", + "network-type" : "CONTRAIL_BASIC", + "network-role" : "oam_protected", + "network-technology" : "contrail", + "neutron-network-id" : "c597ab81-fece-49f4-a4f5-710cebb13c29", + "is-bound-to-vpn" : false, + "service-id" : "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "network-role-instance" : 0, + "resource-version" : "1470846979", + "orchestration-status" : "active", + "heat-stack-id" : "", + "mso-catalog-key" : "" + }, + "extra-properties" : {}, + "inventory-response-items" : {} + } ] + } + } ] + } + } ] + } +}; diff --git a/vid-app-common/src/main/webapp/app/vid/test/testMso.css b/vid-app-common/src/main/webapp/app/vid/test/testMso.css new file mode 100755 index 000000000..b0844ee7a --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/test/testMso.css @@ -0,0 +1,22 @@ +div[ng-controller=testController] button { + width: 200px; + margin: 3px; +} + +h3 { + margin-bottom: 5px; +} + +ol, li { + list-style-type: decimal !important; +} + +div[ng-controller=testController]>div>span { + font-size: 20px; + margin-left: 10px; +} + +div[ng-controller=testController] input[type=checkbox] { + height: 20px; + width: 20px; +} \ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/test/testMso.js b/vid-app-common/src/main/webapp/app/vid/test/testMso.js new file mode 100755 index 000000000..884ba8d87 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/test/testMso.js @@ -0,0 +1,486 @@ +"use strict"; + +app.config(function($logProvider){ + // Optionally set to "false" to disable debug logging. + $logProvider.debugEnabled(true); +}); + +app.controller("testController", [ "$scope", "$timeout", "$cookieStore", "$log", "COMPONENT", "DataService", "PropertyService", + function($scope, $timeout, $cookieStore, $log, COMPONENT, DataService, PropertyService) { + + $scope.popup = new Object(); + $scope.isTestMode = false; + + $scope.init = function(properties) { + /* + * These 2 statements should be included in non-test code. + */ + PropertyService.setMsoMaxPollingIntervalMsec(properties.msoMaxPollingIntervalMsec); + PropertyService.setMsoMaxPolls(properties.msoMaxPolls); + + /* + * "setTestMode" is only used for testing. + */ + + setTestMode(); + + DataService.setSubscriberName("Mobility"); + DataService.setGlobalCustomerId("CUSTID12345") + DataService.setServiceType("Mobility Type 1"); + DataService.setServiceName("Mobility Service 1"); + DataService.setServiceInstanceId("mmsc-test-service-instance"); + DataService.setVnfInstanceId("abcd-12345-56789"); + DataService.setVfModuleInstanceId("xye-99990123213"); + } + + var TEST_MODE_COOKIE = "isTestModeEnabled"; + + var defaultMsoBaseUrl = PropertyService.getMsoBaseUrl(); + + var setTestMode = function() { + setTestMsoMode($cookieStore.get(TEST_MODE_COOKIE)); + PropertyService.setMsoMaxPollingIntervalMsec(1000); + PropertyService.setMsoMaxPolls(7); + PropertyService.setServerResponseTimeoutMsec(10000); + }; + + $scope.testMsoModeChanged = function() { + setTestMsoMode($scope.isTestMsoMode); + }; + + var setTestMsoMode = function(isEnabled) { + $scope.isTestMsoMode = isEnabled; + $cookieStore.put(TEST_MODE_COOKIE, isEnabled); + if (isEnabled) { + PropertyService.setMsoBaseUrl("testmso"); + } else { + PropertyService.setMsoBaseUrl(defaultMsoBaseUrl); + } + } + + $scope.autoStartCommitTest = function() { + /* + * Optionally comment in / out one of these method calls (or add a similar + * entry) to auto-invoke an entry when the test screen is redrawn. + */ + $timeout(function() { + // $scope.createServiceInstance(); + // $scope.deleteServiceInstance(); + // $scope.generateInvalidUrl404(); + }, 500); + } + + $scope.autoStartQueryTest = function() { + /* + * Optionally comment in / out one of these method calls (or add a similar + * entry) to auto-invoke an entry when the test screen is redrawn. + */ + $timeout(function() { + // $scope.queryServiceInstance(); + }, 500); + } + + $scope.queryServiceInstance = function() { + /* + * Example of method call needed to show service instance details. + */ + $scope.$broadcast("showComponentDetails", { + componentId : COMPONENT.SERVICE + }); + } + + $scope.createServiceInstance = function() { + /* + * Example of method call needed to commit an instance creation request. + */ + $scope.$broadcast("createInstance", { + url : "mso_create_svc_instance", + requestDetails : createServiceRequestDetails + }); + } + + $scope.deleteServiceInstance = function() { + /* + * Example of method call needed to commit an instance deletion request. + */ + $scope.$broadcast("deleteInstance", { + url : "mso_delete_svc_instance/bc305d54-75b4-431b-adb2-eb6b9e546014", + requestDetails : deleteServiceRequestDetails + }); + } + + $scope.createVNFInstance = function() { + /* + * Example of method call needed to commit an instance creation request. + */ + $scope.$broadcast("createInstance", { + url : "mso_create_vnf_instance/bc305d54-75b4-431b-adb2-eb6b9e546099", + requestDetails : createVnfRequestDetails + }); + } + + $scope.deleteVNFInstance = function() { + /* + * Example of method call needed to commit an instance deletion request. + */ + $scope.$broadcast("deleteInstance", { + url : "mso_delete_vnf_instance/bc305d54-75b4-431b-adb2-eb6b9e546014/vnfs/ab9000-0009-9999", + requestDetails : deleteVnfRequestDetails + }); + } + + $scope.createVolumeGroupInstance = function() { + /* + * Example of method call needed to commit an instance creation request. + */ + $scope.$broadcast("createInstance", { + url : "mso_create_volumegroup_instance/bc305d54-75b4-431b-adb2-eb6b9e546099/vnfs/fe305d54-75b4-431b-adb2-eb6b9e546fea", + requestDetails : createVolumeGroupRequestDetails + }); + } + + $scope.deleteVolumeGroupInstance = function() { + /* + * Example of method call needed to commit an instance deletion request. + */ + $scope.$broadcast("deleteInstance", { + url : "mso_delete_volumegroup_instance/bc305d54-75b4-431b-adb2-eb6b9e546014/vnfs/fe305d54-75b4-431b-adb2-eb6b9e546fea/volumeGroups/fe9000-0009-9999", + requestDetails : deleteVolumeGroupRequestDetails + }); + } + $scope.createVFModuleInstance = function() { + /* + * Example of method call needed to commit an instance creation request. + */ + $scope.$broadcast("createInstance", { + url : "mso_create_vfmodule_instance/bc305d54-75b4-431b-adb2-eb6b9e546099/vnfs/111-111-111-111", + requestDetails : createVFModuleRequestDetails + }); + } + + $scope.deleteVFModuleInstance = function() { + /* + * Example of method call needed to commit an instance deletion request. + * + */ + $scope.$broadcast("deleteInstance", { + url : "mso_delete_vfmodule_instance/2/vnfs/ab/vfModules/a1", + requestDetails : deleteVFModuleRequestDetails + }); + } + $scope.createNetworkInstance = function() { + $scope.$broadcast("createInstance", { + url : "mso_create_nw_instance/789098877777", + requestDetails : createNetworkRequestDetails + }); + } + + $scope.deleteNetworkInstance = function() { + $scope.$broadcast("deleteInstance", { + url : "mso_delete_nw_instance/bc305d54-75b4-431b-adb2-eb6b9e546014/networks/ff305d54-75b4-ff1b-fff1-eb6b9e5460ff", + requestDetails : deleteNetworkRequestDetails + }); + } + + $scope.generateError = function(testName) { + // Clone example request object + var request = JSON.parse(JSON.stringify(createServiceRequestDetails)); + request.modelInfo.modelName = testName; + $scope.$broadcast("createInstance", { + url : "mso_create_svc_instance", + requestDetails : request + }); + } + + $scope.generateInvalidUrl404 = function() { + var baseUrl = PropertyService.getMsoBaseUrl(); + PropertyService.setMsoBaseUrl("/INVALID_STRING/"); + + $scope.$broadcast("createInstance", { + url : "mso_create_svc_instance", + requestDetails : createServiceRequestDetails, + callbackFunction : function() { + PropertyService.setMsoBaseUrl(baseUrl); + $scope.popup.isVisible = false; + } + }); + } + + $scope.generateInvalidUrl405 = function() { + $scope.$broadcast("createInstance", { + url : "INVALID_STRING_mso_create_svc_instance", + requestDetails : createServiceRequestDetails + }); + } + + /* + * Test data objects: + */ + /*var requestParameters = { + "subscriptionServiceType":"ef5256d1-5a33-aadf-13ab-12abad84e764", + "userParams":[{"name":"goldenr","value":"Willie"}, {"name":"lab","value":"Jackson"}, {"name":"goldend","value":"Max"}]} */ + var requestParameters = { "subscriptionServiceType":"ef5256d1-5a33-aadf-13ab-12abad84e764", userParams:[] }; + var requestInfo = { + instanceName: "sn5256d1-5a33-55df-13ab-12abad84e764", + productFamilyId: "sn5256d1-5a33-55df-13ab-12abad84edde", + source: "VID", + suppressRollback: true + }; + var subscriberInfo = { + globalSubscriberId : "C12345", + subscriberName : "General Electric Division 12" + }; + + var cloudConfiguration = { + lcpCloudRegionId: "cloudregion1", + tenantId: "df5256d1-5a33-55df-13ab-12abad843456" + + }; + var createServiceRequestDetails = { + modelInfo : { + modelType : "service", + modelInvariantId : "sn5256d1-5a33-55df-13ab-12abad84e764", + modelNameVersionId : "ab6478e4-ea33-3346-ac12-ab121484adca", + modelName : "WanBonding", + modelVersion : "1", + modelCustomizationName: "" + }, + subscriberInfo : subscriberInfo, + requestInfo : requestInfo, + requestParameters : requestParameters + }; + + var deleteServiceRequestDetails = { + modelInfo : { + modelType : "service", + modelInvariantId : "sn5256d1-5a33-55df-13ab-12abad84e764", + modelNameVersionId : "ab6478e4-ea33-3346-ac12-ab121484adca", + modelName : "WanBonding", + modelVersion : "1", + modelCustomizationName: "" + }, + requestInfo : requestInfo + }; + + var createVFModuleRequestDetails = { + modelInfo : { + modelType : "VFModule", + modelInvariantId : "ab5256d1-5a33-55df-13ab-12abad84e764", + modelNameVersionId : "9b6478e4-ea33-3346-ac12-ab121484adc2", + modelName : "model1", + modelVersion : "1", + modelCustomizationName: "" + }, + cloudConfiguration: cloudConfiguration, + requestInfo : requestInfo, + relatedInstanceList: [ + { + relatedInstance: { + instanceId: "c3514e3-5a33-55df-13ab-12abad84e7cc", + modelInfo: { + modelType: "volumeGroup", + modelInvariantId: "ff3514e3-5a33-55df-13ab-12abad84e7ff", + modelNameVersionId: "fe6985cd-ea33-3346-ac12-ab121484a3fe", + modelName: "parentServiceModelName", + modelVersion: "1.0" + } + } + }, + { + relatedInstance: { + instanceId: "c3514e3-5a33-55df-13ab-12abad84e7cc", + modelInfo: { + modelType: "service", + modelInvariantId: "ff3514e3-5a33-55df-13ab-12abad84e7ff", + modelNameVersionId: "fe6985cd-ea33-3346-ac12-ab121484a3fe", + modelName: "parentServiceModelName", + modelVersion: "1.0" + } + } + }, + { + relatedInstance: { + instanceId: "fab256d1-5a33-55df-13ab-12abad8445ff34", + modelInfo: { + modelType: "vnf", + modelInvariantId: "ff5256d1-5a33-55df-13ab-12abad84e7ff", + modelNameVersionId: "fe6478e4-ea33-3346-ac12-ab121484a3fe", + modelName: "vSAMP12", + modelVersion: "1.0", + modelCustomizationName: "vSAMP12 1" + } + } + } + + ], + requestParameters : requestParameters + }; + + var deleteVFModuleRequestDetails = { + modelInfo : { + modelType : "VFModule", + modelInvariantId : "ab5256d1-5a33-55df-13ab-12abad84e764", + modelNameVersionId : "9b6478e4-ea33-3346-ac12-ab121484adc2", + modelName : "model1", + modelVersion : "1", + modelCustomizationName: "" + }, + cloudConfiguration: cloudConfiguration, + requestInfo : requestInfo, + + }; + + var createVnfRequestDetails = { + modelInfo : { + modelType : "vnf", + modelInvariantId : "ab5256d1-5a33-55df-13ab-12abad84efc2", + modelNameVersionId : "9b6478e4-ea33-3346-ac12-ab1214847890", + modelName : "model1", + modelVersion : "1", + modelCustomizationName: "" + }, + requestInfo : requestInfo, + cloudConfiguration : cloudConfiguration, + relatedInstanceList: [ + { + relatedInstance: { + instanceId: "c3514e3-5a09-55df-13ab-1babad84e7cc", + modelInfo: { + modelType: "service", + modelInvariantId: "ff3514e3-5a33-55df-13ab-12abad84e7ff", + modelNameVersionId: "fe6985cd-ea33-3346-ac12-ab121484a3fe", + modelName: "parentServiceModelName", + modelVersion: "1.0" + } + } + } + ] + }; + + var deleteVnfRequestDetails = { + modelInfo : { + modelType : "vnf", + modelInvariantId : "ab5256d1-5a33-55df-13ab-12abad84efc2", + modelNameVersionId : "9b6478e4-ea33-3346-ac12-ab1214847890", + modelName : "model1", + modelVersion : "1", + modelCustomizationName: "" + }, + cloudConfiguration : cloudConfiguration, + requestInfo : requestInfo + }; + var createVolumeGroupRequestDetails = { + modelInfo : { + modelType : "volumeGroup", + modelInvariantId : "ab5256d1-5a33-55df-13ab-12abad84efda", + modelNameVersionId : "9b6478e4-ea33-3346-ac12-ab12148478fa", + modelName : "model1", + modelVersion : "1", + modelCustomizationName: "" + }, + cloudConfiguration : cloudConfiguration, + requestInfo : requestInfo, + relatedInstanceList: [ + { + relatedInstance: { + instanceId: "c3514e3-5a33-55df-13ab-12abad84e7cc", + modelInfo: { + modelType: "service", + modelInvariantId: "ff3514e3-5a33-55df-13ab-12abad84e7ff", + modelNameVersionId: "fe6985cd-ea33-3346-ac12-ab121484a3fe", + modelName: "parentServiceModelName", + modelVersion: "1.0" + } + } + }, + { + relatedInstance: { + instanceId: "fab256d1-5a33-55df-13ab-12abad8445ff34", + modelInfo: { + modelType: "vnf", + modelInvariantId: "ff5256d1-5a33-55df-13ab-12abad84e7ff", + modelNameVersionId: "fe6478e4-ea33-3346-ac12-ab121484a3fe", + modelName: "vSAMP12", + modelVersion: "1.0", + modelCustomizationName: "vSAMP12 1" + } + } + } + ] + + }; + + var deleteVolumeGroupRequestDetails = { + modelInfo : { + modelType : "volumeGroup", + modelInvariantId : "ab5256d1-5a33-55df-13ab-12abad84efda", + modelNameVersionId : "9b6478e4-ea33-3346-ac12-ab12148478fa", + modelName : "vIsbcOamNetwork", + modelVersion : "1", + modelCustomizationName: "" + }, + cloudConfiguration : cloudConfiguration, + requestInfo : requestInfo + }; + + var createNetworkRequestDetails = { + modelInfo : { + modelType : "network", + modelInvariantId : "ab5256d1-5a33-55df-13ab-12abad84e890", + modelNameVersionId : "fe6478e4-ea33-3346-aaaa-ab121484a3fa", + modelName : "vIsbcOamNetwork", + modelVersion : "1", + modelCustomizationName: "" + }, + cloudConfiguration: cloudConfiguration, + requestInfo : requestInfo + }; + + var deleteNetworkRequestDetails = { + modelInfo : { + modelType : "network", + modelId : "ff5256d1-5a33-55df-aaaa-12abad84e7ff", + modelNameVersionId : "fe6478e4-ea33-3346-aaaa-ab121484a3fe", + modelName : "vIsbcOamNetwork", + modelVersion : "1" + }, + relatedModelList : [ + { + relatedModel : { + instanceId : "ff305d54-75b4-431b-adb2-eb6b9e5ff000", + modelInfo : { + modelType : "service", + modelId : "ff3514e3-5a33-55df-13ab-12abad84e7ff", + modelNameVersionId : "fe6985cd-ea33-3346-ac12-ab121484a3fe", + modelName : "Intercarrier Interconnect Session Border Controller", + modelVersion : "1" + } + } + }, + { + relatedModel : { + instanceId : "ff305d54-75b4-ff1b-adb2-eb6b9e5460ff", + modelInfo : { + modelType : "vnf", + modelId : "ff5256d1-5a33-55df-13ab-12abad84e7ff", + modelNameVersionId : "fe6478e4-ea33-3346-ac12-ab121484a3fe", + modelName : "vIsbc", + modelVersion : "1" + } + } + }, + { + relatedModel : { + instanceId : "ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff", + modelInfo : { + modelType : "vfModule", + modelId : "ff5256d1-5a33-55df-13ab-22abad84e7ff", + modelNameVersionId : "fe6478e4-ea33-3346-bc12-ab121484a3fe", + modelName : "vIsbcRtpExpansionModule", + modelVersion : "1" + } + } + } ] + }; + } +]); diff --git a/vid-app-common/src/main/webapp/app/vid/test/testViewEdit.css b/vid-app-common/src/main/webapp/app/vid/test/testViewEdit.css new file mode 100755 index 000000000..0dfb45071 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/test/testViewEdit.css @@ -0,0 +1,30 @@ +div[ng-controller=testViewEditController] button { + width: 120px; +} + +div[ng-controller=testViewEditController]>table { + border: solid black 1px; + width: auto; +} + +div[ng-controller=testViewEditController]>table td { + border: solid black 1px; +} + +h3 { + margin-bottom: 5px; +} + +ol, li { + list-style-type: decimal !important; +} + +div[ng-controller=testViewEditController]>div>span { + font-size: 20px; + margin-left: 10px; +} + +div[ng-controller=testViewEditController] input[type=checkbox] { + height: 20px; + width: 20px; +} \ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/test/testViewEdit.js b/vid-app-common/src/main/webapp/app/vid/test/testViewEdit.js new file mode 100755 index 000000000..73da4db74 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/test/testViewEdit.js @@ -0,0 +1,376 @@ +"use strict"; + +app.config(function($logProvider) { + // Optionally set to "false" to disable debug logging. + $logProvider.debugEnabled(true); +}); + +var testViewEditController = function(COMPONENT, DataService, PropertyService, + UtilityService, $scope, $timeout, $cookieStore, $log) { + + $scope.popup = new Object(); + $scope.isTestMode = false; + + $scope.init = function(properties) { + + /* + * These 2 statements should be included in non-test code. + */ + PropertyService + .setMsoMaxPollingIntervalMsec(properties.msoMaxPollingIntervalMsec); + PropertyService.setMsoMaxPolls(properties.msoMaxPolls); + + /* + * Common parameters that shows an example of how the view edit screen + * is expected to pass some common service instance values to the + * popups. + */ + + DataService.setSubscriberName("Mobility"); + DataService.setGlobalCustomerId("CUSTID12345") + DataService.setServiceType("Mobility Type 1"); + DataService.setServiceInstanceName("Example Service Instance Name"); + DataService.setServiceName("Mobility Service 1"); + DataService.setServiceInstanceId("mmsc-test-service-instance"); + DataService.setServiceUuid("XXXX-YYYY-ZZZZ"); + DataService.setUserServiceInstanceName("USER_SERVICE_INSTANCE_NAME"); + + /* + * "setTestMode" is only used for testing. + */ + + setTestMode(); + + } + + $scope.autoStartTest = function() { + /* + * Optionally comment in / out one of these method calls (or add a + * similar entry) to auto-invoke an entry as soon as the page is + * refreshed. + */ + $timeout(function() { + // $scope.showServiceDetails(); + // $scope.showVnfDetails(); + // $scope.createService(); + // $scope.deleteService(); + // $scope.createNetwork(); + // $scope.createVnf(); + // $scope.createVfModule(); + // $scope.deleteVnf(); + // $scope.createVfModule(); + }, 500); + } + + /* + * This block of code is only used for testing. + */ + + /* + * The first 3 functions override default values set in the server + * properties file. + * + * 1) The URL for the MSO controller is set to either the "real" controller + * or the test version depending on the "Use test MSO controller" checkbox. + * + * 2) SDC and AAI are set to use test controller versions. + * + * 3) Maximum polling and timeout values are set to lower values to lessen + * the time required to run tests. + * + */ + + var TEST_MODE_COOKIE = "isTestModeEnabled"; + + var defaultMsoBaseUrl = PropertyService.getMsoBaseUrl(); + + var setTestMode = function() { + setTestMsoMode($cookieStore.get(TEST_MODE_COOKIE)); + PropertyService.setAaiBaseUrl("testaai"); + PropertyService.setAsdcBaseUrl("testasdc"); + PropertyService.setMsoMaxPollingIntervalMsec(1000); + PropertyService.setMsoMaxPolls(7); + PropertyService.setServerResponseTimeoutMsec(10000); + }; + + $scope.testMsoModeChanged = function() { + setTestMsoMode($scope.isTestMsoMode); + }; + + var setTestMsoMode = function(isEnabled) { + $scope.isTestMsoMode = isEnabled; + $cookieStore.put(TEST_MODE_COOKIE, isEnabled); + if (isEnabled) { + PropertyService.setMsoBaseUrl("testmso"); + } else { + PropertyService.setMsoBaseUrl(defaultMsoBaseUrl); + } + }; + + var callbackFunction = function(response) { + $scope.callbackResults = ""; + var color = "none"; + $scope.callbackStyle = { + "background-color" : color + }; + /* + * This 1/2 delay was only added to visually highlight the status + * change. Probably not needed in the real application code. + */ + $timeout(function() { + $scope.callbackResults = UtilityService.getCurrentTime() + + " isSuccessful: " + response.isSuccessful; + if (response.isSuccessful) { + color = "#8F8"; + } else { + color = "#F88"; + } + $scope.callbackStyle = { + "background-color" : color + }; + }, 500); + }; + + /* + * End of block of test-specific code + */ + + /* + * Create functions + */ + $scope.createService = function() { + + DataService.setModelId("91238134091820938018230918230989"); + + $scope.$broadcast("createComponent", { + componentId : COMPONENT.SERVICE, + callbackFunction : callbackFunction + }); + } + + $scope.createVnf = function() { + + DataService.setModelId("91238134091820938018230918230989"); + DataService.setModelInstanceName("VNF_MODEL_INSTANCE_NAME"); + + DataService.setCloudRegionTenantList(exampleCloudRegionTenantList) + DataService.setServiceIdList(exampleServiceIdList); + + // Data used to create MSO "relatedInstanceList" object + + DataService.setModelInfo(COMPONENT.SERVICE, exampleServiceModelInfo); + + $scope.$broadcast("createComponent", { + componentId : COMPONENT.VNF, + callbackFunction : callbackFunction + }); + } + + $scope.createVfModule = function() { + DataService + .setInventoryItem(exampleAaiResult["inventory-response-items"][0]); + + DataService.setModelId("91238134091820938018230918230989"); + DataService.setModelInstanceName("VF_MODULE_MODEL_INSTANCE_NAME"); + + DataService.setLcpRegion("Region2"); + DataService.setTenant("Tenant2"); + // Data used to create MSO "relatedInstanceList" object + + DataService.setModelInfo(COMPONENT.SERVICE, exampleServiceModelInfo); + + DataService.setVnfInstanceId("VNF_INSTANCE_ID_12345"); + DataService.setModelInfo(COMPONENT.VNF, exampleVnfModelInfo); + + DataService.setVolumeGroupInstanceId("VOLUME_GROUP_INSTANCE_ID_12345"); + DataService + .setAvailableVolumeGroupList(exampleAvailableVolumeGroupList); + DataService.setModelInfo(COMPONENT.VOLUME_GROUP, + exampleVolumeGroupModelInfo); + + $scope.$broadcast("createComponent", { + componentId : COMPONENT.VF_MODULE, + callbackFunction : callbackFunction + }); + } + + $scope.createVolumeGroup = function() { + + DataService.setModelId("91238134091820938018230918230989"); + DataService.setModelInstanceName("VOLUME_GROUP_MODEL_INSTANCE_NAME"); + DataService.setLcpRegion("Region1"); + DataService.setTenant("Tenant1"); + // Data used to create MSO "relatedInstanceList" object + + DataService.setModelInfo(COMPONENT.SERVICE, exampleServiceModelInfo); + + DataService.setVnfInstanceId("VNF_INSTANCE_ID_12345"); + DataService.setModelInfo(COMPONENT.VNF, exampleVnfModelInfo); + + $scope.$broadcast("createComponent", { + componentId : COMPONENT.VOLUME_GROUP, + callbackFunction : callbackFunction + }); + } + + $scope.createNetwork = function() { + + DataService.setModelId("91238134091820938018230918230989"); + DataService.setModelInstanceName("NETWORK_MODEL_INSTANCE_NAME"); + + DataService.setCloudRegionTenantList(exampleCloudRegionTenantList) + DataService.setServiceIdList(exampleServiceIdList); + + // Data used to create MSO "relatedInstanceList" object + + DataService.setModelInfo(COMPONENT.SERVICE, exampleServiceModelInfo); + + $scope.$broadcast("createComponent", { + componentId : COMPONENT.NETWORK, + callbackFunction : callbackFunction + }); + } + + /* + * Delete functions + */ + $scope.deleteService = function() { + + DataService.setInventoryItem(exampleServiceItem); + + DataService.setModelInfo(COMPONENT.SERVICE, exampleServiceModelInfo); + + $scope.$broadcast("deleteComponent", { + componentId : COMPONENT.SERVICE, + callbackFunction : callbackFunction + }); + } + + $scope.deleteVnf = function() { + + DataService + .setInventoryItem(exampleAaiResult["inventory-response-items"]["inventory-response-item"][0]); + + DataService.setVnfInstanceId("VNF_INSTANCE_ID_12345"); + DataService.setModelInfo(COMPONENT.VNF, exampleVnfModelInfo); + DataService.setLcpRegion("Region3"); + DataService.setTenant("Tenant3"); + + $scope.$broadcast("deleteComponent", { + componentId : COMPONENT.VNF, + callbackFunction : callbackFunction + }); + } + + $scope.deleteVfModule = function() { + + DataService.setInventoryItem(exampleVfModuleItem); + + DataService.setVnfInstanceId("VNF_INSTANCE_ID_12345"); + + DataService.setVfModuleInstanceId("VF_MODULE_INSTANCE_ID_12345"); + DataService.setModelInfo(COMPONENT.VF_MODULE, exampleVfModuleModelInfo); + DataService.setLcpRegion("Region4"); + DataService.setTenant("Tenant4"); + + $scope.$broadcast("deleteComponent", { + componentId : COMPONENT.VF_MODULE, + callbackFunction : callbackFunction + }); + } + + $scope.deleteVolumeGroup = function() { + + DataService.setInventoryItem(exampleVolumeGroupItem); + + DataService.setVolumeGroupInstanceId("VOLUME_GROUP_INSTANCE_ID_12345"); + DataService.setModelInfo(COMPONENT.VOLUME_GROUP, + exampleVolumeGroupModelInfo); + DataService.setLcpRegion("Region3"); + DataService.setTenant("Tenant3"); + + + $scope.$broadcast("deleteComponent", { + componentId : COMPONENT.VOLUME_GROUP, + callbackFunction : callbackFunction + }); + } + + $scope.deleteNetwork = function() { + + DataService.setInventoryItem(exampleNetworkItem); + + DataService.setNetworkInstanceId("NETWORK_INSTANCE_ID_12345"); + DataService.setModelInfo(COMPONENT.NETWORK, exampleNetworkModelInfo); + DataService.setLcpRegion("Region5"); + DataService.setTenant("Tenant5"); + + $scope.$broadcast("deleteComponent", { + componentId : COMPONENT.NETWORK, + callbackFunction : callbackFunction + }); + } + + /* + * Show Details functions + */ + $scope.showServiceDetails = function() { + + DataService.setInventoryItem(exampleServiceItem); + + $scope.$broadcast("showComponentDetails", { + componentId : COMPONENT.SERVICE, + callbackFunction : callbackFunction + }); + } + + $scope.showVnfDetails = function() { + + DataService.setVnfInstanceId("VNF_INSTANCE_ID_12345"); + DataService + .setInventoryItem(exampleAaiResult["inventory-response-items"]["inventory-response-item"][0]); + + $scope.$broadcast("showComponentDetails", { + componentId : COMPONENT.VNF, + callbackFunction : callbackFunction + }); + } + + $scope.showVfModuleDetails = function() { + + DataService.setVnfInstanceId("VNF_INSTANCE_ID_12345"); + DataService.setVfModuleInstanceId("VF_MODULE_INSTANCE_ID_12345"); + DataService.setInventoryItem(exampleVfModuleItem); + + $scope.$broadcast("showComponentDetails", { + componentId : COMPONENT.VF_MODULE, + callbackFunction : callbackFunction + }); + } + + $scope.showVolumeGroupDetails = function() { + + DataService.setVolumeGroupInstanceId("VOLUME_GROUP_INSTANCE_ID_12345"); + DataService.setInventoryItem(exampleVolumeGroupItem); + + $scope.$broadcast("showComponentDetails", { + componentId : COMPONENT.VOLUME_GROUP, + callbackFunction : callbackFunction + }); + } + + $scope.showNetworkDetails = function() { + + DataService.setNetworkInstanceId("NETWORK_INSTANCE_ID_12345"); + DataService.setInventoryItem(exampleNetworkItem); + + $scope.$broadcast("showComponentDetails", { + componentId : COMPONENT.NETWORK, + callbackFunction : callbackFunction + }); + } +} + +app.controller("testViewEditController", [ "COMPONENT", "DataService", + "PropertyService", "UtilityService", "$scope", "$timeout", + "$cookieStore", "$log", testViewEditController ]); \ No newline at end of file -- cgit 1.2.3-korg