diff --git a/400-SOURCECODE/AIAHTML5.API/Controllers/PixelLocationsController.cs b/400-SOURCECODE/AIAHTML5.API/Controllers/PixelLocationsController.cs index 19c2e58..11e8f90 100644 --- a/400-SOURCECODE/AIAHTML5.API/Controllers/PixelLocationsController.cs +++ b/400-SOURCECODE/AIAHTML5.API/Controllers/PixelLocationsController.cs @@ -20,7 +20,16 @@ namespace AIAHTML5.API.Controllers public HttpResponseMessage Get(string layerNumber, string bodyViewIndex, string systemNumber, string zoomLevel) { dynamic bodyRegions = PixelLocator.GetBodyRegionsPixelData(layerNumber, bodyViewIndex, systemNumber, zoomLevel); - return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(bodyRegions) }; + if (bodyRegions != "InternalServerError") + { + return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(bodyRegions) }; + } + else + { + return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent("Connection Failed:Internal Server Error") }; + } + + } // POST: api/PixelLocations diff --git a/400-SOURCECODE/AIAHTML5.API/Models/PixelLocator.cs b/400-SOURCECODE/AIAHTML5.API/Models/PixelLocator.cs index d3323c8..fae1453 100644 --- a/400-SOURCECODE/AIAHTML5.API/Models/PixelLocator.cs +++ b/400-SOURCECODE/AIAHTML5.API/Models/PixelLocator.cs @@ -38,7 +38,8 @@ namespace AIAHTML5.API.Models } catch (Exception e) { - string error = e.Message + "..STACKTRACE: " + e.StackTrace; + //string error = e.Message + "..STACKTRACE: " + e.StackTrace; + string error = "InternalServerError"; return error; } } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 5392df4..b042303 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -877,7 +877,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.btnSearchListId = "btnSearchList"; $scope.tbSliderId = "tbSlider"; $scope.IdMale = "IdMale"; - $scope.IdFemale = "IdFemale"; + $scope.IdFemale = "IdFemale"; //if ($rootScope.isOpenResourceBtnClicked || $rootScope.isCallFromOtherModule) { @@ -1213,6 +1213,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l // side bar toggle $("#sidebarId").attr("id", "sidebarId_" + $rootScope.MULTI_VIEW_ID); + // bodyview id $("#Anterior").attr("id", "Anterior_" + $rootScope.MULTI_VIEW_ID); $("#Lateral").attr("id", "Lateral_" + $rootScope.MULTI_VIEW_ID); @@ -4128,7 +4129,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.isScrolledToHighlightedBR = false; //disable the background till the system gets highlighted. $scope.DisableUI(); - $('.ui-slider').slider('disable'); + + // $('.ui-slider').slider('disable'); + + $("#layerChangeSliderDA_" + windowviewid + '.vert_slider').slider('disable'); var currentNumber=$scope.GetwindowStoreData(windowviewid,'currentLayerNumber'); if ($scope.GetwindowStoreData(windowviewid,'isTransparencyActivated')) { @@ -4157,26 +4161,30 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId'); var lNumber=$scope.GetwindowStoreData(windowviewid,'layerNumber'); var zoomValue=$scope.GetwindowStoreData(windowviewid,'zoomInOut'); - var systemNumber=$scope.GetwindowStoreData(windowviewid,'systemNumber'); + var systemNumber = $scope.GetwindowStoreData(windowviewid, 'systemNumber'); TermService.getTermData(lNumber, bodyVid, systemNumber, zoomValue) .then( function (result) { - if (result.length == 0) { + if (result.length ==0) { $rootScope.isLoading = false; $('#spinner').css('visibility', 'hidden'); //remove existing data and draw fresh data $scope.removeCurrentHighlightedBodySystem(windowviewid); + // $('.ui-slider').slider('enable'); + $("#layerChangeSliderDA_" + windowviewid + '.vert_slider').slider('enable'); + $scope.EnableUI(); - $scope.message = AIAConstants.NO_BODY_SYSTEM_AVAILABLE; + $rootScope.message = AIAConstants.NO_BODY_SYSTEM_AVAILABLE; + $("#daMessageModal").modal('show'); - $scope.EnableUI(); - - $('.ui-slider').slider('enable'); + $(".notfoundSystem").draggable({ handle: ".modal-header" }); + $(".modal-backdrop").css("opacity", ".5"); + } else { console.log('1. HighlightBodyByTermListForBodySystem is called'); @@ -4249,7 +4257,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l grayCanvasContext.clearRect(0, 0, canvasHeight, canvasWidth) - if ($scope.GetwindowStoreData(windowviewid,'isExtract')) { + if ($scope.GetwindowStoreData(windowviewid, 'isExtract')) { grayCanvasContext.putImageData(whiteImageDataList[parseInt(TermExistInBodyRegionId) - 1], 0, 0); } else { @@ -4264,7 +4272,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var grayCanvasMRX; var grayCanvasMRY; - var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId'); + var bodyVid = $scope.GetwindowStoreData(windowviewid, 'voId'); //draw a canvas for same bodyregion wich will be flipped after coloring the body system if (bodyVid == "1" || bodyVid == "4" || bodyVid == "5" || bodyVid == "8") { if (TermExistInBodyRegionId == 4 || TermExistInBodyRegionId == 5 || TermExistInBodyRegionId == 6) { @@ -4303,10 +4311,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l .from($rootScope.macthedTermList) .where('bodyRegionId == ' + TermExistInBodyRegionId) .select(); - var coloredImageDataVar=null; - if (coloredImageCanvasList.length>0) { - coloredImageDataVar = coloredImageCanvasList[parseInt(TermExistInBodyRegionId)-1]; - } + var coloredImageDataVar = null; + if (coloredImageCanvasList.length > 0) { + coloredImageDataVar = coloredImageCanvasList[parseInt(TermExistInBodyRegionId) - 1]; + } var grayImageDataValue = gData.data; var coloredImageDataValue = coloredImageDataVar.data; @@ -4366,14 +4374,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } } - - $('#spinner').css('visibility', 'hidden') - $rootScope.isLoading = false; - - //document.getElementById("daView").style.pointerEvents = "auto"; - - //$('.ui-slider').slider('enable'); - $scope.EnableUI(); + prevBRID = TermExistInBodyRegionId; $scope.scrollToHighlightedBodyRegion(TermExistInBodyRegionId, windowviewid); @@ -4386,14 +4387,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $rootScope.isLoading = false; $scope.EnableUI(); - $('.ui-slider').slider('enable'); + // $('.ui-slider').slider('enable'); + $("#layerChangeSliderDA_" + windowviewid + '.vert_slider').slider('enable'); } - }) - - } + }); + + //$('.ui-slider').slider('enable'); + $("#layerChangeSliderDA_" + windowviewid + '.vert_slider').slider('enable'); + $scope.EnableUI(); + } } }, @@ -4401,14 +4406,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l console.log(' Error in getting term data = ' + error); $('#spinner').css('visibility', 'hidden') $rootScope.isLoading = false; - + //$('.ui-slider').slider('enable'); + $("#layerChangeSliderDA_" + windowviewid + '.vert_slider').slider('enable'); $scope.EnableUI(); //remove existing data and draw fresh data $scope.removeCurrentHighlightedBodySystem(windowviewid); - $scope.message = error; + $rootScope.message = error; $("#daMessageModal").modal('show'); + $(".notfoundSystem").draggable({ handle: ".modal-header" }); + $(".modal-backdrop").css("opacity", ".5"); + + }); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/services/TermService.js b/400-SOURCECODE/AIAHTML5.Web/app/services/TermService.js index 96bc22f..998b051 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/services/TermService.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/services/TermService.js @@ -20,7 +20,7 @@ deferred.resolve(data); }).error(function (data, status, headers, config) { console.log('error status= ' + status) - deferred.reject(status); + deferred.reject(data); }); return deferred.promise; }, diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html index eac5ea7..0a54759 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html @@ -312,50 +312,7 @@ -