You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2015/07/30 01:32:02 UTC
[1/3] ambari git commit: AMBARI-12557. Completion of service metrics
API call should not block login loading bar progress. (jaimin)
Repository: ambari
Updated Branches:
refs/heads/branch-2.1 410f48e6d -> caa54ce44
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/test/controllers/main/host/details_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/host/details_test.js b/ambari-web/test/controllers/main/host/details_test.js
index f9c48cf..5a6bbe0 100644
--- a/ambari-web/test/controllers/main/host/details_test.js
+++ b/ambari-web/test/controllers/main/host/details_test.js
@@ -267,19 +267,23 @@ describe('App.MainHostDetailsController', function () {
});
it('No host-components in active state', function () {
- controller.set('content', {hostComponents: [Em.Object.create({
- service: {
- isInPassive: true
- }
- })]});
+ controller.set('content', {
+ hostComponents: [Em.Object.create({
+ service: {
+ isInPassive: true
+ }
+ })]
+ });
expect(controller.get('serviceActiveComponents')).to.be.empty;
});
it('Host-components in active state', function () {
- controller.set('content', {hostComponents: [Em.Object.create({
- service: {
- isInPassive: false
- }
- })]});
+ controller.set('content', {
+ hostComponents: [Em.Object.create({
+ service: {
+ isInPassive: false
+ }
+ })]
+ });
expect(controller.get('serviceActiveComponents')).to.eql([Em.Object.create({
service: {
isInPassive: false
@@ -299,15 +303,19 @@ describe('App.MainHostDetailsController', function () {
});
it('Active host-component is client', function () {
- controller.reopen({serviceActiveComponents: [Em.Object.create({
- isClient: true
- })]});
+ controller.reopen({
+ serviceActiveComponents: [Em.Object.create({
+ isClient: true
+ })]
+ });
expect(controller.get('serviceNonClientActiveComponents')).to.be.empty;
});
it('Active host-component is not client', function () {
- controller.reopen({serviceActiveComponents: [Em.Object.create({
- isClient: false
- })]});
+ controller.reopen({
+ serviceActiveComponents: [Em.Object.create({
+ isClient: false
+ })]
+ });
expect(controller.get('serviceNonClientActiveComponents')).to.eql([Em.Object.create({
isClient: false
})]);
@@ -450,9 +458,11 @@ describe('App.MainHostDetailsController', function () {
sinon.spy(App, "showConfirmationPopup");
sinon.stub(controller, "addClientComponent", Em.K);
sinon.stub(controller, "primary", Em.K);
- controller.set('content', {hostComponents: [Em.Object.create({
- componentName: "HDFS_CLIENT"
- })]});
+ controller.set('content', {
+ hostComponents: [Em.Object.create({
+ componentName: "HDFS_CLIENT"
+ })]
+ });
controller.reopen({
securityEnabled: false
});
@@ -465,9 +475,11 @@ describe('App.MainHostDetailsController', function () {
});
it('add ZOOKEEPER_SERVER', function () {
- var event = {context: Em.Object.create({
- componentName: 'ZOOKEEPER_SERVER'
- })};
+ var event = {
+ context: Em.Object.create({
+ componentName: 'ZOOKEEPER_SERVER'
+ })
+ };
var popup = controller.addComponent(event);
expect(App.showConfirmationPopup.calledOnce).to.be.true;
popup.onPrimary();
@@ -476,9 +488,11 @@ describe('App.MainHostDetailsController', function () {
}))).to.be.true;
});
it('add slave component', function () {
- var event = {context: Em.Object.create({
- componentName: 'HIVE_CLIENT'
- })};
+ var event = {
+ context: Em.Object.create({
+ componentName: 'HIVE_CLIENT'
+ })
+ };
controller.set('securityEnabled', false);
controller.addComponent(event);
expect(controller.addClientComponent.calledWith(Em.Object.create({
@@ -589,7 +603,7 @@ describe('App.MainHostDetailsController', function () {
]
});
sinon.stub(App.router, "get").withArgs('updateController').returns({
- updateComponentsState: function(callback) {
+ updateComponentsState: function (callback) {
return callback();
}
});
@@ -868,17 +882,17 @@ describe('App.MainHostDetailsController', function () {
});
- describe("#saveConfigsBatch()", function() {
- it("no groups", function() {
+ describe("#saveConfigsBatch()", function () {
+ it("no groups", function () {
controller.saveConfigsBatch([]);
expect(App.ajax.send.called).to.be.false;
});
- it("configs is empty", function() {
+ it("configs is empty", function () {
controller.saveConfigsBatch([{}]);
expect(App.ajax.send.called).to.be.false;
});
- it("configs is correct", function() {
- controller.saveConfigsBatch([{'properties' : {'site': {}}, 'properties_attributes': {'site': {}}}]);
+ it("configs is correct", function () {
+ controller.saveConfigsBatch([{'properties': {'site': {}}, 'properties_attributes': {'site': {}}}]);
expect(App.ajax.send.calledOnce).to.be.true;
});
});
@@ -899,9 +913,11 @@ describe('App.MainHostDetailsController', function () {
});
App.propertyDidChange('isHaEnabled');
expect(controller.setZKConfigs(configs, 'host1:2181', [])).to.be.true;
- expect(configs).to.eql({"core-site": {
- "ha.zookeeper.quorum": "host1:2181"
- }});
+ expect(configs).to.eql({
+ "core-site": {
+ "ha.zookeeper.quorum": "host1:2181"
+ }
+ });
App.store.load(App.HostComponent, {
id: 'SECONDARY_NAMENODE_host1',
component_name: 'SECONDARY_NAMENODE'
@@ -911,25 +927,31 @@ describe('App.MainHostDetailsController', function () {
it('hbase-site is present', function () {
var configs = {'hbase-site': {}};
expect(controller.setZKConfigs(configs, '', ['host1', 'host2'])).to.be.true;
- expect(configs).to.eql({"hbase-site": {
- "hbase.zookeeper.quorum": "host1,host2"
- }});
+ expect(configs).to.eql({
+ "hbase-site": {
+ "hbase.zookeeper.quorum": "host1,host2"
+ }
+ });
});
it('webhcat-site is present', function () {
var configs = {'webhcat-site': {}};
expect(controller.setZKConfigs(configs, 'host1:2181', [])).to.be.true;
- expect(configs).to.eql({"webhcat-site": {
- "templeton.zookeeper.hosts": "host1:2181"
- }});
+ expect(configs).to.eql({
+ "webhcat-site": {
+ "templeton.zookeeper.hosts": "host1:2181"
+ }
+ });
});
it('hive-site is present and stack < 2.2', function () {
var version = App.get('currentStackVersion');
var configs = {'hive-site': {}};
App.set('currentStackVersion', 'HDP-2.1.0');
expect(controller.setZKConfigs(configs, 'host1:2181', [])).to.be.true;
- expect(configs).to.eql({"hive-site": {
- 'hive.cluster.delegation.token.store.zookeeper.connectString': "host1:2181"
- }});
+ expect(configs).to.eql({
+ "hive-site": {
+ 'hive.cluster.delegation.token.store.zookeeper.connectString': "host1:2181"
+ }
+ });
App.set('currentStackVersion', version);
});
it('hive-site is present and stack > 2.2', function () {
@@ -937,10 +959,12 @@ describe('App.MainHostDetailsController', function () {
var configs = {'hive-site': {}};
App.set('currentStackVersion', 'HDP-2.2.0');
expect(controller.setZKConfigs(configs, 'host1:2181', [])).to.be.true;
- expect(configs).to.eql({"hive-site": {
- 'hive.cluster.delegation.token.store.zookeeper.connectString': "host1:2181",
- 'hive.zookeeper.quorum': "host1:2181"
- }});
+ expect(configs).to.eql({
+ "hive-site": {
+ 'hive.cluster.delegation.token.store.zookeeper.connectString': "host1:2181",
+ 'hive.zookeeper.quorum': "host1:2181"
+ }
+ });
App.set('currentStackVersion', version);
});
it('yarn-site is present and stack > 2.2', function () {
@@ -948,26 +972,32 @@ describe('App.MainHostDetailsController', function () {
var configs = {'yarn-site': {}};
App.set('currentStackVersion', 'HDP-2.2.0');
expect(controller.setZKConfigs(configs, 'host1:2181', [])).to.be.true;
- expect(configs).to.eql({"yarn-site": {
- 'hadoop.registry.zk.quorum': "host1:2181",
- 'yarn.resourcemanager.zk-address': "host1:2181"
- }});
+ expect(configs).to.eql({
+ "yarn-site": {
+ 'hadoop.registry.zk.quorum': "host1:2181",
+ 'yarn.resourcemanager.zk-address': "host1:2181"
+ }
+ });
App.set('currentStackVersion', version);
});
it('storm-site is present', function () {
var configs = {'storm-site': {}};
expect(controller.setZKConfigs(configs, '', ["host1", 'host2'])).to.be.true;
- expect(configs).to.eql({"storm-site": {
- "storm.zookeeper.servers": "['host1','host2']"
- }});
+ expect(configs).to.eql({
+ "storm-site": {
+ "storm.zookeeper.servers": "['host1','host2']"
+ }
+ });
});
it('isRMHaEnabled true', function () {
var configs = {'yarn-site': {}};
sinon.stub(App, 'get').withArgs('isRMHaEnabled').returns(true);
expect(controller.setZKConfigs(configs, 'host1:2181', ['host1', 'host2'])).to.be.true;
- expect(configs).to.eql({"yarn-site": {
- "yarn.resourcemanager.zk-address": "host1:2181"
- }});
+ expect(configs).to.eql({
+ "yarn-site": {
+ "yarn.resourcemanager.zk-address": "host1:2181"
+ }
+ });
App.get.restore();
});
});
@@ -1015,7 +1045,8 @@ describe('App.MainHostDetailsController', function () {
controller.set('fromDeleteHost', false);
sinon.stub(App.HostComponent, 'find', function () {
return [
- {id: 'ZOOKEEPER_SERVER_host1',
+ {
+ id: 'ZOOKEEPER_SERVER_host1',
componentName: 'ZOOKEEPER_SERVER',
hostName: 'host1'
}
@@ -1027,7 +1058,8 @@ describe('App.MainHostDetailsController', function () {
it('One ZooKeeper host match current host name, fromDeleteHost = true', function () {
sinon.stub(App.HostComponent, 'find', function () {
return [
- {id: 'ZOOKEEPER_SERVER_host1',
+ {
+ id: 'ZOOKEEPER_SERVER_host1',
componentName: 'ZOOKEEPER_SERVER',
hostName: 'host1'
}
@@ -1042,7 +1074,8 @@ describe('App.MainHostDetailsController', function () {
it('One ZooKeeper host does not match current host name, fromDeleteHost = true', function () {
sinon.stub(App.HostComponent, 'find', function () {
return [
- {id: 'ZOOKEEPER_SERVER_host1',
+ {
+ id: 'ZOOKEEPER_SERVER_host1',
componentName: 'ZOOKEEPER_SERVER',
hostName: 'host1'
}
@@ -1328,9 +1361,11 @@ describe('App.MainHostDetailsController', function () {
expect(controller.showBackgroundOperationsPopup.calledOnce).to.be.true;
});
it('data has resources', function () {
- var data = {resources: [
- {RequestSchedule: {}}
- ]};
+ var data = {
+ resources: [
+ {RequestSchedule: {}}
+ ]
+ };
expect(controller.decommissionSuccessCallback(data)).to.be.true;
expect(controller.showBackgroundOperationsPopup.calledOnce).to.be.true;
});
@@ -1469,11 +1504,11 @@ describe('App.MainHostDetailsController', function () {
expect(App.showConfirmationPopup.calledOnce).to.be.true;
popup.onPrimary();
expect(controller.sendComponentCommand.calledWith(
- [
- {}
- ],
- Em.I18n.t('hosts.host.maintainance.startAllComponents.context'),
- App.HostComponentStatus.started)
+ [
+ {}
+ ],
+ Em.I18n.t('hosts.host.maintainance.startAllComponents.context'),
+ App.HostComponentStatus.started)
).to.be.true;
controller.sendComponentCommand.restore();
});
@@ -1508,11 +1543,11 @@ describe('App.MainHostDetailsController', function () {
expect(App.showConfirmationPopup.calledOnce).to.be.true;
popup.onPrimary();
expect(controller.sendComponentCommand.calledWith(
- [
- {}
- ],
- Em.I18n.t('hosts.host.maintainance.stopAllComponents.context'),
- App.HostComponentStatus.stopped)
+ [
+ {}
+ ],
+ Em.I18n.t('hosts.host.maintainance.stopAllComponents.context'),
+ App.HostComponentStatus.stopped)
).to.be.true;
controller.sendComponentCommand.restore();
});
@@ -1547,9 +1582,9 @@ describe('App.MainHostDetailsController', function () {
expect(App.showConfirmationPopup.calledOnce).to.be.true;
popup.onPrimary();
expect(batchUtils.restartHostComponents.calledWith(
- [
- {}
- ])
+ [
+ {}
+ ])
).to.be.true;
batchUtils.restartHostComponents.restore();
@@ -1577,11 +1612,13 @@ describe('App.MainHostDetailsController', function () {
});
it('content.hostComponents has ZOOKEEPER_SERVER', function () {
App.HostComponent.find().clear();
- controller.set('content', {hostComponents: [Em.Object.create({
- componentName: 'ZOOKEEPER_SERVER',
- workStatus: 'INIT',
- isDeletable: true
- })]});
+ controller.set('content', {
+ hostComponents: [Em.Object.create({
+ componentName: 'ZOOKEEPER_SERVER',
+ workStatus: 'INIT',
+ isDeletable: true
+ })]
+ });
expect(controller.getHostComponentsInfo().zkServerInstalled).to.be.true;
});
it('content.hostComponents has last component', function () {
@@ -1593,12 +1630,14 @@ describe('App.MainHostDetailsController', function () {
}
];
});
- controller.set('content', {hostComponents: [Em.Object.create({
- componentName: 'TASKTRACKER',
- displayName: 'TaskTracker',
- workStatus: 'INIT',
- isDeletable: true
- })]});
+ controller.set('content', {
+ hostComponents: [Em.Object.create({
+ componentName: 'TASKTRACKER',
+ displayName: 'TaskTracker',
+ workStatus: 'INIT',
+ isDeletable: true
+ })]
+ });
expect(controller.getHostComponentsInfo().lastComponents).to.eql(['TaskTracker']);
App.HostComponent.find.restore();
});
@@ -1611,13 +1650,15 @@ describe('App.MainHostDetailsController', function () {
}
];
});
- controller.set('content', {hostComponents: [Em.Object.create({
- componentName: 'TASKTRACKER',
- workStatus: 'INIT',
- isDeletable: false,
- isMaster: true,
- displayName: 'ZK1'
- })]});
+ controller.set('content', {
+ hostComponents: [Em.Object.create({
+ componentName: 'TASKTRACKER',
+ workStatus: 'INIT',
+ isDeletable: false,
+ isMaster: true,
+ displayName: 'ZK1'
+ })]
+ });
expect(controller.getHostComponentsInfo().masterComponents).to.eql(['ZK1']);
expect(controller.getHostComponentsInfo().nonDeletableComponents).to.eql(['ZK1']);
App.HostComponent.find.restore();
@@ -1631,12 +1672,14 @@ describe('App.MainHostDetailsController', function () {
}
];
});
- controller.set('content', {hostComponents: [Em.Object.create({
- componentName: 'TASKTRACKER',
- workStatus: 'STARTED',
- isDeletable: true,
- displayName: 'ZK1'
- })]});
+ controller.set('content', {
+ hostComponents: [Em.Object.create({
+ componentName: 'TASKTRACKER',
+ workStatus: 'STARTED',
+ isDeletable: true,
+ displayName: 'ZK1'
+ })]
+ });
expect(controller.getHostComponentsInfo().runningComponents).to.eql(['ZK1']);
App.HostComponent.find.restore();
});
@@ -1649,12 +1692,14 @@ describe('App.MainHostDetailsController', function () {
}
];
});
- controller.set('content', {hostComponents: [Em.Object.create({
- componentName: 'TASKTRACKER',
- workStatus: 'INIT',
- isDeletable: false,
- displayName: 'ZK1'
- })]});
+ controller.set('content', {
+ hostComponents: [Em.Object.create({
+ componentName: 'TASKTRACKER',
+ workStatus: 'INIT',
+ isDeletable: false,
+ displayName: 'ZK1'
+ })]
+ });
expect(controller.getHostComponentsInfo().nonDeletableComponents).to.eql(['ZK1']);
App.HostComponent.find.restore();
});
@@ -1667,12 +1712,14 @@ describe('App.MainHostDetailsController', function () {
}
];
});
- controller.set('content', {hostComponents: [Em.Object.create({
- componentName: 'TASKTRACKER',
- workStatus: 'UNKNOWN',
- isDeletable: false,
- displayName: 'ZK1'
- })]});
+ controller.set('content', {
+ hostComponents: [Em.Object.create({
+ componentName: 'TASKTRACKER',
+ workStatus: 'UNKNOWN',
+ isDeletable: false,
+ displayName: 'ZK1'
+ })]
+ });
expect(controller.getHostComponentsInfo().unknownComponents).to.eql(['ZK1']);
App.HostComponent.find.restore();
});
@@ -1696,9 +1743,11 @@ describe('App.MainHostDetailsController', function () {
});
it('masterComponents exist', function () {
- controller.set('mockHostComponentsInfo', {masterComponents: [
- {}
- ]});
+ controller.set('mockHostComponentsInfo', {
+ masterComponents: [
+ {}
+ ]
+ });
controller.validateAndDeleteHost();
expect(controller.raiseDeleteComponentsError.calledWith([
{}
@@ -1814,9 +1863,11 @@ describe('App.MainHostDetailsController', function () {
});
it('popup should be displayed', function () {
- controller.set('content', {componentsWithStaleConfigs: [
- {}
- ]});
+ controller.set('content', {
+ componentsWithStaleConfigs: [
+ {}
+ ]
+ });
var popup = controller.restartAllStaleConfigComponents();
expect(App.showConfirmationPopup.calledOnce).to.be.true;
popup.onPrimary();
@@ -2033,18 +2084,22 @@ describe('App.MainHostDetailsController', function () {
});
describe('#_doDeleteHostComponentSuccessCallback()', function () {
- beforeEach(function() {
+ beforeEach(function () {
sinon.stub(controller, 'removeHostComponentModel', Em.K);
+ sinon.stub(controller, 'isServiceMetricsLoaded', function (callback) {
+ callback();
+ });
});
- afterEach(function() {
+ afterEach(function () {
controller.removeHostComponentModel.restore();
+ controller.isServiceMetricsLoaded.restore();
});
it('ZOOKEEPER_SERVER component', function () {
var data = {
componentName: 'ZOOKEEPER_SERVER'
- }
+ };
sinon.stub(controller, 'loadConfigs', Em.K);
controller._doDeleteHostComponentSuccessCallback({}, {}, data);
expect(controller.get('_deletedHostComponentResult')).to.be.null;
@@ -2055,13 +2110,13 @@ describe('App.MainHostDetailsController', function () {
it('Not ZOOKEEPER_SERVER component', function () {
var data = {
componentName: 'COMP'
- }
+ };
controller.set('fromDeleteZkServer', false);
controller._doDeleteHostComponentSuccessCallback({}, {}, data);
expect(controller.get('_deletedHostComponentResult')).to.be.null;
expect(controller.get('fromDeleteZkServer')).to.be.false;
});
- it('should call `removeHostComponentModel` with correct params', function() {
+ it('should call `removeHostComponentModel` with correct params', function () {
var data = {
componentName: 'COMPONENT',
hostName: 'h1'
@@ -2109,10 +2164,14 @@ describe('App.MainHostDetailsController', function () {
beforeEach(function () {
sinon.stub(controller, 'removeObserver');
sinon.stub(controller, 'loadConfigs');
+ sinon.stub(controller, 'isServiceMetricsLoaded', function (callback) {
+ callback();
+ });
});
afterEach(function () {
controller.loadConfigs.restore();
controller.removeObserver.restore();
+ controller.isServiceMetricsLoaded.restore();
App.router.get.restore();
});
it('No operations of ZOOKEEPER_SERVER', function () {
@@ -2219,7 +2278,7 @@ describe('App.MainHostDetailsController', function () {
var params = {
component: Em.Object.create(),
passive_state: 'state'
- }
+ };
controller.updateHostComponent({}, {}, params);
expect(params.component.get('passiveState')).to.equal('state');
expect(batchUtils.infoPassiveState.calledWith('state')).to.be.true;
@@ -2237,9 +2296,11 @@ describe('App.MainHostDetailsController', function () {
controller.updateComponentPassiveState.restore();
});
it('passive state is ON', function () {
- var event = {context: Em.Object.create({
- passiveState: 'ON'
- })};
+ var event = {
+ context: Em.Object.create({
+ passiveState: 'ON'
+ })
+ };
var popup = controller.toggleMaintenanceMode(event);
expect(App.showConfirmationPopup.calledOnce).to.be.true;
popup.onPrimary();
@@ -2248,9 +2309,11 @@ describe('App.MainHostDetailsController', function () {
}), 'OFF')).to.be.true;
});
it('passive state is OFF', function () {
- var event = {context: Em.Object.create({
- passiveState: 'OFF'
- })};
+ var event = {
+ context: Em.Object.create({
+ passiveState: 'OFF'
+ })
+ };
var popup = controller.toggleMaintenanceMode(event);
expect(App.showConfirmationPopup.calledOnce).to.be.true;
popup.onPrimary();
@@ -2443,25 +2506,25 @@ describe('App.MainHostDetailsController', function () {
});
});
- describe("#doDeleteHost()", function() {
- beforeEach(function(){
+ describe("#doDeleteHost()", function () {
+ beforeEach(function () {
controller.set('fromDeleteHost', false);
controller.set('content.hostName', 'host1');
sinon.stub(controller, '_doDeleteHostComponent', function (comp, callback) {
callback();
});
});
- afterEach(function(){
+ afterEach(function () {
controller._doDeleteHostComponent.restore();
});
- it("Host has no components", function() {
+ it("Host has no components", function () {
controller.set('content.hostComponents', Em.A([]));
controller.doDeleteHost(Em.K);
expect(controller.get('fromDeleteHost')).to.be.true;
expect(App.ajax.send.getCall(0).args[0].data.hostName).to.be.equal('host1');
expect(App.ajax.send.getCall(0).args[0].name).to.be.equal('common.delete.host');
});
- it("Host has components", function() {
+ it("Host has components", function () {
controller.set('content.hostComponents', Em.A([Em.Object.create({
componentName: 'COMP1'
})]));
@@ -2475,10 +2538,10 @@ describe('App.MainHostDetailsController', function () {
});
});
- describe("#deleteHostSuccessCallback", function() {
- it("call updateHost", function() {
+ describe("#deleteHostSuccessCallback", function () {
+ it("call updateHost", function () {
var mock = {
- updateHost: function(callback){
+ updateHost: function (callback) {
callback();
},
getAllHostNames: Em.K
@@ -2488,6 +2551,9 @@ describe('App.MainHostDetailsController', function () {
sinon.spy(mock, 'getAllHostNames');
sinon.stub(controller, 'loadConfigs', Em.K);
sinon.stub(App.router, 'transitionTo', Em.K);
+ sinon.stub(controller, 'isServiceMetricsLoaded', function (callback) {
+ callback();
+ });
controller.deleteHostSuccessCallback();
expect(App.router.get.calledWith('updateController')).to.be.true;
@@ -2501,19 +2567,27 @@ describe('App.MainHostDetailsController', function () {
mock.updateHost.restore();
mock.getAllHostNames.restore();
controller.loadConfigs.restore();
+ controller.isServiceMetricsLoaded.restore();
App.router.transitionTo.restore();
});
});
- describe("#deleteHostErrorCallback", function() {
- it("call defaultErrorHandler", function() {
+ describe("#deleteHostErrorCallback", function () {
+ it("call defaultErrorHandler", function () {
sinon.stub(controller, 'loadConfigs', Em.K);
sinon.stub(App.ajax, 'defaultErrorHandler', Em.K);
- controller.deleteHostErrorCallback({status: 'status', statusText: "statusText"}, 'textStatus', 'errorThrown', {url: 'url'});
+ sinon.stub(controller, 'isServiceMetricsLoaded', function (callback) {
+ callback();
+ });
+ controller.deleteHostErrorCallback({
+ status: 'status',
+ statusText: "statusText"
+ }, 'textStatus', 'errorThrown', {url: 'url'});
expect(controller.loadConfigs.calledOnce).to.be.true;
expect(App.ajax.defaultErrorHandler.calledOnce).to.be.true;
App.ajax.defaultErrorHandler.restore();
controller.loadConfigs.restore();
+ controller.isServiceMetricsLoaded.restore();
});
});
@@ -2538,8 +2612,8 @@ describe('App.MainHostDetailsController', function () {
});
- describe("#installVersion()", function() {
- it("call App.ajax.send", function() {
+ describe("#installVersion()", function () {
+ it("call App.ajax.send", function () {
controller.set('content.hostName', 'host1');
controller.installVersion({context: {}});
expect(App.ajax.send.getCall(0).args[0]).to.eql({
@@ -2571,7 +2645,7 @@ describe('App.MainHostDetailsController', function () {
status: 'INIT'
});
this.mock.returns(version);
- controller.installVersionSuccessCallback({Requests:{id: 1}}, {}, {version: version});
+ controller.installVersionSuccessCallback({Requests: {id: 1}}, {}, {version: version});
expect(version.get('status')).to.equal('INSTALLING');
expect(App.db.set.calledWith('repoVersionInstall', 'id', [1])).to.be.true;
expect(App.clusterStatus.setClusterStatus.calledOnce).to.be.true;
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/test/views/main/service/info/summary_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/service/info/summary_test.js b/ambari-web/test/views/main/service/info/summary_test.js
index 7511cd3..b6ac8d3 100644
--- a/ambari-web/test/views/main/service/info/summary_test.js
+++ b/ambari-web/test/views/main/service/info/summary_test.js
@@ -174,7 +174,7 @@ describe('App.MainServiceInfoSummaryView', function() {
cases.forEach(function (item) {
it(item.title, function () {
- view.set('service.serviceName', item.serviceName);
+ view.set('controller.content.serviceName', item.serviceName);
this.mock.withArgs('isStormMetricsSupported').returns(item.isStormMetricsSupported);
view.didInsertElement();
expect(view.constructGraphObjects.calledOnce).to.equal(item.isConstructGraphObjectsCalled);
[3/3] ambari git commit: AMBARI-12557. Completion of service metrics
API call should not block login loading bar progress. (jaimin)
Posted by ja...@apache.org.
AMBARI-12557. Completion of service metrics API call should not block login loading bar progress. (jaimin)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/caa54ce4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/caa54ce4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/caa54ce4
Branch: refs/heads/branch-2.1
Commit: caa54ce44579e9be5a47939a62fdee0d16736657
Parents: 410f48e
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Wed Jul 29 16:30:47 2015 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Wed Jul 29 16:30:47 2015 -0700
----------------------------------------------------------------------
ambari-web/app/app.js | 2 +-
.../controllers/global/cluster_controller.js | 34 +-
.../app/controllers/main/admin/kerberos.js | 4 +-
ambari-web/app/controllers/main/host/details.js | 182 ++++++----
ambari-web/app/controllers/main/service/item.js | 2 +-
ambari-web/app/data/service_graph_config.js | 45 ---
.../app/mappers/components_state_mapper.js | 26 +-
ambari-web/app/mappers/service_mapper.js | 30 +-
.../app/mappers/service_metrics_mapper.js | 1 -
ambari-web/app/messages.js | 1 +
.../app/mixins/common/widgets/widget_mixin.js | 21 +-
.../details/host_components/decommissionable.js | 42 ++-
ambari-web/app/models/host_component.js | 2 +-
ambari-web/app/routes/add_service_routes.js | 6 +-
ambari-web/app/routes/main.js | 74 ++--
ambari-web/app/routes/reassign_master_routes.js | 10 +-
ambari-web/app/styles/application.less | 3 +
.../main/dashboard/widgets/hbase_links.hbs | 93 ++---
.../main/dashboard/widgets/pie_chart.hbs | 44 ++-
.../main/dashboard/widgets/simple_text.hbs | 35 +-
.../templates/main/dashboard/widgets/uptime.hbs | 42 ++-
.../main/dashboard/widgets/yarn_links.hbs | 105 +++---
.../app/templates/main/service/info/summary.hbs | 161 +++++----
.../templates/main/service/services/hbase.hbs | 8 +-
.../templates/main/service/services/hdfs.hbs | 10 +-
.../templates/main/service/services/storm.hbs | 4 +-
.../templates/main/service/services/yarn.hbs | 4 +-
ambari-web/app/views.js | 24 --
ambari-web/app/views/main/dashboard/widget.js | 6 +
.../main/dashboard/widgets/links_widget.js | 2 +-
.../main/dashboard/widgets/namenode_cpu.js | 44 +--
.../host_component_views/datanode_view.js | 2 +-
ambari-web/app/views/main/host/summary.js | 2 +-
.../info/metrics/hbase/cluster_requests.js | 55 ---
.../info/metrics/hbase/hlog_split_size.js | 56 ---
.../info/metrics/hbase/hlog_split_time.js | 56 ---
.../metrics/hbase/regionserver_queuesize.js | 58 ---
.../info/metrics/hbase/regionserver_regions.js | 55 ---
.../metrics/hbase/regionserver_rw_requests.js | 60 ---
.../service/info/metrics/hdfs/block_status.js | 59 ---
.../info/metrics/hdfs/file_operations.js | 64 ----
.../views/main/service/info/metrics/hdfs/gc.js | 56 ---
.../views/main/service/info/metrics/hdfs/io.js | 60 ---
.../main/service/info/metrics/hdfs/jvm_heap.js | 71 ----
.../service/info/metrics/hdfs/jvm_threads.js | 65 ----
.../views/main/service/info/metrics/hdfs/rpc.js | 56 ---
.../info/metrics/hdfs/space_utilization.js | 66 ----
.../main/service/info/metrics/yarn/allocated.js | 67 ----
.../info/metrics/yarn/allocated_container.js | 61 ----
.../info/metrics/yarn/apps_current_states.js | 58 ---
.../info/metrics/yarn/apps_finished_states.js | 66 ----
.../views/main/service/info/metrics/yarn/gc.js | 56 ---
.../main/service/info/metrics/yarn/jvm_heap.js | 71 ----
.../service/info/metrics/yarn/jvm_threads.js | 66 ----
.../views/main/service/info/metrics/yarn/nms.js | 67 ----
.../views/main/service/info/metrics/yarn/qmr.js | 85 -----
.../views/main/service/info/metrics/yarn/rpc.js | 56 ---
.../app/views/main/service/info/summary.js | 4 +-
.../app/views/main/service/services/hdfs.js | 18 -
.../test/controllers/main/host/details_test.js | 362 +++++++++++--------
.../views/main/service/info/summary_test.js | 2 +-
61 files changed, 767 insertions(+), 2180 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/app.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js
index 0683818..dfcfb95 100644
--- a/ambari-web/app/app.js
+++ b/ambari-web/app/app.js
@@ -217,7 +217,7 @@ module.exports = Em.Application.create({
isHaEnabled: function () {
var isHDFSInstalled = App.Service.find().findProperty('serviceName','HDFS');
return !!isHDFSInstalled && !this.HostComponent.find().someProperty('componentName', 'SECONDARY_NAMENODE');
- }.property('router.clusterController.isLoaded', 'router.clusterController.dataLoadList.serviceMetrics'),
+ }.property('router.clusterController.dataLoadList.services', 'router.clusterController.isServiceContentFullyLoaded'),
/**
* If ResourceManager High Availability is enabled
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/controllers/global/cluster_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/cluster_controller.js b/ambari-web/app/controllers/global/cluster_controller.js
index b16de85..e4a74c0 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -35,12 +35,20 @@ App.ClusterController = Em.Controller.extend({
isConfigsPropertiesLoaded: false,
+ isComponentsConfigLoaded: false,
+
isStackConfigsLoaded: false,
+ isServiceMetricsLoaded: false,
+
isHostContentLoaded: function () {
return this.get('isHostsLoaded') && this.get('isComponentsStateLoaded');
}.property('isHostsLoaded', 'isComponentsStateLoaded'),
+ isServiceContentFullyLoaded: function () {
+ return this.get('isServiceMetricsLoaded') && this.get('isComponentsStateLoaded') && this.get('isComponentsConfigLoaded');
+ }.property('isServiceMetricsLoaded', 'isComponentsStateLoaded', 'isComponentsConfigLoaded'),
+
clusterName: function () {
return App.get('clusterName');
}.property('App.clusterName'),
@@ -68,7 +76,6 @@ App.ClusterController = Em.Controller.extend({
},
dataLoadList: Em.Object.create({
- 'serviceMetrics': false,
'stackComponents': false,
'services': false
}),
@@ -208,10 +215,18 @@ App.ClusterController = Em.Controller.extend({
self.updateLoadStatus('stackComponents');
updater.updateServices(function () {
self.updateLoadStatus('services');
+ App.config.loadConfigsFromStack(App.Service.find().mapProperty('serviceName')).complete(function () {
+ self.set('isConfigsPropertiesLoaded', true);
+ });
+ // service metrics loading doesn't affect overall progress
updater.updateServiceMetric(function () {
- self.updateLoadStatus('serviceMetrics');
- App.config.loadConfigsFromStack(App.Service.find().mapProperty('serviceName')).complete(function () {
- self.set('isConfigsPropertiesLoaded', true);
+ self.set('isServiceMetricsLoaded', true);
+ // components config and state loading doesn't affect overall progress
+ updater.updateComponentConfig(function () {
+ self.set('isComponentsConfigLoaded', true);
+ });
+ updater.updateComponentsState(function () {
+ self.set('isComponentsStateLoaded', true);
});
});
});
@@ -229,24 +244,19 @@ App.ClusterController = Em.Controller.extend({
updater.updateAlertGroups(function () {
updater.updateAlertDefinitions(function () {
updater.updateAlertDefinitionSummary(function () {
- updater.updateUnhealthyAlertInstances(function() {
+ updater.updateUnhealthyAlertInstances(function () {
self.set('isAlertsLoaded', true);
});
});
});
});
- // components state and config loading doesn't affect overall progress
- updater.updateComponentConfig(Em.K);
- updater.updateComponentsState(function () {
- self.set('isComponentsStateLoaded', true);
- });
/* Root service mapper maps all the data exposed under Ambari root service which includes ambari configurations i.e ambari-properties
** This is useful information but its not being used in the code anywhere as of now
self.loadRootService().done(function (data) {
- App.rootServiceMapper.map(data);
- self.updateLoadStatus('rootService');
+ App.rootServiceMapper.map(data);
+ self.updateLoadStatus('rootService');
});
*/
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/controllers/main/admin/kerberos.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/kerberos.js b/ambari-web/app/controllers/main/admin/kerberos.js
index 2bc7cfd..2ff79f0 100644
--- a/ambari-web/app/controllers/main/admin/kerberos.js
+++ b/ambari-web/app/controllers/main/admin/kerberos.js
@@ -366,7 +366,7 @@ App.MainAdminKerberosController = App.KerberosWizardStep4Controller.extend({
},
getKDCSessionState: function(callback, kdcCancelHandler) {
- if (this.get('securityEnabled')) {
+ if (this.get('securityEnabled') || App.get('isKerberosEnabled')) {
App.ajax.send({
name: 'kerberos.session.state',
sender: this,
@@ -382,7 +382,7 @@ App.MainAdminKerberosController = App.KerberosWizardStep4Controller.extend({
},
getSecurityType: function (callback) {
- if (this.get('securityEnabled')) {
+ if (this.get('securityEnabled') || App.get('isKerberosEnabled')) {
return App.ajax.send({
name: 'admin.security.cluster_configs.kerberos',
sender: this,
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/controllers/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js
index 29d66b0..23b92a3 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -347,14 +347,18 @@ App.MainHostDetailsController = Em.Controller.extend({
if (data.componentName == 'ZOOKEEPER_SERVER') {
this.set('fromDeleteZkServer', true);
this.updateStormConfigs();
- this.loadConfigs();
+ var self = this;
+ var callback = function () {
+ self.loadConfigs();
+ };
+ self.isServiceMetricsLoaded(callback);
} else if (data.componentName == 'HIVE_METASTORE') {
this.set('deleteHiveMetaStore', true);
this.loadConfigs('loadHiveConfigs');
- } else if(data.componentName == 'NIMBUS') {
+ } else if (data.componentName == 'NIMBUS') {
this.set('deleteNimbusHost', true);
this.loadConfigs('loadStormConfigs');
- } else if(data.componentName == 'RANGER_KMS_SERVER') {
+ } else if (data.componentName == 'RANGER_KMS_SERVER') {
this.set('deleteRangerKMSServer', true);
this.loadConfigs('loadRangerConfigs');
}
@@ -380,7 +384,7 @@ App.MainHostDetailsController = Em.Controller.extend({
* @param {String} componentName
* @param {String} hostName
*/
- removeHostComponentModel: function(componentName, hostName) {
+ removeHostComponentModel: function (componentName, hostName) {
var component = App.HostComponent.find().filterProperty('componentName', componentName).findProperty('hostName', hostName);
var serviceInCache = App.cache['services'].findProperty('ServiceInfo.service_name', component.get('service.serviceName'));
serviceInCache.host_components = serviceInCache.host_components.without(component.get('id'));
@@ -491,7 +495,7 @@ App.MainHostDetailsController = Em.Controller.extend({
if (!!missedComponents.length) {
var popupMessage = Em.I18n.t('host.host.addComponent.popup.dependedComponents.body').format(component.get('displayName'),
- stringUtils.getFormattedStringFromArray(missedComponents.map(function(cName) {
+ stringUtils.getFormattedStringFromArray(missedComponents.map(function (cName) {
return App.StackServiceComponent.find(cName).get('displayName');
})));
return App.showAlertPopup(Em.I18n.t('host.host.addComponent.popup.dependedComponents.header'), popupMessage);
@@ -510,20 +514,20 @@ App.MainHostDetailsController = Em.Controller.extend({
}, Em.I18n.t('hosts.host.addComponent.' + componentName) + manualKerberosWarning);
break;
case 'NIMBUS':
- returnFunc = App.showConfirmationPopup(function() {
- self.set('nimbusHost', hostName);
- self.loadConfigs("loadStormConfigs");
+ returnFunc = App.showConfirmationPopup(function () {
+ self.set('nimbusHost', hostName);
+ self.loadConfigs("loadStormConfigs");
}, Em.I18n.t('hosts.host.addComponent.' + componentName) + manualKerberosWarning);
break;
case 'RANGER_KMS_SERVER':
- returnFunc = App.showConfirmationPopup(function() {
+ returnFunc = App.showConfirmationPopup(function () {
self.set('rangerKMSServerHost', hostName);
self.loadConfigs("loadRangerConfigs");
}, Em.I18n.t('hosts.host.addComponent.' + componentName) + manualKerberosWarning);
break;
default:
returnFunc = this.addClientComponent(component, isManualKerberos);
- }
+ }
return returnFunc;
},
/**
@@ -617,7 +621,7 @@ App.MainHostDetailsController = Em.Controller.extend({
'App.router.backgroundOperationsController.serviceTimestamp',
self,
(params.componentName === 'ZOOKEEPER_SERVER' ? self.checkZkConfigs : self.checkHiveDone)
- );
+ );
params.componentName === 'ZOOKEEPER_SERVER' ? self.checkZkConfigs() : self.checkHiveDone();
}
});
@@ -675,7 +679,7 @@ App.MainHostDetailsController = Em.Controller.extend({
*/
onLoadOozieConfigs: function (data) {
var configs = {};
- data.items.forEach(function(item) {
+ data.items.forEach(function (item) {
$.extend(configs, item.properties);
});
this.set('isOozieServerAddable', !(Em.isEmpty(configs["oozie_database"]) || configs["oozie_database"] === 'New Derby Database'));
@@ -693,7 +697,7 @@ App.MainHostDetailsController = Em.Controller.extend({
name: 'admin.get.all_configurations',
sender: this,
data: {
- urlParams: '(type=storm-site&tag=' + data.Clusters.desired_configs['storm-site'].tag +')'
+ urlParams: '(type=storm-site&tag=' + data.Clusters.desired_configs['storm-site'].tag + ')'
},
success: 'onLoadStormConfigs'
});
@@ -704,7 +708,7 @@ App.MainHostDetailsController = Em.Controller.extend({
* @param {object} configs
* @method updateZkConfigs
*/
- updateZkConfigs: function(configs) {
+ updateZkConfigs: function (configs) {
var zks = this.getZkServerHosts();
var portValue = configs['zoo.cfg'] && Em.get(configs['zoo.cfg'], 'clientPort');
var zkPort = typeof portValue === 'udefined' ? '2181' : portValue;
@@ -717,11 +721,11 @@ App.MainHostDetailsController = Em.Controller.extend({
* @param {object} data
* @method onLoadStormConfigs
*/
- onLoadStormConfigs: function (data) {
+ onLoadStormConfigs: function (data) {
var nimbusHost = this.get('nimbusHost'),
- stormNimbusHosts = this.getStormNimbusHosts(),
- configs = {},
- attributes = {};
+ stormNimbusHosts = this.getStormNimbusHosts(),
+ configs = {},
+ attributes = {};
data.items.forEach(function (item) {
configs[item.type] = item.properties;
@@ -742,7 +746,7 @@ App.MainHostDetailsController = Em.Controller.extend({
}
];
this.saveConfigsBatch(groups, 'NIMBUS', nimbusHost);
- },
+ },
/**
* Success callback for load configs request
@@ -755,8 +759,8 @@ App.MainHostDetailsController = Em.Controller.extend({
sender: this,
data: {
urlParams: '(type=hive-site&tag=' + data.Clusters.desired_configs['hive-site'].tag + ')|(type=webhcat-site&tag=' +
- data.Clusters.desired_configs['webhcat-site'].tag + ')|(type=hive-env&tag=' + data.Clusters.desired_configs['hive-env'].tag +
- ')|(type=core-site&tag=' + data.Clusters.desired_configs['core-site'].tag + ')'
+ data.Clusters.desired_configs['webhcat-site'].tag + ')|(type=hive-env&tag=' + data.Clusters.desired_configs['hive-env'].tag +
+ ')|(type=core-site&tag=' + data.Clusters.desired_configs['core-site'].tag + ')'
},
success: 'onLoadHiveConfigs'
});
@@ -867,7 +871,7 @@ App.MainHostDetailsController = Em.Controller.extend({
* @param opt
* @param params
*/
- installHostComponent: function(data, opt, params) {
+ installHostComponent: function (data, opt, params) {
if (params.host) {
componentsUtils.installHostComponent(params.host, App.StackServiceComponent.find(params.componentName));
}
@@ -883,7 +887,7 @@ App.MainHostDetailsController = Em.Controller.extend({
hiveHosts = App.HostComponent.find().filterProperty('componentName', 'HIVE_METASTORE').mapProperty('hostName'),
hiveMetastoreHost = this.get('hiveMetastoreHost');
- if(!!hiveMetastoreHost){
+ if (!!hiveMetastoreHost) {
hiveHosts.push(hiveMetastoreHost);
this.set('hiveMetastoreHost', '');
}
@@ -951,7 +955,7 @@ App.MainHostDetailsController = Em.Controller.extend({
var rkmsHosts = App.HostComponent.find().filterProperty('componentName', 'RANGER_KMS_SERVER').mapProperty('hostName');
var rangerKMSServerHost = this.get('rangerKMSServerHost');
- if(!!rangerKMSServerHost){
+ if (!!rangerKMSServerHost) {
rkmsHosts.push(rangerKMSServerHost);
this.set('rangerKMSServerHost', '');
}
@@ -975,7 +979,7 @@ App.MainHostDetailsController = Em.Controller.extend({
stormNimbusHosts = App.HostComponent.find().filterProperty('componentName', 'NIMBUS').mapProperty('hostName'),
nimbusHost = this.get('nimbusHost');
- if(!!nimbusHost){
+ if (!!nimbusHost) {
stormNimbusHosts.push(nimbusHost);
this.set('nimbusHost', '');
}
@@ -1036,11 +1040,11 @@ App.MainHostDetailsController = Em.Controller.extend({
this.showBackgroundOperationsPopup();
},
- /**
+ /**
* Update storm config
* @method updateStormConfigs
*/
- updateStormConfigs: function() {
+ updateStormConfigs: function () {
if (App.Service.find().findProperty('serviceName', 'STORM')) {
this.loadConfigs("loadStormConfigs");
}
@@ -1057,12 +1061,17 @@ App.MainHostDetailsController = Em.Controller.extend({
this.removeObserver('App.router.backgroundOperationsController.serviceTimestamp', this, this.checkZkConfigs);
setTimeout(function () {
self.updateStormConfigs();
- self.loadConfigs();
+ var callback = function () {
+ self.loadConfigs();
+ };
+ self.isServiceMetricsLoaded(callback);
}, App.get('componentsUpdateInterval'));
}
},
/**
+ * This function should be always called from successcallback function of the promise `App.router.get('mainController').isLoading.call(App.router.get('clusterController'), 'isServiceContentFullyLoaded').done(promise)`
+ * This is required to make sure that service metrics API determining the HA state of components is loaded
* Load configs
* @method loadConfigs
*/
@@ -1503,7 +1512,7 @@ App.MainHostDetailsController = Em.Controller.extend({
"RequestInfo": {
"context": Em.I18n.t('hosts.host.regionserver.decommission.batch1'),
"command": "DECOMMISSION",
- "exclusive" :"true",
+ "exclusive": "true",
"parameters": {
"slave_type": slaveType,
"excluded_hosts": hostNames
@@ -1548,32 +1557,32 @@ App.MainHostDetailsController = Em.Controller.extend({
id++;
}
batches.push({
- "order_id": id,
- "type": "POST",
- "uri": App.get('apiPrefix') + "/clusters/" + App.get('clusterName') + "/requests",
- "RequestBodyInfo": {
- "RequestInfo": {
- "context": Em.I18n.t('hosts.host.regionserver.decommission.batch3'),
- "command": "DECOMMISSION",
- "service_name": serviceName,
- "component_name": componentName,
- "parameters": {
- "slave_type": slaveType,
- "excluded_hosts": hostNames,
- "mark_draining_only": true
- },
- 'operation_level': {
- level: "HOST_COMPONENT",
- cluster_name: App.get('clusterName'),
- host_name: hostNames,
- service_name: serviceName
- }
+ "order_id": id,
+ "type": "POST",
+ "uri": App.get('apiPrefix') + "/clusters/" + App.get('clusterName') + "/requests",
+ "RequestBodyInfo": {
+ "RequestInfo": {
+ "context": Em.I18n.t('hosts.host.regionserver.decommission.batch3'),
+ "command": "DECOMMISSION",
+ "service_name": serviceName,
+ "component_name": componentName,
+ "parameters": {
+ "slave_type": slaveType,
+ "excluded_hosts": hostNames,
+ "mark_draining_only": true
},
- "Requests/resource_filters": [
- {"service_name": serviceName, "component_name": componentName}
- ]
- }
- });
+ 'operation_level': {
+ level: "HOST_COMPONENT",
+ cluster_name: App.get('clusterName'),
+ host_name: hostNames,
+ service_name: serviceName
+ }
+ },
+ "Requests/resource_filters": [
+ {"service_name": serviceName, "component_name": componentName}
+ ]
+ }
+ });
App.ajax.send({
name: 'host.host_component.recommission_and_restart',
sender: this,
@@ -1643,7 +1652,7 @@ App.MainHostDetailsController = Em.Controller.extend({
"RequestInfo": {
"context": context_1,
"command": "DECOMMISSION",
- "exclusive":"true",
+ "exclusive": "true",
"parameters": params,
'operation_level': {
level: "HOST_COMPONENT",
@@ -1660,7 +1669,7 @@ App.MainHostDetailsController = Em.Controller.extend({
var id = 2;
var hAray = hostNames.split(",");
for (var i = 0; i < hAray.length; i++) {
- batches.push( {
+ batches.push({
"order_id": id,
"type": "PUT",
"uri": App.get('apiPrefix') + "/clusters/" + App.get('clusterName') + "/hosts/" + hAray[i] + "/host_components/" + slaveType,
@@ -2073,10 +2082,13 @@ App.MainHostDetailsController = Em.Controller.extend({
if (!!App.Service.find().findProperty('serviceName', 'HIVE')) {
self.loadConfigs('loadHiveConfigs');
}
- self.loadConfigs();
+ var callback = function () {
+ self.loadConfigs();
+ };
+ self.isServiceMetricsLoaded(callback);
App.router.transitionTo('hosts.index');
});
- if(!!(requestBody && requestBody.hostName))
+ if (!!(requestBody && requestBody.hostName))
App.hostsMapper.deleteRecord(App.Host.find().findProperty('hostName', requestBody.hostName));
App.router.get('clusterController').getAllHostNames();
},
@@ -2085,7 +2097,11 @@ App.MainHostDetailsController = Em.Controller.extend({
console.log(textStatus);
console.log(errorThrown);
xhr.responseText = "{\"message\": \"" + xhr.statusText + "\"}";
- this.loadConfigs();
+ var self = this;
+ var callback = function () {
+ self.loadConfigs();
+ };
+ self.isServiceMetricsLoaded(callback);
App.ajax.defaultErrorHandler(xhr, opt.url, 'DELETE', xhr.status);
},
@@ -2151,7 +2167,7 @@ App.MainHostDetailsController = Em.Controller.extend({
});
},
- installClients: function(event) {
+ installClients: function (event) {
var clientsToInstall = [],
clientsToAdd = [],
missedComponents = [],
@@ -2169,8 +2185,8 @@ App.MainHostDetailsController = Em.Controller.extend({
scope: 'host',
installedComponents: this.get('content.hostComponents').mapProperty('componentName')
}).reject(function (componentName) {
- return array.mapProperty('componentName').contains(componentName);
- });
+ return array.mapProperty('componentName').contains(componentName);
+ });
if (dependencies.length) {
missedComponents.pushObjects(dependencies);
dependentComponents.push(component.get('displayName'));
@@ -2179,7 +2195,7 @@ App.MainHostDetailsController = Em.Controller.extend({
missedComponents = missedComponents.uniq();
if (missedComponents.length) {
var popupMessage = Em.I18n.t('host.host.addComponent.popup.clients.dependedComponents.body').format(stringUtils.getFormattedStringFromArray(dependentComponents),
- stringUtils.getFormattedStringFromArray(missedComponents.map(function(componentName) {
+ stringUtils.getFormattedStringFromArray(missedComponents.map(function (componentName) {
return App.StackServiceComponent.find(componentName).get('displayName');
})));
App.showAlertPopup(Em.I18n.t('host.host.addComponent.popup.dependedComponents.header'), popupMessage);
@@ -2212,40 +2228,41 @@ App.MainHostDetailsController = Em.Controller.extend({
* On click handler for custom command from items menu
* @param context
*/
- executeCustomCommand: function(event) {
+ executeCustomCommand: function (event) {
var controller = this;
var context = event.context;
- return App.showConfirmationPopup(function() {
+ return App.showConfirmationPopup(function () {
App.ajax.send({
- name : 'service.item.executeCustomCommand',
+ name: 'service.item.executeCustomCommand',
sender: controller,
- data : {
- command : context.command,
- context : context.context || Em.I18n.t('services.service.actions.run.executeCustomCommand.context').format(context.command),
- hosts : context.hosts,
- serviceName : context.service,
- componentName : context.component
+ data: {
+ command: context.command,
+ context: context.context || Em.I18n.t('services.service.actions.run.executeCustomCommand.context').format(context.command),
+ hosts: context.hosts,
+ serviceName: context.service,
+ componentName: context.component
},
- success : 'executeCustomCommandSuccessCallback',
- error : 'executeCustomCommandErrorCallback'
+ success: 'executeCustomCommandSuccessCallback',
+ error: 'executeCustomCommandErrorCallback'
});
});
},
- executeCustomCommandSuccessCallback : function(data, ajaxOptions, params) {
+ executeCustomCommandSuccessCallback: function (data, ajaxOptions, params) {
if (data.Requests.id) {
App.router.get('backgroundOperationsController').showPopup();
} else {
console.warn('Error during execution of ' + params.command + ' custom command on' + params.componentName);
}
},
- executeCustomCommandErrorCallback : function(data) {
+ executeCustomCommandErrorCallback: function (data) {
var error = Em.I18n.t('services.service.actions.run.executeCustomCommand.error');
- if(data && data.responseText){
+ if (data && data.responseText) {
try {
var json = $.parseJSON(data.responseText);
error += json.message;
- } catch (err) {}
+ } catch (err) {
+ }
}
App.showAlertPopup(Em.I18n.t('services.service.actions.run.executeCustomCommand.error'), error);
console.warn('Error during executing custom command');
@@ -2295,5 +2312,14 @@ App.MainHostDetailsController = Em.Controller.extend({
wizardControllerName: this.get('name'),
localdb: App.db.data
});
+ },
+
+ /**
+ *
+ * @param callback
+ */
+ isServiceMetricsLoaded: function(callback) {
+ var self = this;
+ App.router.get('mainController').isLoading.call(App.router.get('clusterController'), 'isServiceContentFullyLoaded').done(callback);
}
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/controllers/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js
index ea7488e..57bcc44 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -739,7 +739,7 @@ App.MainServiceItemController = Em.Controller.extend({
return false;
}
return (this.get('content.healthStatus') != 'green');
- }.property('content.healthStatus','isPending'),
+ }.property('content.healthStatus','isPending', 'App.isHaEnabled'),
/**
* Determine if service has than one service client components
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/data/service_graph_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/service_graph_config.js b/ambari-web/app/data/service_graph_config.js
index e660b5f..06cefba 100644
--- a/ambari-web/app/data/service_graph_config.js
+++ b/ambari-web/app/data/service_graph_config.js
@@ -28,40 +28,6 @@ var App = require('app');
**/
module.exports = {
- allServices: {
- 'hdfs': [
- 'HDFS_SpaceUtilization',
- 'HDFS_FileOperations',
- 'HDFS_BlockStatus',
- 'HDFS_IO',
- 'HDFS_RPC',
- 'HDFS_GC',
- 'HDFS_JVMHeap',
- 'HDFS_JVMThreads'
- ],
-
- 'yarn': [
- 'YARN_AllocatedMemory',
- 'YARN_QMR',
- 'YARN_AllocatedContainer',
- 'YARN_NMS',
- 'YARN_ApplicationCurrentStates',
- 'YARN_ApplicationFinishedStates',
- 'YARN_RPC',
- 'YARN_GC',
- 'YARN_JVMThreads',
- 'YARN_JVMHeap'
- ],
-
- 'hbase': [
- 'HBASE_ClusterRequests',
- 'HBASE_RegionServerReadWriteRequests',
- 'HBASE_RegionServerRegions',
- 'HBASE_RegionServerQueueSize',
- 'HBASE_HlogSplitTime',
- 'HBASE_HlogSplitSize'
- ],
-
'ambari_metrics': [
'AMS_MasterAverageLoad',
'AMS_RegionServerStoreFiles',
@@ -95,15 +61,4 @@ module.exports = {
'Kafka_LogFlush',
'Kafka_ReplicaFetcher'
]
- },
-
- getServiceGraphConfig: function () {
- var servicesWithEnhancedDashboard = ['hdfs', 'yarn', 'hbase'];
- var newServiceObject = jQuery.extend(true, {}, this.allServices);
- servicesWithEnhancedDashboard.forEach(function (_serviceName) {
- newServiceObject[_serviceName] = [];
- });
- return newServiceObject;
- }
-
};
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/mappers/components_state_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/components_state_mapper.js b/ambari-web/app/mappers/components_state_mapper.js
index 0a960c4..64d00de 100644
--- a/ambari-web/app/mappers/components_state_mapper.js
+++ b/ambari-web/app/mappers/components_state_mapper.js
@@ -168,20 +168,20 @@ App.componentsStateMapper = App.QuickDataMapper.create({
item.host_names = item.host_components.mapProperty('HostRoles.host_name');
masters.push(this.parseIt(item, this.clientMap));
}
- if (cacheService) {
- cacheService.client_components = clients.filterProperty('service_name', cacheService.ServiceInfo.service_name).mapProperty('component_name');
- cacheService.slave_components = slaves.filterProperty('service_name', cacheService.ServiceInfo.service_name).mapProperty('component_name');
+ if (cacheService) {
+ cacheService.client_components = clients.filterProperty('service_name', cacheService.ServiceInfo.service_name).mapProperty('component_name');
+ cacheService.slave_components = slaves.filterProperty('service_name', cacheService.ServiceInfo.service_name).mapProperty('component_name');
- for (var i in parsedItem) {
- if (service.get('isLoaded')) {
- cacheService[i] = parsedItem[i];
- service.set(stringUtils.underScoreToCamelCase(i), parsedItem[i]);
- if (extendedModel) {
- extendedModel.set(stringUtils.underScoreToCamelCase(i), parsedItem[i]);
- }
- }
- }
- }
+ for (var i in parsedItem) {
+ if (service.get('isLoaded')) {
+ cacheService[i] = parsedItem[i];
+ service.set(stringUtils.underScoreToCamelCase(i), parsedItem[i]);
+ if (extendedModel && extendedModel.get('isLoaded')) {
+ extendedModel.set(stringUtils.underScoreToCamelCase(i), parsedItem[i]);
+ }
+ }
+ }
+ }
}, this)
}
App.store.loadMany(this.clientModel, clients);
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/mappers/service_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/service_mapper.js b/ambari-web/app/mappers/service_mapper.js
index d340d22..1424997 100644
--- a/ambari-web/app/mappers/service_mapper.js
+++ b/ambari-web/app/mappers/service_mapper.js
@@ -18,11 +18,17 @@
var App = require('app');
App.serviceMapper = App.QuickDataMapper.create({
+ model: App.Service,
+ config: {
+ id: 'ServiceInfo.service_name',
+ service_name: 'ServiceInfo.service_name',
+ work_status: 'ServiceInfo.state',
+ passive_state: 'ServiceInfo.passive_state'
+ },
+ initialAppLoad: false,
map: function (json) {
console.time("App.serviceMapper execution time");
-
- App.serviceComponents = [].concat.apply([], json.items.mapProperty('components').invoke('getEach', 'ServiceComponentInfo.component_name'));
-
+ var self = this;
json.items.forEach(function (service) {
var cachedService = App.cache['services'].findProperty('ServiceInfo.service_name', service.ServiceInfo.service_name);
if (cachedService) {
@@ -30,11 +36,6 @@ App.serviceMapper = App.QuickDataMapper.create({
App.Service.find(cachedService.ServiceInfo.service_name).set('workStatus', service.ServiceInfo.state);
cachedService.ServiceInfo.state = service.ServiceInfo.state;
cachedService.ServiceInfo.passive_state = service.ServiceInfo.maintenance_state;
-
- //check whether Alerts installed and started
- if (service.legacy_alerts) {
- cachedService.ServiceInfo.critical_alerts_count = service.legacy_alerts.summary.CRITICAL + service.legacy_alerts.summary.WARNING;
- }
} else {
var serviceData = {
ServiceInfo: {
@@ -45,15 +46,18 @@ App.serviceMapper = App.QuickDataMapper.create({
host_components: [],
components: []
};
-
- //check whether Alerts installed and started
- if (service.legacy_alerts) {
- serviceData.ServiceInfo.critical_alerts_count = service.legacy_alerts.summary.CRITICAL + service.legacy_alerts.summary.WARNING;
- }
App.cache['services'].push(serviceData);
}
});
+ if (!this.get('initialAppLoad')) {
+ var parsedCacheServices = App.cache['services'].map(function(item){
+ return self.parseIt(item, self.get('config'));
+ });
+ App.store.loadMany(this.get('model'), parsedCacheServices);
+ App.store.commit();
+ this.set('initialAppLoad', true);
+ }
console.timeEnd("App.serviceMapper execution time");
}
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/mappers/service_metrics_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/service_metrics_mapper.js b/ambari-web/app/mappers/service_metrics_mapper.js
index 3f3b6b5..6f4531f 100644
--- a/ambari-web/app/mappers/service_metrics_mapper.js
+++ b/ambari-web/app/mappers/service_metrics_mapper.js
@@ -29,7 +29,6 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
service_name: 'ServiceInfo.service_name',
work_status: 'ServiceInfo.state',
passive_state: 'ServiceInfo.passive_state',
- critical_alerts_count: 'ServiceInfo.critical_alerts_count',
$rand: Math.random(),
$alerts: [1, 2, 3],
host_components: 'host_components',
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index b5b9c55..7931169 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -270,6 +270,7 @@ Em.I18n.translations = {
'common.removed': 'Removed',
'common.testing': 'Testing',
'common.noData': 'No Data',
+ 'common.loading.eclipses': 'Loading...',
'models.alert_instance.tiggered.verbose': "Occurred on {0} <br> Checked on {1}",
'models.alert_definition.triggered.verbose': "Occurred on {0}",
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/mixins/common/widgets/widget_mixin.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/widgets/widget_mixin.js b/ambari-web/app/mixins/common/widgets/widget_mixin.js
index c07e23e..fcdfcb2 100644
--- a/ambari-web/app/mixins/common/widgets/widget_mixin.js
+++ b/ambari-web/app/mixins/common/widgets/widget_mixin.js
@@ -179,29 +179,10 @@ App.WidgetMixin = Ember.Mixin.create({
},
/**
- * Create actual host component criteria from persisted host component criteria
- * NameNode HA and ResourceManager HA host component criteria is applicable only in HA mode
+ * Tweak host component criteria from the actual host component criteria
* @param {object} request
*/
computeHostComponentCriteria: function (request) {
- switch (request.component_name) {
- case 'NAMENODE':
- if (request.host_component_criteria === 'host_components/metrics/dfs/FSNamesystem/HAState=active') {
- var hdfs = App.HDFSService.find().objectAt(0);
- if (!hdfs.get('isNnHaEnabled')) {
- return '';
- }
- }
- break;
- case 'RESOURCEMANAGER':
- if (request.host_component_criteria === 'host_components/HostRoles/ha_state=ACTIVE') {
- var yarn = App.YARNService.find().objectAt(0);
- if (!yarn.get('isRMHaEnabled')) {
- return '';
- }
- }
- break;
- }
return request.host_component_criteria.replace('host_components/', '&').trim();
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js b/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js
index 2a597b2..8dae252 100644
--- a/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js
+++ b/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js
@@ -39,7 +39,7 @@ App.Decommissionable = Em.Mixin.create({
isComponentDecommissioning: null,
/**
- * May conponent be decommissioned
+ * May component be decommissioned
* @type {bool}
*/
isComponentDecommissionAvailable: null,
@@ -54,7 +54,7 @@ App.Decommissionable = Em.Mixin.create({
* Component with stopped masters can't be docommissioned
* @type {bool}
*/
- isComponentDecommissionDisable: function() {
+ isComponentDecommissionDisable: function () {
var masterComponent = this.get('content.service.hostComponents').findProperty('componentName', this.get('componentForCheckDecommission'));
if (masterComponent && masterComponent.get('workStatus') != App.HostComponentStatus.started) return true;
return this.get('content.service.workStatus') != App.HostComponentStatus.started;
@@ -63,7 +63,7 @@ App.Decommissionable = Em.Mixin.create({
/**
* @override App.HostComponentView.isRestartableComponent
*/
- isRestartableComponent: function() {
+ isRestartableComponent: function () {
return this.get('isComponentDecommissionAvailable') && App.get('components.restartable').contains(this.get('content.componentName'));
}.property('isComponentDecommissionAvailable'),
@@ -71,7 +71,7 @@ App.Decommissionable = Em.Mixin.create({
* Tooltip message shows if decommission/recommission is disabled
* when masters for current component is down
*/
- decommissionTooltipMessage: function() {
+ decommissionTooltipMessage: function () {
if (this.get('isComponentDecommissionDisable') && (this.get('isComponentRecommissionAvailable') || this.get('isComponentDecommissionAvailable'))) {
var decom = this.get('isComponentRecommissionAvailable') ? Em.I18n.t('common.recommission') : Em.I18n.t('common.decommission');
return Em.I18n.t('hosts.decommission.tooltip.warning').format(decom, App.format.role(this.get('componentForCheckDecommission')));
@@ -111,8 +111,8 @@ App.Decommissionable = Em.Mixin.create({
var hostComponent = this.get('hostComponent');
if (hostComponent) {
componentTextStatus = hostComponent.get('componentTextStatus');
- if(this.get('isComponentRecommissionAvailable')){
- if(this.get('isComponentDecommissioning')){
+ if (this.get('isComponentRecommissionAvailable')) {
+ if (this.get('isComponentDecommissioning')) {
componentTextStatus = Em.I18n.t('hosts.host.decommissioning');
} else {
componentTextStatus = Em.I18n.t('hosts.host.decommissioned');
@@ -120,7 +120,7 @@ App.Decommissionable = Em.Mixin.create({
}
}
return componentTextStatus;
- }.property('workStatus','isComponentRecommissionAvailable','isComponentDecommissioning'),
+ }.property('workStatus', 'isComponentRecommissionAvailable', 'isComponentDecommissioning'),
/**
* For Stopping or Starting states, also for decommissioning
@@ -142,7 +142,7 @@ App.Decommissionable = Em.Mixin.create({
/**
* Get desired_admin_state status from server
*/
- getDesiredAdminState: function(){
+ getDesiredAdminState: function () {
return App.ajax.send({
name: 'host.host_component.slave_desired_admin_state',
sender: this,
@@ -184,7 +184,7 @@ App.Decommissionable = Em.Mixin.create({
* Get component decommission status from server
* @returns {$.ajax}
*/
- getDecommissionStatus: function() {
+ getDecommissionStatus: function () {
return App.ajax.send({
name: 'host.host_component.decommission_status',
sender: this,
@@ -205,7 +205,7 @@ App.Decommissionable = Em.Mixin.create({
*/
getDecommissionStatusSuccessCallback: function (response) {
var statusObject = response.ServiceComponentInfo;
- if ( statusObject != null) {
+ if (statusObject != null) {
statusObject.component_state = response.host_components[0].HostRoles.state;
this.setDecommissionStatus(statusObject);
return statusObject;
@@ -283,18 +283,24 @@ App.Decommissionable = Em.Mixin.create({
this.$('.components-health').stop(true, true);
this.$('.components-health').css({opacity: 1.0});
this.doBlinking();
- }.observes('workStatus','isComponentRecommissionAvailable', 'isDecommissioning'),
+ }.observes('workStatus', 'isComponentRecommissionAvailable', 'isDecommissioning'),
- didInsertElement: function() {
+ didInsertElement: function () {
+ var self = this;
this._super();
- this.loadComponentDecommissionStatus();
+ App.router.get('mainController').isLoading.call(App.router.get('clusterController'), 'isServiceContentFullyLoaded').done(function () {
+ self.loadComponentDecommissionStatus();
+ });
},
/**
* Update Decommission status only one time when component was changed
*/
- updateDecommissionStatus: function() {
- Em.run.once(this, 'loadComponentDecommissionStatus');
+ updateDecommissionStatus: function () {
+ var self = this;
+ App.router.get('mainController').isLoading.call(App.router.get('clusterController'), 'isServiceContentFullyLoaded').done(function () {
+ Em.run.once(self, 'loadComponentDecommissionStatus');
+ });
}.observes('content.workStatus', 'content.passiveState'),
@@ -302,16 +308,16 @@ App.Decommissionable = Em.Mixin.create({
templateName: require('templates/main/host/decommission'),
- text: function() {
+ text: function () {
return this.get('parentView.isComponentDecommissionAvailable') ? Em.I18n.t('common.decommission') : Em.I18n.t('common.recommission');
}.property('parentView.isComponentDecommissionAvailable'),
- didInsertElement: function() {
+ didInsertElement: function () {
this._super();
App.tooltip($("[rel='decommissionTooltip']"));
},
- click: function() {
+ click: function () {
if (!this.get('parentView.isComponentDecommissionDisable')) {
if (this.get('parentView.isComponentDecommissionAvailable')) {
this.get('controller').decommission(this.get('parentView.content'));
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/models/host_component.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/host_component.js b/ambari-web/app/models/host_component.js
index 93804a3..68b9f68 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -273,7 +273,7 @@ App.HostComponentActionMap = {
action: App.get('isHaEnabled') ? 'disableHighAvailability' : 'enableHighAvailability',
label: App.get('isHaEnabled') ? Em.I18n.t('admin.highAvailability.button.disable') : Em.I18n.t('admin.highAvailability.button.enable'),
cssClass: App.get('isHaEnabled') ? 'icon-arrow-down' : 'icon-arrow-up',
- isHidden: (App.get('isHaEnabled') || (/^1.3/.test(App.get('currentStackVersionNumber')))),
+ isHidden: App.get('isHaEnabled'),
disabled: App.get('isSingleNode')
},
TOGGLE_RM_HA: {
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/routes/add_service_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/add_service_routes.js b/ambari-web/app/routes/add_service_routes.js
index c454364..9a4071f 100644
--- a/ambari-web/app/routes/add_service_routes.js
+++ b/ambari-web/app/routes/add_service_routes.js
@@ -171,7 +171,7 @@ module.exports = App.WizardRoute.extend({
console.log('in addService.step3:connectOutlets');
var controller = router.get('addServiceController');
controller.setCurrentStep('3');
- controller.dataLoading().done(function () {
+ router.get('mainController').isLoading.call(router.get('clusterController'), 'isServiceContentFullyLoaded').done(function () {
controller.loadAllPriorSteps().done(function () {
var wizardStep6Controller = router.get('wizardStep6Controller');
wizardStep6Controller.set('wizardController', controller);
@@ -219,7 +219,9 @@ module.exports = App.WizardRoute.extend({
wizardStep7Controller.set('wizardController', controller);
controller.usersLoading().done(function () {
router.get('mainController').isLoading.call(router.get('clusterController'), 'isClusterNameLoaded').done(function () {
- controller.connectOutlet('wizardStep7', controller.get('content'));
+ router.get('mainController').isLoading.call(router.get('clusterController'), 'isServiceContentFullyLoaded').done(function () {
+ controller.connectOutlet('wizardStep7', controller.get('content'));
+ });
});
});
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 1b17ab8..3e9f5fe 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -181,13 +181,7 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
index: Ember.Route.extend({
route: '/',
connectOutlets: function (router, context) {
- router.get('mainController').connectOutlet('loading');
- router.get('mainController').isLoading.call(router.get('clusterController'), 'isClusterNameLoaded').done(function () {
- // `getSecurityStatus` call is required to retrieve information related to kerberos type: Manual or automated kerberos
- router.get('mainAdminKerberosController').getSecurityStatus().always(function () {
- router.get('mainController').connectOutlet('mainHost');
- });
- });
+ router.get('mainController').connectOutlet('mainHost');
}
}),
@@ -223,7 +217,6 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
configs: Em.Route.extend({
route: '/configs',
connectOutlets: function (router, context) {
- router.get('mainHostDetailsController').connectOutlet('loading');
router.get('mainController').isLoading.call(router.get('clusterController'), 'isConfigsPropertiesLoaded').done(function () {
router.get('mainHostDetailsController').connectOutlet('mainHostConfigs');
});
@@ -613,6 +606,8 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
}
if (router.get('mainServiceItemController').get('routeToConfigs')) {
router.transitionTo('service.configs', service);
+ } else if (router.get('mainServiceItemController.routeToHeatmaps')) {
+ router.transitionTo('service.heatmaps', service);
} else {
router.transitionTo('service.summary', service);
}
@@ -628,10 +623,16 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
route: '/:service_id',
connectOutlets: function (router, service) {
router.get('mainServiceController').connectOutlet('mainServiceItem', service);
- if (service && router.get('mainServiceItemController').get('routeToConfigs')) {
- router.transitionTo('configs');
+ if (service.get('isLoaded')) {
+ if (router.get('mainServiceItemController').get('routeToConfigs')) {
+ router.transitionTo('configs');
+ } else if (router.get('mainServiceItemController.routeToHeatmaps')) {
+ router.transitionTo('heatmaps');
+ } else {
+ router.transitionTo('summary');
+ }
} else {
- router.transitionTo('summary');
+ router.transitionTo('index');
}
},
index: Ember.Route.extend({
@@ -641,7 +642,7 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
route: '/summary',
connectOutlets: function (router, context) {
var item = router.get('mainServiceItemController.content');
- if (router.get('clusterController.isLoaded')) router.get('updateController').updateServiceMetric(Em.K);
+ if (router.get('clusterController.isServiceMetricsLoaded')) router.get('updateController').updateServiceMetric(Em.K);
//if service is not existed then route to default service
if (item.get('isLoaded')) {
router.get('mainServiceItemController').connectOutlet('mainServiceInfoSummary', item);
@@ -660,21 +661,29 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
configs: Em.Route.extend({
route: '/configs',
connectOutlets: function (router, context) {
- var item = router.get('mainServiceItemController.content');
- //if service is not existed then route to default service
- if (item.get('isLoaded')) {
- if (router.get('mainServiceItemController.isConfigurable')) {
- router.get('mainServiceItemController').connectOutlet('mainServiceInfoConfigs', item);
- }
- else {
- // if service doesn't have configs redirect to summary
- router.transitionTo('summary');
+ router.get('mainController').dataLoading().done(function () {
+ var item = router.get('mainServiceItemController.content');
+ //if service is not existed then route to default service
+ if (item.get('isLoaded')) {
+ if (router.get('mainServiceItemController.isConfigurable')) {
+ // HDFS service config page requires service metrics information to determine NameNode HA state and hide SNameNode category
+ if (item.get('serviceName') === 'HDFS') {
+ router.get('mainController').isLoading.call(router.get('clusterController'), 'isServiceContentFullyLoaded').done(function () {
+ router.get('mainServiceItemController').connectOutlet('mainServiceInfoConfigs', item);
+ });
+ } else {
+ router.get('mainServiceItemController').connectOutlet('mainServiceInfoConfigs', item);
+ }
+ }
+ else {
+ // if service doesn't have configs redirect to summary
+ router.transitionTo('summary');
+ }
+ } else {
+ item.set('routeToConfigs', true);
+ router.transitionTo('services.index');
}
- }
- else {
- item.set('routeToConfigs', true);
- router.transitionTo('services.index');
- }
+ });
},
unroutePath: function (router, context) {
var controller = router.get('mainServiceInfoConfigsController');
@@ -688,15 +697,18 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
heatmaps: Em.Route.extend({
route: '/heatmaps',
connectOutlets: function (router, context) {
- var item = router.get('mainServiceItemController.content');
- if (item.get('isLoaded')) {
- router.get('mainController').dataLoading().done(function () {
+ router.get('mainController').dataLoading().done(function () {
+ var item = router.get('mainServiceItemController.content');
+ if (item.get('isLoaded')) {
router.get('mainServiceInfoHeatmapController').loadRacks().done(function (data) {
router.get('mainServiceInfoHeatmapController').loadRacksSuccessCallback(data);
router.get('mainServiceItemController').connectOutlet('mainServiceInfoHeatmap', item);
});
- });
- }
+ } else {
+ item.set('routeToHeatmaps', true);
+ router.transitionTo('services.index');
+ }
+ });
}
}),
audit: Em.Route.extend({
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/routes/reassign_master_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/reassign_master_routes.js b/ambari-web/app/routes/reassign_master_routes.js
index 7d5069e..7feab29 100644
--- a/ambari-web/app/routes/reassign_master_routes.js
+++ b/ambari-web/app/routes/reassign_master_routes.js
@@ -141,7 +141,7 @@ module.exports = App.WizardRoute.extend({
console.log('in reassignMaster.step2:connectOutlets');
var controller = router.get('reassignMasterController');
controller.setCurrentStep('2');
- controller.dataLoading().done(function () {
+ router.get('mainController').isLoading.call(router.get('clusterController'), 'isServiceContentFullyLoaded').done(function () {
controller.loadAllPriorSteps();
controller.connectOutlet('reassignMasterWizardStep2', controller.get('content'));
})
@@ -211,10 +211,10 @@ module.exports = App.WizardRoute.extend({
var controller = router.get('reassignMasterController');
controller.setCurrentStep('4');
controller.setLowerStepsDisable(4);
- controller.dataLoading().done(function () {
+ router.get('mainController').isLoading.call(router.get('clusterController'), 'isServiceContentFullyLoaded').done(function () {
controller.loadAllPriorSteps();
controller.connectOutlet('reassignMasterWizardStep4', controller.get('content'));
- })
+ });
},
next: function (router) {
router.get('reassignMasterController').setCurrentStep('5');
@@ -258,7 +258,7 @@ module.exports = App.WizardRoute.extend({
console.log('in reassignMaster.step5:connectOutlets');
var controller = router.get('reassignMasterController');
controller.setCurrentStep('5');
- controller.dataLoading().done(function () {
+ router.get('mainController').isLoading.call(router.get('clusterController'), 'isServiceContentFullyLoaded').done(function () {
controller.loadAllPriorSteps();
controller.setLowerStepsDisable(5);
if ((controller.get('content.reassign.component_name') === 'NAMENODE') || controller.get('content.reassign.component_name') === 'SECONDARY_NAMENODE') {
@@ -288,7 +288,7 @@ module.exports = App.WizardRoute.extend({
var controller = router.get('reassignMasterController');
controller.setCurrentStep('6');
controller.setLowerStepsDisable(6);
- controller.dataLoading().done(function () {
+ router.get('mainController').isLoading.call(router.get('clusterController'), 'isServiceContentFullyLoaded').done(function () {
controller.loadAllPriorSteps();
controller.connectOutlet('reassignMasterWizardStep6', controller.get('content'));
})
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index fc2c687..37f8c21 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -2567,6 +2567,9 @@ table.graphs {
.caption {
height: 25px;
}
+ .spinner {
+ margin: 55px auto;
+ }
.row-fluid .span2p4 {
width: 19.60%;
*width: 19.60%;
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/templates/main/dashboard/widgets/hbase_links.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/dashboard/widgets/hbase_links.hbs b/ambari-web/app/templates/main/dashboard/widgets/hbase_links.hbs
index 66d5d23..dd78cc1 100644
--- a/ambari-web/app/templates/main/dashboard/widgets/hbase_links.hbs
+++ b/ambari-web/app/templates/main/dashboard/widgets/hbase_links.hbs
@@ -19,46 +19,51 @@
<div class="links">
<ul>
<li class="thumbnail row">
- <a {{bindAttr class=":corner-icon :span1 view.parentView.isMoving:hidden"}} href="#" {{action deleteWidget target="view"}}><i class="icon-remove-sign icon-large"></i></a>
- <div class="caption span10"> {{view.title}}</div>
+ <a {{bindAttr class=":corner-icon :span1 view.parentView.isMoving:hidden"}}
+ href="#" {{action deleteWidget target="view"}}><i class="icon-remove-sign icon-large"></i></a>
- <div class="widget-content" >
- <table>
- <!--hbase master server-->
- <tr>
- <td>
- {{#if view.activeMaster}}
- <a href="#" {{action showDetails view.activeMaster.host}}>{{t dashboard.services.hbase.masterServer}}</a>
- {{else}}
- {{t dashboard.services.hbase.noMasterServer}}
- {{/if}}
- </td>
- </tr>
- <!--region servers-->
- <tr>
- <td><a href="#" {{action filterHosts view.component}}>{{view.model.regionServersTotal}} {{t dashboard.services.hbase.regionServers}}</a></td>
- </tr>
- <!--hbase master Web UI-->
- <tr>
- <td>
- {{#if view.activeMaster}}
- <a {{bindAttr href="view.hbaseMasterWebUrl"}} target="_blank">{{t dashboard.services.hbase.masterWebUI}}</a>
- {{else}}
- {{t services.service.summary.notAvailable}}
- {{/if}}
- </td>
- </tr>
- </table>
- </div>
+ <div class="caption span10"> {{view.title}}</div>
+ {{#if view.isDataLoaded}}
+ <div class="widget-content">
+ <table>
+ <!--hbase master server-->
+ <tr>
+ <td>
+ {{#if view.activeMaster}}
+ <a href="#" {{action showDetails view.activeMaster.host}}>{{t dashboard.services.hbase.masterServer}}</a>
+ {{else}}
+ {{t dashboard.services.hbase.noMasterServer}}
+ {{/if}}
+ </td>
+ </tr>
+ <!--region servers-->
+ <tr>
+ <td>
+ <a href="#" {{action filterHosts view.component}}>{{view.model.regionServersTotal}} {{t dashboard.services.hbase.regionServers}}</a>
+ </td>
+ </tr>
+ <!--hbase master Web UI-->
+ <tr>
+ <td>
+ {{#if view.activeMaster}}
+ <a {{bindAttr href="view.hbaseMasterWebUrl"}}
+ target="_blank">{{t dashboard.services.hbase.masterWebUI}}</a>
+ {{else}}
+ {{t services.service.summary.notAvailable}}
+ {{/if}}
+ </td>
+ </tr>
+ </table>
+ </div>
- <div class="link-button">
- {{#if view.model.quickLinks.length}}
- {{#view App.QuickViewLinks contentBinding="view.model"}}
- <div class="btn-group">
- <a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">
- {{t common.more}}
- <span class="caret"></span>
- </a>
+ <div class="link-button">
+ {{#if view.model.quickLinks.length}}
+ {{#view App.QuickViewLinks contentBinding="view.model"}}
+ <div class="btn-group">
+ <a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">
+ {{t common.more}}
+ <span class="caret"></span>
+ </a>
<ul class="dropdown-menu">
{{#if view.isLoaded}}
{{#if view.quickLinksArray}}
@@ -82,11 +87,13 @@
<div class="spinner"></div>
{{/if}}
</ul>
- </div>
- {{/view}}
- {{/if}}
- </div>
-
+ </div>
+ {{/view}}
+ {{/if}}
+ </div>
+ {{else}}
+ <div class="spinner"></div>
+ {{/if}}
</li>
</ul>
</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/templates/main/dashboard/widgets/pie_chart.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/dashboard/widgets/pie_chart.hbs b/ambari-web/app/templates/main/dashboard/widgets/pie_chart.hbs
index 6af3a01..d5a7720 100644
--- a/ambari-web/app/templates/main/dashboard/widgets/pie_chart.hbs
+++ b/ambari-web/app/templates/main/dashboard/widgets/pie_chart.hbs
@@ -19,29 +19,37 @@
<div class="has-hidden-info">
<ul>
<li class="thumbnail row">
- <a {{bindAttr class=":corner-icon :span1 view.parentView.isMoving:hidden"}} href="#" {{action deleteWidget target="view"}}>
+ <a {{bindAttr class=":corner-icon :span1 view.parentView.isMoving:hidden"}}
+ href="#" {{action deleteWidget target="view"}}>
<i class="icon-remove-sign icon-large"></i>
</a>
+
<div class="caption span10">{{view.title}}</div>
- <a class="corner-icon span1" href="#" {{action editWidget target="view"}}>
- <i class="icon-edit"></i>
- </a>
+ {{#if view.isDataLoaded}}
+ <a class="corner-icon span1" href="#" {{action editWidget target="view"}}>
+ <i class="icon-edit"></i>
+ </a>
- <div {{bindAttr class=":hidden-info-general view.hiddenInfoClass" }}>
- <table align="center">
- {{#each line in view.hiddenInfo}}
- <tr><td>{{line}}</td></tr>
- {{/each}}
- </table>
- </div>
+ <div {{bindAttr class=":hidden-info-general view.hiddenInfoClass" }}>
+ <table align="center">
+ {{#each line in view.hiddenInfo}}
+ <tr>
+ <td>{{line}}</td>
+ </tr>
+ {{/each}}
+ </table>
+ </div>
- {{#if view.isPieExist}}
- <div {{bindAttr class=":widget-content view.hoverContentTopClass"}}>
- {{view view.content modelBinding="view.model" thresh1Binding="view.thresh1" thresh2Binding="view.thresh2"}}
- </div>
- {{else}}
- <div class="widget-content-isNA" >{{t services.service.summary.notAvailable}}</div>
- {{/if}}
+ {{#if view.isPieExist}}
+ <div {{bindAttr class=":widget-content view.hoverContentTopClass"}}>
+ {{view view.content modelBinding="view.model" thresh1Binding="view.thresh1" thresh2Binding="view.thresh2"}}
+ </div>
+ {{else}}
+ <div class="widget-content-isNA">{{t services.service.summary.notAvailable}}</div>
+ {{/if}}
+ {{else}}
+ <div class="spinner"></div>
+ {{/if}}
</li>
</ul>
</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/templates/main/dashboard/widgets/simple_text.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/dashboard/widgets/simple_text.hbs b/ambari-web/app/templates/main/dashboard/widgets/simple_text.hbs
index 4b14113..ddf9697 100644
--- a/ambari-web/app/templates/main/dashboard/widgets/simple_text.hbs
+++ b/ambari-web/app/templates/main/dashboard/widgets/simple_text.hbs
@@ -18,24 +18,31 @@
<div class="has-hidden-info">
<ul>
- <li class="thumbnail row" >
- <a {{bindAttr class=":corner-icon :span1 view.parentView.isMoving:hidden"}} href="#" {{action deleteWidget target="view"}}>
+ <li class="thumbnail row">
+ <a {{bindAttr class=":corner-icon :span1 view.parentView.isMoving:hidden"}}
+ href="#" {{action deleteWidget target="view"}}>
<i class="icon-remove-sign icon-large"></i>
</a>
- <div class="caption span10"> {{view.title}}</div>
- <a class="corner-icon span1" href="#" {{action editWidget target="view"}}>
- <i class="icon-edit"></i>
- </a>
- <div {{bindAttr class=":hidden-info-general view.hiddenInfoClass" }}>
- <table align="center">
- {{#each line in view.hiddenInfo}}
- <tr><td>{{line}}</td></tr>
- {{/each}}
- </table>
- </div>
+ <div class="caption span10"> {{view.title}}</div>
+ {{#if view.isDataLoaded}}
+ <a class="corner-icon span1" href="#" {{action editWidget target="view"}}>
+ <i class="icon-edit"></i>
+ </a>
- <div {{bindAttr class=":widget-content view.hoverContentTopClass"}}>{{view.content}}</div>
+ <div {{bindAttr class=":hidden-info-general view.hiddenInfoClass" }}>
+ <table align="center">
+ {{#each line in view.hiddenInfo}}
+ <tr>
+ <td>{{line}}</td>
+ </tr>
+ {{/each}}
+ </table>
+ </div>
+ <div {{bindAttr class=":widget-content view.hoverContentTopClass"}}>{{view.content}}</div>
+ {{else}}
+ <div class="spinner"></div>
+ {{/if}}
</li>
</ul>
</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/templates/main/dashboard/widgets/uptime.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/dashboard/widgets/uptime.hbs b/ambari-web/app/templates/main/dashboard/widgets/uptime.hbs
index 9ea9e8b..b4e2100 100644
--- a/ambari-web/app/templates/main/dashboard/widgets/uptime.hbs
+++ b/ambari-web/app/templates/main/dashboard/widgets/uptime.hbs
@@ -18,29 +18,35 @@
<div class="has-hidden-info">
<ul>
- <li class="thumbnail row" >
- <a {{bindAttr class=":corner-icon :span1 view.parentView.isMoving:hidden"}} href="#" {{action deleteWidget target="view"}}>
+ <li class="thumbnail row">
+ <a {{bindAttr class=":corner-icon :span1 view.parentView.isMoving:hidden"}}
+ href="#" {{action deleteWidget target="view"}}>
<i class="icon-remove-sign icon-large"></i>
</a>
+
<div class="caption span11"> {{view.title}} </div>
- <div {{bindAttr class=":hidden-info-general view.hiddenInfoClass"}}>
- <table align="center">
- {{#each line in view.hiddenInfo}}
- <tr>
- <td>
- {{line}}
- </td>
- </tr>
- {{/each}}
- </table>
- </div>
+ {{#if view.isDataLoaded}}
+ <div {{bindAttr class=":hidden-info-general view.hiddenInfoClass"}}>
+ <table align="center">
+ {{#each line in view.hiddenInfo}}
+ <tr>
+ <td>
+ {{line}}
+ </td>
+ </tr>
+ {{/each}}
+ </table>
+ </div>
- {{#if view.isNA}}
- <div class="widget-content-isNA uptime-content-isNA" >{{t services.service.summary.notAvailable}}</div>
+ {{#if view.isNA}}
+ <div class="widget-content-isNA uptime-content-isNA">{{t services.service.summary.notAvailable}}</div>
+ {{else}}
+ <div class="widget-content uptime-content">
+ {{view.content}}
+ </div>
+ {{/if}}
{{else}}
- <div class="widget-content uptime-content" >
- {{view.content}}
- </div>
+ <div class="spinner"></div>
{{/if}}
</li>
</ul>
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/templates/main/dashboard/widgets/yarn_links.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/dashboard/widgets/yarn_links.hbs b/ambari-web/app/templates/main/dashboard/widgets/yarn_links.hbs
index 7cad4f1..5645b8c 100644
--- a/ambari-web/app/templates/main/dashboard/widgets/yarn_links.hbs
+++ b/ambari-web/app/templates/main/dashboard/widgets/yarn_links.hbs
@@ -20,65 +20,68 @@
<ul>
<li class="thumbnail row">
<a {{bindAttr class=":corner-icon :span1 view.parentView.isMoving:hidden"}}
- href="#" {{action deleteWidget target="view"}}>
+ href="#" {{action deleteWidget target="view"}}>
<i class="icon-remove-sign icon-large"></i>
</a>
<div class="caption span10"> {{view.title}}</div>
+ {{#if view.isDataLoaded}}
+ <div class="widget-content">
+ <table>
+ <!-- Resource Manager-->
+ <tr>
+ <td>
+ <a href="#" {{action showDetails view.model.resourceManager.host}}> {{t dashboard.services.yarn.resourceManager}}</a>
+ </td>
+ </tr>
- <div class="widget-content">
- <table>
- <!-- Resource Manager-->
- <tr>
- <td>
- <a href="#" {{action showDetails view.model.resourceManager.host}}> {{t dashboard.services.yarn.resourceManager}}</a>
- </td>
- </tr>
+ <!-- Node Manages-->
+ <tr>
+ <td>
+ <a href="#" {{action filterHosts view.component}}> {{view.model.nodeManagersTotal}} {{t dashboard.services.yarn.nodeManagers}}</a>
+ </td>
+ </tr>
+ </table>
+ </div>
- <!-- Node Manages-->
- <tr>
- <td>
- <a href="#" {{action filterHosts view.component}}> {{view.model.nodeManagersTotal}} {{t dashboard.services.yarn.nodeManagers}}</a>
- </td>
- </tr>
- </table>
- </div>
-
- <div class="link-button">
- {{#if view.model.quickLinks.length}}
- {{#view App.QuickViewLinks contentBinding="view.model"}}
- <div class="btn-group">
- <a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">
- {{t common.more}}
- <span class="caret"></span>
- </a>
- <ul class="dropdown-menu">
- {{#if view.isLoaded}}
- {{#if view.quickLinksArray}}
- <!--there are multiple masters eg, HBase multiple masters or HDFS HA enabled-->
- {{#each quickLinks in view.quickLinksArray}}
- <li class="dropdown-submenu">
- <a href="javascript:void(null)">{{quickLinks.publicHostNameLabel}} </a>
- <ul class="dropdown-menu">
- {{#each quickLinks}}
- <li><a {{bindAttr href="url"}} {{bindAttr target="view.linkTarget"}}>{{label}}</a></li>
- {{/each}}
- </ul>
- </li>
- {{/each}}
+ <div class="link-button">
+ {{#if view.model.quickLinks.length}}
+ {{#view App.QuickViewLinks contentBinding="view.model"}}
+ <div class="btn-group">
+ <a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">
+ {{t common.more}}
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu">
+ {{#if view.isLoaded}}
+ {{#if view.quickLinksArray}}
+ <!--there are multiple masters eg, HBase multiple masters or HDFS HA enabled-->
+ {{#each quickLinks in view.quickLinksArray}}
+ <li class="dropdown-submenu">
+ <a href="javascript:void(null)">{{quickLinks.publicHostNameLabel}} </a>
+ <ul class="dropdown-menu">
+ {{#each quickLinks}}
+ <li><a {{bindAttr href="url"}} {{bindAttr target="view.linkTarget"}}>{{label}}</a></li>
+ {{/each}}
+ </ul>
+ </li>
+ {{/each}}
+ {{else}}
+ {{#each view.quickLinks}}
+ <li><a {{bindAttr href="url"}} {{bindAttr target="view.linkTarget"}}>{{label}}</a></li>
+ {{/each}}
+ {{/if}}
{{else}}
- {{#each view.quickLinks}}
- <li><a {{bindAttr href="url"}} {{bindAttr target="view.linkTarget"}}>{{label}}</a></li>
- {{/each}}
+ <div class="spinner"></div>
{{/if}}
- {{else}}
- <div class="spinner"></div>
- {{/if}}
- </ul>
- </div>
- {{/view}}
- {{/if}}
- </div>
+ </ul>
+ </div>
+ {{/view}}
+ {{/if}}
+ </div>
+ {{else}}
+ <div class="spinner"></div>
+ {{/if}}
</li>
</ul>
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/templates/main/service/info/summary.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/info/summary.hbs b/ambari-web/app/templates/main/service/info/summary.hbs
index eee8c49..ed96e9a 100644
--- a/ambari-web/app/templates/main/service/info/summary.hbs
+++ b/ambari-web/app/templates/main/service/info/summary.hbs
@@ -61,102 +61,107 @@
{{/if}}
{{/if}}
</div>
- <div class="service-content row-fluid">
- <div class="span6">
- <table class="summary-info table no-borders table-condensed">
- <tbody>
- {{#if view.serviceSummaryView}}
+ {{#if view.serviceSummaryView}}
+ <div class="service-content row-fluid">
+ <div class="span6">
+ <table class="summary-info table no-borders table-condensed">
+ <tbody>
{{view view.serviceSummaryView}}
- {{/if}}
- </tbody>
- </table>
+ </tbody>
+ </table>
+ </div>
</div>
- </div>
+ {{else}}
+ <div class="spinner"></div>
+ {{/if}}
</div>
+ {{! widgets in the metrics panel are loaded seperately from summary page text information
+ and does not get block due to any global API poller information }}
{{#if view.isServiceMetricLoaded}}
- <div class="service-metrics-block">
- <div class="box">
- <div class="box-header">
- <h4>{{t services.service.metrics}}</h4>
- {{#if showTimeRangeControl}}
- <div class="btn-group pull-right">
+ <div class="service-metrics-block">
+ <div class="box">
+ <div class="box-header">
+ <h4>{{t services.service.metrics}}</h4>
+ {{#if showTimeRangeControl}}
+ <div class="btn-group pull-right">
+ <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
+ {{view.currentTimeRange.name}} <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu">
+ {{#each option in view.timeRangeOptions}}
+ <li><a href="#" {{action setTimeRange option target="view"}}>{{option.name}}</a></li>
+ {{/each}}
+ </ul>
+ </div>
+ {{/if}}
+ {{#if isServiceWithEnhancedWidgets}}
+ {{#if isAmbariMetricsInstalled}}
+ <div class="btn-group pull-right actions">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
- {{view.currentTimeRange.name}} <span class="caret"></span>
+ {{t common.actions}} <span class="caret"></span>
</button>
<ul class="dropdown-menu">
- {{#each option in view.timeRangeOptions}}
- <li><a href="#" {{action setTimeRange option target="view"}}>{{option.name}}</a></li>
+ {{#each option in view.widgetActions}}
+ <li {{bindAttr class="option.layouts:dropdown-submenu"}}>
+ {{#if option.isAction}}
+ <a href="#" {{action doWidgetAction option.action target="view"}}>
+ <i {{bindAttr class="option.class"}}></i>
+ {{option.label}}
+ </a>
+ {{#if option.layouts}}
+ <ul class="dropdown-menu">
+ {{#each layout in option.layouts}}
+ <li>
+ <a href="javascript:void(0);">
+ {{layout.layoutName}}
+ </a>
+ </li>
+ {{/each}}
+ </ul>
+ {{/if}}
+ {{/if}}
+ </li>
{{/each}}
</ul>
</div>
{{/if}}
- {{#if isServiceWithEnhancedWidgets}}
+ {{/if}}
+ </div>
+ <div>
+ {{#if isServiceWithEnhancedWidgets}}
+ <div id="widget_layout" class="row-fluid">
+ {{#each widget in controller.widgets}}
+ <div class="widget span2p4" {{bindAttr id="widget.id"}}>
+ {{view widget.viewClass contentBinding="widget" idBinding="widget.id"}}
+ </div>
+ {{/each}}
{{#if isAmbariMetricsInstalled}}
- <div class="btn-group pull-right actions">
- <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
- {{t common.actions}} <span class="caret"></span>
- </button>
- <ul class="dropdown-menu">
- {{#each option in view.widgetActions}}
- <li {{bindAttr class="option.layouts:dropdown-submenu"}}>
- {{#if option.isAction}}
- <a href="#" {{action doWidgetAction option.action target="view"}}>
- <i {{bindAttr class="option.class"}}></i>
- {{option.label}}
- </a>
- {{#if option.layouts}}
- <ul class="dropdown-menu">
- {{#each layout in option.layouts}}
- <li>
- <a href="javascript:void(0);">
- {{layout.layoutName}}
- </a>
- </li>
- {{/each}}
- </ul>
- {{/if}}
- {{/if}}
- </li>
- {{/each}}
- </ul>
+ <div class="span2p4">
+ <button id="add-widget-action-box"
+ class="btn btn-default" {{action "goToWidgetsBrowser" controller.content target="controller"}}
+ rel="add-widget-tooltip" {{translateAttr data-original-title="dashboard.widgets.addButton.tooltip"}}>
+ <i class="icon-plus"></i></button>
</div>
{{/if}}
- {{/if}}
- </div>
- <div>
- {{#if isServiceWithEnhancedWidgets}}
- <div id="widget_layout" class="row-fluid">
- {{#each widget in controller.widgets}}
- <div class="widget span2p4" {{bindAttr id="widget.id"}}>
- {{view widget.viewClass contentBinding="widget" idBinding="widget.id"}}
- </div>
+ </div>
+ {{/if}}
+ <table class="graphs">
+ {{#each graphs in view.serviceMetricGraphs}}
+ <tr>
+ {{#each graph in graphs}}
+ <td>
+ <div class="">
+ {{view graph}}
+ </div>
+ </td>
{{/each}}
- {{#if isAmbariMetricsInstalled}}
- <div class="span2p4">
- <button id="add-widget-action-box" class="btn btn-default" {{action "goToWidgetsBrowser" controller.content target="controller"}}
- rel="add-widget-tooltip" {{translateAttr data-original-title="dashboard.widgets.addButton.tooltip"}}>
- <i class="icon-plus"></i></button>
- </div>
- {{/if}}
- </div>
- {{/if}}
- <table class="graphs">
- {{#each graphs in view.serviceMetricGraphs}}
- <tr>
- {{#each graph in graphs}}
- <td>
- <div class="">
- {{view graph}}
- </div>
- </td>
- {{/each}}
- </tr>
- {{/each}}
- </table>
- </div>
+ </tr>
+ {{/each}}
+ </table>
</div>
</div>
+ </div>
{{/if}}
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/templates/main/service/services/hbase.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/services/hbase.hbs b/ambari-web/app/templates/main/service/services/hbase.hbs
index b728abe..dccc125 100644
--- a/ambari-web/app/templates/main/service/services/hbase.hbs
+++ b/ambari-web/app/templates/main/service/services/hbase.hbs
@@ -24,7 +24,7 @@
href="#" {{action filterHosts view.regionServerComponent}}>{{t dashboard.services.hbase.regionServers}}</a>
</td>
<td>
- {{#if App.router.clusterController.isComponentsStateLoaded}}
+ {{#if App.router.clusterController.isServiceContentFullyLoaded}}
<span>
{{#view App.ComponentLiveTextView liveComponentsBinding="view.service.regionServersStarted" totalComponentsBinding="view.service.regionServersTotal"}}
{{view.liveComponents}}/{{view.totalComponents}}
@@ -32,7 +32,7 @@
</span>
{{t services.service.summary.RegionServersLIVE}}
{{else}}
- {{t common.noData}}
+ {{t common.loading.eclipses}}
{{/if}}
</td>
</tr>
@@ -45,7 +45,9 @@
<td>
<span>
{{#view App.ComponentLiveTextView liveComponentsBinding="view.service.phoenixServersStarted" totalComponentsBinding="view.service.phoenixServersTotal"}}
- {{view.liveComponents}}/{{view.totalComponents}}
+ {{#if App.router.clusterController.isServiceContentFullyLoaded}}
+ {{view.liveComponents}}/{{view.totalComponents}}
+ {{/if}}
{{/view}}
</span>
{{t services.service.summary.PhoenixServersLIVE}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/templates/main/service/services/hdfs.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/services/hdfs.hbs b/ambari-web/app/templates/main/service/services/hdfs.hbs
index 1cbd082..04a098b 100644
--- a/ambari-web/app/templates/main/service/services/hdfs.hbs
+++ b/ambari-web/app/templates/main/service/services/hdfs.hbs
@@ -22,7 +22,7 @@
<td class="summary-label"><a
href="#" {{action filterHosts view.dataNodeComponent}}>{{t dashboard.services.hdfs.datanodes}}</a></td>
<td>
- {{#if App.router.clusterController.isComponentsStateLoaded}}
+ {{#if App.router.clusterController.isServiceContentFullyLoaded}}
<span>
{{#view App.ComponentLiveTextView liveComponentsBinding="view.service.dataNodesStarted" totalComponentsBinding="view.service.dataNodesTotal"}}
{{view.liveComponents}}/{{view.totalComponents}}
@@ -30,7 +30,7 @@
</span>
{{t common.started}}
{{else}}
- {{t common.noData}}
+ {{t common.loading.eclipses}}
{{/if}}
</td>
</tr>
@@ -65,7 +65,7 @@
</span>
{{t services.service.summary.JournalNodesLive}}
{{else}}
- {{t common.noData}}
+ {{t common.loading.eclipses}}
{{/if}}
</td>
</tr>
@@ -76,7 +76,7 @@
<td class="summary-label"><a
href="#" {{action filterHosts view.nfsGatewayComponent}}>{{t dashboard.services.hdfs.nfsgateways}}</a></td>
<td>
- {{#if App.router.clusterController.isComponentsStateLoaded}}
+ {{#if App.router.clusterController.isServiceContentFullyLoaded}}
<span>
{{#view App.ComponentLiveTextView liveComponentsBinding="view.service.nfsGatewaysStarted" totalComponentsBinding="view.service.nfsGatewaysTotal"}}
{{view.liveComponents}}/{{view.totalComponents}}
@@ -84,7 +84,7 @@
</span>
{{t common.started}}
{{else}}
- {{t common.noData}}
+ {{t common.loading.eclipses}}
{{/if}}
</td>
</tr>
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/templates/main/service/services/storm.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/services/storm.hbs b/ambari-web/app/templates/main/service/services/storm.hbs
index 18b84d5..e54b3f5 100644
--- a/ambari-web/app/templates/main/service/services/storm.hbs
+++ b/ambari-web/app/templates/main/service/services/storm.hbs
@@ -24,14 +24,14 @@
</a>
</td>
<td>
- {{#if App.router.clusterController.isComponentsStateLoaded}}
+ {{#if App.router.clusterController.isServiceContentFullyLoaded}}
<span>
{{#view App.ComponentLiveTextView liveComponentsBinding="view.superVisorsLive" totalComponentsBinding="view.superVisorsTotal"}}
{{view.liveComponents}}/{{view.totalComponents}}
{{/view}}
</span> {{t services.service.summary.SupervisorsLIVE}}
{{else}}
- {{t common.noData}}
+ {{t common.loading.eclipses}}
{{/if}}
</td>
</tr>
[2/3] ambari git commit: AMBARI-12557. Completion of service metrics
API call should not block login loading bar progress. (jaimin)
Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/templates/main/service/services/yarn.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/services/yarn.hbs b/ambari-web/app/templates/main/service/services/yarn.hbs
index c29bbcc..cd61ee7 100644
--- a/ambari-web/app/templates/main/service/services/yarn.hbs
+++ b/ambari-web/app/templates/main/service/services/yarn.hbs
@@ -22,14 +22,14 @@
<td class="summary-label"><a
href="#" {{action filterHosts view.nodeManagerComponent}}>{{t dashboard.services.yarn.nodeManagers}}</a></td>
<td>
- {{#if App.router.clusterController.isComponentsStateLoaded}}
+ {{#if App.router.clusterController.isServiceContentFullyLoaded}}
<span>
{{#view App.ComponentLiveTextView liveComponentsBinding="view.service.nodeManagersStarted" totalComponentsBinding="view.service.nodeManagersTotal"}}
{{view.liveComponents}}/{{view.totalComponents}}
{{/view}}
</span>{{t common.started}}
{{else}}
- {{t common.noData}}
+ {{t common.loading.eclipses}}
{{/if}}
</td>
</tr>
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index d796441..dead76e 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -245,30 +245,6 @@ require('views/main/service/info/menu');
require('views/main/service/info/summary');
require('views/main/service/info/configs');
require('views/main/service/info/metric_graphs_view');
-require('views/main/service/info/metrics/hdfs/jvm_threads');
-require('views/main/service/info/metrics/hdfs/jvm_heap');
-require('views/main/service/info/metrics/hdfs/io');
-require('views/main/service/info/metrics/hdfs/rpc');
-require('views/main/service/info/metrics/hdfs/file_operations');
-require('views/main/service/info/metrics/hdfs/gc');
-require('views/main/service/info/metrics/hdfs/space_utilization');
-require('views/main/service/info/metrics/hdfs/block_status');
-require('views/main/service/info/metrics/yarn/gc');
-require('views/main/service/info/metrics/yarn/jvm_threads');
-require('views/main/service/info/metrics/yarn/jvm_heap');
-require('views/main/service/info/metrics/yarn/rpc');
-require('views/main/service/info/metrics/yarn/allocated');
-require('views/main/service/info/metrics/yarn/allocated_container');
-require('views/main/service/info/metrics/yarn/apps_current_states');
-require('views/main/service/info/metrics/yarn/apps_finished_states');
-require('views/main/service/info/metrics/yarn/nms');
-require('views/main/service/info/metrics/yarn/qmr');
-require('views/main/service/info/metrics/hbase/cluster_requests');
-require('views/main/service/info/metrics/hbase/regionserver_rw_requests');
-require('views/main/service/info/metrics/hbase/regionserver_regions');
-require('views/main/service/info/metrics/hbase/regionserver_queuesize');
-require('views/main/service/info/metrics/hbase/hlog_split_time');
-require('views/main/service/info/metrics/hbase/hlog_split_size');
require('views/main/service/info/metrics/ambari_metrics/master_average_load');
require('views/main/service/info/metrics/ambari_metrics/regionserver_base');
require('views/main/service/info/metrics/ambari_metrics/regionserver_store_files');
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/dashboard/widget.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widget.js b/ambari-web/app/views/main/dashboard/widget.js
index b63e89f..4ab8ec5 100644
--- a/ambari-web/app/views/main/dashboard/widget.js
+++ b/ambari-web/app/views/main/dashboard/widget.js
@@ -106,6 +106,12 @@ App.DashboardWidgetView = Em.View.extend({
thresh2: null,
/**
+ * @type {Boolean}
+ * @default false
+ */
+ isDataLoadedBinding: 'App.router.clusterController.isServiceContentFullyLoaded',
+
+ /**
* @type {Em.Object}
* @class
*/
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/dashboard/widgets/links_widget.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/links_widget.js b/ambari-web/app/views/main/dashboard/widgets/links_widget.js
index 1aabdcb..e9dfdca 100644
--- a/ambari-web/app/views/main/dashboard/widgets/links_widget.js
+++ b/ambari-web/app/views/main/dashboard/widgets/links_widget.js
@@ -41,7 +41,7 @@ App.LinkDashboardWidgetView = App.DashboardWidgetView.extend({
this.set('webUrl', this.calcWebUrl());
},
calcWebUrl: function() {
- if (this.get('model')) {
+ if (this.get('model') && this.get('model').get(this.get('modelField'))) {
return "http://" + this.get('model').get(this.get('modelField')).get('publicHostName') + ':' + this.get('port');
}
return '';
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/dashboard/widgets/namenode_cpu.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/namenode_cpu.js b/ambari-web/app/views/main/dashboard/widgets/namenode_cpu.js
index 5559a94..ead0d47 100644
--- a/ambari-web/app/views/main/dashboard/widgets/namenode_cpu.js
+++ b/ambari-web/app/views/main/dashboard/widgets/namenode_cpu.js
@@ -26,29 +26,31 @@ App.NameNodeCpuPieChartView = App.PieChartDashboardWidgetView.extend({
model_type: 'hdfs',
widgetHtmlId: 'widget-nn-cpu',
cpuWio: null,
- nnHostName:"",
+ nnHostName: "",
intervalId: null,
- willDestroyElement: function() {
+ willDestroyElement: function () {
clearInterval(this.get("intervalId"));
},
- didInsertElement: function() {
+ didInsertElement: function () {
this._super();
var self = this,
- intervalId;
- if (App.get('isHaEnabled')) {
- this.set('nnHostName', this.get('model').get('activeNameNode.hostName'));
- }else{
- this.set('nnHostName', this.get('model').get('nameNode.hostName'));
- }
- if (this.get('nnHostName')) {
- this.getValue();
- intervalId = setInterval(function () {
- self.getValue()
- }, App.componentsUpdateInterval);
- this.set('intervalId', intervalId);
- }
+ intervalId;
+ App.router.get('mainController').isLoading.call(App.router.get('clusterController'), 'isServiceContentFullyLoaded').done(function () {
+ if (App.get('isHaEnabled')) {
+ self.set('nnHostName', self.get('model').get('activeNameNode.hostName'));
+ } else {
+ self.set('nnHostName', self.get('model').get('nameNode.hostName'));
+ }
+ if (self.get('nnHostName')) {
+ self.getValue();
+ intervalId = setInterval(function () {
+ self.getValue()
+ }, App.componentsUpdateInterval);
+ self.set('intervalId', intervalId);
+ }
+ });
},
getValue: function () {
@@ -72,14 +74,14 @@ App.NameNodeCpuPieChartView = App.PieChartDashboardWidgetView.extend({
this.calc();
},
- calcHiddenInfo: function() {
+ calcHiddenInfo: function () {
var value = this.get('cpuWio');
var obj1;
- if( value == null) {
+ if (value == null) {
obj1 = Em.I18n.t('services.service.summary.notAvailable');
}
else {
- value = value >= 100 ? 100: value;
+ value = value >= 100 ? 100 : value;
obj1 = (value + 0).toFixed(2) + '%';
}
var result = [];
@@ -88,7 +90,7 @@ App.NameNodeCpuPieChartView = App.PieChartDashboardWidgetView.extend({
return result;
},
- calcIsPieExists: function() {
+ calcIsPieExists: function () {
return (!Em.isNone(this.get('cpuWio')));
},
@@ -97,6 +99,6 @@ App.NameNodeCpuPieChartView = App.PieChartDashboardWidgetView.extend({
value = value >= 100 ? 100 : value;
var percent = (value + 0).toFixed(1);
var percent_precise = (value + 0).toFixed(2);
- return [ percent, percent_precise];
+ return [percent, percent_precise];
}
});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js b/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js
index b8f3c7d..64bc775 100644
--- a/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js
+++ b/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js
@@ -27,7 +27,7 @@ App.DataNodeComponentView = App.HostComponentView.extend(App.Decommissionable, {
* @returns {$.ajax}
*/
getDNDecommissionStatus: function () {
- // always get datanode decommission statue from active namenode (if NN HA enabled)
+ // always get datanode decommission status from active namenode (if NN HA enabled)
var hdfs = App.HDFSService.find().objectAt(0);
var activeNNHostName = (!hdfs.get('snameNode') && hdfs.get('activeNameNode')) ? hdfs.get('activeNameNode.hostName') : hdfs.get('nameNode.hostName');
return App.ajax.send({
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/host/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/summary.js b/ambari-web/app/views/main/host/summary.js
index 06e3d09..d70951d 100644
--- a/ambari-web/app/views/main/host/summary.js
+++ b/ambari-web/app/views/main/host/summary.js
@@ -118,7 +118,7 @@ App.MainHostSummaryView = Em.View.extend({
*/
installedServices: function () {
return App.Service.find().mapProperty('serviceName');
- }.property('App.router.clusterController.dataLoadList.serviceMetrics'),
+ }.property('App.router.clusterController.dataLoadList.services'),
/**
* List of installed masters and slaves
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hbase/cluster_requests.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/hbase/cluster_requests.js b/ambari-web/app/views/main/service/info/metrics/hbase/cluster_requests.js
deleted file mode 100644
index 78d5f6f..0000000
--- a/ambari-web/app/views/main/service/info/metrics/hbase/cluster_requests.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing HBase Cluster Requests
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsHBASE_ClusterRequests = App.ChartLinearTimeView.extend({
- id: "service-metrics-hbase-cluster-requests",
- title: Em.I18n.t('services.service.info.metrics.hbase.clusterRequests'),
-
- ajaxIndex: 'service.metrics.hbase.cluster_requests',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.hbase && jsonData.metrics.hbase.master) {
- for ( var name in jsonData.metrics.hbase.master) {
- var displayName;
- var seriesData = jsonData.metrics.hbase.master[name];
- switch (name) {
- case "cluster_requests":
- displayName = Em.I18n.t('services.service.info.metrics.hbase.clusterRequests.displayNames.requestCount');
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_size.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_size.js b/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_size.js
deleted file mode 100644
index 15d6fcb..0000000
--- a/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_size.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing HBase Cluster Requests
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsHBASE_HlogSplitSize = App.ChartLinearTimeView.extend({
- id: "service-metrics-hbase-hlog-split-size",
- title: Em.I18n.t('services.service.info.metrics.hbase.hlogSplitSize'),
- yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
-
- ajaxIndex: 'service.metrics.hbase.hlog_split_size',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.hbase && jsonData.metrics.hbase.master) {
- for ( var name in jsonData.metrics.hbase.master) {
- var displayName;
- var seriesData = jsonData.metrics.hbase.master[name];
- switch (name) {
- case "splitSize_avg_time":
- displayName = Em.I18n.t('services.service.info.metrics.hbase.hlogSplitSize.displayNames.splitSize');
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_time.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_time.js b/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_time.js
deleted file mode 100644
index 01e7a28..0000000
--- a/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_time.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing HBase Cluster Requests
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsHBASE_HlogSplitTime = App.ChartLinearTimeView.extend({
- id: "service-metrics-hbase-hlog-split-time",
- title: Em.I18n.t('services.service.info.metrics.hbase.hlogSplitTime'),
- yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
-
- ajaxIndex: 'service.metrics.hbase.hlog_split_time',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.hbase && jsonData.metrics.hbase.master) {
- for ( var name in jsonData.metrics.hbase.master) {
- var displayName;
- var seriesData = jsonData.metrics.hbase.master[name];
- switch (name) {
- case "splitTime_avg_time":
- displayName = Em.I18n.t('services.service.info.metrics.hbase.hlogSplitTime.displayNames.splitTime');
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_queuesize.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_queuesize.js b/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_queuesize.js
deleted file mode 100644
index 9136de0..0000000
--- a/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_queuesize.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing HBase Cluster Requests
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsHBASE_RegionServerQueueSize = App.ChartLinearTimeView.extend({
- id: "service-metrics-hbase-regionserver-queuesize",
- title: Em.I18n.t('services.service.info.metrics.hbase.regionServerQueueSize'),
- renderer: 'line',
- ajaxIndex: 'service.metrics.hbase.regionserver_queuesize',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.hbase && jsonData.metrics.hbase.regionserver) {
- for ( var name in jsonData.metrics.hbase.regionserver) {
- var displayName;
- var seriesData = jsonData.metrics.hbase.regionserver[name];
- switch (name) {
- case "compactionQueueSize":
- displayName = Em.I18n.t('services.service.info.metrics.hbase.regionServerQueueSize.displayNames.compactionQueueSize');
- break;
- case "flushQueueSize":
- displayName = Em.I18n.t('services.service.info.metrics.hbase.regionServerQueueSize.displayNames.flushQueueSize');
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_regions.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_regions.js b/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_regions.js
deleted file mode 100644
index 421bc08..0000000
--- a/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_regions.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing HBase Cluster Requests
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsHBASE_RegionServerRegions = App.ChartLinearTimeView.extend({
- id: "service-metrics-hbase-regionserver-regions",
- title: Em.I18n.t('services.service.info.metrics.hbase.regionServerRegions'),
-
- ajaxIndex: 'service.metrics.hbase.regionserver_regions',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.hbase && jsonData.metrics.hbase.regionserver) {
- for ( var name in jsonData.metrics.hbase.regionserver) {
- var displayName;
- var seriesData = jsonData.metrics.hbase.regionserver[name];
- switch (name) {
- case "regions":
- displayName = Em.I18n.t('services.service.info.metrics.hbase.regionServerRegions.displayNames.regions');
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_rw_requests.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_rw_requests.js b/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_rw_requests.js
deleted file mode 100644
index 7df350c..0000000
--- a/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_rw_requests.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing HBase Cluster Requests
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsHBASE_RegionServerReadWriteRequests = App.ChartLinearTimeView.extend({
- id: "service-metrics-hbase-regionserver-rw-requests",
- renderer: 'line',
- ajaxIndex: 'service.metrics.hbase.regionserver_rw_requests',
- yAxisFormatter: App.ChartLinearTimeView.CreateRateFormatter('req',
- App.ChartLinearTimeView.DefaultFormatter),
- title: Em.I18n.t('services.service.info.metrics.hbase.regionServerRequests.2'),
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.hbase && jsonData.metrics.hbase.regionserver) {
- for ( var name in jsonData.metrics.hbase.regionserver) {
- var displayName;
- var seriesData = jsonData.metrics.hbase.regionserver[name];
- switch (name) {
- case "writeRequestsCount":
- displayName = Em.I18n.t('services.service.info.metrics.hbase.regionServerRequests.displayNames.writeRequests');
- break;
- case "readRequestsCount":
- displayName = Em.I18n.t('services.service.info.metrics.hbase.regionServerRequests.displayNames.readRequests');
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js b/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js
deleted file mode 100644
index c46ee2f..0000000
--- a/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsHDFS_BlockStatus = App.ChartLinearTimeView.extend({
- id: "service-metrics-hdfs-block-status",
- title: Em.I18n.t('services.service.info.metrics.hdfs.blockStatus'),
- renderer: 'line',
-
- ajaxIndex: 'service.metrics.hdfs.block_status',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.dfs && jsonData.metrics.dfs.FSNamesystem) {
- for ( var name in jsonData.metrics.dfs.FSNamesystem) {
- var displayName;
- var seriesData = jsonData.metrics.dfs.FSNamesystem[name];
- switch (name) {
- case "PendingReplicationBlocks":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.blockStatus.displayNames.pendingReplicationBlocks');
- break;
- case "UnderReplicatedBlocks":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.blockStatus.displayNames.underReplicatedBlocks');
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js b/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js
deleted file mode 100644
index ceae042..0000000
--- a/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsHDFS_FileOperations = App.ChartLinearTimeView.extend({
- id: "service-metrics-hdfs-file-operations",
- title: Em.I18n.t('services.service.info.metrics.hdfs.fileOperations'),
- renderer: 'line',
-
- ajaxIndex: 'service.metrics.hdfs.file_operations',
- yAxisFormatter: App.ChartLinearTimeView.CreateRateFormatter('ops',
- App.ChartLinearTimeView.DefaultFormatter),
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.dfs && jsonData.metrics.dfs.namenode) {
- for ( var name in jsonData.metrics.dfs.namenode) {
- var displayName;
- var seriesData = jsonData.metrics.dfs.namenode[name];
- switch (name) {
- case "FileInfoOps":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.fileOperations.displayNames.fileInformationOperations');
- break;
- case "DeleteFileOps":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.fileOperations.displayNames.deleteFileOperations');
- break;
- case "CreateFileOps":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.fileOperations.displayNames.createFileOperations');
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js b/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js
deleted file mode 100644
index a97e81a..0000000
--- a/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsHDFS_GC = App.ChartLinearTimeView.extend({
- id: "service-metrics-hdfs-gc",
- title: Em.I18n.t('services.service.info.metrics.hdfs.gc'),
- yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
-
- ajaxIndex: 'service.metrics.hdfs.gc',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.jvm) {
- for ( var name in jsonData.metrics.jvm) {
- var displayName;
- var seriesData = jsonData.metrics.jvm[name];
- switch (name) {
- case "gcTimeMillis":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.gc.displayNames.gcTimeMillis');
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hdfs/io.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/hdfs/io.js b/ambari-web/app/views/main/service/info/metrics/hdfs/io.js
deleted file mode 100644
index eb12849..0000000
--- a/ambari-web/app/views/main/service/info/metrics/hdfs/io.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsHDFS_IO = App.ChartLinearTimeView.extend({
- id: "service-metrics-hdfs-io",
- title: Em.I18n.t('services.service.info.metrics.hdfs.io'),
- yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
- renderer: 'line',
-
- ajaxIndex: 'service.metrics.hdfs.io',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.dfs && jsonData.metrics.dfs.datanode) {
- for ( var name in jsonData.metrics.dfs.datanode) {
- var displayName;
- var seriesData = jsonData.metrics.dfs.datanode[name];
- switch (name) {
- case "bytes_written":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.io.displayNames.bytesWritten');
- break;
- case "bytes_read":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.io.displayNames.bytesRead');
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js b/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js
deleted file mode 100644
index bb9300b..0000000
--- a/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsHDFS_JVMHeap = App.ChartLinearTimeView.extend({
- id: "service-metrics-hdfs-jvm-heap",
- title: Em.I18n.t('services.service.info.metrics.hdfs.jvmHeap'),
- yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
- renderer: 'line',
-
- ajaxIndex: 'service.metrics.hdfs.jvm_heap',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- var MB = Math.pow(2, 20);
- if (jsonData && jsonData.metrics && jsonData.metrics.jvm) {
- for ( var name in jsonData.metrics.jvm) {
- var displayName;
- var seriesData = jsonData.metrics.jvm[name];
- switch (name) {
- case "memHeapCommittedM":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.jvmHeap.displayNames.memHeapCommittedM');
- break;
- case "memNonHeapUsedM":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.jvmHeap.displayNames.memNonHeapUsedM');
- break;
- case "memHeapUsedM":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.jvmHeap.displayNames.memHeapUsedM');
- break;
- case "memNonHeapCommittedM":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.jvmHeap.displayNames.memNonHeapCommittedM');
- break;
- default:
- break;
- }
- if (seriesData) {
- var s = this.transformData(seriesData, displayName);
- for (var i = 0; i < s.data.length; i++) {
- s.data[i].y *= MB;
- }
- seriesArray.push(s);
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_threads.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_threads.js b/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_threads.js
deleted file mode 100644
index ae9118b..0000000
--- a/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_threads.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsHDFS_JVMThreads = App.ChartLinearTimeView.extend({
- id: "service-metrics-hdfs-jvm-threads",
- title: Em.I18n.t('services.service.info.metrics.hdfs.jvmThreads'),
- renderer: 'line',
-
- ajaxIndex: 'service.metrics.hdfs.jvm_threads',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.jvm) {
- for ( var name in jsonData.metrics.jvm) {
- var displayName;
- var seriesData = jsonData.metrics.jvm[name];
- switch (name) {
- case "threadsBlocked":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.jvmThreads.displayNames.threadsBlocked');
- break;
- case "threadsWaiting":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.jvmThreads.displayNames.threadsWaiting');
- break;
- case "threadsTimedWaiting":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.jvmThreads.displayNames.threadsTimedWaiting');
- break;
- case "threadsRunnable":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.jvmThreads.displayNames.threadsRunnable');
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hdfs/rpc.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/hdfs/rpc.js b/ambari-web/app/views/main/service/info/metrics/hdfs/rpc.js
deleted file mode 100644
index df5baaa..0000000
--- a/ambari-web/app/views/main/service/info/metrics/hdfs/rpc.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsHDFS_RPC = App.ChartLinearTimeView.extend({
- id: "service-metrics-hdfs-rpc",
- title: Em.I18n.t('services.service.info.metrics.hdfs.rpc'),
- yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
-
- ajaxIndex: 'service.metrics.hdfs.rpc',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.rpc) {
- for ( var name in jsonData.metrics.rpc) {
- var displayName;
- var seriesData = jsonData.metrics.rpc[name];
- switch (name) {
- case "RpcQueueTime_avg_time":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.rpc.displayNames.rpcQueueTimeAvgTime');
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/hdfs/space_utilization.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/hdfs/space_utilization.js b/ambari-web/app/views/main/service/info/metrics/hdfs/space_utilization.js
deleted file mode 100644
index 42c7c06..0000000
--- a/ambari-web/app/views/main/service/info/metrics/hdfs/space_utilization.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsHDFS_SpaceUtilization = App.ChartLinearTimeView.extend({
- id: "service-metrics-hdfs-space-utilization",
- title: Em.I18n.t('services.service.info.metrics.hdfs.spaceUtilization'),
- yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
- renderer: 'line',
- ajaxIndex: 'service.metrics.hdfs.space_utilization',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.dfs && jsonData.metrics.dfs.FSNamesystem) {
- for ( var name in jsonData.metrics.dfs.FSNamesystem) {
- var displayName;
- var seriesData = jsonData.metrics.dfs.FSNamesystem[name];
- switch (name) {
- case "CapacityRemaining":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.spaceUtilization.displayNames.capacityRemaining');
- break;
- case "CapacityUsed":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.spaceUtilization.displayNames.capacityUsed');
- break;
- case "CapacityTotal":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.spaceUtilization.displayNames.capacityTotal');
- break;
- case "CapacityNonDFSUsed":
- displayName = Em.I18n.t('services.service.info.metrics.hdfs.spaceUtilization.displayNames.capacityNonDFSUsed');
- break;
- default:
- break;
- }
- if (seriesData) {
- var s = this.transformData(seriesData, displayName);
- seriesArray.push(s);
- }
- }
- }
- return seriesArray;
- }
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/allocated.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/allocated.js b/ambari-web/app/views/main/service/info/metrics/yarn/allocated.js
deleted file mode 100644
index e7f922a..0000000
--- a/ambari-web/app/views/main/service/info/metrics/yarn/allocated.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsYARN_AllocatedMemory = App.ChartLinearTimeView.extend({
- id: "service-metrics-yarn-queue-allocated",
- title: Em.I18n.t('services.service.info.metrics.yarn.allocated.memory'),
- renderer: 'line',
- ajaxIndex: 'service.metrics.yarn.queue.allocated',
- yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- var MB = Math.pow(2, 20);
- if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue && jsonData.metrics.yarn.Queue.root) {
- for (var name in jsonData.metrics.yarn.Queue.root) {
- var displayName = null;
- var seriesData = jsonData.metrics.yarn.Queue.root[name];
- switch (name) {
- case "AvailableMB":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.memory.displayNames.available');
- break;
- case "PendingMB":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.memory.displayNames.pending');
- break;
- case "AllocatedMB":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.memory.displayNames.allocated');
- break;
- default:
- break;
- }
- if (seriesData && displayName) {
- var s = this.transformData(seriesData, displayName);
- for (var i = 0; i < s.data.length; i++) {
- s.data[i].y *= MB;
- }
- seriesArray.push(s);
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/allocated_container.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/allocated_container.js b/ambari-web/app/views/main/service/info/metrics/yarn/allocated_container.js
deleted file mode 100644
index 942d1b4..0000000
--- a/ambari-web/app/views/main/service/info/metrics/yarn/allocated_container.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsYARN_AllocatedContainer = App.ChartLinearTimeView.extend({
- id: "service-metrics-yarn-queue-allocated-container",
- title: Em.I18n.t('services.service.info.metrics.yarn.allocated.container'),
- renderer: 'line',
- ajaxIndex: 'service.metrics.yarn.queue.allocated.container',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue && jsonData.metrics.yarn.Queue.root) {
- for (var name in jsonData.metrics.yarn.Queue.root) {
- var displayName = null;
- var seriesData = jsonData.metrics.yarn.Queue.root[name];
- switch (name) {
- case "ReservedContainers":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.container.displayNames.reserved');
- break;
- case "PendingContainers":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.container.displayNames.pending');
- break;
- case "AllocatedContainers":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.container.displayNames.allocated');
- break;
- default:
- break;
- }
- if (seriesData != null && displayName) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/apps_current_states.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/apps_current_states.js b/ambari-web/app/views/main/service/info/metrics/yarn/apps_current_states.js
deleted file mode 100644
index cf97ebd..0000000
--- a/ambari-web/app/views/main/service/info/metrics/yarn/apps_current_states.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsYARN_ApplicationCurrentStates = App.ChartLinearTimeView.extend({
- id: "service-metrics-yarn-apps-current-states",
- title: Em.I18n.t('services.service.info.metrics.yarn.apps.states.current.title'),
- renderer: 'line',
- ajaxIndex: 'service.metrics.yarn.queue.apps.states.current',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue && jsonData.metrics.yarn.Queue.root) {
- for (var name in jsonData.metrics.yarn.Queue.root) {
- var displayName = null;
- var seriesData = jsonData.metrics.yarn.Queue.root[name];
- switch (name) {
- case "AppsPending":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.apps.states.pending');
- break;
- case "AppsRunning":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.apps.states.running');
- break;
- default:
- break;
- }
- if (seriesData != null && displayName) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/apps_finished_states.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/apps_finished_states.js b/ambari-web/app/views/main/service/info/metrics/yarn/apps_finished_states.js
deleted file mode 100644
index 0bcc489..0000000
--- a/ambari-web/app/views/main/service/info/metrics/yarn/apps_finished_states.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsYARN_ApplicationFinishedStates = App.ChartLinearTimeView.extend({
- id: "service-metrics-yarn-apps-finished-states",
- title: Em.I18n.t('services.service.info.metrics.yarn.apps.states.finished.title'),
- renderer: 'line',
- ajaxIndex: 'service.metrics.yarn.queue.apps.states.finished',
- yAxisFormatter: App.ChartLinearTimeView.CreateRateFormatter('apps',
- App.ChartLinearTimeView.DefaultFormatter),
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue && jsonData.metrics.yarn.Queue.root) {
- for (var name in jsonData.metrics.yarn.Queue.root) {
- var displayName = null;
- var seriesData = jsonData.metrics.yarn.Queue.root[name];
- switch (name) {
- case "AppsCompleted":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.apps.states.completed');
- break;
-// case "AppsFailed":
-// displayName = Em.I18n.t('services.service.info.metrics.yarn.apps.states.failed');
-// break;
- case "AppsKilled":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.apps.states.killed');
- break;
- case "AppsSubmitted":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.apps.states.submitted');
- break;
- default:
- break;
- }
- if (seriesData != null && displayName) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/gc.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/gc.js b/ambari-web/app/views/main/service/info/metrics/yarn/gc.js
deleted file mode 100644
index 265a56d..0000000
--- a/ambari-web/app/views/main/service/info/metrics/yarn/gc.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsYARN_GC = App.ChartLinearTimeView.extend({
- id: "service-metrics-yarn-gc",
- title: Em.I18n.t('services.service.info.metrics.yarn.gc'),
- yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
-
- ajaxIndex: 'service.metrics.yarn.gc',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.jvm) {
- for ( var name in jsonData.metrics.jvm) {
- var displayName;
- var seriesData = jsonData.metrics.jvm[name];
- switch (name) {
- case "gcTimeMillis":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.gc.displayNames.gcTimeMillis');
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/jvm_heap.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/jvm_heap.js b/ambari-web/app/views/main/service/info/metrics/yarn/jvm_heap.js
deleted file mode 100644
index 70fd89c..0000000
--- a/ambari-web/app/views/main/service/info/metrics/yarn/jvm_heap.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsYARN_JVMHeap = App.ChartLinearTimeView.extend({
- id: "service-metrics-yarn-jvm-heap",
- title: Em.I18n.t('services.service.info.metrics.yarn.jvmHeap'),
- yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
- renderer: 'line',
-
- ajaxIndex: 'service.metrics.yarn.jobs_heap',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- var MB = Math.pow(2, 20);
- if (jsonData && jsonData.metrics && jsonData.metrics.jvm) {
- for ( var name in jsonData.metrics.jvm) {
- var displayName;
- var seriesData = jsonData.metrics.jvm[name];
- switch (name) {
- case "memHeapCommittedM":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmHeap.displayNames.memHeapCommittedM');
- break;
- case "memNonHeapUsedM":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmHeap.displayNames.memNonHeapUsedM');
- break;
- case "memHeapUsedM":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmHeap.displayNames.memHeapUsedM');
- break;
- case "memNonHeapCommittedM":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmHeap.displayNames.memNonHeapCommittedM');
- break;
- default:
- break;
- }
- if (seriesData) {
- var s = this.transformData(seriesData, displayName);
- for (var i = 0; i < s.data.length; i++) {
- s.data[i].y *= MB;
- }
- seriesArray.push(s);
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/jvm_threads.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/jvm_threads.js b/ambari-web/app/views/main/service/info/metrics/yarn/jvm_threads.js
deleted file mode 100644
index aeb8601..0000000
--- a/ambari-web/app/views/main/service/info/metrics/yarn/jvm_threads.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsYARN_JVMThreads = App.ChartLinearTimeView.extend({
- id: "service-metrics-yarn-jvm-threads",
- title: Em.I18n.t('services.service.info.metrics.yarn.jvmThreads'),
- renderer: 'line',
-
- ajaxIndex: 'service.metrics.yarn.jobs_threads',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.jvm) {
- for ( var name in jsonData.metrics.jvm) {
- var displayName;
- var seriesData = jsonData.metrics.jvm[name];
- switch (name) {
- case "threadsBlocked":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmThreads.displayNames.threadsBlocked');
- break;
- case "threadsWaiting":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmThreads.displayNames.threadsWaiting');
- break;
- case "threadsTimedWaiting":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmThreads.displayNames.threadsTimedWaiting');
- break;
- case "threadsRunnable":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.jvmThreads.displayNames.threadsRunnable');
- break;
- default:
- break;
- }
-
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/nms.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/nms.js b/ambari-web/app/views/main/service/info/metrics/yarn/nms.js
deleted file mode 100644
index 14cc2a8..0000000
--- a/ambari-web/app/views/main/service/info/metrics/yarn/nms.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsYARN_NMS = App.ChartLinearTimeView.extend({
- id: "service-metrics-yarn-node-manager-statuses",
- title: Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses'),
- renderer: 'line',
- ajaxIndex: 'service.metrics.yarn.node.manager.statuses',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.yarn && jsonData.metrics.yarn.ClusterMetrics) {
- for (var name in jsonData.metrics.yarn.ClusterMetrics) {
- var displayName;
- var seriesData = jsonData.metrics.yarn.ClusterMetrics[name];
- switch (name) {
- case "NumActiveNMs":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.active');
- break;
- case "NumDecommissionedNMs":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.decommissioned');
- break;
- case "NumLostNMs":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.lost');
- break;
- case "NumRebootedNMs":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.rebooted');
- break;
- case "NumUnhealthyNMs":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.unhealthy');
- break;
- default:
- break;
- }
- if (seriesData != null) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/qmr.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/qmr.js b/ambari-web/app/views/main/service/info/metrics/yarn/qmr.js
deleted file mode 100644
index 077df4b..0000000
--- a/ambari-web/app/views/main/service/info/metrics/yarn/qmr.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-var objUtils = require('utils/object_utils');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsYARN_QMR = App.ChartLinearTimeView.extend({
- id: "service-metrics-yarn-queue-memory-resource",
- title: Em.I18n.t('services.service.info.metrics.yarn.queueMemoryResource'),
- renderer: 'line',
- ajaxIndex: 'service.metrics.yarn.queue.memory.resource',
- yAxisFormatter: App.ChartLinearTimeView.PercentageFormatter,
-
- getDataForAjaxRequest: function () {
- var data = this._super();
- var svc = App.YARNService.find().objectAt(0);
- var queueNames = [];
- if (svc != null) {
- queueNames = svc.get('childQueueNames');
- }
- data.queueNames = queueNames;
- return data;
- },
-
- transformToSeries: function (jsonData) {
- var self = this;
- var seriesArray = [];
- var MB = Math.pow(2, 20);
- var svc = App.YARNService.find().objectAt(0);
- var queueNames = [];
- if (svc != null) {
- queueNames = svc.get('childQueueNames');
- }
- if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue) {
- queueNames.forEach(function (qName) {
- var qPath = qName.replace(/\//g, '.');
- var displayName;
- var allocatedData = Em.get(jsonData.metrics.yarn.Queue, qPath + '.AllocatedMB');
- var availableData = Em.get(jsonData.metrics.yarn.Queue, qPath + '.AvailableMB');
- displayName = Em.I18n.t('services.service.info.metrics.yarn.queueMemoryResource.displayName').format(qName);
- var seriesData = null;
- if (allocatedData != null && availableData != null) {
- if (typeof allocatedData == "number" && typeof availableData == "number") {
- seriesData = (availableData == 0 && allocatedData == 0) ? 0 : (allocatedData * 100) / (allocatedData + availableData);
- } else if (allocatedData.length > 0 && availableData.length > 0) {
- seriesData = [];
- for ( var c = 0; c < Math.min(availableData.length, allocatedData.length); c++) {
- var allocDivAvail = (availableData[c][0] == 0 && allocatedData[c][0] == 0) ? 0 : (allocatedData[c][0] * 100) / (availableData[c][0] + allocatedData[c][0]);
- seriesData.push([allocDivAvail, allocatedData[c][1] ]);
- }
- } else {
- console.log("Skipping data series for Queue " + qName);
- }
- }
- if (seriesData != null) {
- seriesArray.push(self.transformData(seriesData, displayName));
- }
- });
- }
- return seriesArray;
- }
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/metrics/yarn/rpc.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/rpc.js b/ambari-web/app/views/main/service/info/metrics/yarn/rpc.js
deleted file mode 100644
index 1e4ecf4..0000000
--- a/ambari-web/app/views/main/service/info/metrics/yarn/rpc.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-var App = require('app');
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartLinearTimeView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.ChartServiceMetricsYARN_RPC = App.ChartLinearTimeView.extend({
- id: "service-metrics-yarn-rpc",
- title: Em.I18n.t('services.service.info.metrics.yarn.rpc'),
- yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
-
- ajaxIndex: 'service.metrics.yarn.rpc',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.rpc) {
- for ( var name in jsonData.metrics.rpc) {
- var displayName;
- var seriesData = jsonData.metrics.rpc[name];
- switch (name) {
- case "RpcQueueTime_avg_time":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.rpc.displayNames.RpcQueueTimeAvgTime');
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/info/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/summary.js b/ambari-web/app/views/main/service/info/summary.js
index 83e503f..42adf76 100644
--- a/ambari-web/app/views/main/service/info/summary.js
+++ b/ambari-web/app/views/main/service/info/summary.js
@@ -521,7 +521,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, {
}.property('App.router.clusterController.gangliaUrl', 'service.serviceName'),
didInsertElement: function () {
- var svcName = this.get('service.serviceName');
+ var svcName = this.get('controller.content.serviceName');
var isMetricsSupported = svcName != 'STORM' || App.get('isStormMetricsSupported');
this.get('controller').getActiveWidgetLayout();
@@ -530,7 +530,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, {
}
if (svcName && isMetricsSupported) {
- var allServices = require('data/service_graph_config').getServiceGraphConfig();
+ var allServices = require('data/service_graph_config');
this.constructGraphObjects(allServices[svcName.toLowerCase()]);
}
// adjust the summary table height
http://git-wip-us.apache.org/repos/asf/ambari/blob/caa54ce4/ambari-web/app/views/main/service/services/hdfs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/services/hdfs.js b/ambari-web/app/views/main/service/services/hdfs.js
index d70b454..e180ee8 100644
--- a/ambari-web/app/views/main/service/services/hdfs.js
+++ b/ambari-web/app/views/main/service/services/hdfs.js
@@ -63,9 +63,6 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
didInsertElement: function() {
App.tooltip($("[rel='tooltip']"));
},
- dataNodesLive: function () {
- return this.get('service.dataNodesStarted');
- }.property('service.dataNodesStarted'),
dataNodesDead: function () {
return this.get('service.dataNodesInstalled');
}.property('service.dataNodesInstalled'),
@@ -129,21 +126,6 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
percent.toFixed(1));
}.property('service.jvmMemoryHeapUsed', 'service.jvmMemoryHeapMax'),
- summaryHeader: function () {
- var text = this.t("dashboard.services.hdfs.summary");
- var service = this.get('service');
- var liveCount = service.get('dataNodesStarted');
- var totalCount = service.get('dataNodesTotal');
- var total = service.get('capacityTotal') + 0;
- var remaining = service.get('capacityRemaining') + 0;
- var used = total - remaining;
- var percent = total > 0 ? ((used * 100) / total).toFixed(1) : 0;
- if (percent == "NaN" || percent < 0) {
- percent = Em.I18n.t('services.service.summary.notAvailable') + " ";
- }
- return text.format(liveCount, totalCount, percent);
- }.property('service.dataNodesStarted', 'service.dataNodesTotal', 'service.capacityUsed', 'service.capacityTotal'),
-
dfsUsedDisk: function () {
var text = this.t("dashboard.services.hdfs.capacityUsed");
var total = this.get('service.capacityTotal');