zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject [14/14] incubator-zeppelin git commit: Zeppelin-web Spring Cleaning
Date Thu, 02 Jul 2015 06:55:31 GMT
Zeppelin-web Spring Cleaning

After so much time in the Wild Wild West of Internet, It's Time for the Spring Cleaning of
Zeppelin-web.
This PR will be taking care of cleaning the code, architecture, cutting code into smaller
pieces etc...

* [x] - Change Code Folder Structure to a Folder Tree Style
* [x] - Change original code and compiled code folder names
* [x] - Update Contributing README.md to explain most of changes
* [x] - Organize well the components and app folders

We will do a first merge and handle this part in a different PR:
* [ ] - Replace as much code as possible by their lodash.js counterpart
* [ ] - Cut the code into more smaller components (who said paragraph.js?)
* [ ] - Move Jquery code out of the controllers (by directive when possible or to somewhere
else)

Needs to make sure that:
* [x] - #127 is handled

Author: Damien Corneau <corneadoug@gmail.com>
Author: CORNEAU Damien <corneadoug@gmail.com>

Closes #56 from corneadoug/improvement/SpringCleaning and squashes the following commits:

453af1a [Damien Corneau] Merge Master and Fix ports
678c0fa [Damien Corneau] Fix RAT excluded and add Apache licenses in zeppelin-web
0addb80 [Damien Corneau] Change AppScriptServlet configuration
ef764fc [Damien Corneau] Improve uglifyjs options
15cc7b1 [CORNEAU Damien] Fix README
e3ca174 [CORNEAU Damien] Small fix in doc
775f3ca [Damien Corneau] Remove unused ngdoc comments
25a3a63 [Damien Corneau] Fix Interpreter Create form
bdde389 [Damien Corneau] Set loonknfeel to default for everypage, and change only if looknfeel
is different
bdf3a8e [Damien Corneau] Include lodash + Interpreter Web refactoring Part1: reducing code
931067a [Damien Corneau] Align form label to form input + improve form disable opacity
75d12c3 [Damien Corneau] Fix CSS of paragraph forms
e3f3016 [Damien Corneau] Fix ZEPPELIN-102
a6ec901 [Damien Corneau] Fix ZEPPELIN-103
7eccca8 [Damien Corneau] Fix navbar selected menu + small code improvement
a1fe1c1 [Damien Corneau] Refactoring of Websocket
a36adf9 [Damien Corneau] Move all websocket calls to a service
b21cc69 [Damien Corneau] Refactor Navbar controller to controller pattern + data factory
5a40c4c [Damien Corneau] Separate navbar to its own html file
2dac138 [Damien Corneau] Move directives to solo directory
9201360 [Damien Corneau] Fix project after git clean
9b249ea [Damien Corneau] Clean JSHint errors except for already defined and configuration
functions related errors
ef6baa0 [CORNEAU Damien] Update Zeppelin-web CONTRIBUTING.md
411df6a [Damien Corneau] Create Zeppelin-web CONTRIBUTING.md
d3c22cf [CORNEAU Damien] Update Zeppelin-web README.md
48eed51 [Damien Corneau] Move the font css
3e28c3c [Damien Corneau] Change Zeppelin-web code and compiled code folders
0ee04a2 [Damien Corneau] Fix Grunt watch
15b502c [Damien Corneau] Change Zeppelin Folder Structure and its GruntFile
9f9059e [Damien Corneau] Add spark dependency reduced pom to gitignore


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

Branch: refs/heads/master
Commit: 8c7424a191d1a5891a48bcb5abd926f27ba30b09
Parents: ae092e9
Author: Damien Corneau <corneadoug@gmail.com>
Authored: Thu Jul 2 12:01:14 2015 +0900
Committer: Lee moon soo <moon@apache.org>
Committed: Wed Jul 1 23:55:11 2015 -0700

----------------------------------------------------------------------
 .gitignore                                      |   26 +-
 bin/common.sh                                   |    4 +-
 .../zeppelin/server/AppScriptServlet.java       |   16 +-
 zeppelin-web/.jshintrc                          |    3 +-
 zeppelin-web/CONTRIBUTING.md                    |  118 ++
 zeppelin-web/Gruntfile.js                       |  120 +-
 zeppelin-web/README.md                          |   57 +-
 zeppelin-web/app/.buildignore                   |    1 -
 zeppelin-web/app/404.html                       |  172 --
 zeppelin-web/app/WEB-INF/web.xml                |   44 -
 zeppelin-web/app/favicon.ico                    |  Bin 4286 -> 0 bytes
 zeppelin-web/app/fonts/FontAwesome.otf          |  Bin 85908 -> 0 bytes
 zeppelin-web/app/fonts/Simple-Line-Icons.eot    |  Bin 35514 -> 0 bytes
 zeppelin-web/app/fonts/Simple-Line-Icons.svg    | 1369 ---------------
 zeppelin-web/app/fonts/Simple-Line-Icons.ttf    |  Bin 35304 -> 0 bytes
 zeppelin-web/app/fonts/Simple-Line-Icons.woff   |  Bin 59324 -> 0 bytes
 zeppelin-web/app/fonts/custom-font.eot          |  Bin 1520 -> 0 bytes
 zeppelin-web/app/fonts/custom-font.svg          |   41 -
 zeppelin-web/app/fonts/custom-font.ttf          |  Bin 1340 -> 0 bytes
 zeppelin-web/app/fonts/custom-font.woff         |  Bin 1416 -> 0 bytes
 zeppelin-web/app/fonts/fontawesome-webfont.eot  |  Bin 56006 -> 0 bytes
 zeppelin-web/app/fonts/fontawesome-webfont.svg  |  520 ------
 zeppelin-web/app/fonts/fontawesome-webfont.ttf  |  Bin 112160 -> 0 bytes
 zeppelin-web/app/fonts/fontawesome-webfont.woff |  Bin 65452 -> 0 bytes
 zeppelin-web/app/images/zepLogo.png             |  Bin 18321 -> 0 bytes
 zeppelin-web/app/images/zepLogoW.png            |  Bin 16393 -> 0 bytes
 zeppelin-web/app/index.html                     |  156 --
 .../scripts/ace/textarea/src/ace-bookmarklet.js |   14 -
 zeppelin-web/app/scripts/app.js                 |  129 --
 .../app/scripts/controllers/interpreter.js      |  313 ----
 zeppelin-web/app/scripts/controllers/main.js    |  120 --
 zeppelin-web/app/scripts/controllers/nav.js     |   54 -
 .../app/scripts/controllers/notebook.js         |  494 ------
 .../app/scripts/controllers/paragraph.js        | 1620 ------------------
 .../app/scripts/directives/dropdowninput.js     |   25 -
 zeppelin-web/app/scripts/directives/ngdelete.js |   34 -
 zeppelin-web/app/scripts/directives/ngenter.js  |   36 -
 .../scripts/directives/popover-html-unsafe.js   |   28 -
 .../app/scripts/directives/resizable.js         |   41 -
 zeppelin-web/app/styles/custom-font.css         |   32 -
 zeppelin-web/app/styles/font-awesome.min.css    |    4 -
 zeppelin-web/app/styles/interpreter.css         |   79 -
 zeppelin-web/app/styles/looknfeel/default.css   |   67 -
 zeppelin-web/app/styles/looknfeel/report.css    |   69 -
 zeppelin-web/app/styles/looknfeel/simple.css    |   73 -
 zeppelin-web/app/styles/main.css                |  288 ----
 zeppelin-web/app/styles/notebook.css            |  508 ------
 zeppelin-web/app/styles/printMode.css           |   61 -
 zeppelin-web/app/styles/simple-line-icons.css   |  526 ------
 zeppelin-web/app/styles/typography.css          |   46 -
 zeppelin-web/app/views/interpreter.html         |  195 ---
 zeppelin-web/app/views/main.html                |   51 -
 zeppelin-web/app/views/modal-shortcut.html      |  130 --
 zeppelin-web/app/views/notebooks.html           |  170 --
 zeppelin-web/app/views/paragraph.html           |  449 -----
 .../app/views/popover-html-unsafe-popup.html    |   21 -
 zeppelin-web/bower.json                         |   34 +-
 zeppelin-web/package.json                       |    5 +-
 zeppelin-web/pom.xml                            |   29 +-
 zeppelin-web/src/.buildignore                   |    1 +
 zeppelin-web/src/404.html                       |  172 ++
 zeppelin-web/src/WEB-INF/web.xml                |   44 +
 zeppelin-web/src/app/app.controller.js          |   45 +
 zeppelin-web/src/app/app.js                     |   62 +
 zeppelin-web/src/app/home/home.controller.js    |   22 +
 zeppelin-web/src/app/home/home.css              |  288 ++++
 zeppelin-web/src/app/home/home.html             |   53 +
 .../interpreter-create/interpreter-create.html  |   77 +
 .../app/interpreter/interpreter.controller.js   |  202 +++
 .../src/app/interpreter/interpreter.css         |   79 +
 .../src/app/interpreter/interpreter.html        |  119 ++
 .../src/app/notebook/notebook.controller.js     |  473 +++++
 zeppelin-web/src/app/notebook/notebook.css      |  517 ++++++
 zeppelin-web/src/app/notebook/notebook.html     |  170 ++
 .../notebook/paragraph/paragraph.controller.js  | 1594 +++++++++++++++++
 .../src/app/notebook/paragraph/paragraph.html   |  449 +++++
 zeppelin-web/src/assets/images/zepLogo.png      |  Bin 0 -> 18321 bytes
 zeppelin-web/src/assets/images/zepLogoW.png     |  Bin 0 -> 16393 bytes
 .../src/assets/styles/looknfeel/default.css     |   67 +
 .../src/assets/styles/looknfeel/report.css      |   68 +
 .../src/assets/styles/looknfeel/simple.css      |   73 +
 zeppelin-web/src/assets/styles/printMode.css    |   61 +
 .../src/components/baseUrl/baseUrl.service.js   |   66 +
 .../dropdowninput/dropdowninput.directive.js    |   25 +
 .../modal-shortcut/modal-shortcut.html          |  130 ++
 .../src/components/navbar/navbar.controller.js  |   49 +
 zeppelin-web/src/components/navbar/navbar.html  |   54 +
 .../components/ngdelete/ngdelete.directive.js   |   28 +
 .../src/components/ngenter/ngenter.directive.js |   27 +
 .../notebookList.datafactory.js                 |   26 +
 .../popover-html-unsafe-popup.html              |   21 +
 .../popover-html-unsafe.directive.js            |   28 +
 .../components/resizable/resizable.directive.js |   41 +
 .../websocketEvents/websocketEvents.factory.js  |   66 +
 .../websocketEvents/websocketMsg.service.js     |  107 ++
 zeppelin-web/src/favicon.ico                    |  Bin 0 -> 4286 bytes
 zeppelin-web/src/fonts/FontAwesome.otf          |  Bin 0 -> 85908 bytes
 zeppelin-web/src/fonts/Simple-Line-Icons.eot    |  Bin 0 -> 35514 bytes
 zeppelin-web/src/fonts/Simple-Line-Icons.svg    | 1369 +++++++++++++++
 zeppelin-web/src/fonts/Simple-Line-Icons.ttf    |  Bin 0 -> 35304 bytes
 zeppelin-web/src/fonts/Simple-Line-Icons.woff   |  Bin 0 -> 59324 bytes
 zeppelin-web/src/fonts/custom-font.css          |   32 +
 zeppelin-web/src/fonts/custom-font.eot          |  Bin 0 -> 1520 bytes
 zeppelin-web/src/fonts/custom-font.svg          |   41 +
 zeppelin-web/src/fonts/custom-font.ttf          |  Bin 0 -> 1340 bytes
 zeppelin-web/src/fonts/custom-font.woff         |  Bin 0 -> 1416 bytes
 zeppelin-web/src/fonts/font-awesome.min.css     |    4 +
 zeppelin-web/src/fonts/fontawesome-webfont.eot  |  Bin 0 -> 56006 bytes
 zeppelin-web/src/fonts/fontawesome-webfont.svg  |  520 ++++++
 zeppelin-web/src/fonts/fontawesome-webfont.ttf  |  Bin 0 -> 112160 bytes
 zeppelin-web/src/fonts/fontawesome-webfont.woff |  Bin 0 -> 65452 bytes
 zeppelin-web/src/fonts/simple-line-icons.css    |  526 ++++++
 zeppelin-web/src/index.html                     |  124 ++
 .../zeppelin/conf/ZeppelinConfiguration.java    |    2 +-
 114 files changed, 8204 insertions(+), 8110 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/8c7424a1/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 93962a1..1358a42 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,26 +12,30 @@ conf/keystore
 conf/truststore
 conf/interpreter.json
 
+# other generated files
+spark/dependency-reduced-pom.xml
+
 #webapp
 zeppelin-web/node_modules
 zeppelin-web/dist
 zeppelin-web/.tmp
 zeppelin-web/.sass-cache
 zeppelin-web/bower_components
-zeppelin-web/src
 **nbproject/
 **node/
 
-logs/
-run/
-metastore_db/
-*.log
-jobs/
-zan-repo/
-drivers/
-warehouse/
-notebook/
-local-repo/
+
+# project level
+/logs/
+/run/
+/metastore_db/
+/*.log
+/jobs/
+/zan-repo/
+/drivers/
+/warehouse/
+/notebook/
+/local-repo/
 
 **/sessions/
 **/data/

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/8c7424a1/bin/common.sh
----------------------------------------------------------------------
diff --git a/bin/common.sh b/bin/common.sh
index 8087e9d..7aab870 100644
--- a/bin/common.sh
+++ b/bin/common.sh
@@ -45,8 +45,8 @@ if [[ -z "$ZEPPELIN_PID_DIR" ]]; then
 fi
 
 if [[ -z "${ZEPPELIN_WAR}" ]]; then
-  if [[ -d "${ZEPPELIN_HOME}/zeppelin-web/src/main/webapp" ]]; then
-    export ZEPPELIN_WAR="${ZEPPELIN_HOME}/zeppelin-web/src/main/webapp"
+  if [[ -d "${ZEPPELIN_HOME}/zeppelin-web/dist" ]]; then
+    export ZEPPELIN_WAR="${ZEPPELIN_HOME}/zeppelin-web/dist"
   else
     export ZEPPELIN_WAR=$(find -L "${ZEPPELIN_HOME}" -name "zeppelin-web*.war")
   fi

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/8c7424a1/zeppelin-server/src/main/java/org/apache/zeppelin/server/AppScriptServlet.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/server/AppScriptServlet.java
b/zeppelin-server/src/main/java/org/apache/zeppelin/server/AppScriptServlet.java
index 8c8f9a7..7a31461 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/server/AppScriptServlet.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/server/AppScriptServlet.java
@@ -41,7 +41,7 @@ public class AppScriptServlet extends DefaultServlet {
   private static Set<String> scriptPaths = new HashSet<String>(
     Arrays.asList(
       "/scripts/scripts.js",
-      "/scripts/app.js"
+      "/components/baseUrl/baseUrl.js"
     )
   );
 
@@ -77,14 +77,16 @@ public class AppScriptServlet extends DefaultServlet {
       script.append(new String(buffer, 0, numRead, "UTF-8"));
     }
 
-    // Replace the string "function getPort(){...}" to return
-    // the proper value
-    int startIndex = script.indexOf("function getPort()");
-    int endIndex = script.indexOf("}", startIndex);
+    // Replace the getPort function to return the proper value
+    String startReplaceString = "/* @preserve AppScriptServlet - getPort */";
+    String endReplaceString = "/* @preserve AppScriptServlet - close */";
+            
+    int startIndex = script.indexOf(startReplaceString);
+    int endIndex = script.indexOf(endReplaceString, startIndex);
 
     if (startIndex >= 0 && endIndex >= 0) {
-      String replaceString = "function getPort(){return " + websocketPort + "}";
-      script.replace(startIndex, endIndex + 1, replaceString);
+      String replaceString = "this.getPort=function(){return " + websocketPort + "};";
+      script.replace(startIndex, endIndex + endReplaceString.length(), replaceString);
     }
 
     response.getWriter().println(script.toString());

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/8c7424a1/zeppelin-web/.jshintrc
----------------------------------------------------------------------
diff --git a/zeppelin-web/.jshintrc b/zeppelin-web/.jshintrc
index 40377ba..008037e 100644
--- a/zeppelin-web/.jshintrc
+++ b/zeppelin-web/.jshintrc
@@ -12,9 +12,10 @@
   "newcap": true,
   "noarg": true,
   "quotmark": "single",
+  "shadow": "inner",
   "regexp": true,
   "undef": true,
-  "unused": true,
+  "unused": "vars",
   "strict": true,
   "trailing": true,
   "smarttabs": true,

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/8c7424a1/zeppelin-web/CONTRIBUTING.md
----------------------------------------------------------------------
diff --git a/zeppelin-web/CONTRIBUTING.md b/zeppelin-web/CONTRIBUTING.md
new file mode 100644
index 0000000..6873b0f
--- /dev/null
+++ b/zeppelin-web/CONTRIBUTING.md
@@ -0,0 +1,118 @@
+# Contributing to Zeppelin-Web
+
+## Technologies
+
+Zeppelin WebApplication is using **AngularJS** as main Framework, and **Grunt** and **Bower**
as helpers.
+
+So you might want to get familiar with it. 
+[Here is a good start](http://www.sitepoint.com/kickstart-your-angularjs-development-with-yeoman-grunt-and-bower/)
+(There is obviously plenty more ressources to learn)
+
+## Coding style
+
+* We follow mainly the [Google Javascript Guide](https://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml)
+* We use a 2 spaces indentation
+* We use single quotes
+
+But don't worry, JSHint will make you remember it for the most part.
+
+There is also a rule of **No JQuery except in directives**, If you want to include a library,
+please search for its **angularJS** directive first and if it doesn't exist, make one :)
+
+## Folder Structure & Code Organization
+
+* `src` folder: Contains the Source code for Zeppelin WebApplication
+* `dist` folder: Contains the compiled code after using **grunt build**
+
+### Src and Code Organization
+
+The `src` folder is organized as such:
+
+<pre>
+ src/
+ ├──  app/
+ │   ├──  name/
+ │   │    ├──  name.controller.js
+ |   |    ├──  name.html
+ |   |    ├──  subComponent1/
+ |   |    |    ├──  subComponent1.html
+ |   |    |    ├──  subComponent1.css
+ │   |    |    └──  subComponent1.controller.js
+ │   │    └──  name.css
+ │   └──  app.js
+ ├──  assets/
+ │   ├──  images/
+ │   └──  styles/
+ |        ├──  looknfeel/
+ │        └──  printMode.css
+ ├──  components/
+ │   ├──  component1/
+ |   |    ├──  component1.html
+ │   |    └──  component1.controller.js
+ │   └──  component2/
+ ├──  fonts/
+ |    ├──  *.{eot,svg,ttf,woff,otf}
+ │    └──  *.css
+ ├──  favico.ico
+ ├──  index.html
+ └──  404.html
+</pre>
+
+The code is now organized in a component type of architecture, where everything is logically
grouped.
+
+#### File type name convention
+
+In order to understand what is contained inside the .js files without opening it, we use
some name conventions:
+* .controller.js
+* .directive.js
+* .service.js
+
+### Component Architecture
+
+When we talk about Component architecture, we think about grouping files together in a logical
way.
+
+A component can then be made of multiple files like `.html`, `.css` or any other file type
mentioned above.
+
+Related components can be grouped as sub-component as long as they are used in that component
only.
+
+
+#### App folder
+
+Contains the application `app.js` and page related components.
+* Home Page
+* Interpreter Page
+* Notebook Page
+etc...
+
+The only resctiction being that a component in the `app` folder is **not used anywhere else**
+
+#### Components folder
+
+The `components` folder is here to contains any reusable component (used more than once)
+
+### Fonts
+
+Fonts files and their css are mixed together in the `fonts` folder
+
+## Compiling and using dev mode
+
+As we do not use yeoman to generate controllers or other type of files with this new structure,
+we need to do some includes manually in `index.html` in order to use dev mode and compile
correctly.
+
+* Non-bower `.js` files needs to be injected between the tag `<!-- build:js({.tmp,src})
scripts/scripts.js -->`
+* Css files needs to be injected between the tag `<!-- build:css(.tmp) styles/main.css
-->`
+
+## Add plugins with Bower
+```
+bower install <plugin> --save
+```
+The file index.html will automatically update with the new bower_component
+
+<br/>
+
+**Example**: `./bower install angular-nvd3` 
+
+You should find that line in the index.html file
+```
+<script src="bower_components/angular-nvd3/dist/angular-nvd3.js"></script>
+````

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/8c7424a1/zeppelin-web/Gruntfile.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/Gruntfile.js b/zeppelin-web/Gruntfile.js
index d544ba4..dc2a33e 100644
--- a/zeppelin-web/Gruntfile.js
+++ b/zeppelin-web/Gruntfile.js
@@ -34,8 +34,8 @@ module.exports = function (grunt) {
 
   // Configurable paths for the application
   var appConfig = {
-    app: require('./bower.json').appPath || 'app',
-    dist: 'src/main/webapp'
+    app: require('./bower.json').appPath || 'src',
+    dist: 'dist'
   };
 
   // Define the configuration for all the tasks
@@ -63,7 +63,10 @@ module.exports = function (grunt) {
         tasks: ['wiredep']
       },
       js: {
-        files: ['<%= yeoman.app %>/scripts/{,*/}*.js'],
+        files: [
+          '<%= yeoman.app %>/app/**/*.js',
+          '<%= yeoman.app %>/components/**/*.js'
+        ],
         tasks: ['newer:jshint:all'],
         options: {
           livereload: '<%= connect.options.livereload %>'
@@ -74,7 +77,12 @@ module.exports = function (grunt) {
         tasks: ['newer:jshint:test', 'karma']
       },
       styles: {
-        files: ['<%= yeoman.app %>/styles/{,*/}*.css'],
+        files: [
+          '<%= yeoman.app %>/app/**/*.css',
+          '<%= yeoman.app %>/components/**/*.css',
+          '<%= yeoman.app %>/assets/styles/**/*.css',
+          '<%= yeoman.app %>/fonts/**/*.css'
+        ],
         tasks: ['newer:copy:styles', 'autoprefixer']
       },
       gruntfile: {
@@ -85,9 +93,11 @@ module.exports = function (grunt) {
           livereload: '<%= connect.options.livereload %>'
         },
         files: [
-          '<%= yeoman.app %>/{,*/}*.html',
+          '<%= yeoman.app %>/app/**/*.html',
+          '<%= yeoman.app %>/*.html',
+          '<%= yeoman.app %>/components/**/*.html',
           '.tmp/styles/{,*/}*.css',
-          '<%= yeoman.app %>/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
+          '<%= yeoman.app %>/assets/images/**/*.{png,jpg,jpeg,gif,webp,svg}'
         ]
       }
     },
@@ -148,7 +158,8 @@ module.exports = function (grunt) {
       all: {
         src: [
           'Gruntfile.js',
-          '<%= yeoman.app %>/scripts/{,*/}*.js'
+          '<%= yeoman.app %>/app/**/*.js',
+          '<%= yeoman.app %>/components/**/*.js'
         ]
       },
       test: {
@@ -199,18 +210,6 @@ module.exports = function (grunt) {
       }
     },
 
-    // Renames files for browser caching purposes
-    filerev: {
-      dist: {
-        src: [
-          '<%= yeoman.dist %>/scripts/{,*/}*.js',
-          '<%= yeoman.dist %>/styles/*.css',
-          '<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
-          '<%= yeoman.dist %>/styles/fonts/*'
-        ]
-      }
-    },
-
     // Reads HTML for usemin blocks to enable smart builds that automatically
     // concat, minify and revision files. Creates configurations in memory so
     // additional tasks can operate on them
@@ -235,7 +234,7 @@ module.exports = function (grunt) {
       html: ['<%= yeoman.dist %>/{,*/}*.html'],
       css: ['<%= yeoman.dist %>/styles/*.css'],
       options: {
-        assetsDirs: ['<%= yeoman.dist %>','<%= yeoman.dist %>/images']
+        assetsDirs: ['<%= yeoman.dist %>','<%= yeoman.dist %>/assets']
       }
     },
 
@@ -243,24 +242,35 @@ module.exports = function (grunt) {
     // By default, your `index.html`'s <!-- Usemin block --> will take care of
     // minification. These next options are pre-configured if you do not wish
     // to use the Usemin blocks.
-    // cssmin: {
-    //   dist: {
-    //     files: {
-    //       '<%= yeoman.dist %>/styles/main.css': [
-    //         '.tmp/styles/{,*/}*.css'
-    //       ]
-    //     }
-    //   }
-    // },
-    // uglify: {
-    //   dist: {
-    //     files: {
-    //       '<%= yeoman.dist %>/scripts/scripts.js': [
-    //         '<%= yeoman.dist %>/scripts/scripts.js'
-    //       ]
-    //     }
-    //   }
-    // },
+    cssmin: {
+      dist: {
+        files: {
+          '<%= yeoman.dist %>/styles/main.css': [
+            '.tmp/styles/{,*/}*.css'
+          ]
+        }
+      }
+    },
+
+    uglify: {
+      options: {
+        mangle: {
+          screw_ie8: true
+        },
+        preserveComments: 'some',
+        compress: {
+          screw_ie8: true,
+          sequences: true,
+          dead_code: true,
+          conditionals: true,
+          booleans: true,
+          unused: true,
+          if_return: true,
+          join_vars: true,
+          drop_console: true
+        }
+      }
+    },
     // concat: {
     //   dist: {}
     // },
@@ -269,9 +279,9 @@ module.exports = function (grunt) {
       dist: {
         files: [{
           expand: true,
-          cwd: '<%= yeoman.app %>/images',
+          cwd: '<%= yeoman.app %>/assets/images',
           src: '{,*/}*.svg',
-          dest: '<%= yeoman.dist %>/images'
+          dest: '<%= yeoman.dist %>/assets/images'
         }]
       }
     },
@@ -288,7 +298,11 @@ module.exports = function (grunt) {
         files: [{
           expand: true,
           cwd: '<%= yeoman.dist %>',
-          src: ['*.html', 'views/{,*/}*.html'],
+          src: [
+            '*.html',
+            'app/**/*.html',
+            'components/**/*.html'
+          ],
           dest: '<%= yeoman.dist %>'
         }]
       }
@@ -306,18 +320,21 @@ module.exports = function (grunt) {
             '*.{ico,png,txt}',
             '.htaccess',
             '*.html',
-            'views/{,*/}*.html',
-            'images/*',
-            'fonts/*',
-            'WEB-INF/*',
-            'scripts/ace/{,*/}/{,*/}/*'
+            'assets/styles/**/*',
+            'assets/images/**/*',
+            'WEB-INF/*'
           ]
         }, {
+          // copy fonts
+          expand : true,
+          cwd: '<%= yeoman.app %>',
+          dest: '<%= yeoman.dist %>',
+          src: ['fonts/**/*.{eot,svg,ttf,woff}']
+        }, {
           expand : true,
-          dot : true,
           cwd: '<%= yeoman.app %>',
           dest: '<%= yeoman.dist %>',
-          src: ['styles/looknfeel/*']
+          src: ['app/**/*.html', 'components/**/*.html']
         }, {
           expand: true,
           cwd: '.tmp/images',
@@ -337,9 +354,10 @@ module.exports = function (grunt) {
       },
       styles: {
         expand: true,
-        cwd: '<%= yeoman.app %>/styles',
+        flatten: true,
+        cwd: '<%= yeoman.app %>',
         dest: '.tmp/styles/',
-        src: '{,*/}*.css'
+        src: '{fonts,components,app}/**/*.css'
       }
     },
 
@@ -378,7 +396,6 @@ module.exports = function (grunt) {
       'concurrent:server',
       'autoprefixer',
       'connect:livereload',
-      /*'newer:jshint'*/
       'watch'
     ]);
   });
@@ -407,7 +424,6 @@ module.exports = function (grunt) {
     'copy:dist',
     'cssmin',
     'uglify',
-    /*'filerev',*/
     'usemin',
     'htmlmin'
   ]);

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/8c7424a1/zeppelin-web/README.md
----------------------------------------------------------------------
diff --git a/zeppelin-web/README.md b/zeppelin-web/README.md
index 4df6e4c..cbd7d73 100644
--- a/zeppelin-web/README.md
+++ b/zeppelin-web/README.md
@@ -1,12 +1,34 @@
 # Zeppelin Web Application
-This is a Zeppelin web frontend project.
+This is Zeppelin's frontend project.
 
 
 ## Compile Zeppelin web
-If you want to compile the WebApplication, you will have to simply run `mvn package`.
+
+### New environment
+
+If you want to compile the WebApplication only, you will have to simply run `mvn package`
in this folder.
+
 This will Download all the dependencies including node js and npm (you will find the binaries
in the folder `zeppelin-web/node`).
 
-We also provide some **helper script** for bower and grunt (you dont need to install them).
+We are supposed to provide some **helper script** for __bower__ and __grunt__, but they are
currently outdated, so you might want install them on your machine and use them instead.
+
+### Configured environment
+
+Here are the basic commands to compile the WebApplication with a configured environment (Installed
grunt, bower, npm)
+
+**Build the application for production**
+
+`./grunt build`
+
+**Run the application in dev mode**
+
+``./grunt serve``
+
+This will launch a Zeppelin WebApplication on port **9000** and update on code changes.
+(You will need to have Zeppelin running on the side)
+
+
+#### Troubleshooting
 
 In case of the error `ECMDERR Failed to execute "git ls-remote --tags --heads git://xxxxx",
exit code of #128`
 
@@ -24,31 +46,4 @@ Try to add to the `.bowerrc` file the following content:
 and retry to build again.
 
 ## Contribute on Zeppelin Web
-If you wish to help us to contribute on Zeppelin Web, you will need to install some deps.
-Here this is a good start to understand how zeppelin web is architectured.
-http://www.sitepoint.com/kickstart-your-angularjs-development-with-yeoman-grunt-and-bower/
-
-### Run the application in dev mode
-``./grunt serve``
-
-### Build the application
-`./grunt build`
-
-### Add composents to Zeppelin Webapp
- * New controller : `yo angular:controller <controlerName>`
- * New directive : `yo angular:directive <directiveName>`
- * New service : `yo angular:service <serviceName>`
-
- ### Add plugin
- 
- `./bower install <plugin> -save`
- update the file index.html with the new bower_components 
- 
- ex: `./bower install angular-nvd3` 
- ```
- <script src="bower_components/angular-nvd3/dist/angular-nvd3.js"></script>
- ````
-
-
-
-
+If you wish to help us and contribute to Zeppelin WebApplication, please look at [Zeppelin
WebApplication's contribution guideline](CONTRIBUTING.md).

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/8c7424a1/zeppelin-web/app/.buildignore
----------------------------------------------------------------------
diff --git a/zeppelin-web/app/.buildignore b/zeppelin-web/app/.buildignore
deleted file mode 100644
index fc98b8e..0000000
--- a/zeppelin-web/app/.buildignore
+++ /dev/null
@@ -1 +0,0 @@
-*.coffee
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/8c7424a1/zeppelin-web/app/404.html
----------------------------------------------------------------------
diff --git a/zeppelin-web/app/404.html b/zeppelin-web/app/404.html
deleted file mode 100644
index 9b1fb4c..0000000
--- a/zeppelin-web/app/404.html
+++ /dev/null
@@ -1,172 +0,0 @@
-<!--
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta charset="utf-8">
-    <title>Page Not Found :(</title>
-    <style>
-      ::-moz-selection {
-        background: #b3d4fc;
-        text-shadow: none;
-      }
-
-      ::selection {
-        background: #b3d4fc;
-        text-shadow: none;
-      }
-
-      html {
-        padding: 30px 10px;
-        font-size: 20px;
-        line-height: 1.4;
-        color: #737373;
-        background: #f0f0f0;
-        -webkit-text-size-adjust: 100%;
-        -ms-text-size-adjust: 100%;
-      }
-
-      html,
-      input {
-        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-      }
-
-      body {
-        max-width: 500px;
-        _width: 500px;
-        padding: 30px 20px 50px;
-        border: 1px solid #b3b3b3;
-        border-radius: 4px;
-        margin: 0 auto;
-        box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff;
-        background: #fcfcfc;
-      }
-
-      h1 {
-        margin: 0 10px;
-        font-size: 50px;
-        text-align: center;
-      }
-
-      h1 span {
-        color: #bbb;
-      }
-
-      h3 {
-        margin: 1.5em 0 0.5em;
-      }
-
-      p {
-        margin: 1em 0;
-      }
-
-      ul {
-        padding: 0 0 0 40px;
-        margin: 1em 0;
-      }
-
-      .container {
-        max-width: 380px;
-        _width: 380px;
-        margin: 0 auto;
-      }
-
-      /* google search */
-
-      #goog-fixurl ul {
-        list-style: none;
-        padding: 0;
-        margin: 0;
-      }
-
-      #goog-fixurl form {
-        margin: 0;
-      }
-
-      #goog-wm-qt,
-      #goog-wm-sb {
-        border: 1px solid #bbb;
-        font-size: 16px;
-        line-height: normal;
-        vertical-align: top;
-        color: #444;
-        border-radius: 2px;
-      }
-
-      #goog-wm-qt {
-        width: 220px;
-        height: 20px;
-        padding: 5px;
-        margin: 5px 10px 0 0;
-        box-shadow: inset 0 1px 1px #ccc;
-      }
-
-      #goog-wm-sb {
-        display: inline-block;
-        height: 32px;
-        padding: 0 10px;
-        margin: 5px 0 0;
-        white-space: nowrap;
-        cursor: pointer;
-        background-color: #f5f5f5;
-        background-image: -webkit-linear-gradient(rgba(255,255,255,0), #f1f1f1);
-        background-image: -moz-linear-gradient(rgba(255,255,255,0), #f1f1f1);
-        background-image: -ms-linear-gradient(rgba(255,255,255,0), #f1f1f1);
-        background-image: -o-linear-gradient(rgba(255,255,255,0), #f1f1f1);
-        -webkit-appearance: none;
-        -moz-appearance: none;
-        appearance: none;
-        *overflow: visible;
-        *display: inline;
-        *zoom: 1;
-      }
-
-      #goog-wm-sb:hover,
-      #goog-wm-sb:focus {
-        border-color: #aaa;
-        box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
-        background-color: #f8f8f8;
-      }
-
-      #goog-wm-qt:hover,
-      #goog-wm-qt:focus {
-        border-color: #105cb6;
-        outline: 0;
-        color: #222;
-      }
-
-      input::-moz-focus-inner {
-        padding: 0;
-        border: 0;
-      }
-    </style>
-  </head>
-  <body>
-    <div class="container">
-      <h1>Not found <span>:(</span></h1>
-      <p>Sorry, but the page you were trying to view does not exist.</p>
-      <p>It looks like this was the result of either:</p>
-      <ul>
-        <li>a mistyped address</li>
-        <li>an out-of-date link</li>
-      </ul>
-      <script>
-        var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host;
-      </script>
-      <script src="//linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
-    </div>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/8c7424a1/zeppelin-web/app/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/zeppelin-web/app/WEB-INF/web.xml b/zeppelin-web/app/WEB-INF/web.xml
deleted file mode 100644
index f34da18..0000000
--- a/zeppelin-web/app/WEB-INF/web.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~    http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
-	version="2.5">
-
- <display-name>zeppelin-web</display-name>
-	<servlet>
-		<servlet-name>default</servlet-name>
-		<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
-		<init-param>
-			<param-name>com.sun.jersey.config.property.packages</param-name>
-			<param-value>org.apache.zeppelin.rest;com.wordnik.swagger.jersey.listing</param-value>
-		</init-param>
-		<load-on-startup>1</load-on-startup>
-	</servlet>
-
-	<!-- This route is for swagger, must be different than root -->
-	<servlet-mapping>
-		<servlet-name>default</servlet-name>
-		<url-pattern>/rest/*</url-pattern>
-	</servlet-mapping>
-
-	<context-param>
-		<param-name>configuration</param-name>
-		<param-value>deployment</param-value>
-	</context-param>
-</web-app>

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/8c7424a1/zeppelin-web/app/favicon.ico
----------------------------------------------------------------------
diff --git a/zeppelin-web/app/favicon.ico b/zeppelin-web/app/favicon.ico
deleted file mode 100644
index 7e5049a..0000000
Binary files a/zeppelin-web/app/favicon.ico and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/8c7424a1/zeppelin-web/app/fonts/FontAwesome.otf
----------------------------------------------------------------------
diff --git a/zeppelin-web/app/fonts/FontAwesome.otf b/zeppelin-web/app/fonts/FontAwesome.otf
deleted file mode 100644
index 81c9ad9..0000000
Binary files a/zeppelin-web/app/fonts/FontAwesome.otf and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/8c7424a1/zeppelin-web/app/fonts/Simple-Line-Icons.eot
----------------------------------------------------------------------
diff --git a/zeppelin-web/app/fonts/Simple-Line-Icons.eot b/zeppelin-web/app/fonts/Simple-Line-Icons.eot
deleted file mode 100644
index d258f62..0000000
Binary files a/zeppelin-web/app/fonts/Simple-Line-Icons.eot and /dev/null differ



Mime
View raw message