Repository: ambari
Updated Branches:
  refs/heads/trunk 4eea7ccdc -> 62e2183db


AMBARI-17052. Comparison tab: Allow the comparison only when minimum 2 tabs are 
selected and minor fixes (Dharmesh Makwana via oleewere)


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

Branch: refs/heads/trunk
Commit: 62e2183db2315aae8dd75fe67b76a42bb7a2ee10
Parents: 4eea7cc
Author: oleewere <[email protected]>
Authored: Tue Jun 7 12:19:13 2016 +0200
Committer: oleewere <[email protected]>
Committed: Tue Jun 7 12:19:13 2016 +0200

----------------------------------------------------------------------
 .../main/webapp/scripts/views/dashboard/MainLayoutView.js    | 8 ++++++--
 .../src/main/webapp/scripts/views/graphs/GraphLayoutView.js  | 2 +-
 .../main/webapp/scripts/views/tabs/HierarchyTabLayoutView.js | 2 --
 .../webapp/templates/tabs/HierarchyTabLayoutView_tmpl.html   | 4 ++--
 4 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/62e2183d/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dashboard/MainLayoutView.js
----------------------------------------------------------------------
diff --git 
a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dashboard/MainLayoutView.js
 
b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dashboard/MainLayoutView.js
index c2e0bb3..5b69650 100644
--- 
a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dashboard/MainLayoutView.js
+++ 
b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dashboard/MainLayoutView.js
@@ -505,8 +505,12 @@ define(['require',
                onCompareButtonClick:function(){
                        var dateRangeLabel = 'Last 1 Hour';
                        var time = 
this.dateUtil.getRelativeDateFromString(dateRangeLabel);
-                       if(this.componetList.length >= 1){
-                               
this.globalVent.trigger("render:comparison:tab",{
+                       if(this.componetList.length == 1){
+                               Utils.alertPopup({
+                        msg: "Minimum two components are required for 
comparison. Please select one more component and try again."
+                });
+                       }else{
+                                       
this.globalVent.trigger("render:comparison:tab",{
                                        
params:_.extend({},this.searchParams,{from:time[0].toJSON(),to:time[1].toJSON(),dateRangeLabel
 : dateRangeLabel}),
                                        componetList:this.componetList,
                                        globalVent : this.globalVent

http://git-wip-us.apache.org/repos/asf/ambari/blob/62e2183d/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/graphs/GraphLayoutView.js
----------------------------------------------------------------------
diff --git 
a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/graphs/GraphLayoutView.js
 
b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/graphs/GraphLayoutView.js
index 79a3a02..cc0eafb 100644
--- 
a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/graphs/GraphLayoutView.js
+++ 
b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/graphs/GraphLayoutView.js
@@ -231,7 +231,7 @@ define(['require',
                                 x: that.dateUtil.getMomentObject(object.name), 
//(new Date(object.name)).toUTCString(),
                                 y: parseFloat(object.value)
                             }
-                        });
+                        })
                     };
 
                     if(!that.futureDate){

http://git-wip-us.apache.org/repos/asf/ambari/blob/62e2183d/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/tabs/HierarchyTabLayoutView.js
----------------------------------------------------------------------
diff --git 
a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/tabs/HierarchyTabLayoutView.js
 
b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/tabs/HierarchyTabLayoutView.js
index 3290216..daad522 100644
--- 
a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/tabs/HierarchyTabLayoutView.js
+++ 
b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/tabs/HierarchyTabLayoutView.js
@@ -146,7 +146,6 @@ define(['require',
                        },this);
                        
                        
this.listenTo(this.globalVent,"reinitialize:serviceLogs",function(options){
-                               this.toggleSearchBackToBasicSearch(options);
                this.vent.trigger("reinitialize:filter:tree 
reinitialize:filter:include:exclude reinitialize:filter:bubbleTable"+
                                " reinitialize:filter:mustNot 
reinitialize:filter:mustBe reinitialize:filter:level 
reinitialize:filter:logtime",options);
             },this);
@@ -162,7 +161,6 @@ define(['require',
                        this.renderLogSnapShot();
                        this.renderEventHistory();
 //                     this.fetchLogLevelCounts({q:"*:*"});
-                       this.renderAdvanceSearch();
                        this.componentsList.fetch({reset:true});
                },
                onShow:function(){

http://git-wip-us.apache.org/repos/asf/ambari/blob/62e2183d/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/tabs/HierarchyTabLayoutView_tmpl.html
----------------------------------------------------------------------
diff --git 
a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/tabs/HierarchyTabLayoutView_tmpl.html
 
b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/tabs/HierarchyTabLayoutView_tmpl.html
index 1a3135f..d0d57ac 100644
--- 
a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/tabs/HierarchyTabLayoutView_tmpl.html
+++ 
b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/tabs/HierarchyTabLayoutView_tmpl.html
@@ -31,14 +31,14 @@
                     <div class="col-md-6" data-id="basicSearch">
                         <div id="r_vsSearchIncCol"></div>
                     </div>
-                    <div class="col-md-5" data-id="basicSearch">
+                    <div class="col-md-6" data-id="basicSearch">
                         <div id="r_vsSearchExCol"></div>
                     </div>
                     <div class="col-md-11" data-id="advanceSearch" 
style="display:none">
                         <div id="r_AdvanceSearch"></div>
                     </div>
                    <!--  Advance search Button -->
-                    <div class="col-md-1 text-center">
+                    <div class="col-md-1 text-center hidden">
                         <div class="toggle-switch toggleSearchQuery 
aggregatedView text-left">
                             <label>
                                 <input data-id="toggleTableAccessLog" 
type="checkbox">

Reply via email to