ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject git commit: AMBARI-6466. Create UI skeleton. (onechiporenko)
Date Fri, 11 Jul 2014 11:15:47 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 76ad10f4a -> f3c8c2856


AMBARI-6466. Create UI skeleton. (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f3c8c285
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f3c8c285
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f3c8c285

Branch: refs/heads/trunk
Commit: f3c8c28562c6726733541b36b9a271d443aa0b16
Parents: 76ad10f
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Fri Jul 11 14:11:36 2014 +0300
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Fri Jul 11 14:11:36 2014 +0300

----------------------------------------------------------------------
 .../views/jobs/src/main/resources/ui/.bowerrc   |   3 +
 .../jobs/src/main/resources/ui/.editorconfig    |  22 ++
 .../jobs/src/main/resources/ui/.gitattributes   |   1 +
 .../views/jobs/src/main/resources/ui/.gitignore |   8 +
 .../views/jobs/src/main/resources/ui/.jshintrc  |  24 ++
 .../jobs/src/main/resources/ui/Gruntfile.js     | 379 +++++++++++++++++++
 .../jobs/src/main/resources/ui/app/index.html   |  45 +++
 .../src/main/resources/ui/app/scripts/app.js    |  28 ++
 .../src/main/resources/ui/app/scripts/router.js |  21 +
 .../ui/app/scripts/routes/application_route.js  |  25 ++
 .../src/main/resources/ui/app/scripts/store.js  |  19 +
 .../src/main/resources/ui/app/styles/main.less  |  19 +
 .../resources/ui/app/templates/application.hbs  |  21 +
 .../main/resources/ui/app/templates/index.hbs   |  19 +
 .../views/jobs/src/main/resources/ui/bower.json |  15 +
 .../jobs/src/main/resources/ui/package.json     |  35 ++
 .../jobs/src/main/resources/ui/test/.bowerrc    |   3 +
 .../jobs/src/main/resources/ui/test/bower.json  |   9 +
 .../jobs/src/main/resources/ui/test/index.html  |  27 ++
 .../src/main/resources/ui/test/spec/test.js     |  29 ++
 20 files changed, 752 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/.bowerrc
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/.bowerrc b/contrib/views/jobs/src/main/resources/ui/.bowerrc
new file mode 100644
index 0000000..ba0accc
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/.bowerrc
@@ -0,0 +1,3 @@
+{
+    "directory": "app/bower_components"
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/.editorconfig
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/.editorconfig b/contrib/views/jobs/src/main/resources/ui/.editorconfig
new file mode 100644
index 0000000..d087eda
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/.editorconfig
@@ -0,0 +1,22 @@
+# EditorConfig helps developers define and maintain consistent
+# EditorConfig helps developers define and maintain consistent
+# coding styles between different editors and IDEs
+# editorconfig.org
+
+root = true
+
+
+[*]
+
+# Change these settings to your own preference
+indent_style = space
+indent_size = 4
+
+# We recommend you to keep these unchanged
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/.gitattributes
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/.gitattributes b/contrib/views/jobs/src/main/resources/ui/.gitattributes
new file mode 100644
index 0000000..2125666
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/.gitattributes
@@ -0,0 +1 @@
+* text=auto
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/.gitignore
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/.gitignore b/contrib/views/jobs/src/main/resources/ui/.gitignore
new file mode 100644
index 0000000..503a8a9
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/.gitignore
@@ -0,0 +1,8 @@
+node_modules
+temp
+dist
+.sass-cache
+.tmp
+app/bower_components
+test/bower_components
+.editorconfig
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/.jshintrc
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/.jshintrc b/contrib/views/jobs/src/main/resources/ui/.jshintrc
new file mode 100644
index 0000000..780790d
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/.jshintrc
@@ -0,0 +1,24 @@
+{
+    "node": true,
+    "browser": true,
+    "esnext": true,
+    "bitwise": false,
+    "curly": false,
+    "eqeqeq": true,
+    "eqnull": true,
+    "immed": true,
+    "latedef": true,
+    "newcap": true,
+    "noarg": true,
+    "undef": true,
+    "strict": false,
+    "trailing": false,
+    "smarttabs": true,
+    "globals": {
+        "App": true,
+        "jQuery": true,
+        "Ember": true,
+        "Handlebars": true,
+        "DS": true
+    }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/Gruntfile.js
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/Gruntfile.js b/contrib/views/jobs/src/main/resources/ui/Gruntfile.js
new file mode 100644
index 0000000..5ebf75d
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/Gruntfile.js
@@ -0,0 +1,379 @@
+// Generated on 2014-06-24 using generator-ember 0.8.4
+'use strict';
+var LIVERELOAD_PORT = 35729;
+var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
+var mountFolder = function (connect, dir) {
+  return connect.static(require('path').resolve(dir));
+};
+
+// # Globbing
+// for performance reasons we're only matching one level down:
+// 'test/spec/{,*/}*.js'
+// use this if you want to match all subfolders:
+// 'test/spec/**/*.js'
+
+module.exports = function (grunt) {
+  // show elapsed time at the end
+  require('time-grunt')(grunt);
+  // load all grunt tasks
+  require('load-grunt-tasks')(grunt);
+
+  // configurable paths
+  var yeomanConfig = {
+    app: 'app',
+    dist: 'dist'
+  };
+
+  grunt.initConfig({
+    yeoman: yeomanConfig,
+    watch: {
+      emberTemplates: {
+        files: '<%= yeoman.app %>/templates/**/*.hbs',
+        tasks: ['emberTemplates']
+      },
+      neuter: {
+        files: ['<%= yeoman.app %>/scripts/{,*/}*.js'],
+        tasks: ['neuter']
+      },
+      less: {
+        files: '<%= yeoman.app %>/styles/**/*.less',
+        tasks: ['less:development']
+      },
+      livereload: {
+        options: {
+          livereload: LIVERELOAD_PORT
+        },
+        files: [
+          '.tmp/scripts/*.js',
+          '<%= yeoman.app %>/*.html',
+          '{.tmp,<%= yeoman.app %>}/styles/{,*/}*.css',
+          '<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
+        ]
+      }
+    },
+    connect: {
+      options: {
+        port: 9000,
+        // change this to '0.0.0.0' to access the server from outside
+        hostname: 'localhost'
+      },
+      livereload: {
+        options: {
+          middleware: function (connect) {
+            return [
+              lrSnippet,
+              mountFolder(connect, '.tmp'),
+              mountFolder(connect, yeomanConfig.app)
+            ];
+          }
+        }
+      },
+      test: {
+        options: {
+          middleware: function (connect) {
+            return [
+              mountFolder(connect, 'test'),
+              mountFolder(connect, '.tmp')
+            ];
+          }
+        }
+      },
+      dist: {
+        options: {
+          middleware: function (connect) {
+            return [
+              mountFolder(connect, yeomanConfig.dist)
+            ];
+          }
+        }
+      }
+    },
+    open: {
+      server: {
+        path: 'http://localhost:<%= connect.options.port %>'
+      }
+    },
+    clean: {
+      dist: {
+        files: [
+          {
+            dot: true,
+            src: [
+              '.tmp',
+              '<%= yeoman.dist %>/*',
+              '!<%= yeoman.dist %>/.git*'
+            ]
+          }
+        ]
+      },
+      server: '.tmp'
+    },
+    jshint: {
+      options: {
+        jshintrc: '.jshintrc',
+        reporter: require('jshint-stylish')
+      },
+      all: [
+        'Gruntfile.js',
+        '<%= yeoman.app %>/scripts/{,*/}*.js',
+        '!<%= yeoman.app %>/scripts/vendor/*',
+        'test/spec/{,*/}*.js'
+      ]
+    },
+    mocha: {
+      all: {
+        options: {
+          run: true,
+          urls: ['http://localhost:<%= connect.options.port %>/index.html']
+        }
+      }
+    },
+    // not used since Uglify task does concat,
+    // but still available if needed
+    /*concat: {
+     dist: {}
+     },*/
+    // not enabled since usemin task does concat and uglify
+    // check index.html to edit your build targets
+    // enable this task if you prefer defining your build targets here
+    /*uglify: {
+     dist: {}
+     },*/
+    rev: {
+      dist: {
+        files: {
+          src: [
+            '<%= yeoman.dist %>/scripts/{,*/}*.js',
+            '<%= yeoman.dist %>/styles/{,*/}*.css',
+            '<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp}',
+            '<%= yeoman.dist %>/styles/fonts/*'
+          ]
+        }
+      }
+    },
+    useminPrepare: {
+      html: '.tmp/index.html',
+      options: {
+        dest: '<%= yeoman.dist %>'
+      }
+    },
+    usemin: {
+      html: ['<%= yeoman.dist %>/{,*/}*.html'],
+      css: ['<%= yeoman.dist %>/styles/{,*/}*.css'],
+      options: {
+        dirs: ['<%= yeoman.dist %>']
+      }
+    },
+    imagemin: {
+      dist: {
+        files: [
+          {
+            expand: true,
+            cwd: '<%= yeoman.app %>/images',
+            src: '{,*/}*.{png,jpg,jpeg}',
+            dest: '<%= yeoman.dist %>/images'
+          }
+        ]
+      }
+    },
+    svgmin: {
+      dist: {
+        files: [
+          {
+            expand: true,
+            cwd: '<%= yeoman.app %>/images',
+            src: '{,*/}*.svg',
+            dest: '<%= yeoman.dist %>/images'
+          }
+        ]
+      }
+    },
+    cssmin: {
+      dist: {
+        files: {
+          '<%= yeoman.dist %>/styles/main.css': [
+            '.tmp/styles/{,*/}*.css',
+            '<%= yeoman.app %>/styles/{,*/}*.css'
+          ]
+        }
+      }
+    },
+    htmlmin: {
+      dist: {
+        options: {
+          /*removeCommentsFromCDATA: true,
+           // https://github.com/yeoman/grunt-usemin/issues/44
+           //collapseWhitespace: true,
+           collapseBooleanAttributes: true,
+           removeAttributeQuotes: true,
+           removeRedundantAttributes: true,
+           useShortDoctype: true,
+           removeEmptyAttributes: true,
+           removeOptionalTags: true*/
+        },
+        files: [
+          {
+            expand: true,
+            cwd: '<%= yeoman.app %>',
+            src: '*.html',
+            dest: '<%= yeoman.dist %>'
+          }
+        ]
+      }
+    },
+    replace: {
+      app: {
+        options: {
+          variables: {
+            ember: 'bower_components/ember/ember.js',
+            ember_data: 'bower_components/ember-data/ember-data.js'
+          }
+        },
+        files: [
+          {src: '<%= yeoman.app %>/index.html', dest: '.tmp/index.html'}
+        ]
+      },
+      dist: {
+        options: {
+          variables: {
+            ember: 'bower_components/ember/ember.prod.js',
+            ember_data: 'bower_components/ember-data/ember-data.prod.js'
+          }
+        },
+        files: [
+          {src: '<%= yeoman.app %>/index.html', dest: '.tmp/index.html'}
+        ]
+      }
+    },
+    // Put files not handled in other tasks here
+    copy: {
+      dist: {
+        files: [
+          {
+            expand: true,
+            dot: true,
+            cwd: '<%= yeoman.app %>',
+            dest: '<%= yeoman.dist %>',
+            src: [
+              '*.{ico,txt,php}',
+              '.htaccess',
+              'images/{,*/}*.{webp,gif}',
+              'styles/fonts/*'
+            ]
+          }
+        ]
+      }
+    },
+    concurrent: {
+      server: [
+        'emberTemplates'
+      ],
+      test: [
+        'emberTemplates'
+      ],
+      dist: [
+        'emberTemplates',
+        'imagemin',
+        'svgmin',
+        'htmlmin'
+      ]
+    },
+    emberTemplates: {
+      options: {
+        templateName: function (sourceFile) {
+          var templatePath = yeomanConfig.app + '/templates/';
+          return sourceFile.replace(templatePath, '');
+        }
+      },
+      dist: {
+        files: {
+          '.tmp/scripts/compiled-templates.js': '<%= yeoman.app %>/templates/**/*.hbs'
+        }
+      }
+    },
+
+    less: {
+      development: {
+        options: {
+          paths: ["<%= yeoman.app %>/styles"]
+        },
+        files: {
+          ".tmp/styles/styles.css": "<%= yeoman.app %>/styles/**/*.less"
+        }
+      },
+      production: {
+        options: {
+          paths: ["<%= yeoman.app %>/styles"],
+          cleancss: true
+        },
+        files: {
+          ".tmp/styles/styles.css": "<%= yeoman.app %>/styles/**/*.less"
+        }
+      }
+    },
+
+    neuter: {
+      app: {
+        options: {
+          filepathTransform: function (filepath) {
+            return yeomanConfig.app + '/' + filepath;
+          }
+        },
+        src: '<%= yeoman.app %>/scripts/app.js',
+        dest: '.tmp/scripts/combined-scripts.js'
+      }
+    }
+  });
+
+  grunt.registerTask('server', function (target) {
+    grunt.log.warn('The `server` task has been deprecated. Use `grunt serve` to start a server.');
+    grunt.task.run(['serve:' + target]);
+  });
+
+  grunt.registerTask('serve', function (target) {
+    if (target === 'dist') {
+      return grunt.task.run(['build', 'open', 'connect:dist:keepalive']);
+    }
+
+    grunt.task.run([
+      'clean:server',
+      'replace:app',
+      'concurrent:server',
+      'neuter:app',
+      'less:development',
+      'connect:livereload',
+      'open',
+      'watch'
+    ]);
+  });
+
+  grunt.registerTask('test', [
+    'clean:server',
+    'replace:app',
+    'concurrent:test',
+    'connect:test',
+    'neuter:app',
+    'mocha'
+  ]);
+
+  grunt.registerTask('build', [
+    'clean:dist',
+    'replace:app',
+    'useminPrepare',
+    'concurrent:dist',
+    'neuter:app',
+    'less:production',
+    'concat',
+    'cssmin',
+    //'uglify',
+    'copy',
+    //'rev',
+    'usemin'
+  ]);
+
+  grunt.registerTask('default', [
+    'jshint',
+    'test',
+    'build'
+  ]);
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/app/index.html
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/app/index.html b/contrib/views/jobs/src/main/resources/ui/app/index.html
new file mode 100644
index 0000000..850126e
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/app/index.html
@@ -0,0 +1,45 @@
+<!--
+* 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.
+-->
+
+<!doctype html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>Jobs</title>
+
+    <!-- build:css styles/main.css -->
+    <!-- endbuild -->
+  </head>
+  <body>
+    <!-- build:js(app) scripts/components.js -->
+    <script src="bower_components/jquery/dist/jquery.js"></script>
+    <script src="bower_components/handlebars/handlebars.runtime.js"></script>
+    <script src="@@ember"></script>
+    <script src="@@ember_data"></script>
+    <script src="bower_components/ember-json-mapper/ember-json-mapper.js"></script>
+    <!-- endbuild -->
+
+    <!-- build:js(.tmp) scripts/templates.js -->
+    <script src="scripts/compiled-templates.js"></script>
+    <!-- endbuild -->
+
+    <!-- build:js(.tmp) scripts/main.js -->
+    <script src="scripts/combined-scripts.js"></script>
+    <!-- endbuild -->
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/app/scripts/app.js
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/app/scripts/app.js b/contrib/views/jobs/src/main/resources/ui/app/scripts/app.js
new file mode 100644
index 0000000..4b83e74
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/app/scripts/app.js
@@ -0,0 +1,28 @@
+/**
+ * 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.
+ */
+
+var App = window.App = Ember.Application.create();
+
+/* Order and include as you please. */
+require('scripts/controllers/*');
+require('scripts/store');
+require('scripts/models/*');
+require('scripts/routes/*');
+require('scripts/components/*');
+require('scripts/views/*');
+require('scripts/router');

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/app/scripts/router.js
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/app/scripts/router.js b/contrib/views/jobs/src/main/resources/ui/app/scripts/router.js
new file mode 100644
index 0000000..15bd8dc
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/app/scripts/router.js
@@ -0,0 +1,21 @@
+/**
+ * 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.
+ */
+
+App.Router.map(function () {
+  // Add your routes here
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/app/scripts/routes/application_route.js
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/app/scripts/routes/application_route.js
b/contrib/views/jobs/src/main/resources/ui/app/scripts/routes/application_route.js
new file mode 100644
index 0000000..f6b9ec1
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/app/scripts/routes/application_route.js
@@ -0,0 +1,25 @@
+/**
+ * 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.
+ */
+
+App.ApplicationRoute = Ember.Route.extend({
+  // admittedly, this should be in IndexRoute and not in the
+  // top level ApplicationRoute; we're in transition... :-)
+  model: function () {
+    return ['red', 'yellow', 'blue'];
+  }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/app/scripts/store.js
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/app/scripts/store.js b/contrib/views/jobs/src/main/resources/ui/app/scripts/store.js
new file mode 100644
index 0000000..de7154b
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/app/scripts/store.js
@@ -0,0 +1,19 @@
+/**
+ * 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.
+ */
+
+App.ApplicationAdapter = DS.FixtureAdapter;

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/app/styles/main.less
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/app/styles/main.less b/contrib/views/jobs/src/main/resources/ui/app/styles/main.less
new file mode 100644
index 0000000..c1997c2
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/app/styles/main.less
@@ -0,0 +1,19 @@
+/**
+ * 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.
+ */
+
+@import '../../app/bower_components/bootstrap/less/bootstrap';
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/app/templates/application.hbs b/contrib/views/jobs/src/main/resources/ui/app/templates/application.hbs
new file mode 100644
index 0000000..1a0b52e
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/app/templates/application.hbs
@@ -0,0 +1,21 @@
+{{!
+* 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.
+}}
+
+<div class="container">
+  {{outlet}}
+</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/app/templates/index.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/app/templates/index.hbs b/contrib/views/jobs/src/main/resources/ui/app/templates/index.hbs
new file mode 100644
index 0000000..7470eef
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/app/templates/index.hbs
@@ -0,0 +1,19 @@
+{{!
+* 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.
+}}
+
+Jobs will be here

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/bower.json
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/bower.json b/contrib/views/jobs/src/main/resources/ui/bower.json
new file mode 100644
index 0000000..0619e51
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/bower.json
@@ -0,0 +1,15 @@
+{
+  "name": "jobs-ui",
+  "version": "0.0.1",
+  "dependencies": {
+    "ember": "1.5.0",
+    "handlebars": "1.2.1",
+    "ember-data": "1.0.0-beta.7",
+    "bootstrap": ">3.0",
+    "ember-addons.bs_for_ember": ">=0.7",
+    "ember-json-mapper": "master"
+  },
+  "devDependencies": {
+    "ember-mocha-adapter": "0.1.2"
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/package.json
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/package.json b/contrib/views/jobs/src/main/resources/ui/package.json
new file mode 100644
index 0000000..aeac669
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/package.json
@@ -0,0 +1,35 @@
+{
+  "name": "jobs-ui",
+  "version": "0.0.1",
+  "dependencies": {},
+  "devDependencies": {
+    "grunt": "~0.4.1",
+    "grunt-contrib-copy": "~0.4.1",
+    "grunt-contrib-concat": "~0.3.0",
+    "grunt-contrib-uglify": "~0.2.0",
+    "grunt-contrib-jshint": "~0.6.3",
+    "grunt-contrib-cssmin": "~0.6.0",
+    "grunt-contrib-connect": "~0.3.0",
+    "grunt-contrib-clean": "~0.5.0",
+    "grunt-contrib-htmlmin": "~0.1.3",
+    "grunt-contrib-imagemin": "~0.2.0",
+    "grunt-contrib-watch": "~0.5.2",
+    "grunt-rev": "~0.1.0",
+    "grunt-usemin": "~0.1.12",
+    "grunt-mocha": "~0.4.1",
+    "grunt-open": "~0.2.0",
+    "grunt-svgmin": "~0.2.0",
+    "grunt-concurrent": "~0.3.0",
+    "load-grunt-tasks": "~0.1.0",
+    "connect-livereload": "~0.2.0",
+    "grunt-ember-templates": "0.4.14",
+    "time-grunt": "~0.1.1",
+    "grunt-replace": "~0.4.4",
+    "jshint-stylish": "~0.1.3",
+    "grunt-neuter": "~0.6.0",
+    "grunt-contrib-less": "~0.11"
+  },
+  "engines": {
+    "node": ">=0.8.0"
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/test/.bowerrc
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/test/.bowerrc b/contrib/views/jobs/src/main/resources/ui/test/.bowerrc
new file mode 100644
index 0000000..44491d3
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/test/.bowerrc
@@ -0,0 +1,3 @@
+{
+    "directory": "bower_components"
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/test/bower.json
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/test/bower.json b/contrib/views/jobs/src/main/resources/ui/test/bower.json
new file mode 100644
index 0000000..5453ee2
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/test/bower.json
@@ -0,0 +1,9 @@
+{
+  "name": "ui",
+  "private": true,
+  "dependencies": {
+    "chai": "~1.8.0",
+    "mocha": "~1.14.0"
+  },
+  "devDependencies": {}
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/test/index.html
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/test/index.html b/contrib/views/jobs/src/main/resources/ui/test/index.html
new file mode 100644
index 0000000..bbc83a2
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/test/index.html
@@ -0,0 +1,27 @@
+<!doctype html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>Mocha Spec Runner</title>
+    <link rel="stylesheet" href="bower_components/mocha/mocha.css">
+  </head>
+  <body>
+    <div id="mocha"></div>
+    <script src="bower_components/mocha/mocha.js"></script>
+    <script>mocha.setup('bdd')</script>
+    <script src="bower_components/chai/chai.js"></script>
+    <script>
+      var assert = chai.assert;
+      var expect = chai.expect;
+      var should = chai.should();
+    </script>
+
+    <!-- include source files here... -->
+
+    <!-- include spec files here... -->
+    <script src="spec/test.js"></script>
+
+    <script>mocha.run()</script>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/ambari/blob/f3c8c285/contrib/views/jobs/src/main/resources/ui/test/spec/test.js
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/test/spec/test.js b/contrib/views/jobs/src/main/resources/ui/test/spec/test.js
new file mode 100644
index 0000000..8a8c550
--- /dev/null
+++ b/contrib/views/jobs/src/main/resources/ui/test/spec/test.js
@@ -0,0 +1,29 @@
+/**
+ * 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.
+ */
+
+(function () {
+  'use strict';
+
+  describe('Give it some context', function () {
+    describe('maybe a bit more context here', function () {
+      it('should run here few assertions', function () {
+        expect(true).to.be.ok;
+      });
+    });
+  });
+})();


Mime
View raw message