ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
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 GMT
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 <akovalenko@hortonworks.com>
Authored: Tue Sep 23 19:52:31 2014 +0300
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
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.
 }}
-<h4>{{t wizard.step1.header}}</h4>
-<div class="row">
-  <div class="col-xs-6">
-    {{view view.availableTypesSelect contentBinding="controller.availableTypes" optionLabelPath="content.displayName"
multiple="true" class="type-select"}}
-  </div>
-  <div class="col-xs-6">
-    <div {{bind-attr class=":control-group controller.isNameError:error"}}>
-      <label>{{t common.name}}: {{input id="app-name-input" valueBinding="controller.newAppName"}}</label>
+<div id="step1">
+  <h4>{{t wizard.step1.header}}</h4>
+  <div class="row">
+    <div class="col-xs-6">
+      {{view view.availableTypesSelect contentBinding="controller.availableTypes" optionLabelPath="content.displayName"
multiple="true" class="type-select"}}
+    </div>
+    <div class="col-xs-6">
+      <div {{bind-attr class=":control-group controller.isNameError:error"}}>
+        <label>{{t common.name}}: {{input id="app-name-input" valueBinding="controller.newAppName"}}</label>
+      </div>
+      {{#if controller.isNameError}}
+        <div class="alert alert-danger">
+          {{controller.nameErrorMessage}}
+        </div>
+      {{/if}}
+      <h5>{{t wizard.step1.description}}:</h5>
+      <p>
+        {{controller.typeDescription}}
+      </p>
     </div>
-    {{#if controller.isNameError}}
-      <div class="alert alert-danger">
-        {{controller.nameErrorMessage}}
+    {{#if controller.isAppTypesError}}
+      <div class="col-xs-12">
+          <div class="alert alert-info app-types-alert">
+              {{t wizard.step1.noAppTypesError}}
+          </div>
       </div>
     {{/if}}
-    <h5>{{t wizard.step1.description}}:</h5>
-    <p>
-      {{controller.typeDescription}}
-    </p>
   </div>
+  <button class="btn btn-success pull-right next-btn" {{bind-attr disabled="controller.isSubmitDisabled"}}
{{action submit target="controller"}}>{{t common.next}} &rarr;</button>
 </div>
-<button class="btn btn-success pull-right next-btn" {{bind-attr disabled="controller.isSubmitDisabled"}}
{{action submit target="controller"}}>{{t common.next}} &rarr;</button>

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',


Mime
View raw message