Skip to content

Commit a74d9ac

Browse files
committed
修复报警天数的限制
1 parent af85a2f commit a74d9ac

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ambari-web/app/models/alerts/alert_definition.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ App.AlertDefinition = DS.Model.extend({
110110
*/
111111
lastTriggeredAgoFormatted: function () {
112112
var lastTriggered = this.get('lastTriggeredRaw');
113-
return lastTriggered ? $.timeago(new Date(lastTriggered)) : '';
113+
return lastTriggered ? ((($.timeago(new Date(lastTriggered))).replace(/days ago/g,"天前")).replace(/hours ago/g,"小时前")).replace(/about a day ago/g,"大约一天前"): '';
114114
}.property('lastTriggeredRaw'),
115115

116116
lastTriggeredVerboseDisplay: function () {

ambari-web/app/models/alerts/alert_instance.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ App.AlertInstance = DS.Model.extend({
9797
*/
9898
lastTriggeredAgoFormatted: function () {
9999
var lastTriggered = this.get('originalRawTimestamp');
100-
return lastTriggered ? $.timeago(new Date(lastTriggered)) : '';
100+
return lastTriggered ? ((($.timeago(new Date(lastTriggered))).replace(/days ago/g,"天前")).replace(/hours ago/g,"小时前")).replace(/about a day ago/g,"大约一天前"): '';
101101
}.property('originalTimestamp'),
102102

103103
lastTriggeredVerboseDisplay: function () {

0 commit comments

Comments
 (0)