You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by wa...@apache.org on 2016/10/17 18:31:38 UTC

[42/50] [abbrv] hadoop git commit: YARN-4514. [YARN-3368] Cleanup hardcoded configurations, such as RM/ATS addresses. (Sunil G via wangda)

YARN-4514. [YARN-3368] Cleanup hardcoded configurations, such as RM/ATS addresses. (Sunil G via wangda)


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

Branch: refs/heads/YARN-3368
Commit: 7c786be59b5534f02cd227c8192c6780fc708205
Parents: fb176da
Author: Wangda Tan <wa...@apache.org>
Authored: Sat Apr 16 23:04:45 2016 -0700
Committer: Wangda Tan <wa...@apache.org>
Committed: Mon Oct 17 11:30:30 2016 -0700

----------------------------------------------------------------------
 .../src/main/webapp/app/adapters/abstract.js    | 48 +++++++++++++
 .../main/webapp/app/adapters/cluster-info.js    | 22 ++----
 .../main/webapp/app/adapters/cluster-metric.js  | 22 ++----
 .../webapp/app/adapters/yarn-app-attempt.js     | 24 ++-----
 .../src/main/webapp/app/adapters/yarn-app.js    | 27 ++-----
 .../webapp/app/adapters/yarn-container-log.js   | 10 ++-
 .../main/webapp/app/adapters/yarn-container.js  | 20 +++---
 .../main/webapp/app/adapters/yarn-node-app.js   | 24 +++----
 .../webapp/app/adapters/yarn-node-container.js  | 24 +++----
 .../src/main/webapp/app/adapters/yarn-node.js   | 23 +++---
 .../src/main/webapp/app/adapters/yarn-queue.js  | 22 ++----
 .../main/webapp/app/adapters/yarn-rm-node.js    | 21 ++----
 .../hadoop-yarn-ui/src/main/webapp/app/app.js   |  4 +-
 .../src/main/webapp/app/config.js               |  5 +-
 .../src/main/webapp/app/index.html              |  1 +
 .../src/main/webapp/app/initializers/env.js     | 29 ++++++++
 .../src/main/webapp/app/initializers/hosts.js   | 28 ++++++++
 .../src/main/webapp/app/services/env.js         | 59 ++++++++++++++++
 .../src/main/webapp/app/services/hosts.js       | 74 ++++++++++++++++++++
 .../hadoop-yarn-ui/src/main/webapp/bower.json   | 25 +++----
 .../src/main/webapp/config/configs.env          | 48 +++++++++++++
 .../src/main/webapp/config/default-config.js    | 32 +++++++++
 .../src/main/webapp/config/environment.js       | 11 ++-
 .../src/main/webapp/ember-cli-build.js          | 10 ++-
 .../hadoop-yarn-ui/src/main/webapp/package.json | 35 ++++-----
 .../webapp/tests/unit/initializers/env-test.js  | 41 +++++++++++
 .../tests/unit/initializers/hosts-test.js       | 41 +++++++++++
 .../tests/unit/initializers/jquery-test.js      | 41 +++++++++++
 .../main/webapp/tests/unit/services/env-test.js | 30 ++++++++
 .../webapp/tests/unit/services/hosts-test.js    | 30 ++++++++
 30 files changed, 637 insertions(+), 194 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/abstract.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/abstract.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/abstract.js
new file mode 100644
index 0000000..c7e5c36
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/abstract.js
@@ -0,0 +1,48 @@
+/**
+ * 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 DS.JSONAPIAdapter.extend({
+  address: null, //Must be set by inheriting classes
+  restNameSpace: null, //Must be set by inheriting classes
+  serverName: null, //Must be set by inheriting classes
+
+  headers: {
+    Accept: 'application/json'
+  },
+
+  host: Ember.computed("address", function () {
+    var address = this.get("address");
+    return this.get(`hosts.${address}`);
+  }),
+
+  namespace: Ember.computed("restNameSpace", function () {
+    var serverName = this.get("restNameSpace");
+    return this.get(`env.app.namespaces.${serverName}`);
+  }),
+
+  ajax: function(url, method, options) {
+    options = options || {};
+    options.crossDomain = true;
+    options.xhrFields = {
+      withCredentials: true
+    };
+    options.targetServer = this.get('serverName');
+    return this._super(url, method, options);
+  }
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-info.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-info.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-info.js
index 7dcbe61..f79df92 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-info.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-info.js
@@ -16,23 +16,15 @@
  * limitations under the License.
  */
 
-import DS from 'ember-data';
-import Config from 'yarn-ui/config';
+import AbstractAdapter from './abstract';
 
-export default DS.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
-  namespace: 'ws/v1/cluster', // common const
+export default AbstractAdapter.extend({
+  address: "rmWebAddress",
+  restNameSpace: "cluster",
+  serverName: "RM",
+
+  // Any cluster-info specific adapter changes must be added here
   pathForType(modelName) {
     return ''; // move to some common place, return path by modelname.
   },
-  ajax(url, method, hash) {
-    hash = hash || {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "RM";
-    return this._super(url, method, hash); 
-  }
 });

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-metric.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-metric.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-metric.js
index ad5ae0e..8325a4c 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-metric.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-metric.js
@@ -16,23 +16,15 @@
  * limitations under the License.
  */
 
-import DS from 'ember-data';
-import Config from 'yarn-ui/config';
+import AbstractAdapter from './abstract';
 
-export default DS.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
-  namespace: 'ws/v1/cluster/metrics', // common const
+export default AbstractAdapter.extend({
+  address: "rmWebAddress",
+  restNameSpace: "metrics",
+  serverName: "RM",
+
+  // Any cluster-metric specific adapter changes must be added here
   pathForType(modelName) {
     return ''; // move to some common place, return path by modelname.
   },
-  ajax(url, method, hash) {
-    hash = hash || {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "RM";
-    return this._super(url, method, hash); 
-  }
 });

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app-attempt.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app-attempt.js
index 7b233bc..d10ba45 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app-attempt.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app-attempt.js
@@ -16,16 +16,13 @@
  * limitations under the License.
  */
 
-import DS from 'ember-data';
+import AbstractAdapter from './abstract';
 import Converter from 'yarn-ui/utils/converter';
-import Config from 'yarn-ui/config';
 
-export default DS.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
-  namespace: 'ws/v1/cluster', // common const
+export default AbstractAdapter.extend({
+  address: "rmWebAddress",
+  restNameSpace: "cluster",
+  serverName: "RM",
 
   urlForQuery(query, modelName) {
     var url = this._buildURL();
@@ -36,15 +33,8 @@ export default DS.JSONAPIAdapter.extend({
     var url = this._buildURL();
     var url = url + '/apps/' + 
            Converter.attemptIdToAppId(id) + "/appattempts/" + id;
-    console.log(url);
+    console.log('app-attempt url:',url);
     return url;
-  },
-
-  ajax(url, method, hash) {
-    hash = {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "RM";
-    return this._super(url, method, hash); 
   }
+
 });

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app.js
index 5cd888c..afd93f4 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app.js
@@ -16,29 +16,14 @@
  * limitations under the License.
  */
 
-import DS from 'ember-data';
-import Config from 'yarn-ui/config';
+import AbstractAdapter from './abstract';
+
+export default AbstractAdapter.extend({
+  address: "rmWebAddress",
+  restNameSpace: "cluster",
+  serverName: "RM",
 
-export default DS.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
-  namespace: 'ws/v1/cluster', // common const
   pathForType(modelName) {
     return 'apps'; // move to some common place, return path by modelname.
   },
-  /*
-  urlForQuery(query, modelName) {
-    var url = this._buildURL();
-    return url + '/apps/' + query.appId + "/appattempts";
-  },
-  */
-  ajax(url, method, hash) {
-    hash = hash || {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "RM";
-    return this._super(url, method, hash); 
-  }
 });

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container-log.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container-log.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container-log.js
index 7838c98..39c3c87 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container-log.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container-log.js
@@ -28,8 +28,14 @@ export default DS.RESTAdapter.extend({
   headers: {
     Accept: 'text/plain'
   },
-  host: 'http://localhost:1337/',
-  namespace: 'ws/v1/node',
+
+  host: Ember.computed("address", function () {
+    return this.get(`hosts.localBaseAddress`);
+  }),
+
+  namespace: Ember.computed("restNameSpace", function () {
+    return this.get(`env.app.namespaces.node`);
+  }),
 
   urlForFindRecord(id, modelName, snapshot) {
     var splits = Converter.splitForContainerLogs(id);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container.js
index 67a37f7..fd6a6f8 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container.js
@@ -18,30 +18,32 @@
 
 import DS from 'ember-data';
 import Converter from 'yarn-ui/utils/converter';
-import Config from 'yarn-ui/config';
 
 export default DS.JSONAPIAdapter.extend({
   headers: {
     Accept: 'application/json'
   },
-  rmHost: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT,
-  tsHost: 'http://localhost:1337/' + Config.TS_HOST + ':' + Config.TS_PORT,
+
   host: function() {
     return undefined
   }.property(),
-  rmNamespace: 'ws/v1/cluster',
-  tsNamespace: 'ws/v1/applicationhistory',
+
   namespace: function() {
     return undefined
   }.property(),
 
   urlForQuery(query, modelName) {
+    var rmHosts = this.get(`hosts.rmWebAddress`);
+    var tsHosts = this.get(`hosts.timelineWebAddress`);
+    var rmNamespaces = this.get(`env.app.namespaces.cluster`);
+    var tsNamespaces = this.get(`env.app.namespaces.timeline`);
+
     if (query.is_rm) {
-      this.set("host", this.rmHost);
-      this.set("namespace", this.rmNamespace);
+      this.set("host", rmHosts);
+      this.set("namespace", rmNamespaces);
     } else {
-      this.set("host", this.tsHost);
-      this.set("namespace", this.tsNamespace);
+      this.set("host", tsHosts);
+      this.set("namespace", tsNamespaces);
     }
 
     var url = this._buildURL();

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-app.js
index 0c60d1f..fd6c021 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-app.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-app.js
@@ -16,24 +16,23 @@
  * limitations under the License.
  */
 
-import DS from 'ember-data';
+import AbstractAdapter from './abstract';
 
-export default DS.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/',
-  namespace: 'ws/v1/node',
+export default AbstractAdapter.extend({
+
+  address: "localBaseAddress",
+  restNameSpace: "node",
+  serverName: "NM",
 
   urlForQuery(query) {
-    this.host = this.host + query.nodeAddr;
+    this.host = this.get("host") + query.nodeAddr;
     var url = this._buildURL();
     url = url + "/apps";
     return url;
   },
 
   urlForQueryRecord: function (query) {
-    this.host = this.host + query.nodeAddr;
+    this.host = this.get("host")  + query.nodeAddr;
     var url = this._buildURL();
     url = url + "/apps/" + query.appId;
     return url;
@@ -53,11 +52,4 @@ export default DS.JSONAPIAdapter.extend({
     return this.ajax(url, 'GET', { data: query });
   },
 
-  ajax(url, method, hash) {
-    hash = hash || {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "NM";
-    return this._super(url, method, hash);
-  }
 });

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-container.js
index e8bf7b7..caf1e3f 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-container.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-container.js
@@ -16,24 +16,23 @@
  * limitations under the License.
  */
 
-import DS from 'ember-data';
+import AbstractAdapter from './abstract';
 
-export default DS.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/',
-  namespace: 'ws/v1/node',
+export default AbstractAdapter.extend({
+
+  address: "localBaseAddress",
+  restNameSpace: "node",
+  serverName: "NM",
 
   urlForQuery(query) {
-    this.host = this.host + query.nodeHttpAddr;
+    this.host = this.get("host") + query.nodeHttpAddr;
     var url = this._buildURL();
     url = url + "/containers";
     return url;
   },
 
   urlForQueryRecord(query) {
-    this.host = this.host + query.nodeHttpAddr;
+    this.host = this.get("host")  + query.nodeHttpAddr;
     var url = this._buildURL();
     url = url + "/containers/" + query.containerId;
     return url;
@@ -54,11 +53,4 @@ export default DS.JSONAPIAdapter.extend({
     return this.ajax(url, 'GET', { data: query });
   },
 
-  ajax(url, method, hash) {
-    hash = hash || {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "NM";
-    return this._super(url, method, hash);
-  }
 });

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node.js
index 64f524a..c9f36c3 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node.js
@@ -16,25 +16,18 @@
  * limitations under the License.
  */
 
-import DS from 'ember-data';
+import AbstractAdapter from './abstract';
 
-export default DS.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/',
-  namespace: 'ws/v1/node',
+export default AbstractAdapter.extend({
+
+  address: "localBaseAddress",
+  restNameSpace: "node",
+  serverName: "NM",
 
   urlForFindRecord(id, modelName, snapshot) {
-    this.host = this.host + id;
+    this.host = this.get("host") + id;
     var url = this._buildURL();
     return url;
   },
-  ajax(url, method, hash) {
-    hash = hash || {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "NM";
-    return this._super(url, method, hash);
-  }
+
 });

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue.js
index ebe7b39..41cd442 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue.js
@@ -16,23 +16,15 @@
  * limitations under the License.
  */
 
-import DS from 'ember-data';
-import Config from 'yarn-ui/config';
+import AbstractAdapter from './abstract';
+
+export default AbstractAdapter.extend({
+  address: "rmWebAddress",
+  restNameSpace: "cluster",
+  serverName: "RM",
 
-export default DS.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
-  namespace: 'ws/v1/cluster', // common const
   pathForType(modelName) {
     return 'scheduler'; // move to some common place, return path by modelname.
   },
-  ajax(url, method, hash) {
-    hash = hash || {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "RM";
-    return this._super(url, method, hash); 
-  }
+
 });

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-rm-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-rm-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-rm-node.js
index c6ad6f3..a24c399 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-rm-node.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-rm-node.js
@@ -16,15 +16,13 @@
  * limitations under the License.
  */
 
-import DS from 'ember-data';
-import Config from 'yarn-ui/config';
+import AbstractAdapter from './abstract';
+
+export default AbstractAdapter.extend({
+  address: "rmWebAddress",
+  restNameSpace: "cluster",
+  serverName: "RM",
 
-export default DS.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT,
-  namespace: 'ws/v1/cluster',
   pathForType(modelName) {
     return 'nodes';
   },
@@ -35,11 +33,4 @@ export default DS.JSONAPIAdapter.extend({
     return url;
   },
 
-  ajax(url, method, hash) {
-    hash = hash || {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "RM";
-    return this._super(url, method, hash);
-  }
 });

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/app.js
index 5617953..8c1025a 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/app.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/app.js
@@ -17,7 +17,7 @@
  */
 
 import Ember from 'ember';
-import Resolver from 'ember/resolver';
+import Resolver from 'ember-resolver';
 import loadInitializers from 'ember/load-initializers';
 import config from './config/environment';
 import Sorter from 'yarn-ui/utils/sorter';
@@ -29,7 +29,7 @@ Ember.MODEL_FACTORY_INJECTIONS = true;
 App = Ember.Application.extend({
   modulePrefix: config.modulePrefix,
   podModulePrefix: config.podModulePrefix,
-  Resolver: Resolver
+  Resolver
 });
 
 loadInitializers(App, config.modulePrefix);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/config.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/config.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/config.js
index 224c65a..157d48b 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/config.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/config.js
@@ -19,9 +19,6 @@
 /**
  * Host and port configurations
  */
+
 export default {
-  RM_HOST: 'localhost',
-  RM_PORT: '8088',
-  TS_HOST: 'localhost',
-  TS_PORT: '8188',
 };

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/index.html
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/index.html b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/index.html
index 969ea2f..f727454 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/index.html
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/index.html
@@ -34,6 +34,7 @@
   </head>
   <body>
     {{content-for 'body'}}
+    <script src="config/configs.env" integrity=""></script>
 
     <script src="assets/vendor.js"></script>
     <script src="assets/yarn-ui.js"></script>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/env.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/env.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/env.js
new file mode 100644
index 0000000..c613593
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/env.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.
+ */
+
+
+export function initialize( application ) {
+   application.inject('controller', 'env', 'service:env');
+   application.inject('route', 'env', 'service:env');
+   application.inject('adapter', 'env', 'service:env');
+}
+
+export default {
+  name: 'env',
+  initialize
+};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/hosts.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/hosts.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/hosts.js
new file mode 100644
index 0000000..6e3aa96
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/hosts.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.
+ */
+
+export function initialize( application ) {
+   application.inject('controller', 'hosts', 'service:hosts');
+   application.inject('route', 'hosts', 'service:hosts');
+   application.inject('adapter', 'hosts', 'service:hosts');
+}
+
+export default {
+  name: 'hosts',
+  initialize
+};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/services/env.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/services/env.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/services/env.js
new file mode 100644
index 0000000..208499c
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/services/env.js
@@ -0,0 +1,59 @@
+/*global more*/
+/**
+ * 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 environment from '../config/environment';
+
+var MoreObject = more.Object;
+
+export default Ember.Service.extend({
+  ENV: null,
+
+  init: function () {
+    this.collateConfigs();
+  },
+
+  collateConfigs: function () {
+    var collatedENV = {
+          APP: {}
+        },
+    ENV = window.ENV;
+
+    MoreObject.merge(collatedENV, environment);
+
+    if(ENV) {
+      MoreObject.merge(collatedENV.APP, ENV);
+    }
+
+    this.setComputedENVs(collatedENV);
+
+    this.set("ENV", collatedENV);
+  },
+
+  setComputedENVs: function (env) {
+    var navigator = window.navigator;
+    env.isIE = navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0;
+    console.log('In setComputedENVs', env.isIE);
+  },
+
+  app: Ember.computed("ENV.APP", function () {
+    return this.get("ENV.APP");
+  })
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/services/hosts.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/services/hosts.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/services/hosts.js
new file mode 100644
index 0000000..19863e1
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/services/hosts.js
@@ -0,0 +1,74 @@
+/**
+ * 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.Service.extend({
+
+  env: Ember.inject.service("env"),
+
+  attachProtocolScheme: function (url) {
+    var localProto = this.get("env.app.hosts.protocolScheme");
+
+    if(localProto === "") {
+      localProto = "http:";
+    }
+
+    if(url.match("://")) {
+      url = url.substr(url.indexOf("://") + 3);
+    }
+
+    return localProto + "//" + url;
+  },
+
+  normalizeURL: function (url) {
+    var address;
+
+    // If localBaseAddress is configured, then normalized URL has to
+    // start with this address. For eg: when used with CORS proxy.
+    // In any case, this fn will return with correct proto scheme.
+    address = this.localAddress() + url;
+
+    // Remove trailing slash
+    if(address && address.charAt(address.length - 1) === '/') {
+      address = address.slice(0, -1);
+    }
+    return address;
+  },
+
+  localAddress: function () {
+    var localBaseAddressProto = "";
+
+    if (this.get("env.app.hosts.localBaseAddress").length > 0) {
+      localBaseAddressProto = this.get("env.app.hosts.localBaseAddress") + '/';
+    }
+    return this.attachProtocolScheme(localBaseAddressProto);
+  },
+
+  localBaseAddress: Ember.computed(function () {
+    return this.localAddress();
+  }),
+
+  timelineWebAddress: Ember.computed(function () {
+    return this.normalizeURL(this.get("env.app.hosts.timelineWebAddress"));
+  }),
+
+  rmWebAddress: Ember.computed(function () {
+    return this.normalizeURL(this.get("env.app.hosts.rmWebAddress"));
+  }),
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/bower.json
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/bower.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/bower.json
index de66650..b23dbbc 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/bower.json
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/bower.json
@@ -1,18 +1,19 @@
 {
   "name": "yarn-ui",
   "dependencies": {
-    "ember": "2.0.1",
-    "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.4",
-    "ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
-    "ember-data": "2.0.0",
-    "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.6",
-    "ember-qunit": "0.4.9",
-    "ember-qunit-notifications": "0.0.7",
-    "ember-resolver": "~0.1.18",
-    "jquery": "1.11.3",
-    "loader.js": "ember-cli/loader.js#3.2.1",
-    "qunit": "~1.18.0",
-    "bootstrap": "~3.3.2",
+    "ember": "2.2.0",
+    "ember-cli-shims": "0.0.6",
+    "ember-cli-test-loader": "0.2.1",
+    "ember-data": "2.1.0",
+    "ember-load-initializers": "0.1.7",
+    "ember-qunit": "0.4.16",
+    "ember-qunit-notifications": "0.1.0",
+    "jquery": "2.1.4",
+    "loader.js": "3.3.0",
+    "qunit": "1.19.0",
+    "jquery-ui": "1.11.4",
+    "more-js": "0.8.2",
+    "bootstrap": "3.3.6",
     "d3": "~3.5.6",
     "datatables": "~1.10.8",
     "spin.js": "~2.3.2",

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/configs.env
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/configs.env b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/configs.env
new file mode 100644
index 0000000..04577c9
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/configs.env
@@ -0,0 +1,48 @@
+/**
+ * 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.
+ */
+
+ENV = {
+  hosts: {
+    /*
+     * Local URL. This is empty by default. In case when ResourceManager
+     * and Timeline Server (ATS) are running on same node, cross domain
+     * requests has to be supported. In such cases, proxy URL can be configured
+     * here to handle requests (CORS). For eg:"localhost:1337"
+     */
+      //localBaseAddress: "localhost:1337",
+
+    /*
+     * Timeline web interface can be configured below.
+     * By default timeline server is set as localhost:8188, uncomment and change
+     * the following value for pointing to a different address.
+     */
+      //timelineWebAddress: "localhost:8188",
+
+    /*
+     * RM web interface can be configured below.
+     * By default RM web address is set as localhost:8088, uncomment and change
+     * the following value for pointing to a different address.
+     */
+      //rmWebAddress: "localhost:8088",
+
+    /*
+     * Protocol scheme. It can be "http:" or "https:". By default, http is used.
+     */
+      //protocolScheme: "http:"
+  },
+};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/default-config.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/default-config.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/default-config.js
new file mode 100644
index 0000000..92d0721
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/default-config.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.
+ */
+
+module.exports = { // Yarn UI App configurations
+    hosts: {
+      localBaseAddress: "localhost:1337",
+      timelineWebAddress: "localhost:8188",
+      rmWebAddress: "localhost:8088",
+      protocolScheme: "http:"
+    },
+    namespaces: {
+      timeline: 'ws/v1/applicationhistory',
+      cluster: 'ws/v1/cluster',
+      metrics: 'ws/v1/cluster/metrics',
+      node: 'ws/v1/node'
+    },
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/environment.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/environment.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/environment.js
index 9a14068..118e0ba 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/environment.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/environment.js
@@ -18,6 +18,8 @@
 
 /* jshint node: true */
 
+const DEFAULT_CONFIG = require('./default-config');
+
 module.exports = function(environment) {
   var ENV = {
     modulePrefix: 'yarn-ui',
@@ -31,9 +33,12 @@ module.exports = function(environment) {
       }
     },
 
-    APP: {
-      // Here you can pass flags/options to your application instance
-      // when it is created
+    APP: DEFAULT_CONFIG,
+    contentSecurityPolicy: {
+      'connect-src': "* 'self'",
+      'child-src': "'self' 'unsafe-inline'",
+      'style-src': "'self' 'unsafe-inline'",
+      'script-src': "'self' 'unsafe-inline'"
     }
   };
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/ember-cli-build.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/ember-cli-build.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/ember-cli-build.js
index cf5ad83..bce18ce 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/ember-cli-build.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/ember-cli-build.js
@@ -17,6 +17,7 @@
  */
 
 /* global require, module */
+var Funnel = require("broccoli-funnel");
 var EmberApp = require('ember-cli/lib/broccoli/ember-app');
 
 module.exports = function(defaults) {
@@ -29,6 +30,8 @@ module.exports = function(defaults) {
   app.import("bower_components/momentjs/min/moment.min.js");
   app.import("bower_components/select2/dist/css/select2.min.css");
   app.import("bower_components/select2/dist/js/select2.min.js");
+  app.import('bower_components/jquery-ui/jquery-ui.js');
+  app.import('bower_components/more-js/dist/more.js');
 
   // Use `app.import` to add additional libraries to the generated
   // output files.
@@ -42,6 +45,11 @@ module.exports = function(defaults) {
   // modules that you would like to import into your application
   // please specify an object with the list of modules as keys
   // along with the exports of each module as its value.
+  var extraAssets = new Funnel('config', {
+     srcDir: '/',
+     include: ['*.env'],
+     destDir: '/config'
+  });
 
-  return app.toTree();
+  return app.toTree(extraAssets);
 };

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/package.json
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/package.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/package.json
index b52ac1d..40febda 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/package.json
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/package.json
@@ -19,25 +19,28 @@
   "author": "",
   "license": "Apache",
   "devDependencies": {
-    "broccoli-asset-rev": "^2.1.2",
-    "ember-bootstrap": "0.2.0",
-    "ember-cli": "1.13.8",
-    "ember-cli-app-version": "0.5.0",
-    "ember-cli-babel": "^5.1.3",
+    "broccoli-asset-rev": "2.4.2",
+    "broccoli-funnel": "1.0.1",
+    "ember-bootstrap": "0.5.1",
+    "ember-cli": "1.13.13",
+    "ember-cli-app-version": "1.0.0",
+    "ember-cli-babel": "5.1.6",
     "ember-cli-content-security-policy": "0.4.0",
-    "ember-cli-dependency-checker": "^1.0.1",
-    "ember-cli-htmlbars": "0.7.9",
-    "ember-cli-htmlbars-inline-precompile": "^0.2.0",
+    "ember-cli-dependency-checker": "1.2.0",
+    "ember-cli-htmlbars": "1.0.2",
+    "ember-cli-htmlbars-inline-precompile": "0.3.1",
     "ember-cli-ic-ajax": "0.2.1",
-    "ember-cli-inject-live-reload": "^1.3.1",
-    "ember-cli-qunit": "^1.0.0",
-    "ember-cli-release": "0.2.3",
-    "ember-cli-sri": "^1.0.3",
-    "ember-cli-uglify": "^1.2.0",
+    "ember-cli-inject-live-reload": "1.4.0",
+    "ember-cli-jquery-ui": "0.0.20",
+    "ember-cli-qunit": "1.2.1",
+    "ember-cli-release": "0.2.8",
+    "ember-cli-sri": "1.2.1",
+    "ember-cli-uglify": "1.2.0",
     "ember-d3": "0.1.0",
-    "ember-data": "1.13.8",
-    "ember-disable-proxy-controllers": "^1.0.0",
-    "ember-export-application-global": "^1.0.3",
+    "ember-data": "2.1.0",
+    "ember-disable-proxy-controllers": "1.0.1",
+    "ember-export-application-global": "1.0.5",
+    "ember-resolver": "2.0.3",
     "ember-spin-spinner": "0.2.3",
     "select2": "4.0.0"
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/initializers/env-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/initializers/env-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/initializers/env-test.js
new file mode 100644
index 0000000..d6dacfd
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/initializers/env-test.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 Ember from 'ember';
+import { initialize } from '../../../initializers/env';
+import { module, test } from 'qunit';
+
+var registry, application;
+
+module('Unit | Initializer | env', {
+  beforeEach: function() {
+    Ember.run(function() {
+      application = Ember.Application.create();
+      registry = application.registry;
+      application.deferReadiness();
+    });
+  }
+});
+
+// Replace this with your real tests.
+test('it works', function(assert) {
+  initialize(registry, application);
+
+  // you would normally confirm the results of the initializer here
+  assert.ok(true);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/initializers/hosts-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/initializers/hosts-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/initializers/hosts-test.js
new file mode 100644
index 0000000..b9a6b27
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/initializers/hosts-test.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 Ember from 'ember';
+import { initialize } from '../../../initializers/hosts';
+import { module, test } from 'qunit';
+
+var registry, application;
+
+module('Unit | Initializer | hosts', {
+  beforeEach: function() {
+    Ember.run(function() {
+      application = Ember.Application.create();
+      registry = application.registry;
+      application.deferReadiness();
+    });
+  }
+});
+
+// Replace this with your real tests.
+test('it works', function(assert) {
+  initialize(registry, application);
+
+  // you would normally confirm the results of the initializer here
+  assert.ok(true);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/initializers/jquery-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/initializers/jquery-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/initializers/jquery-test.js
new file mode 100644
index 0000000..c7a9803
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/initializers/jquery-test.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 Ember from 'ember';
+import { initialize } from '../../../initializers/jquery';
+import { module, test } from 'qunit';
+
+var registry, application;
+
+module('Unit | Initializer | jquery', {
+  beforeEach: function() {
+    Ember.run(function() {
+      application = Ember.Application.create();
+      registry = application.registry;
+      application.deferReadiness();
+    });
+  }
+});
+
+// Replace this with your real tests.
+test('it works', function(assert) {
+  initialize(registry, application);
+
+  // you would normally confirm the results of the initializer here
+  assert.ok(true);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/services/env-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/services/env-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/services/env-test.js
new file mode 100644
index 0000000..9eb9367
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/services/env-test.js
@@ -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.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('service:env', 'Unit | Service | env', {
+  // Specify the other units that are required for this test.
+  // needs: ['service:foo']
+});
+
+// Replace this with your real tests.
+test('it exists', function(assert) {
+  var service = this.subject();
+  assert.ok(service);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c786be5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/services/hosts-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/services/hosts-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/services/hosts-test.js
new file mode 100644
index 0000000..015748a
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/services/hosts-test.js
@@ -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.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('service:hosts', 'Unit | Service | hosts', {
+  // Specify the other units that are required for this test.
+  // needs: ['service:foo']
+});
+
+// Replace this with your real tests.
+test('it exists', function(assert) {
+  var service = this.subject();
+  assert.ok(service);
+});


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org