aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp/app/vid/scripts/controller/creationDialogController.js
diff options
context:
space:
mode:
Diffstat (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/controller/creationDialogController.js')
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/creationDialogController.js35
1 files changed, 34 insertions, 1 deletions
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
index 57bf54bb6..15627835e 100755
--- 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
@@ -21,15 +21,46 @@
"use strict";
var creationDialogController = function (COMPONENT, FIELD, PARAMETER, $scope, $http, $timeout, $log,
- CreationService, UtilityService, DataService, VIDCONFIGURATION, $location) {
+ CreationService, UtilityService, DataService, VIDCONFIGURATION, $location, $uibModal, featureFlags) {
$scope.isDialogVisible = false;
+ $scope.isServiceError = false;
$scope.summaryControl = {};
$scope.userProvidedControl = {};
+
var callbackFunction = undefined;
var componentId = undefined;
+ $scope.showReportWindow = function() {
+
+ let errorMsg;
+
+ if($scope.error !== undefined && $scope.error != null) {
+ errorMsg = $scope.error;
+ } else {
+ errorMsg = "";
+ }
+
+ const modalWindow = $uibModal.open({
+ templateUrl: 'app/vid/scripts/modals/report-modal/report-modal.html',
+ controller: 'reportModalController',
+ controllerAs: 'vm',
+ resolve: {
+ errorMsg: function () {
+ return errorMsg;
+ }
+ }
+ });
+
+ $scope.isDialogVisible = false;
+ $scope.popup.isVisible = false;
+ };
+
+ $scope.isShowErrorReport = function() {
+ return featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_CREATE_ERROR_REPORTS);
+ };
+
$scope.shouldShowOldPopup = function () {
return !DataService.getShouldIncludeInAsyncInstantiationFlow();
};
@@ -68,6 +99,7 @@ var creationDialogController = function (COMPONENT, FIELD, PARAMETER, $scope, $h
CreationService.initializeComponent(request.componentId);
CreationService.setHttpErrorHandler(function (response) {
+ $scope.isServiceError = true;
showError(FIELD.ERROR.SYSTEM_FAILURE, UtilityService
.getHttpErrorMessage(response));
});
@@ -373,4 +405,5 @@ var creationDialogController = function (COMPONENT, FIELD, PARAMETER, $scope, $h
appDS2.controller("creationDialogController", ["COMPONENT", "FIELD", "PARAMETER", "$scope", "$http",
"$timeout", "$log", "CreationService", "UtilityService", "DataService", "VIDCONFIGURATION", "$location",
+ "$uibModal", "featureFlags",
creationDialogController]);