From afa6715203ff13af886d56cfc06f59e3fe793518 Mon Sep 17 00:00:00 2001 From: denz Date: Thu, 4 Jun 2015 11:46:57 +0900 Subject: [PATCH] Update error display format (2) --- .../features/agentInfo/agent-info.directive.js | 15 ++++++++++----- .../transaction-detail.controller.js | 12 ++++++++---- .../transaction-view.controller.js | 12 ++++++++---- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/web/src/main/webapp/features/agentInfo/agent-info.directive.js b/web/src/main/webapp/features/agentInfo/agent-info.directive.js index 0e97c1993674..d322a891ffa7 100644 --- a/web/src/main/webapp/features/agentInfo/agent-info.directive.js +++ b/web/src/main/webapp/features/agentInfo/agent-info.directive.js @@ -143,11 +143,16 @@ }; oProgressBarService.setLoading(40); AgentDaoService.getAgentStat(query, function (err, result) { - if (err) { - oProgressBarService.stopLoading(); - oAlertService.showError('There is some error.'); - return; - } + if (err || result.exception ) { + oProgressBarService.stopLoading(); + if ( err ) { + oAlertService.showError('There is some error.'); + } else { + oAlertService.showError(result.exception); + } + return; + } + scope.agentStat = result; if (angular.isDefined(result.type) && result.type) { scope.info['jvmGcType'] = result.type; diff --git a/web/src/main/webapp/pages/transactionDetail/transaction-detail.controller.js b/web/src/main/webapp/pages/transactionDetail/transaction-detail.controller.js index e41fcc106af8..050f567a9794 100644 --- a/web/src/main/webapp/pages/transactionDetail/transaction-detail.controller.js +++ b/web/src/main/webapp/pages/transactionDetail/transaction-detail.controller.js @@ -30,10 +30,14 @@ oProgressBarService.startLoading(); oProgressBarService.setLoading(30); TransactionDaoService.getTransactionDetail($routeParams.traceId, $routeParams.focusTimestamp, function (err, result) { - if (err) { - oProgressBarService.stopLoading(); - oAlertService.showError('There is some error while downloading the data.'); - } + if (err || result.exception ) { + oProgressBarService.stopLoading(); + if ( err ) { + oAlertService.showError('There is some error while downloading the data.'); + } else { + oAlertService.showError(result.exception); + } + } oProgressBarService.setLoading(70); parseTransactionDetail(result); showCallStacks(); diff --git a/web/src/main/webapp/pages/transactionView/transaction-view.controller.js b/web/src/main/webapp/pages/transactionView/transaction-view.controller.js index 61ac52f6d2b7..0777d5567239 100644 --- a/web/src/main/webapp/pages/transactionView/transaction-view.controller.js +++ b/web/src/main/webapp/pages/transactionView/transaction-view.controller.js @@ -31,10 +31,14 @@ oProgressBarService.startLoading(); oProgressBarService.setLoading(30); TransactionDaoService.getTransactionDetail($routeParams.traceId, $routeParams.focusTimestamp, function (err, result) { - if (err) { - oProgressBarService.stopLoading(); - oAlertService.showError('There is some error while downloading the data.'); - } + if (err || result.exception ) { + oProgressBarService.stopLoading(); + if ( err ) { + oAlertService.showError('There is some error while downloading the data.'); + } else { + oAlertService.showError(result.exception); + } + } oProgressBarService.setLoading(70); parseTransactionDetail(result); showCallStacks();