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:15 UTC

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

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

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


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

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

    [AMBARI-24354] [Log Search UI] wrong filter label on open log tab (#1879)
---
 .../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.';