You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2015/05/06 01:33:16 UTC

ambari git commit: AMBARI-10947. Template widget creation: Make changes in the body text and add placeholder for template text area. (jaimin)

Repository: ambari
Updated Branches:
  refs/heads/trunk 260edad61 -> 22c9243d2


AMBARI-10947. Template widget creation: Make changes in the body text and add placeholder for template text area. (jaimin)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/22c9243d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/22c9243d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/22c9243d

Branch: refs/heads/trunk
Commit: 22c9243d2e208ce6c48672ec6ff8130e12d47364
Parents: 260edad
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Tue May 5 16:32:25 2015 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Tue May 5 16:33:05 2015 -0700

----------------------------------------------------------------------
 ambari-web/app/messages.js                                        | 3 ++-
 .../app/templates/main/service/widgets/create/step2_template.hbs  | 3 ++-
 ambari-web/app/views/main/service/widgets/create/step2_view.js    | 1 +
 3 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/22c9243d/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 552e7f2..5d85b19 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2538,8 +2538,9 @@ Em.I18n.translations = {
   'widget.create.wizard.step1.body.text': 'What type of widget do you want to create?',
   'widget.create.wizard.step1.body.choose.tooltip': 'Click to select',
   'widget.create.wizard.step2.header': 'Metrics and Expression',
+  'widget.create.wizard.step2.template.header': 'Template',
   'widget.create.wizard.step2.body.text':'Define the expression with any metrics and valid operators. </br>Use parentheses when necessary.',
-  'widget.create.wizard.step2.body.template':'Define the template first, a template can have any number of {{expression}} and any string.',
+  'widget.create.wizard.step2.body.template':'Define the template with any number of expressions and any string. An expression can be referenced from a template by enclosing its name with double curly braces.',
   'widget.create.wizard.step2.body.warning':'Note: Valid operators are +, -, *, /',
   'widget.create.wizard.step2.addExpression': 'Add Expression',
   'widget.create.wizard.step2.addDataset': 'Add data set',

http://git-wip-us.apache.org/repos/asf/ambari/blob/22c9243d/ambari-web/app/templates/main/service/widgets/create/step2_template.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/widgets/create/step2_template.hbs b/ambari-web/app/templates/main/service/widgets/create/step2_template.hbs
index 84934f8..13ae142 100644
--- a/ambari-web/app/templates/main/service/widgets/create/step2_template.hbs
+++ b/ambari-web/app/templates/main/service/widgets/create/step2_template.hbs
@@ -23,7 +23,8 @@
 </div>
 
 <div class="template">
-  {{view Ember.TextArea valueBinding="templateValue"}}
+  <h5>{{t widget.create.wizard.step2.template.header}}</h5>
+  {{view Ember.TextArea valueBinding="templateValue" placeholderBinding="view.templatePlaceholder"}}
 </div>
 
 <div class="alert alert-info">

http://git-wip-us.apache.org/repos/asf/ambari/blob/22c9243d/ambari-web/app/views/main/service/widgets/create/step2_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/widgets/create/step2_view.js b/ambari-web/app/views/main/service/widgets/create/step2_view.js
index 2fbbbe3..d8954ee 100644
--- a/ambari-web/app/views/main/service/widgets/create/step2_view.js
+++ b/ambari-web/app/views/main/service/widgets/create/step2_view.js
@@ -19,6 +19,7 @@
 App.WidgetWizardStep2View = Em.View.extend({
 
   templateName: require('templates/main/service/widgets/create/step2'),
+  templatePlaceholder: "{{Expression1}}" ,
 
   /**
    * calculate template by widget type