You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/12/02 18:10:53 UTC
ambari git commit: AMBARI-14158. BG operation window: Running task
shows duration with negative value
Repository: ambari
Updated Branches:
refs/heads/branch-2.1 b5cff6fee -> 7061caeae
AMBARI-14158. BG operation window: Running task shows duration with negative value
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7061caea
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7061caea
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7061caea
Branch: refs/heads/branch-2.1
Commit: 7061caeae34e3a617066baed1248aece7b2310c5
Parents: b5cff6f
Author: Alex Antonenko <hi...@gmail.com>
Authored: Wed Dec 2 19:08:11 2015 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Wed Dec 2 19:10:47 2015 +0200
----------------------------------------------------------------------
ambari-web/app/utils/date/date.js | 5 +++--
.../slider/src/main/resources/ui/app/models/config_property.js | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/7061caea/ambari-web/app/utils/date/date.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/date/date.js b/ambari-web/app/utils/date/date.js
index 5541d22..877b421 100644
--- a/ambari-web/app/utils/date/date.js
+++ b/ambari-web/app/utils/date/date.js
@@ -131,13 +131,14 @@ module.exports = {
return Em.I18n.t('common.na');
}
if (endDate.getFullYear() != 1969 && endTimestamp > 0) {
- return '' + this.timingFormat(endTimestamp - startTimestamp, 1); //lasted for xx secs
+ durationSummary = '' + this.timingFormat(endTimestamp - startTimestamp, 1);
+ return durationSummary.contains('-') ? Em.I18n.t('common.na') : durationSummary; //lasted for xx secs
} else {
// still running, duration till now
var time = (App.dateTimeWithTimeZone() - startTimestamp) < 0 ? 0 : (App.dateTimeWithTimeZone() - startTimestamp);
durationSummary = '' + this.timingFormat(time, 1);
}
- return durationSummary;
+ return durationSummary.contains('-') ? Em.I18n.t('common.na') : durationSummary;
},
/**
http://git-wip-us.apache.org/repos/asf/ambari/blob/7061caea/contrib/views/slider/src/main/resources/ui/app/models/config_property.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/models/config_property.js b/contrib/views/slider/src/main/resources/ui/app/models/config_property.js
index cb92aad..625dfec 100644
--- a/contrib/views/slider/src/main/resources/ui/app/models/config_property.js
+++ b/contrib/views/slider/src/main/resources/ui/app/models/config_property.js
@@ -37,7 +37,7 @@ App.ConfigProperty = Em.Object.extend({
}
}.property('viewType'),
className: function () {
- return "value-for-" + this.get('label').replace('.', '-');
+ return "value-for-" + this.get('label').replace(/\./g, "-");
}.property('viewType'),
readOnly: false,
//used for config with "select" view