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 995EE11866 for ; Tue, 23 Sep 2014 16:58:53 +0000 (UTC) Received: (qmail 25174 invoked by uid 500); 23 Sep 2014 16:58:53 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 25146 invoked by uid 500); 23 Sep 2014 16:58:53 -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 25136 invoked by uid 99); 23 Sep 2014 16:58:53 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Sep 2014 16:58:53 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 2CFCF9376E2; Tue, 23 Sep 2014 16:58:53 +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: X-Mailer: ASF-Git Admin Mailer Subject: git commit: AMBARI-7454. Slider View: Create Slider App wizard should show message when no app-types available. (akovalenko) Date: Tue, 23 Sep 2014 16:58:53 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/trunk 535559fab -> 3715605d0 AMBARI-7454. Slider View: Create Slider App wizard should show message when no app-types available. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3715605d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3715605d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3715605d Branch: refs/heads/trunk Commit: 3715605d0ac6ced6a82300fc3fc95b8ca2e4f49c Parents: 535559f Author: Aleksandr Kovalenko Authored: Tue Sep 23 19:52:31 2014 +0300 Committer: Aleksandr Kovalenko Committed: Tue Sep 23 19:53:41 2014 +0300 ---------------------------------------------------------------------- .../createAppWizard/step1_controller.js | 8 ++++ .../resources/ui/app/styles/application.less | 5 +++ .../ui/app/templates/createAppWizard/step1.hbs | 41 ++++++++++++-------- .../src/main/resources/ui/app/translations.js | 1 + 4 files changed, 39 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/3715605d/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js ---------------------------------------------------------------------- diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js index c04b7b3..a96dd5d 100644 --- a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js +++ b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js @@ -59,6 +59,14 @@ App.CreateAppWizardStep1Controller = Ember.Controller.extend({ nameErrorMessage: '', /** + * Define if there are existing App types + * @type {Boolean} + */ + isAppTypesError: function(){ + return !this.get('availableTypes.content.length'); + }.property('availableTypes.content.length'), + + /** * Define description depending on selected App type * @type {string} */ http://git-wip-us.apache.org/repos/asf/ambari/blob/3715605d/contrib/views/slider/src/main/resources/ui/app/styles/application.less ---------------------------------------------------------------------- diff --git a/contrib/views/slider/src/main/resources/ui/app/styles/application.less b/contrib/views/slider/src/main/resources/ui/app/styles/application.less index f980aa8..c0ee347 100644 --- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less +++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less @@ -432,6 +432,11 @@ select { margin-bottom: 30px; } } + #step1 { + .app-types-alert { + margin-top: 20px; + } + } .app-wiz-configs { .accordion-toggle { display: block; http://git-wip-us.apache.org/repos/asf/ambari/blob/3715605d/contrib/views/slider/src/main/resources/ui/app/templates/createAppWizard/step1.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/slider/src/main/resources/ui/app/templates/createAppWizard/step1.hbs b/contrib/views/slider/src/main/resources/ui/app/templates/createAppWizard/step1.hbs index fdd3ffb..c4f68a5 100644 --- a/contrib/views/slider/src/main/resources/ui/app/templates/createAppWizard/step1.hbs +++ b/contrib/views/slider/src/main/resources/ui/app/templates/createAppWizard/step1.hbs @@ -15,24 +15,33 @@ * See the License for the specific language governing permissions and * limitations under the License. }} -

{{t wizard.step1.header}}

-
-
- {{view view.availableTypesSelect contentBinding="controller.availableTypes" optionLabelPath="content.displayName" multiple="true" class="type-select"}} -
-
-
- +
+

{{t wizard.step1.header}}

+
+
+ {{view view.availableTypesSelect contentBinding="controller.availableTypes" optionLabelPath="content.displayName" multiple="true" class="type-select"}} +
+
+
+ +
+ {{#if controller.isNameError}} +
+ {{controller.nameErrorMessage}} +
+ {{/if}} +
{{t wizard.step1.description}}:
+

+ {{controller.typeDescription}} +

- {{#if controller.isNameError}} -
- {{controller.nameErrorMessage}} + {{#if controller.isAppTypesError}} +
+
+ {{t wizard.step1.noAppTypesError}} +
{{/if}} -
{{t wizard.step1.description}}:
-

- {{controller.typeDescription}} -

+
- http://git-wip-us.apache.org/repos/asf/ambari/blob/3715605d/contrib/views/slider/src/main/resources/ui/app/translations.js ---------------------------------------------------------------------- diff --git a/contrib/views/slider/src/main/resources/ui/app/translations.js b/contrib/views/slider/src/main/resources/ui/app/translations.js index cead07b..3e5f048 100644 --- a/contrib/views/slider/src/main/resources/ui/app/translations.js +++ b/contrib/views/slider/src/main/resources/ui/app/translations.js @@ -109,6 +109,7 @@ Em.I18n.translations = { 'wizard.step1.typeDescription': 'Deploys {0} cluster on YARN.', 'wizard.step1.nameFormatError': 'App Name should consist only of letters, numbers, \'-\', \'_\' and first character should be a letter.', 'wizard.step1.nameRepeatError': 'App with entered Name already exists.', + 'wizard.step1.noAppTypesError': 'No Slider Application packages have been installed on this server. Please contact your Ambari server administrator to install Slider Application packages into /var/lib/ambari-server/resources/apps/ folder.', 'wizard.step2.name': 'Allocate Resources', 'wizard.step2.header': 'HBase application requires resources to be allocated on the cluster. Provide resource allocation requests for each component of the application below.', 'wizard.step2.table.instances': 'Number of Instances',