Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions zeppelin-web/src/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@
ngToastProvider.configure({
dismissButton: true,
dismissOnClick: false,
timeout: 6000,
verticalPosition: 'bottom'
timeout: 6000
});
});

Expand Down
6 changes: 3 additions & 3 deletions zeppelin-web/src/app/interpreter/interpreter.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ angular.module('zeppelinWebApp').controller('InterpreterCtrl', function($scope,
// add missing field of option
if (!setting.option) {
setting.option = {};
}
}
if (setting.option.remote === undefined) {
// remote always true for now
setting.option.remote = true;
Expand All @@ -94,7 +94,7 @@ angular.module('zeppelinWebApp').controller('InterpreterCtrl', function($scope,
}).
error(function (data, status, headers, config) {
console.log('Error %o %o', status, data.message);
ngToast.danger(data.message);
ngToast.danger({content: data.message, verticalPosition: 'bottom'});
form.$show();
});
}
Expand Down Expand Up @@ -210,7 +210,7 @@ angular.module('zeppelinWebApp').controller('InterpreterCtrl', function($scope,
}).
error(function(data, status, headers, config) {
console.log('Error %o %o', status, data.message);
ngToast.danger(data.message);
ngToast.danger({content: data.message, verticalPosition: 'bottom'});
});
};

Expand Down
19 changes: 17 additions & 2 deletions zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

angular.module('zeppelinWebApp')
.controller('ParagraphCtrl', function($scope,$rootScope, $route, $window, $element, $routeParams, $location,
$timeout, $compile, websocketMsgSrv) {
$timeout, $compile, websocketMsgSrv, ngToast) {
var ANGULAR_FUNCTION_OBJECT_NAME_PREFIX = '_Z_ANGULAR_FUNC_';
$scope.parentNote = null;
$scope.paragraph = null;
Expand All @@ -39,8 +39,13 @@ angular.module('zeppelinWebApp')
websocketMsgSrv.runParagraph(paragraph.id, paragraph.title, paragraph.text,
paragraph.config, paragraph.settings.params);
} else {
// Error message here
ngToast.danger({content: 'Cannot find a paragraph with id \'' + paragraphId + '\'',
verticalPosition: 'top', dismissOnTimeout: false});
}
} else {
ngToast.danger({
content: 'Please provide a \'paragraphId\' when calling z.runParagraph(paragraphId)',
verticalPosition: 'top', dismissOnTimeout: false});
}
},

Expand All @@ -49,6 +54,11 @@ angular.module('zeppelinWebApp')
// Only push to server if there paragraphId is defined
if (paragraphId) {
websocketMsgSrv.clientBindAngularObject($routeParams.noteId, varName, value, paragraphId);
} else {
ngToast.danger({
content: 'Please provide a \'paragraphId\' when calling ' +
'z.angularBind(varName, value, \'PUT_HERE_PARAGRAPH_ID\')',
verticalPosition: 'top', dismissOnTimeout: false});
}
},

Expand All @@ -57,6 +67,11 @@ angular.module('zeppelinWebApp')
// Only push to server if paragraphId is defined
if (paragraphId) {
websocketMsgSrv.clientUnbindAngularObject($routeParams.noteId, varName, paragraphId);
} else {
ngToast.danger({
content: 'Please provide a \'paragraphId\' when calling ' +
'z.angularUnbind(varName, \'PUT_HERE_PARAGRAPH_ID\')',
verticalPosition: 'top', dismissOnTimeout: false});
}
}
};
Expand Down
4 changes: 4 additions & 0 deletions zeppelin-web/src/assets/styles/looknfeel/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ body {
border-color: white;
}

.ng-toast.ng-toast--top {
top: 100px;
}

4 changes: 4 additions & 0 deletions zeppelin-web/src/assets/styles/looknfeel/report.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@ body {
.noteAction button.btn {
border-radius: 4px !important;
}

.ng-toast.ng-toast--top {
top: 100px;
}
4 changes: 4 additions & 0 deletions zeppelin-web/src/assets/styles/looknfeel/simple.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,7 @@ body {
.nv-controlsWrap {
display: block;
}

.ng-toast.ng-toast--top {
top: 100px;
}