<commit_before><%# SkyHopperが使う APIKey, Region, Keypair %>

<form class="form-horizontal" id="app-settings-form" role="form">

  <fieldset>
    <legend><%= t('app_settings.title.system') %></legend>
    <div class="form-group">
      <label for="log_directory" class="col-sm-3 control-label"><%= t 'app_settings.log_directory' %></label>
      <div class="col-sm-7">
        <input type="text" class="form-control" id="log_directory" name="log_directory">
        <p class="help-block"><%= I18n.t('app_settings.msg.log_directory') %></p>
      </div>
    </div>
  </fieldset>


  <fieldset>
    <legend><%= t('app_settings.title.aws') %>&nbsp;<button type="button" class="btn btn-link" data-toggle="popover" title="AWS" data-content="<%= t('app_settings.msg.aws_description') %>"><%= glyphicon 'question-sign' %></button></legend>

    <div class="form-group">
      <label for="access_key" class="col-sm-3 control-label"><%= t 'app_settings.access_key' %></label>
      <div class="col-sm-7">
        <input type="text" class="form-control" id="access_key" name="access_key">
        <p class="help-block"><%= t('app_settings.msg.access_key') %></p>
      </div>
    </div>

    <div class="form-group">
      <label for="secret_access_key" class="col-sm-3 control-label"><%= t 'app_settings.secret_access_key' %></label>
      <div class="col-sm-7">
        <input type="text" class="form-control form-control-masked" id="secret_access_key" name="secret_access_key">
        <p class="help-block"><%= t('app_settings.msg.secret_access_key') %></p>
      </div>
    </div>

    <div class="form-group">
      <label for="aws_region" class="col-sm-3 control-label"><%= t 'app_settings.aws_region' %></label>
      <div class="col-sm-7">
        <select class="form-control" id="aws_region" name="aws_region">
          <%= please_select_option %>
          <%= options_for_select(AWS::Regions) %>
        </select>
        <p class="help-block"><%= t('app_settings.msg.aws_region') %></p>
      </div>
    </div>

    <div class="form-group">
      <label class="col-sm-3 control-label"><%= t 'app_settings.aws_keypair' %></label>
      <div class="col-sm-7">
        <label for="keypair_name" class="control-label"><%= t 'app_settings.keypair_name' %></label>
        <input id="keypair_name" class="form-control ec2-private-key-name" type="text" name="keypair_name">

        <label for="keypair_value" class="control-label"><%= t 'app_settings.private_key' %></label>
        <textarea id="keypair_value" class="form-control ec2-private-key-value" name="keypair_value" placeholder="<%= t 'common.msg.key_droppable' %>" rows="7"></textarea>
        <p class="help-block"><%= t('app_settings.msg.aws_keypair') %></p>
      </div>
    </div>
  </fieldset>

</form>
<commit_msg>Add html5 form validation to AppSetting view.<commit_after><%# SkyHopperが使う APIKey, Region, Keypair %>

<form class="form-horizontal" id="app-settings-form" role="form">

  <fieldset>
    <legend><%= t('app_settings.title.system') %></legend>
    <div class="form-group">
      <label for="log_directory" class="col-sm-3 control-label"><%= t 'app_settings.log_directory' %></label>
      <div class="col-sm-7">
        <input type="text" class="form-control" id="log_directory" name="log_directory" pattern="^[~/].+" required>
        <p class="help-block"><%= I18n.t('app_settings.msg.log_directory') %></p>
      </div>
    </div>
  </fieldset>


  <fieldset>
    <legend><%= t('app_settings.title.aws') %>&nbsp;<button type="button" class="btn btn-link" data-toggle="popover" title="AWS" data-content="<%= t('app_settings.msg.aws_description') %>"><%= glyphicon 'question-sign' %></button></legend>

    <div class="form-group">
      <label for="access_key" class="col-sm-3 control-label"><%= t 'app_settings.access_key' %></label>
      <div class="col-sm-7">
        <input type="text" class="form-control" id="access_key" name="access_key" pattern="[^\s]+" required>
        <p class="help-block"><%= t('app_settings.msg.access_key') %></p>
      </div>
    </div>

    <div class="form-group">
      <label for="secret_access_key" class="col-sm-3 control-label"><%= t 'app_settings.secret_access_key' %></label>
      <div class="col-sm-7">
        <input type="text" class="form-control form-control-masked" id="secret_access_key" name="secret_access_key" pattern="[^\s]+" required>
        <p class="help-block"><%= t('app_settings.msg.secret_access_key') %></p>
      </div>
    </div>

    <div class="form-group">
      <label for="aws_region" class="col-sm-3 control-label"><%= t 'app_settings.aws_region' %></label>
      <div class="col-sm-7">
        <select class="form-control" id="aws_region" name="aws_region">
          <%= please_select_option %>
          <%= options_for_select(AWS::Regions) %>
        </select>
        <p class="help-block"><%= t('app_settings.msg.aws_region') %></p>
      </div>
    </div>

    <div class="form-group">
      <label class="col-sm-3 control-label"><%= t 'app_settings.aws_keypair' %></label>
      <div class="col-sm-7">
        <label for="keypair_name" class="control-label"><%= t 'app_settings.keypair_name' %></label>
        <input id="keypair_name" class="form-control ec2-private-key-name" type="text" name="keypair_name" required maxlength="255">

        <label for="keypair_value" class="control-label"><%= t 'app_settings.private_key' %></label>
        <textarea id="keypair_value" class="form-control ec2-private-key-value" name="keypair_value" placeholder="<%= t 'common.msg.key_droppable' %>" rows="7"></textarea>
        <p class="help-block"><%= t('app_settings.msg.aws_keypair') %></p>
      </div>
    </div>
  </fieldset>

</form>

{'fraction_non_alphanumeric': 0.2101933216168717, 'fraction_numerical': 0.005975395430579965, 'mean_word_length': 3.8807890222984565, 'pattern_counts': {'":': 0, '<': 171, '<?xml version=': 0, '>': 171, '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': '4735404', 'n_tokens_mistral': 2055, 'n_tokens_neox': 1948, 'n_words': 342}