You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2014/09/26 18:48:40 UTC

[25/44] AMBARI-7509. Slider View: Create Slider App wizard should have entries for multiple new features. (onechiporenko)

http://git-wip-us.apache.org/repos/asf/ambari/blob/9074f835/contrib/views/slider/src/main/resources/ui/app/templates/createAppWizard/step2.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/templates/createAppWizard/step2.hbs b/contrib/views/slider/src/main/resources/ui/app/templates/createAppWizard/step2.hbs
index 9be1b90..da82e12 100644
--- a/contrib/views/slider/src/main/resources/ui/app/templates/createAppWizard/step2.hbs
+++ b/contrib/views/slider/src/main/resources/ui/app/templates/createAppWizard/step2.hbs
@@ -24,15 +24,10 @@
       <thead>
       <tr>
         <th></th>
-        <th>
-          {{t wizard.step2.table.instances}}
-        </th>
-        <th>
-          {{t wizard.step2.table.memory}}
-        </th>
-        <th>
-          {{t wizard.step2.table.cpu}}
-        </th>
+        <th>{{t wizard.step2.table.instances}}</th>
+        <th>{{t wizard.step2.table.memory}}</th>
+        <th>{{t wizard.step2.table.cpu}}</th>
+        <th colspan="2">{{t wizard.step2.table.yarnLabels}}</th>
       </tr>
       </thead>
       <tbody>
@@ -42,6 +37,16 @@
           <td>{{input valueBinding="numInstances"}}</td>
           <td>{{input valueBinding="yarnMemory"}}</td>
           <td>{{input valueBinding="yarnCPU"}}</td>
+          <td>
+            <div {{bs-bind-tooltip content=view.checkBoxPopover}}>
+              {{input type="checkbox" checkedBinding="yarnLabelChecked" class="checkbox-inline"}}
+            </div>
+          </td>
+          <td>
+            <div {{bs-bind-tooltip content=view.yarnLabelPopover}}>
+              {{input valueBinding="yarnLabel" disabledBinding="yarnLabelNotChecked"}}
+            </div>
+          </td>
         </tr>
       {{/each}}
       </tbody>

http://git-wip-us.apache.org/repos/asf/ambari/blob/9074f835/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 ccc1901..04c5769 100644
--- a/contrib/views/slider/src/main/resources/ui/app/translations.js
+++ b/contrib/views/slider/src/main/resources/ui/app/translations.js
@@ -54,7 +54,9 @@ Em.I18n.translations = {
     'remove': 'Remove',
     'send': 'Send',
     'error': 'Error',
-    'yarn.app.id': 'YARN Application ID'
+    'yarn.app.id': 'YARN Application ID',
+    'frequency': 'Frequency',
+    'minutes': 'Minutes'
   },
 
   'error.config_is_empty': 'Config <strong>{0}</strong> should not be empty',
@@ -110,7 +112,17 @@ Em.I18n.translations = {
   'wizard.name': 'Create App',
   'wizard.step1.name': 'Select Type',
   'wizard.step1.header': 'Available Applications',
+  'wizard.step1.appTypes': 'Application Types',
   'wizard.step1.description': 'Description',
+  'wizard.step1.schedulerOptions.label': 'Scheduler Options (optional)',
+  'wizard.step1.schedulerOptions.queueName': 'Queue name',
+  'wizard.step1.yarnLabels.label': 'YARN Labels',
+  'wizard.step1.yarnLabels.options.anyHost': 'Any host',
+  'wizard.step1.yarnLabels.options.nonLabeledHost': 'Non-labeled host',
+  'wizard.step1.yarnLabels.options.specifyLabel': 'Specify label',
+  'wizard.step1.logAggregation.label': 'Log Aggregation',
+  'wizard.step1.logAggregation.filePatterns.include': 'Include File Patterns',
+  'wizard.step1.logAggregation.filePatterns.exclude': 'Exclude File Patterns',
   '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.',
@@ -120,6 +132,9 @@ Em.I18n.translations = {
   'wizard.step2.table.instances': 'Number of Instances',
   'wizard.step2.table.memory': 'YARN Memory (MB)',
   'wizard.step2.table.cpu': 'YARN	CPU	Cores',
+  'wizard.step2.table.yarnLabels': 'YARN Lables',
+  'wizard.step2.table.popoverCheckbox': 'Check box to enable YARN labels on component',
+  'wizard.step2.table.popoverLabel': 'Provide YARN label to make component run on labeled hosts. Empty value would make component run on non-labeled hosts.',
   'wizard.step2.error.numbers': 'All fields should be filled. Only integer numbers allowed.',
   'wizard.step3.name': 'Configuration',
   'wizard.step3.header.beginning': 'Provide	configuration	details	for	',

http://git-wip-us.apache.org/repos/asf/ambari/blob/9074f835/contrib/views/slider/src/main/resources/ui/app/views/createAppWizard/step1_view.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/views/createAppWizard/step1_view.js b/contrib/views/slider/src/main/resources/ui/app/views/createAppWizard/step1_view.js
index 18312c9..1f6a965 100644
--- a/contrib/views/slider/src/main/resources/ui/app/views/createAppWizard/step1_view.js
+++ b/contrib/views/slider/src/main/resources/ui/app/views/createAppWizard/step1_view.js
@@ -18,26 +18,29 @@
 
 App.CreateAppWizardStep1View = Ember.View.extend({
 
-  didInsertElement: function () {
-    this.get('controller').loadStep();
-  },
-
-  availableTypesSelect: Ember.Select.extend({
-
-    /**
-     * Forbid user to select more than one App type
-     * Set selected type to <code>controller.selectedType</code>
-     */
-    setSelection: function () {
-      var content = this.get('content');
-      var selection = this.get('selection');
-      if (content.get('length') && !selection.length) {
-        this.set('selection', content.objectAt(0));
-      }
-      if (selection.length > 1) {
-        this.set('selection', [selection[0]])
-      }
-      this.set('controller.selectedType', this.get('selection')[0])
-    }.observes('content.length', 'selection.length', 'selection.@each')
-  })
+  radioButton: Ember.TextField.extend({
+
+    tagName: "input",
+
+    type: "radio",
+
+    attributeBindings: ["name", "type", "value", "checked:checked:"],
+
+    click: function () {
+      this.set("selection", this.get('value'));
+    },
+
+    checked: function () {
+      return this.get("value") == this.get("selection");
+    }.property()
+
+  }),
+
+  /**
+   * Enable "Special-label" text-field only when "spec-label"-radio is checked
+   * @type {bool}
+   */
+  specLabelEnabled: Ember.computed.lt('controller.newApp.selectedYarnLabel', '2')
+
+
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/9074f835/contrib/views/slider/src/main/resources/ui/app/views/createAppWizard/step2_view.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/views/createAppWizard/step2_view.js b/contrib/views/slider/src/main/resources/ui/app/views/createAppWizard/step2_view.js
index ab22bc1..bdf718f 100644
--- a/contrib/views/slider/src/main/resources/ui/app/views/createAppWizard/step2_view.js
+++ b/contrib/views/slider/src/main/resources/ui/app/views/createAppWizard/step2_view.js
@@ -18,7 +18,16 @@
 
 App.CreateAppWizardStep2View = Ember.View.extend({
 
-  didInsertElement: function () {
-    this.get('controller').loadStep();
-  }
+  /**
+   * Message shown in the checkbox popover
+   * @type {string}
+   */
+  checkBoxPopover: Em.I18n.t('wizard.step2.table.popoverCheckbox'),
+
+  /**
+   * Message shown in the label-input popover
+   * @type {string}
+   */
+  yarnLabelPopover: Em.I18n.t('wizard.step2.table.popoverLabel')
+
 });