Repository: ambari Updated Branches: refs/heads/trunk 5c5e368fe -> bac456060
AMBARI-18035. Fix Log Search Portal UI 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/9a1719ee Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9a1719ee Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9a1719ee Branch: refs/heads/trunk Commit: 9a1719ee887a65b4a34c3f177c977a91ad19cb2d Parents: 52d04b1 Author: oleewere <[email protected]> Authored: Fri Aug 5 12:43:40 2016 +0200 Committer: oleewere <[email protected]> Committed: Fri Aug 5 13:57:36 2016 +0200 ---------------------------------------------------------------------- .../src/main/webapp/scripts/utils/Utils.js | 15 +- .../scripts/views/audit/AuditAggregatedView.js | 4 + .../scripts/views/audit/AuditTabLayoutView.js | 23 ++- .../scripts/views/common/EventHistoryLayout.js | 20 ++- .../main/webapp/scripts/views/common/Header.js | 12 +- .../dashboard/BubbleGraphTableLayoutView.js | 16 +- .../scripts/views/dashboard/MainLayoutView.js | 146 +++++++++++-------- .../views/dialog/SaveSearchFilterView.js | 15 +- .../scripts/views/graphs/GraphLayoutView.js | 10 +- .../views/tabs/HierarchyTabLayoutView.js | 2 +- .../webapp/scripts/views/tabs/LogFileView.js | 28 ++-- .../troubleshoot/TroubleShootLayoutView.js | 4 +- .../src/main/webapp/styles/style.css | 38 ++++- .../src/main/webapp/styles/style_v2.css | 5 +- .../audit/AuditAggregatedView_tmpl.html | 4 +- .../audit/AuditTabLayoutView_tmpl.html | 2 +- .../TroubleShootLayoutView_tmpl.html | 4 +- 17 files changed, 215 insertions(+), 133 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1719ee/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/utils/Utils.js ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/utils/Utils.js b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/utils/Utils.js index 919a0c7..94a8a5b 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/utils/Utils.js +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/utils/Utils.js @@ -48,7 +48,7 @@ define(['require', // /////////////////////////////////////////////////////// // Enum utility methods // ////////////////////////////////////////////////////// - /** + /**Utils * Get enum for the enumId * * @param {integer} @@ -445,11 +445,14 @@ define(['require', var diffTime = (new Date().getTime() - prevNetworkErrorTime); if (diffTime > 3000) { prevNetworkErrorTime = new Date().getTime(); - Utils.notifyError({ - content: "Network Connection Failure : " + - "It seems you are not connected to the internet. Please check your internet connection and try again" - }) - + if(error.statusText === "abort"){ + Utils.notifyInfo({ content: "You have canceled the request"}); + }else{ + Utils.notifyError({ + content: "Network Connection Failure : " + + "It seems you are not connected to the internet. Please check your internet connection and try again" + }); + } } } // require(['views/common/ErrorView','App'],function(vError,App){ http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1719ee/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/audit/AuditAggregatedView.js ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/audit/AuditAggregatedView.js b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/audit/AuditAggregatedView.js index ea968a6..acca51c 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/audit/AuditAggregatedView.js +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/audit/AuditAggregatedView.js @@ -86,6 +86,10 @@ define(['require', this.fetchTopUsers(value); this.fetchTopResources(value); },this); + this.listenTo(this,"button:min:max",function(){ + this.renderGraphUsers(); + this.renderGraphResources(); + },this); }, initializeCollection : function(){ this.topUsers = new VNameValueList([],{ http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1719ee/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 21f1779..0b570ac 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 @@ -51,7 +51,8 @@ define(['require', ui: { viewType: "input[name='viewTypeAudit']", excludeComponents : "#excludeComponents", - includeComponents : "#includeComponents" + includeComponents : "#includeComponents", + collapseArrowClick : "a.collapse-link.chkArrow" }, /** ui events hash */ @@ -59,6 +60,13 @@ define(['require', var events = {}; events['click [data-id="refresh-tab-audit"]'] = 'onAuditTabRefresh'; events['change ' + this.ui.viewType] = 'onViewTypeChange'; + events['click ' +this.ui.collapseArrowClick] = function(e){ + if($(e.currentTarget).find('i').hasClass('fa-chevron-down')){ + if(this.RAuditAggregated.currentView){ + this.RAuditAggregated.currentView.trigger("button:min:max"); + } + } + } return events; }, @@ -434,17 +442,18 @@ define(['require', }); }, reinitializeFilterMustBe : function(values){ - if(values.mustBe) + if(values.mustBe){ this.ui.includeComponents.select2('val',values.mustBe.split(",")); - else + }else{ this.ui.includeComponents.select2('val',[]); + } }, reinitializeFilterMustNot : function(values){ - if(values.mustNot) + if(values.mustNot){ this.ui.excludeComponents.select2('val',values.mustNot.split(",")); - else - this.ui.excludeComponents.select2('val',[]); - + }else{ + this.ui.excludeComponents.select2('val',[]); + } } }); }); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1719ee/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/common/EventHistoryLayout.js ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/common/EventHistoryLayout.js b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/common/EventHistoryLayout.js index 470f1f2..89914ea 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/common/EventHistoryLayout.js +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/common/EventHistoryLayout.js @@ -108,20 +108,28 @@ define(['require', }, onInfoClick : function(e){ var html = "<table class='table eventTable table-hover'><thead><th>Name</th><th>Value</th></thead>",that=this; - _.each(this.model.get("params"), function(value, key) { - if ( (! _.isEmpty(value)) && ( key != "bundleId" && key != "start_time" && + var customParam = {"mustNot":[],"mustBe":[],"includeQuery":[],"excludeQuery":[]}; + var paramNames = _.extend({},this.model.get("params"),customParam); + _.each(paramNames, function(value, key) { + if ( (! _.isEmpty(value) || _.isArray(value)) && ( key != "bundleId" && key != "start_time" && key != "end_time" && key != "q" && key != "unit" && key != "query" && key != "type" && key != "time" && key != "dateRangeLabl" && key != "advanceSearch" && !_.isUndefined(Globals.paramsNameMapping[key]) )){ - html += '<tr class="' + key + '"><td>' + Globals.paramsNameMapping[key].label + '</td><td>' + that.getHtmlForParam(key,value) + '</td><tr>' + html += '<tr class="' + key + '"><td>' + Globals.paramsNameMapping[key].label + '</td><td>' + that.getHtmlForParam(key) + '</td><tr>' } }); html += "</table>"; Utils.alertPopup({msg : html,className:"bootBoxSmall"}); }, - getHtmlForParam : function(key,value){ + getHtmlForParam : function(key){ + var paramValue = this.model.get("params"),value=paramValue[key]; + if(key === "from" || key === "to"){ - value = moment(value).format('MM/DD/YYYY,HH:mm:ss,SSS'); - } + value = moment(paramValue[key]).format('MM/DD/YYYY,HH:mm:ss,SSS'); + }else{ + if(_.isUndefined(paramValue[key])){ + value = "[]"; + } + } return value; }, onRemoveFlagClick : function(e){ http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1719ee/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/common/Header.js ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/common/Header.js b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/common/Header.js index 9653bd4..753a7c3 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/common/Header.js +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/common/Header.js @@ -178,14 +178,14 @@ define(['require', buttons: [{ id: "okBtn", text: "Save", - "class": "btn btn-primary", + "class": "btn btn-primary defaultBtn", click: function() { that.onCreateFilterSubmit(); } }, { id: "cancelBtn", text: "Close", - "class": "btn btn-default", + "class": "btn btn-default defaultCancelBtn", click: function() { that.onDialogClosed(); } @@ -368,21 +368,21 @@ define(['require', buttons: [{ id: "reloadBtn", text: "Reload", - "class": "btn btn-primary", + "class": "btn btn-primary defaultBtn", click: function() { that.onTimeZoneReload(); } }, { id: "reloadNewBtn", text: "Reload in new tab", - "class": "btn btn-primary", + "class": "btn btn-primary defaultBtn", click: function() { that.onTimeZoneReloadinNewTab(); } }, { id: "cancelBtn", text: "Close", - "class": "btn btn-default", + "class": "btn btn-default defaultCancelBtn", click: function() { that.onDialogClosed(); } @@ -399,7 +399,7 @@ define(['require', Utils.localStorage.setLocalStorage('timezone', content.selectedtimeZone); //this.ui.timeZoneChange.find('span').text(moment.tz(content.selectedtimeZone).zoneName()); this.globalVent.trigger("currentMap:load",obj); - window.open(window.location.href, '_blank'); + window.open(window.location.href); } }, http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1719ee/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dashboard/BubbleGraphTableLayoutView.js ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dashboard/BubbleGraphTableLayoutView.js b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dashboard/BubbleGraphTableLayoutView.js index a154f5d..42b94d5 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dashboard/BubbleGraphTableLayoutView.js +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dashboard/BubbleGraphTableLayoutView.js @@ -100,6 +100,7 @@ define(['require', this.graphModel = new VGraphInfo(); this.bindEvents(); this.graphParams = this.params; + }, bindEvents : function(){ this.listenTo(this.collection,"reset",function(collection){ @@ -327,7 +328,7 @@ define(['require', '<ul class="dropdown-menu dropupright">' + '<li data-id="A_B"><a href="javascript:void(0)">Preview</a></li>' + "<li data-id='N_T'><a title='Open logs in new tab' data-type='C' data-host='"+model.get("host")+"' data-node='"+model.get("type")+"' data-id='"+model.get("id")+"' href='javascript:void(0)' class=''>Go To Log</a></li>" + - //'<li><a href="#">JavaScript</a></li>' + + "<li data-id='C_M'><a title='Add to compare' data-type='C' data-host='"+model.get("host")+"' data-node='"+model.get("type")+"' data-id='"+model.get("id")+"' href='javascript:void(0)' class=''>Add to Compare</a></li>" + '</ul>' + '</div></div>'; return str; @@ -533,14 +534,15 @@ define(['require', this.$el.on('mouseup contextmenu', ".logMessage", function(e){ var selection; e.stopPropagation(); - if (window.getSelection) { - selection = window.getSelection(); - } else if (document.selection) { - selection = document.selection.createRange(); - } + + var range = window.getSelection().getRangeAt(0); + var selectionContents = range.cloneContents(); + selection = selectionContents.textContent; + setTimeout(function(){ that.selectionCallBack(selection,e) },1); + }); }, @@ -602,6 +604,8 @@ define(['require', }); }else if ($el.data("id") === "N_T"){ this.onNewTabIconClick($el.find('a')); + }else if ($el.data("id") === "C_M"){ + this.globalVent.trigger("add:compare",$el.find('a')); } }, http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1719ee/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 79bd4d6..3be87f5 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 @@ -116,6 +116,10 @@ define(['require', this.listenTo(this.globalVent,"show:tab",function(tabName){ this.showTab(tabName); },this); + this.listenTo(this.globalVent,"add:compare",function($el){ + this.quickMenuCompare = true; + this.onCompareLink($el); + },this); }, onRender : function(){ this.renderTroubleShootTab(); @@ -454,50 +458,75 @@ define(['require', }) }, tabcheckBoxSelectDeselect:function(el,fromEvent){ - if(el.find('i').hasClass('fa-square-o')){ - if (this.componetList.length >= 4) { - Utils.alertPopup({ - msg: "Currently only four components comparison supported." - }); - return; - } - el.find('i').removeClass('fa-square-o').addClass(' fa-check-square-o'); - this.onCompareLink(el); - }else{ - el.find('i').removeClass('fa-check-square-o').addClass('fa-square-o'); - if(!fromEvent){ - this.onCloseCompareComponentClick(el.parents('li').find('a').data().id) - } - + var that = this, + clickedId = this.$('div[role="tabpanel"] ul').find(el).parents('li').data('id'); + if (el.find('i').hasClass('fa-square-o')) { + var idList = _.pluck(this.componetList, 'id'); + if (! _.contains(idList, clickedId)) { + if(this.componetList.length >= 4){ + Utils.alertPopup({ + msg: "Currently only four components comparison supported." + }); + return; + }else{ + el.find('i').removeClass('fa-square-o').addClass('fa-check-square-o'); + this.quickMenuCompare = false; + this.onCompareLink(el); + } + }else{ + el.find('i').removeClass('fa-square-o').addClass('fa-check-square-o'); + } + } else { + el.find('i').removeClass('fa-check-square-o').addClass('fa-square-o'); + if (!fromEvent) { + this.onCloseCompareComponentClick(el.parents('li').find('a').data().id) + } } }, onCompareLink:function($el){ - this.togglePanelPosition(false,true); - var clickedId ="", - newValue = true, - dataValue = $el.parents('li').find('a').data(); - if(dataValue.id){ - var clickedId = dataValue.id; + this.togglePanelPosition(false, true); + var clickedId = "", + newValue = true, + dataValue; + if (this.quickMenuCompare) { + dataValue = $el.data(); + if(dataValue.host){ + dataValue.id = dataValue.host.replace(/\./g, '_') + dataValue.node; + } + } else { + dataValue = $el.parents('li').find('a').data(); } - _.each(this.componetList,function(object){ - if(object.id.match(clickedId)){ - newValue = false; - } + if (dataValue.id) { + var clickedId = dataValue.id; + } + _.each(this.componetList, function(object) { + if (object.id.match(clickedId)) { + newValue = false; + } }); - if(this.componetList.length <= 3 && newValue){ - if(dataValue.host && dataValue.component){ - var host = dataValue.host; - var component = dataValue.component; - var spanLength = this.$('.compare .panel-body span.hasNode'); - if(spanLength.length != 0 && spanLength.length >= 1){ - this.componetList.push({'host':host,'component':component,id:clickedId}); - this.$('.compare .panel-body .hostCompList').append('<span class="hasNode" data-id="'+clickedId+'"><i class=" closeComponent fa fa-times-circle"></i>'+host.split(".")[0]+' <i class="fa fa-angle-double-right"></i><br> '+component+'</span>'); - }else{ - this.componetList.push({'host':host,'component':component,id:clickedId}); - this.$('.compare .panel-body .hostCompList').html('<span class="hasNode" data-id="'+clickedId+'"><i class=" closeComponent fa fa-times-circle"></i>'+host.split(".")[0]+' <i class="fa fa-angle-double-right"></i><br> '+component+'</span>'); - } - } + if (this.componetList.length >= 4) { + if (newValue) { + Utils.alertPopup({ + msg: "Currently only four components comparison supported." + }); + return; + } } + if (this.componetList.length <= 3 && newValue) { + if (dataValue.host && (dataValue.component || dataValue.node)) { + var host = dataValue.host; + var component = dataValue.component || dataValue.node; + var spanLength = this.$('.compare .panel-body span.hasNode'); + if (spanLength.length != 0 && spanLength.length >= 1) { + this.componetList.push({ 'host': host, 'component': component, id: clickedId }); + this.$('.compare .panel-body .hostCompList').append('<span class="hasNode" data-id="' + clickedId + '"><i class=" closeComponent fa fa-times-circle"></i>' + host.split(".")[0] + ' <i class="fa fa-angle-double-right"></i><br> ' + component + '</span>'); + } else { + this.componetList.push({ 'host': host, 'component': component, id: clickedId }); + this.$('.compare .panel-body .hostCompList').html('<span class="hasNode" data-id="' + clickedId + '"><i class=" closeComponent fa fa-times-circle"></i>' + host.split(".")[0] + ' <i class="fa fa-angle-double-right"></i><br> ' + component + '</span>'); + } + } + } + this.quickMenuCompare = false; }, onCompareButtonClick:function(){ if(this.componetList.length == 1){ @@ -505,25 +534,25 @@ define(['require', msg: "Minimum two components are required for comparison. Please select one more component and try again." }); }else{ - var dateRangeLabel ='Last 1 Hour'; - var dateObj = this.dateUtil.getRelativeDateFromString(dateRangeLabel); + var dateRangeLabel ='Last 1 Hour'; + var dateObj = this.dateUtil.getRelativeDateFromString(dateRangeLabel); - if (this.RHierarchyTab.currentView && this.RHierarchyTab.currentView.defaultParams) { - var dateParams = this.RHierarchyTab.currentView.defaultParams; - if (!_.isUndefined(dateParams) && _.isObject(dateParams)) { - dateObj = { - from: dateParams.from, - to: dateParams.to, - dateRangeLabel: dateParams.dateRangeLabel - }; - } - } + if (this.RHierarchyTab.currentView && this.RHierarchyTab.currentView.defaultParams) { + var dateParams = this.RHierarchyTab.currentView.defaultParams; + if (!_.isUndefined(dateParams) && _.isObject(dateParams)) { + dateObj = { + from: dateParams.from, + to: dateParams.to, + dateRangeLabel: dateParams.dateRangeLabel + }; + } + } - this.globalVent.trigger("render:comparison:tab",{ - params: dateObj, - componetList:this.componetList, - globalVent : this.globalVent - }); + this.globalVent.trigger("render:comparison:tab",{ + params: dateObj, + componetList:this.componetList, + globalVent : this.globalVent + }); } this.togglePanelPosition(false,false) }, @@ -562,9 +591,6 @@ define(['require', clickedIndex = i + 1; } }); - if(fromEvent){ - this.tabcheckBoxSelectDeselect(this.$('div[role="tabpanel"] ul').find('li[data-id="'+clickedId+'"] div.compareClick'),true) - } if (clickedIndex) { this.componetList.splice(clickedIndex - 1, 1); if(this.componetList.length == 0){ @@ -573,7 +599,9 @@ define(['require', this.togglePanelPosition(false,true); } } - + if(fromEvent){ + this.tabcheckBoxSelectDeselect(this.$('div[role="tabpanel"] ul').find('li[data-id="'+clickedId+'"] div.compareClick'),true) + } } }, bindTabClickListener:function(){ http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1719ee/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dialog/SaveSearchFilterView.js ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dialog/SaveSearchFilterView.js b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dialog/SaveSearchFilterView.js index 6f3812c..fc44f61 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dialog/SaveSearchFilterView.js +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dialog/SaveSearchFilterView.js @@ -78,17 +78,16 @@ define(['require', showParams: function() { var tableSting = "", that = this; - - _.each(this.params, function(value, key) { - if ((key != "from" && (! _.isEmpty(value) || value != "[]") && key != "to" && key != "bundleId" && key != "start_time" && + var customParam = {"mustNot":[],"mustBe":[],"includeQuery":[],"excludeQuery":[]}; + var paramNames = _.extend({},this.params,customParam); + _.each(paramNames, function(value, key) { + if ((key != "from" && (! _.isEmpty(value) || _.isArray(value)) && key != "to" && key != "bundleId" && key != "start_time" && key != "end_time" && key != "q" && key != "unit" && key != "query" && key != "type" && key != "time" && key != "dateRangeLabel" && key != "advanceSearch" && !_.isUndefined(Globals.paramsNameMapping[key]) )) { tableSting += '<tr class="' + key + '"><td>' + Globals.paramsNameMapping[key].label + '</td><td>' + (that.createInnerSpan(key)) + '</td><tr>' } - }) - this.ui.paramsPanelBody.html(tableSting) - - + }); + this.ui.paramsPanelBody.html(tableSting); }, createInnerSpan: function(type) { var typeString = "", @@ -100,7 +99,7 @@ define(['require', ((type == "level") ? (",") : ("")); }); } - return ((typeString.length == 0) ? ("-") : ((type == "level") ? ((typeString).slice(0, -1)) : (typeString))) + return ((typeString.length == 0) ? ("[ ]") : ((type == "level") ? ((typeString).slice(0, -1)) : (typeString))) }, popoverForTd: function() { this.ui.paramsPanelBody.find('td:nth-child(2) span').map(function() { http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1719ee/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 6144f9d..e2b2457 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 @@ -237,11 +237,11 @@ define(['require', 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 + for(var k = 0 ;k < Obj.values.length ;k++){ + if(moment(date).isAfter(that.dateUtil.getMomentObject(Obj.values[k].x))){ + newObj[k] = { + x : that.dateUtil.getMomentObject(Obj.values[k].x), + y : Obj.values[k].y } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1719ee/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 d9ad79b..6c6a77e 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 @@ -153,7 +153,6 @@ define(['require', onRender : function(){ //this.renderTreeView(); this.fetchServiceLogsColumns(); - this.renderBubbleTableView(); this.renderLogLevel(); this.renderEventHistory(); this.renderHistogram(); @@ -184,6 +183,7 @@ define(['require', }, complete : function(){ that.renderServiceColumnsVSSearch(); + that.renderBubbleTableView(); } }); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1719ee/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/tabs/LogFileView.js ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/tabs/LogFileView.js b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/tabs/LogFileView.js index 4b698e7..6932355 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/tabs/LogFileView.js +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/tabs/LogFileView.js @@ -599,18 +599,7 @@ define(['require', }, initializeContextMenu: function() { var that = this; - this.$(".logMessage").on('mouseup contextmenu', function(e) { - var selection; - e.stopPropagation(); - if (window.getSelection) { - selection = window.getSelection(); - } else if (document.selection) { - selection = document.selection.createRange(); - } - setTimeout(function() { - that.selectionCallBack(selection, e) - }, 1); - }); + $('body').on("mouseup.contextMenuLogFile", function(e) { var selection; if (window.getSelection) { @@ -623,6 +612,19 @@ define(['require', } }); + + this.$(".logMessage").on('mouseup contextmenu', function(e) { + var selection; + e.stopPropagation(); + + var range = window.getSelection().getRangeAt(0); + var selectionContents = range.cloneContents(); + selection = selectionContents.textContent; + + setTimeout(function() { + that.selectionCallBack(selection, e) + }, 1); + }); }, selectionCallBack: function(selection, e) { this.RLogFileTable.currentView.$el.removeHighlight(true); @@ -795,7 +797,7 @@ define(['require', that.ui.next.trigger("click"); that.pageNotification(); }, - error: function(col, response, errorThrown) { + error: function(col, xhr, errorThrown) { that.resetFindParams(); if (!!errorThrown.xhr.getAllResponseHeaders()) { // Utils.notifyInfo({ content: "Keyword '" + val + "' not found in " + (keywordType == 1 ? "next" : "previous") + " page !" }); http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1719ee/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/troubleshoot/TroubleShootLayoutView.js ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/troubleshoot/TroubleShootLayoutView.js b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/troubleshoot/TroubleShootLayoutView.js index 85a2005..3ed84b3 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/troubleshoot/TroubleShootLayoutView.js +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/troubleshoot/TroubleShootLayoutView.js @@ -445,12 +445,10 @@ define(['backbone', }else if(max < 3){ setMinHeight = true } - if(setMinHeight){ - chart.height("100"); + chart.height("200"); } } - chart.tooltip.enabled(); chart.yAxis .tickFormat(d3.format('d')); http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1719ee/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/styles/style.css ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/styles/style.css b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/styles/style.css index 68f7de1..45e9144 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/styles/style.css +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/styles/style.css @@ -1,3 +1,4 @@ + /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -866,7 +867,7 @@ div.columnmanager-visibilitycontrol { overflow: visible; text-overflow: clip; white-space: pre-wrap; - word-break: break-word; + /* word-break: break-word;*/ } /* Side Panel */ @@ -1370,24 +1371,25 @@ body { display: none; } -.saveFilterTable tr { +table.saveFilterTable tr { width: 100%; display: block; } -.saveFilterTable tr td:first-child { +table.saveFilterTable tr td:first-child { width: 20%; text-align: right; display: inline-block; } -.saveFilterTable tr td { +table.saveFilterTable tr td { width: 80%; display: inline-block; text-align: left; + white-space: normal; } -.saveFilterTable,.saveFilterTable tbody { +table.saveFilterTable,.saveFilterTable tbody { display: block; } @@ -2878,7 +2880,6 @@ td.filterName { } .mapDropDown:active { - position: relative; top: 2px; left: 2px; } @@ -2908,4 +2909,29 @@ td.filterName { .box-contentHost:before, .box-contentHost:after { content: ""; display: table; +} +table.backgrid{ + overflow: auto !important; +} +button.defaultBtn{ + color: #ffffff !important; + background-color: #006dcc !important; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)) !important; + background-image: -webkit-linear-gradient(top, #0088cc, #0044cc) !important; + background-image: -o-linear-gradient(top, #0088cc, #0044cc) !important; + background-image: linear-gradient(to bottom, #0088cc, #0044cc) !important; + background-image: -moz-linear-gradient(top, #0088cc, #0044cc) !important; +} +button.defaultCancelBtn{ + color: #333333 !important; + background-color: #ffffff; +} +ul.user-profile{ + list-style: none; + margin: 0; + -webkit-padding-start: 0; +} +ul.user-profile i{ + font-size: 26px; + margin-right: 20px; } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1719ee/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/styles/style_v2.css ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/styles/style_v2.css b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/styles/style_v2.css index f0e6b09..33a188d 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/styles/style_v2.css +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/styles/style_v2.css @@ -781,6 +781,7 @@ ul.DTTT_dropdown.dropdown-menu > li:hover > a { } .btn i { vertical-align: middle; + pointer-events:none; } .btn-app { width: 50px; @@ -956,7 +957,7 @@ ul.DTTT_dropdown.dropdown-menu > li:hover > a { *background-color: #d9d9d9; /* Buttons in IE7 don't get borders, so darken on hover */ - background-position: 0 -15px; + background-position: 0 -30px; -webkit-transition: background-position 0.1s linear; -moz-transition: background-position 0.1s linear; -o-transition: background-position 0.1s linear; @@ -2100,7 +2101,7 @@ button.btn.btn-xs{ padding: 0 15px; } .btn + .dropdown-menu { - margin-top: -10px; + margin-top: -48px; background: rgba(0, 0, 0, 0.7) !important; padding: 0; border: 0; right: 0; left: auto; http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1719ee/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/audit/AuditAggregatedView_tmpl.html ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/audit/AuditAggregatedView_tmpl.html b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/audit/AuditAggregatedView_tmpl.html index bc47e3e..46c21f0 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/audit/AuditAggregatedView_tmpl.html +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/audit/AuditAggregatedView_tmpl.html @@ -33,14 +33,14 @@ <div align="center" style="font-weight: 500;">Top Ten Users</div> <div data-id="topUsersGraph"> <div data-id="usersLoader">Loading...</div> - <svg style="height:250px"></svg> + <svg style="min-height:250px"></svg> </div> </div> <div class="col-md-6"> <div align="center" style="font-weight: 500;">Top Ten Resources</div> <div data-id="topResourcesGraph"> <div data-id="resourcesLoader">Loading...</div> - <svg style="height:250px"></svg> + <svg style="min-height:250px"></svg> </div> </div> </div> http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1719ee/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/audit/AuditTabLayoutView_tmpl.html ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/audit/AuditTabLayoutView_tmpl.html b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/audit/AuditTabLayoutView_tmpl.html index 1c8412d..c58da1d 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/audit/AuditTabLayoutView_tmpl.html +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/audit/AuditTabLayoutView_tmpl.html @@ -73,7 +73,7 @@ class="fa fa-spinner fa-spin"></i> </span> <a data-id="refresh-tab-audit" class=""> <i class="fa fa-refresh"></i></a> - <a class="collapse-link"> <i class="fa fa-chevron-up"></i></a> + <a class="collapse-link chkArrow"> <i class="fa fa-chevron-up"></i></a> </div> <div class="no-move"></div> </div> http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1719ee/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/troubleshoot/TroubleShootLayoutView_tmpl.html ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/troubleshoot/TroubleShootLayoutView_tmpl.html b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/troubleshoot/TroubleShootLayoutView_tmpl.html index 85a5364..f72a7dd 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/troubleshoot/TroubleShootLayoutView_tmpl.html +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/templates/troubleshoot/TroubleShootLayoutView_tmpl.html @@ -106,7 +106,7 @@ <div data-id="topUsersGraph"> <div data-id="usersLoader">Loading...</div> - <svg style="height: 250px"></svg> + <svg style="min-height: 250px"></svg> </div> </div> </div> @@ -122,7 +122,7 @@ <div class="box-content"> <div data-id="serviceLoadGraph"> <div data-id="serviceLoadLoader">Loading...</div> - <svg style="height: 250px"></svg> + <svg style="min-height: 250px"></svg> </div> </div> </div>
