You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2013/04/11 23:05:33 UTC
svn commit: r1467084 [2/2] - in /incubator/ambari/trunk: ./ ambari-web/app/
ambari-web/app/controllers/ ambari-web/app/controllers/global/
ambari-web/app/controllers/main/ ambari-web/app/controllers/main/admin/
ambari-web/app/controllers/main/admin/sec...
Modified: incubator/ambari/trunk/ambari-web/app/controllers/wizard/step9_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step9_controller.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/wizard/step9_controller.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/wizard/step9_controller.js Thu Apr 11 21:05:32 2013
@@ -331,68 +331,59 @@ App.WizardStep9Controller = Em.Controlle
* run start/check services after installation phase
*/
launchStartServices: function () {
- var self = this;
- var clusterName = this.get('content.cluster.name');
- var url = App.apiPrefix + '/clusters/' + clusterName + '/services?ServiceInfo/state=INSTALLED';
var data = '{"RequestInfo": {"context": "'+Em.I18n.t("requestInfo.serviceStartCheck")+'"}, "Body": {"ServiceInfo": {"state": "STARTED"}}}';
- var method = 'PUT';
-
+ var name = 'wizard.step9.installer.launch_start_services';
if (this.get('content.controllerName') === 'addHostController') {
- url = App.apiPrefix + '/clusters/' + clusterName + '/host_components?(HostRoles/component_name=GANGLIA_MONITOR|HostRoles/component_name=HBASE_REGIONSERVER|HostRoles/component_name=DATANODE|HostRoles/component_name=TASKTRACKER)&(HostRoles/state=INSTALLED)';
data = '{"HostRoles": {"state": "STARTED"}}';
+ name = 'wizard.step9.add_host.launch_start_services';
}
-
if (App.testMode) {
- url = this.get('mockDataPrefix') + '/poll_6.json';
- method = 'GET';
this.numPolls = 6;
}
- $.ajax({
- type: method,
- url: url,
- async: false,
- data: data,
- dataType: 'text',
- timeout: App.timeout,
- success: function (data) {
- var jsonData = jQuery.parseJSON(data);
- console.log("TRACE: Step9 -> In success function for the startService call");
- console.log("TRACE: Step9 -> value of the url is: " + url);
- console.log("TRACE: Step9 -> value of the received data is: " + jsonData);
- var requestId = jsonData.Requests.id;
- console.log('requestId is: ' + requestId);
- var clusterStatus = {
- status: 'INSTALLED',
- requestId: requestId,
- isStartError: false,
- isCompleted: false
- };
-
- App.router.get(self.get('content.controllerName')).saveClusterStatus(clusterStatus);
-
- // We need to do recovery if there is a browser crash
- App.clusterStatus.setClusterStatus({
- clusterState: 'SERVICE_STARTING_3',
- localdb: App.db.data
- });
-
- self.startPolling();
+ App.ajax.send({
+ name: name,
+ sender: this,
+ data: {
+ data: data,
+ cluster: this.get('content.cluster.name')
},
+ success: 'launchStartServicesSuccessCallback',
+ error: 'launchStartServicesErrorCallback'
+ });
+ },
- error: function () {
- console.log("ERROR");
- var clusterStatus = {
- status: 'START FAILED',
- isStartError: true,
- isCompleted: false
- };
+ launchStartServicesSuccessCallback: function (jsonData) {
+ console.log("TRACE: Step9 -> In success function for the startService call");
+ console.log("TRACE: Step9 -> value of the received data is: " + jsonData);
+ var requestId = jsonData.Requests.id;
+ console.log('requestId is: ' + requestId);
+ var clusterStatus = {
+ status: 'INSTALLED',
+ requestId: requestId,
+ isStartError: false,
+ isCompleted: false
+ };
+
+ App.router.get(this.get('content.controllerName')).saveClusterStatus(clusterStatus);
+
+ // We need to do recovery if there is a browser crash
+ App.clusterStatus.setClusterStatus({
+ clusterState: 'SERVICE_STARTING_3',
+ localdb: App.db.data
+ });
- App.router.get(self.get('content.controllerName')).saveClusterStatus(clusterStatus);
- },
+ this.startPolling();
+ },
- statusCode: require('data/statusCodes')
- });
+ launchStartServicesErrorCallback: function () {
+ console.log("ERROR");
+ var clusterStatus = {
+ status: 'START FAILED',
+ isStartError: true,
+ isCompleted: false
+ };
+ App.router.get(this.get('content.controllerName')).saveClusterStatus(clusterStatus);
},
// marks a host's status as "success" if all tasks are in COMPLETED state
Modified: incubator/ambari/trunk/ambari-web/app/router.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/router.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/router.js (original)
+++ incubator/ambari/trunk/ambari-web/app/router.js Thu Apr 11 21:05:32 2013
@@ -133,119 +133,119 @@ App.Router = Em.Router.extend({
return authenticated;
},
- login: function (postLogin) {
+ login: function () {
var controller = this.get('loginController');
var loginName = controller.get('loginName').toLowerCase();
controller.set('loginName', loginName);
var hash = window.btoa(loginName + ":" + controller.get('password'));
- var router = this;
- var url = '';
+ var usr = '';
if (App.testMode) {
if (loginName === "admin" && controller.get('password') === 'admin') {
- url = '/data/users/user_admin.json';
+ usr = 'admin';
} else if (loginName === 'user' && controller.get('password') === 'user') {
- url = '/data/users/user_user.json';
+ usr = 'user';
}
}
- $.ajax({
- url: (App.testMode) ? url : App.apiPrefix + '/users/' + loginName,
- dataType: 'json',
- type: 'GET',
- beforeSend: function (xhr) {
- xhr.setRequestHeader("Authorization", "Basic " + hash);
- },
- statusCode: {
- 200: function () {
- console.log("Status code 200: Success.");
- },
- 401: function () {
- console.log("Error code 401: Unauthorized.");
+ App.ajax.send({
+ name: 'router.login',
+ sender: this,
+ data: {
+ auth: "Basic " + hash,
+ usr: usr,
+ loginName: loginName
+ },
+ beforeSend: 'authBeforeSend',
+ success: 'loginSuccessCallback',
+ error: 'loginErrorCallback'
+ });
+
+ },
+
+ authBeforeSend: function(opt, xhr, data) {
+ xhr.setRequestHeader("Authorization", data.auth);
+ },
+
+ loginSuccessCallback: function(data, opt, params) {
+ console.log('login success');
+ var d = data;
+ var isAdmin = data.Users.roles.indexOf('admin') >= 0;
+ if (isAdmin) {
+ var controller = this.get('loginController');
+ this.setAuthenticated(true);
+ this.setLoginName(params.loginName);
+ App.usersMapper.map({"items": [data]});
+ this.setUser(App.User.find(params.loginName));
+ this.transitionTo(this.getSection());
+ controller.postLogin(true);
+ }
+ else {
+ App.ajax.send({
+ name: 'router.login2',
+ sender: this,
+ data: {
+ loginName: params.loginName,
+ loginData: data
},
- 403: function () {
- console.log("Error code 403: Forbidden.");
- }
- },
- success: function (data) {
- console.log('login success');
+ success: 'login2SuccessCallback',
+ error: 'login2ErrorCallback'
+ });
+ }
+ },
- var resp = data;
- var isAdmin = resp.Users.roles.indexOf('admin') >= 0;
- if (isAdmin) {
- router.setAuthenticated(true);
- router.setLoginName(loginName);
- App.usersMapper.map({"items": [data]});
- router.setUser(App.User.find(loginName));
- router.transitionTo(router.getSection());
- postLogin(true);
- } else {
- $.ajax({
- url: (App.testMode) ? '/data/clusters/info.json' : App.apiPrefix + '/clusters',
- dataType: 'text',
- type: 'GET',
- success: function (data) {
- var clusterResp = $.parseJSON(data);
- if (clusterResp.items.length) {
- router.setAuthenticated(true);
- router.setLoginName(loginName);
- App.usersMapper.map({"items": [resp]});
- router.setUser(App.User.find(loginName));
- router.transitionTo(router.getSection());
- postLogin(true);
- } else {
- controller.set('errorMessage', Em.I18n.t('router.hadoopClusterNotSetUp'));
- }
- },
- error: function (req) {
- console.log("Server not responding: " + req.statusCode);
- }
- });
- }
- },
- error: function (req) {
- console.log("login error: " + req.statusCode);
- router.setAuthenticated(false);
- postLogin(false);
- }
- });
+ loginErrorCallback: function(request, ajaxOptions, error, opt) {
+ var controller = this.get('loginController');
+ console.log("login error: " + error);
+ this.setAuthenticated(false);
+ controller.postLogin(false);
+ },
+
+ login2SuccessCallback: function (clusterResp, opt, params) {
+ var controller = this.get('loginController');
+ if (clusterResp.items.length) {
+ this.setAuthenticated(true);
+ this.setLoginName(params.loginName);
+ App.usersMapper.map({"items": [params.loginData]});
+ this.setUser(App.User.find(params.loginName));
+ this.transitionTo(this.getSection());
+ controller.postLogin(true);
+ }
+ else {
+ controller.set('errorMessage', Em.I18n.t('router.hadoopClusterNotSetUp'));
+ }
+ },
+ login2ErrorCallback: function (req) {
+ console.log("Server not responding: " + req.statusCode);
},
setAmbariStacks: function () {
- var self = this;
- var method = 'GET';
- var url = (App.testMode) ? '/data/wizard/stack/stacks.json' : App.apiPrefix + '/stacks';
- $.ajax({
- type: method,
- url: url,
- async: false,
- dataType: 'text',
- timeout: App.timeout,
- success: function (data) {
- var jsonData = jQuery.parseJSON(data);
- console.log("TRACE: In success function for the setAmbariStacks call");
- console.log("TRACE: value of the url is: " + url);
- var stacks = [];
- jsonData.forEach(function (_stack) {
- stacks.pushObject({
- name: _stack.name,
- version: _stack.version
- });
- }, this);
- App.db.setAmbariStacks(stacks);
- console.log('TRACEIINNGG: ambaristacks: ' + JSON.stringify(App.db.getAmbariStacks()));
- },
+ App.ajax.send({
+ name: 'router.set_ambari_stacks',
+ sender: this,
+ success: 'setAmbariStacksSuccessCallback',
+ error: 'setAmbariStacksErrorCallback'
+ });
+ },
- error: function (request, ajaxOptions, error) {
- console.log("TRACE: In error function for the setAmbariStacks call");
- console.log("TRACE: value of the url is: " + url);
- console.log("TRACE: error code status is: " + request.status);
- console.log('Error message is: ' + request.responseText);
- },
+ setAmbariStacksSuccessCallback: function (jsonData) {
+ console.log("TRACE: In success function for the setAmbariStacks call");
+ var stacks = [];
+ jsonData.forEach(function (_stack) {
+ stacks.pushObject({
+ name: _stack.name,
+ version: _stack.version
+ });
+ }, this);
+ App.db.setAmbariStacks(stacks);
+ console.log('TRACEIINNGG: ambaristacks: ' + JSON.stringify(App.db.getAmbariStacks()));
+ },
- statusCode: require('data/statusCodes')
- });
+ setAmbariStacksErrorCallback: function (request, ajaxOptions, error) {
+ console.log("TRACE: In error function for the setAmbariStacks call");
+ console.log("TRACE: error code status is: " + request.status);
+ console.log('Error message is: ' + request.responseText);
},
getSection: function () {
@@ -294,39 +294,28 @@ App.Router = Em.Router.extend({
this.set('loginController.password', '');
if (!App.testMode) {
- $.ajax({
- url: App.apiPrefix + '/logout',
- dataType: 'json',
- type: 'GET',
- beforeSend: function (xhr) {
- xhr.setRequestHeader("Authorization", "Basic " + hash);
- },
- statusCode: {
- 200: function () {
- console.log("Status code 200: Success.");
- },
- 401: function () {
- console.log("Error code 401: Unauthorized.");
- },
- 403: function () {
- console.log("Error code 403: Forbidden.");
- }
- },
- success: function (data) {
- console.log("invoked logout on the server successfully");
- },
- error: function (data) {
- console.log("failed to invoke logout on the server");
- },
- complete: function () {
- console.log('done');
- }
+ App.ajax.send({
+ name: 'router.logoff',
+ sender: this,
+ data: {
+ auth: "Basic " + hash
+ },
+ beforeSend: 'authBeforeSend',
+ success: 'logOffSuccessCallback',
+ error:'logOffErrorCallback'
});
}
-
this.transitionTo('login', context);
},
+ logOffSuccessCallback: function (data) {
+ console.log("invoked logout on the server successfully");
+ },
+
+ logOffErrorCallback: function (req) {
+ console.log("failed to invoke logout on the server");
+ },
+
root: Em.Route.extend({
index: Em.Route.extend({
route: '/',
@@ -366,4 +355,4 @@ App.Router = Em.Router.extend({
}
})
-})
+});
Modified: incubator/ambari/trunk/ambari-web/app/routes/main.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/routes/main.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/routes/main.js (original)
+++ incubator/ambari/trunk/ambari-web/app/routes/main.js Thu Apr 11 21:05:32 2013
@@ -614,6 +614,7 @@ module.exports = Em.Route.extend({
connectOutlets: function (router, context) {
var controller = router.get('mainAdminController');
controller.set('category', "security");
+ controller.connectOutlet('loading');
var securityStatus = controller.securityStatusLoading();
securityStatus.done(function () {
controller.connectOutlet('mainAdminSecurity');
Modified: incubator/ambari/trunk/ambari-web/app/utils/ajax.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/utils/ajax.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/utils/ajax.js (original)
+++ incubator/ambari/trunk/ambari-web/app/utils/ajax.js Thu Apr 11 21:05:32 2013
@@ -31,23 +31,23 @@ var App = require('app');
*/
var urls = {
'background_operations': {
- 'mock': '/data/background_operations/list_on_start.json',
'real': '/clusters/{clusterName}/requests/?fields=tasks/*',
+ 'mock': '/data/background_operations/list_on_start.json',
'testInProduction': true
},
'background_operations.update_task': {
- 'mock': '/data/background_operations/one_task.json',
'real': '/clusters/{clusterName}/requests/{requestId}/tasks/{taskId}',
+ 'mock': '/data/background_operations/one_task.json',
'testInProduction': true
},
'background_operations.get_most_recent': {
- 'mock': '/data/background_operations/list_on_start.json',
'real': '/clusters/{clusterName}/requests?fields=*,tasks/Tasks/*',
+ 'mock': '/data/background_operations/list_on_start.json',
'testInProduction': true
},
'service.item.start_stop': {
- 'mock': '/data/wizard/deploy/poll_1.json',
'real': '/clusters/{clusterName}/services/{serviceName}',
+ 'mock': '/data/wizard/deploy/poll_1.json',
'format': function (data, opt) {
return {
type: 'PUT',
@@ -65,8 +65,8 @@ var urls = {
}
},
'service.item.smoke': {
- 'mock': '/data/wizard/deploy/poll_1.json',
'real': '/clusters/{clusterName}/services/{serviceName}/actions/{serviceName}_SERVICE_CHECK',
+ 'mock': '/data/wizard/deploy/poll_1.json',
'format': function () {
return {
'type': 'POST',
@@ -174,6 +174,7 @@ var urls = {
'reassign.get_logs': {
'real': '/clusters/{clusterName}/requests/{requestId}?fields=tasks/*',
'type': 'GET'
+
},
'reassign.create_configs': {
'real': '/clusters/{clusterName}/configurations',
@@ -237,6 +238,429 @@ var urls = {
async: false
};
}
+ },
+ 'service.metrics.hbase.cluster_requests': {
+ 'real': '/clusters/{clusterName}/services/HBASE/components/HBASE_MASTER?fields=metrics/hbase/master/cluster_requests[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/hbase/cluster_requests.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.hbase.hlog_split_size': {
+ 'real': '/clusters/{clusterName}/services/HBASE/components/HBASE_MASTER?fields=metrics/hbase/master/splitSize_avg_time[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/hbase/hlog_split_size.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.hbase.hlog_split_time': {
+ 'real': '/clusters/{clusterName}/services/HBASE/components/HBASE_MASTER?fields=metrics/hbase/master/splitTime_avg_time[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/hbase/hlog_split_time.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.hbase.regionserver_queuesize': {
+ 'real': '/clusters/{clusterName}/services/HBASE/components/HBASE_REGIONSERVER?fields=metrics/hbase/regionserver/flushQueueSize[{fromSeconds},{toSeconds},{stepSeconds}],metrics/hbase/regionserver/compactionQueueSize[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/hbase/regionserver_queuesize.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.hbase.regionserver_regions': {
+ 'real': '/clusters/{clusterName}/services/HBASE/components/HBASE_REGIONSERVER?fields=metrics/hbase/regionserver/regions[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/hbase/regionserver_regions.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.hbase.regionserver_rw_requests': {
+ 'real': '/clusters/{clusterName}/services/HBASE/components/HBASE_REGIONSERVER?fields=metrics/hbase/regionserver/readRequestsCount[{fromSeconds},{toSeconds},{stepSeconds}],metrics/hbase/regionserver/writeRequestsCount[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/hbase/regionserver_rw_requests.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.mapreduce.gc': {
+ 'real': '/clusters/{clusterName}/hosts/{jobTrackerNode}/host_components/JOBTRACKER?fields=metrics/jvm/gcTimeMillis[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/mapreduce/gc.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.mapreduce.jobs_status': {
+ 'real': '/clusters/{clusterName}/services/MAPREDUCE/components/JOBTRACKER?fields=metrics/mapred/jobtracker/jobs_completed[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/jobs_preparing[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/jobs_failed[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/jobs_submitted[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/jobs_failed[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/jobs_running[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/mapreduce/jobs_status.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.mapreduce.jobs_heap': {
+ 'real': '/clusters/{clusterName}/hosts/{jobTrackerNode}/host_components/JOBTRACKER?fields=metrics/jvm/memNonHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memNonHeapCommittedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memHeapCommittedM[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/mapreduce/jvm_heap.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.mapreduce.jobs_threads': {
+ 'real': '/clusters/{clusterName}/hosts/{jobTrackerNode}/host_components/JOBTRACKER?fields=metrics/jvm/threadsRunnable[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsBlocked[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsWaiting[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsTimedWaiting[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/mapreduce/jvm_threads.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.mapreduce.map_slots': {
+ 'real': '/clusters/{clusterName}/services/MAPREDUCE/components/JOBTRACKER?fields=metrics/mapred/jobtracker/occupied_map_slots[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/reserved_map_slots[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/mapreduce/map_slots.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.mapreduce.reduce_slots': {
+ 'real': '/clusters/{clusterName}/services/MAPREDUCE/components/JOBTRACKER?fields=metrics/mapred/jobtracker/occupied_reduce_slots[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/reserved_reduce_slots[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/mapreduce/reduce_slots.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.mapreduce.rpc': {
+ 'real': '/clusters/{clusterName}/hosts/{jobTrackerNode}/host_components/JOBTRACKER?fields=metrics/rpc/RpcQueueTime_avg_time[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/mapreduce/rpc.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.mapreduce.tasks_running_waiting': {
+ 'real': '/clusters/{clusterName}/services/MAPREDUCE/components/JOBTRACKER?fields=metrics/mapred/jobtracker/running_maps[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/running_reduces[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/waiting_maps[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/waiting_reduces[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/mapreduce/tasks_running_waiting.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.hdfs.block_status': {
+ 'real': '/clusters/{clusterName}/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/dfs/FSNamesystem/PendingReplicationBlocks[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/FSNamesystem/UnderReplicatedBlocks[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/hdfs/block_status.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.hdfs.file_operations': {
+ 'real': '/clusters/{clusterName}/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/dfs/namenode/FileInfoOps[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/namenode/CreateFileOps[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/hdfs/file_operations.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.hdfs.gc': {
+ 'real': '/clusters/{clusterName}/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/jvm/gcTimeMillis[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/hdfs/gc.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.hdfs.io': {
+ 'real': '/clusters/{clusterName}/services/HDFS/components/DATANODE?fields=metrics/dfs/datanode/bytes_written[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/datanode/bytes_read[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/hdfs/io.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.hdfs.jvm_heap': {
+ 'real': '/clusters/{clusterName}/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/jvm/memNonHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memNonHeapCommittedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memHeapCommittedM[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/hdfs/jvm_heap.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.hdfs.jvm_threads': {
+ 'real': '/clusters/{clusterName}/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/jvm/threadsRunnable[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsBlocked[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsWaiting[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsTimedWaiting[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/hdfs/jvm_threads.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.hdfs.rpc': {
+ 'real': '/clusters/{clusterName}/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/rpc/RpcQueueTime_avg_time[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/hdfs/rpc.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.hdfs.space_utilization': {
+ 'real': '/clusters/{clusterName}/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/dfs/FSNamesystem/CapacityRemainingGB[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/FSNamesystem/CapacityUsedGB[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/FSNamesystem/CapacityTotalGB[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/hdfs/space_utilization.json',
+ 'testInProduction': true
+ },
+ 'dashboard.cluster_metrics.cpu': {
+ 'real': '/clusters/{clusterName}/?fields=metrics/cpu[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/cluster_metrics/cpu_1hr.json',
+ 'testInProduction': true
+ },
+ 'dashboard.cluster_metrics.load': {
+ 'real': '/clusters/{clusterName}/?fields=metrics/load[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/cluster_metrics/load_1hr.json',
+ 'testInProduction': true
+ },
+ 'dashboard.cluster_metrics.memory': {
+ 'real': '/clusters/{clusterName}/?fields=metrics/memory[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/cluster_metrics/memory_1hr.json',
+ 'testInProduction': true
+ },
+ 'dashboard.cluster_metrics.network': {
+ 'real': '/clusters/{clusterName}/?fields=metrics/network[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/cluster_metrics/network_1hr.json',
+ 'testInProduction': true
+ },
+ 'host.metrics.cpu': {
+ 'real': '/clusters/{clusterName}/hosts/{hostName}?fields=metrics/cpu/cpu_user[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_wio[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_nice[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_aidle[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_system[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_idle[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/hosts/metrics/cpu.json',
+ 'testInProduction': true
+ },
+ 'host.metrics.disk': {
+ 'real': '/clusters/{clusterName}/hosts/{hostName}?fields=metrics/disk/disk_total[{fromSeconds},{toSeconds},{stepSeconds}],metrics/disk/disk_free[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/hosts/metrics/disk.json',
+ 'testInProduction': true
+ },
+ 'host.metrics.load': {
+ 'real': '/clusters/{clusterName}/hosts/{hostName}?fields=metrics/load/load_fifteen[{fromSeconds},{toSeconds},{stepSeconds}],metrics/load/load_one[{fromSeconds},{toSeconds},{stepSeconds}],metrics/load/load_five[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/hosts/metrics/load.json',
+ 'testInProduction': true
+ },
+ 'host.metrics.memory': {
+ 'real': '/clusters/{clusterName}/hosts/{hostName}?fields=metrics/memory/swap_free[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_shared[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_free[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_cached[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_buffers[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/hosts/metrics/memory.json',
+ 'testInProduction': true
+ },
+ 'host.metrics.network': {
+ 'real': '/clusters/{clusterName}/hosts/{hostName}?fields=metrics/network/bytes_in[{fromSeconds},{toSeconds},{stepSeconds}],metrics/network/bytes_out[{fromSeconds},{toSeconds},{stepSeconds}],metrics/network/pkts_in[{fromSeconds},{toSeconds},{stepSeconds}],metrics/network/pkts_out[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/hosts/metrics/network.json',
+ 'testInProduction': true
+ },
+ 'host.metrics.processes': {
+ 'real': '/clusters/{clusterName}/hosts/{hostName}?fields=metrics/process/proc_total[{fromSeconds},{toSeconds},{stepSeconds}],metrics/process/proc_run[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/hosts/metrics/processes.json',
+ 'testInProduction': true
+ },
+ 'admin.security_status': {
+ 'real': '/clusters/{clusterName}',
+ 'format': function (data, opt) {
+ return {
+ timeout: 10000,
+ async: false
+ };
+ }
+ },
+ 'admin.service_config': {
+ 'real': '/clusters/{clusterName}/configurations/?type={siteName}&tag={tagName}',
+ 'format': function (data, opt) {
+ return {
+ timeout: 10000,
+ async: false
+ };
+ }
+ },
+ 'router.set_ambari_stacks': {
+ 'real': '/stacks',
+ 'mock': '/data/wizard/stack/stacks.json',
+ 'format': function (data, opt) {
+ return {
+ async: false
+ };
+ }
+ },
+ 'cluster.load_cluster_name': {
+ 'real': '/clusters',
+ 'mock': '/data/clusters/info.json',
+ 'format': function (data, opt) {
+ return {
+ async: false
+ };
+ }
+ },
+ 'cluster.update_upgrade_version': {
+ 'real': '/stacks2/HDP/versions?fields=stackServices/StackServices,Versions',
+ 'mock': '/data/wizard/stack/stacks.json',
+ 'format': function (data, opt) {
+ return {
+ async: false
+ };
+ }
+ },
+ 'wizard.launch_bootstrap': {
+ 'real': '/bootstrap',
+ 'mock': '/data/wizard/bootstrap/bootstrap.json',
+ 'format': function (data) {
+ return {
+ type: 'POST',
+ async: false,
+ contentType: 'application/json',
+ data: data.bootStrapData
+ }
+ }
+ },
+ 'admin.security.cluster_configs': {
+ 'real': '/clusters/{clusterName}',
+ 'format': function (data, opt) {
+ return {
+ timeout: 10000
+ };
+ }
+ },
+ 'admin.security.all_configurations': {
+ 'real': '/clusters/{clusterName}/configurations?{urlParams}',
+ 'format': function (data, opt) {
+ return {
+ timeout: 10000
+ };
+ }
+ },
+ 'admin.security.apply_configuration': {
+ 'real': '/clusters/{clusterName}',
+ 'format': function (data, opt) {
+ return {
+ type: 'PUT',
+ async: false,
+ timeout: 5000,
+ data: JSON.stringify(data.clusterData)
+ };
+ }
+ },
+ 'admin.security.add.cluster_configs': {
+ 'real': '/clusters/{clusterName}',
+ 'format': function (data, opt) {
+ return {
+ timeout: 10000
+ };
+ }
+ },
+ 'service.start_stop': {
+ 'real': '/clusters/{clusterName}/services?ServiceInfo',
+ 'mock': '/data/mirroring/poll/poll_6.json',
+ 'format': function (data, opt) {
+ return {
+ type: 'PUT',
+ async: false,
+ data: data.data
+ };
+ }
+ },
+ 'admin.stack_upgrade.run_upgrade': {
+ 'real':'/clusters/{clusterName}',
+ 'format': function (data, opt) {
+ return {
+ type: 'PUT',
+ async: false,
+ data: data.data
+ };
+ }
+ },
+ 'admin.stack_upgrade.stop_services': {
+ 'real': '/clusters/{clusterName}/services?ServiceInfo/state=STARTED',
+ 'format': function (data, opt) {
+ return {
+ type: 'PUT',
+ async: false,
+ data: data.data
+ };
+ }
+ },
+ 'admin.stack_upgrade.do_poll': {
+ 'real': '/clusters/{cluster}/requests/{requestId}?fields=tasks/*',
+ 'mock': '/data/wizard/{mock}'
+ },
+ 'host.service_config_hosts_overrides': {
+ 'real': '/clusters/{clusterName}/configurations?{urlParams}',
+ 'format': function (data, opt) {
+ return {
+ async: false,
+ timeout: 10000
+ };
+ }
+ },
+ 'wizard.install_services.add_host_controller.is_retry': {
+ 'real': '/clusters/{cluster}/host_components?HostRoles/state=INSTALLED',
+ 'format': function (data, opt) {
+ return {
+ type: 'PUT',
+ async: false,
+ data: data.data
+ };
+ }
+ },
+ 'wizard.install_services.add_host_controller.not_is_retry': {
+ 'real': '/clusters/{cluster}/host_components?HostRoles/state=INIT',
+ 'format': function (data, opt) {
+ return {
+ type: 'PUT',
+ async: false,
+ data: data.data
+ };
+ }
+ },
+ 'wizard.install_services.installer_controller.is_retry': {
+ 'real': '/clusters/{cluster}/host_components?HostRoles/state!=INSTALLED',
+ 'mock': '/data/wizard/deploy/2_hosts/poll_1.json',
+ 'format': function (data, opt) {
+ return {
+ type: 'PUT',
+ async: false,
+ data: data.data
+ };
+ }
+ },
+ 'wizard.install_services.installer_controller.not_is_retry': {
+ 'real': '/clusters/{cluster}/services?ServiceInfo/state=INIT',
+ 'mock': '/data/wizard/deploy/2_hosts/poll_1.json',
+ 'format': function (data, opt) {
+ return {
+ type: 'PUT',
+ async: false,
+ data: data.data
+ };
+ }
+ },
+ 'wizard.service_components': {
+ 'real': '{stackUrl}',
+ 'mock': '/data/wizard/stack/hdp/version/1.3.0.json',
+ 'format': function (data, opt) {
+ return {
+ async: false
+ };
+ }
+ },
+ 'wizard.step9.installer.launch_start_services': {
+ 'real': '/clusters/{cluster}/services?ServiceInfo/state=INSTALLED',
+ 'mock': '/data/wizard/deploy/5_hosts/poll_6.json',
+ 'format': function (data, opt) {
+ return {
+ type: 'PUT',
+ async: false,
+ data: data.data
+ };
+ }
+ },
+ 'wizard.step9.add_host.launch_start_services': {
+ 'real': '/clusters/{cluste}/host_components?(HostRoles/component_name=GANGLIA_MONITOR|HostRoles/component_name=HBASE_REGIONSERVER|HostRoles/component_name=DATANODE|HostRoles/component_name=TASKTRACKER)&(HostRoles/state=INSTALLED)',
+ 'mock': '/data/wizard/deploy/5_hosts/poll_6.json',
+ 'format': function (data, opt) {
+ return {
+ type: 'PUT',
+ async: false,
+ data: data.data
+ };
+ }
+ },
+ 'wizard.step8.delete_cluster': {
+ 'real': '/clusters/{name}',
+ 'format': function (data, opt) {
+ return {
+ type: 'DELETE',
+ async: false
+ };
+ }
+ },
+ 'wizard.step8.existing_cluster_names': {
+ 'real': '/clusters',
+ 'format': function (data, opt) {
+ return {
+ async: false
+ };
+ }
+ },
+ 'wizard.step3.host_info': {
+ 'real': '/hosts?fields=Hosts/total_mem,Hosts/cpu_count,Hosts/disk_info,Hosts/last_agent_env',
+ 'mock': '/data/wizard/bootstrap/two_hosts_information.json',
+ 'format': function (data, opt) {
+ return {
+ contentType: 'application/json'
+ };
+ }
+ },
+ 'wizard.step3.rerun_checks': {
+ 'real': '/hosts?fields=Hosts/last_agent_env',
+ 'mock': '/data/wizard/bootstrap/two_hosts_information.json',
+ 'format': function (data, opt) {
+ return {
+ contentType: 'application/json'
+ };
+ }
+ },
+ 'wizard.step3.bootstrap': {
+ 'real': '/bootstrap/{bootRequestId}',
+ 'mock': '/data/wizard/bootstrap/poll_{numPolls}.json'
+ },
+ 'wizard.step3.is_hosts_registered': {
+ 'real': '/hosts',
+ 'mock': '/data/wizard/bootstrap/single_host_registration.json'
+ },
+ 'router.login': {
+ 'real': '/users/{loginName}',
+ 'mock': '/data/users/user_{usr}.json'
+ },
+ 'router.login2': {
+ 'real': '/clusters',
+ 'mock': '/data/clusters/info.json'
+ },
+ 'router.logoff': {
+ 'real': '/logout'
}
};
/**
@@ -249,17 +673,19 @@ var urls = {
var formatUrl = function(url, data) {
var keys = url.match(/\{\w+\}/g);
keys = (keys === null) ? [] : keys;
- keys.forEach(function(key){
- var raw_key = key.substr(1, key.length - 2);
- var replace;
- if (!data[raw_key]) {
- replace = '';
- }
- else {
- replace = data[raw_key];
- }
- url = url.replace(new RegExp(key, 'g'), replace);
- });
+ if (keys) {
+ keys.forEach(function(key){
+ var raw_key = key.substr(1, key.length - 2);
+ var replace;
+ if (!data[raw_key]) {
+ replace = '';
+ }
+ else {
+ replace = data[raw_key];
+ }
+ url = url.replace(new RegExp(key, 'g'), replace);
+ });
+ }
return url;
};
@@ -310,6 +736,9 @@ App.ajax = {
* callback - callback from <code>App.updater.run</code> library
*/
send: function(config) {
+
+ console.warn('============== ajax ==============', config.name, config.data);
+
if (!config.sender) {
console.warn('Ajax sender should be defined!');
return null;
@@ -329,12 +758,13 @@ App.ajax = {
opt = formatRequest.call(urls[config.name], params);
// object sender should be provided for processing beforeSend, success and error responses
- opt.beforeSend = function() {
+ opt.beforeSend = function(xhr) {
if(config.beforeSend) {
- config.sender[config.beforeSend](opt);
+ config.sender[config.beforeSend](opt, xhr, params);
}
};
opt.success = function(data) {
+ console.log("TRACE: The url is: " + opt.url);
if(config.success) {
config.sender[config.success](data, opt, params);
}
@@ -352,7 +782,6 @@ App.ajax = {
if($.mocho){
opt.url = 'http://' + $.hostName + opt.url;
}
-
return $.ajax(opt);
}
-}
+}
\ No newline at end of file
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=1467084&r1=1467083&r2=1467084&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 Thu Apr 11 21:05:32 2013
@@ -142,26 +142,41 @@ App.ChartLinearTimeView = Ember.View.ext
},
loadData: function() {
- var validUrl = this.getFormattedUrl();
- if (validUrl) {
- var hash = {};
- hash.url = validUrl;
- hash.type = 'GET';
- hash.dataType = 'json';
- hash.contentType = 'application/json; charset=utf-8';
- hash.context = this;
- hash.success = this._refreshGraph,
- hash.error = function(xhr, textStatus, errorThrown){
- this.set('isReady', true);
- if (xhr.readyState == 4 && xhr.status) {
- textStatus = xhr.status + " " + textStatus;
- }
- this._showMessage('warn', this.t('graphs.error.title'), this.t('graphs.error.message').format(textStatus, errorThrown));
- this.set('isPopup', false);
- this.set('hasData', false);
- }
- jQuery.ajax(hash);
- }
+ App.ajax.send({
+ name: this.get('ajaxIndex'),
+ sender: this,
+ data: this.getDataForAjaxRequest(),
+ success: '_refreshGraph',
+ error: 'loadDataErrorCallback'
+ });
+ },
+
+ getDataForAjaxRequest: function() {
+ var toSeconds = Math.round(new Date().getTime() / 1000);
+ var hostName = (this.get('content')) ? this.get('content.hostName') : "";
+
+ var HDFSService = App.HDFSService.find().objectAt(0);
+ var nameNodeName = HDFSService ? HDFSService.get('nameNode.hostName') : "";
+ var MapReduceService = App.MapReduceService.find().objectAt(0);
+ var jobTrackerNode = MapReduceService ? MapReduceService.get('jobTracker.hostName') : "";
+ var timeUnit = this.get('timeUnitSeconds');
+ return {
+ toSeconds: toSeconds,
+ fromSeconds: toSeconds - timeUnit,
+ stepSeconds: 15,
+ hostName: hostName,
+ nameNodeName: nameNodeName,
+ jobTrackerNode: jobTrackerNode
+ };
+ },
+ loadDataErrorCallback: function(xhr, textStatus, errorThrown){
+ this.set('isReady', true);
+ if (xhr.readyState == 4 && xhr.status) {
+ textStatus = xhr.status + " " + textStatus;
+ }
+ this._showMessage('warn', this.t('graphs.error.title'), this.t('graphs.error.message').format(textStatus, errorThrown));
+ this.set('isPopup', false);
+ this.set('hasData', false);
},
/**
@@ -738,36 +753,6 @@ App.ChartLinearTimeView = Ember.View.ext
self.set('isPopupReady', false);
});
},
- /**
- * return formatted URL that depends on timeUnit
- * on host metrics depends on host name
- * on MapReduce metrics depends on jobTracker Node
- * @return {String}
- */
- getFormattedUrl:function(){
- var toSeconds = Math.round(new Date().getTime() / 1000);
- var hostName = (this.get('content')) ? this.get('content.hostName') : "";
- var nameNodeName = (App.HDFSService.find().objectAt(0)) ?
- App.HDFSService.find().objectAt(0).get('nameNode').get('hostName') :
- "";
- var jobTrackerNode = (App.MapReduceService.find().objectAt(0))
- ? App.MapReduceService.find().objectAt(0).get('jobTracker').get('hostName')
- : "";
- var timeUnit = this.get('timeUnitSeconds');
-
- return App.formatUrl(
- this.get('urlPrefix') + this.get('sourceUrl'),
- {
- toSeconds: toSeconds,
- fromSeconds: toSeconds - timeUnit,
- stepSeconds: 15,
- hostName: hostName,
- nameNodeName: nameNodeName,
- jobTrackerNode: jobTrackerNode
- },
- this.get('mockUrl')
- );
- },
//60 minute interval on X axis.
timeUnitSeconds: 3600
});
Modified: incubator/ambari/trunk/ambari-web/app/views/common/modal_popup.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/common/modal_popup.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/common/modal_popup.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/common/modal_popup.js Thu Apr 11 21:05:32 2013
@@ -139,28 +139,6 @@ App.showConfirmationPopup = function(pri
header: Em.I18n.t('popup.confirmation.commonHeader'),
body: Em.I18n.t('question.sure').format(body || ''),
onPrimary: function() {
- primary();
- this.hide();
- }
- });
-}
-/**
- * Show confirmation popup - hide the popup first then run the function
- *
- * @param {Function} primary - "OK" button click handler
- * @param {String} body - additional text constant. Will be placed in the popup-body
- * @return {*}
- */
-App.showConfirmationPopup2 = function(primary, body) {
- if (!primary) {
- return false;
- }
- return App.ModalPopup.show({
- primary: Em.I18n.t('yes'),
- secondary: Em.I18n.t('no'),
- header: Em.I18n.t('popup.confirmation.commonHeader'),
- body: Em.I18n.t('question.sure').format(body || ''),
- onPrimary: function() {
this.hide();
primary();
}
Modified: incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js Thu Apr 11 21:05:32 2013
@@ -28,8 +28,8 @@ var App = require('app');
*/
App.ChartClusterMetricsCPU = App.ChartLinearTimeView.extend({
id: "cluster-metrics-cpu",
- sourceUrl: "?fields=metrics/cpu[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/cluster_metrics/cpu_1hr.json",
+
+ ajaxIndex: 'dashboard.cluster_metrics.cpu',
title: Em.I18n.t('dashboard.clusterMetrics.cpu'),
yAxisFormatter: App.ChartLinearTimeView.PercentageFormatter,
@@ -39,10 +39,9 @@ App.ChartClusterMetricsCPU = App.ChartLi
if (jsonData && jsonData.metrics && jsonData.metrics.cpu) {
var cpu_idle;
for ( var name in jsonData.metrics.cpu) {
- var displayName = name;
var seriesData = jsonData.metrics.cpu[name];
if (seriesData) {
- var s = this.transformData(seriesData, displayName);
+ var s = this.transformData(seriesData, name);
if (Em.I18n.t('dashboard.clusterMetrics.cpu.displayNames.idle') == s.name) {
cpu_idle = s;
}
Modified: incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/load.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/load.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/load.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/load.js Thu Apr 11 21:05:32 2013
@@ -29,8 +29,8 @@ var App = require('app');
*/
App.ChartClusterMetricsLoad = App.ChartLinearTimeView.extend({
id: "cluster-metrics-load",
- sourceUrl: "?fields=metrics/load[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/cluster_metrics/load_1hr.json",
+
+ ajaxIndex: 'dashboard.cluster_metrics.load',
isTimePagingDisable: true,
renderer: 'line',
title: Em.I18n.t('dashboard.clusterMetrics.load'),
Modified: incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js Thu Apr 11 21:05:32 2013
@@ -28,8 +28,9 @@ var App = require('app');
*/
App.ChartClusterMetricsMemory = App.ChartLinearTimeView.extend({
id: "cluster-metrics-memory",
- sourceUrl: "?fields=metrics/memory[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/cluster_metrics/memory_1hr.json",
+
+ ajaxIndex: 'dashboard.cluster_metrics.memory',
+
isTimePagingDisable: true,
title: Em.I18n.t('dashboard.clusterMetrics.memory'),
yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
Modified: incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/network.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/network.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/network.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/network.js Thu Apr 11 21:05:32 2013
@@ -29,8 +29,9 @@ var App = require('app');
*/
App.ChartClusterMetricsNetwork = App.ChartLinearTimeView.extend({
id: "cluster-metrics-network",
- sourceUrl: "?fields=metrics/network[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/cluster_metrics/network_1hr.json",
+
+ ajaxIndex: 'dashboard.cluster_metrics.network',
+
isTimePagingDisable: true,
title: Em.I18n.t('dashboard.clusterMetrics.network'),
yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
Modified: incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/cpu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/cpu.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/cpu.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/cpu.js Thu Apr 11 21:05:32 2013
@@ -31,8 +31,7 @@ App.ChartHostMetricsCPU = App.ChartLinea
title: Em.I18n.t('hosts.host.metrics.cpu'),
yAxisFormatter: App.ChartLinearTimeView.PercentageFormatter,
- sourceUrl: "/hosts/{hostName}?fields=metrics/cpu/cpu_user[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_wio[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_nice[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_aidle[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_system[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_idle[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/hosts/metrics/cpu.json",
+ ajaxIndex: 'host.metrics.cpu',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/disk.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/disk.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/disk.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/disk.js Thu Apr 11 21:05:32 2013
@@ -31,8 +31,8 @@ App.ChartHostMetricsDisk = App.ChartLine
title: Em.I18n.t('hosts.host.metrics.disk'),
yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
renderer: 'line',
- sourceUrl: "/hosts/{hostName}?fields=metrics/disk/disk_total[{fromSeconds},{toSeconds},{stepSeconds}],metrics/disk/disk_free[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/hosts/metrics/disk.json",
+
+ ajaxIndex: 'host.metrics.disk',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/load.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/load.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/load.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/load.js Thu Apr 11 21:05:32 2013
@@ -30,8 +30,8 @@ App.ChartHostMetricsLoad = App.ChartLine
id: "host-metrics-load",
title: Em.I18n.t('hosts.host.metrics.load'),
renderer: 'line',
- sourceUrl: "/hosts/{hostName}?fields=metrics/load/load_fifteen[{fromSeconds},{toSeconds},{stepSeconds}],metrics/load/load_one[{fromSeconds},{toSeconds},{stepSeconds}],metrics/load/load_five[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/hosts/metrics/load.json",
+
+ ajaxIndex: 'host.metrics.load',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/memory.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/memory.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/memory.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/memory.js Thu Apr 11 21:05:32 2013
@@ -31,8 +31,8 @@ App.ChartHostMetricsMemory = App.ChartLi
title: Em.I18n.t('hosts.host.metrics.memory'),
yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
renderer: 'line',
- sourceUrl: "/hosts/{hostName}?fields=metrics/memory/swap_free[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_shared[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_free[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_cached[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_buffers[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/hosts/metrics/memory.json",
+
+ ajaxIndex: 'host.metrics.memory',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/network.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/network.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/network.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/network.js Thu Apr 11 21:05:32 2013
@@ -31,8 +31,8 @@ App.ChartHostMetricsNetwork = App.ChartL
title: Em.I18n.t('hosts.host.metrics.network'),
yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
renderer: 'line',
- sourceUrl: "/hosts/{hostName}?fields=metrics/network/bytes_in[{fromSeconds},{toSeconds},{stepSeconds}],metrics/network/bytes_out[{fromSeconds},{toSeconds},{stepSeconds}],metrics/network/pkts_in[{fromSeconds},{toSeconds},{stepSeconds}],metrics/network/pkts_out[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/hosts/metrics/network.json",
+
+ ajaxIndex: 'host.metrics.network',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/processes.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/processes.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/processes.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/processes.js Thu Apr 11 21:05:32 2013
@@ -30,8 +30,8 @@ App.ChartHostMetricsProcesses = App.Char
id: "host-metrics-processes",
title: Em.I18n.t('hosts.host.metrics.processes'),
renderer: 'line',
- sourceUrl: "/hosts/{hostName}?fields=metrics/process/proc_total[{fromSeconds},{toSeconds},{stepSeconds}],metrics/process/proc_run[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/hosts/metrics/processes.json",
+
+ ajaxIndex: 'host.metrics.processes',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/cluster_requests.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/cluster_requests.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/cluster_requests.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/cluster_requests.js Thu Apr 11 21:05:32 2013
@@ -29,8 +29,8 @@ var App = require('app');
App.ChartServiceMetricsHBASE_ClusterRequests = App.ChartLinearTimeView.extend({
id: "service-metrics-hbase-cluster-requests",
title: Em.I18n.t('services.service.info.metrics.hbase.clusterRequests'),
- sourceUrl: "/services/HBASE/components/HBASE_MASTER?fields=metrics/hbase/master/cluster_requests[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/hbase/cluster_requests.json",
+
+ ajaxIndex: 'service.metrics.hbase.cluster_requests',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_size.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_size.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_size.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_size.js Thu Apr 11 21:05:32 2013
@@ -31,8 +31,7 @@ App.ChartServiceMetricsHBASE_HlogSplitSi
title: Em.I18n.t('services.service.info.metrics.hbase.hlogSplitSize'),
yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
- sourceUrl: "/services/HBASE/components/HBASE_MASTER?fields=metrics/hbase/master/splitSize_avg_time[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/hbase/hlog_split_size.json",
+ ajaxIndex: 'service.metrics.hbase.hlog_split_size',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_time.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_time.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_time.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_time.js Thu Apr 11 21:05:32 2013
@@ -31,8 +31,7 @@ App.ChartServiceMetricsHBASE_HlogSplitTi
title: Em.I18n.t('services.service.info.metrics.hbase.hlogSplitTime'),
yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
- sourceUrl: "/services/HBASE/components/HBASE_MASTER?fields=metrics/hbase/master/splitTime_avg_time[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/hbase/hlog_split_time.json",
+ ajaxIndex: 'service.metrics.hbase.hlog_split_time',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_queuesize.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_queuesize.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_queuesize.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_queuesize.js Thu Apr 11 21:05:32 2013
@@ -30,8 +30,7 @@ App.ChartServiceMetricsHBASE_RegionServe
id: "service-metrics-hbase-regionserver-queuesize",
title: Em.I18n.t('services.service.info.metrics.hbase.regionServerQueueSize'),
renderer: 'line',
- sourceUrl: "/services/HBASE/components/HBASE_REGIONSERVER?fields=metrics/hbase/regionserver/flushQueueSize[{fromSeconds},{toSeconds},{stepSeconds}],metrics/hbase/regionserver/compactionQueueSize[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/hbase/regionserver_queuesize.json",
+ ajaxIndex: 'service.metrics.hbase.regionserver_queuesize',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_regions.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_regions.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_regions.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_regions.js Thu Apr 11 21:05:32 2013
@@ -30,8 +30,7 @@ App.ChartServiceMetricsHBASE_RegionServe
id: "service-metrics-hbase-regionserver-regions",
title: Em.I18n.t('services.service.info.metrics.hbase.regionServerRegions'),
- sourceUrl: "/services/HBASE/components/HBASE_REGIONSERVER?fields=metrics/hbase/regionserver/regions[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/hbase/regionserver_regions.json",
+ ajaxIndex: 'service.metrics.hbase.regionserver_regions',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_rw_requests.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_rw_requests.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_rw_requests.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_rw_requests.js Thu Apr 11 21:05:32 2013
@@ -30,8 +30,8 @@ App.ChartServiceMetricsHBASE_RegionServe
id: "service-metrics-hbase-regionserver-rw-requests",
title: Em.I18n.t('services.service.info.metrics.hbase.regionServerRequests'),
renderer: 'line',
- sourceUrl: "/services/HBASE/components/HBASE_REGIONSERVER?fields=metrics/hbase/regionserver/readRequestsCount[{fromSeconds},{toSeconds},{stepSeconds}],metrics/hbase/regionserver/writeRequestsCount[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/hbase/regionserver_rw_requests.json",
+
+ ajaxIndex: 'service.metrics.hbase.regionserver_rw_requests',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js Thu Apr 11 21:05:32 2013
@@ -30,8 +30,8 @@ App.ChartServiceMetricsHDFS_BlockStatus
id: "service-metrics-hdfs-block-status",
title: Em.I18n.t('services.service.info.metrics.hdfs.blockStatus'),
renderer: 'line',
- sourceUrl: "/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/dfs/FSNamesystem/PendingReplicationBlocks[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/FSNamesystem/UnderReplicatedBlocks[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl:"/data/services/metrics/hdfs/block_status.json",
+
+ ajaxIndex: 'service.metrics.hdfs.block_status',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js Thu Apr 11 21:05:32 2013
@@ -30,8 +30,8 @@ App.ChartServiceMetricsHDFS_FileOperatio
id: "service-metrics-hdfs-file-operations",
title: Em.I18n.t('services.service.info.metrics.hdfs.fileOperations'),
renderer: 'line',
- sourceUrl: "/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/dfs/namenode/FileInfoOps[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/namenode/CreateFileOps[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/hdfs/file_operations.json",
+
+ ajaxIndex: 'service.metrics.hdfs.file_operations',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js Thu Apr 11 21:05:32 2013
@@ -31,8 +31,7 @@ App.ChartServiceMetricsHDFS_GC = App.Cha
title: Em.I18n.t('services.service.info.metrics.hdfs.gc'),
yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
- sourceUrl: "/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/jvm/gcTimeMillis[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/hdfs/gc.json",
+ ajaxIndex: 'service.metrics.hdfs.gc',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/io.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/io.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/io.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/io.js Thu Apr 11 21:05:32 2013
@@ -31,8 +31,8 @@ App.ChartServiceMetricsHDFS_IO = App.Cha
title: Em.I18n.t('services.service.info.metrics.hdfs.io'),
yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
renderer: 'line',
- sourceUrl: "/services/HDFS/components/DATANODE?fields=metrics/dfs/datanode/bytes_written[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/datanode/bytes_read[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/hdfs/io.json",
+
+ ajaxIndex: 'service.metrics.hdfs.io',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js Thu Apr 11 21:05:32 2013
@@ -31,8 +31,8 @@ App.ChartServiceMetricsHDFS_JVMHeap = Ap
title: Em.I18n.t('services.service.info.metrics.hdfs.jvmHeap'),
yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
renderer: 'line',
- sourceUrl:"/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/jvm/memNonHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memNonHeapCommittedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memHeapCommittedM[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/hdfs/jvm_heap.json",
+
+ ajaxIndex: 'service.metrics.hdfs.jvm_heap',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_threads.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_threads.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_threads.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_threads.js Thu Apr 11 21:05:32 2013
@@ -30,8 +30,8 @@ App.ChartServiceMetricsHDFS_JVMThreads =
id: "service-metrics-hdfs-jvm-threads",
title: Em.I18n.t('services.service.info.metrics.hdfs.jvmThreads'),
renderer: 'line',
- sourceUrl: "/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/jvm/threadsRunnable[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsBlocked[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsWaiting[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsTimedWaiting[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/hdfs/jvm_threads.json",
+
+ ajaxIndex: 'service.metrics.hdfs.jvm_threads',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/rpc.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/rpc.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/rpc.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/rpc.js Thu Apr 11 21:05:32 2013
@@ -30,8 +30,8 @@ App.ChartServiceMetricsHDFS_RPC = App.Ch
id: "service-metrics-hdfs-rpc",
title: Em.I18n.t('services.service.info.metrics.hdfs.rpc'),
yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
- sourceUrl: "/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/rpc/RpcQueueTime_avg_time[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/hdfs/rpc.json",
+
+ ajaxIndex: 'service.metrics.hdfs.rpc',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/space_utilization.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/space_utilization.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/space_utilization.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/hdfs/space_utilization.js Thu Apr 11 21:05:32 2013
@@ -31,8 +31,7 @@ App.ChartServiceMetricsHDFS_SpaceUtiliza
title: Em.I18n.t('services.service.info.metrics.hdfs.spaceUtilization'),
yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
renderer: 'line',
- sourceUrl: "/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/dfs/FSNamesystem/CapacityRemainingGB[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/FSNamesystem/CapacityUsedGB[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/FSNamesystem/CapacityTotalGB[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/hdfs/space_utilization.json",
+ ajaxIndex: 'service.metrics.hdfs.space_utilization',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/gc.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/gc.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/gc.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/gc.js Thu Apr 11 21:05:32 2013
@@ -30,8 +30,8 @@ App.ChartServiceMetricsMapReduce_GC = Ap
id: "service-metrics-mapreduce-gc",
title: Em.I18n.t('services.service.info.metrics.mapreduce.gc'),
yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
- sourceUrl: "/hosts/{jobTrackerNode}/host_components/JOBTRACKER?fields=metrics/jvm/gcTimeMillis[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/mapreduce/gc.json",
+
+ ajaxIndex: 'service.metrics.mapreduce.gc',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/jobs_status.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/jobs_status.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/jobs_status.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/jobs_status.js Thu Apr 11 21:05:32 2013
@@ -30,8 +30,8 @@ App.ChartServiceMetricsMapReduce_JobsSta
id: "service-metrics-mapreduce-jobs-status",
title: Em.I18n.t('services.service.info.metrics.mapreduce.jobsStatus'),
renderer: 'line',
- sourceUrl: "/services/MAPREDUCE/components/JOBTRACKER?fields=metrics/mapred/jobtracker/jobs_completed[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/jobs_preparing[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/jobs_failed[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/jobs_submitted[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/jobs_failed[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/jobs_running[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/mapreduce/jobs_status.json",
+
+ ajaxIndex: 'service.metrics.mapreduce.jobs_status',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_heap.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_heap.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_heap.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_heap.js Thu Apr 11 21:05:32 2013
@@ -31,8 +31,8 @@ App.ChartServiceMetricsMapReduce_JVMHeap
title: Em.I18n.t('services.service.info.metrics.mapreduce.jvmHeap'),
yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
renderer: 'line',
- sourceUrl: "/hosts/{jobTrackerNode}/host_components/JOBTRACKER?fields=metrics/jvm/memNonHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memNonHeapCommittedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memHeapCommittedM[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/mapreduce/jvm_heap.json",
+
+ ajaxIndex: 'service.metrics.mapreduce.jobs_heap',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_threads.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_threads.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_threads.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_threads.js Thu Apr 11 21:05:32 2013
@@ -30,8 +30,8 @@ App.ChartServiceMetricsMapReduce_JVMThre
id: "service-metrics-mapreduce-jvm-threads",
title: Em.I18n.t('services.service.info.metrics.mapreduce.jvmThreads'),
renderer: 'line',
- sourceUrl: "/hosts/{jobTrackerNode}/host_components/JOBTRACKER?fields=metrics/jvm/threadsRunnable[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsBlocked[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsWaiting[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsTimedWaiting[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/mapreduce/jvm_threads.json",
+
+ ajaxIndex: 'service.metrics.mapreduce.jobs_threads',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/map_slots.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/map_slots.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/map_slots.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/map_slots.js Thu Apr 11 21:05:32 2013
@@ -30,8 +30,8 @@ App.ChartServiceMetricsMapReduce_MapSlot
id: "service-metrics-mapreduce-map-slots",
title: Em.I18n.t('services.service.info.metrics.mapreduce.mapSlots'),
renderer: 'line',
- sourceUrl: "/services/MAPREDUCE/components/JOBTRACKER?fields=metrics/mapred/jobtracker/occupied_map_slots[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/reserved_map_slots[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/mapreduce/map_slots.json",
+
+ ajaxIndex: 'service.metrics.mapreduce.map_slots',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/reduce_slots.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/reduce_slots.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/reduce_slots.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/reduce_slots.js Thu Apr 11 21:05:32 2013
@@ -30,8 +30,8 @@ App.ChartServiceMetricsMapReduce_ReduceS
id: "service-metrics-mapreduce-reduce-slots",
title: Em.I18n.t('services.service.info.metrics.mapreduce.reduceSlots'),
renderer: 'line',
- sourceUrl: "/services/MAPREDUCE/components/JOBTRACKER?fields=metrics/mapred/jobtracker/occupied_reduce_slots[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/reserved_reduce_slots[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/mapreduce/reduce_slots.json",
+
+ ajaxIndex: 'service.metrics.mapreduce.reduce_slots',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/rpc.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/rpc.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/rpc.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/rpc.js Thu Apr 11 21:05:32 2013
@@ -30,8 +30,8 @@ App.ChartServiceMetricsMapReduce_RPC = A
id: "service-metrics-mapreduce-rpc",
title: Em.I18n.t('services.service.info.metrics.mapreduce.rpc'),
yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
- sourceUrl: "/hosts/{jobTrackerNode}/host_components/JOBTRACKER?fields=metrics/rpc/RpcQueueTime_avg_time[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/mapreduce/rpc.json",
+
+ ajaxIndex: 'service.metrics.mapreduce.rpc',
transformToSeries: function (jsonData) {
var seriesArray = [];
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/tasks_running_waiting.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/tasks_running_waiting.js?rev=1467084&r1=1467083&r2=1467084&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/tasks_running_waiting.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/mapreduce/tasks_running_waiting.js Thu Apr 11 21:05:32 2013
@@ -30,8 +30,8 @@ App.ChartServiceMetricsMapReduce_TasksRu
id: "service-metrics-mapreduce-tasks-running-waiting",
title: Em.I18n.t('services.service.info.metrics.mapreduce.tasksRunningWaiting'),
renderer: 'line',
- sourceUrl: "/services/MAPREDUCE/components/JOBTRACKER?fields=metrics/mapred/jobtracker/running_maps[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/running_reduces[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/waiting_maps[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/waiting_reduces[{fromSeconds},{toSeconds},{stepSeconds}]",
- mockUrl: "/data/services/metrics/mapreduce/tasks_running_waiting.json",
+
+ ajaxIndex: 'service.metrics.mapreduce.tasks_running_waiting',
transformToSeries: function (jsonData) {
var seriesArray = [];