{{!
* 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="links">
  <ul>
    <li class="thumbnail row">
      <a {{bindAttr class=":corner-icon :span1 view.parentView.isMoving:hidden"}} href="#" {{action deleteWidget target="view"}}><i class="icon-remove-sign icon-large"></i></a>
      <div class="caption span10"> {{view.title}}</div>

      <div class="widget-content" >
        <table>
          <!--hbase master server-->
          <tr>
            <td>
              {{#if view.activeMaster}}
                <a href="#" {{action showDetails view.activeMaster.host}}>{{t dashboard.services.hbase.masterServer}}</a>
              {{else}}
                {{t dashboard.services.hbase.noMasterServer}}
              {{/if}}
            </td>
          </tr>
          <!--region servers-->
          <tr>
              <td><a href="#" {{action filterHosts view.component}}>{{view.model.regionServersTotal}} {{t dashboard.services.hbase.regionServers}}</a></td>
          </tr>
          <!--hbase master Web UI-->
          <tr>
            <td>
              {{#if view.activeMaster}}
                <a {{bindAttr href="view.hbaseMasterWebUrl"}} target="_blank">{{t dashboard.services.hbase.masterWebUI}}</a>
              {{else}}
                {{t services.service.summary.notAvailable}}
              {{/if}}
            </td>
          </tr>
        </table>
      </div>

      <div class="link-button">
        {{#if view.model.quickLinks.length}}
          {{#view App.QuickViewLinks contentBinding="view.model"}}
            <div class="btn-group">
              <a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">
                {{t common.more}}
                <span class="caret"></span>
              </a>
                <ul class="dropdown-menu">
                  {{#if view.isLoaded}}
                    {{#if view.quickLinksArray}}
                      <!--there are multiple masters eg, HBase multiple masters or HDFS HA enabled-->
                      {{#each quickLinks in view.quickLinksArray}}
                        <li class="dropdown-submenu">
                          <a href="javascript:void(null)">{{quickLinks.publicHostNameLabel}} &nbsp;</a>
                          <ul class="dropdown-menu">
                            {{#each quickLinks}}
                              <li><a {{bindAttr href="url"}} {{bindAttr target="view.linkTarget"}}>{{label}}</a></li>
                            {{/each}}
                          </ul>
                        </li>
                      {{/each}}
                    {{else}}
                      {{#each view.quickLinks}}
                        <li><a {{bindAttr href="url"}} {{bindAttr target="view.linkTarget"}}>{{label}}</a></li>
                      {{/each}}
                    {{/if}}
                  {{else}}
                    <div class="spinner"></div>
                  {{/if}}
                </ul>
            </div>
          {{/view}}
        {{/if}}
      </div>

    </li>
  </ul>
</div>