Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 67718177F8 for ; Fri, 17 Oct 2014 18:38:43 +0000 (UTC) Received: (qmail 45117 invoked by uid 500); 17 Oct 2014 18:38:43 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 45090 invoked by uid 500); 17 Oct 2014 18:38:43 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 45081 invoked by uid 99); 17 Oct 2014 18:38:43 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Oct 2014 18:38:43 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 080E999A63E; Fri, 17 Oct 2014 18:38:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: akovalenko@apache.org To: commits@ambari.apache.org Message-Id: <0275715239ff4363a7355cdab2d5f693@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: AMBARI-7841. Slider View: Show slider-view user beside the Create App page. (akovalenko) Date: Fri, 17 Oct 2014 18:38:43 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/branch-1.7.0 cbccd7354 -> 8464c5c0b AMBARI-7841. Slider View: Show slider-view user beside the Create App page. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8464c5c0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8464c5c0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8464c5c0 Branch: refs/heads/branch-1.7.0 Commit: 8464c5c0b2b7baf406f9d2d4c94f851a016b1bca Parents: cbccd73 Author: Aleksandr Kovalenko Authored: Fri Oct 17 21:19:28 2014 +0300 Committer: Aleksandr Kovalenko Committed: Fri Oct 17 21:19:28 2014 +0300 ---------------------------------------------------------------------- .../main/resources/ui/app/controllers/slider_controller.js | 1 + .../views/slider/src/main/resources/ui/app/styles/app.less | 5 +++++ .../src/main/resources/ui/app/templates/application.hbs | 9 +++++++-- .../main/resources/ui/test/integration/pages/index_test.js | 5 ++++- .../controllers/createAppWizard/step3_controller_test.js | 3 +++ .../ui/test/unit/controllers/slider_controller_test.js | 4 ++++ 6 files changed, 24 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/8464c5c0/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js ---------------------------------------------------------------------- diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js index e4476fd..3c9ca3c 100644 --- a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js +++ b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js @@ -53,6 +53,7 @@ App.SliderController = Ember.Controller.extend(App.RunPeriodically, { App.set('description', Em.get(data, 'ViewInstanceInfo.description')); App.set('label', Em.get(data, 'ViewInstanceInfo.label')); App.set('javaHome', Em.get(data, 'ViewInstanceInfo.instance_data') && Em.get(data, 'ViewInstanceInfo.instance_data')['java.home']); + App.set('sliderUser', data.ViewInstanceInfo.properties['slider.user']); }, /** http://git-wip-us.apache.org/repos/asf/ambari/blob/8464c5c0/contrib/views/slider/src/main/resources/ui/app/styles/app.less ---------------------------------------------------------------------- diff --git a/contrib/views/slider/src/main/resources/ui/app/styles/app.less b/contrib/views/slider/src/main/resources/ui/app/styles/app.less index ddff96a..de2e8fe 100644 --- a/contrib/views/slider/src/main/resources/ui/app/styles/app.less +++ b/contrib/views/slider/src/main/resources/ui/app/styles/app.less @@ -273,4 +273,9 @@ .component-label { line-height: 28px; } +} + +.view-user { + line-height: 34px; + padding-right: 10px; } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/8464c5c0/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs b/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs index 9a850a1..417db74 100755 --- a/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs +++ b/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs @@ -36,10 +36,15 @@
{{#view view.SliderTitleView}} -

{{App.label}}

+

{{App.label}}

{{#if view.showCreateAppButton}}
-
+ {{#if App.sliderUser}} +
+  {{App.sliderUser}} +
+ {{/if}} +
 {{t slider.apps.create}} http://git-wip-us.apache.org/repos/asf/ambari/blob/8464c5c0/contrib/views/slider/src/main/resources/ui/test/integration/pages/index_test.js ---------------------------------------------------------------------- diff --git a/contrib/views/slider/src/main/resources/ui/test/integration/pages/index_test.js b/contrib/views/slider/src/main/resources/ui/test/integration/pages/index_test.js index f5d556a..a553f73 100644 --- a/contrib/views/slider/src/main/resources/ui/test/integration/pages/index_test.js +++ b/contrib/views/slider/src/main/resources/ui/test/integration/pages/index_test.js @@ -24,7 +24,10 @@ QUnit.module('integration/pages - index', { "ViewInstanceInfo": { "context_path": "/views/SLIDER/1.0.0/s1", "description": "DESCRIPTION", - "label": "SLIDER LABEL" + "label": "SLIDER LABEL", + "properties": { + "slider.user": "admin" + } } }); Ember.run(App, App.advanceReadiness); http://git-wip-us.apache.org/repos/asf/ambari/blob/8464c5c0/contrib/views/slider/src/main/resources/ui/test/unit/controllers/createAppWizard/step3_controller_test.js ---------------------------------------------------------------------- diff --git a/contrib/views/slider/src/main/resources/ui/test/unit/controllers/createAppWizard/step3_controller_test.js b/contrib/views/slider/src/main/resources/ui/test/unit/controllers/createAppWizard/step3_controller_test.js index 56346b2..4450a3a 100644 --- a/contrib/views/slider/src/main/resources/ui/test/unit/controllers/createAppWizard/step3_controller_test.js +++ b/contrib/views/slider/src/main/resources/ui/test/unit/controllers/createAppWizard/step3_controller_test.js @@ -46,6 +46,9 @@ test('initConfigs', function () { "ViewInstanceInfo" : { "instance_data": { "java.home": "/usr/jdk64/jdk1.7.0_45" + }, + "properties": { + "slider.user": "admin" } } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/8464c5c0/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_controller_test.js ---------------------------------------------------------------------- diff --git a/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_controller_test.js b/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_controller_test.js index 474d209..8310256 100644 --- a/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_controller_test.js +++ b/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_controller_test.js @@ -28,6 +28,9 @@ test('getViewDisplayParametersSuccessCallback', function () { "label" : "display s1", "instance_data": { "java.home": "/usr/jdk64/jdk1.7.0_45" + }, + "properties": { + "slider.user": "admin" } } }) @@ -35,5 +38,6 @@ test('getViewDisplayParametersSuccessCallback', function () { equal(App.get('label'), 'display s1', 'valid label is set'); equal(App.get('description'), 'description s1', 'valid description is set'); equal(App.get('javaHome'), '/usr/jdk64/jdk1.7.0_45', 'valid default java_home property is set'); + equal(App.get('sliderUser'), 'admin', 'valid sliderUser is set'); });