* ============LICENSE_START=======================================================\r
* VID\r
* ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.\r
* Modifications Copyright (C) 2019 IBM.\r
* ================================================================================\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
(function () {\r
'use strict';\r
\r
- appDS2.controller("ServiceModelController", function ($scope, $http, $location, COMPONENT, VIDCONFIGURATION, FIELD, DataService, vidService,\r
- PropertyService, UtilityService, AsdcService,$timeout) {\r
+ appDS2.controller("ServiceModelController",function ($uibModal, $scope, $http, $location, COMPONENT, VIDCONFIGURATION, FIELD, DataService, vidService,\r
+ PropertyService, UtilityService, AsdcService, $timeout, featureFlags) {\r
\r
$scope.popup = {};\r
var defaultViewPerPage = 10;\r
$scope.currentPageNum=1;\r
$scope.isSpinnerVisible = false;\r
$scope.isProgressVisible = false;\r
- if (sessionStorage.getItem("searchKey")!='undefined' && ($scope.rememberFilter)) {\r
+ var searchKey = sessionStorage.getItem("searchKey");\r
+ if (searchKey != 'undefined' && searchKey!=null && ($scope.rememberFilter)) {\r
var searchKey = JSON.parse(sessionStorage.getItem("searchKey"));\r
$scope.searchString = searchKey.searchString || '';\r
$scope.viewPerPage = searchKey.viewPerPage || defaultViewPerPage;\r
$scope.currentPage++;\r
};\r
\r
+ $scope.showReportWindow = function() {\r
\r
+ const modalWindow = $uibModal.open({\r
+ templateUrl: 'app/vid/scripts/modals/report-modal/report-modal.html',\r
+ controller: 'reportModalController',\r
+ controllerAs: 'vm',\r
+ resolve: {\r
+ errorMsg: function () {\r
+ return $scope.status;\r
+ }\r
+ }\r
+ });\r
+\r
+ };\r
+\r
+ $scope.isShowErrorReport = function() {\r
+ return featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_CREATE_ERROR_REPORTS);\r
+ };\r
\r
$scope.createType = COMPONENT.A_LA_CARTE;\r
$scope.deployService = function(service) {\r
DataService.setShouldIncludeInAsyncInstantiationFlow(shouldTakeTheAsyncInstantiationFlow);\r
\r
DataService.setALaCarte (true);\r
- DataService.setPnf(!angular.equals(serviceModel.pnfs, {}));\r
+ DataService.setPnf(!angular.equals(serviceModel.pnfs, {}));\r
$scope.createType = COMPONENT.A_LA_CARTE;\r
var broadcastType = COMPONENT.CREATE_COMPONENT;\r
if (AsdcService.isMacro(serviceModel) || DataService.getE2EService()) {\r