ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject [04/12] ambari git commit: AMBARI-17213. Create ambari workflow designer contrib view. (Venkat Ranganathan via yusaku)
Date Tue, 09 Aug 2016 20:14:57 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/.jshintrc
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/.jshintrc b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/.jshintrc
new file mode 100644
index 0000000..08096ef
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/.jshintrc
@@ -0,0 +1,32 @@
+{
+  "predef": [
+    "document",
+    "window",
+    "-Promise"
+  ],
+  "browser": true,
+  "boss": true,
+  "curly": true,
+  "debug": false,
+  "devel": true,
+  "eqeqeq": true,
+  "evil": true,
+  "forin": false,
+  "immed": false,
+  "laxbreak": false,
+  "newcap": true,
+  "noarg": true,
+  "noempty": false,
+  "nonew": false,
+  "nomen": false,
+  "onevar": false,
+  "plusplus": false,
+  "regexp": false,
+  "undef": true,
+  "sub": true,
+  "strict": false,
+  "white": false,
+  "eqnull": true,
+  "esnext": true,
+  "unused": true
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/.npmignore
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/.npmignore b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/.npmignore
new file mode 100644
index 0000000..fea9ccc
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/.npmignore
@@ -0,0 +1,30 @@
+# 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.
+
+bower_components/
+tests/
+tmp/
+dist/
+
+.bowerrc
+.editorconfig
+.ember-cli
+.travis.yml
+.npmignore
+**/.gitkeep
+bower.json
+Brocfile.js
+testem.json

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/.travis.yml
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/.travis.yml b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/.travis.yml
new file mode 100644
index 0000000..dbc0990
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/.travis.yml
@@ -0,0 +1,50 @@
+# 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.
+
+---
+language: node_js
+node_js:
+  - "0.12"
+
+sudo: false
+
+cache:
+  directories:
+    - node_modules
+
+env:
+  - EMBER_TRY_SCENARIO=default
+  - EMBER_TRY_SCENARIO=ember-release
+  - EMBER_TRY_SCENARIO=ember-beta
+  - EMBER_TRY_SCENARIO=ember-canary
+
+matrix:
+  fast_finish: true
+  allow_failures:
+    - env: EMBER_TRY_SCENARIO=ember-canary
+
+before_install:
+  - export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
+  - "npm config set spin false"
+  - "npm install -g npm@^2"
+
+install:
+  - npm install -g bower
+  - npm install
+  - bower install
+
+script:
+  - ember try $EMBER_TRY_SCENARIO test

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/.watchmanconfig
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/.watchmanconfig b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/.watchmanconfig
new file mode 100644
index 0000000..6ec27cc
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/.watchmanconfig
@@ -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.
+ */
+
+{
+  "ignore_dirs": ["tmp", "dist"]
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/LICENSE.md
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/LICENSE.md b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/LICENSE.md
new file mode 100644
index 0000000..b7a0f2b
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/LICENSE.md
@@ -0,0 +1,27 @@
+<!---
+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](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.
+-->
+
+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](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.

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/README.md
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/README.md b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/README.md
new file mode 100644
index 0000000..d383a93
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/README.md
@@ -0,0 +1,97 @@
+<!---
+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](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.
+-->
+
+# Hdfs-directory-viewer
+
+Ember Addon to view the HDFS file system.
+
+Different Ambari views can use this in their view. Common code should be usable in every view.
+
+# How to use it
+
+### Including it in dependant project
+Add the following code in package.json of the dependant view
+
+```javascript
+"name": "files",
+"ember-addon": {
+	"paths": [
+	  "../../../../../commons/src/main/resources/ui/hdfs-directory-viewer"
+	]
+}
+```
+
+`paths` is an array which includes all the addons shares in ```commons``` library. The entries should be the relative path to the addon in this ```commons``` repository.
+
+### Including the UI dependencies in the dependent project
+As we are going to include the component using the `ember-addon` config in `package.json` and not by the `ember install` way, the UI dependencies also has to be included in the dependent projects `bower.json` file if not already added.
+
+```
+"bootstrap": "~3.3.6",
+"bootstrap-treeview": "~1.2.0",
+"font-awesome": "~4.5.0"
+```
+
+### Overriding configs in dependant project
+
+Create a util object in `utils` directory using `ember generate util <object name>` and override it as follows:
+
+```javascript
+import ViewerConfig from 'hdfs-directory-viewer/utils/viewer-config';
+
+export default ViewerConfig.extend({
+  showOnlyDirectories: true,
+
+  expandIcon: 'fa fa-chevron-right',
+  collapseIcon: 'fa fa-chevron-down',
+
+  listDirectoryUrl(pathParams) {
+    return `/api/v1/views/FILES/versions/1.0.0/instances/files/resources/files/fileops/listdir?${pathParams}`;
+  }
+});
+```
+
+All the functions and attributes in `hdfs-directory-viewer/utils/viewer-config` can be overriden
+
+### Passing the object to the view template
+
+```javascript
+import Ember from 'ember';
+import MyViewerConfig from '../utils/my-viewer-config';
+
+export default Ember.Controller.extend({
+  config: MyViewerConfig.create(),
+  actions: {
+    viewerError: function() {
+      console.log("Failed to fetch the content!!!");
+    },
+    viewerSelectedPath: function(data) {
+      console.log(`User selected: path: ${data.path}, isDirectory: ${data.isDirectory}`);
+    }
+  }
+});
+```
+
+```html
+...
+<div class="directory-viewer-wrap">
+  {{directory-viewer
+    config=config
+    errorAction="viewerError"
+    pathSelectAction="viewerSelectedPath"
+  }}
+</div>
+...
+```

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/addon/components/directory-viewer.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/addon/components/directory-viewer.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/addon/components/directory-viewer.js
new file mode 100644
index 0000000..991d122
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/addon/components/directory-viewer.js
@@ -0,0 +1,196 @@
+/**
+ * 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 Ember from 'ember';
+import layout from '../templates/components/directory-viewer';
+
+export default Ember.Component.extend({
+  layout,
+  config: Ember.Object.create({}),
+  classNames: ['directory-viewer'],
+  startPath: '/',
+  treeData: Ember.A(),
+  currentPath: Ember.computed.oneWay('startPath'),
+  currentQueryParam: Ember.computed('currentPath', function() {
+    return Ember.$.param({path: this.get('currentPath')});
+  }),
+
+  startFetch: Ember.on('didInitAttrs', function() {
+    this.fetchData();
+  }),
+
+
+  fetchData: function() {
+    this.listPath(this.get('currentQueryParam')).then(
+      (response) => {
+        let list = this.filterDirectoriesIfRequired(response.files);
+        this.modifyTreeViewData(list);
+      }, (error) => {
+        this.sendAction('errorAction', error);
+      }
+    );
+  },
+
+  /**
+   * Makes a XHR call and returns a promise.
+   */
+  listPath: function(params) {
+    let config = this.get('config');
+    let listUrl = config.listDirectoryUrl(params);
+    let headers = config.getHeaders();
+    return Ember.$.ajax(listUrl, {
+      headers: headers
+    });
+  },
+
+  filterDirectoriesIfRequired: function(files) {
+    let showOnlyDirectories = this.get('config.showOnlyDirectories');
+    return files.filter((entry) => {
+      return (!(showOnlyDirectories) || entry.isDirectory);
+    });
+  },
+
+  modifyTreeViewData: function(response) {
+    let paths = response.map((entry) => {
+      let isDirectory = entry.isDirectory;
+      let icon = isDirectory ? this.get('config.folderIcon') : this.get('config.fileIcon');
+      let data = {
+        path: entry.path,
+        pathSegment: this.getNameForPath(entry.path),
+        isDirectory: isDirectory,
+        icon: icon,
+        text: this.getNameForPath(entry.path)
+      };
+      if(isDirectory) {
+        data.nodes = Ember.A();
+      }
+      return data;
+    });
+
+    var currentPath = this.get('currentPath');
+    var newTreeData = Ember.copy(this.get('treeData'), true);
+    if(currentPath === '/') {
+      newTreeData = paths;
+    } else {
+      this.insertPathToTreeData(newTreeData, paths, currentPath.substring(1));
+    }
+
+    this.set('treeData', newTreeData);
+    this.send('refreshTreeView');
+  },
+
+  insertPathToTreeData(treeData, paths, pathSegment) {
+    let firstPathSegment;
+    if (pathSegment.indexOf('/') !== -1) {
+      firstPathSegment = pathSegment.substring(0, pathSegment.indexOf('/'));
+    } else {
+      firstPathSegment = pathSegment;
+    }
+
+    if(treeData.length === 0) {
+      treeData.pushObjects(paths);
+    } else {
+      treeData.forEach((entry) => {
+        entry.state = {};
+        if (entry.pathSegment === firstPathSegment) {
+          entry.state.expanded = true;
+          if(entry.nodes.length === 0) {
+            paths.forEach((pathEntry) => {
+              entry.nodes.push(pathEntry);
+            });
+          } else {
+            this.insertPathToTreeData(entry.nodes, paths, pathSegment.substring(pathSegment.indexOf('/') + 1));
+          }
+        } else {
+          this.collapseAll(entry);
+        }
+      });
+    }
+  },
+
+  collapseAll: function(node) {
+    if (Ember.isNone(node.state)) {
+      node.state = {};
+    }
+    node.state.expanded = false;
+    if(!Ember.isNone(node.nodes)) {
+      node.nodes.forEach((entry) => {
+        this.collapseAll(entry);
+      });
+    }
+  },
+
+  getNameForPath: function(path) {
+    return path.substring(path.lastIndexOf("/") + 1);
+  },
+
+  collapseAllExceptPath: function(pathSegment) {
+    let collapseAll = function(nodes, pathSegment) {
+      var firstPathSegment;
+      if (pathSegment.indexOf('/') !== -1) {
+        firstPathSegment = pathSegment.substring(0, pathSegment.indexOf('/'));
+      } else {
+        firstPathSegment = pathSegment;
+      }
+
+      nodes.forEach((entry) => {
+        if (Ember.isNone(entry.state)) {
+          entry.state = {};
+        }
+        if(firstPathSegment !== entry.pathSegment) {
+          entry.state.expanded = false;
+        } else {
+          entry.state.expanded = true;
+          collapseAll(entry.nodes, pathSegment.substring(pathSegment.indexOf('/') + 1));
+        }
+      });
+    };
+    var newTreeData = this.get('treeData');
+    collapseAll(newTreeData, pathSegment);
+    this.set('treeData', newTreeData);
+    this.send('refreshTreeView');
+  },
+
+  actions: {
+    refreshTreeView() {
+      Ember.run.later(() => {
+        this.$().treeview({
+          data: this.get('treeData'),
+          expandIcon: this.get('config.expandIcon'),
+          collapseIcon: this.get('config.collapseIcon'),
+          //emptyIcon: "fa",
+          showBorder: false,
+          onNodeSelected: (event, data) => {
+            this.set('currentPath', data.path);
+            this.sendAction('pathSelectAction', {path: data.path, isDirectory: data.isDirectory});
+          },
+          onNodeExpanded: (event, data) => {
+            this.set('currentPath', data.path);
+            if (!Ember.isNone(data.nodes) && data.nodes.length === 0) {
+              var node = this.$().treeview('getNode', data.nodeId);
+              node.icon = "fa fa-refresh fa-spin";
+              this.fetchData();
+            } else {
+              this.collapseAllExceptPath(data.path.substring(1));
+            }
+          }
+        });
+      });
+    }
+  }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/addon/templates/components/directory-viewer.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/addon/templates/components/directory-viewer.hbs b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/addon/templates/components/directory-viewer.hbs
new file mode 100644
index 0000000..4083ad6
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/addon/templates/components/directory-viewer.hbs
@@ -0,0 +1,17 @@
+{{!
+* 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.
+}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/addon/utils/viewer-config.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/addon/utils/viewer-config.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/addon/utils/viewer-config.js
new file mode 100644
index 0000000..64773c6
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/addon/utils/viewer-config.js
@@ -0,0 +1,59 @@
+/**
+ * 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 Ember from 'ember';
+
+export default Ember.Object.extend({
+
+  /**
+   * Set this to true, if only directory listing is required.
+   */
+  showOnlyDirectories: false,
+
+  /**
+   * Set this to true, if refresh of current path is required.
+   */
+  showRefreshButton: false,
+
+  /**
+   * Override these for different Icon. Refer https://github.com/jonmiles/bootstrap-treeview
+   */
+  expandIcon: "fa fa-plus",
+  collapseIcon: "fa fa-minus",
+  //Custom
+  fileIcon: "fa fa-file",
+  folderIcon: "fa fa-folder",
+
+  /**
+   * Override to return the headers add to the XHR call made for various operations.
+   * The Overriding object can also merge its result with the default in this object.
+   */
+  getHeaders() {
+    return {"X-Requested-By": "ambari"};
+  },
+
+  /**
+   * Return the URL endpoint for XHR call meant for listing Directories
+   * @param pathParams
+   * @returns {string}
+   */
+  listDirectoryUrl(pathParams) {
+    return `/listdir?${pathParams}`;
+  }
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/app/components/directory-viewer.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/app/components/directory-viewer.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/app/components/directory-viewer.js
new file mode 100644
index 0000000..e704ef7
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/app/components/directory-viewer.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.
+ */
+
+export { default } from 'hdfs-directory-viewer/components/directory-viewer';

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/app/utils/viewer-config.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/app/utils/viewer-config.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/app/utils/viewer-config.js
new file mode 100644
index 0000000..f175b6c
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/app/utils/viewer-config.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.
+ */
+
+export { default } from 'hdfs-directory-viewer/utils/viewer-config';

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/bower.json
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/bower.json b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/bower.json
new file mode 100644
index 0000000..f016904
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/bower.json
@@ -0,0 +1,19 @@
+{
+  "name": "hdfs-directory-viewer",
+  "dependencies": {
+    "ember": "2.2.0",
+    "ember-cli-shims": "0.1.0",
+    "ember-cli-test-loader": "0.2.2",
+    "ember-load-initializers": "0.1.7",
+    "ember-qunit-notifications": "0.1.0",
+    "jquery": "1.11.3",
+    "loader.js": "^3.5.0",
+    "qunit": "~1.20.0",
+    "bootstrap": "~3.3.6",
+    "bootstrap-treeview": "~1.2.0",
+    "font-awesome": "~4.5.0"
+  },
+  "resolutions": {
+    "ember": "2.2.0"
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/config/ember-try.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/config/ember-try.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/config/ember-try.js
new file mode 100644
index 0000000..252dff2
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/config/ember-try.js
@@ -0,0 +1,54 @@
+/**
+ * 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.
+ */
+
+/*jshint node:true*/
+module.exports = {
+  scenarios: [
+    {
+      name: 'default',
+      dependencies: { }
+    },
+    {
+      name: 'ember-release',
+      dependencies: {
+        'ember': 'components/ember#release'
+      },
+      resolutions: {
+        'ember': 'release'
+      }
+    },
+    {
+      name: 'ember-beta',
+      dependencies: {
+        'ember': 'components/ember#beta'
+      },
+      resolutions: {
+        'ember': 'beta'
+      }
+    },
+    {
+      name: 'ember-canary',
+      dependencies: {
+        'ember': 'components/ember#canary'
+      },
+      resolutions: {
+        'ember': 'canary'
+      }
+    }
+  ]
+};

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/config/environment.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/config/environment.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/config/environment.js
new file mode 100644
index 0000000..4a4b263
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/config/environment.js
@@ -0,0 +1,24 @@
+/**
+ * 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.
+ */
+
+/*jshint node:true*/
+'use strict';
+
+module.exports = function(/* environment, appConfig */) {
+  return { };
+};

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/ember-cli-build.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/ember-cli-build.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/ember-cli-build.js
new file mode 100644
index 0000000..f6aac28
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/ember-cli-build.js
@@ -0,0 +1,36 @@
+/**
+ * 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.
+ */
+
+/*jshint node:true*/
+/* global require, module */
+var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
+
+module.exports = function(defaults) {
+  var app = new EmberAddon(defaults, {
+    // Add options here
+  });
+
+  /*
+    This build file specifies the options for the dummy test app of this
+    addon, located in `/tests/dummy`
+    This build file does *not* influence how the addon or the app using it
+    behave. You most likely want to be modifying `./index.js` or app's build file
+  */
+
+  return app.toTree();
+};

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/index.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/index.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/index.js
new file mode 100644
index 0000000..dc074d7
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/index.js
@@ -0,0 +1,32 @@
+/**
+ * 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.
+ */
+
+/* jshint node: true */
+'use strict';
+
+module.exports = {
+  name: 'hdfs-directory-viewer',
+  included: function(app) {
+    this._super.included(app);
+
+    app.import(app.bowerDirectory + '/bootstrap/dist/css/bootstrap.css');
+    app.import(app.bowerDirectory + '/bootstrap/dist/js/bootstrap.js');
+    app.import(app.bowerDirectory + '/bootstrap-treeview/src/js/bootstrap-treeview.js');
+    app.import(app.bowerDirectory + '/bootstrap-treeview/dist/bootstrap-treeview.min.css');
+  }
+};

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/package.json
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/package.json b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/package.json
new file mode 100644
index 0000000..66a7b20
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/package.json
@@ -0,0 +1,51 @@
+{
+  "name": "hdfs-directory-viewer",
+  "version": "0.1.0",
+  "description": "The hdfs directory viewer addon to be used by ambari views",
+  "directories": {
+    "doc": "doc",
+    "test": "tests"
+  },
+  "scripts": {
+    "build": "ember build",
+    "start": "ember server",
+    "test": "ember try:testall"
+  },
+  "repository": "",
+  "engines": {
+    "node": ">= 0.10.0"
+  },
+  "author": "",
+  "license": "MIT",
+  "devDependencies": {
+    "broccoli-asset-rev": "^2.2.0",
+    "ember-ajax": "0.7.1",
+    "ember-cli": "2.2.0-beta.4",
+    "ember-cli-app-version": "^1.0.0",
+    "ember-cli-dependency-checker": "^1.2.0",
+    "ember-cli-font-awesome": "1.5.0",
+    "ember-cli-htmlbars": "^1.0.1",
+    "ember-cli-htmlbars-inline-precompile": "^0.3.1",
+    "ember-cli-inject-live-reload": "^1.3.1",
+    "ember-cli-qunit": "^1.1.0",
+    "ember-cli-release": "0.2.8",
+    "ember-cli-sri": "^2.0.0",
+    "ember-cli-uglify": "^1.2.0",
+    "ember-data": "^2.2.1",
+    "ember-disable-prototype-extensions": "^1.0.0",
+    "ember-disable-proxy-controllers": "^1.0.1",
+    "ember-export-application-global": "^1.0.4",
+    "ember-resolver": "^2.0.3",
+    "ember-try": "~0.0.8"
+  },
+  "keywords": [
+    "ember-addon"
+  ],
+  "dependencies": {
+    "ember-cli-babel": "^5.1.5",
+    "ember-cli-htmlbars": "^1.0.1"
+  },
+  "ember-addon": {
+    "configPath": "tests/dummy/config"
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/testem.json
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/testem.json b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/testem.json
new file mode 100644
index 0000000..0f35392
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/testem.json
@@ -0,0 +1,12 @@
+{
+  "framework": "qunit",
+  "test_page": "tests/index.html?hidepassed",
+  "disable_watching": true,
+  "launch_in_ci": [
+    "PhantomJS"
+  ],
+  "launch_in_dev": [
+    "PhantomJS",
+    "Chrome"
+  ]
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/.jshintrc
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/.jshintrc b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/.jshintrc
new file mode 100644
index 0000000..6ec0b7c
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/.jshintrc
@@ -0,0 +1,52 @@
+{
+  "predef": [
+    "document",
+    "window",
+    "location",
+    "setTimeout",
+    "$",
+    "-Promise",
+    "define",
+    "console",
+    "visit",
+    "exists",
+    "fillIn",
+    "click",
+    "keyEvent",
+    "triggerEvent",
+    "find",
+    "findWithAssert",
+    "wait",
+    "DS",
+    "andThen",
+    "currentURL",
+    "currentPath",
+    "currentRouteName"
+  ],
+  "node": false,
+  "browser": false,
+  "boss": true,
+  "curly": true,
+  "debug": false,
+  "devel": false,
+  "eqeqeq": true,
+  "evil": true,
+  "forin": false,
+  "immed": false,
+  "laxbreak": false,
+  "newcap": true,
+  "noarg": true,
+  "noempty": false,
+  "nonew": false,
+  "nomen": false,
+  "onevar": false,
+  "plusplus": false,
+  "regexp": false,
+  "undef": true,
+  "sub": true,
+  "strict": false,
+  "white": false,
+  "eqnull": true,
+  "esnext": true,
+  "unused": true
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/app.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/app.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/app.js
new file mode 100644
index 0000000..fb4695c
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/app.js
@@ -0,0 +1,36 @@
+/**
+ * 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 Ember from 'ember';
+import Resolver from 'ember-resolver';
+import loadInitializers from 'ember/load-initializers';
+import config from './config/environment';
+
+let App;
+
+Ember.MODEL_FACTORY_INJECTIONS = true;
+
+App = Ember.Application.extend({
+  modulePrefix: config.modulePrefix,
+  podModulePrefix: config.podModulePrefix,
+  Resolver
+});
+
+loadInitializers(App, config.modulePrefix);
+
+export default App;

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/controllers/application.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/controllers/application.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/controllers/application.js
new file mode 100644
index 0000000..b9b52f7
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/controllers/application.js
@@ -0,0 +1,32 @@
+/**
+ * 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 Ember from 'ember';
+import MyViewerConfig from '../utils/my-viewer-config';
+
+export default Ember.Controller.extend({
+  config: MyViewerConfig.create(),
+  actions: {
+    viewerError: function() {
+      console.log("Failed to fetch the content!!!");
+    },
+    viewerSelectedPath: function(data) {
+      console.log(`User selected: path: ${data.path}, isDirectory: ${data.isDirectory}`);
+    }
+  }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/index.html
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/index.html b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/index.html
new file mode 100644
index 0000000..fba56f90
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/index.html
@@ -0,0 +1,43 @@
+<!--
+ * 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">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>Dummy</title>
+    <meta name="description" content="">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+
+    {{content-for "head"}}
+
+    <link rel="stylesheet" href="assets/vendor.css">
+    <link rel="stylesheet" href="assets/dummy.css">
+
+    {{content-for "head-footer"}}
+  </head>
+  <body>
+    {{content-for "body"}}
+
+    <script src="assets/vendor.js"></script>
+    <script src="assets/dummy.js"></script>
+
+    {{content-for "body-footer"}}
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/router.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/router.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/router.js
new file mode 100644
index 0000000..3b44118
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/router.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.
+ */
+
+import Ember from 'ember';
+import config from './config/environment';
+
+const Router = Ember.Router.extend({
+  location: config.locationType
+});
+
+Router.map(function() {
+});
+
+export default Router;

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/styles/app.css
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/styles/app.css b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/styles/app.css
new file mode 100644
index 0000000..1c922ba
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/styles/app.css
@@ -0,0 +1,23 @@
+/**
+ * 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.
+ */
+
+.directory-viewer-wrap {
+  width: 600px;
+  height: 500px;
+  border: 1px solid darkgray;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/templates/application.hbs b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/templates/application.hbs
new file mode 100644
index 0000000..0263b2c
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/templates/application.hbs
@@ -0,0 +1,36 @@
+{{!
+* 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.
+}}
+
+<h2 id="title">Ambari HDFS Directory Viewer example</h2>
+<p>
+  This will require Ambari installation with a file view instance created.<br/>
+  <strong>Instance name: files
+  <br/>Files view version used is: 1.0.0</strong>
+</p>
+
+
+<div class="directory-viewer-wrap">
+  {{directory-viewer
+    config=config
+    errorAction="viewerError"
+    pathSelectAction="viewerSelectedPath"
+  }}
+</div>
+
+
+{{outlet}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/utils/my-viewer-config.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/utils/my-viewer-config.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/utils/my-viewer-config.js
new file mode 100644
index 0000000..e029e1a
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/app/utils/my-viewer-config.js
@@ -0,0 +1,35 @@
+/**
+ * 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 Ember from 'ember';
+import ViewerConfig from 'hdfs-directory-viewer/utils/viewer-config';
+
+export default ViewerConfig.extend({
+  showOnlyDirectories: true,
+
+  expandIcon: 'fa fa-chevron-right',
+  collapseIcon: 'fa fa-chevron-down',
+
+  getHeaders() {
+    return Ember.merge({"Authorization": "Basic YWRtaW46YWRtaW4="}, this._super());
+  },
+
+  listDirectoryUrl(pathParams) {
+    return `/api/v1/views/FILES/versions/1.0.0/instances/files/resources/files/fileops/listdir?${pathParams}`;
+  }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/config/environment.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/config/environment.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/config/environment.js
new file mode 100644
index 0000000..1445079
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/config/environment.js
@@ -0,0 +1,65 @@
+/**
+ * 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.
+ */
+
+/* jshint node: true */
+
+module.exports = function(environment) {
+  var ENV = {
+    modulePrefix: 'dummy',
+    environment: environment,
+    baseURL: '/',
+    locationType: 'auto',
+    EmberENV: {
+      FEATURES: {
+        // Here you can enable experimental features on an ember canary build
+        // e.g. 'with-controller': true
+      }
+    },
+
+    APP: {
+      // Here you can pass flags/options to your application instance
+      // when it is created
+    }
+  };
+
+  if (environment === 'development') {
+    // ENV.APP.LOG_RESOLVER = true;
+    // ENV.APP.LOG_ACTIVE_GENERATION = true;
+    // ENV.APP.LOG_TRANSITIONS = true;
+    // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
+    // ENV.APP.LOG_VIEW_LOOKUPS = true;
+  }
+
+  if (environment === 'test') {
+    // Testem prefers this...
+    ENV.baseURL = '/';
+    ENV.locationType = 'none';
+
+    // keep test console output quieter
+    ENV.APP.LOG_ACTIVE_GENERATION = false;
+    ENV.APP.LOG_VIEW_LOOKUPS = false;
+
+    ENV.APP.rootElement = '#ember-testing';
+  }
+
+  if (environment === 'production') {
+
+  }
+
+  return ENV;
+};

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/public/crossdomain.xml
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/public/crossdomain.xml b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/public/crossdomain.xml
new file mode 100644
index 0000000..a2a8c3f
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/public/crossdomain.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!--
+     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 cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
+<cross-domain-policy>
+  <!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->
+
+  <!-- Most restrictive policy: -->
+  <site-control permitted-cross-domain-policies="none"/>
+
+  <!-- Least restrictive policy: -->
+  <!--
+  <site-control permitted-cross-domain-policies="all"/>
+  <allow-access-from domain="*" to-ports="*" secure="false"/>
+  <allow-http-request-headers-from domain="*" headers="*" secure="false"/>
+  -->
+</cross-domain-policy>

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/public/robots.txt
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/public/robots.txt b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/public/robots.txt
new file mode 100644
index 0000000..f591645
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/dummy/public/robots.txt
@@ -0,0 +1,3 @@
+# http://www.robotstxt.org
+User-agent: *
+Disallow:

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/helpers/destroy-app.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/helpers/destroy-app.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/helpers/destroy-app.js
new file mode 100644
index 0000000..dfabf85
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/helpers/destroy-app.js
@@ -0,0 +1,23 @@
+/**
+ * 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 Ember from 'ember';
+
+export default function destroyApp(application) {
+  Ember.run(application, 'destroy');
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/helpers/module-for-acceptance.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/helpers/module-for-acceptance.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/helpers/module-for-acceptance.js
new file mode 100644
index 0000000..05aa014
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/helpers/module-for-acceptance.js
@@ -0,0 +1,41 @@
+/**
+ * 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 { module } from 'qunit';
+import startApp from '../helpers/start-app';
+import destroyApp from '../helpers/destroy-app';
+
+export default function(name, options = {}) {
+  module(name, {
+    beforeEach() {
+      this.application = startApp();
+
+      if (options.beforeEach) {
+        options.beforeEach.apply(this, arguments);
+      }
+    },
+
+    afterEach() {
+      destroyApp(this.application);
+
+      if (options.afterEach) {
+        options.afterEach.apply(this, arguments);
+      }
+    }
+  });
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/helpers/resolver.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/helpers/resolver.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/helpers/resolver.js
new file mode 100644
index 0000000..b7193ba
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/helpers/resolver.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.
+ */
+
+import Resolver from 'ember-resolver';
+import config from '../../config/environment';
+
+const resolver = Resolver.create();
+
+resolver.namespace = {
+  modulePrefix: config.modulePrefix,
+  podModulePrefix: config.podModulePrefix
+};
+
+export default resolver;

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/helpers/start-app.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/helpers/start-app.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/helpers/start-app.js
new file mode 100644
index 0000000..7b25773
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/helpers/start-app.js
@@ -0,0 +1,36 @@
+/**
+ * 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 Ember from 'ember';
+import Application from '../../app';
+import config from '../../config/environment';
+
+export default function startApp(attrs) {
+  let application;
+
+  let attributes = Ember.merge({}, config.APP);
+  attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
+
+  Ember.run(() => {
+    application = Application.create(attributes);
+    application.setupForTesting();
+    application.injectTestHelpers();
+  });
+
+  return application;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/index.html
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/index.html b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/index.html
new file mode 100644
index 0000000..5251332
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/index.html
@@ -0,0 +1,52 @@
+<!--
+ * 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">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>Dummy Tests</title>
+    <meta name="description" content="">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+
+    {{content-for "head"}}
+    {{content-for "test-head"}}
+
+    <link rel="stylesheet" href="assets/vendor.css">
+    <link rel="stylesheet" href="assets/dummy.css">
+    <link rel="stylesheet" href="assets/test-support.css">
+
+    {{content-for "head-footer"}}
+    {{content-for "test-head-footer"}}
+  </head>
+  <body>
+    {{content-for "body"}}
+    {{content-for "test-body"}}
+
+    <script src="testem.js" integrity=""></script>
+    <script src="assets/vendor.js"></script>
+    <script src="assets/test-support.js"></script>
+    <script src="assets/dummy.js"></script>
+    <script src="assets/tests.js"></script>
+    <script src="assets/test-loader.js"></script>
+
+    {{content-for "body-footer"}}
+    {{content-for "test-body-footer"}}
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/test-helper.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/test-helper.js b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/test-helper.js
new file mode 100644
index 0000000..96975ee
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/externaladdons/hdfs-directory-viewer/tests/test-helper.js
@@ -0,0 +1,24 @@
+/**
+ * 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 resolver from './helpers/resolver';
+import {
+  setResolver
+} from 'ember-qunit';
+
+setResolver(resolver);

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/package.json
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/package.json b/contrib/views/wfmanager/src/main/resources/ui/package.json
new file mode 100644
index 0000000..92f698f
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/package.json
@@ -0,0 +1,56 @@
+{
+  "name": "oozie-designer",
+  "version": "0.0.0",
+  "description": "Small description for oozie-designer goes here",
+  "private": true,
+  "directories": {
+    "doc": "doc",
+    "test": "tests"
+  },
+  "scripts": {
+    "build": "ember build",
+    "start": "ember server",
+    "test": "ember test"
+  },
+  "repository": "",
+  "engines": {
+    "node": ">= 0.10.0"
+  },
+  "author": "",
+  "license": "MIT",
+  "devDependencies": {
+    "bower": "^1.7.7",
+    "broccoli-asset-rev": "^2.2.0",
+    "ember-ajax": "0.7.1",
+    "ember-cli": "2.3.0",
+    "ember-cli-app-version": "^1.0.0",
+    "ember-cli-babel": "^5.1.5",
+    "ember-cli-dependency-checker": "^1.2.0",
+    "ember-cli-htmlbars": "^1.0.1",
+    "ember-cli-htmlbars-inline-precompile": "^0.3.1",
+    "ember-cli-inject-live-reload": "^1.3.1",
+    "ember-cli-qunit": "^1.2.1",
+    "ember-cli-release": "0.2.8",
+    "ember-cli-sri": "^2.0.0",
+    "ember-cli-uglify": "^1.2.0",
+    "ember-data": "^2.3.0",
+    "ember-disable-proxy-controllers": "^1.0.1",
+    "ember-export-application-global": "^1.0.4",
+    "ember-load-initializers": "^0.5.0",
+    "ember-resolver": "^2.0.3",
+    "ember-spin-spinner": "0.2.4",
+    "ember-truth-helpers": "1.2.0",
+    "loader.js": "^4.0.0",
+	"ember-uploader": "1.0.0",
+	"ember-validations": "~ 2.0.0-alpha.4"
+  },
+  "ember-addon": {
+    "paths": [
+      "lib/favicon"
+    ],
+	"name": "files",
+	"paths": [
+	  "externaladdons/hdfs-directory-viewer"
+	]
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/pom.xml
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/pom.xml b/contrib/views/wfmanager/src/main/resources/ui/pom.xml
new file mode 100644
index 0000000..8bdb332
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/pom.xml
@@ -0,0 +1,214 @@
+<!--
+     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.
+  -->
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>oozie-ui</artifactId>
+    <version>0.0.0.1-SNAPSHOT</version>
+    <packaging>war</packaging>
+    <name>Oozie UI</name>
+    <parent>
+        <groupId>org.apache.oozie</groupId>
+        <artifactId>oozie-main</artifactId>
+        <version>4.2.0</version>
+    </parent>
+    <dependencies>
+    </dependencies>
+    <properties>
+        <webapp.port>4300</webapp.port>
+        <proxy.local.port>11002</proxy.local.port>
+        <oozie.remote.host>localhost</oozie.remote.host>
+        <oozie.remote.port>11000</oozie.remote.port>
+        <checkstyle.skip>true</checkstyle.skip>
+    </properties>
+    <build>
+        <plugins>
+            <!-- Building frontend -->
+            <plugin>
+                <groupId>com.github.eirslett</groupId>
+                <artifactId>frontend-maven-plugin</artifactId>
+                <version>0.0.22</version>
+                <configuration>
+                    <nodeVersion>v5.0.0</nodeVersion>
+                    <npmVersion>3.5.3</npmVersion>
+                    <workingDirectory>${project.basedir}</workingDirectory>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>install node and npm</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>install-node-and-npm</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>npm install</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>npm</goal>
+                        </goals>
+                        <configuration>
+                            <arguments>install</arguments>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>bower install</id>
+                        <goals>
+                            <goal>bower</goal>
+                        </goals>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <arguments>install</arguments>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>exec-maven-plugin</artifactId>
+                <groupId>org.codehaus.mojo</groupId>
+                <version>1.3.2</version>
+                <executions>
+                    <execution>
+                        <id>build</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>exec</goal>
+                        </goals>
+                        <configuration>
+                            <workingDirectory>${project.basedir}</workingDirectory>
+                            <executable>node/node</executable>
+                            <arguments>
+                                <argument>node_modules/.bin/ember</argument>
+                                <argument>build</argument>
+                            </arguments>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.1</version>
+                <configuration>
+                    <source>1.7</source>
+                    <target>1.7</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <webXml>${project.basedir}/oozie-ambari-view/src/main/resources/WEB-INF/web.xml</webXml>
+                    <webResources>
+                        <resource>
+                            <directory>${project.basedir}/dist</directory>
+                            <targetPath>/</targetPath>
+                        </resource>
+                    </webResources>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.eclipse.jetty</groupId>
+                <artifactId>jetty-maven-plugin</artifactId>
+                <version>9.3.7.v20160115</version>
+                <configuration>
+                  <httpConnector>
+                    <port>${webapp.port}</port>
+                  </httpConnector>
+                    <webAppSourceDirectory>${project.basedir}/target/${project.artifactId}-${project.version}</webAppSourceDirectory>
+                    <webApp>
+                        <contextPath>/</contextPath>
+                    </webApp>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <profiles>
+        <profile>
+            <id>server</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+                <property>
+                    <name>ember-server</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <version>1.3.2</version>
+                        <executions>
+                            <execution>
+                                <id>server</id>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <configuration>
+                                    <workingDirectory>${project.basedir}</workingDirectory>
+                                    <executable>node/node</executable>
+                                    <arguments>
+                                        <argument>node_modules/.bin/ember</argument>
+                                        <argument>server</argument>
+                                        <argument>--port ${webapp.port}</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>proxy</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+                <property>
+                    <name>proxy</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <version>1.3.2</version>
+                        <executions>
+                            <execution>
+                                <id>proxy</id>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <configuration>
+                                    <workingDirectory>${project.basedir}</workingDirectory>
+                                    <executable>node/node</executable>
+                                    <arguments>
+                                        <argument>proxy.js</argument>
+                                        <argument>${proxy.local.port}</argument>
+                                        <argument>${oozie.remote.host}</argument>
+                                        <argument>${oozie.remote.port}</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/proxy.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/proxy.js b/contrib/views/wfmanager/src/main/resources/ui/proxy.js
new file mode 100644
index 0000000..ec46909
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/proxy.js
@@ -0,0 +1,73 @@
+/*
+ *    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 http = require('http'),
+    args = process.argv.slice(2),
+    params = { onLocalPort: args[0] || 11002, toRemoteHost: args[1] || "localhost", toRemotePort: args[2] || 11000 };
+
+http.createServer(function (request, response) {
+    var corsHeaders = {
+            "Access-Control-Allow-Origin": '*',
+            'Access-Control-Allow-Methods': 'PUT, GET, POST, DELETE, OPTIONS',
+            "Access-Control-Allow-Headers": 'X-Requested-With, X-Requested-By'
+        },
+        req;
+
+    if (request.method === 'OPTIONS') {
+        console.log(`Handling options request and enabling cors for: ${request.url}`);
+        response.writeHead(200, corsHeaders);
+        response.end();
+        return;
+    }
+
+    console.log(`${request.connection.remoteAddress} ${request.method} ${request.url}`);
+    /*request.headers["user.name"] = "oozie";
+    request.headers["doAs"] = "guest";
+    console.log(request.headers);*/
+    req = http.request({
+        port: params.toRemotePort,
+        host: params.toRemoteHost,
+        method: request.method,
+        path: request.url,
+        headers: request.headers
+    }, function (res) {
+        console.log(`STATUS: ${res.statusCode}`);
+        console.log(`HEADERS: ${JSON.stringify(res.headers)}`);
+
+        res.on('data', (chunk) => {
+            response.write(chunk, 'binary');
+        });
+        res.on('end', () => {
+            response.end();
+        });
+        for (var header in corsHeaders) {
+            //console.log(header, corsHeaders[header]);
+            res.headers[header] = corsHeaders[header];
+        }
+        //response.writeHead("Access-Control-Allow-Origin", '*');
+        response.writeHead(res.statusCode, res.headers);
+    });
+
+    req.on('error', (e) => {
+        console.log(`problem with request: ${e.message}`);
+    });
+
+    req.end();
+
+}).listen(params.onLocalPort);
+
+console.log(`Proxy on: localhost:${params.onLocalPort} -> ${params.toRemoteHost}:${params.toRemotePort}`);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7742e7f/contrib/views/wfmanager/src/main/resources/ui/public/crossdomain.xml
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/public/crossdomain.xml b/contrib/views/wfmanager/src/main/resources/ui/public/crossdomain.xml
new file mode 100644
index 0000000..4d48cb4
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/public/crossdomain.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!--
+     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 cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
+<cross-domain-policy>
+  <!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->
+
+  <!-- Most restrictive policy: -->
+  <site-control permitted-cross-domain-policies="none"/>
+
+  <!-- Least restrictive policy: -->
+  <!--
+  <site-control permitted-cross-domain-policies="all"/>
+  <allow-access-from domain="*" to-ports="*" secure="false"/>
+  <allow-http-request-headers-from domain="*" headers="*" secure="false"/>
+  -->
+</cross-domain-policy>


Mime
View raw message