You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mo...@apache.org on 2016/03/31 17:08:28 UTC

incubator-zeppelin git commit: replace standard alert and confirm with BootstrapDialog

Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master 1852ab6f7 -> 0ee791ce2


replace standard alert and confirm with BootstrapDialog

### What is this PR for?
Replace standard alert and confirm with BootstrapDialog.
Most of these were already take care by https://github.com/apache/incubator-zeppelin/pull/501

### What type of PR is it?
Bug Fix

### What is the Jira issue?
N/A

### How should this be tested?
Try accessing a notebook by user who is not authorized, instead of standard alert there should be a BootstrapDialog.

### Screenshots (if appropriate)
Before:
![screen shot 2016-03-28 at 3 50 59 pm](https://cloud.githubusercontent.com/assets/674497/14076259/d28ee552-f4fd-11e5-80d9-ac648e06c373.png)

After:
![screen shot 2016-03-28 at 3 53 22 pm](https://cloud.githubusercontent.com/assets/674497/14076263/d6410356-f4fd-11e5-8d71-62be584c424f.png)

Author: Prabhjyot Singh <pr...@gmail.com>

Closes #802 from prabhjyotsingh/bootstrapDialog and squashes the following commits:

c561688 [Prabhjyot Singh] replace standard alert and confirm with BootstrapDialog


Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/0ee791ce
Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/0ee791ce
Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/0ee791ce

Branch: refs/heads/master
Commit: 0ee791ce29b2c72b6c662d5e1e154fb8dde8c60e
Parents: 1852ab6
Author: Prabhjyot Singh <pr...@gmail.com>
Authored: Mon Mar 28 15:54:38 2016 +0530
Committer: Lee moon soo <mo...@apache.org>
Committed: Thu Mar 31 08:08:51 2016 -0700

----------------------------------------------------------------------
 zeppelin-web/src/app/notebook/notebook.controller.js           | 6 +++++-
 .../src/components/websocketEvents/websocketEvents.factory.js  | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/0ee791ce/zeppelin-web/src/app/notebook/notebook.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/notebook.controller.js b/zeppelin-web/src/app/notebook/notebook.controller.js
index fb1120e..3656394 100644
--- a/zeppelin-web/src/app/notebook/notebook.controller.js
+++ b/zeppelin-web/src/app/notebook/notebook.controller.js
@@ -686,7 +686,11 @@ angular.module('zeppelinWebApp').controller('NotebookCtrl',
     }).
     error(function(data, status, headers, config) {
       console.log('Error %o %o', status, data.message);
-      alert(data.message);
+      BootstrapDialog.alert({
+        closable: true,
+        title: 'Insufficient privileges',
+        message: data.message
+      });
     });
   };
 

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/0ee791ce/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js b/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js
index 7ea70f8..0367889 100644
--- a/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js
+++ b/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js
@@ -60,7 +60,11 @@ angular.module('zeppelinWebApp').factory('websocketEvents', function($rootScope,
     } else if (op === 'NOTES_INFO') {
       $rootScope.$broadcast('setNoteMenu', data.notes);
     } else if (op === 'AUTH_INFO') {
-      alert(data.info.toString());
+      BootstrapDialog.alert({
+        closable: true,
+        title: 'Insufficient privileges',
+        message: data.info.toString()
+      });
     } else if (op === 'PARAGRAPH') {
       $rootScope.$broadcast('updateParagraph', data);
     } else if (op === 'PARAGRAPH_APPEND_OUTPUT') {