
    <!-- EC2 instance partial -->
    <script id="services.ec2.regions.id.vpcs.id.instances.partial" type="text/x-handlebars-template">
        <div class="list-group-item active">
          <h4 class="list-group-item-heading">{{name}}</h4>
        </div>
        <div class="list-group-item">
          <h4>Information</h4>
          <ul>
            <li class="list-group-item-text">Region: {{region}}</li>
            <li class="list-group-item-text">VPC: {{get_value_at 'services.ec2.regions' region 'vpcs' vpc 'name'}} ({{vpc}})</li>
            <li class="list-group-item-text">ID: {{id}}</li>
            <li class="list-group-item-text">Reservation ID: {{reservation_id}}</li>
            <li class="list-group-item-text">Access Key name: {{KeyName}}</li>
            <li class="list-group-item-text">State: {{make_title State.Name}}</li>
            <li class="list-group-item-text">Instance Type:
              <span id="services.ec2.regions.vpcs.instances-unscannable-instance-types-{{id}}"> {{InstanceType}}<span>
            </li>
            <li class="list-group-item-text">Up since: {{LaunchTime}}</li>
          </ul>
        </div>
        <div class="list-group-item">
          <h4>Network</h4>
          <ul>
            <li class="list-group-item-text">Public IP: {{PublicIpAddress}}</li>
            <li class="list-group-item-text">Public DNS: {{PublicDnsName}}</li>
            <li class="list-group-item-text">Private IP: {{PrivateIpAddress}}</li>
            <li class="list-group-item-text">Private DNS: {{PrivateDnsName}}</li>
          </ul>
        </div>
        <div class="list-group-item" style="padding-bottom: 0 !important;">
          <div class="accordion">
            <h4 class="list-group-item-heading accordion-heading">Security groups
              <a class="accordion-toggle" data-toggle="collapse" href="#services\.ec2\.regions\.{{region}}\.vpcs\.{{vpc}}\.instances\.{{id}}\.security_groups"><span class="badge pull-right btn-info">{{security_groups.length}}</span></a>
            </h4>
            <div id="services.ec2.regions.{{region}}.vpcs.{{vpc}}.instances.{{id}}.security_groups" class="accordion-body collapse">
              <div class="accordion-inner">
                <ul class="no-bullet">
                  {{#each security_groups}}
                    <li><a href="javascript:showObject('services.ec2.regions.{{../region}}.vpcs.{{../vpc}}.security_groups.{{GroupId}}')">{{GroupName}}</a></li>
                  {{/each}}
                </ul>
              </div>
            </div>
          </div>
        </div>
    </script>
    <script>
      Handlebars.registerPartial("services.ec2.regions.id.vpcs.id.instances", $("#services\\.ec2\\.regions\\.id\\.vpcs\\.id\\.instances\\.partial").html());
    </script>

    <!-- Single EC2 instance template -->
    <script id="single_ec2_instance-template" type="text/x-handlebars-template">
        <div style="text-align: right; padding-right: 10px; text-weight: bold;"><a href="javascript:hidePopup()">X</a></div>
        {{> services.ec2.regions.id.vpcs.id.instances}}
    </script>
    <script>
        var single_ec2_instance_template = Handlebars.compile($("#single_ec2_instance-template").html());
    </script>

