<td><div class="form-control-static input-sm">The host</div></td>
<td>
  {{view "select"
    class="form-control input-sm"
    content=schedulingRuleSuffixChoices
    value=suffix
    optionValuePath="content.value"
    optionLabelPath="content.label"
  }}
</td>
<td><div class="form-control-static text-center input-sm">have a</div></td>
<td>
  {{view "select"
    class="form-control input-sm"
    content=schedulingRuleKindChoices
    value=kind
    optionValuePath="content.value"
    optionLabelPath="content.label"
  }}
</td>
<td>
  {{#if (not (or (eq kind "service_name") (eq kind "container_name")))}}
    <div class="form-control-static text-center input-sm">of</div>
  {{/if}}
</td>
<td>
  {{#if (eq kind "host_label")}}
    <div class="input-group">
      {{input type="text" class="form-control input-sm" value=userKey}}
      <div class="input-group-btn">
        <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><span class="caret"></span></button>
        <ul class="dropdown-menu dropdown-menu-right" role="menu">
          {{#each hostLabelKeyChoices as |key|}}
            <li><a {{action "setKey" key}}>{{key}}</a></li>
          {{/each}}
        </ul>
      </div>
    </div>
  {{/if}}
  {{#if (eq kind "container_label")}}
    <div class="input-group">
      {{input type="text" class="form-control input-sm" value=userKey}}
      <div class="input-group-btn">
        <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><span class="caret"></span></button>
        <ul class="dropdown-menu dropdown-menu-right" role="menu">
          {{#each containerLabelKeyChoices as |key|}}
            <li><a {{action "setKey" key}}>{{key}}</a></li>
          {{/each}}
        </ul>
      </div>
    </div>
  {{/if}}
</td>
<td>
  {{#if (not (or (eq kind "service_name") (eq kind "container_name")))}}
    <div class="form-control-static text-center input-sm">=</div>
  {{/if}}
</td>
<td>
  {{#if (eq kind "host_label")}}
    <div class="{{if hostLabelValueChoices 'input-group'}}">
      {{input type="text" class="form-control input-sm" value=userValue}}
      {{#if hostLabelValueChoices.length}}
        <div class="input-group-btn">
          <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><span class="caret"></span></button>
          <ul class="dropdown-menu dropdown-menu-right" role="menu">
            {{#each hostLabelValueChoices as |value|}}
              <li><a {{action "setValue" value}}>{{value}}</a></li>
            {{/each}}
          </ul>
        </div>
      {{/if}}
    </div>
  {{/if}}
  {{#if (eq kind "container_label")}}
    <div class="{{if containerLabelValueChoices 'input-group'}}">
      {{input type="text" class="form-control input-sm" value=userValue}}
      {{#if containerLabelValueChoices.length}}
        <div class="input-group-btn">
          <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><span class="caret"></span></button>
          <ul class="dropdown-menu dropdown-menu-right" role="menu">
            {{#each containerLabelValueChoices as |value|}}
              <li><a {{action "setValue" value}}>{{value}}</a></li>
            {{/each}}
          </ul>
        </div>
      {{/if}}
    </div>
  {{/if}}
  {{#if (eq kind "service_name")}}
    <div class="{{if serviceValueChoices 'input-group'}}">
      {{input type="text" class="form-control input-sm" value=userValue}}
       {{#if serviceValueChoices.length}}
        <div class="input-group-btn">
          <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><span class="caret"></span></button>
          <ul class="dropdown-menu dropdown-menu-right" role="menu">
            {{#each serviceValueChoices as |value|}}
              <li><a {{action "setValue" value}}>{{value}}</a></li>
            {{/each}}
          </ul>
        </div>
      {{/if}}
    </div>
  {{/if}}
  {{#if (eq kind "container_name")}}
    <div class="{{if containerValueChoices 'input-group'}}">
      {{input type="text" class="form-control input-sm" value=userValue}}
       {{#if containerValueChoices.length}}
        <div class="input-group-btn">
          <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><span class="caret"></span></button>
          <ul class="dropdown-menu dropdown-menu-right" role="menu">
            {{#each containerValueChoices as |value|}}
              <li><a {{action "setValue" value}}>{{value}}</a></li>
            {{/each}}
          </ul>
        </div>
      {{/if}}
    </div>
  {{/if}}
</td>
<td class="text-right">
  <div class="form-control-static input-sm">
    <button {{action "remove"}} class="btn-circle-x" type="button" tabindex="-1"></button>
  </div>
</td>
