<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; org.rundeck.core.auth.AuthConstants; rundeck.Execution" %>

<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) && scheduledExecution.hasExecutionEnabled()}"/>
<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}"/>
<content tag="subtitlecss">job-page</content>
<content tag="subtitlesection">

    <div class="  subtitle-head flex-container flex-align-items-stretch">
        <div class="subtitle-head-item  flex-item-auto">
            <g:render template="/scheduledExecution/showHead"
                      model="[scheduledExecution: scheduledExecution,
                              followparams      : [mode: followmode, lastlines: params.lastlines],
                              jobDescriptionMode: 'expanded',
                              jobActionButtons  : false,
                              linkCss           : 'text-h4',
                              scmExportEnabled  : scmExportEnabled,
                              scmExportStatus   : scmExportStatus,
                              scmImportEnabled  : scmImportEnabled,
                              scmImportStatus   : scmImportStatus
                      ]"/>

            <section class="section-space">
                <small class="uuid text-secondary">${scheduledExecution.extid}</small>
            </section>
        </div>

        <div class="subtitle-head-item  flex-container column flex-justify-space-between flex-align-items-flex-end">

            <div class="job-action-button ">
                <g:render template="/scheduledExecution/jobActionButton"
                          model="[scheduledExecution: scheduledExecution,
                                  hideTitle         : false,
                                  dropdownClass     : 'dropdown-menu-right',
                                  btnClass          : 'btn btn-secondary btn-sm']"/>
            </div>

            <g:if test="${readAccess}">
                <section class="section-space">
                    <a href="#job-definition-modal" data-toggle="modal" class="btn btn-secondary btn-sm ">

                        <g:if test="${rundoctext}">
                            <i class="glyphicon glyphicon-book"></i>
                            <g:message code="runbook"/>
                        </g:if>
                        <g:else>
                            <i class="glyphicon glyphicon-info-sign"></i>
                            <g:message code="definition"/>
                        </g:else>
                    </a>
                </section>

                <g:render template="/common/modal"
                          model="[modalid   : 'job-definition-modal',<commit_msg>Fix: job actions menu position for long descriptions<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; org.rundeck.core.auth.AuthConstants; rundeck.Execution" %>

<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) && scheduledExecution.hasExecutionEnabled()}"/>
<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}"/>
<content tag="subtitlecss">job-page</content>
<content tag="subtitlesection">

    <div class="  subtitle-head flex-container flex-align-items-stretch">
        <div class="subtitle-head-item  flex-item-auto">
            <g:render template="/scheduledExecution/showHead"
                      model="[scheduledExecution: scheduledExecution,
                              followparams      : [mode: followmode, lastlines: params.lastlines],
                              jobDescriptionMode: 'expanded',
                              jobActionButtons  : false,
                              linkCss           : 'text-h4',
                              scmExportEnabled  : scmExportEnabled,
                              scmExportStatus   : scmExportStatus,
                              scmImportEnabled  : scmImportEnabled,
                              scmImportStatus   : scmImportStatus
                      ]"/>

            <section class="section-space">
                <small class="uuid text-secondary">${scheduledExecution.extid}</small>
            </section>
        </div>

        <div class="subtitle-head-item flex-item flex-grow-1 flex-container column flex-justify-space-between flex-align-items-flex-end">

            <div class="job-action-button ">
                <g:render template="/scheduledExecution/jobActionButton"
                          model="[scheduledExecution: scheduledExecution,
                                  hideTitle         : false,
                                  dropdownClass     : 'dropdown-menu-right',
                                  btnClass          : 'btn btn-secondary btn-sm']"/>
            </div>

            <g:if test="${readAccess}">
                <section class="section-space">
                    <a href="#job-definition-modal" data-toggle="modal" class="btn btn-secondary btn-sm ">

                        <g:if test="${rundoctext}">
                            <i class="glyphicon glyphicon-book"></i>
                            <g:message code="runbook"/>
                        </g:if>
                        <g:else>
                            <i class="glyphicon glyphicon-info-sign"></i>
                            <g:message code="definition"/>
                        </g:else>
                    </a>
                </section>

                <g:render template="/common/modal"
                          model="[modalid   : 'job-definition-modal',
{'fraction_non_alphanumeric': 0.11690969557431569, 'fraction_numerical': 0.002430289076490151, 'mean_word_length': 1.9240837696335078, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 77, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4150395', 'n_tokens_mistral': 2024, 'n_tokens_neox': 1945, 'n_words': 442}