Repository: ambari
Updated Branches:
  refs/heads/trunk 6bb70cc4a -> 0cd4aaa15


AMBARI-11294 Multiple selections possible at Metrics and Expression page of 
Create Widget Wizard. (atkach)


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

Branch: refs/heads/trunk
Commit: 4b528d191fc924d1effdc6b4eb9c4bff1e4afc97
Parents: 6bb70cc
Author: Andrii Tkach <[email protected]>
Authored: Thu May 21 13:21:47 2015 +0300
Committer: Andrii Tkach <[email protected]>
Committed: Thu May 21 14:52:48 2015 +0300

----------------------------------------------------------------------
 .../templates/main/service/widgets/create/step2_add_metric.hbs   | 4 ++--
 ambari-web/app/views/common/widget/graph_widget_view.js          | 3 ++-
 .../app/views/main/service/widgets/create/expression_view.js     | 3 ---
 3 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4b528d19/ambari-web/app/templates/main/service/widgets/create/step2_add_metric.hbs
----------------------------------------------------------------------
diff --git 
a/ambari-web/app/templates/main/service/widgets/create/step2_add_metric.hbs 
b/ambari-web/app/templates/main/service/widgets/create/step2_add_metric.hbs
index 8b5daef..314f5b1 100644
--- a/ambari-web/app/templates/main/service/widgets/create/step2_add_metric.hbs
+++ b/ambari-web/app/templates/main/service/widgets/create/step2_add_metric.hbs
@@ -23,12 +23,12 @@
     {{#if controller.content.isMetricsLoaded}}
       <!--service level-->
       {{#each service in view.componentMap}}
-        <li class="dropdown-submenu keep-open">
+        <li class="dropdown-submenu">
           <a class="" tabindex="-1" 
href="javascript:void(null);">{{service.displayName}}</a>
           <ul class="dropdown-menu">
             {{#each component in service.components}}
               <!--component level-->
-              <li class="dropdown-submenu keep-open">
+              <li class="dropdown-submenu">
                 <a href="javascript:void(null);">{{component.displayName}}</a>
                 <ul class="dropdown-menu select-options-dropdown">
                   <!--metrics level-->

http://git-wip-us.apache.org/repos/asf/ambari/blob/4b528d19/ambari-web/app/views/common/widget/graph_widget_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/widget/graph_widget_view.js 
b/ambari-web/app/views/common/widget/graph_widget_view.js
index 9c94563..856d0e8 100644
--- a/ambari-web/app/views/common/widget/graph_widget_view.js
+++ b/ambari-web/app/views/common/widget/graph_widget_view.js
@@ -79,9 +79,10 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, {
       this.get('content.values').forEach(function (value) {
         var expression = this.extractExpressions(value)[0];
         var computedData;
-        var datasetKey = value.value.match(this.get('EXPRESSION_REGEX'))[0];
+        var datasetKey;
 
         if (expression) {
+          datasetKey = value.value.match(this.get('EXPRESSION_REGEX'))[0];
           computedData = this.computeExpression(expression, 
metrics)[datasetKey];
           //exclude empty datasets
           if (computedData.length > 0) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/4b528d19/ambari-web/app/views/main/service/widgets/create/expression_view.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/app/views/main/service/widgets/create/expression_view.js 
b/ambari-web/app/views/main/service/widgets/create/expression_view.js
index 9a2e31a..80f6446 100644
--- a/ambari-web/app/views/main/service/widgets/create/expression_view.js
+++ b/ambari-web/app/views/main/service/widgets/create/expression_view.js
@@ -210,9 +210,6 @@ App.AddMetricExpressionView = Em.View.extend({
     $('html').on('click.dropdown', '.dropdown-menu li', function (e) {
       $(this).hasClass('keep-open') && e.stopPropagation();
     });
-    $('html').on('click.dropdown', '.dropdown-menu chosen-drop', function (e) {
-      $(this).hasClass('keep-open') && e.stopPropagation();
-    });
     var self = this;
     Em.run.later(this, function () {
       $(".metrics-select.chosen-select").chosen({

Reply via email to