diff --git a/xCAT-UI/js/custom/blade.js b/xCAT-UI/js/custom/blade.js index cab00096e..bc7c067dc 100644 --- a/xCAT-UI/js/custom/blade.js +++ b/xCAT-UI/js/custom/blade.js @@ -22,7 +22,27 @@ var bladePlugin = function() { * @return Nothing */ bladePlugin.prototype.loadInventory = function(data) { + // Get arguments + var args = data.msg.split(','); + // Get tab ID + var tabId = args[0].replace('out=', ''); + // Get node + var node = args[1].replace('node=', ''); + // Get node inventory + var inv = data.rsp; + // Remove loader + var loaderId = tabId + 'TabLoader'; + $('#' + loaderId).remove(); + + // Create division to hold inventory + var invDivId = tabId + 'Inventory'; + var invDiv = $('
'); + var info = createInfoBar('Under construction'); + invDiv.append(info); + + // Append to inventory form + $('#' + tabId).append(invDiv); }; /** @@ -33,7 +53,30 @@ bladePlugin.prototype.loadInventory = function(data) { * @return Nothing */ bladePlugin.prototype.loadClonePage = function(node) { + // Get nodes tab + var tab = getNodesTab(); + var newTabId = node + 'CloneTab'; + // If there is no existing clone tab + if (!$('#' + newTabId).length) { + // Create status bar and hide it + var statBarId = node + 'CloneStatusBar'; + var statBar = $('') + .hide(); + + // Create info bar + var infoBar = createInfoBar('Under construction'); + + // Create clone form + var cloneForm = $(''); + cloneForm.append(statBar); + cloneForm.append(infoBar); + + // Add clone tab + tab.add(newTabId, 'Clone', cloneForm, true); + } + + tab.select(newTabId); }; /** @@ -111,12 +154,14 @@ bladePlugin.prototype.loadProvisionPage = function(tabId) { /** * Create provision new node division */ + // You should copy whatever is in this function here and customize it var provNew = createProvisionNew('blade', inst); provForm.append(provNew); /** * Create provision existing node division */ + // You should copy whatever is in this function here and customize it var provExisting = createProvisionExisting('blade', inst); provForm.append(provExisting); @@ -148,5 +193,5 @@ bladePlugin.prototype.loadResources = function() { * @return Nothing */ bladePlugin.prototype.addNode = function() { - + openDialog('info', 'Under construction'); }; \ No newline at end of file diff --git a/xCAT-UI/js/custom/customUtils.js b/xCAT-UI/js/custom/customUtils.js index d215a644a..bbf9947db 100644 --- a/xCAT-UI/js/custom/customUtils.js +++ b/xCAT-UI/js/custom/customUtils.js @@ -247,6 +247,7 @@ function createProvisionExisting(plugin, inst) { var provisionBtn = createButton('Provision'); provisionBtn.bind('click', function(event) { // TODO Insert provision code here + openDialog('info', 'Under construction'); }); provExisting.append(provisionBtn); @@ -360,6 +361,7 @@ function createProvisionNew(plugin, inst) { var provisionBtn = createButton('Provision'); provisionBtn.bind('click', function(event) { // TODO Insert provision code here + openDialog('info', 'Under construction'); }); provNew.append(provisionBtn); diff --git a/xCAT-UI/js/custom/fsp.js b/xCAT-UI/js/custom/fsp.js index 94e8be06a..88b4d003e 100644 --- a/xCAT-UI/js/custom/fsp.js +++ b/xCAT-UI/js/custom/fsp.js @@ -22,7 +22,27 @@ var fspPlugin = function() { * @return Nothing */ fspPlugin.prototype.loadInventory = function(data) { + // Get arguments + var args = data.msg.split(','); + // Get tab ID + var tabId = args[0].replace('out=', ''); + // Get node + var node = args[1].replace('node=', ''); + // Get node inventory + var inv = data.rsp; + // Remove loader + var loaderId = tabId + 'TabLoader'; + $('#' + loaderId).remove(); + + // Create division to hold inventory + var invDivId = tabId + 'Inventory'; + var invDiv = $(''); + var info = createInfoBar('Under construction'); + invDiv.append(info); + + // Append to inventory form + $('#' + tabId).append(invDiv); }; /** @@ -33,7 +53,30 @@ fspPlugin.prototype.loadInventory = function(data) { * @return Nothing */ fspPlugin.prototype.loadClonePage = function(node) { + // Get nodes tab + var tab = getNodesTab(); + var newTabId = node + 'CloneTab'; + // If there is no existing clone tab + if (!$('#' + newTabId).length) { + // Create status bar and hide it + var statBarId = node + 'CloneStatusBar'; + var statBar = $('') + .hide(); + + // Create info bar + var infoBar = createInfoBar('Under construction'); + + // Create clone form + var cloneForm = $(''); + cloneForm.append(statBar); + cloneForm.append(infoBar); + + // Add clone tab + tab.add(newTabId, 'Clone', cloneForm, true); + } + + tab.select(newTabId); }; /** @@ -111,12 +154,14 @@ fspPlugin.prototype.loadProvisionPage = function(tabId) { /** * Create provision new node division */ + // You should copy whatever is in this function here and customize it var provNew = createProvisionNew('fsp', inst); provForm.append(provNew); /** * Create provision existing node division */ + // You should copy whatever is in this function here and customize it var provExisting = createProvisionExisting('fsp', inst); provForm.append(provExisting); @@ -148,5 +193,5 @@ fspPlugin.prototype.loadResources = function() { * @return Nothing */ fspPlugin.prototype.addNode = function() { - + openDialog('info', 'Under construction'); }; \ No newline at end of file diff --git a/xCAT-UI/js/custom/hmc.js b/xCAT-UI/js/custom/hmc.js index 21bce650d..8d89ea7e3 100644 --- a/xCAT-UI/js/custom/hmc.js +++ b/xCAT-UI/js/custom/hmc.js @@ -86,7 +86,30 @@ hmcPlugin.prototype.loadInventory = function(data) { * @return Nothing */ hmcPlugin.prototype.loadClonePage = function(node) { + // Get nodes tab + var tab = getNodesTab(); + var newTabId = node + 'CloneTab'; + // If there is no existing clone tab + if (!$('#' + newTabId).length) { + // Create status bar and hide it + var statBarId = node + 'CloneStatusBar'; + var statBar = $('') + .hide(); + + // Create info bar + var infoBar = createInfoBar('Under construction'); + + // Create clone form + var cloneForm = $(''); + cloneForm.append(statBar); + cloneForm.append(infoBar); + + // Add clone tab + tab.add(newTabId, 'Clone', cloneForm, true); + } + + tab.select(newTabId); }; /** @@ -164,12 +187,14 @@ hmcPlugin.prototype.loadProvisionPage = function(tabId) { /** * Create provision new node division */ + // You should copy whatever is in this function here and customize it var provNew = createProvisionNew('hmc', inst); provForm.append(provNew); /** * Create provision existing node division */ + // You should copy whatever is in this function here and customize it var provExisting = createProvisionExisting('hmc', inst); provForm.append(provExisting); @@ -201,5 +226,5 @@ hmcPlugin.prototype.loadResources = function() { * @return Nothing */ hmcPlugin.prototype.addNode = function() { - + openDialog('info', 'Under construction'); }; \ No newline at end of file diff --git a/xCAT-UI/js/custom/ipmi.js b/xCAT-UI/js/custom/ipmi.js index ae021864b..fe3d7c6d4 100644 --- a/xCAT-UI/js/custom/ipmi.js +++ b/xCAT-UI/js/custom/ipmi.js @@ -22,7 +22,27 @@ var ipmiPlugin = function() { * @return Nothing */ ipmiPlugin.prototype.loadInventory = function(data) { + // Get arguments + var args = data.msg.split(','); + // Get tab ID + var tabId = args[0].replace('out=', ''); + // Get node + var node = args[1].replace('node=', ''); + // Get node inventory + var inv = data.rsp; + // Remove loader + var loaderId = tabId + 'TabLoader'; + $('#' + loaderId).remove(); + + // Create division to hold inventory + var invDivId = tabId + 'Inventory'; + var invDiv = $(''); + var info = createInfoBar('Under construction'); + invDiv.append(info); + + // Append to inventory form + $('#' + tabId).append(invDiv); }; /** @@ -33,7 +53,30 @@ ipmiPlugin.prototype.loadInventory = function(data) { * @return Nothing */ ipmiPlugin.prototype.loadClonePage = function(node) { + // Get nodes tab + var tab = getNodesTab(); + var newTabId = node + 'CloneTab'; + // If there is no existing clone tab + if (!$('#' + newTabId).length) { + // Create status bar and hide it + var statBarId = node + 'CloneStatusBar'; + var statBar = $('') + .hide(); + + // Create info bar + var infoBar = createInfoBar('Under construction'); + + // Create clone form + var cloneForm = $(''); + cloneForm.append(statBar); + cloneForm.append(infoBar); + + // Add clone tab + tab.add(newTabId, 'Clone', cloneForm, true); + } + + tab.select(newTabId); }; /** @@ -111,12 +154,14 @@ ipmiPlugin.prototype.loadProvisionPage = function(tabId) { /** * Create provision new node division */ + // You should copy whatever is in this function here and customize it var provNew = createProvisionNew('ipmi', inst); provForm.append(provNew); /** * Create provision existing node division */ + // You should copy whatever is in this function here and customize it var provExisting = createProvisionExisting('ipmi', inst); provForm.append(provExisting); @@ -148,5 +193,5 @@ ipmiPlugin.prototype.loadResources = function() { * @return Nothing */ ipmiPlugin.prototype.addNode = function() { - + openDialog('info', 'Under construction'); }; \ No newline at end of file diff --git a/xCAT-UI/js/custom/ivm.js b/xCAT-UI/js/custom/ivm.js index 64042a99d..630976aa6 100644 --- a/xCAT-UI/js/custom/ivm.js +++ b/xCAT-UI/js/custom/ivm.js @@ -22,7 +22,27 @@ var ivmPlugin = function() { * @return Nothing */ ivmPlugin.prototype.loadInventory = function(data) { + // Get arguments + var args = data.msg.split(','); + // Get tab ID + var tabId = args[0].replace('out=', ''); + // Get node + var node = args[1].replace('node=', ''); + // Get node inventory + var inv = data.rsp; + // Remove loader + var loaderId = tabId + 'TabLoader'; + $('#' + loaderId).remove(); + + // Create division to hold inventory + var invDivId = tabId + 'Inventory'; + var invDiv = $(''); + var info = createInfoBar('Under construction'); + invDiv.append(info); + + // Append to inventory form + $('#' + tabId).append(invDiv); }; /** @@ -33,7 +53,30 @@ ivmPlugin.prototype.loadInventory = function(data) { * @return Nothing */ ivmPlugin.prototype.loadClonePage = function(node) { + // Get nodes tab + var tab = getNodesTab(); + var newTabId = node + 'CloneTab'; + // If there is no existing clone tab + if (!$('#' + newTabId).length) { + // Create status bar and hide it + var statBarId = node + 'CloneStatusBar'; + var statBar = $('') + .hide(); + + // Create info bar + var infoBar = createInfoBar('Under construction'); + + // Create clone form + var cloneForm = $(''); + cloneForm.append(statBar); + cloneForm.append(infoBar); + + // Add clone tab + tab.add(newTabId, 'Clone', cloneForm, true); + } + + tab.select(newTabId); }; /** @@ -111,12 +154,14 @@ ivmPlugin.prototype.loadProvisionPage = function(tabId) { /** * Create provision new node division */ + // You should copy whatever is in this function here and customize it var provNew = createProvisionNew('ivm', inst); provForm.append(provNew); /** * Create provision existing node division */ + // You should copy whatever is in this function here and customize it var provExisting = createProvisionExisting('ivm', inst); provForm.append(provExisting); @@ -148,5 +193,5 @@ ivmPlugin.prototype.loadResources = function() { * @return Nothing */ ivmPlugin.prototype.addNode = function() { - + openDialog('info', 'Under construction'); }; \ No newline at end of file