
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<div class="app-summary">

 <div id="title-and-info-row" style="white-space: nowrap;">
  <% if (entity.getLinkByName('iconUrl')) { %>
  <div style="display: inline-block; vertical-align: bottom; padding-top: 12px; padding-bottom: 18px;">
    <img src="<%= encodeURI(entity.getLinkByName('iconUrl')) %>"
        style="max-width: 128px; max-height: 128px;"/>
  </div>
  <% } %>

  <div style="display: inline-block; vertical-align: bottom;">
  
   <div class="name" style="margin-bottom: 12px; padding-right: 12px;">
     <h2><%- entity.get('name') %></h2>
   </div>

  </div>
 </div>

 <div class="toggler-region">
  <div class="toggler-header">
    <div class="toggler-icon icon-chevron-down"></div>
    <div><b>Status</b></div>
  </div>
  <div class="inforow" style="position: relative;">
     
    <div style="display: inline-block; padding-left: 8px; padding-right: 24px; padding-top: 6px;">
        <div class="info-name-value status hide">
            <div class="name">Status</div>
            <div class="value"><i>Loading...</i></div>
        </div>
        <div class="info-name-value serviceUp hide">
            <div class="name">Service Up</div>
            <div class="value"><i>Loading...</i></div>
        </div>
        <div class="info-name-value url hide" style="margin-top: 12px;">
            <div class="name">URL</div>
            <div class="value"><i>Loading...</i></div>
        </div>
        
        <div class="info-name-value type" style="margin-top: 12px;">
            <div class="name">Type</div>
            <div class="value"><%- entity.get('type') %></div>
        </div>
        <div class="info-name-value id">
            <div class="name">ID</div>
            <div class="value"><%- entity.get('id') %></div>
        </div>
        <div class="info-name-value catalogItemId hide">
            <div class="name">Catalog Item</div>
            <div class="value"><a href="#v1/catalog/<%= (isApp ? "applications" : "entities") %>/<%= encodeURIComponent(entity.get('catalogItemId')) %>"><%- entity.get('catalogItemId') %></a></div>
        </div>

        <div class="additional-info-on-problem hide" style="margin-top: 12px;">
        </div>

        <div id="status-icon" style="display: inline-block; padding-top: 12px; padding-bottom: 18px; padding-right: 8px; position: absolute; right: 0; top: 0;"></div>

   </div>
  </div>
 </div>
 
 <div id="entity-spec-yaml-toggler" class="toggler-region region-config hide" style="margin-top: 18px;">
    <div class="toggler-header user-hidden">
      <div class="toggler-icon icon-chevron-left"></div>
      <div><b>Blueprint</b></div>
    </div>
    <div id="entity-spec-yaml" class="for-textarea hide">
      <textarea readonly="readonly" class="code-textarea"/>
    </div>
 </div>

  <div class="toggler-region region-config" style="margin-top: 18px;">
    <div class="toggler-header user-hidden">
      <div class="toggler-icon icon-chevron-left"></div>
      <div><b>Config</b></div>
    </div>
    <div id="advanced-config" class="hide"/>
  </div>

  <!-- TODO would like to show more info here, nicely; e.g.
         children, members (above? new section here ?)
         active tasks (new section here)
         locations / map (new section here ?)
  -->

</div>