<commit_before>[#ftl]
[#--
* Copyright (c) 2005-2011 Grameen Foundation USA
*  All rights reserved.
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
*  implied. See the License for the specific language governing
*  permissions and limitations under the License.
*
*  See also http://www.apache.org/licenses/LICENSE-2.0.html for an
*  explanation of the license and how it is applied.
--]
[#assign completed][@spring.message "systemAdministration.batchjobs.completed"/][/#assign]
[#assign starting][@spring.message "systemAdministration.batchjobs.starting"/][/#assign]
[#assign started][@spring.message "systemAdministration.batchjobs.started"/][/#assign]
[#assign stopping][@spring.message "systemAdministration.batchjobs.stopping"/][/#assign]
[#assign stopped][@spring.message "systemAdministration.batchjobs.stopped"/][/#assign]
[#assign failed][@spring.message "systemAdministration.batchjobs.failed"/][/#assign]
[#assign abandoned][@spring.message "systemAdministration.batchjobs.abandoned"/][/#assign]
[#assign neverExecutedYet][@spring.message "systemAdministration.batchjobs.neverExecutedYet"/][/#assign]
[#import "spring.ftl" as spring]
[#import "blueprintmacros.ftl" as mifos]

[#include "layout.ftl"]
	
<script type="text/javascript">

	function selectAll(x) {
		for(var i=0,l=x.form.length; i<l; i++)
		{
			if(x.form[i].type == 'checkbox' && x.form[i].name != 'selectAll'){
				x.form[i].checked=x.checked
			}
		}
	}

</script>

[@adminLeftPaneLayout]
<!--  Main Content Begins-->
<div class=" content">
    <form method="post" name="batchjobs" action="batchjobs.ftl">
        [@mifos.crumbs breadcrumbs /]
        [@spring.showErrors "<br>" /]
        <div class="marginLeft30">
            <div class="span-21">
                <div class="clear">&nbsp;</div>
                <p class="font15"><span class="orangeheading">[@spring.message "systemAdministration.batchjobs.batchjobsInformation" /]</span></p>
                <div class="span-21">
                    <span class="span-11">[@spring.message "systemAdministration.batchjobs.welcometotheMifosbatchjobsArea" /].</span>
                </div>
                <div class="clear">&nbsp;</div>
                <div class="span-21">
                    <span class="span-3">&nbsp;</span>
                    <span class="span-7">
                        <strong>[@spring.message "systemAdministration.batchjobs.schedulerStatus" /]:</strong>
                        [#if model.scheduler == true]
                            [@spring.message "systemAdministration.batchjobs.active" /]
                        [#else]
                            [@spring.message "systemAdministration.batchjobs.standby" /]
                        [/#if]
                    </span>
                    <span class="span-3">
                        [#if model.scheduler == true]
                            <input class="buttn"  type="submit" id="SUSPEND" name="SUSPEND" value="[@spring.message "systemAdministration.batchjobs.suspend"/]"/>
                        [#else]
                            <input class="buttn"  type="submit" id="SUSPEND" name="SUSPEND" value="[@spring.message "systemAdministration.batchjobs.activate"/]"/>
                        [/#if]
                    </span>
                </div>
                <div class="clear borderbtm">&nbsp;</div>
                [#if model.executedTasks?size > 0]
                    <div class="span-21 borderbtm">
                        <span class="span-1">&nbsp;</span>
                        <span  class="span-10">
                            <p class="font15 orangeheading">[@spring.message "systemAdministration.batchjobs.tasksSentForExecution" /]:</p>
                            <ul>
                                [#list model.executedTasks as task]
                                    <li>${task}</li>
                                [/#list]
                            </ul>
                        </span>
                    </div>
                    <div class="clear">&nbsp;</div>
                [/#if]
                <div class="span-21 margin10topbottom">
                    <p class="font15"><span class="orangeheading">[@spring.message "systemAdministration.batchjobs.scheduledTasks" /]</span></p>
                </div>
                <div class="span-21">
                	<span class="span-1">
                		<input id="selectAll1" type="checkbox" name="selectAll1" onchange="javascript:selectAll(this)"/>
            		</span>
            		<span class="span-9">
                		[@spring.message "systemAdministration.batchjobs.selectAll"/]
                	</span>
                	<div class="clear">&nbsp;</div>
                    [#list model.batchjobs as batchjobs]
                        <div class="span-21 paddingLeft">
                            <span class="span-1">
                                <input id="${batchjobs.name}" type="checkbox" name="ONDEMAND" value="${batchjobs.name}" />
                            </span>
                            <span class="span-1">${batchjobs_index + 1}.</span>
                            <span class="span-9"><strong>${batchjobs.name}</strong></span>
                            <!-- Secific task pausing to be implemented in the future.
                            <span class="span-8">
                                [@spring.message "systemAdministration.batchjobs.taskStatus" /]:&nbsp;
                                [#if batchjobs.state == 0]
                                    [@spring.message "systemAdministration.batchjobs.normal" /]
                                [#elseif batchjobs.state == 1]
                                    [@spring.message "systemAdministration.batchjobs.paused" /]
                                [/#if]
                            </span>
                            -->
                        </div>
                        <div class="span-21">
                            <span class="span-2">&nbsp;</span>
                            <span class="span-8">
                                [@spring.message "systemAdministration.batchjobs.nextStart" /]:&nbsp;
                                [#if batchjobs.nextStartTime?datetime != model.date0?datetime]
                                    ${batchjobs.nextStartTime?datetime}
                                [#else]
                                    [@spring.message "systemAdministration.batchjobs.unknown" /]
                                [/#if]
                            </span>
                            <span class="span-1">&nbsp;</span>
                            <span class="span-8">
                                [@spring.message "systemAdministration.batchjobs.taskPriority" /]:&nbsp;
                                ${batchjobs.priority}
                            </span>
                        </div>
                        <div class="span-21">
                            <span class="span-2">&nbsp;</span>
                            <span class="span-8">
                                [@spring.message "systemAdministration.batchjobs.previousRunStart" /]:&nbsp;
                                [#if batchjobs.lastStartTime?datetime != model.date0?datetime]
                                    ${batchjobs.lastStartTime?datetime}
                                [#else]
                                    [@spring.message "systemAdministration.batchjobs.unknown" /]
                                [/#if]
                            </span>
                            <span class="span-1">&nbsp;</span>
                            <span class="span-8">
                                [@spring.message "systemAdministration.batchjobs.previousRunStatus" /]:&nbsp;
                                [#if batchjobs.lastRunStatus != ""]
                                    ${{"Completed":completed, "Starting":starting, "Started":started, "Stopping":stopping, "Stopped":stopped, "Failed":failed, "Abandoned":abandoned, "Never executed yet":neverExecutedYet}[batchjobs.lastRunStatus]}
                                [#else]
                                    [@spring.message "systemAdministration.batchjobs.unknown" /]
                                [/#if]
                                [#if batchjobs.failDescription??]
                                    &nbsp;(<a href="batchjobsdetails.ftl?jobFailName=${batchjobs.name}">[@spring.message "systemAdministration.batchjobs.showDetails" /]</a>)
                                [/#if]
                            </span>
                        </div>
                        [#if batchjobs.lastSuccessfulRun?datetime != batchjobs.lastStartTime?datetime]
                            <div class="span-21">
                                <span class="span-2">&nbsp;</span>
                                <span class="span-8">
                                    [@spring.message "systemAdministration.batchjobs.mostRecentSuccessfulRun" /]:&nbsp;
                                    [#if batchjobs.lastSuccessfulRun?datetime != model.date0?datetime]
                                        ${batchjobs.lastSuccessfulRun?datetime}
                                    [#else]
                                        [@spring.message "systemAdministration.batchjobs.none" /]
                                    [/#if]
                                </span>
                            </div>
                        [/#if]
                        <div class="span-21">
                            <span class="span-2">&nbsp;</span>
                            <span class="span-8"><commit_msg>MIFOS-3789: Add 'select all' checkbox to batch job page<commit_after>[#ftl]
[#--
* Copyright (c) 2005-2011 Grameen Foundation USA
*  All rights reserved.
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
*  implied. See the License for the specific language governing
*  permissions and limitations under the License.
*
*  See also http://www.apache.org/licenses/LICENSE-2.0.html for an
*  explanation of the license and how it is applied.
--]
[#assign completed][@spring.message "systemAdministration.batchjobs.completed"/][/#assign]
[#assign starting][@spring.message "systemAdministration.batchjobs.starting"/][/#assign]
[#assign started][@spring.message "systemAdministration.batchjobs.started"/][/#assign]
[#assign stopping][@spring.message "systemAdministration.batchjobs.stopping"/][/#assign]
[#assign stopped][@spring.message "systemAdministration.batchjobs.stopped"/][/#assign]
[#assign failed][@spring.message "systemAdministration.batchjobs.failed"/][/#assign]
[#assign abandoned][@spring.message "systemAdministration.batchjobs.abandoned"/][/#assign]
[#assign neverExecutedYet][@spring.message "systemAdministration.batchjobs.neverExecutedYet"/][/#assign]
[#import "spring.ftl" as spring]
[#import "blueprintmacros.ftl" as mifos]

[#include "layout.ftl"]
	
<script type="text/javascript">

	function selectAll(x) {
		for(var i=0,l=x.form.length; i<l; i++)
		{
			if(x.form[i].type == 'checkbox' && x.form[i].name != 'selectAll'){
				x.form[i].checked=x.checked
			}
		}
	}

</script>

[@adminLeftPaneLayout]
<!--  Main Content Begins-->
<div class=" content">
    <form method="post" name="batchjobs" action="batchjobs.ftl">
        [@mifos.crumbs breadcrumbs /]
        [@spring.showErrors "<br>" /]
        <div class="marginLeft30">
            <div class="span-21">
                <div class="clear">&nbsp;</div>
                <p class="font15"><span class="orangeheading">[@spring.message "systemAdministration.batchjobs.batchjobsInformation" /]</span></p>
                <div class="span-21">
                    <span class="span-11">[@spring.message "systemAdministration.batchjobs.welcometotheMifosbatchjobsArea" /].</span>
                </div>
                <div class="clear">&nbsp;</div>
                <div class="span-21">
                    <span class="span-3">&nbsp;</span>
                    <span class="span-7">
                        <strong>[@spring.message "systemAdministration.batchjobs.schedulerStatus" /]:</strong>
                        [#if model.scheduler == true]
                            [@spring.message "systemAdministration.batchjobs.active" /]
                        [#else]
                            [@spring.message "systemAdministration.batchjobs.standby" /]
                        [/#if]
                    </span>
                    <span class="span-3">
                        [#if model.scheduler == true]
                            <input class="buttn"  type="submit" id="SUSPEND" name="SUSPEND" value="[@spring.message "systemAdministration.batchjobs.suspend"/]"/>
                        [#else]
                            <input class="buttn"  type="submit" id="SUSPEND" name="SUSPEND" value="[@spring.message "systemAdministration.batchjobs.activate"/]"/>
                        [/#if]
                    </span>
                </div>
                <div class="clear borderbtm">&nbsp;</div>
                [#if model.executedTasks?size > 0]
                    <div class="span-21 borderbtm">
                        <span class="span-1">&nbsp;</span>
                        <span  class="span-10">
                            <p class="font15 orangeheading">[@spring.message "systemAdministration.batchjobs.tasksSentForExecution" /]:</p>
                            <ul>
                                [#list model.executedTasks as task]
                                    <li>${task}</li>
                                [/#list]
                            </ul>
                        </span>
                    </div>
                    <div class="clear">&nbsp;</div>
                [/#if]
                <div class="span-21 margin10topbottom">
                    <p class="font15"><span class="orangeheading">[@spring.message "systemAdministration.batchjobs.scheduledTasks" /]</span></p>
                </div>
                <div class="span-21">
                    <div class="span-21 paddingLeft bglightblue">
                	   <span class="span-1">
                		  <input id="selectAll1" type="checkbox" name="selectAll1" onchange="javascript:selectAll(this)"/>
            		  </span>
            		  <span class="span-9">
                		  <strong>[@spring.message "systemAdministration.batchjobs.scheduledTasks"/]</strong>
                	   </span>
            	    </div>
                	<div class="clear">&nbsp;</div>
                    [#list model.batchjobs as batchjobs]
                        <div class="span-21 paddingLeft">
                            <span class="span-1">
                                <input id="${batchjobs.name}" type="checkbox" name="ONDEMAND" value="${batchjobs.name}" />
                            </span>
                            <span class="span-9"><strong>${batchjobs.name}</strong></span>
                            <!-- Secific task pausing to be implemented in the future.
                            <span class="span-8">
                                [@spring.message "systemAdministration.batchjobs.taskStatus" /]:&nbsp;
                                [#if batchjobs.state == 0]
                                    [@spring.message "systemAdministration.batchjobs.normal" /]
                                [#elseif batchjobs.state == 1]
                                    [@spring.message "systemAdministration.batchjobs.paused" /]
                                [/#if]
                            </span>
                            -->
                        </div>
                        <div class="span-21">
                            <span class="span-1">&nbsp;</span>
                            <span class="span-8">
                                [@spring.message "systemAdministration.batchjobs.nextStart" /]:&nbsp;
                                [#if batchjobs.nextStartTime?datetime != model.date0?datetime]
                                    ${batchjobs.nextStartTime?datetime}
                                [#else]
                                    [@spring.message "systemAdministration.batchjobs.unknown" /]
                                [/#if]
                            </span>
                            <span class="span-1">&nbsp;</span>
                            <span class="span-8">
                                [@spring.message "systemAdministration.batchjobs.taskPriority" /]:&nbsp;
                                ${batchjobs.priority}
                            </span>
                        </div>
                        <div class="span-21">
                            <span class="span-1">&nbsp;</span>
                            <span class="span-8">
                                [@spring.message "systemAdministration.batchjobs.previousRunStart" /]:&nbsp;
                                [#if batchjobs.lastStartTime?datetime != model.date0?datetime]
                                    ${batchjobs.lastStartTime?datetime}
                                [#else]
                                    [@spring.message "systemAdministration.batchjobs.unknown" /]
                                [/#if]
                            </span>
                            <span class="span-1">&nbsp;</span>
                            <span class="span-8">
                                [@spring.message "systemAdministration.batchjobs.previousRunStatus" /]:&nbsp;
                                [#if batchjobs.lastRunStatus != ""]
                                    ${{"Completed":completed, "Starting":starting, "Started":started, "Stopping":stopping, "Stopped":stopped, "Failed":failed, "Abandoned":abandoned, "Never executed yet":neverExecutedYet}[batchjobs.lastRunStatus]}
                                [#else]
                                    [@spring.message "systemAdministration.batchjobs.unknown" /]
                                [/#if]
                                [#if batchjobs.failDescription??]
                                    &nbsp;(<a href="batchjobsdetails.ftl?jobFailName=${batchjobs.name}">[@spring.message "systemAdministration.batchjobs.showDetails" /]</a>)
                                [/#if]
                            </span>
                        </div>
                        [#if batchjobs.lastSuccessfulRun?datetime != batchjobs.lastStartTime?datetime]
                            <div class="span-21">
                                <span class="span-1">&nbsp;</span>
                                <span class="span-8">
                                    [@spring.message "systemAdministration.batchjobs.mostRecentSuccessfulRun" /]:&nbsp;
                                    [#if batchjobs.lastSuccessfulRun?datetime != model.date0?datetime]
                                        ${batchjobs.lastSuccessfulRun?datetime}
                                    [#else]
                                        [@spring.message "systemAdministration.batchjobs.none" /]
                                    [/#if]
                                </span>
                            </div>
                        [/#if]
                        <div class="span-21">
                            <span class="span-1">&nbsp;</span>
                            <span class="span-8">
{'fraction_non_alphanumeric': 0.12970544183724414, 'fraction_numerical': 0.008387418871692462, 'mean_word_length': 1.3920468115595892, 'pattern_counts': {'":': 16, '<': 223, '<?xml version=': 0, '>': 223, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 34, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '378259', 'n_tokens_mistral': 5371, 'n_tokens_neox': 4855, 'n_words': 885}