<commit_before>%{--
  - Copyright 2016 SimplifyOps, Inc. (http://simplifyops.com)
  -
  - 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.
  --}%

<%@ page import="rundeck.ScheduledExecution; com.dtolabs.rundeck.server.authorization.AuthConstants; rundeck.Execution" %>
<div class="container-fluid">
  <div class="row">
    <div class="col-xs-12">
      <div class="card">
        <div class="card-content">
          <g:render template="/scheduledExecution/showHead"
                    model="[scheduledExecution: scheduledExecution,
                            followparams      : [mode: followmode, lastlines: params.lastlines],
                            jobDescriptionMode:'expanded',
                            jobActionButtons  : true,
                            scmExportEnabled  : scmExportEnabled,
                            scmExportStatus   : scmExportStatus,
                            scmImportEnabled  : scmImportEnabled,
                            scmImportStatus   : scmImportStatus
                    ]"/>

        </div>
      </div>
    </div>
  </div>
  <g:set var="runAccess" value="${auth.jobAllowedTest(job: scheduledExecution, action: AuthConstants.ACTION_RUN)}"/>
  <g:set var="readAccess" value="${auth.jobAllowedTest(job: scheduledExecution, action: AuthConstants.ACTION_READ)}"/>
  <g:set var="runEnabled" value="${g.executionMode(is:'active',project:scheduledExecution.project)}"/>
  <g:set var="canRunJob" value="${runAccess && runEnabled}"/>
  <g:set var="extendeddesc" value="${g.textRemainingLines(text: scheduledExecution.description)}"/>
  <g:set var="rundoctext" value="${extendeddesc?g.textAfterLine(text: extendeddesc, marker:ScheduledExecution.RUNBOOK_MARKER):null}"/>
  <div class="row">
      <div class="col-sm-12">
        <div class="card">
          <div class="card-content">
            <div class="vue-tabs">
              <div class="nav-tabs-navigation">
                <div class="nav-tabs-wrapper">
                  <ul class="nav nav-tabs" id="jobtabs">
                      <g:if test="${canRunJob}">
                          <li class="active"><a href="#runjob" data-toggle="tab"><g:message
                                  code="scheduledExecution.show.run.tab.name"/></a></li>
                      </g:if>
                      <g:else>
                          <li class="disabled">
                              <a href="#"
                                 title="${message(code:!runEnabled?'disabled.job.run':'unauthorized.job.run')}"
                                 class="has_tooltip"
                                 data-placement="bottom">
                                  <g:message code="scheduledExecution.show.run.tab.name"/>
                              </a>
                          </li>
                      </g:else>
                      <g:if test="${readAccess}">
                      <li class="${canRunJob ? '' : 'active'}"><a href="#definition"
                                                                  data-toggle="tab"><g:message code="definition"/></a></li>
                      </g:if>
                      <g:if test="${rundoctext}">
                          <li class="${(canRunJob||readAccess) ? '' : 'active'}">
                              <a href="#runbook" data-toggle="tab"><g:message code="runbook" /></a>
                          </li>
                      </g:if>
                  </ul>
                </div>
              </div>
              <div class="tab-content">
                  <g:if test="${canRunJob}">
                      <div class="tab-pane active" id="runjob">
                          <tmpl:execOptionsForm
                                  model="${[scheduledExecution: scheduledExecution, crontab: crontab, authorized: authorized]}"
                                  hideHead="${true}"
                                  hideCancel="${true}"
                                  defaultFollow="${true}"/>
                      </div>
                  </g:if>
                  <g:if test="${readAccess}">
                  <div id="definition" class="tab-pane ${canRunJob ? '' : 'active'}">
                    <g:render template="/execution/execDetails" model="[execdata: scheduledExecution, strategyPlugins:strategyPlugins, showEdit: true, hideOptions: true, knockout: true]"/>
                  </div>
                  </g:if>
                  <g:if test="${rundoctext}">
                      <div id="runbook" class="tab-pane  ${(canRunJob || readAccess) ? '' : 'active'}">
                          <div class="markdeep">${rundoctext}</div>
                      </div>
                  </g:if>
              </div>
              <!-- end tab content -->
            </div>

          </div>
        </div>
      </div>
  </div>


  <!-- <div class="row">
      <div class="col-sm-12 ">
        <div class="card">
          <div class="card-header">
            <h4 class="card-title">
              <g:message code="statistics" />
            </h4>
          </div>
          <div class="card-content">
            <g:render template="/scheduledExecution/renderJobStats" model="${[scheduledExecution: scheduledExecution]}"/>
          </div>
        </div>
      </div>
  </div> -->

  <div class="row">
    <div class="col-xs-12">
      <div class="card card-plain">
        <div class="card-header">
          <h3 class="card-title">
            <g:message code="statistics" />
          </h3>
        </div>
      </div>
    </div>
    <g:render template="/scheduledExecution/renderJobStats" model="${[scheduledExecution: scheduledExecution]}"/>

  </div>

  <div class="row" id="activity_section">
      <div class="col-sm-12">
        <div class="card">
          <div class="card-header">
            <h4>
              <g:message code="page.section.Activity.for.this.job" />
            </h4><commit_msg>Remove commented gsp template<commit_after>%{--
  - Copyright 2016 SimplifyOps, Inc. (http://simplifyops.com)
  -
  - 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.
  --}%

<%@ page import="rundeck.ScheduledExecution; com.dtolabs.rundeck.server.authorization.AuthConstants; rundeck.Execution" %>
<div class="container-fluid">
  <div class="row">
    <div class="col-xs-12">
      <div class="card">
        <div class="card-content">
          <g:render template="/scheduledExecution/showHead"
                    model="[scheduledExecution: scheduledExecution,
                            followparams      : [mode: followmode, lastlines: params.lastlines],
                            jobDescriptionMode:'expanded',
                            jobActionButtons  : true,
                            scmExportEnabled  : scmExportEnabled,
                            scmExportStatus   : scmExportStatus,
                            scmImportEnabled  : scmImportEnabled,
                            scmImportStatus   : scmImportStatus
                    ]"/>

        </div>
      </div>
    </div>
  </div>
  <g:set var="runAccess" value="${auth.jobAllowedTest(job: scheduledExecution, action: AuthConstants.ACTION_RUN)}"/>
  <g:set var="readAccess" value="${auth.jobAllowedTest(job: scheduledExecution, action: AuthConstants.ACTION_READ)}"/>
  <g:set var="runEnabled" value="${g.executionMode(is:'active',project:scheduledExecution.project)}"/>
  <g:set var="canRunJob" value="${runAccess && runEnabled}"/>
  <g:set var="extendeddesc" value="${g.textRemainingLines(text: scheduledExecution.description)}"/>
  <g:set var="rundoctext" value="${extendeddesc?g.textAfterLine(text: extendeddesc, marker:ScheduledExecution.RUNBOOK_MARKER):null}"/>
  <div class="row">
      <div class="col-sm-12">
        <div class="card">
          <div class="card-content">
            <div class="vue-tabs">
              <div class="nav-tabs-navigation">
                <div class="nav-tabs-wrapper">
                  <ul class="nav nav-tabs" id="jobtabs">
                      <g:if test="${canRunJob}">
                          <li class="active"><a href="#runjob" data-toggle="tab"><g:message
                                  code="scheduledExecution.show.run.tab.name"/></a></li>
                      </g:if>
                      <g:else>
                          <li class="disabled">
                              <a href="#"
                                 title="${message(code:!runEnabled?'disabled.job.run':'unauthorized.job.run')}"
                                 class="has_tooltip"
                                 data-placement="bottom">
                                  <g:message code="scheduledExecution.show.run.tab.name"/>
                              </a>
                          </li>
                      </g:else>
                      <g:if test="${readAccess}">
                      <li class="${canRunJob ? '' : 'active'}"><a href="#definition"
                                                                  data-toggle="tab"><g:message code="definition"/></a></li>
                      </g:if>
                      <g:if test="${rundoctext}">
                          <li class="${(canRunJob||readAccess) ? '' : 'active'}">
                              <a href="#runbook" data-toggle="tab"><g:message code="runbook" /></a>
                          </li>
                      </g:if>
                  </ul>
                </div>
              </div>
              <div class="tab-content">
                  <g:if test="${canRunJob}">
                      <div class="tab-pane active" id="runjob">
                          <tmpl:execOptionsForm
                                  model="${[scheduledExecution: scheduledExecution, crontab: crontab, authorized: authorized]}"
                                  hideHead="${true}"
                                  hideCancel="${true}"
                                  defaultFollow="${true}"/>
                      </div>
                  </g:if>
                  <g:if test="${readAccess}">
                  <div id="definition" class="tab-pane ${canRunJob ? '' : 'active'}">
                    <g:render template="/execution/execDetails" model="[execdata: scheduledExecution, strategyPlugins:strategyPlugins, showEdit: true, hideOptions: true, knockout: true]"/>
                  </div>
                  </g:if>
                  <g:if test="${rundoctext}">
                      <div id="runbook" class="tab-pane  ${(canRunJob || readAccess) ? '' : 'active'}">
                          <div class="markdeep">${rundoctext}</div>
                      </div>
                  </g:if>
              </div>
              <!-- end tab content -->
            </div>

          </div>
        </div>
      </div>
  </div>

  <div class="row">
    <div class="col-xs-12">
      <div class="card card-plain">
        <div class="card-header">
          <h3 class="card-title">
            <g:message code="statistics" />
          </h3>
        </div>
      </div>
    </div>
    <g:render template="/scheduledExecution/renderJobStats" model="${[scheduledExecution: scheduledExecution]}"/>

  </div>

  <div class="row" id="activity_section">
      <div class="col-sm-12">
        <div class="card">
          <div class="card-header">
            <h4>
              <g:message code="page.section.Activity.for.this.job" />
            </h4>
{'fraction_non_alphanumeric': 0.1447336414497689, 'fraction_numerical': 0.0035676639909186735, 'mean_word_length': 1.5787162868492577, 'pattern_counts': {'":': 0, '<': 216, '<?xml version=': 0, '>': 216, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '674241', 'n_tokens_mistral': 3317, 'n_tokens_neox': 3202, 'n_words': 644}