Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master 8ade54ee1 -> 04b2f0b74


ZEPPELIN-216: Update ACE version, Change theme from Github to Chrome, add 'SH' 
mode.

Note that this PR has merged ZEPPELIN-141!

Author: tzolov <[email protected]>

Closes #200 from tzolov/ZEPPELIN-216 and squashes the following commits:

ac53756 [tzolov] ZEPPELIN-216: Set Update ACE-Build to 1.1.9; Change theme to 
Chrome; Add SH syntax mode


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

Branch: refs/heads/master
Commit: 04b2f0b74faea45ff0bbabd70e878f5b0ff00877
Parents: 8ade54e
Author: tzolov <[email protected]>
Authored: Thu Aug 6 09:36:47 2015 +0200
Committer: Lee moon soo <[email protected]>
Committed: Fri Aug 14 06:57:40 2015 -0700

----------------------------------------------------------------------
 zeppelin-web/bower.json                         |  7 ++++---
 .../notebook/paragraph/paragraph.controller.js  | 20 ++++++++++++--------
 zeppelin-web/src/index.html                     |  3 ++-
 3 files changed, 18 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/04b2f0b7/zeppelin-web/bower.json
----------------------------------------------------------------------
diff --git a/zeppelin-web/bower.json b/zeppelin-web/bower.json
index 036c403..b5b439a 100644
--- a/zeppelin-web/bower.json
+++ b/zeppelin-web/bower.json
@@ -13,7 +13,7 @@
     "angular-route": "1.3.8",
     "angular-bootstrap": "~0.13.0",
     "angular-websocket": "~1.0.13",
-    "ace-builds": "1.1.8",
+    "ace-builds": "1.1.9",
     "angular-ui-ace": "0.1.1",
     "jquery.scrollTo": "~1.4.13",
     "nvd3": "~1.1.15-beta",
@@ -41,11 +41,12 @@
         "src-noconflict/mode-scala.js",
         "src-noconflict/mode-sql.js",
         "src-noconflict/mode-markdown.js",
+        "src-noconflict/mode-sh.js",
         "src-noconflict/keybinding-emacs.js",
         "src-noconflict/ext-language_tools.js",
-        "src-noconflict/theme-github.js"
+        "src-noconflict/theme-chrome.js"
       ],
-      "version": "1.1.8",
+      "version": "1.1.9",
       "name": "ace-builds"
     },
     "highlightjs": {

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/04b2f0b7/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js 
b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
index 56d3a8f..50614f5 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
@@ -22,7 +22,8 @@ angular.module('zeppelinWebApp')
   $scope.paragraph = null;
   $scope.editor = null;
 
-  var editorMode = {scala: 'ace/mode/scala', sql: 'ace/mode/sql', markdown: 
'ace/mode/markdown'};
+  var editorMode = {scala: 'ace/mode/scala', sql: 'ace/mode/sql', markdown: 
'ace/mode/markdown', 
+                 sh: 'ace/mode/sh'};
 
   // Controller init
   $scope.init = function(newParagraph) {
@@ -434,6 +435,7 @@ angular.module('zeppelinWebApp')
       $scope.editor.setHighlightActiveLine(false);
       $scope.editor.setHighlightGutterLine(false);
       $scope.editor.setTheme('ace/theme/github');
+      $scope.editor.setTheme('ace/theme/chrome');
       $scope.editor.focus();
       var hight = $scope.editor.getSession().getScreenLength() * 
$scope.editor.renderer.lineHeight + $scope.editor.renderer.scrollBar.getWidth();
       setEditorHeight(_editor.container.id, hight);
@@ -450,13 +452,15 @@ angular.module('zeppelinWebApp')
       var sqlModeTest = /^%(\w*\.)?\wql/;
 
       $scope.setParagraphMode = function(session, paragraphText) {
-         if (sqlModeTest.test(String(paragraphText))) {
-                 session.setMode(editorMode.sql);
-          } else if ( String(paragraphText).startsWith('%md')) {
-                 session.setMode(editorMode.markdown);
-          } else {
-                 session.setMode(editorMode.scala);
-          }
+        if (sqlModeTest.test(String(paragraphText))) {
+          session.setMode(editorMode.sql);
+        } else if ( String(paragraphText).startsWith('%md')) {
+          session.setMode(editorMode.markdown);
+        } else if ( String(paragraphText).startsWith('%sh')) {
+          session.setMode(editorMode.sh);
+        } else {
+          session.setMode(editorMode.scala);
+        }
       };
 
       var remoteCompleter = {

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/04b2f0b7/zeppelin-web/src/index.html
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/index.html b/zeppelin-web/src/index.html
index 554034f..6fdc2f2 100644
--- a/zeppelin-web/src/index.html
+++ b/zeppelin-web/src/index.html
@@ -92,9 +92,10 @@ limitations under the License.
     <script 
src="bower_components/ace-builds/src-noconflict/mode-scala.js"></script>
     <script 
src="bower_components/ace-builds/src-noconflict/mode-sql.js"></script>
     <script 
src="bower_components/ace-builds/src-noconflict/mode-markdown.js"></script>
+    <script 
src="bower_components/ace-builds/src-noconflict/mode-sh.js"></script>
     <script 
src="bower_components/ace-builds/src-noconflict/keybinding-emacs.js"></script>
     <script 
src="bower_components/ace-builds/src-noconflict/ext-language_tools.js"></script>
-    <script 
src="bower_components/ace-builds/src-noconflict/theme-github.js"></script>
+    <script 
src="bower_components/ace-builds/src-noconflict/theme-chrome.js"></script>
     <script src="bower_components/angular-ui-ace/ui-ace.js"></script>
     <script src="bower_components/jquery.scrollTo/jquery.scrollTo.js"></script>
     <script src="bower_components/d3/d3.js"></script>

Reply via email to