You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by to...@apache.org on 2018/07/25 20:27:44 UTC

[ambari] branch branch-2.7 updated: [AMBARI-24354] [Log Search UI] wrong filter label on open log tab (#1880)

This is an automated email from the ASF dual-hosted git repository.

tobiasistvan pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new b8461bf  [AMBARI-24354] [Log Search UI] wrong filter label on open log tab (#1880)
b8461bf is described below

commit b8461bf951fc9175f95ac2a434ef03d4ff534325
Author: Istvan Tobias <to...@gmail.com>
AuthorDate: Wed Jul 25 22:27:42 2018 +0200

    [AMBARI-24354] [Log Search UI] wrong filter label on open log tab (#1880)
    
    (cherry picked from commit 6917b7146437f66f00a2d52ff7d0da8c213da3df)
---
 .../src/app/services/logs-filtering-utils.service.ts              | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/logs-filtering-utils.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/logs-filtering-utils.service.ts
index 4879930..185a480 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/logs-filtering-utils.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/logs-filtering-utils.service.ts
@@ -435,9 +435,13 @@ export class LogsFilteringUtilsService {
                 });
               } else {
                 Object.assign(timeRangeParams, {
-                  timeRangeInterval: timeRangeValue.interval,
                   timeRangeUnit: timeRangeValue.unit
                 });
+                if (timeRangeValue.interval !== undefined) {
+                  Object.assign(timeRangeParams, {
+                    timeRangeInterval: timeRangeValue.interval
+                  });
+                }
               }
               Object.assign(newParams, timeRangeParams);
             }
@@ -493,7 +497,7 @@ export class LogsFilteringUtilsService {
           break;
         case 'timeRangeType':
           const type = params.timeRangeType || 'LAST';
-          const interval = parseInt(params.timeRangeInterval, 0);
+          const interval = params.timeRangeInterval && parseInt(params.timeRangeInterval, 0);
           const unit = params.timeRangeUnit;
           const timeRangeFilterValue: {[key: string]: any} = {type, unit, interval};
           let timeRangeFilterLabel = 'filter.timeRange.';