You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2016/12/08 23:29:41 UTC
[02/25] ambari git commit: Merge from branch-2.5
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-server/src/test/resources/dashboards/README.txt
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/dashboards/README.txt b/ambari-server/src/test/resources/dashboards/README.txt
new file mode 100644
index 0000000..919d510
--- /dev/null
+++ b/ambari-server/src/test/resources/dashboards/README.txt
@@ -0,0 +1,18 @@
+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.
+
+
+Test directory for sync'ing a components custom folder - AMBARI-19018
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-server/src/test/resources/stacks/HDP/0.1/services/HDFS/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/0.1/services/HDFS/metainfo.xml b/ambari-server/src/test/resources/stacks/HDP/0.1/services/HDFS/metainfo.xml
index f4195a8..7629552 100644
--- a/ambari-server/src/test/resources/stacks/HDP/0.1/services/HDFS/metainfo.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/0.1/services/HDFS/metainfo.xml
@@ -57,6 +57,7 @@
<name>DATANODE</name>
<category>SLAVE</category>
<cardinality>1+</cardinality>
+ <customFolder>dashboards</customFolder>
<commandScript>
<script>scripts/datanode.py</script>
<scriptType>PYTHON</scriptType>
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-server/src/test/resources/stacks/HDP/2.2.0/services/GANGLIA/upgrades/HDP/rolling-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.2.0/services/GANGLIA/upgrades/HDP/rolling-upgrade.xml b/ambari-server/src/test/resources/stacks/HDP/2.2.0/services/GANGLIA/upgrades/HDP/rolling-upgrade.xml
new file mode 100644
index 0000000..1d34c59
--- /dev/null
+++ b/ambari-server/src/test/resources/stacks/HDP/2.2.0/services/GANGLIA/upgrades/HDP/rolling-upgrade.xml
@@ -0,0 +1,43 @@
+<?xml version="1.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.
+-->
+
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd">
+ <target>*</target>
+ <target-stack>*</target-stack>
+ <type>ROLLING</type>
+ <order>
+ <group name="GANGLIA_UPGRADE" title="Ganglia">
+ <add-after-group>ZOOKEEPER_CONFIG_CONDITION_TEST</add-after-group>
+ <skippable>true</skippable>
+ <allow-retry>true</allow-retry>
+ <service name="GANGLIA">
+ <component>HST_SERVER</component>
+ </service>
+ </group>
+ </order>
+
+ <processing>
+ <service name="GANGLIA">
+ <component name="GANGLIA_SERVER">
+ <upgrade>
+ <task xsi:type="restart-task" />
+ </upgrade>
+ </component>
+ </service>
+ </processing>
+</upgrade>
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/controllers/global/update_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/update_controller.js b/ambari-web/app/controllers/global/update_controller.js
index 4631f09..ce93b34 100644
--- a/ambari-web/app/controllers/global/update_controller.js
+++ b/ambari-web/app/controllers/global/update_controller.js
@@ -249,11 +249,10 @@ App.UpdateController = Em.Controller.extend({
]);
}
else {
- // clusterController.isHostsLoaded may be changed in callback, that is why it's value is cached before calling callback
- isHostsLoaded = App.router.get('clusterController.isHostsLoaded');
- callback();
// On pages except for hosts/hostDetails, making sure hostsMapper loaded only once on page load, no need to update, but at least once
+ isHostsLoaded = App.router.get('clusterController.isHostsLoaded');
if (isHostsLoaded) {
+ callback();
return;
}
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/controllers/main/admin/highAvailability/journalNode/step1_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/journalNode/step1_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/journalNode/step1_controller.js
index b6ffe5b..e1252b7 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/journalNode/step1_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/journalNode/step1_controller.js
@@ -28,8 +28,6 @@ App.ManageJournalNodeWizardStep1Controller = Em.Controller.extend(App.BlueprintM
mastersToShow: ['JOURNALNODE'],
- mastersToAdd: [],
-
showInstalledMastersFirst: true,
JOURNALNODES_COUNT_MINIMUM: 3, // TODO get this from stack
@@ -41,14 +39,9 @@ App.ManageJournalNodeWizardStep1Controller = Em.Controller.extend(App.BlueprintM
* @param masterComponents
*/
renderComponents: function(masterComponents) {
- var jns = App.HostComponent.find().filterProperty('componentName', 'JOURNALNODE');
- var count = jns.get('length');
- this.set('mastersToAdd', []);
- if (masterComponents.filterProperty('component_name', 'JOURNALNODE').length == 0) {
- for (var i = 0; i < count; i++) {
- this.get('mastersToAdd').push('JOURNALNODE');
- }
- }
+ //check if we are restoring components assignment by checking existing of JOURNALNODE component in array
+ var restoringComponents = masterComponents.someProperty('component_name', 'JOURNALNODE');
+ masterComponents = restoringComponents ? masterComponents : masterComponents.concat(this.generateJournalNodeComponents());
this._super(masterComponents);
this.updateJournalNodeInfo();
this.showHideJournalNodesAddRemoveControl();
@@ -56,6 +49,19 @@ App.ManageJournalNodeWizardStep1Controller = Em.Controller.extend(App.BlueprintM
},
/**
+ * Create JOURNALNODE components to add them to masters array
+ */
+ generateJournalNodeComponents: function () {
+ var journalNodes = [];
+ App.HostComponent.find().filterProperty('componentName', 'JOURNALNODE').forEach(function (jn) {
+ var jnComponent = this.createComponentInstallationObject(Em.Object.create({serviceName: jn.get('service.serviceName'), componentName: jn.get('componentName')}), jn.get('hostName'));
+ jnComponent.isInstalled = true;
+ journalNodes.push(jnComponent);
+ }, this);
+ return journalNodes;
+ },
+
+ /**
* Enable/Disable show/hide operation for each JournalNode
*/
showHideJournalNodesAddRemoveControl: function() {
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/controllers/main/admin/highAvailability/journalNode/step4_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/journalNode/step4_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/journalNode/step4_controller.js
index 329b8fe..1938527 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/journalNode/step4_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/journalNode/step4_controller.js
@@ -60,11 +60,7 @@ App.ManageJournalNodeWizardStep4Controller = App.ManageJournalNodeProgressPageCo
reconfigureHDFS: function () {
var data = this.get('content.serviceConfigProperties');
- if (App.get('isKerberosEnabled')) {
- // TODO this.reconfigureSecureHDFS();
- } else {
- this.updateConfigProperties(data);
- }
+ this.updateConfigProperties(data);
},
/**
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/controllers/main/admin/highAvailability/journalNode/wizard_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/journalNode/wizard_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/journalNode/wizard_controller.js
index 2305524..fe9a15b 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/journalNode/wizard_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/journalNode/wizard_controller.js
@@ -120,22 +120,30 @@ App.ManageJournalNodeWizardController = App.WizardController.extend({
},
getJournalNodesToAdd: function () {
- return this.get('content.masterComponentHosts').filterProperty('component', 'JOURNALNODE')
- .filterProperty('isInstalled', false).mapProperty('hostName');
+ var result = [];
+ var masterComponentHosts = this.get('content.masterComponentHosts');
+ if (masterComponentHosts) {
+ result = masterComponentHosts.filterProperty('component', 'JOURNALNODE').filterProperty('isInstalled', false).mapProperty('hostName');
+ }
+ return result;
},
getJournalNodesToDelete: function () {
- var existingHosts = App.HostComponent.find().filterProperty('componentName', 'JOURNALNODE').mapProperty('hostName');
- var currentJNs = this.get('content.masterComponentHosts').filterProperty('component', 'JOURNALNODE');
- var removed = existingHosts.filter(function(host) {
- return currentJNs.filterProperty('hostName', host).length == 0;
- });
- return removed;
+ var result = [];
+ var masterComponentHosts = this.get('content.masterComponentHosts');
+ if (masterComponentHosts) {
+ var currentJNs = masterComponentHosts.filterProperty('component', 'JOURNALNODE');
+ var existingHosts = App.HostComponent.find().filterProperty('componentName', 'JOURNALNODE').mapProperty('hostName');
+ result = existingHosts.filter(function(host) {
+ return currentJNs.filterProperty('hostName', host).length == 0;
+ });
+ }
+ return result;
},
isDeleteOnly: function () {
- return this.getJournalNodesToAdd().length == 0 && this.getJournalNodesToDelete().length > 0;
- },
+ return this.get('currentStep') > 1 && this.getJournalNodesToAdd().length == 0 && this.getJournalNodesToDelete().length > 0;
+ }.property('content.masterComponentHosts', 'App.router.clusterController.isHostsLoaded', 'currentStep'),
/**
* Save config properties
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step7_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step7_controller.js
index ae27506..9e14281 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step7_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step7_controller.js
@@ -22,14 +22,24 @@ App.HighAvailabilityWizardStep7Controller = App.HighAvailabilityProgressPageCont
name:"highAvailabilityWizardStep7Controller",
- commands: ['startRanger', 'startZooKeeperServers', 'startNameNode'],
+ commands: ['startZooKeeperServers', 'startAmbariInfra', 'startRanger', 'startNameNode'],
initializeTasks: function () {
this._super();
+ var tasksToRemove = [];
+
+ if (!App.Service.find().someProperty('serviceName', 'AMBARI_INFRA')) {
+ tasksToRemove.push('startAmbariInfra');
+ }
if (!App.Service.find().someProperty('serviceName', 'RANGER')) {
- this.get('tasks').splice(this.get('tasks').findProperty('command', 'startRanger').get('id'), 1);
+ tasksToRemove.push('startRanger');
}
+ this.removeTasks(tasksToRemove);
+ },
+
+ startAmbariInfra: function () {
+ this.startServices(false, ['AMBARI_INFRA'], true);
},
startRanger: function () {
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js
index 3c220c1..713e1c3 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js
@@ -31,30 +31,27 @@ App.HighAvailabilityWizardStep9Controller = App.HighAvailabilityProgressPageCont
initializeTasks: function () {
this._super();
- var numSpliced = 0;
+ var tasksToRemove = [];
// find hostname where second namenode will be installed
this.set('secondNameNodeHost', this.get('content.masterComponentHosts').filterProperty('component', 'NAMENODE').findProperty('isInstalled', false).hostName);
if (!App.Service.find().someProperty('serviceName', 'PXF') || this.isPxfComponentInstalled()) {
- this.get('tasks').splice(this.get('tasks').findProperty('command', 'installPXF').get('id'), 1);
- numSpliced = 1;
+ tasksToRemove.push('installPXF');
}
if (!App.Service.find().someProperty('serviceName', 'RANGER')) {
- this.get('tasks').splice(this.get('tasks').findProperty('command', 'reconfigureRanger').get('id') - numSpliced, 1);
- numSpliced++;
+ tasksToRemove.push('reconfigureRanger');
}
if (!App.Service.find().someProperty('serviceName', 'HBASE')) {
- this.get('tasks').splice(this.get('tasks').findProperty('command', 'reconfigureHBase').get('id') - numSpliced, 1);
- numSpliced++;
+ tasksToRemove.push('reconfigureHBase');
}
if (!App.Service.find().someProperty('serviceName', 'ACCUMULO')) {
- this.get('tasks').splice(this.get('tasks').findProperty('command', 'reconfigureAccumulo').get('id') - numSpliced, 1);
- numSpliced++ ;
+ tasksToRemove.push('reconfigureAccumulo');
}
if (!App.Service.find().someProperty('serviceName', 'HAWQ')) {
- this.get('tasks').splice(this.get('tasks').findProperty('command', 'reconfigureHawq').get('id') - numSpliced, 1);
+ tasksToRemove.push('reconfigureHawq');
}
+ this.removeTasks(tasksToRemove);
},
startSecondNameNode: function () {
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step4_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step4_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step4_controller.js
index 722ae94..0495be9 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step4_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step4_controller.js
@@ -32,10 +32,11 @@ App.RMHighAvailabilityWizardStep4Controller = App.HighAvailabilityProgressPageCo
initializeTasks: function () {
this._super();
- var numSpliced = 0;
+ var tasksToRemove = [];
if (!App.Service.find().someProperty('serviceName', 'HAWQ')) {
- this.get('tasks').splice(this.get('tasks').findProperty('command', 'reconfigureHAWQ').get('id'), 1);
+ tasksToRemove.push('reconfigureHAWQ');
}
+ this.removeTasks(tasksToRemove);
},
stopRequiredServices: function () {
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
index ebf6c39..3058580 100644
--- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
@@ -52,6 +52,16 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
upgradeType: null,
/**
+ * @type {Em.Object}
+ */
+ upgradeTypeConfig: Em.computed.findByKey('upgradeMethods', 'type', 'upgradeType'),
+
+ /**
+ * @type {boolean}
+ */
+ cantBeStarted: Em.computed.alias('upgradeTypeConfig.cantBeStarted'),
+
+ /**
* @type {boolean}
* @default true
*/
@@ -160,7 +170,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
precheckResultsMessage: '',
precheckResultsTitle: '',
action: '',
- isWizardRestricted: !App.supports.enabledWizardForHostOrderedUpgrade
+ isWizardRestricted: !App.supports.enabledWizardForHostOrderedUpgrade,
+ cantBeStarted: true
})
],
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/controllers/main/admin/stack_upgrade_history_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/stack_upgrade_history_controller.js b/ambari-web/app/controllers/main/admin/stack_upgrade_history_controller.js
index 9bec825..8a60d83 100644
--- a/ambari-web/app/controllers/main/admin/stack_upgrade_history_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_upgrade_history_controller.js
@@ -213,5 +213,5 @@ App.MainAdminStackUpgradeHistoryController = Em.ArrayController.extend({
} else {
return ''
}
- }.property('upgradeData.Upgrade.request_status'),
+ }.property('upgradeData.Upgrade.request_status')
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/controllers/main/service/info/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/summary.js b/ambari-web/app/controllers/main/service/info/summary.js
index 821b796..09f3429 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -386,25 +386,30 @@ App.MainServiceInfoSummaryController = Em.Controller.extend(App.WidgetSectionMix
var property = context.get('componentName') ? 'componentName' : 'serviceName';
var serviceDefinitions = this.get('controller.content').filterProperty(property, context.get(property));
// definitions should be sorted in order: critical, warning, ok, unknown, other
- var criticalDefinitions = [], warningDefinitions = [], okDefinitions = [], unknownDefinitions = [];
+ var definitionTypes = {
+ "isCritical": [],
+ "isWarning": [],
+ "isOK": [],
+ "isUnknown": []
+ };
+
serviceDefinitions.forEach(function (definition) {
- if (definition.get('isCritical')) {
- criticalDefinitions.push(definition);
- serviceDefinitions = serviceDefinitions.without(definition);
- } else if (definition.get('isWarning')) {
- warningDefinitions.push(definition);
- serviceDefinitions = serviceDefinitions.without(definition);
- } else if (definition.get('isOK')) {
- okDefinitions.push(definition);
- serviceDefinitions = serviceDefinitions.without(definition);
- } else if (definition.get('isUnknown')) {
- unknownDefinitions.push(definition);
- serviceDefinitions = serviceDefinitions.without(definition);
- }
+ Object.keys(definitionTypes).forEach(function (type) {
+ if (definition.get(type)) {
+ definition.set('isCollapsed', true);
+ definitionTypes[type].push(definition);
+ serviceDefinitions = serviceDefinitions.without(definition);
+ }
+ });
});
- serviceDefinitions = criticalDefinitions.concat(warningDefinitions, okDefinitions, unknownDefinitions, serviceDefinitions);
+ serviceDefinitions = definitionTypes.isCritical.concat(definitionTypes.isWarning, definitionTypes.isOK, definitionTypes.isUnknown, serviceDefinitions);
+
return serviceDefinitions;
}.property('controller.content'),
+ onToggleBlock: function (alert) {
+ this.$('#' + alert.context.clientId).toggle('blind', 500);
+ alert.context.set("isCollapsed", !alert.context.get("isCollapsed"));
+ },
gotoAlertDetails: function (event) {
if (event && event.context) {
this.get('parentView').hide();
@@ -855,4 +860,4 @@ App.MainServiceInfoSummaryController = Em.Controller.extend(App.WidgetSectionMix
App.router.route('main' + event.context.href);
}
-});
\ No newline at end of file
+});
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/controllers/main/service/reassign/step4_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/reassign/step4_controller.js b/ambari-web/app/controllers/main/service/reassign/step4_controller.js
index 26ac68c..da7d2d9 100644
--- a/ambari-web/app/controllers/main/service/reassign/step4_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step4_controller.js
@@ -71,6 +71,12 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
hostComponents: [],
/**
+ * List of components, that do not need reconfiguration for moving to another host
+ * Reconfigure command will be skipped
+ */
+ componentsWithoutReconfiguration: ['METRICS_COLLECTOR'],
+
+ /**
* Map with lists of related services.
* Used to define list of services to stop/start.
*/
@@ -189,14 +195,6 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
}
},
{
- componentName: 'METRICS_COLLECTOR',
- configs: {
- 'ams-site': {
- 'timeline.metrics.service.webapp.address': '<replace-value>:6188'
- }
- }
- },
- {
componentName: 'HISTORYSERVER',
configs: {
'mapred-site': {
@@ -398,32 +396,16 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
this.removeTasks(['startZooKeeperServers', 'startNameNode']);
}
+ if (this.get('componentsWithoutReconfiguration').contains(componentName)) {
+ this.removeTasks(['reconfigure']);
+ }
+
if (!this.get('content.reassignComponentsInMM.length')) {
this.removeTasks(['stopHostComponentsInMaintenanceMode']);
}
},
/**
- * remove tasks by command name
- */
- removeTasks: function(commands) {
- var tasks = this.get('tasks');
-
- commands.forEach(function(command) {
- var cmd = tasks.filterProperty('command', command);
- var index = null;
-
- if (cmd.length === 0) {
- return false;
- } else {
- index = tasks.indexOf( cmd[0] );
- }
-
- tasks.splice( index, 1 );
- });
- },
-
- /**
* initialize tasks
*/
initializeTasks: function () {
@@ -542,7 +524,6 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
'HIVE_SERVER': ['hive-site', 'webhcat-site', 'hive-env', 'core-site'],
'HIVE_METASTORE': ['hive-site', 'webhcat-site', 'hive-env', 'core-site'],
'MYSQL_SERVER': ['hive-site'],
- 'METRICS_COLLECTOR': ['ams-site'],
'HISTORYSERVER': ['mapred-site']
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/controllers/main/service/reassign/step6_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/reassign/step6_controller.js b/ambari-web/app/controllers/main/service/reassign/step6_controller.js
index 113686b..80f1bf6 100644
--- a/ambari-web/app/controllers/main/service/reassign/step6_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step6_controller.js
@@ -99,25 +99,6 @@ App.ReassignMasterWizardStep6Controller = App.HighAvailabilityProgressPageContro
}
},
- /**
- * remove tasks by command name
- */
- removeTasks: function(commands) {
- var tasks = this.get('tasks');
-
- commands.forEach(function(command) {
- var index;
- tasks.forEach(function(_task, _index) {
- if (_task.get('command') === command) {
- index = _index;
- }
- });
- if (!Em.isNone(index)) {
- tasks.splice(index, 1);
- }
- }, this);
- },
-
hideRollbackButton: function () {
var failedTask = this.get('tasks').findProperty('showRollback');
if (failedTask) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/controllers/wizard/step3_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step3_controller.js b/ambari-web/app/controllers/wizard/step3_controller.js
index 793d33d..45180fe 100644
--- a/ambari-web/app/controllers/wizard/step3_controller.js
+++ b/ambari-web/app/controllers/wizard/step3_controller.js
@@ -1081,7 +1081,7 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin, {
*/
getHostCheckTasksSuccess: function (data) {
if (!data) {
- return;
+ return this.getGeneralHostCheck();
}
if (["FAILED", "COMPLETED", "TIMEDOUT"].contains(data.Requests.request_status)) {
if (data.Requests.inputs.indexOf("last_agent_env_check") != -1) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js
index 5b66506..e2a4d4e 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -2066,95 +2066,81 @@ var hdp2properties = [
"index": 5
},
{
- "name": "logsearch_solr_audit_logs_zk_node",
- "serviceName": "LOGSEARCH",
- "filename": "logsearch-env.xml",
- "category": "Advanced logsearch-env",
- "index": 6
- },
- {
- "name": "logsearch_solr_audit_logs_zk_quorum",
- "serviceName": "LOGSEARCH",
- "filename": "logsearch-env.xml",
- "category": "Advanced logsearch-env",
- "index": 7
- },
- {
"name": "logsearch_debug_enabled",
"serviceName": "LOGSEARCH",
"filename": "logsearch-env.xml",
"category": "Advanced logsearch-env",
- "index": 8
+ "index": 6
},
{
"name": "logsearch_debug_port",
"serviceName": "LOGSEARCH",
"filename": "logsearch-env.xml",
"category": "Advanced logsearch-env",
- "index": 9
+ "index": 7
},
{
"name": "logsearch_truststore_location",
"serviceName": "LOGSEARCH",
"filename": "logsearch-env.xml",
"category": "Advanced logsearch-env",
- "index": 10
+ "index": 8
},
{
"name": "logsearch_truststore_type",
"serviceName": "LOGSEARCH",
"filename": "logsearch-env.xml",
"category": "Advanced logsearch-env",
- "index": 11
+ "index": 9
},
{
"name": "logsearch_truststore_password",
"serviceName": "LOGSEARCH",
"filename": "logsearch-env.xml",
"category": "Advanced logsearch-env",
- "index": 12
+ "index": 10
},
{
"name": "logsearch_keystore_location",
"serviceName": "LOGSEARCH",
"filename": "logsearch-env.xml",
"category": "Advanced logsearch-env",
- "index": 13
+ "index": 11
},
{
"name": "logsearch_keystore_type",
"serviceName": "LOGSEARCH",
"filename": "logsearch-env.xml",
"category": "Advanced logsearch-env",
- "index": 14
+ "index": 12
},
{
"name": "logsearch_keystore_password",
"serviceName": "LOGSEARCH",
"filename": "logsearch-env.xml",
"category": "Advanced logsearch-env",
- "index": 15
+ "index": 13
},
{
"name": "logsearch_kerberos_keytab",
"serviceName": "LOGSEARCH",
"filename": "logsearch-env.xml",
"category": "Advanced logsearch-env",
- "index": 16
+ "index": 14
},
{
"name": "logsearch_kerberos_principal",
"serviceName": "LOGSEARCH",
"filename": "logsearch-env.xml",
"category": "Advanced logsearch-env",
- "index": 17
+ "index": 15
},
{
"name": "content",
"serviceName": "LOGSEARCH",
"filename": "logsearch-env.xml",
"category": "Advanced logsearch-env",
- "index": 18
+ "index": 16
},
/*logsearch-log4j*/
{
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/mappers/stack_upgrade_history_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/stack_upgrade_history_mapper.js b/ambari-web/app/mappers/stack_upgrade_history_mapper.js
index 63088a7..823ae80 100644
--- a/ambari-web/app/mappers/stack_upgrade_history_mapper.js
+++ b/ambari-web/app/mappers/stack_upgrade_history_mapper.js
@@ -50,5 +50,5 @@ App.stackUpgradeHistoryMapper = App.QuickDataMapper.create({
App.store.loadMany(this.get('model'), result);
App.store.commit();
App.set('isStackUpgradeHistoryLoaded',true);
- },
+ }
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 5c7e0e8..945acfb 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -344,6 +344,7 @@ Em.I18n.translations = {
'common.end.time': 'End Time',
'common.rolling': 'Rolling',
'common.express': 'Express',
+ 'common.hostOrdered': 'Host Ordered',
'common.rolling.downgrade': 'Rolling Downgrade',
'common.express.downgrade': 'Express Downgrade',
@@ -1403,9 +1404,10 @@ Em.I18n.translations = {
'admin.highAvailability.wizard.step5.task4.title':'Start JournalNodes',
'admin.highAvailability.wizard.step5.task5.title':'Disable Secondary NameNode',
- 'admin.highAvailability.wizard.step7.task0.title':'Start Ranger',
- 'admin.highAvailability.wizard.step7.task1.title':'Start ZooKeeper Servers',
- 'admin.highAvailability.wizard.step7.task2.title':'Start NameNode',
+ 'admin.highAvailability.wizard.step7.task0.title':'Start ZooKeeper Servers',
+ 'admin.highAvailability.wizard.step7.task1.title':'Start Ambari Infra',
+ 'admin.highAvailability.wizard.step7.task2.title':'Start Ranger',
+ 'admin.highAvailability.wizard.step7.task3.title':'Start NameNode',
'admin.highAvailability.wizard.step9.task0.title':'Start Additional NameNode',
'admin.highAvailability.wizard.step9.task1.title':'Install Failover Controllers',
@@ -3155,7 +3157,6 @@ Em.I18n.translations = {
'config.infoMessage.wrong.value.for.combobox.widget': '"{0}" is not available in the list of valid values',
'config.warnMessage.outOfBoundaries.greater': 'Values greater than {0} are not recommended',
'config.warnMessage.outOfBoundaries.less': 'Values smaller than {0} are not recommended',
- 'config.warnMessage.llap_queue_capacity.max': 'LLAP will consume entire Yarn queue',
'errorMessage.config.required': 'This is required',
'errorMessage.config.number.integer': 'Must contain digits only',
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/mixins.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins.js b/ambari-web/app/mixins.js
index d3ccbbe..ad682d7 100644
--- a/ambari-web/app/mixins.js
+++ b/ambari-web/app/mixins.js
@@ -66,4 +66,3 @@ require('mixins/common/widgets/widget_mixin');
require('mixins/common/widgets/widget_section');
require('mixins/unit_convert/base_unit_convert_mixin');
require('mixins/unit_convert/convert_unit_widget_view_mixin');
-require('utils/configs/mount_points_based_initializer_mixin');
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js b/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js
index 7517efd..aa4f77c 100644
--- a/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js
+++ b/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js
@@ -85,6 +85,7 @@ App.ExportMetricsMixin = Em.Mixin.create({
ticksNumber,
metricsNumber,
metricsArray;
+ this.checkGraphDataForValidity(data);
titles = data.map(function (item) {
return displayUnit ? item.name + ' (' + displayUnit + ')' : item.name;
}, this);
@@ -95,12 +96,35 @@ App.ExportMetricsMixin = Em.Mixin.create({
for (var i = 0; i < ticksNumber; i++) {
metricsArray.push([data[0].data[i][1]]);
for (var j = 0; j < metricsNumber; j++) {
- metricsArray[i + 1].push(data[j].data[i][0]);
+ metricsArray[i + 1].push(data[j].data[i][0]);
};
- }
+ };
return stringUtils.arrayToCSV(metricsArray);
},
+ checkGraphDataForValidity: function (data) {
+ data.sort(function (a, b) {
+ return b.data.length - a.data.length
+ });
+
+ var maxLength = data[0].data.length;
+
+ for (var i = 1; i < data.length; i ++) {
+ if (data[i].data.length !== maxLength) this.fillGraphDataArrayWithMockedData(data[i], maxLength);
+ }
+ },
+
+ fillGraphDataArrayWithMockedData: function (dataArray, neededLength) {
+ var startIndex = dataArray.data.length,
+ timestampInterval = dataArray.data[2][1] - dataArray.data[1][1];
+
+ for (var i = startIndex; i < neededLength; i++) {
+ var previousTimestamp = dataArray.data[i - 1][1];
+
+ dataArray.data.push([null, previousTimestamp + timestampInterval]);
+ }
+ },
+
jsonReplacer: function () {
var displayUnit = this.get('targetView.displayUnit');
return function (key, value) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/mixins/wizard/assign_master_components.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js
index d8ada11..2c4245d 100644
--- a/ambari-web/app/mixins/wizard/assign_master_components.js
+++ b/ambari-web/app/mixins/wizard/assign_master_components.js
@@ -1236,6 +1236,7 @@ App.AssignMasterComponents = Em.Mixin.create({
},
onSecondary: function () {
this._super();
+ App.router.set('nextBtnClickInProgress', false);
self.set('submitButtonClicked', false);
},
onClose: function () {
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/mixins/wizard/wizardProgressPageController.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/wizard/wizardProgressPageController.js b/ambari-web/app/mixins/wizard/wizardProgressPageController.js
index 3ee8a9a..d426eda 100644
--- a/ambari-web/app/mixins/wizard/wizardProgressPageController.js
+++ b/ambari-web/app/mixins/wizard/wizardProgressPageController.js
@@ -272,6 +272,26 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create(App.InstallComponent, {
}
},
+ /**
+ * remove tasks by command name
+ */
+ removeTasks: function(commands) {
+ var tasks = this.get('tasks');
+
+ commands.forEach(function(command) {
+ var cmd = tasks.filterProperty('command', command);
+ var index = null;
+
+ if (cmd.length === 0) {
+ return false;
+ } else {
+ index = tasks.indexOf( cmd[0] );
+ }
+
+ tasks.splice( index, 1 );
+ });
+ },
+
setTaskStatus: function (taskId, status) {
this.get('tasks').findProperty('id', taskId).set('status', status);
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/models/configs/objects/service_config_property.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/configs/objects/service_config_property.js b/ambari-web/app/models/configs/objects/service_config_property.js
index 5d85ae0..4459946 100644
--- a/ambari-web/app/models/configs/objects/service_config_property.js
+++ b/ambari-web/app/models/configs/objects/service_config_property.js
@@ -358,13 +358,6 @@ App.ServiceConfigProperty = Em.Object.extend({
} else if ((typeof this.get('value') != 'object') && ((this.get('value') + '').length === 0)) {
var widgetType = this.get('widgetType');
this.set('errorMessage', (this.get('isRequired') && (!['test-db-connection','label'].contains(widgetType))) ? Em.I18n.t('errorMessage.config.required') : '');
- } else if (this.get('name') === 'llap_queue_capacity') {
- if (!isNaN(parseInt(this.get('value'), 10)) && parseInt(this.get('value'), 10) === 100) {
- this.set('warnMessage', Em.I18n.t('config.warnMessage.llap_queue_capacity.max'));
- } else {
- this.set('warnMessage', '');
- this.set('errorMessage', this.validateErrors(this.get('value'), this.get('name'), this.get('retypedPassword')));
- }
} else {
this.set('errorMessage', this.validateErrors(this.get('value'), this.get('name'), this.get('retypedPassword')));
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/models/stack_service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/stack_service.js b/ambari-web/app/models/stack_service.js
index 0136ec3..f824b6a 100644
--- a/ambari-web/app/models/stack_service.js
+++ b/ambari-web/app/models/stack_service.js
@@ -46,7 +46,9 @@ App.StackService = DS.Model.extend({
configs: DS.attr('array'),
requiredServices: DS.attr('array', {defaultValue: []}),
- isDisabled: Em.computed.or('isMandatory', 'isInstalled'),
+ isDisabled: function () {
+ return this.get('isInstalled') || (this.get('isMandatory') && !App.get('router.clusterInstallCompleted'));
+ }.property('isMandatory', 'isInstalled', 'App.router.clusterInstallCompleted'),
/**
* @type {String[]}
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/models/stack_version/stack_upgrade_history.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/stack_version/stack_upgrade_history.js b/ambari-web/app/models/stack_version/stack_upgrade_history.js
index d4a89dc..9e0439c 100644
--- a/ambari-web/app/models/stack_version/stack_upgrade_history.js
+++ b/ambari-web/app/models/stack_version/stack_upgrade_history.js
@@ -31,7 +31,7 @@ App.StackUpgradeHistory = DS.Model.extend({
skipServiceCheckFailures: DS.attr('boolean'),
endTime: DS.attr('number'),
startTime: DS.attr('number'),
- createTime: DS.attr('number'),
+ createTime: DS.attr('number')
});
App.StackUpgradeHistory.FIXTURES = [];
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/routes/manage_journalnode_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/manage_journalnode_routes.js b/ambari-web/app/routes/manage_journalnode_routes.js
index 50e3ec9..7f004e0 100644
--- a/ambari-web/app/routes/manage_journalnode_routes.js
+++ b/ambari-web/app/routes/manage_journalnode_routes.js
@@ -117,7 +117,7 @@ module.exports = App.WizardRoute.extend({
controller.saveConfigTag(stepController.get("hdfsSiteTag"));
controller.saveNameServiceId(stepController.get('content.nameServiceId'));
App.set('router.nextBtnClickInProgress', false);
- if (controller.isDeleteOnly()) {
+ if (controller.get('isDeleteOnly')) {
router.transitionTo('step4');
} else {
router.transitionTo('step3');
@@ -166,7 +166,7 @@ module.exports = App.WizardRoute.extend({
next: function (router) {
var controller = router.get('manageJournalNodeWizardController');
controller.clearTasksData();
- if (controller.isDeleteOnly()) {
+ if (controller.get('isDeleteOnly')) {
router.transitionTo('step8');
} else {
router.transitionTo('step5');
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/styles/stack_versions.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/stack_versions.less b/ambari-web/app/styles/stack_versions.less
index 715bbe3..a721596 100644
--- a/ambari-web/app/styles/stack_versions.less
+++ b/ambari-web/app/styles/stack_versions.less
@@ -507,8 +507,13 @@
margin: 10px;
.method-option {
width: 43.5%;
+ margin-bottom: 5px;
}
.thumbnail {
+ background-color: #e4e4e4;
+ .method-name,.method-icon,.method-description {
+ color: #333333;
+ }
cursor: pointer;
border: none;
@@ -528,12 +533,6 @@
}
}
- .ROLLING, .NON_ROLLING {
- background-color: #e4e4e4;
- .method-name,.method-icon,.method-description {
- color: #333333;
- }
- }
.ROLLING {
.method-icon {
margin-left: 88px;
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/templates/main/admin/highAvailability/journalNode/wizard.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/journalNode/wizard.hbs b/ambari-web/app/templates/main/admin/highAvailability/journalNode/wizard.hbs
index f7ee486..ac8ee41 100644
--- a/ambari-web/app/templates/main/admin/highAvailability/journalNode/wizard.hbs
+++ b/ambari-web/app/templates/main/admin/highAvailability/journalNode/wizard.hbs
@@ -27,11 +27,11 @@
<li class="nav-header">{{t admin.manageJournalNode.wizard.header}}</li>
<li {{bindAttr class="isStep1:active view.isStep1Disabled:disabled"}}><a href="javascript:void(null);" {{action gotoStep1 target="controller"}}>{{t admin.manageJournalNode.wizard.step1.header}}</a></li>
<li {{bindAttr class="isStep2:active view.isStep2Disabled:disabled"}}><a href="javascript:void(null);" {{action gotoStep2 target="controller"}}>{{t admin.manageJournalNode.wizard.step2.header}}</a></li>
- <li {{bindAttr class="isStep3:active view.isStep3Disabled:disabled"}}><a href="javascript:void(null);" {{action gotoStep3 target="controller"}}>{{t admin.manageJournalNode.wizard.step3.header}}</a></li>
+ <li {{bindAttr class="isStep3:active view.isStep3Disabled:disabled isDeleteOnly:hidden"}}><a href="javascript:void(null);" {{action gotoStep3 target="controller"}}>{{t admin.manageJournalNode.wizard.step3.header}}</a></li>
<li {{bindAttr class="isStep4:active view.isStep4Disabled:disabled"}}><a href="javascript:void(null);" {{action gotoStep4 target="controller"}}>{{t admin.manageJournalNode.wizard.step4.header}}</a></li>
- <li {{bindAttr class="isStep5:active view.isStep5Disabled:disabled"}}><a href="javascript:void(null);" {{action gotoStep5 target="controller"}}>{{t admin.manageJournalNode.wizard.step5.header}}</a></li>
- <li {{bindAttr class="isStep6:active view.isStep6Disabled:disabled"}}><a href="javascript:void(null);" {{action gotoStep6 target="controller"}}>{{t admin.manageJournalNode.wizard.step6.header}}</a></li>
- <li {{bindAttr class="isStep7:active view.isStep7Disabled:disabled"}}><a href="javascript:void(null);" {{action gotoStep7 target="controller"}}>{{t admin.manageJournalNode.wizard.step7.header}}</a></li>
+ <li {{bindAttr class="isStep5:active view.isStep5Disabled:disabled isDeleteOnly:hidden"}}><a href="javascript:void(null);" {{action gotoStep5 target="controller"}}>{{t admin.manageJournalNode.wizard.step5.header}}</a></li>
+ <li {{bindAttr class="isStep6:active view.isStep6Disabled:disabled isDeleteOnly:hidden"}}><a href="javascript:void(null);" {{action gotoStep6 target="controller"}}>{{t admin.manageJournalNode.wizard.step6.header}}</a></li>
+ <li {{bindAttr class="isStep7:active view.isStep7Disabled:disabled isDeleteOnly:hidden"}}><a href="javascript:void(null);" {{action gotoStep7 target="controller"}}>{{t admin.manageJournalNode.wizard.step7.header}}</a></li>
<li {{bindAttr class="isStep8:active view.isStep8Disabled:disabled"}}><a href="javascript:void(null);" {{action gotoStep8 target="controller"}}>{{t admin.manageJournalNode.wizard.step8.header}}</a></li>
</ul>
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_options.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_options.hbs b/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_options.hbs
index 5369ebd..abe164c 100644
--- a/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_options.hbs
+++ b/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_options.hbs
@@ -20,36 +20,39 @@
<div class="text version-text">{{{view.versionText}}}</div>
<div class="text method-text">{{t admin.stackVersions.version.upgrade.upgradeOptions.bodyMsg.method}}</div>
<div {{bindAttr class=":row-fluid :method-options view.isInUpgradeWizard:disabled"}}>
- {{#each method in view.upgradeMethods}}
- <div class="method-option span5">
- <div {{bindAttr class="method.allowed::not-allowed method.allowed::not-allowed-by-version
- method.isPrecheckFailed:not-allowed method.isPrecheckFailed:check-failed
- method.selected:selected method.type :thumbnail"}}
- {{action selectMethod method target="view"}}>
- <div {{bindAttr class="method.icon :method-icon"}}></div>
- <div class="method-name">{{method.displayName}}</div>
- <div class="method-description">{{{method.description}}}</div>
- {{#if view.showPreUpgradeChecks}}
- {{#if method.isCheckRequestInProgress}}
- <div class="method-precheck-message checking">
- {{view App.SpinnerView message="admin.stackVersions.version.upgrade.upgradeOptions.preCheck.msg.checking"}}
- </div>
- {{else}}
- <div {{bindAttr class=":method-precheck-message method.precheckResultsMessageClass"}}>
- <i {{bindAttr class="method.precheckResultsMessageIconClass"}}></i>
- <b>{{method.precheckResultsTitle}}</b>
- <a {{action runAction method target="view"}}>
- {{method.precheckResultsMessage}}
- </a>
- {{#if method.bypassedFailures}}
- <div class="alert-danger">{{t admin.stackVersions.version.upgrade.upgradeOptions.errors_bypassed}}</div>
+ {{#each method in view.upgradeMethods}}
+ {{#unless method.cantBeStarted}}
+ <div class="method-option span5">
+ <div {{bindAttr class="method.allowed::not-allowed method.allowed::not-allowed-by-version
+ method.isPrecheckFailed:not-allowed method.isPrecheckFailed:check-failed
+ method.selected:selected method.type :thumbnail"}}
+ {{action selectMethod method target="view"}}>
+ <div {{bindAttr class="method.icon :method-icon"}}></div>
+ <div class="method-name">{{method.displayName}}</div>
+ <div class="method-description">{{{method.description}}}</div>
+ {{#if view.showPreUpgradeChecks}}
+ {{#if method.isCheckRequestInProgress}}
+ <div class="method-precheck-message checking">
+ {{view App.SpinnerView message="admin.stackVersions.version.upgrade.upgradeOptions.preCheck.msg.checking"}}
+ </div>
+ {{else}}
+ <div {{bindAttr class=":method-precheck-message method.precheckResultsMessageClass"}}>
+ <i {{bindAttr class="method.precheckResultsMessageIconClass"}}></i>
+ <b>{{method.precheckResultsTitle}}</b>
+ <a {{action runAction method target="view"}}>
+ {{method.precheckResultsMessage}}
+ </a>
+ {{#if method.bypassedFailures}}
+ <div
+ class="alert-danger">{{t admin.stackVersions.version.upgrade.upgradeOptions.errors_bypassed}}</div>
+ {{/if}}
+ </div>
+ {{/if}}
{{/if}}
- </div>
- {{/if}}
- {{/if}}
- </div>
- </div>
- {{/each}}
+ </div>
+ </div>
+ {{/unless}}
+ {{/each}}
</div>
<div class="text tolerance-text">{{t admin.stackVersions.version.upgrade.upgradeOptions.bodyMsg.tolerance}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/templates/main/service/info/service_alert_popup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/info/service_alert_popup.hbs b/ambari-web/app/templates/main/service/info/service_alert_popup.hbs
index cbadf06..6ab6b3f 100644
--- a/ambari-web/app/templates/main/service/info/service_alert_popup.hbs
+++ b/ambari-web/app/templates/main/service/info/service_alert_popup.hbs
@@ -22,11 +22,16 @@
<li class="alert-list-wrap">
<div class="row-fluid">
<div class="span8 name-text">
- <div>
- <a href="#" {{action "gotoAlertDetails" alert target="view"}}>{{alert.label}}</a>
- </div>
- <div class="definition-latest-text">
- {{alert.latestText}}
+ <div class="accordion-group block">
+ <div class="accordion-heading" {{action "onToggleBlock" alert target="view"}}>
+ <i {{bindAttr class=":pull-left :accordion-toggle alert.isCollapsed:icon-caret-right:icon-caret-down"}}></i>
+ <a class="accordion-toggle" href="#" {{action "gotoAlertDetails" alert target="view"}}>{{alert.label}}</a>
+ </div>
+ <div id="{{unbound alert.clientId}}" class="accordion-body collapse in" style="display: none">
+ <div class="accordion-inner definition-latest-text">
+ {{alert.latestText}}
+ </div>
+ </div>
</div>
</div>
<div class="span4 status-col" rel="alert-status-tooltip" >
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/utils/configs/config_initializer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/configs/config_initializer.js b/ambari-web/app/utils/configs/config_initializer.js
index cb5b41f..de9ca7e 100644
--- a/ambari-web/app/utils/configs/config_initializer.js
+++ b/ambari-web/app/utils/configs/config_initializer.js
@@ -20,7 +20,6 @@ var App = require('app');
var stringUtils = require('utils/string_utils');
require('utils/configs/config_initializer_class');
-require('utils/configs/mount_points_based_initializer_mixin');
require('utils/configs/hosts_based_initializer_mixin');
/**
@@ -53,7 +52,7 @@ function getZKBasedConfig() {
*
* @instance ConfigInitializer
*/
-App.ConfigInitializer = App.ConfigInitializerClass.create(App.MountPointsBasedInitializerMixin, App.HostsBasedInitializerMixin, {
+App.ConfigInitializer = App.ConfigInitializerClass.create(App.HostsBasedInitializerMixin, {
initializers: function() {
return {
@@ -111,26 +110,7 @@ App.ConfigInitializer = App.ConfigInitializerClass.create(App.MountPointsBasedIn
'templeton.zookeeper.hosts': getZKBasedConfig(),
'hadoop.registry.zk.quorum': getZKBasedConfig(),
'hive.cluster.delegation.token.store.zookeeper.connectString': getZKBasedConfig(),
- 'instance.zookeeper.host': getZKBasedConfig(),
-
- 'dfs.name.dir': this.getMultipleMountPointsConfig('NAMENODE', 'file'),
- 'dfs.namenode.name.dir': this.getMultipleMountPointsConfig('NAMENODE', 'file'),
- 'dfs.data.dir': this.getMultipleMountPointsConfig('DATANODE', 'file'),
- 'dfs.datanode.data.dir': this.getMultipleMountPointsConfig('DATANODE', 'file'),
- 'yarn.nodemanager.local-dirs': this.getMultipleMountPointsConfig('NODEMANAGER'),
- 'yarn.nodemanager.log-dirs': this.getMultipleMountPointsConfig('NODEMANAGER'),
- 'mapred.local.dir': this.getMultipleMountPointsConfig(['TASKTRACKER', 'NODEMANAGER']),
- 'log.dirs': this.getMultipleMountPointsConfig('KAFKA_BROKER'),
-
- 'fs.checkpoint.dir': this.getSingleMountPointConfig('SECONDARY_NAMENODE', 'file'),
- 'dfs.namenode.checkpoint.dir': this.getSingleMountPointConfig('SECONDARY_NAMENODE', 'file'),
- 'yarn.timeline-service.leveldb-timeline-store.path': this.getSingleMountPointConfig('APP_TIMELINE_SERVER'),
- 'yarn.timeline-service.leveldb-state-store.path': this.getSingleMountPointConfig('APP_TIMELINE_SERVER'),
- 'dataDir': this.getSingleMountPointConfig('ZOOKEEPER_SERVER'),
- 'oozie_data_dir': this.getSingleMountPointConfig('OOZIE_SERVER'),
- 'storm.local.dir': this.getSingleMountPointConfig(['NODEMANAGER', 'NIMBUS']),
- '*.falcon.graph.storage.directory': this.getSingleMountPointConfig('FALCON_SERVER'),
- '*.falcon.graph.serialize.path': this.getSingleMountPointConfig('FALCON_SERVER')
+ 'instance.zookeeper.host': getZKBasedConfig()
}
}.property(''),
@@ -146,9 +126,7 @@ App.ConfigInitializer = App.ConfigInitializerClass.create(App.MountPointsBasedIn
},
initializerTypes: [
- {name: 'zookeeper_based', method: '_initAsZookeeperServersList'},
- {name: 'single_mountpoint', method: '_initAsSingleMountPoint'},
- {name: 'multiple_mountpoints', method: '_initAsMultipleMountPoints'}
+ {name: 'zookeeper_based', method: '_initAsZookeeperServersList'}
],
/**
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/utils/configs/mount_points_based_initializer_mixin.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/configs/mount_points_based_initializer_mixin.js b/ambari-web/app/utils/configs/mount_points_based_initializer_mixin.js
deleted file mode 100644
index 59a3985..0000000
--- a/ambari-web/app/utils/configs/mount_points_based_initializer_mixin.js
+++ /dev/null
@@ -1,340 +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');
-
-/**
- * Regexp used to determine if mount point is windows-like
- *
- * @type {RegExp}
- */
-var winRegex = /^([a-z]):\\?$/;
-
-App.MountPointsBasedInitializerMixin = Em.Mixin.create({
-
- /**
- * Map for methods used as value-modifiers for configProperties with values as mount point(s)
- * Used if mount point is win-like (@see winRegex)
- * Key: id
- * Value: method-name
- *
- * @type {{default: string, file: string, slashes: string}}
- */
- winReplacersMap: {
- default: '_defaultWinReplace',
- file: '_winReplaceWithFile',
- slashes: '_defaultWinReplaceWithAdditionalSlashes'
- },
-
- /**
- * Initializer for configs with value as one of the possible mount points
- * Only hosts that contains on the components from <code>initializer.components</code> are processed
- * Hosts with Windows needs additional processing (@see winReplacersMap)
- * Value example: '/', '/some/cool/dir'
- *
- * @param {configProperty} configProperty
- * @param {topologyLocalDB} localDB
- * @param {object} dependencies
- * @param {object} initializer
- * @return {Object}
- */
- _initAsSingleMountPoint: function (configProperty, localDB, dependencies, initializer) {
- var hostsInfo = this._updateHostInfo(localDB.hosts);
- var setOfHostNames = this._getSetOfHostNames(localDB, initializer);
- var winReplacersMap = this.get('winReplacersMap');
- // In Add Host Wizard, if we did not select this slave component for any host, then we don't process any further.
- if (!setOfHostNames.length) {
- return configProperty;
- }
- var allMountPoints = this._getAllMountPoints(setOfHostNames, hostsInfo, localDB);
-
- var mPoint = allMountPoints[0].mountpoint;
- if (mPoint === "/") {
- mPoint = Em.get(configProperty, 'recommendedValue');
- }
- else {
- var mp = mPoint.toLowerCase();
- if (winRegex.test(mp)) {
- var methodName = winReplacersMap[initializer.winReplacer];
- mPoint = this[methodName].call(this, configProperty, mp);
- }
- else {
- mPoint = mPoint + Em.get(configProperty, 'recommendedValue');
- }
- }
- Em.setProperties(configProperty, {
- value: mPoint,
- recommendedValue: mPoint
- });
-
- return configProperty;
- },
-
- /**
- * Initializer for configs with value as all of the possible mount points
- * Only hosts that contains on the components from <code>initializer.components</code> are processed
- * Hosts with Windows needs additional processing (@see winReplacersMap)
- * Value example: '/\n/some/cool/dir' (`\n` - is divider)
- *
- * @param {Object} configProperty
- * @param {topologyLocalDB} localDB
- * @param {object} dependencies
- * @param {object} initializer
- * @return {Object}
- */
- _initAsMultipleMountPoints: function (configProperty, localDB, dependencies, initializer) {
- var hostsInfo = this._updateHostInfo(localDB.hosts);
- var self = this;
- var setOfHostNames = this._getSetOfHostNames(localDB, initializer);
- var winReplacersMap = this.get('winReplacersMap');
- // In Add Host Wizard, if we did not select this slave component for any host, then we don't process any further.
- if (!setOfHostNames.length) {
- return configProperty;
- }
-
- var allMountPoints = this._getAllMountPoints(setOfHostNames, hostsInfo, localDB);
- var mPoint = '';
-
- allMountPoints.forEach(function (eachDrive) {
- if (eachDrive.mountpoint === '/') {
- mPoint += Em.get(configProperty, 'recommendedValue') + "\n";
- }
- else {
- var mp = eachDrive.mountpoint.toLowerCase();
- if (winRegex.test(mp)) {
- var methodName = winReplacersMap[initializer.winReplacer];
- mPoint += self[methodName].call(this, configProperty, mp);
- }
- else {
- mPoint += eachDrive.mountpoint + Em.get(configProperty, 'recommendedValue') + "\n";
- }
- }
- }, this);
-
- Em.setProperties(configProperty, {
- value: mPoint,
- recommendedValue: mPoint
- });
-
- return configProperty;
- },
-
- /**
- * Replace drive-based windows-path with 'file:///'
- *
- * @param {configProperty} configProperty
- * @param {string} mountPoint
- * @returns {string}
- * @private
- */
- _winReplaceWithFile: function (configProperty, mountPoint) {
- var winDriveUrl = mountPoint.toLowerCase().replace(winRegex, 'file:///$1:');
- return winDriveUrl + Em.get(configProperty, 'recommendedValue') + '\n';
- },
-
- /**
- * Replace drive-based windows-path
- *
- * @param {configProperty} configProperty
- * @param {string} mountPoint
- * @returns {string}
- * @private
- */
- _defaultWinReplace: function (configProperty, mountPoint) {
- var winDrive = mountPoint.toLowerCase().replace(winRegex, '$1:');
- var winDir = Em.get(configProperty, 'recommendedValue').replace(/\//g, '\\');
- return winDrive + winDir + '\n';
- },
-
- /**
- * Same to <code>_defaultWinReplace</code>, but with extra-slash in the end
- *
- * @param {configProperty} configProperty
- * @param {string} mountPoint
- * @returns {string}
- * @private
- */
- _defaultWinReplaceWithAdditionalSlashes: function (configProperty, mountPoint) {
- var winDrive = mountPoint.toLowerCase().replace(winRegex, '$1:');
- var winDir = Em.get(configProperty, 'recommendedValue').replace(/\//g, '\\\\');
- return winDrive + winDir + '\n';
- },
-
- /**
- * Update information from localDB using <code>App.Host</code>-model
- *
- * @param {object} hostsInfo
- * @returns {object}
- * @private
- */
- _updateHostInfo: function (hostsInfo) {
- App.Host.find().forEach(function (item) {
- if (!hostsInfo[item.get('id')]) {
- hostsInfo[item.get('id')] = {
- name: item.get('id'),
- cpu: item.get('cpu'),
- memory: item.get('memory'),
- disk_info: item.get('diskInfo'),
- bootStatus: "REGISTERED",
- isInstalled: true
- };
- }
- });
- return hostsInfo;
- },
-
- /**
- * Determines if mount point is valid
- * Criterias:
- * <ul>
- * <li>Should has available space</li>
- * <li>Should not be home-dir</li>
- * <li>Should not be docker-dir</li>
- * <li>Should not be boot-dir</li>
- * <li>Should not be dev-dir</li>
- * <li>Valid mount point started from /usr/hdp/ should be /usr/hdp/current
- * or /usr/hdp/<STACK_VERSION_NUMBER> e.g. /usr/hdp/2.5.0.0
- * </li>
- * </ul>
- *
- * @param {{mountpoint: string, available: number}} mPoint
- * @returns {function} true - valid, false - invalid
- * @private
- */
- _filterMountPoint: function (localDB) {
- var stackVersionNumber = [Em.getWithDefault(localDB.selectedStack || {}, 'repository_version', null)].compact();
- return function(mPoint) {
- var isAvailable = mPoint.available !== 0;
- if (!isAvailable) {
- return false;
- }
-
- var stackRoot = '/usr/hdp';
- var notHome = !['/', '/home'].contains(mPoint.mountpoint);
- var notDocker = !['/etc/resolv.conf', '/etc/hostname', '/etc/hosts'].contains(mPoint.mountpoint);
- var notBoot = mPoint.mountpoint && !(mPoint.mountpoint.startsWith('/boot')
- || mPoint.mountpoint.startsWith('/mnt')
- || mPoint.mountpoint.startsWith('/tmp'));
- var notDev = !(['devtmpfs', 'tmpfs', 'vboxsf', 'CDFS'].contains(mPoint.type));
- var validStackRootMount = !(mPoint.mountpoint.startsWith(stackRoot) && !['current'].concat(stackVersionNumber).filter(function(i) {
- return mPoint.mountpoint === stackRoot + '/' + i;
- }).length);
-
- return notHome && notDocker && notBoot && notDev && validStackRootMount;
- };
- },
-
- /**
- * Get list of hostNames from localDB which contains needed components
- *
- * @param {topologyLocalDB} localDB
- * @param {object} initializer
- * @returns {string[]}
- * @private
- */
- _getSetOfHostNames: function (localDB, initializer) {
- var masterComponentHostsInDB = Em.getWithDefault(localDB, 'masterComponentHosts', []);
- var slaveComponentHostsInDB = Em.getWithDefault(localDB, 'slaveComponentHosts', []);
- var hosts = masterComponentHostsInDB.filter(function (master) {
- return initializer.components.contains(master.component);
- }).mapProperty('hostName');
-
- var sHosts = slaveComponentHostsInDB.find(function (slave) {
- return initializer.components.contains(slave.componentName);
- });
- if (sHosts) {
- hosts = hosts.concat(sHosts.hosts.mapProperty('hostName'));
- }
- return hosts;
- },
-
- /**
- * Get list of all unique valid mount points for hosts
- *
- * @param {string[]} setOfHostNames
- * @param {object} hostsInfo
- * @param {topologyLocalDB} localDB
- * @returns {string[]}
- * @private
- */
- _getAllMountPoints: function (setOfHostNames, hostsInfo, localDB) {
- var allMountPoints = [],
- mountPointFilter = this._filterMountPoint(localDB);
- for (var i = 0; i < setOfHostNames.length; i++) {
- var hostname = setOfHostNames[i];
- var mountPointsPerHost = hostsInfo[hostname].disk_info;
- var mountPointAsRoot = mountPointsPerHost.findProperty('mountpoint', '/');
-
- // If Server does not send any host details information then atleast one mountpoint should be presumed as root
- // This happens in a single container Linux Docker environment.
- if (!mountPointAsRoot) {
- mountPointAsRoot = {
- mountpoint: '/'
- };
- }
-
- mountPointsPerHost.filter(mountPointFilter).forEach(function (mPoint) {
- if( !allMountPoints.findProperty("mountpoint", mPoint.mountpoint)) {
- allMountPoints.push(mPoint);
- }
- }, this);
- }
-
- if (!allMountPoints.length) {
- allMountPoints.push(mountPointAsRoot);
- }
- return allMountPoints;
- },
-
- /**
- * Settings for <code>single_mountpoint</code>-initializer
- * Used for configs with value as one of the possible mount points
- *
- * @see _initAsSingleMountPoint
- * @param {string|string[]} components
- * @param {string} winReplacer
- * @returns {{components: string[], winReplacer: string, type: string}}
- */
- getSingleMountPointConfig: function (components, winReplacer) {
- winReplacer = winReplacer || 'default';
- return {
- components: Em.makeArray(components),
- winReplacer: winReplacer,
- type: 'single_mountpoint'
- };
- },
-
- /**
- * Settings for <code>multiple_mountpoints</code>-initializer
- * Used for configs with value as all of the possible mount points
- *
- * @see _initAsMultipleMountPoints
- * @param {string|string[]} components
- * @param {string} winReplacer
- * @returns {{components: string[], winReplacer: string, type: string}}
- */
- getMultipleMountPointsConfig: function (components, winReplacer) {
- winReplacer = winReplacer || 'default';
- return {
- components: Em.makeArray(components),
- winReplacer: winReplacer,
- type: 'multiple_mountpoints'
- };
- }
-
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
index 71156f4..c7e810b 100644
--- a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
@@ -645,11 +645,8 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
return false;
}
}
- if (this.get('config.name') === 'llap_queue_capacity') {
- this.get('config').validate();
- } else {
- this.updateWarningsForCompatibilityWithWidget('');
- }
+
+ this.updateWarningsForCompatibilityWithWidget('');
return true;
}
return false;
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/views/main/admin/highAvailability/journalNode/step2_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/highAvailability/journalNode/step2_view.js b/ambari-web/app/views/main/admin/highAvailability/journalNode/step2_view.js
index 656c487..680daa5 100644
--- a/ambari-web/app/views/main/admin/highAvailability/journalNode/step2_view.js
+++ b/ambari-web/app/views/main/admin/highAvailability/journalNode/step2_view.js
@@ -22,18 +22,17 @@ var App = require('app');
App.ManageJournalNodeWizardStep2View = Em.View.extend({
templateName: require('templates/main/admin/highAvailability/journalNode/step2'),
- aaa: '',
didInsertElement: function () {
this.get('controller').loadStep();
},
journalNodesToAdd: function () {
return App.router.get('manageJournalNodeWizardController').getJournalNodesToAdd();
- }.property(),
+ }.property('App.router.clusterController.isHostsLoaded'),
journalNodesToDelete: function () {
return App.router.get('manageJournalNodeWizardController').getJournalNodesToDelete();
- }.property(),
+ }.property('App.router.clusterController.isHostsLoaded'),
isBackButtonVisible: false
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_details_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_details_view.js b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_details_view.js
index 983c26a..dae236b 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_details_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_details_view.js
@@ -81,5 +81,5 @@ App.MainAdminStackUpgradeHistoryDetailsView = Em.View.extend({
} else {
return "";
}
- }.property('controller.upgradeData.Upgrade.request_status', 'controller.isDowngrade'),
+ }.property('controller.upgradeData.Upgrade.request_status', 'controller.isDowngrade')
});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
index ef5f46b..f7b7f0e 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
@@ -57,6 +57,11 @@ App.MainAdminStackUpgradeHistoryView = App.TableView.extend(App.TableServerViewM
isSelected: false
}),
Em.Object.create({
+ labelKey: 'admin.stackVersions.upgradeHistory.filter.failed.upgrade',
+ value: 'UPGRADE_FAILED',
+ isSelected: false
+ }),
+ Em.Object.create({
labelKey: 'admin.stackVersions.upgradeHistory.filter.successful.downgrade',
value: 'DOWNGRADE_COMPLETED',
isSelected: false
@@ -66,6 +71,25 @@ App.MainAdminStackUpgradeHistoryView = App.TableView.extend(App.TableServerViewM
value: 'DOWNGRADE_ABORTED',
isSelected: false
}),
+ Em.Object.create({
+ labelKey: 'admin.stackVersions.upgradeHistory.filter.failed.downgrade',
+ value: 'DOWNGRADE_FAILED',
+ isSelected: false
+ })
+ ],
+ upgradeMethods: [
+ Em.Object.create({
+ displayName: Em.I18n.t('common.rolling'),
+ type: 'ROLLING'
+ }),
+ Em.Object.create({
+ displayName: Em.I18n.t('common.express'),
+ type: 'NON_ROLLING'
+ }),
+ Em.Object.create({
+ displayName: Em.I18n.t('common.hostOrdered'),
+ type: 'HOST_ORDERED'
+ })
],
/**
@@ -73,7 +97,7 @@ App.MainAdminStackUpgradeHistoryView = App.TableView.extend(App.TableServerViewM
*/
selectedCategory: Em.computed.findBy('categories', 'isSelected', true),
- filteredCount: function(){
+ filteredCount: function () {
var filteredContent = this.get('filteredContent').toArray();
return filteredContent.length;
}.property('filteredContent'),
@@ -82,13 +106,12 @@ App.MainAdminStackUpgradeHistoryView = App.TableView.extend(App.TableServerViewM
* displaying content filtered by upgrade type and upgrade status.
*/
filteredContent: function () {
- var result = [];
var filterValue = 'ALL';
var category = this.get('selectedCategory');
- if (category)
+ if (category) {
filterValue = category.get('value');
- var result = this.filterBy(filterValue);
- return result.reverse();
+ }
+ return this.filterBy(filterValue).reverse();
}.property('selectedCategory'),
/**
@@ -97,28 +120,25 @@ App.MainAdminStackUpgradeHistoryView = App.TableView.extend(App.TableServerViewM
pageContent: function () {
var content = this.get('filteredContent').toArray();
content = this.processForDisplay(content);
- content = content.slice(this.get('startIndex') - 1, this.get('endIndex'))
+ content = content.slice(this.get('startIndex') - 1, this.get('endIndex'));
return content;
}.property('filteredContent', 'startIndex', 'endIndex'),
- processForDisplay: function(content){
+ processForDisplay: function (content) {
var processedContent = [];
- content.forEach(function(item){
- if('UPGRADE' == item.get('direction'))
- item.set('directionLabel', Em.I18n.t('common.upgrade'));
- else
- item.set('directionLabel', Em.I18n.t('common.downgrade'));
-
- if('NON_ROLLING' == item.get('upgradeType'))
- item.set('upgradeTypeLabel', Em.I18n.t('common.express'));
- else
- item.set('upgradeTypeLabel', Em.I18n.t('common.rolling'));
-
- item.set('startTimeLabel', date.startTime(item.get('startTime')));
- item.set('endTimeLabel', date.startTime(item.get('endTime')));
- item.set('duration', date.durationSummary(item.get('startTime'), item.get('endTime')));
+
+ content.forEach(function (item) {
+ var direction = item.get('direction') === 'UPGRADE' ? Em.I18n.t('common.upgrade') : Em.I18n.t('common.downgrade');
+ var method = this.get('upgradeMethods').findProperty('type', item.get('upgradeType'));
+ item.setProperties({
+ directionLabel: direction,
+ upgradeTypeLabel: method ? method.get('displayName') : method,
+ startTimeLabel: date.startTime(item.get('startTime')),
+ endTimeLabel: date.startTime(item.get('endTime')),
+ duration: date.durationSummary(item.get('startTime'), item.get('endTime'))
+ });
processedContent.push(item);
- },this);
+ }, this);
return processedContent;
},
@@ -160,9 +180,9 @@ App.MainAdminStackUpgradeHistoryView = App.TableView.extend(App.TableServerViewM
}
},
- willInsertElement: function(){
+ willInsertElement: function () {
var self = this;
- this.get('controller').loadStackUpgradeHistoryToModel().done(function(){
+ this.get('controller').loadStackUpgradeHistoryToModel().done(function () {
self.populateUpgradeHistorySummary();
});
},
@@ -171,31 +191,31 @@ App.MainAdminStackUpgradeHistoryView = App.TableView.extend(App.TableServerViewM
this.observesCategories();
},
- observesCategories: function(){
+ observesCategories: function () {
this.get('categories').forEach(function (category) {
var label = Em.I18n.t(category.labelKey).format(this.filterBy(category.value).length);
category.set('label', label)
}, this);
}.observes('isReady'),
- filterBy: function(filterValue){
+ filterBy: function (filterValue) {
if ('ALL' == filterValue) {
var all_records = App.StackUpgradeHistory.find();
return all_records.toArray();
} else {
var tokens = filterValue.split('_');
- var direction_token = null
- var status_token = null
+ var direction_token = null;
+ var status_token = null;
if (tokens.length == 1) {
direction_token = tokens[0]
} else if (tokens.length > 1) {
- direction_token = tokens[0]
- status_token = tokens[1]
+ direction_token = tokens[0];
+ status_token = tokens[1];
}
- var result = []
- App.StackUpgradeHistory.find().forEach(function(item){
+ var result = [];
+ App.StackUpgradeHistory.find().forEach(function (item) {
var direction = item.get('direction');
if (direction == direction_token) {
if (status_token != null) {
@@ -214,46 +234,46 @@ App.MainAdminStackUpgradeHistoryView = App.TableView.extend(App.TableServerViewM
}
},
- selectCategory: function(event){
+ selectCategory: function (event) {
this.get('categories').filterProperty('isSelected').setEach('isSelected', false);
event.context.set('isSelected', true);
},
- populateUpgradeHistorySummary: function(){
+ populateUpgradeHistorySummary: function () {
this.set('isReady', false);
var result = [
Em.Object.create({
direction: 'UPGRADE',
- label:Em.I18n.t('common.upgrade'),
+ label: Em.I18n.t('common.upgrade'),
hasSuccess: false,
- success:0,
+ success: 0,
hasAbort: false,
- abort:0,
+ abort: 0
}),
Em.Object.create({
direction: 'DOWNGRADE',
- label:Em.I18n.t('common.downgrade'),
+ label: Em.I18n.t('common.downgrade'),
hasSuccess: false,
- success:0,
+ success: 0,
hasAbort: false,
- abort:0,
+ abort: 0
})
];
- App.StackUpgradeHistory.find().forEach(function(item){
+ App.StackUpgradeHistory.find().forEach(function (item) {
var direction = item.get('direction');
var status = item.get('requestStatus');
- if('UPGRADE' == direction){
- if('COMPLETED' == status){
+ if ('UPGRADE' == direction) {
+ if ('COMPLETED' == status) {
result[0].set('success', result[0].get('success') + 1);
} else if ('ABORTED' == status) {
result[0].set('abort', result[0].get('abort') + 1);
}
- } else if('DOWNGRADE' == direction){
- if('COMPLETED' == status){
- result[1].set('success', result[1].get('success')+1);
- } else if ('ABORTED' == status){
- result[1].set('abort', result[1].get('abort')+1);
+ } else if ('DOWNGRADE' == direction) {
+ if ('COMPLETED' == status) {
+ result[1].set('success', result[1].get('success') + 1);
+ } else if ('ABORTED' == status) {
+ result[1].set('abort', result[1].get('abort') + 1);
}
}
}, this);
@@ -267,23 +287,18 @@ App.MainAdminStackUpgradeHistoryView = App.TableView.extend(App.TableServerViewM
this.set('isReady', true);
},
- showUpgradeHistoryRecord: function(event) {
- var record = event.context
- var title = '';
+ showUpgradeHistoryRecord: function (event) {
+ var record = event.context;
var direction = App.format.normalizeName(record.get('direction'));
- var type = record.get('upgradeType')
- if ('ROLLING' == type)
- type = App.format.normalizeName(type);
- else if ('NON_ROLLING' == type)
- type = 'Express'
-
- title = Em.I18n.t('admin.stackVersions.upgradeHistory.record.title').format(type, direction, record.get('fromVersion'));
+ var type = this.get('upgradeMethods').findProperty('type', record.get('upgradeType'));
+ var displayName = type ? type.get('displayName') : record.get('upgradeType');
- this.get('controller').set('currentUpgradeRecord', record)
+ this.get('controller').set('currentUpgradeRecord', record);
App.ModalPopup.show({
- classNames: ['full-width-modal'],
- header: title,
+ classNames: ['wizard-modal-wrapper'],
+ modalDialogClasses: ['modal-xlg'],
+ header: Em.I18n.t('admin.stackVersions.upgradeHistory.record.title').format(displayName, direction, record.get('fromVersion')),
bodyClass: App.MainAdminStackUpgradeHistoryDetailsView,
primary: Em.I18n.t('common.dismiss'),
secondary: null,
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
index e54a0fa..bcb1ad7 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
@@ -68,7 +68,11 @@ App.upgradeWizardView = Em.View.extend({
* when downgrade already started
* @type {boolean}
*/
- isDowngradeAvailable: Em.computed.and('!controller.isDowngrade', 'controller.downgradeAllowed'),
+ isDowngradeAvailable: Em.computed.and(
+ '!controller.isDowngrade',
+ 'controller.downgradeAllowed',
+ '!controller.cantBeStarted'
+ ),
/**
* progress value is rounded to floor
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
index 5e7b0e3..9a73524 100644
--- a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
+++ b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
@@ -295,7 +295,7 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
controller.set('tasks', commandsForDB);
controller.removeUnneededTasks();
- expect(controller.get('tasks').mapProperty('id')).to.eql([1,2,5,6,8,9,10,12]);
+ expect(controller.get('tasks').mapProperty('id')).to.eql([1,2,5,6,8,10,12]);
});
it('reassign component is Mysql Server', function () {
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/test/models/stack_service_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/models/stack_service_test.js b/ambari-web/test/models/stack_service_test.js
index 9f12e88..bc101e0 100644
--- a/ambari-web/test/models/stack_service_test.js
+++ b/ambari-web/test/models/stack_service_test.js
@@ -283,7 +283,76 @@ describe('App.StackService', function () {
});
});
- App.TestAliases.testAsComputedOr(ss, 'isDisabled', ['isMandatory', 'isInstalled']);
+ describe('#isDisabled', function () {
+
+ var cases = [
+ {
+ isInstalled: true,
+ isMandatory: true,
+ clusterInstallCompleted: true,
+ isDisabled: true
+ },
+ {
+ isInstalled: true,
+ isMandatory: true,
+ clusterInstallCompleted: false,
+ isDisabled: true
+ },
+ {
+ isInstalled: true,
+ isMandatory: false,
+ clusterInstallCompleted: true,
+ isDisabled: true
+ },
+ {
+ isInstalled: true,
+ isMandatory: false,
+ clusterInstallCompleted: false,
+ isDisabled: true
+ },
+ {
+ isInstalled: false,
+ isMandatory: true,
+ clusterInstallCompleted: true,
+ isDisabled: false
+ },
+ {
+ isInstalled: false,
+ isMandatory: true,
+ clusterInstallCompleted: false,
+ isDisabled: true
+ },
+ {
+ isInstalled: false,
+ isMandatory: false,
+ clusterInstallCompleted: true,
+ isDisabled: false
+ },
+ {
+ isInstalled: false,
+ isMandatory: false,
+ clusterInstallCompleted: false,
+ isDisabled: false
+ }
+ ];
+
+ cases.forEach(function (testCase) {
+
+ var title = 'isInstalled: {0}, isMandatory: {1}, clusterInstallCompleted: {2}, isDisabled: {3}'
+ .format(testCase.isInstalled, testCase.isMandatory, testCase.clusterInstallCompleted, testCase.isDisabled);
+
+ it(title, function () {
+ ss.setProperties({
+ isInstalled: testCase.isInstalled,
+ isMandatory: testCase.isMandatory
+ });
+ App.set('router.clusterInstallCompleted', testCase.clusterInstallCompleted);
+ expect(ss.get('isDisabled')).to.equal(testCase.isDisabled);
+ });
+
+ });
+
+ });
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/4278c4a4/ambari-web/test/utils/ajax/ajax_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/ajax/ajax_test.js b/ambari-web/test/utils/ajax/ajax_test.js
index 747ccff..35de05f 100644
--- a/ambari-web/test/utils/ajax/ajax_test.js
+++ b/ambari-web/test/utils/ajax/ajax_test.js
@@ -23,11 +23,16 @@ describe('App.ajax', function() {
beforeEach(function() {
App.ajax.send.restore();
+ sinon.stub(App.logger, 'setTimer');
sinon.spy(App.ajax, 'send'); // no sense to test stubbed function, so going to spy on it
App.set('apiPrefix', '/api/v1');
App.set('clusterName', 'tdk');
});
+ afterEach(function() {
+ App.logger.setTimer.restore();
+ });
+
describe('#send', function() {
it('Without sender', function() {
expect(App.ajax.send({})).to.equal(null);
@@ -162,7 +167,7 @@ describe('App.ajax', function() {
});
});
});
-
+
describe('#abortRequests', function () {
var xhr = {
@@ -192,6 +197,6 @@ describe('App.ajax', function() {
it('should clear requests array', function () {
expect(requests).to.have.length(0);
});
-
+
});
});