http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-flow-activity.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-flow-activity.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-flow-activity.js
new file mode 100644
index 0000000..1095cfe
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-flow-activity.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.
+ */
+
+import DS from 'ember-data';
+
+export default DS.Model.extend({
+  cluster: DS.attr('string'),
+  flowName: DS.attr('string'),
+  lastExecDate: DS.attr('string'),
+  user: DS.attr('string'),
+  flowruns: DS.attr('string'),
+  uid: DS.attr('string')
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-flowrun-brief.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-flowrun-brief.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-flowrun-brief.js
new file mode 100644
index 0000000..8d9fca3
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-flowrun-brief.js
@@ -0,0 +1,70 @@
+/**
+ * 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 DS from 'ember-data';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.Model.extend({
+  flowName: DS.attr('string'),
+  runid: DS.attr('string'),
+  shownid: DS.attr('string'),
+  type: DS.attr('string'),
+  createTime: DS.attr('string'),
+  createTimeRaw: DS.attr(),
+  endTime: DS.attr('string'),
+  endTimeRaw: DS.attr(),
+  user: DS.attr('string'),
+  uid: DS.attr('string'),
+  cpuVCores: DS.attr('number'),
+  memoryUsed: DS.attr('number'),
+
+  runDurationTs: function() {
+    var duration = this.get('endTimeRaw') - this.get('createTimeRaw');
+    if (duration <= 0) {
+      duration = Date.now() - this.get('createTimeRaw');
+    }
+    return duration;
+  }.property('createTimeRaw', 'endTimeRaw'),
+
+  getElapsedTimeVizDataForBarChart: function() {
+    return {
+      label: this.get('runid'),
+      value: this.get('runDurationTs'),
+      tooltip: this.get("shownid") + "<br>" + 
Converter.msToElapsedTimeUnit(this.get('runDurationTs')),
+      flowrunUid: this.get('uid')
+    };
+  },
+
+  getCpuVCoresVizDataForBarChart: function() {
+    return {
+      label: this.get('runid'),
+      value: this.get('cpuVCores'),
+      tooltip: this.get("shownid") + "<br>" + 'CPU VCores: ' + 
this.get('cpuVCores'),
+      flowrunUid: this.get('uid')
+    };
+  },
+
+  getMemoryVizDataForBarChart: function() {
+    return {
+      label: this.get('runid'),
+      value: this.get('memoryUsed'),
+      tooltip: this.get("shownid") + "<br>" + 'Memory Used: ' + 
Converter.memoryBytesToMB(this.get('memoryUsed')),
+      flowrunUid: this.get('uid')
+    };
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-flowrun.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-flowrun.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-flowrun.js
new file mode 100644
index 0000000..5e3a050
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-flowrun.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 DS from 'ember-data';
+
+// For now, similar to yarn-flowrun-brief, but may add more in future.
+
+export default DS.Model.extend({
+  flowName: DS.attr('string'),
+  runid: DS.attr('string'),
+  shownid: DS.attr('string'),
+  type: DS.attr('string'),
+  createTime: DS.attr('string'),
+  endTime: DS.attr('string'),
+  user: DS.attr('string'),
+  metrics: DS.attr('array')
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-timeline-appattempt.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-timeline-appattempt.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-timeline-appattempt.js
new file mode 100644
index 0000000..dd95765
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-timeline-appattempt.js
@@ -0,0 +1,143 @@
+/**
+ * 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 DS from 'ember-data';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.Model.extend({
+  startTime: DS.attr('string'),
+  startedTime: DS.attr('string'),
+  finishedTime: DS.attr('string'),
+  containerId: DS.attr('string'),
+  amContainerId: DS.attr('string'),
+  nodeHttpAddress: DS.attr('string'),
+  nodeId: DS.attr('string'),
+  hosts: DS.attr('string'),
+  logsLink: DS.attr('string'),
+  state: DS.attr('string'),
+  appAttemptId: DS.attr('string'),
+
+  appId: Ember.computed("id",function () {
+    var id = this.get("id");
+    id = id.split("_");
+
+    id[0] = "application";
+    id.pop();
+
+    return id.join("_");
+  }),
+
+  attemptStartedTime: function() {
+    var startTime = this.get("startTime");
+    // If startTime variable is not present, get from startedTime
+    if (startTime === undefined ||
+      startTime === "Invalid date") {
+      startTime = this.get("startedTime");
+    }
+
+    return startTime;
+  }.property("startedTime"),
+
+  startTs: function() {
+    return Converter.dateToTimeStamp(this.get('attemptStartedTime'));
+  }.property("startTime"),
+
+  finishedTs: function() {
+    var ts = Converter.dateToTimeStamp(this.get("finishedTime"));
+    return ts;
+  }.property("finishedTime"),
+
+  validatedFinishedTs: function() {
+    if (this.get("finishedTs") < this.get("startTs")) {
+      return "";
+    }
+    return this.get("finishedTime");
+  }.property("finishedTime"),
+
+  shortAppAttemptId: function() {
+    if (!this.get("containerId")) {
+      return this.get("id");
+    }
+    return "attempt_" +
+           
parseInt(Converter.containerIdToAttemptId(this.get("containerId")).split("_")[3]);
+  }.property("containerId"),
+
+  appMasterContainerId: function() {
+    var id = this.get("containerId");
+    // If containerId variable is not present, get from amContainerId
+    if (id === undefined) {
+      id = this.get("amContainerId");
+    }
+    return id;
+  }.property("amContainerId"),
+
+  IsAmNodeUrl: function() {
+    var url = this.get("nodeHttpAddress");
+      // If nodeHttpAddress variable is not present, hardcode it.
+    if (url === undefined) {
+      url = "Not Available";
+    }
+    return url !== "Not Available";
+  }.property("nodeHttpAddress"),
+
+  amNodeId : function() {
+    var id = this.get("nodeId");
+    // If nodeId variable is not present, get from host
+    if (id === undefined) {
+      id = this.get("hosts");
+    }
+    return id;
+  }.property("nodeId"),
+
+  IsLinkAvailable: function() {
+    var url = this.get("logsLink");
+    // If logsLink variable is not present, hardcode its.
+    if (url === undefined) {
+      url = "Not Available";
+    }
+    return url !== "Not Available";
+  }.property("logsLink"),
+
+  elapsedTime: function() {
+    var elapsedMs = this.get("finishedTs") - this.get("startTs");
+    if (elapsedMs <= 0) {
+      elapsedMs = Date.now() - this.get("startTs");
+    }
+    return Converter.msToElapsedTimeUnit(elapsedMs);
+  }.property(),
+
+  tooltipLabel: function() {
+    return "<p>Id:" + this.get("id") +
+           "</p><p>ElapsedTime:" +
+           String(this.get("elapsedTime")) + "</p>";
+  }.property(),
+
+  link: function() {
+    return "/yarn-app-attempt/" + this.get("id");
+  }.property(),
+
+  linkname: function() {
+    return "yarn-app-attempt";
+  }.property(),
+
+  attemptState: function() {
+    return this.get("state");
+  }.property(),
+
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-timeline-container.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-timeline-container.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-timeline-container.js
new file mode 100644
index 0000000..7f39345
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-timeline-container.js
@@ -0,0 +1,63 @@
+/**
+ * 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 DS from 'ember-data';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.Model.extend({
+  allocatedMB: DS.attr('number'),
+  allocatedVCores: DS.attr('number'),
+  assignedNodeId: DS.attr('string'),
+  priority: DS.attr('number'),
+  startedTime: DS.attr('number'),
+  finishedTime: DS.attr('number'),
+  logUrl: DS.attr('string'),
+  containerExitStatus: DS.attr('number'),
+  containerState: DS.attr('string'),
+  nodeHttpAddress: DS.attr('string'),
+
+  startTs: function() {
+    return Converter.dateToTimeStamp(this.get("startedTime"));
+  }.property("startedTime"),
+
+  finishedTs: function() {
+    var ts = Converter.dateToTimeStamp(this.get("finishedTime"));
+    return ts;
+  }.property("finishedTime"),
+
+  validatedFinishedTs: function() {
+    if (this.get("finishedTs") < this.get("startTs")) {
+      return "";
+    }
+    return this.get("finishedTime");
+  }.property("finishedTime"),
+
+  elapsedTime: function() {
+    var elapsedMs = this.get("finishedTs") - this.get("startTs");
+    if (elapsedMs <= 0) {
+      elapsedMs = Date.now() - this.get("startTs");
+    }
+    return Converter.msToElapsedTimeUnit(elapsedMs);
+  }.property(),
+
+  tooltipLabel: function() {
+    return "<p>Id:" + this.get("id") +
+           "</p><p>ElapsedTime:" +
+           String(this.get("elapsedTime")) + "</p>";
+  }.property(),
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/router.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/router.js 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/router.js
index a45861e..00d6d3e 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/router.js
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/router.js
@@ -56,6 +56,18 @@ Router.map(function() {
   this.route('notfound', { path: '*:' });
   this.route('yarn-app-attempts', { path: '/yarn-app-attempts/:app_id' });
   this.route('yarn-queues', { path: '/yarn-queues/:queue_name' });
+
+  this.route('yarn-flow-activity');
+  this.route('yarn-flow', { path: '/yarn-flow/:flow_uid'}, function() {
+    this.route('info');
+    this.route('runs');
+  });
+  this.route('yarn-flowrun', { path: '/yarn-flowrun/:flowrun_uid'}, function() 
{
+    this.route('info');
+    this.route('metrics');
+  });
+  this.route('yarn-flowrun-metric', { path: 
'/yarn-flowrun-metric/:flowrun_uid/:metric_id'});
+  this.route('timeline-error', {path: 'timeline-error/:error_id'});
 });
 
 export default Router;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/timeline-error.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/timeline-error.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/timeline-error.js
new file mode 100644
index 0000000..c2e5fc5
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/timeline-error.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';
+
+export default Ember.Route.extend({
+  afterModel(model/*, transition*/) {
+    model.error_id = "error";
+    model.isValidErrorCode = false;
+    if (model.errorCode && model.errorCode !== "0") {
+      model.isValidErrorCode = true;
+    }
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app-attempt.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app-attempt.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app-attempt.js
index d449adf..b561bf6 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app-attempt.js
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app-attempt.js
@@ -17,34 +17,28 @@
  */
 
 import Ember from 'ember';
-
 import AbstractRoute from './abstract';
+import AppAttemptMixin from 'yarn-ui/mixins/app-attempt';
 
-export default AbstractRoute.extend({
+export default AbstractRoute.extend(AppAttemptMixin, {
   model(param) {
     return Ember.RSVP.hash({
-      attempt: this.store.findRecord('yarn-app-attempt', param.app_attempt_id, 
{reload: true}),
-
-      rmContainers: this.store.query('yarn-container',
-        {
-          app_attempt_id: param.app_attempt_id,
-          is_rm: true
-        }),
-
-      tsContainers: this.store.query('yarn-container',
-        {
-          app_attempt_id: param.app_attempt_id,
-          is_rm: false
-        }).catch (function() {
-         // Promise rejected, fulfill with some default value to
-         // use as the route's model and continue on with the transition
-          return [];
-        })
+      attempt: this.fetchAttemptInfoFromRMorATS(param.app_attempt_id, 
this.store),
+      rmContainers: this.store.query('yarn-container', {
+        app_attempt_id: param.app_attempt_id
+      }),
+      tsContainers: this.store.query('yarn-timeline-container', {
+        app_attempt_id: param.app_attempt_id
+      }).catch(function() {
+        return [];
+      })
     });
   },
 
   unloadAll() {
     this.store.unloadAll('yarn-app-attempt');
+    this.store.unloadAll('yarn-timeline-appattempt');
     this.store.unloadAll('yarn-container');
+    this.store.unloadAll('yarn-timeline-container');
   }
 });

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app-attempts.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app-attempts.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app-attempts.js
index 78ff1c9..233bfc8 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app-attempts.js
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app-attempts.js
@@ -16,19 +16,20 @@
  * limitations under the License.
  */
 
+import Ember from 'ember';
 import AbstractRoute from './abstract';
+import AppAttemptMixin from 'yarn-ui/mixins/app-attempt';
 
-export default AbstractRoute.extend({
+export default AbstractRoute.extend(AppAttemptMixin, {
   model(param) {
-    return this.store.query('yarn-app-attempt', { appId: 
param.app_id}).then(function (attempts) {
-      return {
-        appId: param.app_id,
-        attempts: attempts
-      };
+    return Ember.RSVP.hash({
+      appId: param.app_id,
+      attempts: this.fetchAttemptListFromRMorATS(param.app_id, this.store)
     });
   },
 
   unloadAll() {
     this.store.unloadAll('yarn-app-attempt');
+    this.store.unloadAll('yarn-timeline-appattempt');
   }
 });

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app.js
index 86d845c..98b0cc8 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app.js
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app.js
@@ -17,29 +17,26 @@
  */
 
 import Ember from 'ember';
-
 import AbstractRoute from './abstract';
+import AppAttemptMixin from 'yarn-ui/mixins/app-attempt';
 
-export default AbstractRoute.extend({
+export default AbstractRoute.extend(AppAttemptMixin, {
   model(param) {
     return Ember.RSVP.hash({
-      app: this.store.find('yarn-app', param.app_id),
+      app: this.fetchAppInfoFromRMorATS(param.app_id, this.store),
 
       rmContainers: this.store.find('yarn-app', param.app_id).then(function() {
         return this.store.query('yarn-app-attempt', {appId: 
param.app_id}).then(function (attempts) {
           if (attempts && attempts.get('firstObject')) {
             var appAttemptId = attempts.get('firstObject').get('appAttemptId');
-            var rmContainers = this.store.query('yarn-container',
-              {
-                app_attempt_id: appAttemptId,
-                is_rm: true
-              });
-            return rmContainers;
+            return this.store.query('yarn-container', {
+              app_attempt_id: appAttemptId
+            });
           }
         }.bind(this));
       }.bind(this)),
 
-      nodes: this.store.findAll('yarn-rm-node'),
+      nodes: this.store.findAll('yarn-rm-node', {reload: true}),
     });
   },
 
@@ -48,5 +45,6 @@ export default AbstractRoute.extend({
     this.store.unloadAll('yarn-app-attempt');
     this.store.unloadAll('yarn-container');
     this.store.unloadAll('yarn-rm-node');
+    this.store.unloadAll('yarn-app-timeline');
   }
 });

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flow-activity.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flow-activity.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flow-activity.js
new file mode 100644
index 0000000..4c1d02e
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flow-activity.js
@@ -0,0 +1,37 @@
+/**
+ * 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 AbstractRoute from './abstract';
+import ErrorUtils from 'yarn-ui/utils/error-utils';
+
+export default AbstractRoute.extend({
+  model() {
+    return this.store.findAll('yarn-flow-activity', {reload: true});
+  },
+
+  unloadAll() {
+    this.store.unloadAll('yarn-flow-activity');
+  },
+
+  actions: {
+    error(err/*, transition*/) {
+      var errObj = ErrorUtils.stripErrorCodeAndMessageFromError(err);
+      this.transitionTo('timeline-error', errObj);
+    }
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flow.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flow.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flow.js
new file mode 100644
index 0000000..1da9064
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flow.js
@@ -0,0 +1,53 @@
+/**
+ * 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 AbstractRoute from './abstract';
+import ErrorUtils from 'yarn-ui/utils/error-utils';
+
+export default AbstractRoute.extend({
+  model(params) {
+    return Ember.RSVP.hash({
+      flowRuns: this.store.query('yarn-flowrun-brief', {flowuid: 
params.flow_uid}),
+      flowUid: params.flow_uid,
+      lastFlowExecutionInfo: this.getLastFlowExecutionInfo(params.flow_uid)
+    });
+  },
+
+  getLastFlowExecutionInfo(flowUid) {
+    var yarnfaCtrl = this.controllerFor('yarn-flow-activity');
+    var recentFlow = yarnfaCtrl.getLastFlowExecutionInfoByFlowUid(flowUid);
+    if (recentFlow) {
+      return recentFlow;
+    } else {
+      return null;
+    }
+  },
+
+  unloadAll() {
+    this.store.unloadAll('yarn-flowrun-brief');
+  },
+
+  actions: {
+    error(err/*, transition*/) {
+      var errObj = ErrorUtils.stripErrorCodeAndMessageFromError(err);
+      this.transitionTo('timeline-error', errObj);
+    }
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flow/info.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flow/info.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flow/info.js
new file mode 100644
index 0000000..8719170
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flow/info.js
@@ -0,0 +1,22 @@
+/**
+ * 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.Route.extend({
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flow/runs.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flow/runs.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flow/runs.js
new file mode 100644
index 0000000..8719170
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flow/runs.js
@@ -0,0 +1,22 @@
+/**
+ * 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.Route.extend({
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flowrun-metric.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flowrun-metric.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flowrun-metric.js
new file mode 100644
index 0000000..3c54259
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flowrun-metric.js
@@ -0,0 +1,107 @@
+/**
+ * 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 ErrorUtils from 'yarn-ui/utils/error-utils';
+
+export default Ember.Route.extend({
+  model: function(params) {
+    var _this = this;
+   var appsArr = [];
+   var flowrun = _this.store.queryRecord('yarn-flowrun', {flowrun_uid: 
params.flowrun_uid,
+        metricstoretrieve: params.metric_id}).then(function(value) {
+      var apps = _this.store.query('yarn-app-flowrun', {flowrunUid: 
params.flowrun_uid,
+          metricstoretrieve: params.metric_id}).then(function(value) {
+        for (var i = 0; i < value.content.length; i++) {
+          var tasks = undefined;
+          // No need to fetch task or container info for Job counters.
+          if (params.metric_id.indexOf("JobCounter") === -1) {
+            var entityType = "MAPREDUCE_TASK";
+            // CPU and MEMORY are container metrics.
+            if (params.metric_id === "CPU" || params.metric_id === "MEMORY") {
+              entityType = "YARN_CONTAINER";
+            }
+            tasks = _this.fetchTasksForEntity(value.content[i]._data.uid, 
params.metric_id, entityType);
+          }
+          appsArr.push(Ember.RSVP.hash({id: value.content[i].id, tasks: tasks 
, metrics: value.content[i]._data.metrics}));
+        }
+        return Ember.RSVP.all(appsArr);
+      });
+      return Ember.RSVP.hash({run: value, id: value.id, metrics: 
value._internalModel._data.metrics, apps: apps});
+    });
+    return Ember.RSVP.all([Ember.RSVP.hash({flowrun:flowrun, metricId: 
params.metric_id})]);
+  },
+
+  fetchTasksForEntity: function(appUid, metricId, entityType) {
+    return this.store.query('yarn-entity', {
+      app_uid: appUid,
+      metricstoretrieve: metricId,
+      entity_type: entityType,
+      metricslimit: 100
+    }).then(function(value) {
+      var tasksArr = [];
+      for (var j = 0; j < value.content.length; j++) {
+        tasksArr.push(Ember.RSVP.hash({id: value.content[j].id, metrics: 
value.content[j]._data.metrics}));
+      }
+      return Ember.RSVP.all(tasksArr);
+    });
+  },
+
+  getMetricValue: function(metrics) {
+    var metricValue = 0;
+    if (metrics.length > 0) {
+      for (var j in metrics[0].values) {
+        metricValue = metrics[0].values[j];
+        break;
+      }
+    }
+    return metricValue.toString();
+  },
+
+  setupController: function(controller, model) {
+    var metricsArr = [];
+    var flowRunId = model[0].flowrun.id;
+    metricsArr.push([model[0].flowrun.id, 
this.getMetricValue(model[0].flowrun.metrics)]);
+    for (var i = 0; i < model[0].flowrun.apps.length; i++) {
+      var appId = flowRunId + '-' + model[0].flowrun.apps[i].id;
+      metricsArr.push([appId, 
this.getMetricValue(model[0].flowrun.apps[i].metrics)]);
+      if (model[0].flowrun.apps[i].tasks) {
+        for (var j = 0; j < model[0].flowrun.apps[i].tasks.length; j++) {
+          var taskId = appId + '-' + model[0].flowrun.apps[i].tasks[j].id;
+          metricsArr.push([taskId, 
this.getMetricValue(model[0].flowrun.apps[i].tasks[j].metrics)]);
+        }
+      }
+    }
+    controller.set('flowrun', model[0].flowrun);
+    controller.set('metric_id', model[0].metricId);
+    controller.set('arr', metricsArr);
+  },
+
+  unloadAll: function() {
+    this.store.unloadAll('yarn-flowrun');
+    this.store.unloadAll('yarn-app-flowrun');
+    this.store.unloadAll('yarn-entity');
+  },
+
+  actions: {
+    error(err/*, transition*/) {
+      var errObj = ErrorUtils.stripErrorCodeAndMessageFromError(err);
+      this.transitionTo('timeline-error', errObj);
+    }
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flowrun.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flowrun.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flowrun.js
new file mode 100644
index 0000000..3163a67
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flowrun.js
@@ -0,0 +1,58 @@
+/**
+ * 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 AbstractRoute from './abstract';
+import ErrorUtils from 'yarn-ui/utils/error-utils';
+
+export default AbstractRoute.extend({
+  model: function(params) {
+    return Ember.RSVP.hash({
+      flowrun: this.store.findRecord('yarn-flowrun', params.flowrun_uid),
+      apps: this.store.query('yarn-app-flowrun', {flowrunUid: 
params.flowrun_uid}),
+      flowrun_uid: params.flowrun_uid,
+      parentFlowUid: this.getParentFlowUid()
+    });
+  },
+
+  getParentFlowUid: function() {
+    var parentFlowModel = this.modelFor('yarn-flow');
+    if (parentFlowModel) {
+      return parentFlowModel.flowUid;
+    } else {
+      return '';
+    }
+  },
+
+  unloadAll: function() {
+    this.store.unloadAll('yarn-flowrun');
+    this.store.unloadAll('yarn-app-flowrun');
+  },
+
+  actions: {
+    reload: function() {
+      this.modelFor('apps').reload();
+    },
+
+    error(err/*, transition*/) {
+      var errObj = ErrorUtils.stripErrorCodeAndMessageFromError(err);
+      this.transitionTo('timeline-error', errObj);
+    }
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flowrun/info.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flowrun/info.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flowrun/info.js
new file mode 100644
index 0000000..8719170
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flowrun/info.js
@@ -0,0 +1,22 @@
+/**
+ * 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.Route.extend({
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flowrun/metrics.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flowrun/metrics.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flowrun/metrics.js
new file mode 100644
index 0000000..8719170
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-flowrun/metrics.js
@@ -0,0 +1,22 @@
+/**
+ * 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.Route.extend({
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app-flowrun.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app-flowrun.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app-flowrun.js
new file mode 100644
index 0000000..289c1cd
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app-flowrun.js
@@ -0,0 +1,64 @@
+/**
+ * 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 DS from 'ember-data';
+
+export default DS.JSONAPISerializer.extend({
+
+    normalizeSingleResponse(store, primaryModelClass, payload, id,
+      requestType) {
+      var events = payload.events,
+          appFinishedEvent = events.findBy('id', 'YARN_APPLICATION_FINISHED'),
+          finishedTs = appFinishedEvent? appFinishedEvent.timestamp : 
Date.now(),
+          appState = (appFinishedEvent && appFinishedEvent.info)? 
appFinishedEvent.info.YARN_APPLICATION_STATE : "N/A",
+          metrics = payload.metrics,
+          cpuMetric = metrics.findBy('id', 'CPU'),
+          memoryMetric = metrics.findBy('id', 'MEMORY'),
+          cpu = cpuMetric? cpuMetric.values[Object.keys(cpuMetric.values)[0]] 
: -1,
+          memory = memoryMetric? 
memoryMetric.values[Object.keys(memoryMetric.values)[0]] : -1;
+
+      var fixedPayload = {
+        id: id,
+        type: primaryModelClass.modelName,
+        attributes: {
+          appId: payload.id,
+          type: payload.info.YARN_APPLICATION_TYPE,
+          uid: payload.info.UID,
+          metrics: metrics,
+          startedTs: payload.createdtime,
+          finishedTs: finishedTs,
+          state: payload.info.YARN_APPLICATION_STATE || appState,
+          cpuVCores: cpu,
+          memoryUsed: memory
+        }
+      };
+
+      return this._super(store, primaryModelClass, fixedPayload, id, 
requestType);
+    },
+
+    normalizeArrayResponse(store, primaryModelClass, payload, id, requestType) 
{
+      var normalizedArrayResponse = {};
+
+      normalizedArrayResponse.data = payload.map(singleApp => {
+        return this.normalizeSingleResponse(store, primaryModelClass,
+          singleApp, singleApp.id, requestType);
+      });
+
+      return normalizedArrayResponse;
+    }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app-timeline.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app-timeline.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app-timeline.js
new file mode 100644
index 0000000..680fe8c
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app-timeline.js
@@ -0,0 +1,76 @@
+/**
+ * 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 DS from 'ember-data';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.JSONAPISerializer.extend({
+  internalNormalizeSingleResponse(store, primaryModelClass, payload, id) {
+
+    var events = payload.events,
+        appFinishedEvent = events.findBy('id', 'YARN_APPLICATION_FINISHED'),
+        startedTime = payload.createdtime,
+        finishedTime = appFinishedEvent? appFinishedEvent.timestamp : 
Date.now(),
+        elapsedTime = finishedTime - startedTime,
+        diagnostics = payload.info.YARN_APPLICATION_DIAGNOSTICS_INFO,
+        priority = payload.info.YARN_APPLICATION_PRIORITY;
+
+    var fixedPayload = {
+      id: id,
+      type: primaryModelClass.modelName,
+      attributes: {
+        appName: payload.info.YARN_APPLICATION_NAME,
+        user: payload.info.YARN_APPLICATION_USER,
+        queue: "N/A",
+        state: payload.info.YARN_APPLICATION_STATE,
+        startTime: Converter.timeStampToDate(startedTime),
+        elapsedTime: elapsedTime,
+        finishedTime: Converter.timeStampToDate(finishedTime),
+        finalStatus: payload.info.YARN_APPLICATION_FINAL_STATUS,
+        progress: 100,
+        applicationType: payload.info.YARN_APPLICATION_TYPE,
+        diagnostics: (diagnostics && diagnostics !== 'null')? diagnostics : '',
+        amContainerLogs: '',
+        amHostHttpAddress: '',
+        logAggregationStatus: '',
+        unmanagedApplication: 
payload.info.YARN_APPLICATION_UNMANAGED_APPLICATION || 'N/A',
+        amNodeLabelExpression: payload.configs.YARN_AM_NODE_LABEL_EXPRESSION,
+        priority: (priority !== undefined)? priority : 'N/A',
+        allocatedMB: 0,
+        allocatedVCores: 0,
+        runningContainers: 0,
+        memorySeconds: payload.info.YARN_APPLICATION_MEM_METRIC,
+        vcoreSeconds: payload.info.YARN_APPLICATION_CPU_METRIC,
+        preemptedResourceMB: 0,
+        preemptedResourceVCores: 0,
+        numNonAMContainerPreempted: 0,
+        numAMContainerPreempted: 0,
+        clusterUsagePercentage: 0,
+        queueUsagePercentage: 0,
+        currentAppAttemptId: payload.info.YARN_APPLICATION_LATEST_APP_ATTEMPT
+      }
+    };
+
+    return fixedPayload;
+  },
+
+  normalizeSingleResponse(store, primaryModelClass, payload, id/*, 
requestType*/) {
+    var p = this.internalNormalizeSingleResponse(store, primaryModelClass, 
payload, id);
+    return {data: p};
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js
index 172286f..1462f5a 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js
@@ -43,7 +43,6 @@ export default DS.JSONAPISerializer.extend({
           queue: payload.queue,
           state: payload.state,
           startTime: Converter.timeStampToDate(payload.startedTime),
-          //elapsedTime: Converter.msToElapsedTime(payload.elapsedTime),
           elapsedTime: payload.elapsedTime,
           finishedTime: Converter.timeStampToDate(payload.finishedTime),
           finalStatus: payload.finalStatus,
@@ -55,7 +54,7 @@ export default DS.JSONAPISerializer.extend({
           logAggregationStatus: payload.logAggregationStatus,
           unmanagedApplication: payload.unmanagedApplication || 'N/A',
           amNodeLabelExpression: payload.amNodeLabelExpression,
-          priority: payload.priority || 'N/A',
+          priority: (payload.priority !== undefined)? payload.priority : 'N/A',
           allocatedMB: payload.allocatedMB,
           allocatedVCores: payload.allocatedVCores,
           runningContainers: payload.runningContainers,

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-entity.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-entity.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-entity.js
new file mode 100644
index 0000000..9ed70cf
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-entity.js
@@ -0,0 +1,51 @@
+/**
+ * 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 DS from 'ember-data';
+
+export default DS.JSONAPISerializer.extend({
+
+    normalizeSingleResponse(store, primaryModelClass, payload, id,
+      requestType) {
+      var fixedPayload = {
+        id: id,
+        type: primaryModelClass.modelName, // yarn-entity
+        attributes: {
+          entityId: payload.id,
+          type: payload.type,
+          uid: payload.info.UID,
+          metrics: payload.metrics
+        }
+      };
+
+      return this._super(store, primaryModelClass, fixedPayload, id,
+        requestType);
+    },
+
+    normalizeArrayResponse(store, primaryModelClass, payload, id,
+      requestType) {
+      // return expected is { data: [ {}, {} ] }
+      var normalizedArrayResponse = {};
+
+      normalizedArrayResponse.data = payload.map(singleApp => {
+        return this.normalizeSingleResponse(store, primaryModelClass,
+          singleApp, singleApp.id, requestType);
+      }, this);
+      return normalizedArrayResponse;
+    }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flow-activity.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flow-activity.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flow-activity.js
new file mode 100644
index 0000000..c26872b
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flow-activity.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.
+ */
+
+import DS from 'ember-data';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.JSONAPISerializer.extend({
+
+    normalizeSingleResponse(store, primaryModelClass, payload, id,
+      requestType) {
+      var fixedPayload = {
+        id: id,
+        type: primaryModelClass.modelName, // yarn-timeline-flow
+        attributes: {
+          cluster: payload.info.SYSTEM_INFO_CLUSTER,
+          flowName: payload.info.SYSTEM_INFO_FLOW_NAME,
+          lastExecDate: 
Converter.timeStampToDateOnly(payload.info.SYSTEM_INFO_DATE),
+          user: payload.info.SYSTEM_INFO_USER,
+          flowruns: payload.flowruns,
+          uid: payload.info.UID
+        }
+      };
+
+      return this._super(store, primaryModelClass, fixedPayload, id,
+        requestType);
+    },
+
+    normalizeArrayResponse(store, primaryModelClass, payload, id,
+      requestType) {
+      // return expected is { data: [ {}, {} ] }
+      var normalizedArrayResponse = {};
+
+      normalizedArrayResponse.data = payload.map(singleEntity => {
+        return this.normalizeSingleResponse(store, primaryModelClass,
+          singleEntity, singleEntity.id, requestType);
+      }, this);
+      return normalizedArrayResponse;
+    }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flowrun-brief.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flowrun-brief.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flowrun-brief.js
new file mode 100644
index 0000000..67603bb
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flowrun-brief.js
@@ -0,0 +1,64 @@
+/**
+ * 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 DS from 'ember-data';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.JSONAPISerializer.extend({
+
+    normalizeSingleResponse(store, primaryModelClass, payload, id,
+      requestType) {
+      var metrics = payload.metrics,
+          cpuMetric = metrics.findBy('id', 'CPU'),
+          cpu = cpuMetric? cpuMetric.values[Object.keys(cpuMetric.values)[0]] 
: -1,
+          memMetric = metrics.findBy('id', 'MEMORY'),
+          memory = memMetric? 
memMetric.values[Object.keys(memMetric.values)[0]] : -1;
+
+      var fixedPayload = {
+        id: id,
+        type: primaryModelClass.modelName, // yarn-flowrun-brief
+        attributes: {
+          flowName: payload.info.SYSTEM_INFO_FLOW_NAME,
+          runid: payload.info.SYSTEM_INFO_FLOW_RUN_ID,
+          shownid: payload.id,
+          type: payload.type,
+          createTime: Converter.timeStampToDate(payload.createdtime),
+          createTimeRaw: payload.createdtime,
+          endTime: 
Converter.timeStampToDate(payload.info.SYSTEM_INFO_FLOW_RUN_END_TIME),
+          endTimeRaw: payload.info.SYSTEM_INFO_FLOW_RUN_END_TIME || 0,
+          user: payload.info.SYSTEM_INFO_USER,
+          uid: payload.info.UID,
+          cpuVCores: cpu,
+          memoryUsed: memory
+        }
+      };
+
+      return this._super(store, primaryModelClass, fixedPayload, id, 
requestType);
+    },
+
+    normalizeArrayResponse(store, primaryModelClass, payload, id, requestType) 
{
+      var normalizedArrayResponse = {data: []};
+
+      normalizedArrayResponse.data = payload.map(singleApp => {
+        return this.normalizeSingleResponse(store, primaryModelClass,
+          singleApp, singleApp.id, requestType);
+      });
+
+      return normalizedArrayResponse;
+    }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flowrun.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flowrun.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flowrun.js
new file mode 100644
index 0000000..931d134
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flowrun.js
@@ -0,0 +1,63 @@
+/**
+ * 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 DS from 'ember-data';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.JSONAPISerializer.extend({
+
+    internalNormalizeSingleResponse(store, primaryModelClass, payload, id) {
+      var recordId = id;
+      if (!recordId) {
+        recordId = payload.id;
+      }
+      var fixedPayload = {
+        id: recordId,
+        type: primaryModelClass.modelName,
+        attributes: {
+          flowName: payload.info.SYSTEM_INFO_FLOW_NAME,
+          runid: payload.info.SYSTEM_INFO_FLOW_RUN_ID,
+          shownid: payload.id,
+          type: payload.type,
+          createTime: Converter.timeStampToDate(payload.createdtime),
+          endTime: 
Converter.timeStampToDate(payload.info.SYSTEM_INFO_FLOW_RUN_END_TIME),
+          user: payload.info.SYSTEM_INFO_USER,
+          metrics: payload.metrics,
+        }
+      };
+
+      return fixedPayload;
+    },
+
+    normalizeSingleResponse(store, primaryModelClass, payload, id/*, 
requestType*/) {
+      var p = this.internalNormalizeSingleResponse(store,
+        primaryModelClass, payload, id);
+      return { data: p };
+    },
+
+    normalizeArrayResponse(store, primaryModelClass, payload/*, id, 
requestType*/) {
+      // return expected is { data: [ {}, {} ] }
+      var normalizedArrayResponse = {};
+
+      normalizedArrayResponse.data = payload.map(singleApp => {
+        return this.internalNormalizeSingleResponse(store, primaryModelClass,
+          singleApp, singleApp.id);
+      }, this);
+      return normalizedArrayResponse;
+    }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue.js
index 766c5c7..4fc1a29 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue.js
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue.js
@@ -116,30 +116,14 @@ export default DS.JSONAPISerializer.extend({
       };
     },
 
-    normalizeArrayResponse(store, primaryModelClass, payload, id,
-      requestType) {
+    normalizeArrayResponse(store, primaryModelClass, payload, id, requestType) 
{
       var normalizedArrayResponse = {};
-      var result = this.handleQueue(store,
-        primaryModelClass,
+      var result = this.handleQueue(store, primaryModelClass,
         payload.scheduler.schedulerInfo, "root", requestType);
 
       normalizedArrayResponse.data = result.data;
       normalizedArrayResponse.included = result.includedData;
 
-      console.log(normalizedArrayResponse);
-
-      return normalizedArrayResponse;
-
-      /*
-      // return expected is { data: [ {}, {} ] }
-      var normalizedArrayResponse = {};
-
-      // payload has apps : { app: [ {},{},{} ]  }
-      // need some error handling for ex apps or app may not be defined.
-      normalizedArrayResponse.data = payload.apps.app.map(singleApp => { 
-        return this.normalizeSingleResponse(store, primaryModelClass, 
singleApp, singleApp.id, requestType);
-      }, this);
       return normalizedArrayResponse;
-      */
     }
-});
\ No newline at end of file
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-timeline-appattempt.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-timeline-appattempt.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-timeline-appattempt.js
new file mode 100644
index 0000000..0245b20
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-timeline-appattempt.js
@@ -0,0 +1,69 @@
+/**
+ * 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 DS from 'ember-data';
+import Ember from 'ember';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.JSONAPISerializer.extend({
+    internalNormalizeSingleResponse(store, primaryModelClass, payload) {
+      var payloadEvents = payload.events,
+          createdEvent = payloadEvents.filterBy('id', 
'YARN_APPLICATION_ATTEMPT_REGISTERED')[0],
+          startedTime = createdEvent? createdEvent.timestamp : Date.now(),
+          finishedEvent = payloadEvents.filterBy('id', 
'YARN_APPLICATION_ATTEMPT_FINISHED')[0],
+          finishedTime = finishedEvent? finishedEvent.timestamp : Date.now();
+
+      var fixedPayload = {
+        id: payload.id,
+        type: primaryModelClass.modelName,
+        attributes: {
+          startTime: Converter.timeStampToDate(startedTime),
+          startedTime: Converter.timeStampToDate(startedTime),
+          finishedTime: Converter.timeStampToDate(finishedTime),
+          containerId: payload.info.YARN_APPLICATION_ATTEMPT_MASTER_CONTAINER,
+          amContainerId: 
payload.info.YARN_APPLICATION_ATTEMPT_MASTER_CONTAINER,
+          nodeHttpAddress: '',
+          nodeId: '',
+          hosts: payload.info.YARN_APPLICATION_ATTEMPT_HOST,
+          state: payload.info.YARN_APPLICATION_ATTEMPT_HOST,
+          logsLink: '',
+          appAttemptId: payload.id
+        }
+      };
+      return fixedPayload;
+    },
+
+    normalizeSingleResponse(store, primaryModelClass, payload/*, id, 
requestType*/) {
+      var normalized = this.internalNormalizeSingleResponse(store,
+        primaryModelClass, payload);
+      return {data: normalized};
+    },
+
+    normalizeArrayResponse(store, primaryModelClass, payload/*, id, 
requestType*/) {
+      var normalizedArrayResponse = {
+        data: []
+      };
+      if (payload && Ember.isArray(payload) && !Ember.isEmpty(payload)) {
+        normalizedArrayResponse.data = payload.map(singleAttempt => {
+          return this.internalNormalizeSingleResponse(store, primaryModelClass,
+            singleAttempt);
+        });
+      }
+      return normalizedArrayResponse;
+    }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-timeline-container.js
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-timeline-container.js
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-timeline-container.js
new file mode 100644
index 0000000..f2c60f6
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-timeline-container.js
@@ -0,0 +1,71 @@
+/**
+ * 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 DS from 'ember-data';
+import Ember from 'ember';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.JSONAPISerializer.extend({
+  internalNormalizeSingleResponse(store, primaryModelClass, payload) {
+    var payloadEvents = payload.events,
+        createdEvent = payloadEvents.filterBy('id', 
'YARN_RM_CONTAINER_CREATED')[0],
+        startedTime = createdEvent? createdEvent.timestamp : Date.now(),
+        finishedEvent = payloadEvents.filterBy('id', 
'YARN_RM_CONTAINER_FINISHED')[0],
+        finishedTime = finishedEvent? finishedEvent.timestamp : Date.now(),
+        containerExitStatus = finishedEvent? 
finishedEvent.info.YARN_CONTAINER_EXIT_STATUS : '',
+        containerState = finishedEvent? 
finishedEvent.info.YARN_CONTAINER_STATE : '';
+
+    var fixedPayload = {
+      id: payload.id,
+      type: primaryModelClass.modelName,
+      attributes: {
+        allocatedMB: payload.info.YARN_CONTAINER_ALLOCATED_MEMORY,
+        allocatedVCores: payload.info.YARN_CONTAINER_ALLOCATED_VCORE,
+        assignedNodeId: payload.info.YARN_CONTAINER_ALLOCATED_HOST,
+        priority: payload.info.YARN_CONTAINER_ALLOCATED_PRIORITY,
+        startedTime:  Converter.timeStampToDate(startedTime),
+        finishedTime: Converter.timeStampToDate(finishedTime),
+        nodeHttpAddress: 
payload.info.YARN_CONTAINER_ALLOCATED_HOST_HTTP_ADDRESS,
+        containerExitStatus: containerExitStatus,
+        containerState: containerState
+      }
+    };
+    return fixedPayload;
+  },
+
+  normalizeSingleResponse(store, primaryModelClass, payload/*, id, 
requestType*/) {
+    var normalized = this.internalNormalizeSingleResponse(store,
+        primaryModelClass, payload);
+    return {
+      data: normalized
+    };
+  },
+
+  normalizeArrayResponse(store, primaryModelClass, payload/*, id, 
requestType*/) {
+    var normalizedArrayResponse = {
+      data: []
+    };
+    if (payload && Ember.isArray(payload) && !Ember.isEmpty(payload)) {
+      normalizedArrayResponse.data = payload.map(singleContainer => {
+        return this.internalNormalizeSingleResponse(store, primaryModelClass,
+          singleContainer);
+      });
+    }
+    return normalizedArrayResponse;
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css
index e3dfcd9..8b8ea56 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css
@@ -314,3 +314,86 @@ div.attempt-info-panel table > tbody > tr > 
td:last-of-type {
   overflow: hidden;
   text-overflow: ellipsis;
 }
+
+#main {
+  float: left;
+  width: 750px;
+}
+
+#sidebar {
+  float: right;
+  width: 100px;
+}
+
+#sequence {
+  width: 600px;
+  height: 70px;
+}
+
+#legend {
+  padding: 10px 0 0 3px;
+}
+
+#sequence text, #legend text {
+  font-weight: 600;
+  fill: #fff;
+}
+
+#chart {
+  position: relative;
+}
+
+#chart path {
+  stroke: #fff;
+}
+
+#explanation {
+  position: absolute;
+  top: 360px;
+  left: 385px;
+  width: 230px;
+  text-align: center;
+  color: #666;
+  z-index: -1;
+}
+
+.simple-bar-chart .axis text {
+  font: 10px sans-serif;
+}
+
+.simple-bar-chart .axis path, .simple-bar-chart .axis line {
+  fill: none;
+  stroke: #000;
+  stroke-width: 1px;
+}
+
+.simple-bar-chart rect {
+  fill: steelblue;
+}
+
+.simple-bar-chart rect:hover {
+  fill: brown;
+  cursor: pointer;
+}
+
+.yarn-flow-runs .chart-panel, .yarn-flow-runinfo .chart-panel {
+  overflow: auto;
+}
+
+.yarn-flow-runs .glyphicon-remove, .yarn-flow-runinfo .glyphicon-remove {
+  cursor: pointer;
+}
+
+.yarn-flow-runs .glyphicon-remove:hover, .yarn-flow-runinfo 
.glyphicon-remove:hover {
+  color: #c9302c;
+}
+
+.yarn-flow-runs .dropdown-menu .item-text, .yarn-flow-runinfo .dropdown-menu 
.item-text {
+  width: auto;
+  display: inline-block;
+}
+
+.yarn-flow-runs .dropdown-menu .item-icon, .yarn-flow-runinfo .dropdown-menu 
.item-icon {
+  width: 14px;
+  display: inline-block;
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs
index a6d247b..c3154b4 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs
@@ -56,6 +56,11 @@
               <span class="sr-only">(current)</span>
             {{/link-to}}
           {{/link-to}}
+          {{#link-to 'yarn-flow-activity' tagName="li"}}
+            {{#link-to 'yarn-flow-activity' class="navigation-link"}}Flow 
Activity
+              <span class="sr-only">(current)</span>
+            {{/link-to}}
+          {{/link-to}}
           {{#link-to 'yarn-nodes.table' tagName="li" 
current-when="yarn-nodes.table yarn-nodes.heatmap"}}
             {{#link-to 'yarn-nodes.table' class="navigation-link"}}Nodes
               <span class="sr-only">(current)</span>
@@ -73,7 +78,6 @@
   <br/>
   <br/>
   <br/>
-
 </div>
 
 <div class="footer">

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/timeline-error.hbs
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/timeline-error.hbs
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/timeline-error.hbs
new file mode 100644
index 0000000..e33c77c
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/timeline-error.hbs
@@ -0,0 +1,22 @@
+{{!--
+  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.
+--}}
+
+{{#if model.isValidErrorCode}}
+  <h3 class="text-center text-danger">{{model.errorCode}}: 
{{model.errorType}}</h3>
+{{/if}}
+<h2 class="text-center text-danger">Timeline server failed with an error</h2>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app-attempt.hbs
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app-attempt.hbs
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app-attempt.hbs
index 1dbae9a..7579bdc 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app-attempt.hbs
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app-attempt.hbs
@@ -17,27 +17,39 @@
 }}
 
 {{breadcrumb-bar breadcrumbs=breadcrumbs}}
-<br/><br/><br/>
-<div class="container-fluid">
-  <div class="row">
-    {{#if model.attempt}}
-      <div class="container-fluid">
+
+<div class="row container-fluid">
+  <div class="col-md-2">
+    <div class="panel panel-default">
+      <div class="panel-heading">
+        Application Attempt
+      </div>
+      <div class="panel-body">
+        <ul class="nav nav-pills nav-stacked" id="stacked-menu">
+          <ul class="nav nav-pills nav-stacked collapse in">
+            {{#link-to 'yarn-app-attempt' tagName="li"}}
+              {{#link-to 'yarn-app-attempt' model.attempt.id}}Attempt 
Info{{/link-to}}
+            {{/link-to}}
+          </ul>
+        </ul>
+      </div>
+    </div>
+  </div>
+  <div class="col-md-10">
+    <div class="row container-fluid">
+      {{#if model.attempt}}
         <div class="panel panel-default">
           <div class="panel-heading">
-            Application attempt Information
+            Attempt Information
           </div>
           {{app-attempt-table attempt=model.attempt}}
         </div>
-      </div>
-    {{/if}}
-  </div>
-
-  <!-- containers table -->
-  <div class="row">
-     {{#if (or model.rmContainers model.tsContainers)}}
-     {{timeline-view parent-id="containers-timeline-div" my-id="timeline-view" 
height="400" rmModel=model.rmContainers tsModel=model.tsContainers 
label="shortAppAttemptId" attemptModel=false}}
-     {{/if}}
+      {{/if}}
+    </div>
+    <div class="row">
+      {{#if (or model.rmContainers model.tsContainers)}}
+        {{timeline-view parent-id="containers-timeline-div" 
my-id="timeline-view" height="400" rmModel=model.rmContainers 
tsModel=model.tsContainers label="shortAppAttemptId" attemptModel=false}}
+      {{/if}}
+    </div>
   </div>
 </div>
-
-{{outlet}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app-attempts.hbs
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app-attempts.hbs
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app-attempts.hbs
index 0af1457..283d78a 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app-attempts.hbs
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app-attempts.hbs
@@ -24,7 +24,11 @@
     <div class="col-md-2 container-fluid">
       <div class="panel panel-default">
         <div class="panel-heading">
-          <h4>Application</h4>
+          {{#if service}}
+            Service
+          {{else}}
+            Application
+          {{/if}}
         </div>
         <div class="panel-body">
           <ul class="nav nav-pills nav-stacked" id="stacked-menu">
@@ -44,7 +48,6 @@
     </div>
 
     <div class="col-md-10 container-fluid">
-      <!-- timeline view of children -->
       <div class="row">
          {{timeline-view parent-id="attempt-timeline-div" 
my-id="timeline-view" height="100%" rmModel=model.attempts 
label="shortAppAttemptId" attemptModel=true serviceName=service}}
       </div>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs
index 17ec11e..c1f5352 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs
@@ -26,9 +26,9 @@
       <div class="panel panel-default">
         <div class="panel-heading">
           {{#if service}}
-            <h4>Service</h4>
+            Service
           {{else}}
-            <h4>Application</h4>
+            Application
           {{/if}}
         </div>
         <div class="panel-body">
@@ -175,8 +175,8 @@
               <thead>
               <tr>
                 <th>Master Container Log</th>
-                <td>Master Node</td>
-                <td>Master Node Label Expression</td>
+                <th>Master Node</th>
+                <th>Master Node Label Expression</th>
               </tr>
               </thead>
 
@@ -215,48 +215,7 @@
       {{/if}}
 
 
-      </div>
-
-    <!--
-      <div class="row">
-        <div class="col-md-12 container-fluid">
-          <div class="panel panel-default">
-              <div class="panel-heading">
-                Application Attempts
-              </div>
-              <table id="app-attempt-table" class="table table-striped 
table-bordered" cellspacing="0" width="100%" height="100%">
-                <thead>
-                  <tr>
-                        <th>Start Time</th>
-                        <th>Master ContainerId</th>
-                        <th>Node Http Address</th>
-                        <th>Node Id</th>
-                        <th>Logs Link</th>
-                      </tr>
-                </thead>
-                <tbody>
-                  {{#each model.attempts as |attempt|}}
-                    <tr>
-                      <td>{{attempt.startTime}}</td>
-                      <td>{{attempt.containerId}}</td>
-                      <td><a 
href={{attempt.nodeHttpAddress}}>{{attempt.nodeHttpAddress}}</a></td>
-                      <td>{{attempt.nodeId}}</td>
-                      <td><a href={{attempt.logsLink}}>link</a></td>
-                    </tr>
-                  {{/each}}
-                </tbody>
-            </table>
-            </div>
-        </div>
-      </div>
-    -->
-
-      <!-- timeline view of children -->
-    <!--
-      <div class="row">
-         {{timeline-view parent-id="attempt-timeline-div" 
my-id="timeline-view" height="100%" rmModel=model.attempts 
label="shortAppAttemptId" attemptModel=true}}
-      </div>
-    -->
+    </div>
   </div>
 </div>
 {{/if}}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps.hbs
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps.hbs
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps.hbs
index 7aade00..264e6b6 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps.hbs
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps.hbs
@@ -24,7 +24,7 @@
     <div class="col-md-2 container-fluid">
       <div class="panel panel-default">
         <div class="panel-heading">
-          <h4>Application</h4>
+          <h4>Applications</h4>
         </div>
         <div class="panel-body">
           <ul class="nav nav-pills nav-stacked" id="stacked-menu">
@@ -83,4 +83,4 @@
       </div>
     </div>
   </div>
-</div>
\ No newline at end of file
+</div>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-flow-activity.hbs
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-flow-activity.hbs
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-flow-activity.hbs
new file mode 100644
index 0000000..c9b682c
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-flow-activity.hbs
@@ -0,0 +1,45 @@
+{{!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--}}
+
+<div class="container-fluid col-md-12">
+  <div class="row">
+    {{breadcrumb-bar breadcrumbs=breadcrumbs}}
+  </div>
+  <div class="row">
+    <div class="col-md-2">
+      <div class="panel panel-default">
+        <div class="panel-heading">
+          Flow Activity
+        </div>
+        <div class="panel-body">
+          <ul class="nav nav-pills nav-stacked collapse in">
+            {{#link-to 'yarn-flow-activity' tagName="li"}}
+              {{#link-to 'yarn-flow-activity'}}Flow Activities{{/link-to}}
+            {{/link-to}}
+          </ul>
+        </div>
+      </div>
+    </div>
+    <div class="col-md-10">
+      <h3>Recent Flow Activities</h3>
+      {{em-table columns=columns rows=rows definition=tableDefinition}}
+    </div>
+  </div>
+</div>
+
+{{outlet}}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd40f6f0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-flow.hbs
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-flow.hbs
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-flow.hbs
new file mode 100644
index 0000000..2e98958
--- /dev/null
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-flow.hbs
@@ -0,0 +1,49 @@
+{{!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--}}
+
+<div class="col-md-12 container-fluid">
+  <div class="row">
+    {{breadcrumb-bar breadcrumbs=breadcrumbs}}
+  </div>
+  <div class="row">
+    <div class="col-md-2">
+      <div class="panel panel-default">
+        <div class="panel-heading">
+          <div class="panel-title">
+            Flow Information
+          </div>
+        </div>
+        <div class="panel-body">
+          <ul class="nav nav-pills nav-stacked" id="stacked-menu">
+            <ul class="nav nav-pills nav-stacked collapse in">
+              {{#link-to 'yarn-flow.info' tagName="li"}}
+                {{#link-to 'yarn-flow.info' model.flowUid}}Flow 
Info{{/link-to}}
+              {{/link-to}}
+              {{#link-to 'yarn-flow.runs' tagName="li"}}
+                {{#link-to 'yarn-flow.runs' model.flowUid}}Flow 
Runs{{/link-to}}
+              {{/link-to}}
+            </ul>
+          </ul>
+        </div>
+      </div>
+    </div>
+    <div class="col-md-10">
+      {{outlet}}
+    </div>
+  </div>
+</div>


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

Reply via email to