Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/candidate-3.8.x' into candidate-…
Browse files Browse the repository at this point in the history
…3.10.x

Conflicts:
	esp/xslt/ui_configmgr.xslt

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
  • Loading branch information
richardkchapman committed Aug 16, 2012
2 parents fcddb01 + e4016d2 commit eb5c90a
Show file tree
Hide file tree
Showing 16 changed files with 174 additions and 83 deletions.
11 changes: 8 additions & 3 deletions dali/base/dadfs.cpp
Expand Up @@ -2549,9 +2549,14 @@ class CDistributedFileBase : public CInterface, implements INTERFACE
if (!ignoresub) {
// And has super owners
Owned<IPropertyTreeIterator> iter = root->getElements("SuperOwner");
if (iter->isValid()) {
const char *supername = iter->query().queryProp("@name");
reason.appendf("Cannot remove file %s as owned by SuperFile %s", logicalname, supername);
if (iter->first()) {
reason.append("Cannot remove file ").append(logicalname).append(" as owned by SuperFile(s): ");
loop {
reason.append(iter->query().queryProp("@name"));
if (!iter->next())
break;
reason.append(", ");
}
return false;
}
}
Expand Down
16 changes: 8 additions & 8 deletions ecllibrary/std/File.ecl
Expand Up @@ -383,11 +383,11 @@ EXPORT varstring fDespray(varstring logicalName, varstring destinationIP, varstr
EXPORT varstring fCopy(varstring sourceLogicalName, varstring destinationGroup, varstring destinationLogicalName, varstring sourceDali='', integer4 timeOut=-1, varstring espServerIpPort=GETENV('ws_fs_server'), integer4 maxConnections=-1, boolean allowoverwrite=false, boolean replicate=false, boolean asSuperfile=false, boolean compress=false, boolean forcePush=false, integer4 transferBufferSize=0) :=
lib_fileservices.FileServices.fCopy(sourceLogicalName, destinationGroup, destinationLogicalName, sourceDali, timeOut, espServerIpPort, maxConnections, allowoverwrite, replicate, asSuperfile, compress, forcePush, transferBufferSize);

EXPORT varstring fMonitorLogicalFileName(varstring eventname, varstring name, integer4 shotcount=1, varstring espServerIpPort=GETENV('ws_fs_server')) :=
lib_fileservices.FileServices.fMonitorLogicalFileName(eventname, name, shotcount, espServerIpPort);
EXPORT varstring fMonitorLogicalFileName(varstring event_name, varstring name, integer4 shotcount=1, varstring espServerIpPort=GETENV('ws_fs_server')) :=
lib_fileservices.FileServices.fMonitorLogicalFileName(event_name, name, shotcount, espServerIpPort);

EXPORT varstring fMonitorFile(varstring eventname, varstring ip, varstring filename, boolean subdirs=false, integer4 shotcount=1, varstring espServerIpPort=GETENV('ws_fs_server')) :=
lib_fileservices.FileServices.fMonitorFile(eventname, ip, filename, subdirs, shotcount, espServerIpPort);
EXPORT varstring fMonitorFile(varstring event_name, varstring ip, varstring filename, boolean subdirs=false, integer4 shotcount=1, varstring espServerIpPort=GETENV('ws_fs_server')) :=
lib_fileservices.FileServices.fMonitorFile(event_name, ip, filename, subdirs, shotcount, espServerIpPort);

EXPORT varstring fReplicate(varstring logicalName, integer4 timeOut=-1, varstring espServerIpPort=GETENV('ws_fs_server')) :=
lib_fileservices.FileServices.fReplicate(logicalName, timeOut, espServerIpPort);
Expand All @@ -398,11 +398,11 @@ EXPORT varstring WaitDfuWorkunit(varstring wuid, integer4 timeOut=-1, varstring
EXPORT AbortDfuWorkunit(varstring wuid, varstring espServerIpPort=GETENV('ws_fs_server')) :=
lib_fileservices.FileServices.AbortDfuWorkunit(wuid, espServerIpPort);

EXPORT MonitorLogicalFileName(varstring eventname, varstring name, integer4 shotcount=1, varstring espServerIpPort=GETENV('ws_fs_server')) :=
lib_fileservices.FileServices.MonitorLogicalFileName(eventname, name, shotcount, espServerIpPort);
EXPORT MonitorLogicalFileName(varstring event_name, varstring name, integer4 shotcount=1, varstring espServerIpPort=GETENV('ws_fs_server')) :=
lib_fileservices.FileServices.MonitorLogicalFileName(event_name, name, shotcount, espServerIpPort);

EXPORT MonitorFile(varstring eventname, varstring ip, varstring filename, boolean subdirs=false, integer4 shotcount=1, varstring espServerIpPort=GETENV('ws_fs_server')) :=
lib_fileservices.FileServices.MonitorFile(eventname, ip, filename, subdirs, shotcount, espServerIpPort);
EXPORT MonitorFile(varstring event_name, varstring ip, varstring filename, boolean subdirs=false, integer4 shotcount=1, varstring espServerIpPort=GETENV('ws_fs_server')) :=
lib_fileservices.FileServices.MonitorFile(event_name, ip, filename, subdirs, shotcount, espServerIpPort);

EXPORT RemotePull(varstring remoteEspFsURL, varstring sourceLogicalName, varstring destinationGroup, varstring destinationLogicalName, integer4 timeOut=-1, integer4 maxConnections=-1, boolean allowoverwrite=false, boolean replicate=false, boolean asSuperfile=false, boolean forcePush=false, integer4 transferBufferSize=0, boolean wrap=false, boolean compress=false) :=
lib_fileservices.FileServices.RemotePull(remoteEspFsURL, sourceLogicalName, destinationGroup, destinationLogicalName, timeOut, maxConnections, allowoverwrite, replicate, asSuperfile, forcePush, transferBufferSize, wrap, compress);
Expand Down
10 changes: 1 addition & 9 deletions esp/eclwatch/ws_XSLT/fs_desprayCopyForm.xslt
Expand Up @@ -24,7 +24,6 @@
<xsl:param name="method" select="'Despray'"/>
<xsl:param name="sourceLogicalName" select="''"/>
<xsl:param name="compressflag" select="''"/>
<xsl:param name="supercopyflag" select="''"/>
<xsl:template match="/Environment">
<xsl:choose>
<xsl:when test="ErrorMessage">
Expand Down Expand Up @@ -729,14 +728,7 @@
<tr>
<td>Retain Superfile Structure:</td>
<td>
<xsl:choose>
<xsl:when test="$supercopyflag &gt; 1">
<input type="checkbox" name="superCopy" value="1" checked="true"/>
</xsl:when>
<xsl:otherwise>
<input type="checkbox" name="superCopy" value="0" disabled="false"/>
</xsl:otherwise>
</xsl:choose>
<input type="checkbox" name="superCopy" value="1" checked="true"/>
</td>
</tr>
<span id="roxie_span" style="display:none">
Expand Down
77 changes: 60 additions & 17 deletions esp/eclwatch/ws_XSLT/machines.xslt
Expand Up @@ -37,8 +37,9 @@
<xsl:variable name="cpuThreshold" select="/TpMachineQueryResponse/CpuThreshold"/>
<xsl:variable name="memThresholdType" select="/TpMachineQueryResponse/MemThresholdType"/><!-- % -->
<xsl:variable name="diskThresholdType" select="/TpMachineQueryResponse/DiskThresholdType"/><!-- % -->
<xsl:variable name="enableSNMP" select="/TpMachineQueryResponse/EnableSNMP"/>
<xsl:variable name="addProcessesToFilter" select="/TpMachineQueryResponse/PreflightProcessFilter"/>
<xsl:variable name="enableSNMP" select="/TpMachineQueryResponse/EnableSNMP"/>
<xsl:variable name="addProcessesToFilter" select="/TpMachineQueryResponse/PreflightProcessFilter"/>
<xsl:variable name="numSlaveNodes" select="count(/TpMachineQueryResponse/TpMachines/TpMachine/Type[text()='ThorSlaveProcess'])"/>

<xsl:template match="/TpMachineQueryResponse">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Expand Down Expand Up @@ -110,18 +111,42 @@
if (obj)
obj.disabled = checkedCount == 0;
}
function onLoad()
{
initSelection('resultsTable');
document.getElementsByName('Addresses.itemcount')[0].value = totalItems;

<xsl:if test="$ShowPreflightInfo and not($SwapNode)">initPreflightControls();</xsl:if>
onRowCheck(false);
var table = document.getElementById('resultsTable');
if (table)
sortableTable = new SortableTable(table, table, ["None", "String", "IP_Address", "String", "String", "String", "String"]);
}
<![CDATA[
<![CDATA[
function setSortableTable(tableId)
{
var table = document.getElementById(tableId);
if (table == null)
return;
//dynamically create a sort list since our table is defined at run time based on info returned
var cells = table.tHead.rows[0].cells;
var nCols = cells.length;
var sortCriteria = new Array(nCols);
sortCriteria[0] = "None";//multiselect checkbox
for (var i = 1; i < nCols; i++)
{
var c = cells[i];
var sort;
switch (c.innerText)
{
case 'Network Address':
sort = 'IP_Address';
break;
case 'Slave Number':
sort = 'Number';
break;
default:
sort = "String";
break;
}//switch
sortCriteria[i] = sort;
}//for
sortableTable = new SortableTable(table, table, sortCriteria);
}
var browseUrl = null;
var browsePath = null;
var browseCaption = null;
Expand Down Expand Up @@ -158,6 +183,16 @@
bottomchkbox.checked = chkbox.checked;
}
]]>

function onLoad()
{
initSelection('resultsTable');
document.getElementsByName('Addresses.itemcount')[0].value = totalItems;
onRowCheck(false);
setSortableTable('resultsTable');

<xsl:if test="$ShowPreflightInfo and not($SwapNode)">initPreflightControls();</xsl:if>
}
<xsl:if test="$SwapNode">
var OldIP = '<xsl:value-of select="/TpMachineQueryResponse/OldIP"/>';
var Path = '<xsl:value-of select="/TpMachineQueryResponse/Path"/>';
Expand Down Expand Up @@ -227,6 +262,7 @@
<col width="150"/>
<col width="100"/>
<col width="100"/>
<col width="100"/>
</colgroup>
<thead>
<tr>
Expand All @@ -246,6 +282,9 @@
</xsl:if>
<th>Network Address</th>
<th>Component</th>
<xsl:if test="$numSlaveNodes > 0">
<th>Slave Number</th>
</xsl:if>
<th>Domain</th>
<th>Platform</th>
</tr>
Expand Down Expand Up @@ -370,12 +409,16 @@
<td>
<xsl:value-of select="Netaddress"/>
</td>
<td>
<td>
<xsl:value-of select="$displayType"/>
<xsl:if test="Type='ThorSlaveProcess'">
<br/><xsl:value-of select="concat('[', ProcessNumber, ']')"/>
</xsl:if>
</td>
<xsl:if test="$numSlaveNodes > 0">
<td>
<xsl:if test="Type='ThorSlaveProcess'">
<xsl:value-of select="ProcessNumber"/>
</xsl:if>
</td>
</xsl:if>
<td>
<xsl:value-of select="Domain"/>
</td>
Expand Down
2 changes: 2 additions & 0 deletions esp/files/ECLPlayground.js 100644 → 100755
Expand Up @@ -66,6 +66,8 @@ define([
editorControl.setText(text);
});
wu.monitor(monitorEclPlayground);
} else {
graphControl.watchSelect(sampleSelectControl.select);
}
}, 1);
on(dom.byId("submitBtn"), "click", doSubmit);
Expand Down
17 changes: 16 additions & 1 deletion esp/files/scripts/GraphControl.js 100644 → 100755
Expand Up @@ -17,8 +17,9 @@
define([
"dojo/_base/declare",
"dojo/_base/sniff",
"dojo/aspect",
"dojo/dom"
], function (declare, sniff, dom) {
], function (declare, sniff, aspect, dom) {
return declare(null, {
id: "gvc",
width: "",
Expand Down Expand Up @@ -149,6 +150,20 @@ define([
this.obj.setSelected(items, true);
},

watchSelect: function (select) {
if (sniff("chrome") && select) {
var context = this;

aspect.before(select, "openDropDown", function () {
dojo.style(context.obj, "height", "0px");
});

aspect.after(select, "closeDropDown", function (focus) {
dojo.style(context.obj, "height", "100%");
});
}
},

registerEvents: function () {
if (!this.eventsRegistered) {
this.eventsRegistered = true;
Expand Down
5 changes: 3 additions & 2 deletions esp/files/scripts/SampleSelectControl.js 100644 → 100755
Expand Up @@ -23,6 +23,7 @@ define([
return declare(null, {
id: null,
samplesURL: null,
select: null,

onNewSelection: function (eclText) {
},
Expand All @@ -34,7 +35,7 @@ define([
});

var context = this;
var select = new dijit.form.Select({
this.select = new dijit.form.Select({
name: this.id,
store: sampleStore,
value: "default.ecl",
Expand All @@ -56,7 +57,7 @@ define([
}
}, this.id);
try {
select.startup();
this.select.startup();
} catch (e) {
}
}
Expand Down
4 changes: 2 additions & 2 deletions esp/files/scripts/configmgr/configmgr.js
Expand Up @@ -3528,11 +3528,11 @@ function onMenuItemClickResetToDefault(p_sType, p_aArgs, p_oValue)
var column = dt.getColumn(oTarget);
var compName = top.document.navDT.getRecord(top.document.navDT.getSelectedRows()[0]).getData('Name');
var bldSet = top.document.navDT.getRecord(top.document.navDT.getSelectedRows()[0]).getData('BuildSet');
var newValue = dt.getDefault(oTarget, record);
var meta = record.getData(column.key + '_extra');
var menuItemName = this.cfg.getProperty("text");
var flag = (menuItemName === 'Write to environment');

var newValue = (flag ? oldValue : dt.getDefault(oTarget, record));

if (flag || newValue !== oldValue) {
var form = top.window.document.forms['treeForm'];
top.document.startWait(document);
Expand Down
2 changes: 0 additions & 2 deletions esp/services/ws_fs/ws_fsBinding.cpp
Expand Up @@ -155,7 +155,6 @@ int CFileSpraySoapBindingEx::onGetInstantQuery(IEspContext &context, CHttpReques
params->setProp("@compressflag", 1);
}
}
params->setProp("@supercopyflag", 0); //super copy only for remote copy
}
catch (IException *E)
{
Expand All @@ -173,7 +172,6 @@ int CFileSpraySoapBindingEx::onGetInstantQuery(IEspContext &context, CHttpReques
else
{
params->setProp("@compressflag", 1);
params->setProp("@supercopyflag", 2);
}

StringBuffer wuid;
Expand Down
26 changes: 18 additions & 8 deletions esp/services/ws_machine/machines.xslt
Expand Up @@ -65,6 +65,7 @@
<xsl:variable name="autoRefresh" select="$reqInfo/AutoRefresh"/>
<xsl:variable name="numColumns" select="count(/GetMachineInfoResponse/Columns/Item)"/>
<xsl:variable name="SwapNode" select="$reqInfo/OldIP/text() and $clusterType='THORSPARENODES'"/>
<xsl:variable name="numSlaveNodes" select="count(/GetMachineInfoResponse/Machines/MachineInfoEx/ProcessType[text()='ThorSlaveProcess'])"/>

<xsl:template match="/GetMachineInfoResponse">
<html>
Expand Down Expand Up @@ -158,13 +159,17 @@
case 'Processes':
case 'Processes Down':
case 'Condition':
case 'Component':
case 'State':
sort = 'String';
break;
case 'Up Time':
case 'Computer Up Time':
sort = 'TimePeriod';
break;
case 'Slave Number':
sort = 'Number';
break;
default:
sort = "Percentage";
break;
Expand Down Expand Up @@ -301,6 +306,9 @@
</th>
<th>Location</th>
<th>Component</th>
<xsl:if test="$numSlaveNodes > 0">
<th>Slave Number</th>
</xsl:if>
<xsl:choose>
<xsl:when test="../Columns/Item">
<xsl:for-each select="../Columns/Item[text()='Condition']">
Expand Down Expand Up @@ -406,16 +414,18 @@
<xsl:value-of select="DisplayType"/>
<xsl:if test="string(ComponentName)!=''">
<br/>
<xsl:choose>
<xsl:when test="ProcessType='ThorSlaveProcess'">
<xsl:value-of select="concat('[', ProcessNumber, ']')"/>
</xsl:when>
<xsl:when test="ProcessType!='ThorMasterProcess' and ProcessType!='RoxieServerProcess'">
<xsl:value-of select="concat('[', ComponentName, ']')"/>
</xsl:when>
</xsl:choose>
<xsl:if test="ProcessType!='ThorMasterProcess' and ProcessType!='RoxieServerProcess'">
<xsl:value-of select="concat('[', ComponentName, ']')"/>
</xsl:if>
</xsl:if>
</td>
<xsl:if test="$numSlaveNodes > 0">
<td>
<xsl:if test="ProcessType='ThorSlaveProcess'">
<xsl:value-of select="ProcessNumber"/>
</xsl:if>
</td>
</xsl:if>
<xsl:choose>
<xsl:when test="UpTime/text()">
<xsl:variable name="cond" select="ComponentInfo/Condition"/>
Expand Down

0 comments on commit eb5c90a

Please sign in to comment.