<div class="btn-group filterTree">
    <a ng-class="{'disabled': readonly}" href="javascript:void(0)" data-toggle="dropdown" class="btn dropdown-toggle">
        <span ng-show="!filter.label">Add</span>
        <span class="filter-label" ng-show="filter.label">{{filter.label}}</span>
        <span class="caret"></span>
    </a>
    <ul class="dropdown-menu dropdown_reports">
        <li class="margin-left" ng-hide="ui.InventoryItems.filters.hardwareFilter.length || ui.InventoryItems.filters.softwareFilter.length || ui.InventoryItems.filters.networkFilter.length  || ui.InventoryItems.filters.securityFilter.length || ui.InventoryItems.filters.noCategoryFilter.length || ui.InventoryItems.filters.noGroupFilter.length">
            <span class="help-block">No attributes found</span>
        </li>
        <li ng-show="ui.InventoryItems.filters.hardwareFilter.length" class="group-header ng-scope">
            <span class="ng-binding">Hardware</span>
            <ul class="group-items ng-scope">
                <li ng-repeat="(index, field) in ui.InventoryItems.filters.hardwareFilter " ng-hide="field.hidden">
                    <a ng-click="addFilter(field, place)" href="javascript:void(0)">{{field.label}}</a>
                </li>
            </ul>
        </li>
        <li ng-show="ui.InventoryItems.filters.softwareFilter.length" class="group-header ng-scope">
            <span class="ng-binding">Software</span>
            <ul class="group-items ng-scope">
                <li ng-repeat="(index, field) in ui.InventoryItems.filters.softwareFilter " ng-hide="field.hidden">
                    <a ng-click="addFilter(field, place)" href="javascript:void(0)">{{field.label}}</a>
                </li>
            </ul>
        </li>
        <li ng-show="ui.InventoryItems.filters.networkFilter.length" class="group-header ng-scope">
            <span class="ng-binding">Network</span>
            <ul class="group-items ng-scope">
                <li ng-repeat="(index, field) in ui.InventoryItems.filters.networkFilter " ng-hide="field.hidden">
                    <a ng-click="addFilter(field, place)" href="javascript:void(0)">{{field.label}}</a>
                </li>
            </ul>
        </li>
        <li ng-show="ui.InventoryItems.filters.securityFilter.length" class="group-header ng-scope">
            <span class="ng-binding">Security</span>
            <ul class="group-items ng-scope">
                <li ng-repeat="(index, field) in ui.InventoryItems.filters.securityFilter " ng-hide="field.hidden">
                    <a ng-click="addFilter(field, place)" href="javascript:void(0)">{{field.label}}</a>
                </li>
            </ul>
        </li>
        <li ng-show="ui.InventoryItems.filters.noCategoryFilter.length" class="group-header ng-scope">
            <span class="ng-binding">User defined</span>
            <ul class="group-items ng-scope">
                <li ng-repeat="(index, field) in ui.InventoryItems.filters.noCategoryFilter " ng-hide="field.hidden">
                    <a ng-click="addFilter(field, place)" href="javascript:void(0)">{{field.label}}</a>
                </li>
            </ul>
        </li>

        <li ng-show="ui.InventoryItems.filters.noGroupFilter.length>0" class="group-header ng-scope">
            <span class="ng-binding">Missing attribute_name</span>
            <ul class="group-items ng-scope">
                <li ng-repeat="(index, field) in ui.InventoryItems.filters.noGroupFilter" ng-hide="field.hidden">
                    <a ng-click="addFilter(field, place)" href="javascript:void(0)">{{field.label}}</a>
                </li>
            </ul>
        </li>
    </ul>
</div>
