<commit_before><!-- Mock page for Push - TODO actual implementation -->
<lo-navigation ng-controller="AppDropdownCtrl" data-lo-current="push" data-lo-apps="applications" data-lo-app="curApp"></lo-navigation>

<div class="col-md-9 lo-main-pane app-push">
  <div class="row">
    <div class="lo-content-area col-md-10">
      <lo-breadcrumbs></lo-breadcrumbs>
      <h2 class="pull-left"><span>{{curApp.name}}</span> Push Notifications</h2>
      <p class="subtitle"><span class="required">*</span> Required fields</p>
      <hr>
      <p class="form-info" ng-show="create">To configure push for this application, please enter your AeroGear UnifiedPush Server information. <i class="fa fa-info-circle" data-tooltip-placement="right" data-tooltip="To be able to use this feature, you need to have an application already configured in Aerogear UPS."></i></p>

      <div class="panel" ng-hide="create">
        <div class="panel-heading clearfix">
          <h3 class="pull-left">Connected to <a ng-href="{{pushModel.upsURL}}/#/mobileApps/variants/{{pushModel.applicationId}}">{{pushAppName}}</a> <span class="lo-emph">in AeroGear UPS</span></h3>
          <span data-toggle="modal" data-target="#delete-push" ng-hide="create || changed">
            <button class="btn btn-link btn-icon pull-right" data-tooltip="Delete Push" data-tooltip-placement="top">
              <i class="fa fa-trash-o"></i>
              <span>Delete Push</span>
            </button>
          </span>        
        </div>
      </div>

      <!--
<div class="panel" ng-hide="create">
        <div class="panel-heading clearfix">
          <h3 class="pull-left">Connected to <a ng-href="{{pushModel.upsURL}}/#/mobileApps/variants/{{pushModel.applicationId}}">{{pushAppName}}</a> <span class="lo-emph">in AeroGear UPS</span></h3>
          <div class="pull-right">
            <span class="lo-field"><i class="green-circle"></i> Active</span>
          </div>
        </div>
        <div class="panel-body">
          <span class="lo-emph">Configured <strong>3</strong> minutes ago.</span>
          <span data-toggle="modal" data-target="#delete-push" ng-hide="create || changed">
            <button class="btn btn-link btn-icon pull-right" data-tooltip="Delete Push" data-tooltip-placement="top">
              <i class="fa fa-trash-o"></i>
              <span>Delete Push</span>
            </button>
          </span>
        </div>
      </div>
-->

      <form class="lo-form-horizontal clearfix" name="pushForm">
        <fieldset>
          <div class="form-group clearfix" ng-class="{'has-error': pushForm.pushUrl.$dirty && !pushForm.pushUrl.$valid}">
            <label class="col-sm-3 control-label" for="pushUrl">AeroGear UnifiedPush URL <span class="required">*</span></label>
            <div class="col-sm-4">
              <input class="form-control" type="url" id="pushUrl" name="pushUrl" ng-model="pushModel.upsURL" lo-http-prefix required>
              <span class="help-block" ng-show="pushForm.pushUrl.$error.url">Not a valid URL.</span>
            </div>
          </div>
          <div class="form-group clearfix" ng-class="{'has-error': pushForm.appId.$dirty && !pushForm.appId.$valid}">
            <label class="col-sm-3 control-label" for="appId">Application ID <span class="required">*</span></label>
            <div class="col-sm-4">
              <input class="form-control" type="text" id="appId" name="appId" ng-model="pushModel.applicationId" required>
            </div>
          </div>
          <div class="form-group clearfix" ng-class="{'has-error': pushForm.secret.$dirty && !pushForm.secret.$valid}">
            <label class="col-sm-3 control-label" for="secret">Master Secret <span class="required">*</span></label>
            <div class="col-sm-4">
              <input class="form-control" type="password" id="secret" name="secret" ng-model="pushModel.masterSecret" required>
            </div>
          </div>
        </fieldset>

        <div class="pull-right form-actions">
          <button lo-button-clear="clear()" ng-disabled="!changed">Clear changes</button>
          <button lo-button-save="save()" ng-disabled="!changed || !pushForm.$valid">Save</button>
        </div>
      </form>
    </div>
  </div>

  <!-- Delete Push Configuration Modal -->
  <div class="modal fade" id="delete-push" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
            <span class="pficon pficon-close"></span>
          </button>
          <h4 class="modal-title">Delete Push Configuration</h4>
        </div>
        <div class="modal-body">
          <div class="form-group">
            <p class="primary-message">Are you sure you want to delete the Push configuration for "{{ curApp.name }}"?</p>
            <p>This action can't be undone.</p>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default btn-lg" data-dismiss="modal">Cancel</button>
          <button type="button" class="btn btn-danger btn-lg" data-dismiss="modal" ng-click="delete()">Delete</button>
        </div>
      </div>
    </div>
  </div>
</div><commit_msg>LIVEOAK-265: Add autofocus to Push configuration (when creating)<commit_after><!-- Mock page for Push - TODO actual implementation -->
<lo-navigation ng-controller="AppDropdownCtrl" data-lo-current="push" data-lo-apps="applications" data-lo-app="curApp"></lo-navigation>

<div class="col-md-9 lo-main-pane app-push">
  <div class="row">
    <div class="lo-content-area col-md-10">
      <lo-breadcrumbs></lo-breadcrumbs>
      <h2 class="pull-left"><span>{{curApp.name}}</span> Push Notifications</h2>
      <p class="subtitle"><span class="required">*</span> Required fields</p>
      <hr>
      <p class="form-info" ng-show="create">To configure push for this application, please enter your AeroGear UnifiedPush Server information. <i class="fa fa-info-circle" data-tooltip-placement="right" data-tooltip="To be able to use this feature, you need to have an application already configured in Aerogear UPS."></i></p>

      <div class="panel" ng-hide="create">
        <div class="panel-heading clearfix">
          <h3 class="pull-left">Connected to <a ng-href="{{pushModel.upsURL}}/#/mobileApps/variants/{{pushModel.applicationId}}">{{pushAppName}}</a> <span class="lo-emph">in AeroGear UPS</span></h3>
          <span data-toggle="modal" data-target="#delete-push" ng-hide="create || changed">
            <button class="btn btn-link btn-icon pull-right" data-tooltip="Delete Push" data-tooltip-placement="top">
              <i class="fa fa-trash-o"></i>
              <span>Delete Push</span>
            </button>
          </span>        
        </div>
      </div>

      <!--
<div class="panel" ng-hide="create">
        <div class="panel-heading clearfix">
          <h3 class="pull-left">Connected to <a ng-href="{{pushModel.upsURL}}/#/mobileApps/variants/{{pushModel.applicationId}}">{{pushAppName}}</a> <span class="lo-emph">in AeroGear UPS</span></h3>
          <div class="pull-right">
            <span class="lo-field"><i class="green-circle"></i> Active</span>
          </div>
        </div>
        <div class="panel-body">
          <span class="lo-emph">Configured <strong>3</strong> minutes ago.</span>
          <span data-toggle="modal" data-target="#delete-push" ng-hide="create || changed">
            <button class="btn btn-link btn-icon pull-right" data-tooltip="Delete Push" data-tooltip-placement="top">
              <i class="fa fa-trash-o"></i>
              <span>Delete Push</span>
            </button>
          </span>
        </div>
      </div>
-->

      <form class="lo-form-horizontal clearfix" name="pushForm">
        <fieldset>
          <div class="form-group clearfix" ng-class="{'has-error': pushForm.pushUrl.$dirty && !pushForm.pushUrl.$valid}">
            <label class="col-sm-3 control-label" for="pushUrl">AeroGear UnifiedPush URL <span class="required">*</span></label>
            <div class="col-sm-4">
              <input class="form-control" type="url" id="pushUrl" name="pushUrl" ng-model="pushModel.upsURL" lo-http-prefix lo-focused="create" required>
              <span class="help-block" ng-show="pushForm.pushUrl.$error.url">Not a valid URL.</span>
            </div>
          </div>
          <div class="form-group clearfix" ng-class="{'has-error': pushForm.appId.$dirty && !pushForm.appId.$valid}">
            <label class="col-sm-3 control-label" for="appId">Application ID <span class="required">*</span></label>
            <div class="col-sm-4">
              <input class="form-control" type="text" id="appId" name="appId" ng-model="pushModel.applicationId" required>
            </div>
          </div>
          <div class="form-group clearfix" ng-class="{'has-error': pushForm.secret.$dirty && !pushForm.secret.$valid}">
            <label class="col-sm-3 control-label" for="secret">Master Secret <span class="required">*</span></label>
            <div class="col-sm-4">
              <input class="form-control" type="password" id="secret" name="secret" ng-model="pushModel.masterSecret" required>
            </div>
          </div>
        </fieldset>

        <div class="pull-right form-actions">
          <button lo-button-clear="clear()" ng-disabled="!changed">Clear changes</button>
          <button lo-button-save="save()" ng-disabled="!changed || !pushForm.$valid">Save</button>
        </div>
      </form>
    </div>
  </div>

  <!-- Delete Push Configuration Modal -->
  <div class="modal fade" id="delete-push" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
            <span class="pficon pficon-close"></span>
          </button>
          <h4 class="modal-title">Delete Push Configuration</h4>
        </div>
        <div class="modal-body">
          <div class="form-group">
            <p class="primary-message">Are you sure you want to delete the Push configuration for "{{ curApp.name }}"?</p>
            <p>This action can't be undone.</p>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default btn-lg" data-dismiss="modal">Cancel</button>
          <button type="button" class="btn btn-danger btn-lg" data-dismiss="modal" ng-click="delete()">Delete</button>
        </div>
      </div>
    </div>
  </div>
</div>
{'fraction_non_alphanumeric': 0.1822434278229956, 'fraction_numerical': 0.003835718963420339, 'mean_word_length': 2.8029171113482745, 'pattern_counts': {'":': 0, '<': 285, '<?xml version=': 0, '>': 285, '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': '5706794', 'n_tokens_mistral': 3297, 'n_tokens_neox': 3231, 'n_words': 679}