Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (38 sloc) 2.31 KB
<apex:page controller="ManageFlowFactoryController" showHeader="true" sidebar="true">
<apex:includeScript value="{!URLFOR($Resource.jszip, '/jszip.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.jszip, '/jszip-load.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.jszip, '/jszip-deflate.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.jszip, '/jszip-inflate.js')}"/>
<apex:form id="form">
<apex:sectionHeader title="LittleBits Manage Flow Factory" subtitle="Dynamically deploys an Apex Class providing access to the Automation Flows"/>
<apex:pageMessages escape="false" />
<apex:outputPanel rendered="{!MetadataConnectionError==true}">
<apex:outputLink value="{!$Page.welcome}?showHeader=1">Return to the Welcome page</apex:outputLink>
</apex:outputPanel>
<apex:outputPanel rendered="{!MetadataConnectionError==false}">
<apex:pageBlock >
<apex:pageBlockSection >
<pre>{!FactoryCode}</pre>
</apex:pageBlockSection>
<apex:pageBlockSection >
<pre>{!FactoryTestCode}</pre>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:actionPoller action="{!checkAsyncRequest}" interval="5" rerender="form" rendered="{!NOT(ISNULL(AsyncResult))}"/>
<apex:actionFunction name="deployZip" action="{!deployZip}" rendered="{!ISNULL(AsyncResult)}" rerender="form">
<apex:param name="data" assignTo="{!ZipData}" value=""/>
</apex:actionFunction>
<c:zip name="generateZip" oncomplete="deployZip(data);" rendered="{!ISNULL(AsyncResult)}">
<c:zipEntry path="package.xml" data="{!PackageXml}"/>
<c:zipEntry path="destructiveChanges.xml" data="{!DestructiveChangesXml}" rendered="{!Deployed}"/>
<c:zipEntry path="classes/{!FactoryName}.cls" data="{!FactoryCode}" rendered="{!NOT(Deployed)}"/>
<c:zipEntry path="classes/{!FactoryName}.cls-meta.xml" data="{!FactoryCodeMetadata}" rendered="{!NOT(Deployed)}"/>
<c:zipEntry path="classes/{!FactoryTestName}.cls" data="{!FactoryTestCode}" rendered="{!NOT(Deployed)}"/>
<c:zipEntry path="classes/{!FactoryTestName}.cls-meta.xml" data="{!FactoryTestCodeMetadata}" rendered="{!NOT(Deployed)}"/>
</c:zip>
<apex:outputPanel rendered="{!ISNULL(AsyncResult)}">
<input type="button" onclick="generateZip();" value="{!IF(Deployed, 'Remove', 'Deploy')}" class="btn"/>
</apex:outputPanel>
</apex:outputPanel>
</apex:form>
</apex:page>
You can’t perform that action at this time.