<section class="header">
  <h3>
    {{action-menu model=model classNames="pull-right"}}
    <div class="state {{model.stateColor}}">
      <i class="{{model.stateIcon}}"></i> {{model.displayState}}
    </div>
    <span class="right-divider">{{#link-to "environments"}}Stacks:{{/link-to}} {{#link-to "environment" model.environmentId}}{{model.displayEnvironment}}:{{/link-to}} {{model.displayName}}</span>
  </h3>
  {{partial "description"}}
</section>

<section class="well">
  <label class="section">Info</label>
  <ul class="list-lines">
    {{#if model.showTransitioningMessage}}
      <li>
        <label>Message</label>
        <span class="force-wrap">
          {{model.transitioningMessage}}
        </span>
      </li>
    {{/if}}

    <li>
      <label>Type</label>
      {{model.displayType}}
    </li>

    {{#if model.canScale}}
      <li>
        <label>Scale</label>
        {{model.scale}}
        &nbsp;
        &nbsp;
        <button class="btn btn-default btn-xs" {{action "scaleDown" target=model}} disabled={{eq model.scale 1}}><i class="icon icon-minus"></i></button>
        <button class="btn btn-default btn-xs" {{action "scaleUp" target=model}}><i class="icon icon-plus"></i></button>
      </li>
    {{/if}}

    {{#if model.hasImage}}
      <li>
        <label>Image</label>
        <span class="force-wrap">
          {{display-image model.launchConfig.imageUuid}} {{zero-clipboard text=(display-image model.launchConfig.imageUuid)}}
        </span>
      </li>

      <li>
        <label>Entrypoint</label>
        <span class="force-wrap">
          {{#if model.launchConfig.entryPoint}}
            {{model.launchConfig.entryPoint}}
          {{else}}
            <span class="text-muted">None</span>
          {{/if}}
        </span>
      </li>

      <li>
        <label>Command</label>
        <span class="force-wrap">
          {{#if model.launchConfig.command}}
            {{model.launchConfig.command}}
          {{else}}
            <span class="text-muted">None</span>
          {{/if}}
        </span>
      </li>
    {{/if}}

  </ul>
</section>

{{#if model.hasLabels}}
  <section class="well" style="margin-bottom: 0;">
    <label class="section">Labels</label>
    {{labels-section model=model.launchConfig}}
  </section>
{{/if}}

{{#if model.hasContainers}}
  <section>
    <ul class="nav nav-tabs nav-tabs-well">
      {{#link-to "service.containers" tagName="li" href=false}}<a><i class="ss-box"></i> Containers</a>{{/link-to}}
    </ul>
    <div class="well nav-well">
      {{outlet}}
    </div>
  </section>
{{/if}}
