mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
ZEPPELIN-1672 - Fix import notebook front end feature
This commit is contained in:
parent
0960dbc25d
commit
6572748fbb
1 changed files with 14 additions and 6 deletions
|
|
@ -83,12 +83,20 @@
|
|||
vm.importNote = function() {
|
||||
$scope.note.errorText = '';
|
||||
if ($scope.note.importUrl) {
|
||||
jQuery.getJSON($scope.note.importUrl, function(result) {
|
||||
vm.processImportJson(result);
|
||||
}).fail(function() {
|
||||
$scope.note.errorText = 'Unable to Fetch URL';
|
||||
$scope.$apply();
|
||||
});
|
||||
jQuery.ajax({
|
||||
url: $scope.note.importUrl,
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
jsonp: false,
|
||||
xhrFields: {
|
||||
withCredentials: false
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
$scope.note.errorText = 'Unable to Fetch URL';
|
||||
$scope.$apply();
|
||||
}}).done(function(data) {
|
||||
vm.processImportJson(data);
|
||||
});
|
||||
} else {
|
||||
$scope.note.errorText = 'Enter URL';
|
||||
$scope.$apply();
|
||||
|
|
|
|||
Loading…
Reference in a new issue