<commit_before><%@ include file="/WEB-INF/jsp/includes/include.jsp" %>

<%-- although the target of the action is 'crmsImport' must use 'import' as the component because this
action customizes the core action whose target is 'import' (see BaseFlowBuilder getBaseActionId) --%>
<c:set var="component" value="import"/>
<c:set var="viewString" value="${component}_view"/>
<c:set var="componentView" value="${requestScope[viewString]}"/>

<%-- set up vars for page title --%>
<c:if test="${flowState == 'result'}"> 
	<c:set var="importDataFile">
		<tags:componentProperty component="importLog" property="dataFile" property2="name"/>
	</c:set>
</c:if>
<c:if test="${flowState == 'result'}">
	<%-- have to convert the java.sql.Timestamp directly from command component because PropertyEditor has
		been registered by LavaComponentFormAction to convert to String --%> 
	<fmt:formatDate value="${command.components['importLog'].importTimestamp}" type="both" 
		pattern="MM/dd/yyyy hh:mm a" var="importTimestampString"/>
</c:if>

<page:applyDecorator name="component.content">
  <page:param name="component">${component}</page:param>
  <page:param name="forceMain">true</page:param> 
  <page:param name="hasFileUpload">true</page:param>
  <page:param name="pageHeadingArgs">${importDataFile},${importTimestamp}</page:param>

<page:applyDecorator name="component.import.content">
  <page:param name="component">${component}</page:param>
 
	<c:if test="${flowState == 'edit'}"> 
 		<c:import url="/WEB-INF/jsp/core/importer/import/importSetupContent.jsp">
			<c:param name="component">${component}</c:param>
		</c:import>
		
		<page:applyDecorator name="component.entity.section">
			<page:param name="sectionId">crmsSetup</page:param>
			<page:param name="sectionNameKey">import.crmsSetup.section</page:param>
			<tags:createField property="projName" component="${component}"/>
		</page:applyDecorator>
	</c:if>
	
	<c:if test="${flowState == 'result'}"> 
		<%-- import log displays overall import results and individual import record errors and warnings 
			note that components 'importLog' and 'importLogMessages' are put into the ComponentCommand map as well
			as the 'import' component. this is done when an import is executed and used to display 
			results from the log. 'import' is the "primary" component because this is what the handler 
			is using as the default component object name so it used to set up the component mode and 
			component view --%>
		<c:import url="/WEB-INF/jsp/crms/importer/log/crmsImportLogContent.jsp">
			<c:param name="component">${component}</c:param>
		</c:import>
	</c:if>	
	
	</page:applyDecorator>    
</page:applyDecorator>	    

<%-- TODO: list of allCrmsImportLogs as secondary list, ala visits on Add Visit --%>
<commit_msg>projName moved from crmsImport to crmsImportDefinition<commit_after><%@ include file="/WEB-INF/jsp/includes/include.jsp" %>

<%-- although the target of the action is 'crmsImport' must use 'import' as the component because this
action customizes the core action whose target is 'import' (see BaseFlowBuilder getBaseActionId) --%>
<c:set var="component" value="import"/>
<c:set var="viewString" value="${component}_view"/>
<c:set var="componentView" value="${requestScope[viewString]}"/>

<%-- set up vars for page title --%>
<c:if test="${flowState == 'result'}"> 
	<c:set var="importDataFile">
		<tags:componentProperty component="importLog" property="dataFile" property2="name"/>
	</c:set>
</c:if>
<c:if test="${flowState == 'result'}">
	<%-- have to convert the java.sql.Timestamp directly from command component because PropertyEditor has
		been registered by LavaComponentFormAction to convert to String --%> 
	<fmt:formatDate value="${command.components['importLog'].importTimestamp}" type="both" 
		pattern="MM/dd/yyyy hh:mm a" var="importTimestampString"/>
</c:if>

<page:applyDecorator name="component.content">
  <page:param name="component">${component}</page:param>
  <page:param name="forceMain">true</page:param> 
  <page:param name="hasFileUpload">true</page:param>
  <page:param name="pageHeadingArgs">${importDataFile},${importTimestamp}</page:param>

<page:applyDecorator name="component.import.content">
  <page:param name="component">${component}</page:param>
 
	<c:if test="${flowState == 'edit'}"> 
 		<c:import url="/WEB-INF/jsp/core/importer/import/importSetupContent.jsp">
			<c:param name="component">${component}</c:param>
		</c:import>
	</c:if>
	
	<c:if test="${flowState == 'result'}"> 
		<%-- import log displays overall import results and individual import record errors and warnings 
			note that components 'importLog' and 'importLogMessages' are put into the ComponentCommand map as well
			as the 'import' component. this is done when an import is executed and used to display 
			results from the log. 'import' is the "primary" component because this is what the handler 
			is using as the default component object name so it used to set up the component mode and 
			component view --%>
		<c:import url="/WEB-INF/jsp/crms/importer/log/crmsImportLogContent.jsp">
			<c:param name="component">${component}</c:param>
		</c:import>
	</c:if>	
	
	</page:applyDecorator>    
</page:applyDecorator>	    

<%-- TODO: list of allCrmsImportLogs as secondary list, ala visits on Add Visit --%>

{'fraction_non_alphanumeric': 0.15191986644407346, 'fraction_numerical': 0.0003709886848451122, 'mean_word_length': 4.810344827586207, 'pattern_counts': {'":': 0, '<': 96, '<?xml version=': 0, '>': 96, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4820763', 'n_tokens_mistral': 1736, 'n_tokens_neox': 1632, 'n_words': 439}