<commit_before>{{#if isSidekick}}
  <hr class="mt-20 mb-20" />

  <section class="header header-sidekick clearfix">
    <h2 class="inline-block">{{t headerToken name=configName}}</h2>
    <div class="right-buttons p-0">
      <button class="btn bg-transparent p-0 text-small text-right" {{action "removeSidekick" launchConfigIndex}}>{{t 'newContainer.removeSidekick'}}</button>
    </div>
  </section>
{{else}}
  <section class="header clearfix">
    <h1>{{t headerToken name=configName}}</h1>
  </section>
{{/if}}

<div class="row">
  <div class="col span-11-of-23">
    {{form-name-description
      model=primaryResource
      namePlaceholder="newContainer.name.placeholder"
      descriptionPlaceholder="newContainer.description.placeholder"
      rowClass=""
      colClass=""
      bothColClass=""
    }}
  </div>
  <div class="col span-11-of-23 offset-1-of-23">
    {{#if isSidekick}}
      {{!-- Sidekicks don't have their own scale --}}
      {{container/form-scale isSidekick=true}}
    {{else if isService}}
      {{!-- Normal primary service --}}
      {{container/form-scale
        initialLabels=launchConfig.labels
        initialScale=service.scale
        isGlobal=isGlobal
        isService=true
        errors=scaleErrors
        setLabels=(action 'setLabels' 'scale')
        setScale=(action  'setScale')
      }}
    {{else if isUpgrade}}
      {{!-- Containers can't set count on upgrade --}}
    {{else}}
      {{!-- Container count --}}
      {{container/form-scale
        isService=false
        initialScale=1
        errors=scaleErrors
        setScale=(action  'setScale')
      }}
    {{/if}}

  </div>
</div>

<div class="row">
  <div class="col span-11-of-23">
    {{container/form-image
      initialValue=launchConfig.imageUuid
      errors=imageErrors
      changed=(action 'setImage')
    }}
  </div>

  <div class="col span-11-of-23 offset-1-of-23">
    {{#if (or isSidekick isUpgrade)}}
      {{!-- Only a new primary service or container picks stack --}}
    {{else}}
      {{form-stack
        stack=stack
        errors=stackErrors
      }}
    {{/if}}
  </div>
</div>

<div class="row">
  <div class="col span-11-of-23">
    {{container/form-ports
      initialPorts=launchConfig.ports
      errors=portErrors
      changedStr=(action (mut launchConfig.ports))
      portsAsStrArray=launchConfig.ports
    }}
  </div>
  <div class="col span-11-of-23 offset-1-of-23">
    {{form-key-value
        initialMap=launchConfig.environment
        changed=(action (mut launchConfig.environment))
        allowEmptyValue=true
        editing=true
        header=(t 'newContainer.environment.label')
        addActionLabel="newContainer.environment.addAction"
        keyLabel="newContainer.environment.keyLabel"
        keyPlaceholder="newContainer.environment.keyPlaceholder"
        valueLabel="newContainer.environment.valueLabel"
        valuePlaceholder="newContainer.environment.valuePlaceholder"
    }}
  </div>
</div>

{{#if (not isSidekick)}}
  {{container/form-scheduling
    isService=isService
    isGlobal=isGlobal
    initialHostId=launchConfig.requestedHostId
    initialLabels=launchConfig.labels
    errors=schedulingErrors
    editing=true
    setLabels=(action 'setLabels' 'scheduling')
    setRequestedHost=(action 'setRequestedHostId')
  }}
{{/if}}

{{form-healthcheck
    classNames="accordion-wrapper"
    isService=isService
    healthCheck=launchConfig.healthCheck
    errors=healthCheckErrors
    editing=true
}}

{{#advanced-section advanced=false}}
  {{#accordion-list as | al expandFn | }}
<commit_msg>Fix expand function in health-check component<commit_after>{{#if isSidekick}}
  <hr class="mt-20 mb-20" />

  <section class="header header-sidekick clearfix">
    <h2 class="inline-block">{{t headerToken name=configName}}</h2>
    <div class="right-buttons p-0">
      <button class="btn bg-transparent p-0 text-small text-right" {{action "removeSidekick" launchConfigIndex}}>{{t 'newContainer.removeSidekick'}}</button>
    </div>
  </section>
{{else}}
  <section class="header clearfix">
    <h1>{{t headerToken name=configName}}</h1>
  </section>
{{/if}}

<div class="row">
  <div class="col span-11-of-23">
    {{form-name-description
      model=primaryResource
      namePlaceholder="newContainer.name.placeholder"
      descriptionPlaceholder="newContainer.description.placeholder"
      rowClass=""
      colClass=""
      bothColClass=""
    }}
  </div>
  <div class="col span-11-of-23 offset-1-of-23">
    {{#if isSidekick}}
      {{!-- Sidekicks don't have their own scale --}}
      {{container/form-scale isSidekick=true}}
    {{else if isService}}
      {{!-- Normal primary service --}}
      {{container/form-scale
        initialLabels=launchConfig.labels
        initialScale=service.scale
        isGlobal=isGlobal
        isService=true
        errors=scaleErrors
        setLabels=(action 'setLabels' 'scale')
        setScale=(action  'setScale')
      }}
    {{else if isUpgrade}}
      {{!-- Containers can't set count on upgrade --}}
    {{else}}
      {{!-- Container count --}}
      {{container/form-scale
        isService=false
        initialScale=1
        errors=scaleErrors
        setScale=(action  'setScale')
      }}
    {{/if}}

  </div>
</div>

<div class="row">
  <div class="col span-11-of-23">
    {{container/form-image
      initialValue=launchConfig.imageUuid
      errors=imageErrors
      changed=(action 'setImage')
    }}
  </div>

  <div class="col span-11-of-23 offset-1-of-23">
    {{#if (or isSidekick isUpgrade)}}
      {{!-- Only a new primary service or container picks stack --}}
    {{else}}
      {{form-stack
        stack=stack
        errors=stackErrors
      }}
    {{/if}}
  </div>
</div>

<div class="row">
  <div class="col span-11-of-23">
    {{container/form-ports
      initialPorts=launchConfig.ports
      errors=portErrors
      changedStr=(action (mut launchConfig.ports))
      portsAsStrArray=launchConfig.ports
    }}
  </div>
  <div class="col span-11-of-23 offset-1-of-23">
    {{form-key-value
        initialMap=launchConfig.environment
        changed=(action (mut launchConfig.environment))
        allowEmptyValue=true
        editing=true
        header=(t 'newContainer.environment.label')
        addActionLabel="newContainer.environment.addAction"
        keyLabel="newContainer.environment.keyLabel"
        keyPlaceholder="newContainer.environment.keyPlaceholder"
        valueLabel="newContainer.environment.valueLabel"
        valuePlaceholder="newContainer.environment.valuePlaceholder"
    }}
  </div>
</div>

{{#if (not isSidekick)}}
  {{container/form-scheduling
    isService=isService
    isGlobal=isGlobal
    initialHostId=launchConfig.requestedHostId
    initialLabels=launchConfig.labels
    errors=schedulingErrors
    editing=true
    setLabels=(action 'setLabels' 'scheduling')
    setRequestedHost=(action 'setRequestedHostId')
  }}
{{/if}}

{{form-healthcheck
    classNames="accordion-wrapper"
    isService=isService
    healthCheck=launchConfig.healthCheck
    errors=healthCheckErrors
    expandAll=null
    editing=true
}}

{{#advanced-section advanced=false}}
  {{#accordion-list as | al expandFn | }}

{'fraction_non_alphanumeric': 0.14232001114050968, 'fraction_numerical': 0.012254560646149562, 'mean_word_length': 3.0993150684931505, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 65, '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': '5891776', 'n_tokens_mistral': 2260, 'n_tokens_neox': 2165, 'n_words': 402}