<commit_before>{{!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you 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.
}}

<div id="stack-upgrade-dialog">
  <div {{bindAttr class=":upgrade-options-link controller.isDowngrade:disabled"}} {{action openUpgradeOptions target="controller"}}>
    <i class="icon-cogs"></i><a>{{t common.options}}</a>
  </div>

  <div {{bindAttr class="view.isLoaded::hidden :row"}}>
    <div class="col-md-3 task-list-main-wrap">{{statusIcon controller.requestStatus}}
      &nbsp;{{view.upgradeStatusLabel}}</div>
    <div class="col-md-8">
      {{view App.ProgressBarView
        progressBinding="view.overallProgress"
        statusBinding="controller.requestStatus"
      }}
    </div>
    <div class="col-md-1">
      {{view.overallProgress}}%
    </div>
  </div>

  <div class="task-list scrollable-block task-list-main-wrap">
    {{#if view.isLoaded}}
      <div>
        <div class="row">
          {{#if isDowngrade}}
            <button
              class="btn btn-default" {{action confirmPauseDowngrade target="view"}}>{{t admin.stackUpgrade.pauseDowngrade}}</button>
          {{else}}
            <button
              class="btn btn-default" {{action confirmPauseUpgrade target="view"}}>{{t admin.stackUpgrade.pauseUpgrade}}</button>
          {{/if}}
        </div>
        {{#if view.runningItem}}
          <div class="panel panel-default details-box row">
            <div class="row col-md-12">
              <div class="pull-left col-md-6">{{t admin.stackUpgrade.dialog.inProgress}}&nbsp;{{view.runningItem.text}}</div>
              {{#if view.isDetailsOpened}}
                  <div class="pull-right col-md-6"><a href="#" class="pull-right" {{action toggleDetails target="view"}}>{{t admin.stackUpgrade.dialog.details.hide}}</a></div>
                {{#if view.runningItem.isTasksLoaded}}
                  <div class="clear col-md-12">
                    {{view App.upgradeTaskView contentBinding="view.taskDetails" outsideViewBinding="view.outsideView"}}
                  </div>
                {{else}}
                  {{view App.SpinnerView classNames="clear"}}
                {{/if}}
              {{else}}
              <div class="pull-right col-md-6"><a href="#" class="pull-right" {{action toggleDetails target="view"}}>{{t admin.stackUpgrade.dialog.details.open}}</a></div>
              {{/if}}
            </div>
          </div>
        {{/if}}<commit_msg>AMBARI-20806. Upgrade Pause button should not show when the Upgrade is already Paused (alexantonenko)<commit_after>{{!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you 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.
}}

<div id="stack-upgrade-dialog">
  <div {{bindAttr class=":upgrade-options-link controller.isDowngrade:disabled"}} {{action openUpgradeOptions target="controller"}}>
    <i class="icon-cogs"></i><a>{{t common.options}}</a>
  </div>

  <div {{bindAttr class="view.isLoaded::hidden :row"}}>
    <div class="col-md-3 task-list-main-wrap">{{statusIcon controller.requestStatus}}
      &nbsp;{{view.upgradeStatusLabel}}</div>
    <div class="col-md-8">
      {{view App.ProgressBarView
        progressBinding="view.overallProgress"
        statusBinding="controller.requestStatus"
      }}
    </div>
    <div class="col-md-1">
      {{view.overallProgress}}%
    </div>
  </div>

  <div class="task-list scrollable-block task-list-main-wrap">
    {{#if view.isLoaded}}
      <div>
        <div class="row">
          {{#unless App.upgradeSuspended}}
              {{#if isDowngrade}}
                <button
                  class="btn btn-default" {{action confirmPauseDowngrade target="view"}}>{{t admin.stackUpgrade.pauseDowngrade}}</button>
              {{else}}
                <button
                  class="btn btn-default" {{action confirmPauseUpgrade target="view"}}>{{t admin.stackUpgrade.pauseUpgrade}}</button>
              {{/if}}
          {{/unless}}
        </div>
        {{#if view.runningItem}}
          <div class="panel panel-default details-box row">
            <div class="row col-md-12">
              <div class="pull-left col-md-6">{{t admin.stackUpgrade.dialog.inProgress}}&nbsp;{{view.runningItem.text}}</div>
              {{#if view.isDetailsOpened}}
                  <div class="pull-right col-md-6"><a href="#" class="pull-right" {{action toggleDetails target="view"}}>{{t admin.stackUpgrade.dialog.details.hide}}</a></div>
                {{#if view.runningItem.isTasksLoaded}}
                  <div class="clear col-md-12">
                    {{view App.upgradeTaskView contentBinding="view.taskDetails" outsideViewBinding="view.outsideView"}}
                  </div>
                {{else}}
                  {{view App.SpinnerView classNames="clear"}}
                {{/if}}
              {{else}}
              <div class="pull-right col-md-6"><a href="#" class="pull-right" {{action toggleDetails target="view"}}>{{t admin.stackUpgrade.dialog.details.open}}</a></div>
              {{/if}}
            </div>
          </div>
        {{/if}}
{'fraction_non_alphanumeric': 0.14651271649243253, 'fraction_numerical': 0.0051490092058043375, 'mean_word_length': 2.768371546149324, 'pattern_counts': {'":': 2, '<': 81, '<?xml version=': 0, '>': 81, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6649483', 'n_tokens_mistral': 1848, 'n_tokens_neox': 1769, 'n_words': 473}