Author: yusaku
Date: Fri Jan 11 02:13:25 2013
New Revision: 1431809
URL: http://svn.apache.org/viewvc?rev=1431809&view=rev
Log:
AMBARI-1145. Cluster Management refactoring. (yusaku)
Modified:
incubator/ambari/trunk/ambari-web/app/assets/data/hosts/hosts.json
incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js
incubator/ambari/trunk/ambari-web/app/controllers/main/host/details.js
incubator/ambari/trunk/ambari-web/app/controllers/wizard.js
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
incubator/ambari/trunk/ambari-web/app/mappers/runs_mapper.js
incubator/ambari/trunk/ambari-web/app/models/host.js
incubator/ambari/trunk/ambari-web/app/styles/application.less
incubator/ambari/trunk/ambari-web/app/templates/main/apps.hbs
incubator/ambari/trunk/ambari-web/app/templates/main/host.hbs
incubator/ambari/trunk/ambari-web/app/templates/main/host/details.hbs
incubator/ambari/trunk/ambari-web/app/templates/main/host/summary.hbs
incubator/ambari/trunk/ambari-web/app/utils/graph.js
incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js
incubator/ambari/trunk/ambari-web/app/views/main/apps_view.js
incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hbase.js
incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hdfs.js
incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/mapreduce.js
incubator/ambari/trunk/ambari-web/app/views/main/service/info/summary.js
Modified: incubator/ambari/trunk/ambari-web/app/assets/data/hosts/hosts.json
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/assets/data/hosts/hosts.json?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/assets/data/hosts/hosts.json
(original)
+++ incubator/ambari/trunk/ambari-web/app/assets/data/hosts/hosts.json Fri Jan
11 02:13:25 2013
@@ -937,7 +937,7 @@
"loginFailure_avg_time" : 0.0
},
"disk" : {
- "disk_total" : 893.765,
+ "disk_total" : 0,
"disk_free" : 845.624
},
"cpu" : {
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js
(original)
+++
incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js
Fri Jan 11 02:13:25 2013
@@ -316,7 +316,7 @@ App.ClusterController = Em.Controller.ex
}
var clusterUrl = this.getUrl('/data/clusters/cluster.json',
'?fields=Clusters');
- var hostsUrl = this.getUrl('/data/hosts/hosts.json',
'/hosts?fields=Hosts,host_components');
+ var hostsUrl = this.getUrl('/data/hosts/hosts.json',
'/hosts?fields=Hosts,host_components,metrics/cpu,metrics/disk,metrics/load,metrics/memory');
var usersUrl = App.testMode ? '/data/users/users.json' : App.apiPrefix +
'/users/?fields=*';
var racksUrl = "/data/racks/racks.json";
Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/host/details.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/host/details.js?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/host/details.js
(original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/host/details.js Fri
Jan 11 02:13:25 2013
@@ -264,7 +264,7 @@ App.MainHostDetailsController = Em.Contr
timeout: App.timeout,
success: function(){
var view = self.get('view');
- view.loadDecommisionNodesList();
+ view.loadDecommissionNodesList();
}
};
jQuery.ajax(persistPutAjax);
Modified: incubator/ambari/trunk/ambari-web/app/controllers/wizard.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard.js?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/wizard.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/wizard.js Fri Jan 11
02:13:25 2013
@@ -380,7 +380,10 @@ App.WizardController = Em.Controller.ext
},
clear: function () {
- this.set('content', Ember.Object.create({'controllerName':
this.get('content.controllerName')}));
+ this.set('content', Ember.Object.create({
+ 'controllerName': this.get('content.controllerName'),
+ 'isWizard': !(this.get('content.controllerName') ===
'installerController')
+ }));
this.set('currentStep', 0);
this.clearStorageData();
},
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js
(original)
+++
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js
Fri Jan 11 02:13:25 2013
@@ -50,6 +50,14 @@ App.WizardStep2Controller = Em.Controlle
updateHostNameArr: function(){
this.hostNameArr = this.get('hostNames').trim().split(new RegExp("\\s+",
"g"));
this.patternExpression();
+ var installedHostNames = App.Host.find().mapProperty('hostName');
+ var tempArr = [];
+ for (i = 0; i < this.hostNameArr.length; i++) {
+ if (!installedHostNames.contains(this.hostNameArr[i])) {
+ tempArr.push(this.hostNameArr[i]);
+ }
+ }
+ this.set('hostNameArr', tempArr);
},
isAllHostNamesValid: function () {
@@ -146,6 +154,11 @@ App.WizardStep2Controller = Em.Controlle
this.updateHostNameArr();
+ if (!this.hostNameArr.length) {
+ this.set('hostsError',
Em.I18n.t('installer.step2.hostName.error.required'));
+ return false;
+ }
+
if(this.isPattern)
{
this.hostNamePatternPopup(this.hostNameArr);
@@ -243,14 +256,7 @@ App.WizardStep2Controller = Em.Controlle
}.property('hostsError', 'sshKeyError'),
saveHosts: function(){
- var installedHosts = App.Host.find();
- var newHosts = this.getHostInfo();
- for (var host in newHosts) {
- if (installedHosts.someProperty('hostName', host)) {
- delete newHosts[host]
- }
- }
- this.set('content.hosts', newHosts);
+ this.set('content.hosts', this.getHostInfo());
App.router.send('next');
}
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
(original)
+++
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
Fri Jan 11 02:13:25 2013
@@ -947,7 +947,6 @@ App.WizardStep8Controller = Em.Controlle
var masterHosts = this.get('content.masterComponentHosts');
var slaveHosts = this.get('content.slaveComponentHosts');
var clients = this.get('content.clients');
- var clientHosts = slaveHosts.filterProperty('componentName',
"CLIENT").objectAt(0).hosts;
// note: masterHosts has 'component' vs slaveHosts has 'componentName'
var masterComponents = masterHosts.mapProperty('component').uniq();
@@ -962,9 +961,9 @@ App.WizardStep8Controller = Em.Controlle
var hostNames = _slave.hosts.filterProperty('isInstalled',
false).mapProperty('hostName');
this.registerHostsToComponent(hostNames, _slave.componentName);
} else {
- this.get('content.clients').forEach(function (_client) {
- if (!_client.isInstalled) {
- var hostNames = clientHosts.mapProperty('hostName').splice(0);
+ clients.forEach(function (_client) {
+
+ var hostNames = _slave.hosts.mapProperty('hostName');
switch (_client.component_name) {
case 'HDFS_CLIENT':
// install HDFS_CLIENT on HBASE_MASTER, HBASE_REGIONSERVER,
and WEBHCAT_SERVER hosts
@@ -1013,8 +1012,19 @@ App.WizardStep8Controller = Em.Controlle
break;
}
hostNames = hostNames.uniq();
+
+ if(_client.isInstalled){
+ //check whether clients are already installed on selected master
hosts!!!
+ var installedHosts = _slave.hosts.filterProperty('isInstalled',
true).mapProperty('hostName');
+ installedHosts.forEach(function(host){
+ if(hostNames.contains(host)){
+ hostNames.splice(hostNames.indexOf(host), 1);
+ }
+ }, this);
+ }
+
this.registerHostsToComponent(hostNames, _client.component_name);
- }
+
}, this);
}
}, this);
Modified: incubator/ambari/trunk/ambari-web/app/mappers/runs_mapper.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/mappers/runs_mapper.js?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/mappers/runs_mapper.js (original)
+++ incubator/ambari/trunk/ambari-web/app/mappers/runs_mapper.js Fri Jan 11
02:13:25 2013
@@ -37,7 +37,9 @@ App.runsMapper = App.QuickDataMapper.cre
item.targets.forEach(function(target) {
r += '"' + target + '",';
});
- r = r.substr(0, r.length - 1);
+ if(item.targets.length){
+ r = r.substr(0, r.length - 1);
+ }
} else {
r += item.source;
}
Modified: incubator/ambari/trunk/ambari-web/app/models/host.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/models/host.js?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/models/host.js (original)
+++ incubator/ambari/trunk/ambari-web/app/models/host.js Fri Jan 11 02:13:25
2013
@@ -86,12 +86,22 @@ App.Host = DS.Model.extend({
* Format diskUsage to float with 2 digits
*/
diskUsageFormatted: function() {
+ if (isNaN(this.get('diskUsage')) || this.get('diskUsage') < 0) {
+ return 'Data Unavailable';
+ }
var s = Math.round(this.get('diskUsage') * Math.pow(10, 2)) / Math.pow(10,
2);
if (isNaN(s)) {
s = 0;
}
return s + '%';
}.property('diskUsage'),
+
+ diskInfoBar: function() {
+ if (isNaN(this.get('diskUsage')) || this.get('diskUsage') < 0) {
+ return this.get('diskUsageFormatted');
+ }
+ return this.get('diskUsedFormatted') + '/' +
this.get('diskTotalFormatted') + ' (' + this.get('diskUsageFormatted') + '
used)';
+ }.property('diskUsedFormatted', 'diskTotalFormatted'),
/**
* formatted bytes to appropriate value
*/
Modified: incubator/ambari/trunk/ambari-web/app/styles/application.less
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/styles/application.less?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/styles/application.less (original)
+++ incubator/ambari/trunk/ambari-web/app/styles/application.less Fri Jan 11
02:13:25 2013
@@ -220,6 +220,10 @@ h1 {
text-align: left;
}
+.popover {
+ z-index: 1050;
+}
+
#installer, #add-host, #add-service {
h2 {
margin-top: 0;
@@ -1413,40 +1417,36 @@ a:focus {
margin-top:-12px !important;
}
}
- .health-status-started, .health-status-starting {
- background-image: @status-live-marker;
+ .marker {
background-repeat: no-repeat;
display: inline-block;
height: 13px;
width: 13px;
}
+ .health-status-started, .health-status-starting {
+ background-image: @status-live-marker;
+ .marker;
+ }
.health-status-installed, .health-status-stopping {
background-image: @status-dead-marker;
- background-repeat: no-repeat;
- display: inline-block;
- height: 13px;
- width: 13px;
+ .marker;
}
.health-status-LIVE {
background-image: @status-live-marker;
- background-repeat: no-repeat;
- background-position: 0px 4px;
+ .marker;
}
.health-status-DEAD {
background-image: @status-dead-marker;
- background-repeat: no-repeat;
- background-position: 0px 4px;
+ .marker;
}
.health-status-DEAD-ORANGE {
background-image: @status-dead-orange-marker;
- background-repeat: no-repeat;
- background-position: 0px 4px;
+ .marker;
}
.health-status-DEAD-YELLOW {
background-image: @status-dead-yellow-marker;
- background-repeat: no-repeat;
- background-position: 0px 4px;
+ .marker;
}
.back {
display: block;
Modified: incubator/ambari/trunk/ambari-web/app/templates/main/apps.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/apps.hbs?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/apps.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/apps.hbs Fri Jan 11
02:13:25 2013
@@ -27,6 +27,7 @@
<td>Duration</td>
<td>Oldest</td>
<td>Most Recent</td>
+ <td></td>
</tr>
<tr class="avg-info">
<td>{{view.avgData.jobs.avg}}</td>
@@ -35,6 +36,7 @@
<td>{{view.avgData.duration.avg}}</td>
<td>{{view.avgData.times.oldest}}</td>
<td>{{view.avgData.times.youngest}}</td>
+ <td>Avg</td>
</tr>
<tr class="compare-info">
<td>{{view.avgData.jobs.min}} / {{view.avgData.jobs.max}}</td>
@@ -43,6 +45,7 @@
<td>{{view.avgData.duration.min}} / {{view.avgData.duration.max}}</td>
<td></td>
<td></td>
+ <td>Min / Max</td>
</tr>
</tbody>
</table>
Modified: incubator/ambari/trunk/ambari-web/app/templates/main/host.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/host.hbs?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/host.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/host.hbs Fri Jan 11
02:13:25 2013
@@ -69,7 +69,7 @@
<td>{{host.cpu}}</td>
<td>{{host.memoryFormatted}}</td>
<td>
- <div class="progress progress-info" title="{{unbound
host.diskUsedFormatted}} / {{unbound host.diskTotalFormatted}} ({{unbound
host.diskUsageFormatted}} used)">
+ <div class="progress progress-info" title="{{unbound
host.diskInfoBar}}">
<div class="bar" {{bindAttr style="view.usageStyle"}}></div>
</div>
</td>
Modified: incubator/ambari/trunk/ambari-web/app/templates/main/host/details.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/host/details.hbs?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/host/details.hbs
(original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/host/details.hbs Fri
Jan 11 02:13:25 2013
@@ -17,7 +17,7 @@
}}
<div id="host-details">
- <div {{bindAttr class=":host-title view.content.healthClass"}}>{{unbound
view.content.publicHostName}}</div>
+ <span {{bindAttr class="view.content.healthClass"}}></span><span
class='host-title'>{{unbound view.content.publicHostName}}</span>
<div><a href="javascript:void(null)" data-toggle="modal" {{action
backToHostsList}}><i class="icon-arrow-left"></i> Back to Hosts</a></div>
<!-- {{#if controller.isAdmin}} -->
<!-- <div class="host-maintenance"> -->
Modified: incubator/ambari/trunk/ambari-web/app/templates/main/host/summary.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/host/summary.hbs?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/host/summary.hbs
(original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/host/summary.hbs Fri
Jan 11 02:13:25 2013
@@ -47,7 +47,7 @@
<div class="host-components">
{{#each component in view.sortedComponents}}
<div class="row-fluid">
- {{#view view.ComponentView contentBinding="component"}}
+ {{#view view.ComponentView contentBinding="component"
decommissionDataNodeHostNamesBinding="view.decommissionDataNodeHostNames"}}
<div class="span8">
<span {{bindAttr class="view.statusClass
:components-health"}}></span>
{{component.displayName}} /
Modified: incubator/ambari/trunk/ambari-web/app/utils/graph.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/utils/graph.js?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/utils/graph.js (original)
+++ incubator/ambari/trunk/ambari-web/app/utils/graph.js Fri Jan 11 02:13:25
2013
@@ -18,6 +18,19 @@
module.exports = {
+ uniformSeries: function () {
+ var series_min_length = 100000000;
+ for (i=0; i<arguments.length; i++) {
+ if (arguments[i].length < series_min_length) {
+ series_min_length = arguments[i].length;
+ }
+ }
+ for (i=0; i<arguments.length; i++) {
+ if (arguments[i].length > series_min_length) {
+ arguments[i].length = series_min_length;
+ }
+ }
+ },
drawJobTimeLine:function (map, shuffle, reduce, w, h, element, legend_id,
timeline_id) {
map = $.parseJSON(map);
shuffle = $.parseJSON(shuffle);
@@ -26,7 +39,7 @@ module.exports = {
console.warn('drawJobTimeLine');
return;
}
-
+ this.uniformSeries(map, reduce, shuffle);
var graph = new Rickshaw.Graph({
width:w,
height:h,
@@ -108,6 +121,7 @@ module.exports = {
console.warn('drawJobTasks');
return;
}
+ this.uniformSeries(mapNodeLocal, mapRackLocal, mapOffSwitch,
reduceOffSwitch);
var graph = new Rickshaw.Graph({
width:w,
Modified:
incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js
(original)
+++ incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js Fri
Jan 11 02:13:25 2013
@@ -281,6 +281,7 @@ App.ChartLinearTimeView = Ember.View.ext
if (this.checkSeries(seriesData)) {
//if graph opened as modal popup
var popup_path = $("#" + this.id + "-container" +
this.get('popupSuffix'));
+ var graph_container = $("#" + this.id + "-container");
if(popup_path.length) {
popup_path.children().each(function () {
$(this).children().remove();
@@ -288,12 +289,15 @@ App.ChartLinearTimeView = Ember.View.ext
this.set('isPopup', true);
}
else {
- $("#" + this.id + "-container").children().each(function (index,
value) {
+ graph_container.children().each(function (index, value) {
$(value).children().remove();
});
}
- this.draw(seriesData);
- this.set('hasData', true);
+ // Check container exists (may be not, if we go to another page and
wait while graphs loading)
+ if (graph_container.length) {
+ this.draw(seriesData);
+ this.set('hasData', true);
+ }
}
else {
this.set('isReady', true);
Modified: incubator/ambari/trunk/ambari-web/app/views/main/apps_view.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/apps_view.js?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/apps_view.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/apps_view.js Fri Jan 11
02:13:25 2013
@@ -374,7 +374,8 @@ App.MainAppsView = Em.View.extend({
{ "sType":"ambari-bandwidth" },
null,
{ "sType":"ambari-datetime" }
- ]
+ ],
+ "aaSorting": [[ 10, "desc" ]]
}).css('visibility', 'visible');
this.set('oTable', oTable);
this.set('filtered', oTable.fnSettings().fnRecordsDisplay());
Modified:
incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hbase.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hbase.js?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hbase.js
(original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hbase.js
Fri Jan 11 02:13:25 2013
@@ -54,7 +54,11 @@ App.MainDashboardServiceHbaseView = App.
masterStartedTime: function () {
var uptime = this.get('service').get('masterStartTime');
if (uptime && uptime > 0) {
- var formatted = date.timingFormat((new Date().getTime() - uptime));
+ var diff = (new Date()).getTime() - uptime;
+ if (diff < 0) {
+ diff = 0;
+ }
+ var formatted = date.timingFormat(diff);
return this.t('dashboard.services.uptime').format(formatted);
}
return this.t('services.service.summary.unknown');
@@ -63,7 +67,11 @@ App.MainDashboardServiceHbaseView = App.
masterActivatedTime: function () {
var uptime = this.get('service').get('masterActiveTime');
if (uptime && uptime > 0) {
- var formatted = date.timingFormat((new Date().getTime() - uptime));
+ var diff = (new Date()).getTime() - uptime;
+ if (diff < 0) {
+ diff = 0;
+ }
+ var formatted = date.timingFormat(diff);
return this.t('dashboard.services.uptime').format(formatted);
}
return this.t('services.service.summary.unknown');
Modified:
incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hdfs.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hdfs.js?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hdfs.js
(original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hdfs.js
Fri Jan 11 02:13:25 2013
@@ -33,7 +33,11 @@ App.MainDashboardServiceHdfsView = App.M
nodeUptime: function () {
var uptime = this.get('service').get('nameNodeStartTime');
- var formatted = date.timingFormat((new Date().getTime() - uptime));
+ var diff = (new Date()).getTime() - uptime;
+ if (diff < 0) {
+ diff = 0;
+ }
+ var formatted = date.timingFormat(diff);
return this.t('dashboard.services.uptime').format(formatted);
}.property("service.nameNodeStartTime"),
Modified:
incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/mapreduce.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/mapreduce.js?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/mapreduce.js
(original)
+++
incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/mapreduce.js
Fri Jan 11 02:13:25 2013
@@ -33,7 +33,11 @@ App.MainDashboardServiceMapreduceView =
jobTrackerUptime: function () {
var uptime = this.get('service').get('jobTrackerStartTime');
- var formatted = date.timingFormat((new Date().getTime() - uptime));
+ var diff = (new Date()).getTime() - uptime;
+ if (diff < 0) {
+ diff = 0;
+ }
+ var formatted = date.timingFormat(diff);
return this.t('dashboard.services.uptime').format(formatted);
}.property("service.jobTrackerStartTime"),
Modified:
incubator/ambari/trunk/ambari-web/app/views/main/service/info/summary.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/summary.js?rev=1431809&r1=1431808&r2=1431809&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/summary.js
(original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/summary.js
Fri Jan 11 02:13:25 2013
@@ -259,7 +259,7 @@ App.MainServiceInfoSummaryView = Em.View
}
}
return svc;
- }.property('controller.content.serviceName'),
+ }.property().volatile(),
isHide:true,
moreStatsView:Em.View.extend({