Skip to content

Commit

Permalink
HPCC-17629 Automatically assign DropZone to support node when using w…
Browse files Browse the repository at this point in the history
…izard

Signed-off-by: Michael Gardner <michael.gardner@lexisnexis.com>
  • Loading branch information
Michael-Gardner committed May 15, 2017
1 parent 076e3c0 commit 9489f93
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
20 changes: 20 additions & 0 deletions deployment/deployutils/deployutils.cpp
Expand Up @@ -1654,6 +1654,26 @@ class CGenerateJSFromXSD
}
}
}
else if(!strcmp(type,"serverListType"))
{
if(m_wizard)
{
StringBuffer buildSetName, ipAddr;
tempPath.clear().appendf("./Programs/Build/BuildSet[%s=\"%s\"]",XML_ATTR_PROCESS_NAME,m_compName.str());
IPropertyTree* pCompTree = m_pEnv->queryPropTree(tempPath.str());
if(pCompTree)
{
buildSetName.append(pCompTree->queryProp(XML_ATTR_NAME));
CInstDetails* pInst = m_wizard->getServerIPMap(compName, buildSetName,m_pEnv);
if( pInst )
{
StringArray& ipArray = pInst->getIpAssigned();
if(ipArray.length())
wizDefVal.clear().append(ipArray.item(0));
}
}
}
}
else if(!strcmp(type,"xs:string"))
{
StringBuffer nameOfComp;
Expand Down
3 changes: 2 additions & 1 deletion initfiles/componentfiles/configxml/dropzone.xsd.in
Expand Up @@ -99,12 +99,13 @@
<xs:element name="ServerListEntry" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:attribute name="server" type="string" use="required">
<xs:attribute name="server" type="serverListType" use="required">
<xs:annotation>
<xs:appinfo>
<title>Server Address</title>
<tooltip>Server Address to associate with this DropZone</tooltip>
<width>120</width>
<autogenforwizard>1</autogenforwizard>
</xs:appinfo>
</xs:annotation>
</xs:attribute>
Expand Down

0 comments on commit 9489f93

Please sign in to comment.