4147 Sivert Sorumgard 2013-01-03
Fix default host when resetting, fix various focus issues, etc.
modified:
storage/ndb/mcc/frontend/js/mcc/configuration/calculations.js
storage/ndb/mcc/frontend/js/mcc/gui/deploymenttree.js
storage/ndb/mcc/frontend/js/mcc/gui/hosttreedetails.js
storage/ndb/mcc/frontend/js/mcc/gui/wizard.js
4146 Bernd Ocklin 2012-12-13
add mcc create zip tools
added:
storage/ndb/mcc/host_info/config.h.in
=== modified file 'storage/ndb/mcc/frontend/js/mcc/configuration/calculations.js'
=== modified file 'storage/ndb/mcc/frontend/js/mcc/configuration/calculations.js'
--- a/storage/ndb/mcc/frontend/js/mcc/configuration/calculations.js 2012-12-06 14:03:02 +0000
+++ b/storage/ndb/mcc/frontend/js/mcc/configuration/calculations.js 2013-01-03 12:20:27 +0000
@@ -91,6 +91,15 @@
}
}
+ // First sort by name to get repeatable allocation (needed for tests)
+ hosts.sort(function (h1, h2) {
+ if (h1.getValue("name") < h2.getValue("name")) {
+ return -1;
+ } else {
+ return 1;
+ }
+ });
+
// Shortcut if we have no hosts, or only wildcard host
if (!hosts || hosts.length == 0 ||
(hosts.length == 1 && hosts[0].getValue("anyHost"))) {
@@ -133,8 +142,15 @@
// Sort host array on RAM
hosts.sort(function (a, b) {
// Treat unefined ram as smallest
- if (!a.getValue("ram")) return -1;
- if (!b.getValue("ram")) return 1;
+ if (!a.getValue("ram") && !b.getValue("ram")) {
+ return 0;
+ }
+ if (!a.getValue("ram")) {
+ return -1;
+ }
+ if (!b.getValue("ram")) {
+ return 1;
+ }
// Put largest ram at end where ndbds are allocated
if (+a.getValue("ram") < +b.getValue("ram")) {
=== modified file 'storage/ndb/mcc/frontend/js/mcc/gui/deploymenttree.js'
--- a/storage/ndb/mcc/frontend/js/mcc/gui/deploymenttree.js 2012-12-06 14:03:02 +0000
+++ b/storage/ndb/mcc/frontend/js/mcc/gui/deploymenttree.js 2013-01-03 12:20:27 +0000
@@ -112,10 +112,20 @@
function updateDeploymentTreeView() {
var process = deploymentTreeItem.storageItem;
- // If no process selected, reset view
- if (!process || !mcc.storage.processStorage().isItem(process)) {
+ // If no process selected, or if type selected, reset view and focus
+ if (!deploymentTreeItem.treeItem || !process ||
+ !mcc.storage.processStorage().isItem(process) ||
+ deploymentTreeItem.treeItem.isType("processtype")) {
dijit.byId("startupDetails").setContent("");
dijit.byId("configDetails").setContent("");
+
+ // Focus on the selected tree item if it is a process type
+ if (deploymentTreeItem.treeItem &&
+ deploymentTreeItem.treeItem.isType("processtype")) {
+ deploymentTreeSetPath(["root", "" +
+ deploymentTreeItem.storageItem.getId()]);
+ }
+
return;
}
@@ -206,7 +216,14 @@
deploymentTreeItem.treeItem = getStorageItem(
deploymentTree.selectedNode.item);
// Fetch the storage item
- if (deploymentTreeItem.treeItem.isType("process")) {
+ if (deploymentTreeItem.treeItem.isType("processtype")) {
+ mcc.storage.processTypeStorage().getItem(
+ deploymentTreeItem.treeItem.getId()).
+ then(function (processtype) {
+ deploymentTreeItem.storageItem = processtype;
+ updateDeploymentTreeView();
+ });
+ } else if (deploymentTreeItem.treeItem.isType("process")) {
mcc.storage.processStorage().getItem(
deploymentTreeItem.treeItem.getId()).
then(function (process) {
=== modified file 'storage/ndb/mcc/frontend/js/mcc/gui/hosttreedetails.js'
--- a/storage/ndb/mcc/frontend/js/mcc/gui/hosttreedetails.js 2012-12-06 14:03:02 +0000
+++ b/storage/ndb/mcc/frontend/js/mcc/gui/hosttreedetails.js 2013-01-03 12:20:27 +0000
@@ -79,12 +79,19 @@
function updateHostTreeSelectionDetails() {
var hostTreeItem = mcc.gui.getCurrentHostTreeItem();
if (!hostTreeItem.treeItem ||
- !mcc.storage.hostTreeStorage().isItem(hostTreeItem.treeItem ||
+ !mcc.storage.hostTreeStorage().isItem(hostTreeItem.treeItem) ||
hostTreeItem.treeItem.isType("anyHost") ||
- hostTreeItem.treeItem.isType("host"))) {
+ hostTreeItem.treeItem.isType("host")) {
// If host or no tree item is selected, no details are shown
dijit.byId("hostTreeSelectionDetails").
selectChild(dijit.byId("noHostTreeSelectionDetails"));
+ // But we still need to set focus accordingly if a host is selected
+ if (hostTreeItem.treeItem &&
+ (hostTreeItem.treeItem.isType("anyHost") ||
+ hostTreeItem.treeItem.isType("host"))) {
+ mcc.gui.hostTreeSetPath(["root", "" +
+ hostTreeItem.storageItem.getId()]);
+ }
} else if (hostTreeItem.treeItem.isType("process")) {
// Focus on the selected tree item
mcc.gui.hostTreeSetPath(["root", "" +
=== modified file 'storage/ndb/mcc/frontend/js/mcc/gui/wizard.js'
--- a/storage/ndb/mcc/frontend/js/mcc/gui/wizard.js 2012-12-06 14:03:02 +0000
+++ b/storage/ndb/mcc/frontend/js/mcc/gui/wizard.js 2013-01-03 12:20:27 +0000
@@ -731,8 +731,8 @@
mcc.storage.initializeStores();
mcc.storage.initializeStorage().then(function () {
// Dirty fix to handle when we're already on page 0
+ initializeClusterDef = true;
reloadPage();
- initializeClusterDef = true;
dijit.byId("content-main-tab-container").selectChild(
dijit.byId(configWizardPageIds[0]));
});
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.5-cluster-7.2 branch (sivert.sorumgaard:4146 to 4147) | Sivert Sorumgard | 26 Jan 2013 |