ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oleew...@apache.org
Subject ambari git commit: AMBARI-16982. Host checkboxes getting unselected when user clicks on search host button and few minor issues (Dharmesh Makwana via oleewere)
Date Thu, 02 Jun 2016 09:48:31 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 269ba4754 -> aa083be79


AMBARI-16982. Host checkboxes getting unselected when user clicks on search host button and
few minor issues (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/aa083be7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aa083be7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aa083be7

Branch: refs/heads/trunk
Commit: aa083be7925abaa5490f174015a622cf37c3b9ff
Parents: 269ba47
Author: oleewere <oleewere@gmail.com>
Authored: Thu Jun 2 11:39:17 2016 +0200
Committer: oleewere <oleewere@gmail.com>
Committed: Thu Jun 2 11:39:17 2016 +0200

----------------------------------------------------------------------
 .../src/main/resources/default.properties       |  2 +-
 .../scripts/views/audit/AuditTabLayoutView.js   |  3 ++-
 .../webapp/scripts/views/common/TimerView.js    |  6 ++++--
 .../scripts/views/dashboard/HostListView.js     | 11 ++--------
 .../scripts/views/graphs/GraphLayoutView.js     | 22 +++++++++++++++++---
 .../views/tabs/HierarchyTabLayoutView.js        |  3 ++-
 .../templates/graphs/GraphLayoutView_tmpl.html  |  2 +-
 7 files changed, 31 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/aa083be7/ambari-logsearch/ambari-logsearch-portal/src/main/resources/default.properties
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/resources/default.properties
b/ambari-logsearch/ambari-logsearch-portal/src/main/resources/default.properties
index a0567a4..7c2f858 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/resources/default.properties
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/resources/default.properties
@@ -29,7 +29,7 @@ result=Allowed:1,Denied:0
 #Column Mapping
 #Example  CoulumnInSolr:ColumnInUI
 #For Service Logs
-logsearch.solr.service.logs.column.mapping=bundle_id:Bundle Id,thread_name:Thread,log_emessage:message
+logsearch.solr.service.logs.column.mapping=bundle_id:Bundle Id,thread_name:Thread,log_message:Message,case_id:Case
Id,cluster:Cluster,event_count:Event Count,file:File,host:Host,id:Id,ip:Ip,level:Level,line_number:Line
Number,logfile_line_number:Logfile Line Number,logger_name:Logger Name,logtype:Log Type,method:Method,path:Path,rowtype:Row
Type,type:Type
 
 #For Audit Logs
 logsearch.solr.audit.logs.column.mapping=access:Access Type,reqUser:User,enforcer:Access
Enfocer,ip:Client IP

http://git-wip-us.apache.org/repos/asf/ambari/blob/aa083be7/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/audit/AuditTabLayoutView.js
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/audit/AuditTabLayoutView.js
b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/audit/AuditTabLayoutView.js
index 0c3a4be..5f93c5a 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/audit/AuditTabLayoutView.js
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/audit/AuditTabLayoutView.js
@@ -132,7 +132,8 @@ define(['require',
 					params : that.defaultParams,
 					//parentView : this,
 					viewType : Globals.graphType.MULTILINE.value,
-					showDatePicker:true
+					showDatePicker:true,
+					futureDate : false
 				}));
 			})
 		},

http://git-wip-us.apache.org/repos/asf/ambari/blob/aa083be7/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/common/TimerView.js
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/common/TimerView.js
b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/common/TimerView.js
index 119def5..01dcf92 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/common/TimerView.js
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/common/TimerView.js
@@ -87,7 +87,8 @@ define(['require','backbone','hbs!tmpl/common/TimerView_tmpl'],function(require,
 //		    startTime();
 			var time = 10,that=this;
 		    var initialOffset = '56';
-		    var i = 1
+		    var i = 1;
+		    clearInterval(that.timerInterval);
 		    this.$('h6').show();
 		    this.timerInterval = setInterval(function() {
 		        that.$('.circle_animation').css('stroke-dashoffset', initialOffset-(i*(initialOffset/time)));
@@ -95,8 +96,9 @@ define(['require','backbone','hbs!tmpl/common/TimerView_tmpl'],function(require,
 		        if (i == time) {
 		        	clearInterval(that.timerInterval);
 		            setTimeout(function(){
-		            	if(! that.isTimerManuallyStopped())
+		            	if(! that.isTimerManuallyStopped()){
 		            		that.timerCallBack();
+		            	}
 		            },1000);
 		        }
 		        i++;  

http://git-wip-us.apache.org/repos/asf/ambari/blob/aa083be7/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dashboard/HostListView.js
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dashboard/HostListView.js
b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dashboard/HostListView.js
index c48271a..a441cb0 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dashboard/HostListView.js
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dashboard/HostListView.js
@@ -333,15 +333,8 @@ define(['require',
 			if(params){
 				that.$("input[data-node]").prop("checked",false);
 				_.each(params,function(node){
-					if(node.h){
-						that.$("input[data-type='H'][data-node='"+node.h+"']").prop("checked",true);
-						if(node.c){
-							var parent = that.$("li[data-type='H'][data-node='"+node.h+"']")
-							parent.find("input[data-type='C']").prop("checked",false);
-							_.each(node.c,function(component){
-								parent.find("input[data-type='C'][data-node='"+component+"']").prop("checked",true);
-							});
-						}
+					if(node){
+						that.$("input[data-type='H'][data-node='"+node+"']").prop("checked",true);
 					}
 					
 						

http://git-wip-us.apache.org/repos/asf/ambari/blob/aa083be7/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 a6a19d3..79a3a02 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
@@ -60,7 +60,7 @@ define(['require',
              * @constructs
              */
             initialize: function(options) {
-                _.extend(this, _.pick(options, 'vent', 'globalVent', 'params', 'viewType',
'showDatePicker', 'showUnit'));
+                _.extend(this, _.pick(options, 'vent', 'globalVent', 'params', 'viewType',
'showDatePicker', 'showUnit','futureDate'));
                 /* if (this.showDatePicker) {
                      this.graphVent = new Backbone.Wreqr.EventAggregator();
                  }*/
@@ -231,8 +231,23 @@ define(['require',
                                 x: that.dateUtil.getMomentObject(object.name), //(new Date(object.name)).toUTCString(),
                                 y: parseFloat(object.value)
                             }
-                        })
+                        });
                     };
+
+                    if(!that.futureDate){
+                        var date = moment().add(1,"hours").format("YYYY-MM-DDTHH:mm:ss.SSSSZ");
+                        var newObj =[];
+                        for(i = 0 ;i < Obj.values.length ;i++){
+                                if(moment(date).isAfter(that.dateUtil.getMomentObject(Obj.values[i].x))){
+                                    newObj[i] = {
+                                                     x : that.dateUtil.getMomentObject(Obj.values[i].x),
+                                                     y : Obj.values[i].y
+                                                 }
+                                }
+                        }
+                        Obj.values = newObj;                      
+                    }
+
                     if (that.histogramView) {
                         Obj['color'] = ((model.get('name') === 'ERROR') ? ("#E81D1D") :
                             (model.get('name') === 'INFO') ? ("#2577B5") :
@@ -244,7 +259,8 @@ define(['require',
                         Obj['color'] = color[i];
                     }
                     data.push(Obj);
-                })
+                });
+
                 if (that.histogramView) {
                     for (var i = data.length - 1; i >= 0; i--) {
                         dataL.push(data[i])

http://git-wip-us.apache.org/repos/asf/ambari/blob/aa083be7/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 c0cdace..3290216 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
@@ -232,7 +232,8 @@ define(['require',
 					vent : that.vent,
 					globalVent:that.globalVent,
 					params : that.defaultParams,
-					showUnit : true
+					showUnit : true,
+					futureDate : true
 				}));
             });
 		},

http://git-wip-us.apache.org/repos/asf/ambari/blob/aa083be7/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/graphs/GraphLayoutView_tmpl.html
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/graphs/GraphLayoutView_tmpl.html
b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/graphs/GraphLayoutView_tmpl.html
index e35b38c..02b384c 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/graphs/GraphLayoutView_tmpl.html
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/graphs/GraphLayoutView_tmpl.html
@@ -36,7 +36,7 @@
         </div>
         <div class="no-move"></div>
     </div>
-    <div class="box-content" style="padding: 0px;">
+    <div class="box-content" style="padding-top: 10px;">
         <div class="loader" style="display: none;">
         </div>
         <div>


Mime
View raw message