From d398172c8377fee6f46bff457472ac68262c8f03 Mon Sep 17 00:00:00 2001 From: 10069681 Date: Wed, 7 Jun 2017 15:22:15 +0800 Subject: [PATCH 1/1] KYLIN-2660 'Load Hive Table From Tree' page always show 'Loading Databases' without error tips, when hive error occurs and can not be connected. --- webapp/app/js/controllers/sourceMeta.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/webapp/app/js/controllers/sourceMeta.js b/webapp/app/js/controllers/sourceMeta.js index e2fdd6656..c2122adda 100755 --- a/webapp/app/js/controllers/sourceMeta.js +++ b/webapp/app/js/controllers/sourceMeta.js @@ -252,6 +252,15 @@ KylinApp } $scope.hiveLoaded = true; $scope.showMoreDatabases(); + }, function (e) { + if (e.data && e.data.exception) { + var message = e.data.exception; + var msg = !!(message) ? message : 'Failed to take action.'; + SweetAlert.swal('Oops...', msg, 'error'); + } else { + SweetAlert.swal('Oops...', "Failed to take action.", 'error'); + } + $scope.hiveLoaded = true; }); } -- 2.11.0.windows.1