You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by je...@apache.org on 2014/12/10 04:33:50 UTC
[27/53] tez git commit: TEZ-1617. Shim layer for Tez UI for use
within Ambari. (Sreenath Somarajapuram via hitesh)
TEZ-1617. Shim layer for Tez UI for use within Ambari. (Sreenath Somarajapuram via hitesh)
Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/b4be9ca7
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/b4be9ca7
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/b4be9ca7
Branch: refs/heads/master
Commit: b4be9ca7db964d4fa058883c1c5fd8092eb921a3
Parents: e18a1fa
Author: Hitesh Shah <hi...@apache.org>
Authored: Mon Nov 10 16:03:07 2014 -0800
Committer: Hitesh Shah <hi...@apache.org>
Committed: Mon Nov 10 16:03:07 2014 -0800
----------------------------------------------------------------------
CHANGES.txt | 1 +
tez-ui/src/main/webapp/app/scripts/app.js | 25 +++++++++++++-------
.../app/scripts/models/TimelineRestAdapter.js | 1 -
3 files changed, 18 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tez/blob/b4be9ca7/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2572250..9073a5e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -12,6 +12,7 @@ ALL CHANGES:
TEZ-1603. Vertex View for Tez UI.
TEZ-1720. Allow filters in all tables and also to pass in filters using url params.
TEZ-1708. Make UI part of TEZ build process.
+ TEZ-1617. Shim layer for Tez UI for use within Ambari.
Release 0.5.2: Unreleased
http://git-wip-us.apache.org/repos/asf/tez/blob/b4be9ca7/tez-ui/src/main/webapp/app/scripts/app.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/app.js b/tez-ui/src/main/webapp/app/scripts/app.js
index c06678e..2db916b 100644
--- a/tez-ui/src/main/webapp/app/scripts/app.js
+++ b/tez-ui/src/main/webapp/app/scripts/app.js
@@ -17,17 +17,20 @@
*/
var App = window.App = Em.Application.createWithMixins(Bootstrap, {
- // Basic logging, e.g. "Transitioned into 'post'"
+ // Basic logging, e.g. "Transitioned into 'post'"
LOG_TRANSITIONS: true,
// Extremely detailed logging, highlighting every internal
// step made while transitioning into a route, including
// `beforeModel`, `model`, and `afterModel` hooks, and
// information about redirects and aborted transitions
- LOG_TRANSITIONS_INTERNAL: true
-});
+ LOG_TRANSITIONS_INTERNAL: true,
-App.AtsBaseUrl = "http://localhost:8188";
+ env: {
+ standalone: window.parent === window,
+ timelineBaseUrl: "http://localhost:8188"
+ }
+});
require('scripts/router');
require('scripts/store');
@@ -35,7 +38,16 @@ require('scripts/store');
App.Helpers = Em.Namespace.create();
App.Mappers = Em.Namespace.create();
-//TODO: initializer.
+Ember.Application.initializer({
+ name: "initApp",
+
+ initialize: function(container, application) {
+ application.ApplicationAdapter = App.TimelineRESTAdapter.extend({
+ host: App.env.timelineBaseUrl
+ });
+ application.ApplicationSerializer = App.TimelineSerializer.extend();
+ }
+});
/* Order and include */
/* TODO: cleanup */
@@ -49,6 +61,3 @@ require('scripts/mappers/**/*');
require('scripts/controllers/**/*');
require('scripts/components/*');
require('scripts/adapters/*');
-
-App.ApplicationAdapter = App.TimelineRESTAdapter.extend();
-App.ApplicationSerializer = App.TimelineSerializer.extend();
http://git-wip-us.apache.org/repos/asf/tez/blob/b4be9ca7/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js b/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
index e753b5e..f29b467 100644
--- a/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
+++ b/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
@@ -23,7 +23,6 @@ var typeToPathMap = {
};
App.TimelineRESTAdapter = DS.RESTAdapter.extend({
- host: App.AtsBaseUrl,
namespace: 'ws/v1/timeline',
pathForType: function(type) {