Return-Path: X-Original-To: apmail-tez-commits-archive@minotaur.apache.org Delivered-To: apmail-tez-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 22A1510DEB for ; Wed, 10 Dec 2014 03:33:27 +0000 (UTC) Received: (qmail 13067 invoked by uid 500); 10 Dec 2014 03:33:27 -0000 Delivered-To: apmail-tez-commits-archive@tez.apache.org Received: (qmail 13028 invoked by uid 500); 10 Dec 2014 03:33:27 -0000 Mailing-List: contact commits-help@tez.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tez.apache.org Delivered-To: mailing list commits@tez.apache.org Received: (qmail 12355 invoked by uid 99); 10 Dec 2014 03:33:25 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Dec 2014 03:33:25 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 9D261A22865; Wed, 10 Dec 2014 03:33:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jeagles@apache.org To: commits@tez.apache.org Date: Wed, 10 Dec 2014 03:33:50 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [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 Authored: Mon Nov 10 16:03:07 2014 -0800 Committer: Hitesh Shah 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) {