<div class="row form-group">
  <div class="col-sm-12 col-md-3 form-label">
    <label class="form-control-static">Check Type</label>
  </div>
  <div class="col-sm-12 col-md-9">
    <div class="radio small pull-left" style="margin-right: 20px;">
      <label class="form-control-static">{{radio-button selection=checkType value="none"}} None</label>
    </div>
    <div class="radio small pull-left" style="margin-right: 20px;">
      <label class="form-control-static">{{radio-button selection=checkType value="tcp"}} TCP Connection Opens</label>
    </div>
    <div class="radio small pull-left">
      <label class="form-control-static">{{radio-button selection=checkType value="http"}} HTTP Responds 2xx/3xx</label>
    </div>
  </div>
</div>

{{#if (eq checkType "http")}}
  <div class="row form-group">
    <div class="col-sm-12 col-md-3 form-label">
      <label class="form-control-static">HTTP Request*</label>
    </div>
    <div class="col-sm-12 col-md-7">
      <div class="input-group">
        <div class="input-group-btn">
          <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false" style="border-right: 0;">{{uriMethod}} <span class="caret"></span></button>
          <ul class="dropdown-menu" role="menu">
            <li role="presentation" class="dropdown-header">
              Select A HTTP Method:
            </li>
            {{#each uriMethodChoices as |choice|}}
              <li {{action "chooseUriMethod" choice}}>
                <a>{{choice}}</a>
              </li>
            {{/each}}
          </ul>
        </div>

        {{input type="text" classNames="form-control" placeholder="Request Path e.g. /healthcheck" value=uriPath}}

        <div class="input-group-btn">
          <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">{{uriVersion}} <span class="caret"></span></button>
          <ul class="dropdown-menu" role="menu">
            <li role="presentation" class="dropdown-header">
              Select A HTTP Version:
            </li>
            {{#each uriVersionChoices as |choice|}}
              <li {{action "chooseUriVersion" choice}}>
                <a>{{choice}}</a>
              </li>
            {{/each}}
          </ul>
        </div>
      </div>
    </div>
  </div>
  {{#if showUriHost}}
    <div class="row form-group">
      <div class="col-sm-12 col-md-2 form-label">
        <label class="form-control-static">Host Header</label>
      </div>
      <div class="col-sm-12 col-md-8">
        {{input type="text" classNames="form-control" placeholder="e.g. www.example.com" value=uriHost}}
      </div>
    </div>
  {{/if}}
{{/if}}

{{#if (not (eq checkType "none"))}}
  <div class="row form-group">
    <div class="col-sm-12 col-md-3 form-label">
      <label class="form-control-static">Port*</label>
    </div>
    <div class="col-sm-12 col-md-2">
      {{input type="number" min="1" max="65535" classNames="form-control" placeholder="e.g. 80" value=healthCheck.port}}
    </div>
  </div>
  <div class="row form-group">
    <div class="col-sm-12 col-md-3 form-label">
      <label class="form-control-static">Check Interval</label>
    </div>
    <div class="col-sm-12 col-md-2">
      <div class="input-group">
        {{input type="number" min=1 step=1000 classNames="form-control" value=healthCheck.interval}}
        <span class="input-group-addon">ms</span>
      </div>
    </div>
    <div class="col-sm-12 col-md-3 form-label">
      <label class="form-control-static">Timeout</label>
    </div>
    <div class="col-sm-12 col-md-2">
      <div class="input-group">
        {{input type="number" min=1 step=100 classNames="form-control" value=healthCheck.responseTimeout}}
        <span class="input-group-addon">ms</span>
      </div>
    </div>
  </div>

  <div class="row form-group">
    <div class="col-sm-12 col-md-3 form-label">
      <label class="form-control-static">Healthy Threshold</label>
    </div>
    <div class="col-sm-12 col-md-2">
      {{input type="number" min=1 step=1 classNames="form-control" value=healthCheck.healthyThreshold}}
    </div>
    <div class="col-sm-12 col-md-3 form-label">
      <label class="form-control-static">Unhealthy Threshold</label>
    </div>
    <div class="col-sm-12 col-md-2">
      {{input type="number" min=1 step=1 classNames="form-control" value=healthCheck.unhealthyThreshold}}
    </div>
  </div>
{{/if}}
