You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2018/07/24 10:35:28 UTC

[ambari] branch branch-2.7 updated: AMBARI-24339 Background Operations: minor UX changes

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

atkach 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 40604da  AMBARI-24339 Background Operations: minor UX changes
40604da is described below

commit 40604da75c3d8e741c904cb77c1cd2a622c36534
Author: Andrii Tkach <at...@apache.org>
AuthorDate: Mon Jul 23 18:12:09 2018 +0300

    AMBARI-24339 Background Operations: minor UX changes
---
 ambari-web/app/utils/date/date.js           | 9 ++++-----
 ambari-web/app/utils/host_progress_popup.js | 2 +-
 ambari-web/test/utils/date/date_test.js     | 6 +++---
 3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/ambari-web/app/utils/date/date.js b/ambari-web/app/utils/date/date.js
index f3cb205..e5afbf0 100644
--- a/ambari-web/app/utils/date/date.js
+++ b/ambari-web/app/utils/date/date.js
@@ -149,7 +149,7 @@ module.exports = {
   },
 
   /**
-   * Format: "{#days}d {#hours}h {#minutes}m {#seconds}s {#milliseconds}ms"
+   * Format: "{#days}d {#hours}h {#minutes}m {#seconds}s"
    * Example: "1d 3h 46m"
    *
    * Display optimization rules:
@@ -176,7 +176,7 @@ module.exports = {
     const oneMinMs = 60000;
     const oneHourMs = 3600000;
     const oneDayMs = 86400000;
-    let days, hours, minutes, seconds, milliseconds;
+    let days, hours, minutes, seconds;
 
     [days, time] = this.extractTimeUnit(time, oneDayMs, 'd');
     [hours, time] = this.extractTimeUnit(time, oneHourMs, 'h');
@@ -185,9 +185,8 @@ module.exports = {
     if (fullTime < oneDayMs) {
       [seconds, time] = this.extractTimeUnit(time, oneSecMs, 's');
       duration += seconds;
-      if (fullTime < oneMinMs) {
-        [milliseconds, time] = this.extractTimeUnit(time, 1, 'ms');
-        duration += milliseconds;
+      if (fullTime < oneSecMs) {
+        duration += '1s';
       }
     }
 
diff --git a/ambari-web/app/utils/host_progress_popup.js b/ambari-web/app/utils/host_progress_popup.js
index 1e34560..ecfaa0c 100644
--- a/ambari-web/app/utils/host_progress_popup.js
+++ b/ambari-web/app/utils/host_progress_popup.js
@@ -192,7 +192,7 @@ App.HostPopup = Em.Object.create({
    */
   abortIcon: Em.View.extend({
     tagName: 'a',
-    classNames: ['action', 'abort-icon'],
+    classNames: ['abort-icon'],
     template: Em.Handlebars.compile('<span class="icon icon-remove-circle"></span>'),
     click: function () {
       this.get('controller').abortRequest(this.get('servicesInfo'));
diff --git a/ambari-web/test/utils/date/date_test.js b/ambari-web/test/utils/date/date_test.js
index 1168f3b..4e65c03 100644
--- a/ambari-web/test/utils/date/date_test.js
+++ b/ambari-web/test/utils/date/date_test.js
@@ -88,10 +88,10 @@ describe('date', function () {
   describe('#timingFormat', function() {
     var tests = Em.A([
       {i: '0', e:'0s'},
-      {i: '1', e:'1ms'},
-      {i: '999', e:'999ms'},
+      {i: '1', e:'1s'},
+      {i: '999', e:'1s'},
       {i: '1000', e:'1s'},
-      {i: '59999', e:'59s 999ms'},
+      {i: '59999', e:'59s'},
       {i: '60000', e:'1m'},
       {i: '61001', e:'1m 1s'},
       {i: '3599999', e:'59m 59s'},